PageSourceSearch

https://fantasticforms.com/static/js/2854.c2e8effa.chunk.js

js fantasticforms.com collected 2026-09-25 22:49:17 UTC 23,221 bytes, 3 lines download raw bytes

1/*! For license information please see 2854.c2e8effa.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[2854],{1089(e,t,a){a.d(t,{$C:()=>l,PE:()=>m,Sj:()=>p,Yq:()=>o,cn:()=>i,dc:()=>h,lW:()=>u,r6:()=>c,sg:()=>f,xv:()=>d});var s=a(89379),n=a(58387),r=a(89359);function i(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.QP)((0,n.$)(t))}function o(e,t){if(!e)return"";return new Date(e).toLocaleDateString("en-US",(0,s.A)({year:"numeric",month:"short",day:"numeric"},t?{timeZone:t}:{}))}function c(e,t){if(!e)return"";return new Date(e).toLocaleDateString("en-US",(0,s.A)({year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},t?{timeZone:t}:{}))}function l(){return Math.random().toString(36).substring(2,9)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e?e.length>t?e.substring(0,t)+"...":e:""}async function u(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy:",t),!1}}function m(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json";const s=new Blob(["string"===typeof e?e:JSON.stringify(e,null,2)],{type:a}),n=URL.createObjectURL(s),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}function f(e,t){let a;return function(){for(var s=arguments.length,n=new Array(s),r=0;r<s;r++)n[r]=arguments[r];clearTimeout(a),a=setTimeout(()=>{clearTimeout(a),e(...n)},t)}}function p(e,t){return"".concat(window.location.origin,"/f/").concat(t||e)}function h(e,t){const a=t||e;return'<div id="ff-'.concat(a,'"></div>\n<script src="').concat(window.location.origin,'/embed.js" data-form-id="').concat(a,'"><\/script>')}},5949(e,t,a){a.d(t,{E:()=>d});var s=a(89379),n=a(53986),r=(a(65043),a(10917)),i=a(1089),o=a(70579);const c=["className","variant"],l=(0,r.F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d(e){let{className:t,variant:a}=e,r=(0,n.A)(e,c);return(0,o.jsx)("div",(0,s.A)({className:(0,i.cn)(l({variant:a}),t)},r))}},13390(e,t,a){a.d(t,{$:()=>m,r:()=>u});var s=a(89379),n=a(53986),r=a(65043),i=a(16851),o=a(10917),c=a(1089),l=a(70579);const d=["className","variant","size","asChild"],u=(0,o.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),m=r.forwardRef((e,t)=>{let{className:a,variant:r,size:o,asChild:m=!1}=e,f=(0,n.A)(e,d);const p=m?i.DX:"button";return(0,l.jsx)(p,(0,s.A)({className:(0,c.cn)(u({variant:r,size:o,className:a})),ref:t},f))});m.displayName="Button"},22024(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},23168(e,t,a){a.d(t,{Z:()=>n});var s=a(65043);function n(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}},33005(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},36210(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},51654(e,t,a){a.d(t,{d:()=>d});var s=a(89379),n=a(53986),r=a(65043),i=a(77943),o=a(1089),c=a(70579);const l=["className"],d=r.forwardRef((e,t)=>
2{let{className:a}=e,r=(0,n.A)(e,l);return(0,c.jsx)(i.bL,(0,s.A)((0,s.A)({className:(0,o.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a)},r),{},{ref:t,children:(0,c.jsx)(i.zi,{className:(0,o.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}))});d.displayName=i.bL.displayName},52854(e,t,a){a.r(t),a.d(t,{default:()=>_});var s=a(89379),n=a(65043),r=a(45685),i=a(79722),o=a(13390),c=a(92264),l=a(59938),d=a(51654),u=a(91140),m=a(5949),f=a(56328),p=a(77819),h=a(22024),x=a(65469),b=a(36210),g=a(33005),v=a(70764),y=a(68899),w=a(64702),N=a(4980),A=a(70579);const j="https://fantasticforms.com",k=()=>{const e=localStorage.getItem("ff_token");return e?{Authorization:"Bearer ".concat(e)}:{}};
2function _(){const[e,t]=(0,n.useState)([]),[a,_]=(0,n.useState)(!0);(0,n.useEffect)(()=>{(async()=>{try{const e=await N._0.getAll(),a=(Array.isArray(e)?e:(null===e||void 0===e?void 0:e.forms)||[]).map(e=>{var t;const a=(null===e||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.airtable)||{};return(0,s.A)((0,s.A)({},e),{},{_at:{tokenInput:"",urlInput:"",enabled:!!a.enabled,configured:!!(a.token&&a.base_id&&a.table_id),maskedToken:a.token?"\u2026".concat(a.token.slice(-4)):null,tableName:a.table_name||null,fields:a.fields||[],lastError:a.last_error||null,saving:!1,testing:!1}})});t(a)}catch(e){console.error(e),f.oR.error("Failed to load Airtable settings")}finally{_(!1)}})()},[]);const z=(e,a)=>t(t=>t.map(t=>t.id===e?(0,s.A)((0,s.A)({},t),{},{_at:(0,s.A)((0,s.A)({},t._at),a)}):t));return a?(0,A.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-zinc-50",children:(0,A.jsx)(w.A,{size:48})}):(0,A.jsxs)("div",{className:"min-h-screen bg-zinc-50","data-testid":"airtable-page",children:[(0,A.jsx)("header",{className:"bg-white border-b border-zinc-200",children:(0,A.jsxs)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center gap-4",children:[(0,A.jsx)(r.N_,{to:"/integrations",className:"p-2 hover:bg-zinc-100 rounded-lg",children:(0,A.jsx)(x.A,{className:"w-5 h-5"})}),(0,A.jsxs)("div",{className:"flex items-center gap-3",children:[(0,A.jsx)("div",{className:"w-8 h-8 bg-[#F82B60] rounded-lg flex items-center justify-center",children:(0,A.jsx)(g.A,{className:"w-4 h-4 text-white"})}),(0,A.jsx)("h1",{className:"text-xl font-bold text-zinc-900",children:"Airtable"}),(0,A.jsx)(m.E,{variant:"secondary",className:"ml-2",children:"Free"})]})]})}),(0,A.jsxs)("main",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-8",children:[(0,A.jsxs)(u.Zp,{children:[(0,A.jsx)(u.aR,{children:(0,A.jsx)(u.ZB,{className:"text-base",children:"How it works"})}),(0,A.jsxs)(u.Wu,{className:"space-y-4",children:[(0,A.jsxs)("ol",{className:"text-sm text-zinc-700 space-y-2 list-decimal list-inside",children:[(0,A.jsxs)("li",{children:["Open"," ",(0,A.jsxs)("a",{href:"https://airtable.com/create/tokens",target:"_blank",rel:"noopener noreferrer",className:"underline inline-flex items-center gap-0.5",children:["airtable.com/create/tokens ",(0,A.jsx)(v.A,{className:"w-3 h-3"})]})," ","\u2192 ",(0,A.jsx)("strong",{children:"Create new token"}),". Name it (e.g. ",(0,A.jsx)("em",{children:"Fantastic Forms"}),")."]}),(0,A.jsxs)("li",{children:["Add scopes: ",(0,A.jsx)("code",{className:"bg-zinc-100 px-1 rounded text-xs",children:"data.records:read"}),", ",(0,A.jsx)("code",{className:"bg-zinc-100 px-1 rounded text-xs",children:"data.records:write"}),", ",(0,A.jsx)("code",{className:"bg-zinc-100 px-1 rounded text-xs",children:"schema.bases:read"}),"."]}),(0,A.jsxs)("li",{children:["Under ",(0,A.jsx)("strong",{children:"Access"}),", add the specific base(s) you want submissions to land in. Click ",(0,A.jsx)("strong",{children:"Create token"})," and copy the value (starts with ",(0,A.jsx)("code",{className:"bg-zinc-100 px-1 rounded text-xs",children:"pat"}),")."]}),(0,A.jsxs)("li",{children:["In Airtable, open the table you want submissions in, click ",(0,A.jsx)("strong",{children:"Share view"})," \u2192 ",(0,A.jsx)("strong",{children:"Copy link to view"}),", and paste both values below."]})]}),(0,A.jsx)("p",{className:"text-xs text-zinc-500",children:"Form questions auto-match Airtable columns by name (case-insensitive). Computed columns (formula, rollup, lookup, count, etc.) are skipped automatically \u2014 we only write to writable fields. Select / multiple-select options are auto-created on the fly if missing."})]})]}),(0,A.jsxs)("section",{className:"space-y-3","data-testid":"forms-section",children:[(0,A.jsxs)("div",{className:"flex items-center justify-between",children:[(0,A.jsx)("h2",{className:"text-base font-semibold text-zinc-900",children:"Your forms"}),(0,A.jsxs)("span",{className:"text-xs text-zinc-500",children:[e.length," ",1===e.length?"form":"forms"]})]}),0===e.length?(0,A.jsx)(u.Zp,{children:(0,A.jsxs)(u.Wu,{className:"py-10 text-center text-sm text-zinc-500",children:["No forms yet. ",(0,A.jsx)(r.N_,{to:"/dashboard",className:"text-zinc-900 underline",children:"Go to dashboard"}),"."]})}):(0,A.jsx)("div",{className:"space-y-3",children:e.map(e=>(0,A.jsx)(u.Zp,{"data-testid":"form-row-".concat(e.id),children:(0,A.jsxs)(u.Wu,{className:"p-5 space-y-3",children:[(0,A.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,A.jsxs)("div",{className:"min-w-0",children:[(0,A.jsx)("p",{className:"font-medium text-zinc-900 truncate",children:e.title||"Untitled form"}),e._at.configured?(0,A.jsxs)("p",{className:"text-xs text-zinc-500 mt-0.5",children:["Connected to table ",(0,A.jsx)("strong",{children:e._at.tableName})," \xb7 token ",(0,A.jsx)("code",{className:"px-1 bg-zinc-100 rounded",children:e._at.maskedToken})]}):(0,A.jsx)("p",{className:"text-xs text-zinc-400 mt-0.5",children:"Not connected"}),e._at.lastError&&(0,A.jsxs)("p",{className:"text-xs text-red-600 mt-1 inline-flex items-center gap-1",children:[(0,A.jsx)(p.A,{className:"w-3 h-3"})," Last sync failed: ",e._at.lastError]})]}),e._at.configured&&(0,A.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,A.jsx)("span",{className:"text-xs text-zinc-500",children:e._at.enabled?"Active":"Paused"}),(0,A.jsx)(d.d,{checked:e._at.enabled,onCheckedChange:t=>(async(e,t)=>{if(e._at.configured){z(e.id,{saving:!0});try{await i.A.put("".concat(j,"/api/airtable/forms/").concat(e.id),{enabled:t},{headers:(0,s.A)((0,s.A)({},k()),{},{"Content-Type":"application/json"})}),z(e.id,{enabled:t}),f.oR.success(t?"Airtable sync resumed":"Airtable sync paused")}catch(r){var a,n;f.oR.error((null===r||void 0===r||null===(a=r.response)||void 0===a||null===(n=a.data)||void 0===n?void 0:n.detail)||"Failed to update"),z(e.id,{enabled:!t})}finally{z(e.id,{saving:!1})}}else f.oR.error("Save a connection first, then toggle it on.")})(e,t),"data-testid":"airtable-toggle-".concat(e.id)})]})]}),e._at.configured&&e._at.fields.length>0&&(0,A.jsxs)("div",{className:"rounded-md border border-zinc-100 bg-zinc-50 p-3","data-testid":"airtable-fields",children:[(0,A.jsxs)("p",{className:"text-xs text-zinc-500 mb-2",children:["Writable Airtable columns (",e._at.fields.length,")"]}),(0,A.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e._at.fields.map(e=>(0,A.jsxs)("span",{className:"inline-flex items-baseline gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium bg-white text-zinc-700 border border-zinc-200",children:[e.name,(0,A.jsx)("span",{className:"text-zinc-400",children:"\xb7"}),(0,A.jsx)("span",{className:"text-zinc-500",children:e.type})]},e.name))})]}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[(0,A.jsxs)("div",{children:[(0,A.jsxs)(l.J,{className:"text-xs text-zinc-500",children:["Personal Access Token",e._at.configured?" (paste a new one to replace)":""]}),(0,A.jsx)(c.p,{placeholder:"pat...",value:e._at.tokenInput,onChange:t=>z(e.id,{tokenInput:t.target.value}),"data-testid":"airtable-token-".concat(e.id),className:"font-mono text-xs",type:"password",autoComplete:"off"})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)(l.J,{className:"text-xs text-zinc-500",children:"Base / Table URL"}),(0,A.jsx)(c.p,{placeholder:"https://airtable.com/appXXXX/tblYYYY/...",value:e._at.urlInput,onChange:t=>z(e.id,{urlInput:t.target.value}),"data-testid":"airtable-url-".concat(e.id),className:"font-mono text-xs"})]})]}),(0,A.jsxs)("div",{className:"flex gap-2 justify-end",children:[(0,A.jsxs)(o.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{const t=(e._at.tokenInput||"").trim(),a=(e._at.urlInput||"").trim();if(t&&a){z(e.id,{testing:!0});try{const{data:n}=await i.A.post("".concat(j,"/api/airtable/test"),{token:t,base_url:a},{headers:(0,s.A)((0,s.A)({},k()),{},{"Content-Type":"application/json"})});
2f.oR.success('Connected to "'.concat(n.table_name,'" (').concat(n.fields.length," writable columns)")),z(e.id,{tableName:n.table_name,fields:n.fields})}catch(o){var n,r;f.oR.error((null===o||void 0===o||null===(n=o.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail)||"Could not reach Airtable")}finally{z(e.id,{testing:!1})}}else f.oR.error("Paste both the token and base URL first")})(e),disabled:e._at.testing||e._at.saving,"data-testid":"airtable-test-".concat(e.id),children:[e._at.testing?(0,A.jsx)(h.A,{className:"w-4 h-4 animate-spin"}):(0,A.jsx)(y.A,{className:"w-4 h-4 mr-1"}),"Test"]}),(0,A.jsxs)(o.$,{size:"sm",onClick:()=>(async e=>{const t=(e._at.tokenInput||"").trim(),a=(e._at.urlInput||"").trim();if(t&&a){z(e.id,{saving:!0});try{const{data:n}=await i.A.put("".concat(j,"/api/airtable/forms/").concat(e.id),{enabled:!0,token:t,base_url:a},{headers:(0,s.A)((0,s.A)({},k()),{},{"Content-Type":"application/json"})});f.oR.success("Connected \u2014 new submissions will create Airtable records"),z(e.id,{enabled:!0,configured:!0,maskedToken:n.token_masked||null,tableName:n.table_name||null,fields:n.fields||[],tokenInput:"",urlInput:"",lastError:null})}catch(o){var n,r;f.oR.error((null===o||void 0===o||null===(n=o.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail)||"Failed to save Airtable connection")}finally{z(e.id,{saving:!1})}}else f.oR.error("Paste both the token and base URL first")})(e),disabled:e._at.saving||e._at.testing,"data-testid":"airtable-save-".concat(e.id),children:[e._at.saving?(0,A.jsx)(h.A,{className:"w-4 h-4 animate-spin"}):(0,A.jsx)(b.A,{className:"w-4 h-4 mr-1"}),e._at.configured?"Replace":"Save"]}),e._at.configured&&(0,A.jsx)(o.$,{variant:"ghost",size:"sm",onClick:()=>(async e=>{if(window.confirm("Disconnect Airtable? New submissions will no longer create Airtable records.")){z(e.id,{saving:!0});try{await i.A.put("".concat(j,"/api/airtable/forms/").concat(e.id),{enabled:!1},{headers:(0,s.A)((0,s.A)({},k()),{},{"Content-Type":"application/json"})}),f.oR.success("Disconnected"),z(e.id,{enabled:!1,configured:!1,maskedToken:null,tableName:null,fields:[],tokenInput:"",urlInput:"",lastError:null})}catch(t){f.oR.error("Failed to disconnect")}finally{z(e.id,{saving:!1})}}})(e),disabled:e._at.saving,"data-testid":"airtable-disconnect-".concat(e.id),children:"Disconnect"})]})]})},e.id))})]})]})]})}},59938(e,t,a){a.d(t,{J:()=>m});var s=a(89379),n=a(53986),r=a(65043),i=a(65131),o=a(10917),c=a(1089),l=a(70579);const d=["className"],u=(0,o.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),m=r.forwardRef((e,t)=>{let{className:a}=e,r=(0,n.A)(e,d);return(0,l.jsx)(i.b,(0,s.A)({ref:t,className:(0,c.cn)(u(),a)},r))});m.displayName=i.b.displayName},65131(e,t,a){a.d(t,{b:()=>u});var s=a(89379),n=a(65043),r=a(53986),i=(a(97950),a(16851)),o=a(70579);const c=["asChild"];var l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const a=(0,i.TL)("Primitive.".concat(t)),l=n.forwardRef((e,n)=>{const{asChild:i}=e,l=(0,r.A)(e,c),d=i?a:t;return"undefined"!==typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(d,(0,s.A)((0,s.A)({},l),{},{ref:n}))});return l.displayName="Primitive.".concat(t),(0,s.A)((0,s.A)({},e),{},{[t]:l})},{});var d=n.forwardRef((e,t)=>(0,o.jsx)(l.label,(0,s.A)((0,s.A)({},e),{},{ref:t,onMouseDown:t=>{var a;t.target.closest("button, input, select, textarea")||(null===(a=e.onMouseDown)||void 0===a||a.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));d.displayName="Label";var u=d},65469(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},68899(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("refresh-ccw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},70764(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},77819(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},77943(e,t,a){a.d(t,{bL:()=>z,zi:()=>C});var s=a(89379),n=a(53986),r=a(65043),i=a(30858),o=a(82814),c=a(21862),l=a(13642),d=a(23168),u=a(93124),m=a(87914),f=a(70579);const p=["__scopeSwitch","name","checked","defaultChecked","required","disabled","value","onCheckedChange","form"],h=["__scopeSwitch"],x=["__scopeSwitch","control","checked","bubbles"];var b="Switch",[g,v]=(0,c.A)(b),[y,w]=g(b),N=r.forwardRef((e,t)=>
2{const{__scopeSwitch:a,name:c,checked:d,defaultChecked:u,required:h,disabled:x,value:g="on",onCheckedChange:v,form:w}=e,N=(0,n.A)(e,p),[A,j]=r.useState(null),z=(0,o.s)(t,e=>j(e)),C=r.useRef(!1),R=!A||(w||!!A.closest("form")),[S,I]=(0,l.i)({prop:d,defaultProp:null!==u&&void 0!==u&&u,onChange:v,caller:b});return(0,f.jsxs)(y,{scope:a,checked:S,disabled:x,children:[(0,f.jsx)(m.sG.button,(0,s.A)((0,s.A)({type:"button",role:"switch","aria-checked":S,"aria-required":h,"data-state":_(S),"data-disabled":x?"":void 0,disabled:x,value:g},N),{},{ref:z,onClick:(0,i.mK)(e.onClick,e=>{I(e=>!e),R&&(C.current=e.isPropagationStopped(),C.current||e.stopPropagation())})})),R&&(0,f.jsx)(k,{control:A,bubbles:!C.current,name:c,value:g,checked:S,required:h,disabled:x,form:w,style:{transform:"translateX(-100%)"}})]})});N.displayName=b;var A="SwitchThumb",j=r.forwardRef((e,t)=>{const{__scopeSwitch:a}=e,r=(0,n.A)(e,h),i=w(A,a);return(0,f.jsx)(m.sG.span,(0,s.A)((0,s.A)({"data-state":_(i.checked),"data-disabled":i.disabled?"":void 0},r),{},{ref:t}))});j.displayName=A;var k=r.forwardRef((e,t)=>{let{__scopeSwitch:a,control:i,checked:c,bubbles:l=!0}=e,m=(0,n.A)(e,x);const p=r.useRef(null),h=(0,o.s)(p,t),b=(0,d.Z)(c),g=(0,u.X)(i);return r.useEffect(()=>{const e=p.current;if(!e)return;const t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(b!==c&&a){const t=new Event("click",{bubbles:l});a.call(e,c),e.dispatchEvent(t)}},[b,c,l]),(0,f.jsx)("input",(0,s.A)((0,s.A)({type:"checkbox","aria-hidden":!0,defaultChecked:c},m),{},{tabIndex:-1,ref:h,style:(0,s.A)((0,s.A)((0,s.A)({},m.style),g),{},{position:"absolute",pointerEvents:"none",opacity:0,margin:0})}))});function _(e){return e?"checked":"unchecked"}k.displayName="SwitchBubbleInput";var z=N,C=j},91140(e,t,a){a.d(t,{BT:()=>b,Wu:()=>g,ZB:()=>x,Zp:()=>p,aR:()=>h});var s=a(89379),n=a(53986),r=a(65043),i=a(1089),o=a(70579);const c=["className"],l=["className"],d=["className"],u=["className"],m=["className"],f=["className"],p=r.forwardRef((e,t)=>{let{className:a}=e,r=(0,n.A)(e,c);return(0,o.jsx)("div",(0,s.A)({ref:t,className:(0,i.cn)("rounded-xl border bg-card text-card-foreground shadow",a)},r))});p.displayName="Card";const h=r.forwardRef((e,t)=>{let{className:a}=e,r=(0,n.A)(e,l);return(0,o.jsx)("div",(0,s.A)({ref:t,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",a)},r))});h.displayName="CardHeader";const x=r.forwardRef((e,t)=>{let{className:a}=e,r=(0,n.A)(e,d);return(0,o.jsx)("div",(0,s.A)({ref:t,className:(0,i.cn)("font-semibold leading-none tracking-tight",a)},r))});x.displayName="CardTitle";const b=r.forwardRef((e,t)=>{let{className:a}=e,r=(0,n.A)(e,u);return(0,o.jsx)("div",(0,s.A)({ref:t,className:(0,i.cn)("text-sm text-muted-foreground",a)},r))});b.displayName="CardDescription";const g=r.forwardRef((e,t)=>{let{className:a}=e,r=(0,n.A)(e,m);return(0,o.jsx)("div",(0,s.A)({ref:t,className:(0,i.cn)("p-6 pt-0",a)},r))});g.displayName="CardContent";r.forwardRef((e,t)=>{let{className:a}=e,r=(0,n.A)(e,f);return(0,o.jsx)("div",(0,s.A)({ref:t,className:(0,i.cn)("flex items-center p-6 pt-0",a)},r))}).displayName="CardFooter"},92264(e,t,a){a.d(t,{p:()=>l});var s=a(89379),n=a(53986),r=a(65043),i=a(1089),o=a(70579);const c=["className","type"],l=r.forwardRef((e,t)=>{let{className:a,type:r}=e,l=(0,n.A)(e,c);return(0,o.jsx)("input",(0,s.A)({type:r,className:(0,i.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:t},l))});l.displayName="Input"},93124(e,t,a){a.d(t,{X:()=>r});var s=a(65043),n=a(70503);function r(e){const[t,a]=s.useState(void 0);return(0,n.N)(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const s=t[0];let n,r;if("borderBoxSize"in s){const e=s.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,r=t.blockSize}else n=e.offsetWidth,r=e.offsetHeight;a({width:n,height:r})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}a(void 0)},[e]),t}}}]);
3//# sourceMappingURL=2854.c2e8effa.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.