@voxket-ai/events-sdk 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react-dom/client"),require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define==`function`&&define.amd?define([`exports`,`react-dom/client`,`react`,`react/jsx-runtime`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.VoxketEventsSdk={},e.ReactDOM,e.React,e.ReactJSXRuntime,e.ReactDOM))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:a(l(e)),d(t||!e||!e.__esModule||!u.call(e,`default`)?o(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var f=class{isDebug;constructor(e){this.isDebug=e??(window.location.hostname===`localhost`||window.location.hostname===`127.0.0.1`)}log(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.log(`%c[Widget-Log] ${n}`,`color: #0bd649; font-weight: bold;`,e,...t)}error(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.error(`%c[Widget-Error] ${n}`,`color: #ff0000; font-weight: bold;`,e,...t)}getCallerInfo(){let e=(Error().stack?.split(`
2
- `)[3]||``).match(/(?:at\s+.*?\s+\()?(?:.*?\/([^/]+?)):(\d+):\d+\)?$/);return e?`[${e[1]}:${e[2]}]`:``}},p=class{baseUrl;slug;logger;constructor(e,t,n){this.baseUrl=e,this.slug=t,this.logger=n}async fetchApi(e,t={}){let n=`${this.baseUrl}${e}`;this.logger.log(`API Call: ${t.method||`GET`} ${n}`);try{let e=await fetch(n,{...t,headers:{"Content-Type":`application/json`,...t.headers}}),r=null;try{r=await e.json()}catch{}if(!e.ok){let e=`API Error`;if(r){if(typeof r.message==`string`)e=r.message;else if(typeof r.detail==`string`)e=r.detail;else if(typeof r.error==`string`)e=r.error;else if(typeof r==`object`){let t=Object.values(r)[0];Array.isArray(t)&&typeof t[0]==`string`?e=t[0]:typeof t==`string`&&(e=t)}}throw Error(e)}return r}catch(t){throw this.logger.error(`API Request failed for ${e}`,t),t}}async getFormSchema(){return this.fetchApi(`/api/public/events/${this.slug}/form-schema/`)}async submitRegistration(e){return this.fetchApi(`/api/public/events/${this.slug}/register/`,{method:`POST`,body:JSON.stringify(e)})}async trackProgress(e){return this.fetchApi(`/api/public/events/${this.slug}/track/`,{method:`POST`,body:JSON.stringify(e)})}async getDraft(e){return this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}async getDraftByEmail(e){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?email=${encodeURIComponent(e)}`)}catch(t){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}catch{throw t}}}async portalLogin(e){return this.fetchApi(`/api/portal/${this.slug}/login/`,{method:`POST`,body:JSON.stringify(e)})}async portalRequestPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify({identifier:e})})}async portalConfirmPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify(e)})}async portalGetProfile(e){return this.fetchApi(`/api/portal/${this.slug}/me/`,{method:`GET`,headers:{Authorization:`Bearer ${e}`}})}async portalUploadFile(e,t){let n=`${this.baseUrl}/api/portal/${this.slug}/me/upload/`;this.logger.log(`API Call: POST ${n} (upload)`);let r=new FormData;r.append(`file`,t);let i=await fetch(n,{method:`POST`,headers:{Authorization:`Bearer ${e}`},body:r}),a=null;try{a=await i.json()}catch{}if(!i.ok){let e=a?.message||a?.error||a?.detail||`File upload failed`;throw Error(e)}return a}async portalUpdateProfile(e,t){let n=`${this.baseUrl}/api/portal/${this.slug}/me/`;this.logger.log(`API Call: PATCH ${n}`);let r=await fetch(n,{method:`PATCH`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)});r.status===405&&(r=await fetch(n,{method:`PUT`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)}));let i=null;try{i=await r.json()}catch{}if(!r.ok){let e=i?.message||i?.error||i?.detail||`Failed to update profile`;throw Error(e)}return i}},m=class{prefix;constructor(e){this.prefix=`voxket_${e}_`}generateId(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}getXrefId(){let e=`${this.prefix}xref_id`,t=localStorage.getItem(e);return t||(t=this.generateId(),localStorage.setItem(e,t)),t}updateXrefId(){let e=`${this.prefix}xref_id`,t=this.generateId();return localStorage.setItem(e,t),t}clearXrefId(){let e=`${this.prefix}xref_id`;localStorage.removeItem(e)}setToken(e){localStorage.setItem(`${this.prefix}token`,e)}getToken(){return localStorage.getItem(`${this.prefix}token`)}clearToken(){localStorage.removeItem(`${this.prefix}token`)}},h=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function g(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:h(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var _=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},v=e=>{let t=_(e);return t.charAt(0).toUpperCase()+t.slice(1)},y=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),b={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function x(e){return e!=null}function S(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??b.width,a=e.size??e.height??b.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?y(...c):y(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??b[`stroke-width`])*Number(e.size??e.width??b.width)/Number(t.size??t.width??b.width):t.strokeWidth??b[`stroke-width`];return[`svg`,{...Object.entries(b).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&x(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&x(t.width)&&{[r(`width`)]:t.width},...`height`in t&&x(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function C(e,t={}){return S(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var w=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},T=(0,n.createContext)({}),E=()=>(0,n.useContext)(T),D=(0,n.forwardRef)(({color:e,size:t,width:r,height:i,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:b=``}=E()??{},x=!!l||w(f),[S,T,D=[]]=C(d,{color:e??v,width:r??t??m,height:i??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:y(b,c),hasA11yProp:x,attributes:f});return(0,n.createElement)(S,{ref:p,...T},[...D.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function O(e,t=[],r=[]){let i=typeof e==`string`?g(e,t,r):e,a=(0,n.forwardRef)(({className:e,...t},r)=>(0,n.createElement)(D,{ref:r,icon:i,className:e,...t}));return i.name&&(a.displayName=v(i.name)),a}var k={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};k.node;var ee=O(k),A={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};A.node;var j=O(A),M={name:`circle-alert`,size:24,node:[[`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`}]],aliases:[`alert-circle`]};M.node;var N=O(M),P={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};P.node;var F=O(P),I={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};I.node;var te=O(I),L={name:`external-link`,size:24,node:[[`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`}]]};L.node;var ne=O(L),R={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};R.node;var re=O(R),z={name:`key`,size:24,node:[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]};z.node;var ie=O(z),B={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};B.node;var V=O(B),H={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};H.node;var ae=O(H),U={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};U.node;var oe=O(U),W={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};W.node;var G=O(W),K={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};K.node;var q=O(K),J={name:`package-check`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]};J.node;var se=O(J),Y={name:`receipt`,size:24,node:[[`path`,{d:`M12 17V7`,key:`pyj7ub`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`,key:`1elt7d`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`,key:`ycz6yz`}]]};Y.node;var ce=O(Y),X={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};X.node;var le=O(X),ue={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};ue.node;var Z=O(ue),Q=({schema:e,onSubmit:t,onBack:i,theme:a,displayMode:o,isExpanded:s,onToggleExpand:c,onClose:l,onChange:u,initialValues:d})=>{let[f,p]=(0,n.useState)(d||{}),m=a?.primaryColor||`#2563eb`;(0,n.useEffect)(()=>{d&&Object.keys(d).length>0&&p(e=>({...d,...e}))},[d]);let h=(e,t)=>{p(n=>{let r={...n,[e]:t};return u?.(r),r})};return(0,r.jsxs)(`div`,{className:`flex flex-col h-full bg-white text-gray-800 relative`,children:[(0,r.jsxs)(`div`,{className:`flex justify-between items-center p-4 shadow-sm z-10`,style:{backgroundColor:m,color:`white`},children:[(0,r.jsxs)(`button`,{onClick:i,className:`text-sm opacity-90 hover:opacity-100 transition-opacity font-bold flex items-center gap-1`,children:[(0,r.jsx)(`span`,{children:`←`}),` Back`]}),o===`popup`&&(0,r.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,r.jsx)(`button`,{onClick:c,className:`opacity-80 hover:opacity-100 transition-opacity`,title:s?`Minimize`:`Expand`,children:s?(0,r.jsx)(q,{size:18}):(0,r.jsx)(G,{size:18})}),(0,r.jsx)(`button`,{onClick:l,className:`opacity-80 hover:opacity-100 transition-opacity`,children:(0,r.jsx)(Z,{size:22})})]})]}),(0,r.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),t(f)},className:`p-5 overflow-y-auto flex-1 space-y-5 bg-white`,children:[d&&Object.keys(d).length>0&&(0,r.jsxs)(`div`,{className:`bg-emerald-50 border border-emerald-200 text-emerald-800 text-xs px-3.5 py-2 rounded-lg flex items-center gap-2`,children:[(0,r.jsx)(`span`,{children:`✨`}),(0,r.jsx)(`span`,{className:`font-medium`,children:`Restored your saved draft progress`})]}),e.fields.map(e=>(0,r.jsxs)(`div`,{className:`flex flex-col ${e.width===`half`?`w-full md:w-1/2 md:inline-block md:pr-3 align-top`:`w-full`}`,children:[(0,r.jsxs)(`label`,{className:`text-sm font-semibold mb-1.5 text-gray-700`,children:[e.label,` `,e.required&&(0,r.jsx)(`span`,{style:{color:m},children:`*`})]}),e.type===`select`?(0,r.jsxs)(`select`,{required:e.required,value:f[e.id]??``,className:`border border-gray-300 rounded-md p-2.5 w-full bg-white outline-none transition-colors`,style:{"--tw-ring-color":m},onFocus:e=>e.target.style.borderColor=m,onBlur:e=>e.target.style.borderColor=`#d1d5db`,onChange:t=>h(e.id,t.target.value),children:[(0,r.jsx)(`option`,{value:``,children:e.placeholder||`Select...`}),e.options?.map(e=>(0,r.jsx)(`option`,{value:e,children:e},e))]}):e.type===`file`?(0,r.jsxs)(`div`,{className:`flex flex-col`,children:[(0,r.jsx)(`input`,{type:`file`,required:!f[e.id]&&e.required,className:`border border-gray-300 rounded-md p-2 w-full outline-none bg-white`,onChange:t=>h(e.id,t.target.files?.[0]?.name||``)}),f[e.id]&&(0,r.jsxs)(`span`,{className:`text-xs text-gray-500 mt-1`,children:[`Saved: `,f[e.id]]})]}):(0,r.jsx)(`input`,{type:e.type===`email`?`email`:`text`,required:e.required,value:f[e.id]??``,placeholder:e.placeholder,className:`border border-gray-300 rounded-md p-2.5 w-full outline-none transition-colors bg-white`,onFocus:e=>e.target.style.borderColor=m,onBlur:e=>e.target.style.borderColor=`#d1d5db`,onChange:t=>h(e.id,t.target.value)})]},e.id)),(0,r.jsx)(`div`,{className:`pt-6 pb-2`,children:(0,r.jsx)(`button`,{type:`submit`,style:{backgroundColor:m},className:`w-full text-white font-bold py-3.5 rounded-md hover:opacity-90 transition-opacity shadow-md`,children:`Complete Registration`})})]})]})},de=({apiClient:e,storage:t,logger:i,primaryColor:a,onEvent:o})=>{let[s,c]=(0,n.useState)(`login`),[l,u]=(0,n.useState)(!1),[d,f]=(0,n.useState)(!1),[p,m]=(0,n.useState)(null),[h,g]=(0,n.useState)(null),[_,v]=(0,n.useState)(null),[y,b]=(0,n.useState)(``),[x,S]=(0,n.useState)(``),[C,w]=(0,n.useState)(``),[T,E]=(0,n.useState)(``),[D,O]=(0,n.useState)(``),[k,A]=(0,n.useState)(``),[M,P]=(0,n.useState)(``),[I,L]=(0,n.useState)(!1),[R,z]=(0,n.useState)(null),[B,H]=(0,n.useState)({}),[U,W]=(0,n.useState)([]),[G,K]=(0,n.useState)({}),[q,J]=(0,n.useState)(null),[Y,X]=(0,n.useState)(null),[ue,Z]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=t.getToken();e&&Q(e)},[]);let Q=async n=>{u(!0),g(null);try{let r=await e.portalGetProfile(n),a=r?.data||r||{};z(a);let s=a.registration||{},l=s.custom_data||{},u=s.email||a.email||``,d=null;if(u)try{let t=await e.getDraftByEmail(u);d=t?.data||t,i.log(`Portal resume draft data loaded by email:`,d)}catch(e){i.log(`No draft found for email in portal`,e)}else{let n=t.getXrefId();if(n)try{let t=await e.getDraft(n);d=t?.data||t}catch{}}let f=d?.custom_data||{};s.name?w(s.name):d?.name?w(d.name):a.name&&w(a.name);let p=0,m={},h=a.editable_fields||[];h.length>0?h.forEach(e=>{let t=``;if(s[e.id]!==void 0&&s[e.id]!==null&&s[e.id]!==``?t=s[e.id]:l[e.id]!==void 0&&l[e.id]!==null&&l[e.id]!==``&&(t=l[e.id]),d){let n=d[e.id]??f[e.id]??(e.id===`salutation`?d.salutation||d.title:void 0)??(e.id===`name`?d.name||d.fullName||d.full_name:void 0)??(e.id===`email`?d.email:void 0)??(e.id===`phone`?d.phone||d.mobile||d.phoneNumber:void 0);n!=null&&n!==``&&(t=n,p++)}m[e.id]=t}):Object.entries(a).forEach(([e,t])=>{e.toLowerCase()!==`token`&&(m[e]=t)}),H(m),p>0&&Z(!0);let g=(a.addons?.items||[]).filter(e=>e.purchased).map(e=>e.name);d?.selected_items&&Array.isArray(d.selected_items)&&d.selected_items.forEach(e=>{let t=typeof e==`string`?e:e?.name;t&&!g.includes(t)&&g.push(t)}),W(g),c(`profile`),o?.(`attendee_profile_loaded`,{profile:a,draft:d})}catch(e){i.error(`Failed to load profile`,e),t.clearToken(),c(`login`)}finally{u(!1)}},de=async n=>{if(n.preventDefault(),!y.trim()||!x){g(`Please enter both your identifier and password.`);return}u(!0),g(null),v(null);try{let n=await e.portalLogin({identifier:y.trim(),password:x}),r=n?.data?.token||n?.token;if(!r)throw Error(n?.message||`No authentication token received.`);(n?.data?.name||n?.name)&&w(n.data?.name||n.name),t.setToken(r),o?.(`attendee_logged_in`,{identifier:y,response:n}),await Q(r)}catch(e){i.error(`Login failed`,e),g(e.message||`Login failed. Please check your credentials.`)}finally{u(!1)}},fe=async()=>{let t=(T||y).trim();if(!t){g(`Please enter your registration number or email to receive a code.`);return}L(!0),g(null),v(null);try{await e.portalRequestPasswordReset(t),v(`A verification code has been sent to your registered email.`),o?.(`password_reset_code_requested`,{identifier:t})}catch(e){i.error(`Failed to send reset code`,e),g(e.message||`Failed to send code. Please verify your identifier.`)}finally{L(!1)}},pe=async n=>{n.preventDefault();let r=(T||y).trim();if(!r){g(`Please enter your registration number or email.`);return}if(!D.trim()){g(`Please enter the verification code sent to your email.`);return}if(!k){g(`Please enter a new password.`);return}if(k!==M){g(`New password and confirm password do not match.`);return}u(!0),g(null),v(null);try{let n=await e.portalConfirmPasswordReset({identifier:r,code:D.trim(),new_password:k}),i=n?.data?.token||n?.token;(n?.data?.name||n?.name)&&w(n.data?.name||n.name),o?.(`password_reset_success`,{identifier:r,response:n}),i?(t.setToken(i),O(``),A(``),P(``),await Q(i)):(b(r),S(``),O(``),A(``),P(``),c(`login`),v(`Password updated successfully! Please login with your new password.`))}catch(e){i.error(`Password reset failed`,e),g(e.message||`Failed to update password. Please check the code.`)}finally{u(!1)}},me=()=>{t.clearToken(),z(null),H({}),W([]),K({}),J(null),X(null),w(``),S(``),c(`login`),v(`Logged out successfully.`),o?.(`attendee_logged_out`,{})},$=async(n,r)=>{let a=t.getToken();if(!a){g(`Session expired. Please log in again.`);return}m(n),g(null),v(null);try{let t=await e.portalUploadFile(a,r),i=t?.data?.serve_url||t?.serve_url,s=t?.data?.asset_id||t?.asset_id;if(!i)throw Error(`No file URL returned from upload.`);H(e=>({...e,[n]:i})),s&&(K(e=>({...e,[n]:s})),J(s)),v(`File "${r.name}" uploaded successfully!`),o?.(`portal_file_uploaded`,{fieldId:n,serveUrl:i,assetId:s})}catch(e){i.error(`File upload failed`,e),g(e.message||`File upload failed. Please try again.`)}finally{m(null)}},he=(e,t)=>{t||W(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ge=async n=>{n.preventDefault();let r=t.getToken();if(!r){g(`Session expired. Please log in again.`);return}f(!0),g(null),v(null);try{let t=R?.editable_fields||[],n={...R?.registration?.custom_data||{}},i={};t.forEach(e=>{let t=B[e.id];e.builtin||(n[e.id]=t),i[e.id]=t}),i.custom_data=n,i.addons=U;let a=q||Object.values(G)[0];a&&(i.asset_id=a,i.photo_id=a);let s=await e.portalUpdateProfile(r,i);o?.(`attendee_profile_updated`,{payload:i,response:s});let c=s?.data?.addon_checkout?.payment_url||s?.addon_checkout?.payment_url||s?.data?.payment_url||s?.payment_url;if(c&&typeof c==`string`&&c.trim()!==``){X(c),v(`Add-ons updated! Opening payment page in a new tab...`),o?.(`addon_payment_opened`,{payment_url:c}),window.open(c,`_blank`,`noopener,noreferrer`),await Q(r);return}v(`Profile updated successfully!`),await Q(r)}catch(e){i.error(`Failed to update profile`,e),g(e.message||`Failed to update profile. Please try again.`)}finally{f(!1)}};if(s===`profile`){let e=R?.registration||{},t=R?.editable_fields||[],n=R?.locked_fields||[],i=R?.payment||{},o=R?.addons?.items||[];return(0,r.jsxs)(`div`,{className:`flex flex-col h-full bg-gray-50 overflow-hidden`,children:[(0,r.jsxs)(`div`,{className:`p-4 bg-white border-b border-gray-200 flex justify-between items-center shadow-xs shrink-0`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{className:`font-bold text-gray-900 text-base`,children:C||`Attendee Profile`}),(0,r.jsx)(`p`,{className:`text-xs text-gray-500`,children:e.registration_number?`Reg #: ${e.registration_number}`:`Attendee Portal`})]}),(0,r.jsxs)(`button`,{onClick:me,className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold text-red-600 bg-red-50 hover:bg-red-100 rounded-md transition-colors cursor-pointer`,title:`Logout`,children:[(0,r.jsx)(ae,{size:14}),(0,r.jsx)(`span`,{children:`Logout`})]})]}),(0,r.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 space-y-4`,children:[Y&&(0,r.jsxs)(`div`,{className:`p-3 bg-blue-50 border border-blue-200 rounded-lg flex items-center justify-between text-xs text-blue-800 shadow-2xs`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,r.jsx)(te,{size:16,className:`shrink-0 text-blue-600`}),(0,r.jsx)(`span`,{children:`Payment page opened in a new tab. If not opened, click:`})]}),(0,r.jsxs)(`a`,{href:Y,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 font-bold underline text-blue-700 hover:text-blue-900 shrink-0 ml-2`,children:[(0,r.jsx)(`span`,{children:`Complete Payment`}),(0,r.jsx)(ne,{size:12})]})]}),h&&(0,r.jsxs)(`div`,{className:`p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-2 text-xs text-red-700 shadow-2xs`,children:[(0,r.jsx)(N,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:h})]}),_&&(0,r.jsxs)(`div`,{className:`p-3 bg-green-50 border border-green-200 rounded-lg flex items-start gap-2 text-xs text-green-700 shadow-2xs`,children:[(0,r.jsx)(F,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:_})]}),(0,r.jsxs)(`div`,{className:`bg-white p-4 rounded-xl border border-gray-200 shadow-xs space-y-3`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,r.jsx)(`span`,{className:`text-xs font-bold text-gray-400 uppercase tracking-wider`,children:`Registration Details`}),e.status&&(0,r.jsx)(`span`,{className:`px-2.5 py-0.5 rounded-full text-xs font-semibold bg-green-100 text-green-800 capitalize`,children:e.status})]}),(0,r.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 text-xs`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`span`,{className:`text-gray-500 block`,children:`Registration No:`}),(0,r.jsx)(`span`,{className:`font-bold text-gray-900 font-mono`,children:e.registration_number||`N/A`})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`span`,{className:`text-gray-500 block`,children:`Ticket Type:`}),(0,r.jsx)(`span`,{className:`font-bold text-gray-900`,children:e.registration_type||`N/A`})]})]}),i&&i.state&&(0,r.jsxs)(`div`,{className:`pt-2 border-t border-gray-100 flex items-center justify-between text-xs`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-1.5 text-gray-700`,children:[(0,r.jsx)(ce,{size:14,className:`text-gray-400`}),(0,r.jsxs)(`span`,{children:[`Payment: `,(0,r.jsx)(`strong`,{className:`capitalize`,children:i.state}),` (`,i.currency,` `,i.amount,`)`]})]}),i.receipt_url&&(0,r.jsxs)(`a`,{href:i.receipt_url,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 font-semibold hover:underline`,style:{color:a},children:[(0,r.jsx)(`span`,{children:`Receipt`}),(0,r.jsx)(ne,{size:12})]})]})]}),(0,r.jsxs)(`form`,{onSubmit:ge,className:`space-y-4`,children:[(0,r.jsxs)(`div`,{className:`bg-white p-4 rounded-xl border border-gray-200 shadow-xs space-y-4`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-bold text-gray-400 uppercase tracking-wider`,children:`Attendee Information`}),ue&&(0,r.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-2xs font-semibold px-2 py-0.5 rounded-full bg-blue-50 text-blue-700 border border-blue-200`,children:[(0,r.jsx)(j,{size:11}),` Initial draft choices restored`]})]}),t.length===0?(0,r.jsx)(`div`,{className:`text-center py-6 text-gray-400 text-xs`,children:`No editable fields configured.`}):(0,r.jsx)(`div`,{className:`flex flex-wrap -mx-1.5`,children:t.map(e=>{let t=n.includes(e.id),i=e.width===`half`,o=B[e.id]??``;return(0,r.jsxs)(`div`,{className:`px-1.5 mb-3.5 ${i?`w-full md:w-1/2`:`w-full`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,r.jsxs)(`label`,{className:`block text-xs font-semibold text-gray-700`,children:[e.label,` `,e.required&&(0,r.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),t&&(0,r.jsxs)(`span`,{className:`flex items-center gap-1 text-2xs font-medium text-gray-400 bg-gray-100 px-1.5 py-0.5 rounded`,children:[(0,r.jsx)(V,{size:10}),` Locked`]})]}),e.type===`select`?(0,r.jsxs)(`select`,{disabled:t,value:o,onChange:t=>H({...B,[e.id]:t.target.value}),className:`w-full px-3 py-2 text-xs border rounded-lg focus:outline-none transition-all ${t?`bg-gray-100 text-gray-500 border-gray-200 cursor-not-allowed`:`bg-white border-gray-300`}`,onFocus:e=>{t||(e.currentTarget.style.borderColor=a)},onBlur:e=>{t||(e.currentTarget.style.borderColor=`#d1d5db`)},children:[(0,r.jsxs)(`option`,{value:``,children:[`Select `,e.label,`...`]}),(e.options||[]).map(e=>(0,r.jsx)(`option`,{value:e,children:e},e))]}):e.type===`file`?(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!t&&(0,r.jsxs)(`label`,{className:`flex-1 cursor-pointer`,children:[(0,r.jsx)(`input`,{type:`file`,className:`sr-only`,disabled:p===e.id,onChange:t=>{let n=t.target.files?.[0];n&&$(e.id,n)}}),(0,r.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-2 px-3 border border-dashed border-gray-300 hover:border-gray-400 rounded-lg text-xs font-medium text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors`,children:[(0,r.jsx)(le,{size:14,className:`text-gray-500`}),(0,r.jsx)(`span`,{children:p===e.id?`Uploading...`:`Choose File to Upload`})]})]}),o&&typeof o==`string`&&o.trim()!==``&&(0,r.jsxs)(`a`,{href:o,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 py-2 px-3 rounded-lg text-xs font-semibold text-white shadow-xs transition-opacity hover:opacity-90 shrink-0`,style:{backgroundColor:a},title:`Open file in new tab`,children:[(0,r.jsx)(re,{size:14}),(0,r.jsx)(`span`,{children:`Open File`}),(0,r.jsx)(ne,{size:12})]})]}),o&&(0,r.jsxs)(`div`,{className:`text-2xs text-gray-500 truncate flex items-center gap-1`,children:[(0,r.jsx)(j,{size:12,className:`text-green-600 shrink-0`}),(0,r.jsxs)(`span`,{className:`truncate`,children:[`File attached: `,o]})]})]}):(0,r.jsx)(`input`,{type:e.type===`phone`?`tel`:e.type===`email`?`email`:`text`,disabled:t,value:o,placeholder:e.placeholder||`Enter ${e.label.toLowerCase()}`,onChange:t=>H({...B,[e.id]:t.target.value}),className:`w-full px-3 py-2 text-xs border rounded-lg focus:outline-none transition-all ${t?`bg-gray-100 text-gray-500 border-gray-200 cursor-not-allowed`:`bg-white border-gray-300`}`,onFocus:e=>{t||(e.currentTarget.style.borderColor=a)},onBlur:e=>{t||(e.currentTarget.style.borderColor=`#d1d5db`)}})]},e.id)})})]}),o.length>0&&(0,r.jsxs)(`div`,{className:`bg-white p-4 rounded-xl border border-gray-200 shadow-xs space-y-3`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-bold text-gray-400 uppercase tracking-wider`,children:`Available Add-ons`}),(0,r.jsx)(`span`,{className:`text-2xs text-gray-500`,children:`Select items to add`})]}),(0,r.jsx)(`div`,{className:`space-y-2`,children:o.map(e=>{let t=!!e.purchased,n=U.includes(e.name);return(0,r.jsxs)(`div`,{onClick:()=>he(e.name,t),className:`p-3 rounded-lg border text-xs flex items-center justify-between transition-all ${t?`bg-gray-50 border-gray-200 opacity-90 cursor-default`:n?`border-blue-500 bg-blue-50/40 cursor-pointer shadow-xs`:`border-gray-200 bg-white hover:border-gray-300 cursor-pointer`}`,style:{borderColor:n&&!t?a:void 0,backgroundColor:n&&!t?`color-mix(in srgb, ${a} 6%, white)`:void 0},children:[(0,r.jsxs)(`div`,{className:`flex items-start gap-2.5 flex-1 pr-3`,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:n,disabled:t,onChange:()=>he(e.name,t),className:`mt-0.5 rounded text-blue-600 focus:ring-0 cursor-pointer`}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`div`,{className:`font-semibold text-gray-900 leading-snug`,children:e.name}),(0,r.jsxs)(`div`,{className:`font-bold text-xs mt-1`,style:{color:a},children:[e.currency,` `,Number(e.price).toLocaleString()]})]})]}),t?(0,r.jsxs)(`span`,{className:`px-2 py-0.5 rounded text-2xs font-semibold bg-green-100 text-green-800 flex items-center gap-1 shrink-0`,children:[(0,r.jsx)(j,{size:12}),` Purchased`]}):(0,r.jsx)(`span`,{className:`text-2xs font-semibold px-2 py-0.5 rounded transition-colors shrink-0 ${n?`bg-blue-600 text-white`:`bg-gray-100 text-gray-600`}`,style:{backgroundColor:n?a:void 0},children:n?`Selected`:`Select`})]},e.name)})})]}),(0,r.jsx)(`div`,{className:`pt-2`,children:(0,r.jsx)(`button`,{type:`submit`,disabled:d||p!==null,style:{backgroundColor:a},className:`w-full py-3 px-4 text-white text-sm font-bold rounded-lg hover:opacity-90 transition-opacity shadow-sm flex items-center justify-center gap-2 cursor-pointer disabled:opacity-50`,children:d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),(0,r.jsx)(`span`,{children:`Saving Profile...`})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(se,{size:16}),(0,r.jsx)(`span`,{children:`Save & Update Profile`})]})})})]})]})]})}return s===`reset`?(0,r.jsx)(`div`,{className:`flex flex-col h-full bg-gray-50 overflow-y-auto`,children:(0,r.jsxs)(`div`,{className:`p-5 flex-1 max-w-md mx-auto w-full`,children:[(0,r.jsxs)(`button`,{onClick:()=>{c(`login`),g(null),v(null)},className:`flex items-center gap-1.5 text-xs font-semibold text-gray-500 hover:text-gray-900 mb-4 transition-colors cursor-pointer`,children:[(0,r.jsx)(ee,{size:14}),(0,r.jsx)(`span`,{children:`Back to Login`})]}),(0,r.jsxs)(`div`,{className:`bg-white p-6 rounded-xl border border-gray-200 shadow-sm space-y-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{className:`text-lg font-bold text-gray-900`,children:`Generate / Reset Password`}),(0,r.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`You will get a verification code on your registered email.`})]}),h&&(0,r.jsxs)(`div`,{className:`p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-2 text-xs text-red-700`,children:[(0,r.jsx)(N,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:h})]}),_&&(0,r.jsxs)(`div`,{className:`p-3 bg-green-50 border border-green-200 rounded-lg flex items-start gap-2 text-xs text-green-700`,children:[(0,r.jsx)(F,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:_})]}),(0,r.jsxs)(`form`,{onSubmit:pe,className:`space-y-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold text-gray-700 mb-1`,children:`Registration Number or Email`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400`,children:(0,r.jsx)(oe,{size:16})}),(0,r.jsx)(`input`,{type:`text`,required:!0,value:T||y,onChange:e=>{E(e.target.value),b(e.target.value)},placeholder:`e.g. attendee@example.com or REG12345`,className:`w-full pl-9 pr-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`div`,{className:`flex justify-between items-center mb-1`,children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold text-gray-700`,children:`Verification Code`}),(0,r.jsx)(`button`,{type:`button`,onClick:fe,disabled:I,className:`text-xs font-semibold hover:underline cursor-pointer disabled:opacity-50`,style:{color:a},children:I?`Sending code...`:`Resend code on email`})]}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400`,children:(0,r.jsx)(ie,{size:16})}),(0,r.jsx)(`input`,{type:`text`,required:!0,value:D,onChange:e=>O(e.target.value),placeholder:`Enter code from email`,className:`w-full pl-9 pr-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold text-gray-700 mb-1`,children:`New Password`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400`,children:(0,r.jsx)(V,{size:16})}),(0,r.jsx)(`input`,{type:`password`,required:!0,value:k,onChange:e=>A(e.target.value),placeholder:`Enter new password`,className:`w-full pl-9 pr-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold text-gray-700 mb-1`,children:`Confirm Password`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400`,children:(0,r.jsx)(V,{size:16})}),(0,r.jsx)(`input`,{type:`password`,required:!0,value:M,onChange:e=>P(e.target.value),placeholder:`Re-enter new password`,className:`w-full pl-9 pr-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2`})]})]}),(0,r.jsx)(`button`,{type:`submit`,disabled:l,style:{backgroundColor:a},className:`w-full py-2.5 px-4 text-white text-sm font-bold rounded-lg hover:opacity-90 transition-opacity shadow-sm flex items-center justify-center cursor-pointer disabled:opacity-50 mt-2`,children:l?`Updating Password...`:`Set New Password`})]})]})]})}):(0,r.jsx)(`div`,{className:`flex flex-col h-full bg-gray-50 overflow-y-auto`,children:(0,r.jsx)(`div`,{className:`p-5 flex-1 max-w-md mx-auto w-full flex flex-col justify-center`,children:(0,r.jsxs)(`div`,{className:`bg-white p-6 rounded-xl border border-gray-200 shadow-sm space-y-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{className:`text-lg font-bold text-gray-900`,children:`Attendee Login`}),(0,r.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`Sign in with your email or registration number`})]}),h&&(0,r.jsxs)(`div`,{className:`p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-2 text-xs text-red-700`,children:[(0,r.jsx)(N,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:h})]}),_&&(0,r.jsxs)(`div`,{className:`p-3 bg-green-50 border border-green-200 rounded-lg flex items-start gap-2 text-xs text-green-700`,children:[(0,r.jsx)(F,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:_})]}),(0,r.jsxs)(`form`,{onSubmit:de,className:`space-y-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold text-gray-700 mb-1`,children:`Email or Registration Number`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400`,children:(0,r.jsx)(oe,{size:16})}),(0,r.jsx)(`input`,{type:`text`,required:!0,value:y,onChange:e=>b(e.target.value),placeholder:`Enter email or registration number`,className:`w-full pl-9 pr-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold text-gray-700 mb-1`,children:`Password`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400`,children:(0,r.jsx)(V,{size:16})}),(0,r.jsx)(`input`,{type:`password`,required:!0,value:x,onChange:e=>S(e.target.value),placeholder:`Enter password`,className:`w-full pl-9 pr-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2`})]})]}),(0,r.jsx)(`div`,{className:`text-right`,children:(0,r.jsx)(`button`,{type:`button`,onClick:()=>{E(y),c(`reset`),g(null),v(null)},className:`text-xs font-semibold hover:underline cursor-pointer`,style:{color:a},children:`Click to generate password`})}),(0,r.jsx)(`button`,{type:`submit`,disabled:l,style:{backgroundColor:a},className:`w-full py-2.5 px-4 text-white text-sm font-bold rounded-lg hover:opacity-90 transition-opacity shadow-sm flex items-center justify-center cursor-pointer disabled:opacity-50`,children:l?(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),(0,r.jsx)(`span`,{children:`Logging in...`})]}):`Login`})]})]})})})},fe=({config:e})=>{let[t,i]=(0,n.useState)(`registration`),[a,o]=(0,n.useState)(e.displayMode!==`popup`),[s,c]=(0,n.useState)(!1),[l,u]=(0,n.useState)([]),[d,h]=(0,n.useState)(`FOGSI YUVA 2026`),[g,_]=(0,n.useState)(null),[v,y]=(0,n.useState)(!0),[b,x]=(0,n.useState)(!1),[S,C]=(0,n.useState)(null),[w,T]=(0,n.useState)(null),E=e.theme?.primaryColor||`#2563eb`,D=(0,n.useMemo)(()=>new f(e.debug),[e.debug]),O=(0,n.useMemo)(()=>new p(e.baseUrl,e.eventSlug,D),[e.baseUrl,e.eventSlug,D]),k=(0,n.useMemo)(()=>new m(e.eventSlug),[e.eventSlug]),ee=(0,n.useRef)(e.displayMode),A=(0,n.useRef)(null),[j,M]=(0,n.useState)(null);(0,n.useEffect)(()=>{k.getXrefId()},[k]),(0,n.useEffect)(()=>{if(!a)return;let t=k.getXrefId();t&&O.getDraft(t).then(t=>{let n=t?.data||t;n&&n.registration_type&&(M(n),e.onEvent?.(`draft_loaded`,n))}).catch(e=>{D.log(`No draft found for this session`,e)})},[a,O,k,D]);let N=(0,n.useMemo)(()=>{if(!j||!g||String(j.registration_type)!==String(g.id))return{};let e={...j.custom_data||{}};if(j.salutation&&(e.salutation=j.salutation,e.title=j.salutation),j.name){e.name=j.name,e.full_name=j.name,e.fullName=j.name;let t=j.name.trim().split(/\s+/);t.length>0&&!e.first_name&&(e.first_name=t[0]),t.length>1&&!e.last_name&&(e.last_name=t.slice(1).join(` `))}return j.email&&(e.email=j.email),j.phone&&(e.phone=j.phone,e.mobile=j.phone,e.phoneNumber=j.phone),e},[j,g]);(0,n.useEffect)(()=>()=>{A.current&&clearTimeout(A.current)},[]);let P=(0,n.useCallback)(t=>{A.current&&clearTimeout(A.current),A.current=setTimeout(async()=>{if(!Object.values(t).some(e=>e!==``&&e!=null))return;let n=new Set([`salutation`,`title`,`name`,`fullName`,`full_name`,`firstName`,`lastName`,`email`,`phone`,`mobile`,`phoneNumber`,`selected_items`,`custom_data`]),r={...t.custom_data||{}};for(let[e,i]of Object.entries(t))n.has(e)||(r[e]=i);let i={xref_id:k.getXrefId(),salutation:t.salutation||t.title||``,name:t.name||t.fullName||t.full_name||[t.firstName,t.lastName].filter(Boolean).join(` `)||``,email:t.email||``,phone:t.phone||t.mobile||t.phoneNumber||``,registration_type:g?.id,custom_data:r,selected_items:t.selected_items||[]};try{await O.trackProgress(i),e.onEvent?.(`draft_saved`,i)}catch(e){D.error(`Failed to save draft progress`,e)}},600)},[k,O,g,e,D]);(0,n.useEffect)(()=>{ee.current!==e.displayMode&&(ee.current=e.displayMode,o(e.displayMode!==`popup`),c(!1))},[e.displayMode]),(0,n.useEffect)(()=>{a&&O.getFormSchema().then(t=>{u(t?.data?.types||[]),(t?.data?.event_name||t?.data?.title||t?.data?.name)&&h(t.data.event_name||t.data.title||t.data.name),e.onEvent?.(`form_loaded`,t.data)}).catch(t=>{D.error(`Failed to load schema`,t),e.onEvent?.(`error`,{type:`schema_load`,err:t})}).finally(()=>y(!1))},[a]);let F=async t=>{A.current&&clearTimeout(A.current),y(!0),C(null);let n={xref_id:k.getXrefId(),registration_type:g.id,...t};try{let t=await O.submitRegistration(n);k.updateXrefId(),M(null);let r=t?.data?.payment_url||t?.payment_url||null;T(r),r&&typeof r==`string`&&r.trim()!==``&&window.open(r,`_blank`,`noopener,noreferrer`),x(!0),e.onEvent?.(`submitted`,n)}catch(t){D.error(`Submission failed`,t),e.onEvent?.(`error`,{type:`submit_error`,err:t});let n=t?.message||`Registration failed. Please check your information and try again.`;C(n)}finally{y(!1)}},I=()=>{x(!1),C(null),T(null),_(null),M(null)};if(!a&&e.displayMode===`popup`)return(0,r.jsx)(`button`,{onClick:()=>o(!0),className:`fixed bottom-5 right-5 w-16 h-16 rounded-full text-white shadow-xl flex items-center justify-center z-50 cursor-pointer hover:scale-105 transition-transform`,style:{backgroundColor:E},children:(0,r.jsx)(`span`,{className:`font-bold text-sm tracking-wide`,children:`Join`})});let te=e.displayMode===`fullscreen`||e.displayMode===`popup`&&s,L=`bg-white overflow-hidden flex flex-col shadow-2xl border border-gray-200 transition-all duration-300 ease-in-out `,R={fontFamily:e.theme?.fontFamily||`sans-serif`};return te?(L+=`fixed inset-0 z-[9999] rounded-none `,R.width=`100vw`,R.height=`100vh`):e.displayMode===`popup`?(L+=`fixed bottom-5 right-5 z-50 rounded-xl `,R.width=e.width||`400px`,R.height=e.height||`700px`,R.maxHeight=`90vh`):(L+=`rounded-xl relative `,R.width=`100%`,R.height=`100%`),(0,r.jsx)(`div`,{className:L,style:R,children:v?(0,r.jsxs)(`div`,{className:`flex h-full items-center justify-center font-medium`,style:{color:E},children:[(0,r.jsxs)(`svg`,{className:`animate-spin -ml-1 mr-3 h-8 w-8`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),`Processing...`]}):b?w?(0,r.jsxs)(`div`,{className:`flex flex-col h-full bg-white relative overflow-y-auto`,children:[(0,r.jsxs)(`div`,{className:`p-4 shadow-sm flex justify-between items-center z-10`,style:{backgroundColor:E,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{className:`text-xl font-bold`,children:`Complete Payment`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Registration Submitted`})]}),e.displayMode===`popup`&&(0,r.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,r.jsx)(`button`,{onClick:()=>c(!s),title:s?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity`,children:s?(0,r.jsx)(q,{size:18}):(0,r.jsx)(G,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`opacity-80 hover:opacity-100 transition-opacity`,children:(0,r.jsx)(Z,{size:24})})]})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 text-center`,children:[(0,r.jsx)(`div`,{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 text-2xl shadow-md`,style:{backgroundColor:`color-mix(in srgb, ${E} 12%, transparent)`,color:E},children:`💳`}),(0,r.jsx)(`h3`,{className:`text-2xl font-bold text-gray-900 mb-2`,children:`Done Your Payment First`}),(0,r.jsx)(`p`,{className:`text-sm text-gray-600 mb-6 max-w-xs leading-relaxed`,children:`Please complete your payment in the new tab to confirm your booking and finalize your registration.`}),(0,r.jsxs)(`div`,{className:`w-full max-w-xs space-y-3`,children:[(0,r.jsxs)(`a`,{href:w,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full`,style:{backgroundColor:E},children:[(0,r.jsx)(`span`,{children:`Open Payment Page`}),(0,r.jsx)(ne,{size:16})]}),(0,r.jsx)(`button`,{onClick:I,className:`w-full py-2.5 px-4 text-sm font-semibold text-gray-500 hover:text-gray-900 transition-colors cursor-pointer`,children:`Register Another Person`})]})]})]}):(0,r.jsxs)(`div`,{className:`flex flex-col h-full items-center justify-center p-8 text-center bg-white relative`,children:[e.displayMode===`popup`&&(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`absolute top-4 right-4 text-gray-400 hover:text-gray-900`,children:(0,r.jsx)(Z,{size:24})}),(0,r.jsx)(`div`,{className:`w-20 h-20 rounded-full flex items-center justify-center mb-6 text-4xl shadow-md`,style:{backgroundColor:E,color:`white`},children:`✓`}),(0,r.jsx)(`h2`,{className:`text-3xl font-bold mb-3 text-gray-900`,children:`Thank You!`}),(0,r.jsx)(`p`,{className:`text-gray-600 mb-8`,children:`Your registration has been successfully received.`}),(0,r.jsx)(`button`,{onClick:I,style:{backgroundColor:E},className:`text-white font-bold py-3 px-8 rounded-md hover:opacity-90 transition-opacity shadow-md`,children:`Register Another Person`})]}):S?(0,r.jsxs)(`div`,{className:`flex flex-col h-full bg-white relative overflow-y-auto`,children:[(0,r.jsxs)(`div`,{className:`p-4 shadow-sm flex justify-between items-center z-10 bg-red-600 text-white`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{className:`text-xl font-bold`,children:`Registration Failed`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Please try again`})]}),e.displayMode===`popup`&&(0,r.jsx)(`div`,{className:`flex items-center gap-4`,children:(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(Z,{size:24})})})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 text-center`,children:[(0,r.jsx)(`div`,{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 text-2xl shadow-md bg-red-50 text-red-600 border border-red-200`,children:`✕`}),(0,r.jsx)(`h3`,{className:`text-2xl font-bold text-gray-900 mb-2`,children:`Submission Error`}),(0,r.jsx)(`p`,{className:`text-sm text-gray-600 mb-6 max-w-xs leading-relaxed`,children:S}),(0,r.jsxs)(`div`,{className:`w-full max-w-xs space-y-3`,children:[(0,r.jsx)(`button`,{onClick:()=>C(null),style:{backgroundColor:E},className:`flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full cursor-pointer`,children:(0,r.jsx)(`span`,{children:`Try Again`})}),(0,r.jsx)(`button`,{onClick:()=>{C(null),_(null)},className:`w-full py-2.5 px-4 text-sm font-semibold text-gray-500 hover:text-gray-900 transition-colors cursor-pointer`,children:`Choose Another Ticket`})]})]})]}):g?(0,r.jsx)(Q,{schema:g.form_schema,theme:e.theme,displayMode:e.displayMode,isExpanded:s,onToggleExpand:()=>c(!s),onClose:()=>o(!1),onSubmit:F,onChange:P,initialValues:N,onBack:()=>{A.current&&clearTimeout(A.current),_(null)}}):(0,r.jsxs)(`div`,{className:`flex flex-col h-full bg-gray-50 overflow-hidden`,children:[(0,r.jsxs)(`div`,{className:`p-4 shadow-sm flex justify-between items-center z-10 shrink-0`,style:{backgroundColor:E,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{className:`text-xl font-bold`,children:t===`registration`?`Select Ticket`:`Attendee Portal`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:t===`registration`?d:`Registration & Profile Management`})]}),e.displayMode===`popup`&&(0,r.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,r.jsx)(`button`,{onClick:()=>c(!s),title:s?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:s?(0,r.jsx)(q,{size:18}):(0,r.jsx)(G,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(Z,{size:22})})]})]}),(0,r.jsxs)(`div`,{className:`flex border-b border-gray-200 bg-white shrink-0 shadow-2xs`,children:[(0,r.jsxs)(`button`,{type:`button`,onClick:()=>i(`registration`),className:`flex-1 py-3 text-sm font-semibold text-center transition-all cursor-pointer relative`,style:{color:t===`registration`?E:`#6b7280`},children:[`Registration`,t===`registration`&&(0,r.jsx)(`span`,{className:`absolute bottom-0 left-0 right-0 h-0.5`,style:{backgroundColor:E}})]}),(0,r.jsxs)(`button`,{type:`button`,onClick:()=>i(`attendee`),className:`flex-1 py-3 text-sm font-semibold text-center transition-all cursor-pointer relative`,style:{color:t===`attendee`?E:`#6b7280`},children:[`Attendee Login`,t===`attendee`&&(0,r.jsx)(`span`,{className:`absolute bottom-0 left-0 right-0 h-0.5`,style:{backgroundColor:E}})]})]}),t===`registration`?(0,r.jsx)(`div`,{className:`p-5 space-y-4 overflow-y-auto flex-1 bg-gray-50`,children:l.length===0?(0,r.jsx)(`div`,{className:`text-center py-10 text-gray-400 text-sm`,children:`No tickets currently available.`}):l.map(e=>(0,r.jsxs)(`div`,{onClick:()=>_(e),className:`p-5 border-2 rounded-xl bg-white cursor-pointer transition-all shadow-sm hover:shadow-md`,style:{borderColor:`#e5e7eb`},onMouseEnter:e=>e.currentTarget.style.borderColor=E,onMouseLeave:e=>e.currentTarget.style.borderColor=`#e5e7eb`,children:[(0,r.jsx)(`div`,{className:`font-bold text-lg text-gray-900`,children:e.type}),(0,r.jsxs)(`div`,{className:`font-semibold mt-1`,style:{color:E},children:[e.currency,` `,Number(e.price)>0?Number(e.price).toLocaleString():`Free`]})]},e.id))}):(0,r.jsx)(`div`,{className:`flex-1 overflow-hidden flex flex-col`,children:(0,r.jsx)(de,{apiClient:O,storage:k,logger:D,primaryColor:E,onEvent:e.onEvent})})]})})},pe=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
3
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:0}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.bottom-0{bottom:0}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-0{left:0}.left-2\\.5{left:calc(var(--spacing) * 2.5)}.z-10{z-index:10}.z-50{z-index:50}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1\\.5{margin-inline:calc(var(--spacing) * -1.5)}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.grid{display:grid}.inline{display:inline}.inline-flex{display:inline-flex}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-\\[650px\\]{height:650px}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-md{max-width:var(--container-md)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-900{border-color:var(--color-gray-900)}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-transparent{border-color:#0000}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/40{background-color:#eff6ff66}@supports (color:color-mix(in lab, red, red)){.bg-blue-50\\/40{background-color:color-mix(in oklab, var(--color-blue-50) 40%, transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.contrast-200{--tw-contrast:contrast(200%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\\:text-blue-900:hover{color:var(--color-blue-900)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\\:opacity-50:disabled{opacity:.5}@media (width>=48rem){.md\\:inline-block{display:inline-block}.md\\:w-1\\/2{width:50%}.md\\:pr-3{padding-right:calc(var(--spacing) * 3)}}@media (width>=64rem){.lg\\:w-1\\/3{width:33.3333%}.lg\\:w-2\\/3{width:66.6667%}.lg\\:flex-row{flex-direction:row}}}:host{all:initial;font-family:inherit}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}`,me=({children:e,useShadow:t=!0})=>{let a=(0,n.useRef)(null),[o,s]=(0,n.useState)(null);return(0,n.useLayoutEffect)(()=>{if(typeof document>`u`||!a.current||!t)return;let e=a.current.shadowRoot,n=null;if(e)n=e.querySelector(`.voxket-widget-root`);else{a.current.setAttribute(`data-voxket-shadow-host`,``),a.current.style.cssText=`width: 100%; height: 100%; display: block; position: relative;`,e=a.current.attachShadow({mode:`open`});let t=document.createElement(`style`);t.innerText=`:host, *, *::before, *::after, ::backdrop {
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react-dom/client"),require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define==`function`&&define.amd?define([`exports`,`react-dom/client`,`react`,`react/jsx-runtime`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.VoxketEventsSdk={},e.ReactDOM,e.React,e.ReactJSXRuntime,e.ReactDOM))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:a(l(e)),d(t||!e||!e.__esModule||!u.call(e,`default`)?o(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var f=class{isDebug;constructor(e){this.isDebug=e??(window.location.hostname===`localhost`||window.location.hostname===`127.0.0.1`)}log(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.log(`%c[Widget-Log] ${n}`,`color: #0bd649; font-weight: bold;`,e,...t)}warn(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.warn(`%c[Widget-Warn] ${n}`,`color: #f59e0b; font-weight: bold;`,e,...t)}error(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.error(`%c[Widget-Error] ${n}`,`color: #ff0000; font-weight: bold;`,e,...t)}getCallerInfo(){let e=(Error().stack?.split(`
2
+ `)[3]||``).match(/(?:at\s+.*?\s+\()?(?:.*?\/([^/]+?)):(\d+):\d+\)?$/);return e?`[${e[1]}:${e[2]}]`:``}},p=class{baseUrl;slug;logger;timeoutMs;constructor(e,t,n,r=12e4){this.baseUrl=e,this.slug=t,this.logger=n,this.timeoutMs=r}async fetchApi(e,t={}){let n=`${this.baseUrl}${e}`;this.logger.log(`API Call: ${t.method||`GET`} ${n} (timeout: ${this.timeoutMs/1e3}s)`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);t.signal&&t.signal.addEventListener(`abort`,()=>r.abort());try{let e=await fetch(n,{...t,signal:r.signal,headers:{"Content-Type":`application/json`,...t.headers}});clearTimeout(i);let a=null;try{a=await e.json()}catch{}if(!e.ok){let e=`API Error`;if(a){if(typeof a.message==`string`)e=a.message;else if(typeof a.detail==`string`)e=a.detail;else if(typeof a.error==`string`)e=a.error;else if(typeof a==`object`){let t=Object.values(a)[0];Array.isArray(t)&&typeof t[0]==`string`?e=t[0]:typeof t==`string`&&(e=t)}}throw Error(e)}return a}catch(t){if(clearTimeout(i),t?.name===`AbortError`){let t=Error(`Request timed out after ${this.timeoutMs/1e3} seconds`);throw this.logger.error(`API Request timed out for ${e}`,t),t}throw this.logger.error(`API Request failed for ${e}`,t),t}}async getFormSchema(){return this.fetchApi(`/api/public/events/${this.slug}/form-schema/`)}async submitRegistration(e){return this.fetchApi(`/api/public/events/${this.slug}/register/`,{method:`POST`,body:JSON.stringify(e)})}async trackProgress(e){return this.fetchApi(`/api/public/events/${this.slug}/track/`,{method:`POST`,body:JSON.stringify(e)})}async getDraft(e){return this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}async getDraftByEmail(e){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?email=${encodeURIComponent(e)}`)}catch(t){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}catch{throw t}}}async portalLogin(e){return this.fetchApi(`/api/portal/${this.slug}/login/`,{method:`POST`,body:JSON.stringify(e)})}async portalRequestPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify({identifier:e})})}async portalConfirmPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify(e)})}async portalGetProfile(e){return this.fetchApi(`/api/portal/${this.slug}/me/`,{method:`GET`,headers:{Authorization:`Bearer ${e}`}})}async uploadFile(e,t){let n=new FormData;n.append(`file`,e);let r=t||null,i={};r&&(i.Authorization=`Bearer ${r}`);let a=r?[`${this.baseUrl}/api/portal/${this.slug}/me/upload/`,`${this.baseUrl}/api/public/events/${this.slug}/upload/`]:[`${this.baseUrl}/api/public/events/${this.slug}/upload/`,`${this.baseUrl}/api/portal/${this.slug}/me/upload/`],o=null;for(let e=0;e<a.length;e++){let t=a[e];this.logger.log(`API Call: POST ${t} (upload)`);let r=new AbortController,s=setTimeout(()=>r.abort(),this.timeoutMs);try{let o=await fetch(t,{method:`POST`,signal:r.signal,headers:i,body:n});clearTimeout(s);let c=null;try{c=await o.json()}catch{}if(o.ok)return c;if((o.status===404||o.status===405)&&e<a.length-1){this.logger.log(`Upload to ${t} returned ${o.status}, trying fallback endpoint...`);continue}let l=c?.message||c?.error||c?.detail||`File upload failed`;throw Error(l)}catch(t){if(clearTimeout(s),o=t,e<a.length-1&&!t?.message?.includes(`timed out`))continue;throw t?.name===`AbortError`?Error(`File upload timed out after ${this.timeoutMs/1e3} seconds`):t}}throw o||Error(`File upload failed`)}async deleteFile(e,t){let n=encodeURIComponent(String(e).trim()),r=t||null,i={};r&&(i.Authorization=`Bearer ${r}`);let a=r?[`/api/portal/${this.slug}/me/upload/${n}/`,`/api/portal/${this.slug}/me/upload/${n}`,`/api/public/events/${this.slug}/upload/${n}/`,`/api/public/events/${this.slug}/upload/${n}`]:[`/api/public/events/${this.slug}/upload/${n}/`,`/api/public/events/${this.slug}/upload/${n}`,`/api/portal/${this.slug}/me/upload/${n}/`,`/api/portal/${this.slug}/me/upload/${n}`],o=null;for(let e=0;e<a.length;e++){let t=a[e];this.logger.log(`API Call: DELETE ${t}`);try{return await this.fetchApi(t,{method:`DELETE`,headers:i})}catch(t){if(o=t,(t?.message?.includes(`404`)||t?.message?.includes(`405`))&&e<a.length-1)continue;throw t}}throw o}async portalUploadFile(e,t){return this.uploadFile(t,e)}async portalDeleteFile(e,t){return this.deleteFile(t,e)}async portalUpdateProfile(e,t){let n=`${this.baseUrl}/api/portal/${this.slug}/me/`;this.logger.log(`API Call: PATCH ${n}`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);try{let a=await fetch(n,{method:`PATCH`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)});a.status===405&&(a=await fetch(n,{method:`PUT`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)})),clearTimeout(i);let o=null;try{o=await a.json()}catch{}if(!a.ok){let e=o?.message||o?.error||o?.detail||`Failed to update profile`;throw Error(e)}return o}catch(e){throw clearTimeout(i),e?.name===`AbortError`?Error(`Profile update timed out after ${this.timeoutMs/1e3} seconds`):e}}},m=class{prefix;constructor(e){this.prefix=`voxket_${e}_`}generateId(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}getXrefId(){let e=`${this.prefix}xref_id`,t=localStorage.getItem(e);return t||(t=this.generateId(),localStorage.setItem(e,t)),t}updateXrefId(){let e=`${this.prefix}xref_id`,t=this.generateId();return localStorage.setItem(e,t),t}clearXrefId(){let e=`${this.prefix}xref_id`;localStorage.removeItem(e)}setToken(e){localStorage.setItem(`${this.prefix}token`,e)}getToken(){return localStorage.getItem(`${this.prefix}token`)}clearToken(){localStorage.removeItem(`${this.prefix}token`)}},h=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function g(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:h(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var _=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},v=e=>{let t=_(e);return t.charAt(0).toUpperCase()+t.slice(1)},y=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),b={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function x(e){return e!=null}function S(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??b.width,a=e.size??e.height??b.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?y(...c):y(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??b[`stroke-width`])*Number(e.size??e.width??b.width)/Number(t.size??t.width??b.width):t.strokeWidth??b[`stroke-width`];return[`svg`,{...Object.entries(b).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&x(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&x(t.width)&&{[r(`width`)]:t.width},...`height`in t&&x(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function C(e,t={}){return S(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var w=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},T=(0,n.createContext)({}),E=()=>(0,n.useContext)(T),D=(0,n.forwardRef)(({color:e,size:t,width:r,height:i,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:b=``}=E()??{},x=!!l||w(f),[S,T,D=[]]=C(d,{color:e??v,width:r??t??m,height:i??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:y(b,c),hasA11yProp:x,attributes:f});return(0,n.createElement)(S,{ref:p,...T},[...D.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function O(e,t=[],r=[]){let i=typeof e==`string`?g(e,t,r):e,a=(0,n.forwardRef)(({className:e,...t},r)=>(0,n.createElement)(D,{ref:r,icon:i,className:e,...t}));return i.name&&(a.displayName=v(i.name)),a}var k={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};k.node;var A=O(k),j={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};j.node;var M=O(j),N={name:`circle-alert`,size:24,node:[[`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`}]],aliases:[`alert-circle`]};N.node;var ee=O(N),P={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};P.node;var F=O(P),I={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};I.node;var L=O(I),R={name:`external-link`,size:24,node:[[`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`}]]};R.node;var te=O(R),z={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};z.node;var B=O(z),V={name:`key`,size:24,node:[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]};V.node;var H=O(V),U={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};U.node;var W=O(U),G={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};G.node;var ne=O(G),K={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};K.node;var re=O(K),q={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};q.node;var ie=O(q),J={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};J.node;var Y=O(J),X={name:`move`,size:24,node:[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m19 9 3 3-3 3`,key:`1mg7y2`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}],[`path`,{d:`m5 9-3 3 3 3`,key:`j64kie`}],[`path`,{d:`m9 5 3-3 3 3`,key:`l8vdw6`}]]};X.node;var ae=O(X),Z={name:`package-check`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]};Z.node;var oe=O(Z),Q={name:`receipt`,size:24,node:[[`path`,{d:`M12 17V7`,key:`pyj7ub`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`,key:`1elt7d`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`,key:`ycz6yz`}]]};Q.node;var se=O(Q),ce={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};ce.node;var le=O(ce),ue={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};ue.node;var de=O(ue),fe={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};fe.node;var pe=O(fe),me=({schema:e,onSubmit:t,onBack:i,theme:a,displayMode:o,isExpanded:s,onToggleExpand:c,onClose:l,onChange:u,initialValues:d,isDark:f=!1,apiClient:p,storage:m,onError:h,onEvent:g})=>{let[_,v]=(0,n.useState)(d||{}),[y,b]=(0,n.useState)(null),[x,S]=(0,n.useState)(null),[C,w]=(0,n.useState)({}),[T,E]=(0,n.useState)({}),[D,O]=(0,n.useState)(null),[k,A]=(0,n.useState)(null),j=a?.primaryColor||`#2563eb`,M=t=>{let n=e?.review_fields;if(!Array.isArray(n)||n.length===0)return!1;let r=t.label?t.label.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``):``;return n.some(e=>{let i=e?.submission?.reviewer;if(!(i!=null&&i!==``&&(typeof i!=`object`||Object.keys(i).length>0)))return!1;let a=e?.id==null?null:String(e.id),o=e?.field_id==null?null:String(e.field_id),s=String(t.id);return a&&(a===s||a===r)||o&&(o===s||o===r)||n.length===1&&t.type===`file`})};(0,n.useEffect)(()=>{if(d&&Object.keys(d).length>0){v(e=>({...d,...e}));let t={},n={};(e?.fields||[]).forEach(e=>{if(e.type===`file`){let r=d[e.id];r&&(String(r).startsWith(`http://`)||String(r).startsWith(`https://`)?n[e.id]=String(r):t[e.id]=String(r))}}),Object.keys(t).length>0&&w(e=>({...t,...e})),Object.keys(n).length>0&&E(e=>({...n,...e}))}},[d,e]);let N=(e,t)=>{v(n=>{let r={...n,[e]:t};return u?.(r),r})},ee=async(t,n)=>{if(!p)return;let r=(e?.fields||[]).find(e=>e.id===t);if(r&&M(r)){O(`This field is under review and cannot be modified.`),A(t);return}b(t),O(null),A(null);let i=m?.getToken?.()||null,a=C[t];try{let e=await p.uploadFile(n,i),r=e?.data?.asset_id||e?.asset_id,o=e?.data?.serve_url||e?.serve_url;if(!r&&!o)throw Error(`Upload response missing asset_id`);let s=String(r||o),c=String(o||``);if(w(e=>({...e,[t]:s})),c&&E(e=>({...e,[t]:c})),v(e=>{let n={...e,[t]:s};return u?.(n),n}),g?.(`file_uploaded`,{fieldId:t,assetId:s,serveUrl:c}),a&&a!==s)try{await p.deleteFile(a,i),g?.(`file_deleted`,{fieldId:t,assetId:a})}catch(e){console.warn(`Failed to delete previous asset:`,e)}}catch(e){let n=e?.message||`File upload failed. Please try again.`;O(n),A(t),h?.({type:`file_upload_error`,message:n,error:e})}finally{b(null)}},P=async t=>{if(!p)return;let n=(e?.fields||[]).find(e=>e.id===t);if(n&&M(n)){O(`This field is under review and cannot be deleted.`),A(t);return}let r=m?.getToken?.()||null,i=C[t]||_[t];S(t),O(null),A(null);try{i&&(await p.deleteFile(i,r),g?.(`file_deleted`,{fieldId:t,assetId:i})),w(e=>{let n={...e};return delete n[t],n}),E(e=>{let n={...e};return delete n[t],n}),v(e=>{let n={...e,[t]:``};return u?.(n),n})}catch(e){let n=e?.message||`Failed to delete file. Please try again.`;O(n),A(t),h?.({type:`file_delete_error`,message:n,error:e})}finally{S(null)}},F=(e?.fields||[]).filter(e=>e?.is_review!==!0&&e?.is_review!==`true`);return(0,r.jsxs)(`div`,{className:`flex flex-col h-full relative ${f?`bg-black text-white`:`bg-white text-gray-800`}`,children:[(0,r.jsxs)(`div`,{className:`flex justify-between items-center p-4 shadow-sm z-10`,style:{backgroundColor:j,color:`white`},children:[(0,r.jsxs)(`button`,{onClick:i,className:`text-sm opacity-90 hover:opacity-100 transition-opacity font-bold flex items-center gap-1 cursor-pointer`,children:[(0,r.jsx)(`span`,{children:`←`}),` Back`]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:o===`popup`&&(0,r.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,r.jsx)(`button`,{onClick:c,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,title:s?`Minimize`:`Expand`,children:s?(0,r.jsx)(Y,{size:18}):(0,r.jsx)(ie,{size:18})}),(0,r.jsx)(`button`,{onClick:l,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(pe,{size:22})})]})})]}),(0,r.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();for(let e of F)if(e.type===`file`&&e.required&&!_[e.id]){O(`Please upload ${e.label||`a file`}`),A(e.id);return}t(_)},className:`p-5 overflow-y-auto flex-1 space-y-5 ${f?`bg-black text-white`:`bg-white`}`,children:[d&&Object.keys(d).length>0&&(0,r.jsxs)(`div`,{className:`text-xs px-3.5 py-2 rounded-lg flex items-center gap-2 border ${f?`bg-emerald-950/60 border-emerald-800/80 text-emerald-300`:`bg-emerald-50 border-emerald-200 text-emerald-800`}`,children:[(0,r.jsx)(`span`,{children:`✨`}),(0,r.jsx)(`span`,{className:`font-medium`,children:`Restored your saved draft progress`})]}),F.map(e=>{let t=M(e);return(0,r.jsxs)(`div`,{className:`flex flex-col ${e.width===`half`?`w-full md:w-1/2 md:inline-block md:pr-3 align-top`:`w-full`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between mb-1.5`,children:[(0,r.jsxs)(`label`,{className:`text-sm font-semibold ${f?`text-zinc-200`:`text-gray-700`}`,children:[e.label,` `,e.required&&(0,r.jsx)(`span`,{style:{color:j},children:`*`})]}),t&&(0,r.jsxs)(`span`,{className:`flex items-center gap-1 text-2xs font-medium px-1.5 py-0.5 rounded ${f?`text-amber-400 bg-amber-950/60 border border-amber-900/50`:`text-amber-700 bg-amber-50 border border-amber-200`}`,children:[(0,r.jsx)(W,{size:10}),` Under Review`]})]}),e.type===`select`?(0,r.jsxs)(`select`,{disabled:t,required:e.required,value:_[e.id]??``,className:`border rounded-md p-2.5 w-full outline-none transition-colors ${t?f?`bg-zinc-800 text-zinc-500 border-zinc-700 cursor-not-allowed`:`bg-gray-100 text-gray-500 border-gray-200 cursor-not-allowed`:f?`bg-zinc-900 border-zinc-700 text-white`:`bg-white border-gray-300 text-gray-900`}`,style:{"--tw-ring-color":j},onFocus:e=>{t||(e.target.style.borderColor=j)},onBlur:e=>{t||(e.target.style.borderColor=f?`#3f3f46`:`#d1d5db`)},onChange:t=>N(e.id,t.target.value),children:[(0,r.jsx)(`option`,{value:``,className:f?`bg-zinc-900 text-white`:``,children:e.placeholder||`Select...`}),e.options?.map(e=>(0,r.jsx)(`option`,{value:e,className:f?`bg-zinc-900 text-white`:``,children:e},e))]}):e.type===`file`?(0,r.jsxs)(`div`,{className:`flex flex-col space-y-2`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[!t&&(0,r.jsxs)(`label`,{className:`border border-dashed rounded-lg p-2.5 flex items-center justify-center gap-2 cursor-pointer transition-all hover:border-solid ${f?`bg-zinc-900/60 border-zinc-700 hover:border-zinc-500 text-zinc-300`:`bg-gray-50 border-gray-300 hover:border-gray-400 text-gray-700`} ${y===e.id?`opacity-60 pointer-events-none`:``}`,style:{minWidth:`170px`},children:[(0,r.jsx)(`input`,{type:`file`,className:`hidden`,disabled:y===e.id||x===e.id,onChange:t=>{let n=t.target.files?.[0];n&&ee(e.id,n),t.target.value=``}}),(0,r.jsx)(de,{size:14,className:f?`text-zinc-400`:`text-gray-500`}),(0,r.jsx)(`span`,{className:`text-xs font-medium`,children:y===e.id?`Uploading...`:`Choose File to Upload`})]}),(T[e.id]||_[e.id]&&String(_[e.id]).startsWith(`http`))&&(0,r.jsxs)(`button`,{type:`button`,onClick:()=>{let t=T[e.id]||_[e.id];t&&typeof t==`string`&&window.open(t,`_blank`,`noopener,noreferrer`)},style:{backgroundColor:j},className:`text-white text-xs font-semibold px-3 py-2 rounded-lg flex items-center gap-1.5 shadow-sm hover:opacity-90 transition-opacity shrink-0 cursor-pointer`,children:[(0,r.jsx)(B,{size:13}),(0,r.jsx)(`span`,{children:`Open File`}),(0,r.jsx)(te,{size:12})]}),!t&&(C[e.id]||T[e.id]||_[e.id])&&(0,r.jsxs)(`button`,{type:`button`,onClick:()=>P(e.id),disabled:x===e.id||y===e.id,className:`text-red-600 bg-red-50 hover:bg-red-100 dark:bg-red-950/40 dark:text-red-400 text-xs font-semibold px-3 py-2 rounded-lg flex items-center gap-1.5 transition-colors shrink-0 cursor-pointer disabled:opacity-50`,title:`Delete uploaded file`,children:[(0,r.jsx)(le,{size:13}),(0,r.jsx)(`span`,{children:x===e.id?`Deleting...`:`Delete`})]})]}),(T[e.id]||_[e.id]&&String(_[e.id]).startsWith(`http`))&&(0,r.jsxs)(`div`,{className:`text-xs text-emerald-600 dark:text-emerald-400 mt-1 flex items-center gap-1`,children:[(0,r.jsx)(`span`,{children:`✓ File attached:`}),(0,r.jsx)(`span`,{className:`truncate max-w-xs`,children:T[e.id]||_[e.id]})]}),D&&k===e.id&&(0,r.jsx)(`div`,{className:`text-xs text-red-500 mt-1`,children:D})]}):(0,r.jsx)(`input`,{type:e.type===`email`?`email`:`text`,disabled:t,required:e.required,value:_[e.id]??``,placeholder:e.placeholder,className:`border rounded-md p-2.5 w-full outline-none transition-colors ${t?f?`bg-zinc-800 text-zinc-500 border-zinc-700 cursor-not-allowed`:`bg-gray-100 text-gray-500 border-gray-200 cursor-not-allowed`:f?`bg-zinc-900 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`,onFocus:e=>{t||(e.target.style.borderColor=j)},onBlur:e=>{t||(e.target.style.borderColor=f?`#3f3f46`:`#d1d5db`)},onChange:t=>N(e.id,t.target.value)})]},e.id)}),(0,r.jsx)(`div`,{className:`pt-6 pb-2`,children:(0,r.jsx)(`button`,{type:`submit`,style:{backgroundColor:j},className:`w-full text-white font-bold py-3.5 rounded-md hover:opacity-90 transition-opacity shadow-md cursor-pointer`,children:`Complete Registration`})})]})]})};function $(e,t){if(!e)return``;if(/^field_\d+/i.test(e)&&t&&typeof t==`string`){let e=t.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``);if(e)return e}return e}var he=({apiClient:e,storage:t,logger:i,primaryColor:a,isDark:o=!1,onEvent:s,onError:c})=>{let[l,u]=(0,n.useState)(`login`),[d,f]=(0,n.useState)(!1),[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)(null),[_,v]=(0,n.useState)(null),[y,b]=(0,n.useState)(null),[x,S]=(0,n.useState)(``),[C,w]=(0,n.useState)(``),[T,E]=(0,n.useState)(``),[D,O]=(0,n.useState)(``),[k,j]=(0,n.useState)(``),[N,P]=(0,n.useState)(``),[I,R]=(0,n.useState)(``),[z,V]=(0,n.useState)(!1),[U,G]=(0,n.useState)(null),[K,q]=(0,n.useState)({}),[ie,J]=(0,n.useState)([]),[Y,X]=(0,n.useState)({}),[ae,Z]=(0,n.useState)(null),[Q,ce]=(0,n.useState)(null),[ue,fe]=(0,n.useState)(null),[pe,me]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=t.getToken();e&&he(e)},[]);let he=async n=>{f(!0),v(null);try{let r=await e.portalGetProfile(n),a=r?.data||r||{};G(a);let o=a.registration||{},c=o.custom_data||{},l=o.email||a.email||``,d=null;if(l)try{let t=await e.getDraftByEmail(l);d=t?.data||t,i.log(`Portal resume draft data loaded by email:`,d)}catch(e){i.log(`No draft found for email in portal`,e)}else{let n=t.getXrefId();if(n)try{let t=await e.getDraft(n);d=t?.data||t}catch{}}let f=d?.custom_data||{};o.name?E(o.name):d?.name?E(d.name):a.name&&E(a.name);let p=0,m={},h=(a.editable_fields||[]).filter(e=>e?.is_review!==!0&&e?.is_review!==`true`),g={};o.asset_id&&(g.asset_id=String(o.asset_id)),o.photo_id&&(g.photo_id=String(o.photo_id)),c.asset_id&&(g.asset_id=String(c.asset_id)),c.photo_id&&(g.photo_id=String(c.photo_id)),a.asset_id&&(g.asset_id=String(a.asset_id)),h.forEach(e=>{if(e.type===`file`){let t=o[`${e.id}_asset_id`]||c[`${e.id}_asset_id`]||o.asset_id||c.asset_id||a.asset_id;t&&(g[e.id]=String(t))}}),X(e=>({...g,...e}));let _=o.asset_id||o.photo_id||c.asset_id||c.photo_id||a.asset_id;_&&Z(String(_)),h.length>0?h.forEach(e=>{let t=$(e.id,e.label),n=``;if(o[t]!==void 0&&o[t]!==null&&o[t]!==``?n=o[t]:o[e.id]!==void 0&&o[e.id]!==null&&o[e.id]!==``?n=o[e.id]:c[t]!==void 0&&c[t]!==null&&c[t]!==``?n=c[t]:c[e.id]!==void 0&&c[e.id]!==null&&c[e.id]!==``&&(n=c[e.id]),d){let r=d[t]??d[e.id]??f[t]??f[e.id]??(e.id===`salutation`?d.salutation||d.title:void 0)??(e.id===`name`?d.name||d.fullName||d.full_name:void 0)??(e.id===`email`?d.email:void 0)??(e.id===`phone`?d.phone||d.mobile||d.phoneNumber:void 0);r!=null&&r!==``&&(n=r,p++)}m[e.id]=n}):Object.entries(a).forEach(([e,t])=>{e.toLowerCase()!==`token`&&(m[e]=t)}),q(m),p>0&&me(!0);let v=(a.addons?.items||[]).filter(e=>e.purchased).map(e=>e.name);d?.selected_items&&Array.isArray(d.selected_items)&&d.selected_items.forEach(e=>{let t=typeof e==`string`?e:e?.name;t&&!v.includes(t)&&v.push(t)}),J(v),u(`profile`),s?.(`attendee_profile_loaded`,{profile:a,draft:d})}catch(e){i.error(`Failed to load profile`,e),t.clearToken(),u(`login`)}finally{f(!1)}},ge=async n=>{if(n.preventDefault(),!x.trim()||!C){v(`Please enter both your identifier and password.`);return}f(!0),v(null),b(null);try{let n=await e.portalLogin({identifier:x.trim(),password:C}),r=n?.data?.token||n?.token;if(!r)throw Error(n?.message||`No authentication token received.`);(n?.data?.name||n?.name)&&E(n.data?.name||n.name),t.setToken(r),s?.(`attendee_logged_in`,{identifier:x,response:n}),await he(r)}catch(e){i.error(`Login failed`,e);let t=e.message||`Login failed. Please check your credentials.`;v(t),c?.({type:`login_error`,message:t,error:e})}finally{f(!1)}},_e=async t=>{t.preventDefault();let n=(D||x).trim();if(!n){v(`Please enter your registration number or email to receive a code.`);return}V(!0),v(null),b(null);try{await e.portalRequestPasswordReset(n),b(`A verification code has been sent to your registered email.`),s?.(`password_reset_code_requested`,{identifier:n}),u(`reset`)}catch(e){i.error(`Failed to send reset code`,e);let t=e.message||`Failed to send code. Please verify your identifier.`;v(t),c?.({type:`portal_error`,message:t,error:e})}finally{V(!1)}},ve=async n=>{n.preventDefault();let r=(D||x).trim();if(!r){v(`Please enter your registration number or email.`);return}if(!k.trim()){v(`Please enter the verification code sent to your email.`);return}if(!N){v(`Please enter a new password.`);return}if(N!==I){v(`New password and confirm password do not match.`);return}f(!0),v(null),b(null);try{let n=await e.portalConfirmPasswordReset({identifier:r,code:k.trim(),new_password:N}),i=n?.data?.token||n?.token;(n?.data?.name||n?.name)&&E(n.data?.name||n.name),s?.(`password_reset_success`,{identifier:r,response:n}),i?(t.setToken(i),j(``),P(``),R(``),await he(i)):(S(r),w(``),j(``),P(``),R(``),u(`login`),b(`Password updated successfully! Please login with your new password.`))}catch(e){i.error(`Password reset failed`,e);let t=e.message||`Failed to update password. Please check the code.`;v(t),c?.({type:`portal_error`,message:t,error:e})}finally{f(!1)}},ye=()=>{t.clearToken(),G(null),q({}),J([]),X({}),Z(null),fe(null),E(``),w(``),u(`login`),b(`Logged out successfully.`),s?.(`attendee_logged_out`,{})},be=e=>{let t=U?.review_fields;if(!Array.isArray(t)||t.length===0)return!1;let n=$(e.id,e.label);return t.some(r=>{let i=r?.submission?.reviewer;if(!(i!=null&&i!==``&&(typeof i!=`object`||Object.keys(i).length>0)))return!1;let a=r?.id==null?null:String(r.id),o=r?.field_id==null?null:String(r.field_id),s=r?.field==null?null:String(r.field),c=r?.name==null?null:String(r.name),l=r?.key==null?null:String(r.key),u=r?.submission?.field_id==null?null:String(r.submission.field_id),d=r?.submission?.field==null?null:String(r.submission.field),f=String(e.id),p=e.label?String(e.label).toLowerCase().trim():``,m=r?.label?String(r.label).toLowerCase().trim():``;return!!(a&&(a===f||a===n)||o&&(o===f||o===n)||s&&(s===f||s===n)||c&&(c===f||c===n)||l&&(l===f||l===n)||u&&(u===f||u===n)||d&&(d===f||d===n)||p&&m&&p===m||t.length===1&&e.type===`file`)})},xe=async(n,r)=>{let a=t.getToken();if(!a){v(`Session expired. Please log in again.`);return}let o=(U?.editable_fields||[]).find(e=>e.id===n);if(o&&be(o)){v(`This field is under review and cannot be modified.`);return}g(n),v(null),b(null);let l=Y[n]||ae;try{let t=await e.portalUploadFile(a,r),o=t?.data?.serve_url||t?.serve_url,c=t?.data?.asset_id||t?.asset_id;if(!o)throw Error(`No file URL returned from upload.`);if(q(e=>({...e,[n]:o})),c&&(X(e=>({...e,[n]:String(c)})),Z(String(c))),l&&String(l)!==String(c))try{i.log(`Deleting previous asset: ${l}`),await e.portalDeleteFile(a,l),i.log(`Previous asset ${l} deleted successfully.`),s?.(`portal_file_deleted`,{assetId:l,fieldId:n})}catch(e){i.warn(`Could not delete previous asset ${l}:`,e)}b(`File "${r.name}" uploaded successfully!`),s?.(`portal_file_uploaded`,{fieldId:n,serveUrl:o,assetId:c})}catch(e){i.error(`File upload failed`,e);let t=e.message||`File upload failed. Please try again.`;v(t),c?.({type:`file_upload_error`,message:t,error:e})}finally{g(null)}},Se=async n=>{let r=t.getToken();if(!r){v(`Session expired. Please log in again.`);return}let a=(U?.editable_fields||[]).find(e=>e.id===n);if(a&&be(a)){v(`This field is under review and cannot be deleted.`);return}let o=Y[n]||ae;ce(n),v(null),b(null);try{o&&(i.log(`Deleting asset ${o} for field ${n}...`),await e.portalDeleteFile(r,o),i.log(`Asset ${o} deleted successfully.`),s?.(`portal_file_deleted`,{assetId:o,fieldId:n})),q(e=>({...e,[n]:``})),X(e=>{let t={...e};return delete t[n],t}),ae===o&&Z(null),b(`File removed successfully.`)}catch(e){i.error(`Failed to delete file`,e);let t=e.message||`Failed to delete file. Please try again.`;v(t),c?.({type:`file_delete_error`,message:t,error:e})}finally{ce(null)}},Ce=(e,t)=>{t||J(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},we=async n=>{n.preventDefault();let r=t.getToken();if(!r){v(`Session expired. Please log in again.`);return}m(!0),v(null),b(null);try{let t=(U?.editable_fields||[]).filter(e=>e?.is_review!==!0&&e?.is_review!==`true`),n={...U?.registration?.custom_data||{}},i={};t.forEach(e=>{let t=K[e.id];if(e.type===`file`){let n=Y[e.id]||ae;n&&(t=n)}let r=$(e.id,e.label);e.builtin?(i[r]=t,r!==e.id&&(i[e.id]=t)):(n[r]=t,i[r]=t,r!==e.id&&(n[e.id]=t,i[e.id]=t))}),i.custom_data=n,i.addons=ie;let a=ae||Object.values(Y)[0];a&&(i.asset_id=a,i.photo_id=a);let o=await e.portalUpdateProfile(r,i);s?.(`attendee_profile_updated`,{payload:i,response:o});let c=o?.data?.addon_checkout?.payment_url||o?.addon_checkout?.payment_url||o?.data?.payment_url||o?.payment_url;if(c&&typeof c==`string`&&c.trim()!==``){fe(c),b(`Add-ons updated! Opening payment page in a new tab...`),s?.(`addon_payment_opened`,{payment_url:c}),window.open(c,`_blank`,`noopener,noreferrer`),await he(r);return}b(`Profile updated successfully!`),await he(r)}catch(e){i.error(`Failed to update profile`,e);let t=e.message||`Failed to update profile. Please try again.`;v(t),c?.({type:`profile_update_error`,message:t,error:e})}finally{m(!1)}};if(l===`profile`){let e=U?.registration||{},t=(U?.editable_fields||[]).filter(e=>e?.is_review!==!0&&e?.is_review!==`true`),n=U?.locked_fields||[],i=U?.payment||{},s=U?.addons?.items||[];return(0,r.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden ${o?`bg-black text-white`:`bg-gray-50 text-gray-900`}`,children:[(0,r.jsxs)(`div`,{className:`p-4 border-b flex justify-between items-center shadow-xs shrink-0 ${o?`bg-black border-zinc-800`:`bg-white border-gray-200`}`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{className:`font-bold text-base ${o?`text-white`:`text-gray-900`}`,children:T||`Attendee Profile`}),(0,r.jsx)(`p`,{className:`text-xs ${o?`text-zinc-400`:`text-gray-500`}`,children:e.registration_number?`Reg #: ${e.registration_number}`:`Attendee Portal`})]}),(0,r.jsxs)(`button`,{onClick:ye,className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded-md transition-colors cursor-pointer ${o?`text-red-400 bg-red-950/50 hover:bg-red-900/50 border border-red-900/50`:`text-red-600 bg-red-50 hover:bg-red-100`}`,title:`Logout`,children:[(0,r.jsx)(ne,{size:14}),(0,r.jsx)(`span`,{children:`Logout`})]})]}),(0,r.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 space-y-4`,children:[ue&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-center justify-between text-xs shadow-2xs ${o?`bg-blue-950/50 border-blue-800 text-blue-300`:`bg-blue-50 border-blue-200 text-blue-800`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,r.jsx)(L,{size:16,className:`shrink-0 text-blue-400`}),(0,r.jsx)(`span`,{children:`Payment page opened in a new tab. If not opened, click:`})]}),(0,r.jsxs)(`a`,{href:ue,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 font-bold underline text-blue-400 hover:text-blue-300 shrink-0 ml-2`,children:[(0,r.jsx)(`span`,{children:`Complete Payment`}),(0,r.jsx)(te,{size:12})]})]}),_&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs shadow-2xs ${o?`bg-red-950/60 border-red-900 text-red-300`:`bg-red-50 border-red-200 text-red-700`}`,children:[(0,r.jsx)(ee,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:_})]}),y&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs shadow-2xs ${o?`bg-emerald-950/60 border-emerald-900 text-emerald-300`:`bg-green-50 border-green-200 text-green-700`}`,children:[(0,r.jsx)(F,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),(0,r.jsxs)(`div`,{className:`p-4 rounded-xl border shadow-xs space-y-3 ${o?`bg-zinc-900 border-zinc-800`:`bg-white border-gray-200`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,r.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider ${o?`text-zinc-400`:`text-gray-400`}`,children:`Registration Details`}),e.status&&(0,r.jsx)(`span`,{className:`px-2.5 py-0.5 rounded-full text-xs font-semibold capitalize ${o?`bg-emerald-950/80 text-emerald-300 border border-emerald-800/80`:`bg-green-100 text-green-800`}`,children:e.status})]}),(0,r.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 text-xs`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`span`,{className:`${o?`text-zinc-400`:`text-gray-500`} block`,children:`Registration No:`}),(0,r.jsx)(`span`,{className:`font-bold font-mono ${o?`text-white`:`text-gray-900`}`,children:e.registration_number||`N/A`})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`span`,{className:`${o?`text-zinc-400`:`text-gray-500`} block`,children:`Ticket Type:`}),(0,r.jsx)(`span`,{className:`font-bold ${o?`text-white`:`text-gray-900`}`,children:e.registration_type||`N/A`})]})]}),i&&i.state&&(0,r.jsxs)(`div`,{className:`pt-2 border-t flex items-center justify-between text-xs ${o?`border-zinc-800 text-zinc-300`:`border-gray-100 text-gray-700`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,r.jsx)(se,{size:14,className:o?`text-zinc-400`:`text-gray-400`}),(0,r.jsxs)(`span`,{children:[`Payment: `,(0,r.jsx)(`strong`,{className:`capitalize`,children:i.state}),` (`,i.currency,` `,i.amount,`)`]})]}),i.receipt_url&&(0,r.jsxs)(`a`,{href:i.receipt_url,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 font-semibold hover:underline`,style:{color:a},children:[(0,r.jsx)(`span`,{children:`Receipt`}),(0,r.jsx)(te,{size:12})]})]})]}),(0,r.jsxs)(`form`,{onSubmit:we,className:`space-y-4`,children:[(0,r.jsxs)(`div`,{className:`p-4 rounded-xl border shadow-xs space-y-4 ${o?`bg-zinc-900 border-zinc-800`:`bg-white border-gray-200`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-bold uppercase tracking-wider ${o?`text-zinc-400`:`text-gray-400`}`,children:`Attendee Information`}),pe&&(0,r.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-2xs font-semibold px-2 py-0.5 rounded-full border ${o?`bg-blue-950/60 text-blue-300 border-blue-800/80`:`bg-blue-50 text-blue-700 border-blue-200`}`,children:[(0,r.jsx)(M,{size:11}),` Initial draft choices restored`]})]}),t.length===0?(0,r.jsx)(`div`,{className:`text-center py-6 text-xs ${o?`text-zinc-500`:`text-gray-400`}`,children:`No editable fields configured.`}):(0,r.jsx)(`div`,{className:`flex flex-wrap -mx-1.5`,children:t.map(e=>{let t=be(e),i=n.includes(e.id)||n.includes($(e.id,e.label))||t,s=e.width===`half`,c=K[e.id]??``;return(0,r.jsxs)(`div`,{className:`px-1.5 mb-3.5 ${s?`w-full md:w-1/2`:`w-full`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,r.jsxs)(`label`,{className:`block text-xs font-semibold ${o?`text-zinc-200`:`text-gray-700`}`,children:[e.label,` `,e.required&&(0,r.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),t?(0,r.jsxs)(`span`,{className:`flex items-center gap-1 text-2xs font-medium px-1.5 py-0.5 rounded ${o?`text-amber-400 bg-amber-950/60 border border-amber-900/50`:`text-amber-700 bg-amber-50 border border-amber-200`}`,children:[(0,r.jsx)(W,{size:10}),` Under Review`]}):i?(0,r.jsxs)(`span`,{className:`flex items-center gap-1 text-2xs font-medium px-1.5 py-0.5 rounded ${o?`text-zinc-400 bg-zinc-800`:`text-gray-400 bg-gray-100`}`,children:[(0,r.jsx)(W,{size:10}),` Locked`]}):null]}),e.type===`select`?(0,r.jsxs)(`select`,{disabled:i,value:c,onChange:t=>q({...K,[e.id]:t.target.value}),className:`w-full px-3 py-2 text-xs border rounded-lg focus:outline-none transition-all ${i?o?`bg-zinc-800 text-zinc-500 border-zinc-700 cursor-not-allowed`:`bg-gray-100 text-gray-500 border-gray-200 cursor-not-allowed`:o?`bg-zinc-950 text-white border-zinc-700`:`bg-white text-gray-900 border-gray-300`}`,onFocus:e=>{i||(e.currentTarget.style.borderColor=a)},onBlur:e=>{i||(e.currentTarget.style.borderColor=o?`#3f3f46`:`#d1d5db`)},children:[(0,r.jsxs)(`option`,{value:``,className:o?`bg-zinc-900 text-white`:``,children:[`Select `,e.label,`...`]}),(e.options||[]).map(e=>(0,r.jsx)(`option`,{value:e,className:o?`bg-zinc-900 text-white`:``,children:e},e))]}):e.type===`file`?(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!i&&(0,r.jsxs)(`label`,{className:`flex-1 cursor-pointer`,children:[(0,r.jsx)(`input`,{type:`file`,className:`sr-only`,disabled:h===e.id,onChange:t=>{let n=t.target.files?.[0];n&&xe(e.id,n)}}),(0,r.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-2 px-3 border border-dashed rounded-lg text-xs font-medium transition-colors ${o?`border-zinc-700 hover:border-zinc-500 text-zinc-300 bg-zinc-950 hover:bg-zinc-800`:`border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-50 hover:bg-gray-100`}`,children:[(0,r.jsx)(de,{size:14,className:o?`text-zinc-400`:`text-gray-500`}),(0,r.jsx)(`span`,{children:h===e.id?`Uploading...`:`Choose File to Upload`})]})]}),c&&typeof c==`string`&&c.trim()!==``&&(0,r.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,r.jsxs)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 py-2 px-3 rounded-lg text-xs font-semibold text-white shadow-xs transition-opacity hover:opacity-90 shrink-0`,style:{backgroundColor:a},title:`Open file in new tab`,children:[(0,r.jsx)(B,{size:14}),(0,r.jsx)(`span`,{children:`Open File`}),(0,r.jsx)(te,{size:12})]}),!i&&(0,r.jsxs)(`button`,{type:`button`,disabled:Q===e.id||h===e.id,onClick:()=>Se(e.id),className:`flex items-center gap-1 py-2 px-2.5 rounded-lg text-xs font-semibold border transition-colors cursor-pointer ${o?`border-red-900/60 bg-red-950/40 text-red-400 hover:bg-red-900/50`:`border-red-200 bg-red-50 text-red-600 hover:bg-red-100`}`,title:`Delete uploaded file`,children:[(0,r.jsx)(le,{size:13}),(0,r.jsx)(`span`,{children:Q===e.id?`Deleting...`:`Delete`})]})]})]}),c&&(0,r.jsxs)(`div`,{className:`text-2xs truncate flex items-center gap-1 ${o?`text-zinc-400`:`text-gray-500`}`,children:[(0,r.jsx)(M,{size:12,className:`text-green-500 shrink-0`}),(0,r.jsxs)(`span`,{className:`truncate`,children:[`File attached: `,c]})]})]}):(0,r.jsx)(`input`,{type:e.type===`phone`?`tel`:e.type===`email`?`email`:`text`,disabled:i,value:c,placeholder:e.placeholder||`Enter ${e.label.toLowerCase()}`,onChange:t=>q({...K,[e.id]:t.target.value}),className:`w-full px-3 py-2 text-xs border rounded-lg focus:outline-none transition-all ${i?o?`bg-zinc-800 text-zinc-500 border-zinc-700 cursor-not-allowed`:`bg-gray-100 text-gray-500 border-gray-200 cursor-not-allowed`:o?`bg-zinc-950 text-white placeholder-zinc-500 border-zinc-700`:`bg-white text-gray-900 border-gray-300`}`,onFocus:e=>{i||(e.currentTarget.style.borderColor=a)},onBlur:e=>{i||(e.currentTarget.style.borderColor=o?`#3f3f46`:`#d1d5db`)}})]},e.id)})})]}),s.length>0&&(0,r.jsxs)(`div`,{className:`p-4 rounded-xl border shadow-xs space-y-3 ${o?`bg-zinc-900 border-zinc-800`:`bg-white border-gray-200`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,r.jsx)(`h4`,{className:`text-xs font-bold uppercase tracking-wider ${o?`text-zinc-400`:`text-gray-400`}`,children:`Available Add-ons`}),(0,r.jsx)(`span`,{className:`text-2xs ${o?`text-zinc-400`:`text-gray-500`}`,children:`Select items to add`})]}),(0,r.jsx)(`div`,{className:`space-y-2`,children:s.map(e=>{let t=!!e.purchased,n=ie.includes(e.name);return(0,r.jsxs)(`div`,{onClick:()=>Ce(e.name,t),className:`p-3 rounded-lg border text-xs flex items-center justify-between transition-all ${t?o?`bg-zinc-950/60 border-zinc-800 opacity-70 cursor-default`:`bg-gray-50 border-gray-200 opacity-90 cursor-default`:n?o?`border-blue-500 bg-blue-950/40 cursor-pointer shadow-xs`:`border-blue-500 bg-blue-50/40 cursor-pointer shadow-xs`:o?`border-zinc-800 bg-zinc-950 hover:border-zinc-700 cursor-pointer`:`border-gray-200 bg-white hover:border-gray-300 cursor-pointer`}`,style:{borderColor:n&&!t?a:void 0,backgroundColor:n&&!t?o?`color-mix(in srgb, ${a} 20%, #09090b)`:`color-mix(in srgb, ${a} 6%, white)`:void 0},children:[(0,r.jsxs)(`div`,{className:`flex items-start gap-2.5 flex-1 pr-3`,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:n,disabled:t,onChange:()=>Ce(e.name,t),className:`mt-0.5 rounded text-blue-600 focus:ring-0 cursor-pointer`}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`div`,{className:`font-semibold leading-snug ${o?`text-white`:`text-gray-900`}`,children:e.name}),(0,r.jsxs)(`div`,{className:`font-bold text-xs mt-1`,style:{color:a},children:[e.currency,` `,Number(e.price).toLocaleString()]})]})]}),t?(0,r.jsxs)(`span`,{className:`px-2 py-0.5 rounded text-2xs font-semibold flex items-center gap-1 shrink-0 ${o?`bg-emerald-950/80 text-emerald-300 border border-emerald-800/80`:`bg-green-100 text-green-800`}`,children:[(0,r.jsx)(M,{size:12}),` Purchased`]}):(0,r.jsx)(`span`,{className:`text-2xs font-semibold px-2 py-0.5 rounded transition-colors shrink-0 ${n?`bg-blue-600 text-white`:o?`bg-zinc-800 text-zinc-300`:`bg-gray-100 text-gray-600`}`,style:{backgroundColor:n?a:void 0},children:n?`Selected`:`Select`})]},e.name)})})]}),(0,r.jsx)(`div`,{className:`pt-2`,children:(0,r.jsx)(`button`,{type:`submit`,disabled:p||h!==null,style:{backgroundColor:a},className:`w-full py-3 px-4 text-white text-sm font-bold rounded-lg hover:opacity-90 transition-opacity shadow-sm flex items-center justify-center gap-2 cursor-pointer disabled:opacity-50`,children:p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),(0,r.jsx)(`span`,{children:`Saving Profile...`})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(oe,{size:16}),(0,r.jsx)(`span`,{children:`Save & Update Profile`})]})})})]})]})]})}return l===`request_code`?(0,r.jsx)(`div`,{className:`flex flex-col h-full overflow-y-auto ${o?`bg-black text-white`:`bg-gray-50 text-gray-900`}`,children:(0,r.jsxs)(`div`,{className:`p-5 flex-1 max-w-md mx-auto w-full flex flex-col justify-center`,children:[(0,r.jsxs)(`div`,{className:`flex justify-between items-center mb-4`,children:[(0,r.jsxs)(`button`,{onClick:()=>{u(`login`),v(null),b(null)},className:`flex items-center gap-1.5 text-xs font-semibold transition-colors cursor-pointer ${o?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:[(0,r.jsx)(A,{size:14}),(0,r.jsx)(`span`,{children:`Back to Login`})]}),(0,r.jsx)(`button`,{onClick:()=>{u(`reset`),v(null),b(null)},className:`text-xs font-semibold hover:underline cursor-pointer`,style:{color:a},children:`Generate Password →`})]}),(0,r.jsxs)(`div`,{className:`p-6 rounded-xl border shadow-sm space-y-4 ${o?`bg-zinc-900 border-zinc-800`:`bg-white border-gray-200`}`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{className:`text-lg font-bold ${o?`text-white`:`text-gray-900`}`,children:`Get Verification Code`}),(0,r.jsx)(`p`,{className:`text-xs mt-1 ${o?`text-zinc-400`:`text-gray-500`}`,children:`Enter your registered email or registration number to receive a verification code.`})]}),_&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs ${o?`bg-red-950/60 border-red-900 text-red-300`:`bg-red-50 border-red-200 text-red-700`}`,children:[(0,r.jsx)(ee,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:_})]}),y&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs ${o?`bg-emerald-950/60 border-emerald-900 text-emerald-300`:`bg-green-50 border-green-200 text-green-700`}`,children:[(0,r.jsx)(F,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),(0,r.jsxs)(`form`,{onSubmit:_e,className:`space-y-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold mb-1 ${o?`text-zinc-200`:`text-gray-700`}`,children:`Registration Number or Email`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ${o?`text-zinc-500`:`text-gray-400`}`,children:(0,r.jsx)(re,{size:16})}),(0,r.jsx)(`input`,{type:`text`,required:!0,value:D||x,onChange:e=>{O(e.target.value),S(e.target.value)},placeholder:`e.g. attendee@example.com or REG12345`,className:`w-full pl-9 pr-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${o?`bg-zinc-950 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`})]})]}),(0,r.jsx)(`button`,{type:`submit`,disabled:z,style:{backgroundColor:a},className:`w-full py-2.5 px-4 text-white text-sm font-bold rounded-lg hover:opacity-90 transition-opacity shadow-sm flex items-center justify-center cursor-pointer disabled:opacity-50 mt-2`,children:z?(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),(0,r.jsx)(`span`,{children:`Sending Code...`})]}):`Send Verification Code`}),(0,r.jsx)(`div`,{className:`text-center pt-2 border-t border-gray-100 dark:border-zinc-800`,children:(0,r.jsx)(`button`,{type:`button`,onClick:()=>{u(`reset`),v(null),b(null)},className:`text-xs font-semibold hover:underline cursor-pointer`,style:{color:a},children:`Already have a code? Click here to generate password`})})]})]})]})}):l===`reset`?(0,r.jsx)(`div`,{className:`flex flex-col h-full overflow-y-auto ${o?`bg-black text-white`:`bg-gray-50 text-gray-900`}`,children:(0,r.jsxs)(`div`,{className:`p-5 flex-1 max-w-md mx-auto w-full`,children:[(0,r.jsxs)(`button`,{onClick:()=>{u(`login`),v(null),b(null)},className:`flex items-center gap-1.5 text-xs font-semibold mb-4 transition-colors cursor-pointer ${o?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:[(0,r.jsx)(A,{size:14}),(0,r.jsx)(`span`,{children:`Back to Login`})]}),(0,r.jsxs)(`div`,{className:`p-6 rounded-xl border shadow-sm space-y-4 ${o?`bg-zinc-900 border-zinc-800`:`bg-white border-gray-200`}`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{className:`text-lg font-bold ${o?`text-white`:`text-gray-900`}`,children:`Generate / Reset Password`}),(0,r.jsx)(`p`,{className:`text-xs mt-1 ${o?`text-zinc-400`:`text-gray-500`}`,children:`You will get a verification code on your registered email.`})]}),_&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs ${o?`bg-red-950/60 border-red-900 text-red-300`:`bg-red-50 border-red-200 text-red-700`}`,children:[(0,r.jsx)(ee,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:_})]}),y&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs ${o?`bg-emerald-950/60 border-emerald-900 text-emerald-300`:`bg-green-50 border-green-200 text-green-700`}`,children:[(0,r.jsx)(F,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),(0,r.jsxs)(`form`,{onSubmit:ve,className:`space-y-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold mb-1 ${o?`text-zinc-200`:`text-gray-700`}`,children:`Registration Number or Email`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ${o?`text-zinc-500`:`text-gray-400`}`,children:(0,r.jsx)(re,{size:16})}),(0,r.jsx)(`input`,{type:`text`,required:!0,value:D||x,onChange:e=>{O(e.target.value),S(e.target.value)},placeholder:`e.g. attendee@example.com or REG12345`,className:`w-full pl-9 pr-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${o?`bg-zinc-950 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`div`,{className:`flex justify-between items-center mb-1`,children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold ${o?`text-zinc-200`:`text-gray-700`}`,children:`Verification Code`}),(0,r.jsx)(`button`,{type:`button`,onClick:()=>{O(D||x),u(`request_code`),v(null),b(null)},className:`text-xs font-semibold hover:underline cursor-pointer`,style:{color:a},children:`Get code on email`})]}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ${o?`text-zinc-500`:`text-gray-400`}`,children:(0,r.jsx)(H,{size:16})}),(0,r.jsx)(`input`,{type:`text`,required:!0,value:k,onChange:e=>j(e.target.value),placeholder:`Enter code from email`,className:`w-full pl-9 pr-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${o?`bg-zinc-950 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold mb-1 ${o?`text-zinc-200`:`text-gray-700`}`,children:`New Password`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ${o?`text-zinc-500`:`text-gray-400`}`,children:(0,r.jsx)(W,{size:16})}),(0,r.jsx)(`input`,{type:`password`,required:!0,value:N,onChange:e=>P(e.target.value),placeholder:`Enter new password`,className:`w-full pl-9 pr-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${o?`bg-zinc-950 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold mb-1 ${o?`text-zinc-200`:`text-gray-700`}`,children:`Confirm Password`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ${o?`text-zinc-500`:`text-gray-400`}`,children:(0,r.jsx)(W,{size:16})}),(0,r.jsx)(`input`,{type:`password`,required:!0,value:I,onChange:e=>R(e.target.value),placeholder:`Re-enter new password`,className:`w-full pl-9 pr-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${o?`bg-zinc-950 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`})]})]}),(0,r.jsx)(`button`,{type:`submit`,disabled:d,style:{backgroundColor:a},className:`w-full py-2.5 px-4 text-white text-sm font-bold rounded-lg hover:opacity-90 transition-opacity shadow-sm flex items-center justify-center cursor-pointer disabled:opacity-50 mt-2`,children:d?`Updating Password...`:`Set New Password`})]})]})]})}):(0,r.jsx)(`div`,{className:`flex flex-col h-full overflow-y-auto ${o?`bg-black text-white`:`bg-gray-50 text-gray-900`}`,children:(0,r.jsx)(`div`,{className:`p-5 flex-1 max-w-md mx-auto w-full flex flex-col justify-center`,children:(0,r.jsxs)(`div`,{className:`p-6 rounded-xl border shadow-sm space-y-4 ${o?`bg-zinc-900 border-zinc-800`:`bg-white border-gray-200`}`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{className:`text-lg font-bold ${o?`text-white`:`text-gray-900`}`,children:`Attendee Login`}),(0,r.jsx)(`p`,{className:`text-xs mt-1 ${o?`text-zinc-400`:`text-gray-500`}`,children:`Sign in with your email or registration number`})]}),_&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs ${o?`bg-red-950/60 border-red-900 text-red-300`:`bg-red-50 border-red-200 text-red-700`}`,children:[(0,r.jsx)(ee,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:_})]}),y&&(0,r.jsxs)(`div`,{className:`p-3 border rounded-lg flex items-start gap-2 text-xs ${o?`bg-emerald-950/60 border-emerald-900 text-emerald-300`:`bg-green-50 border-green-200 text-green-700`}`,children:[(0,r.jsx)(F,{size:16,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),(0,r.jsxs)(`form`,{onSubmit:ge,className:`space-y-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold mb-1 ${o?`text-zinc-200`:`text-gray-700`}`,children:`Email or Registration Number`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ${o?`text-zinc-500`:`text-gray-400`}`,children:(0,r.jsx)(re,{size:16})}),(0,r.jsx)(`input`,{type:`text`,required:!0,value:x,onChange:e=>S(e.target.value),placeholder:`Enter email or registration number`,className:`w-full pl-9 pr-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${o?`bg-zinc-950 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`})]})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`label`,{className:`block text-xs font-semibold mb-1 ${o?`text-zinc-200`:`text-gray-700`}`,children:`Password`}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none ${o?`text-zinc-500`:`text-gray-400`}`,children:(0,r.jsx)(W,{size:16})}),(0,r.jsx)(`input`,{type:`password`,required:!0,value:C,onChange:e=>w(e.target.value),placeholder:`Enter password`,className:`w-full pl-9 pr-3 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 ${o?`bg-zinc-950 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-gray-300 text-gray-900`}`})]})]}),(0,r.jsxs)(`div`,{className:`flex justify-between items-center text-xs`,children:[(0,r.jsx)(`button`,{type:`button`,onClick:()=>{O(x),u(`request_code`),v(null),b(null)},className:`font-semibold hover:underline cursor-pointer`,style:{color:a},children:`Get Code`}),(0,r.jsx)(`button`,{type:`button`,onClick:()=>{O(x),u(`reset`),v(null),b(null)},className:`font-semibold hover:underline cursor-pointer`,style:{color:a},children:`Click to generate password`})]}),(0,r.jsx)(`button`,{type:`submit`,disabled:d,style:{backgroundColor:a},className:`w-full py-2.5 px-4 text-white text-sm font-bold rounded-lg hover:opacity-90 transition-opacity shadow-sm flex items-center justify-center cursor-pointer disabled:opacity-50`,children:d?(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),(0,r.jsx)(`span`,{children:`Logging in...`})]}):`Login`})]})]})})})};function ge(e){if(!e)return`bottom-right`;switch(e){case`bottom-left`:case`left-bottom`:return`bottom-left`;case`top-right`:case`right-top`:return`top-right`;case`top-left`:case`left-top`:return`top-left`;default:return`bottom-right`}}var _e=e=>{switch(e){case`bottom-left`:return{bottom:`20px`,left:`20px`,top:`auto`,right:`auto`};case`top-right`:return{top:`20px`,right:`20px`,bottom:`auto`,left:`auto`};case`top-left`:return{top:`20px`,left:`20px`,bottom:`auto`,right:`auto`};default:return{bottom:`20px`,right:`20px`,top:`auto`,left:`auto`}}},ve=e=>{switch(e){case`bottom-left`:return`bottom-5 left-5`;case`top-right`:return`top-5 right-5`;case`top-left`:return`top-5 left-5`;default:return`bottom-5 right-5`}},ye=({config:e})=>{let[t,i]=(0,n.useState)(`registration`),[a,o]=(0,n.useState)(e.displayMode!==`popup`),[s,c]=(0,n.useState)(!1),[l,u]=(0,n.useState)([]),[d,h]=(0,n.useState)(`FOGSI YUVA 2026`),[g,_]=(0,n.useState)(null),[v,y]=(0,n.useState)(!0),[b,x]=(0,n.useState)(!1),[S,C]=(0,n.useState)(null),[w,T]=(0,n.useState)(null),[E,D]=(0,n.useState)(()=>ge(e.position)),[O,k]=(0,n.useState)(null),[A,j]=(0,n.useState)(null),[M,N]=(0,n.useState)(!1),[ee,P]=(0,n.useState)(!1),F=(0,n.useRef)(null),I=(0,n.useRef)(null),L=(0,n.useRef)(!1);(0,n.useEffect)(()=>{e.position&&D(ge(e.position))},[e.position]);let R=e.themeMode===`dark`||e.theme?.mode===`dark`,z=e.theme?.primaryColor||`#2563eb`,B=(0,n.useMemo)(()=>new f(e.debug),[e.debug]),V=(0,n.useMemo)(()=>new p(e.baseUrl,e.eventSlug,B,e.timeoutMs??12e4),[e.baseUrl,e.eventSlug,B,e.timeoutMs]),H=(0,n.useMemo)(()=>new m(e.eventSlug),[e.eventSlug]),U=(0,n.useRef)(e.displayMode),W=(0,n.useRef)(null),[G,ne]=(0,n.useState)(null);(0,n.useEffect)(()=>{H.getXrefId()},[H]),(0,n.useEffect)(()=>{if(!a)return;let t=H.getXrefId();t&&V.getDraft(t).then(t=>{let n=t?.data||t;n&&n.registration_type&&(ne(n),e.onEvent?.(`draft_loaded`,n))}).catch(e=>{B.log(`No draft found for this session`,e)})},[a,V,H,B]);let K=(0,n.useMemo)(()=>{if(!G||!g||String(G.registration_type)!==String(g.id))return{};let e={...G.custom_data||{}};if(G.salutation&&(e.salutation=G.salutation,e.title=G.salutation),G.name){e.name=G.name,e.full_name=G.name,e.fullName=G.name;let t=G.name.trim().split(/\s+/);t.length>0&&!e.first_name&&(e.first_name=t[0]),t.length>1&&!e.last_name&&(e.last_name=t.slice(1).join(` `))}return G.email&&(e.email=G.email),G.phone&&(e.phone=G.phone,e.mobile=G.phone,e.phoneNumber=G.phone),(g?.form_schema?.fields||[]).forEach(t=>{let n=$(t.id,t.label);e[t.id]===void 0&&e[n]!==void 0&&(e[t.id]=e[n])}),e},[G,g]);(0,n.useEffect)(()=>()=>{W.current&&clearTimeout(W.current)},[]);let re=(0,n.useCallback)(t=>{W.current&&clearTimeout(W.current),W.current=setTimeout(async()=>{if(!Object.values(t).some(e=>e!==``&&e!=null))return;let n=new Set([`salutation`,`title`,`name`,`fullName`,`full_name`,`firstName`,`lastName`,`email`,`phone`,`mobile`,`phoneNumber`,`selected_items`,`custom_data`]),r=g?.form_schema?.fields||[],i=new Map;r.forEach(e=>i.set(e.id,e));let a={...t.custom_data||{}};for(let[e,r]of Object.entries(t))if(!n.has(e)){let t=$(e,i.get(e)?.label);a[t]=r,t!==e&&(a[e]=r)}let o={xref_id:H.getXrefId(),salutation:t.salutation||t.title||``,name:t.name||t.fullName||t.full_name||[t.firstName,t.lastName].filter(Boolean).join(` `)||``,email:t.email||``,phone:t.phone||t.mobile||t.phoneNumber||``,registration_type:g?.id,custom_data:a,selected_items:t.selected_items||[]};try{await V.trackProgress(o),e.onEvent?.(`draft_saved`,o)}catch(e){B.error(`Failed to save draft progress`,e)}},600)},[H,V,g,e,B]);(0,n.useEffect)(()=>{U.current!==e.displayMode&&(U.current=e.displayMode,o(e.displayMode!==`popup`),c(!1))},[e.displayMode]),(0,n.useEffect)(()=>{V.getFormSchema().then(t=>{u(t?.data?.types||[]),(t?.data?.event_name||t?.data?.title||t?.data?.name)&&h(t.data.event_name||t.data.title||t.data.name),e.onEvent?.(`form_loaded`,t.data)}).catch(t=>{B.error(`Failed to load schema`,t);let n={type:`schema_load`,message:t?.message||`Failed to load event schema`,error:t};e.onEvent?.(`error`,n),e.onError?.(n)}).finally(()=>y(!1))},[V]);let q=async t=>{W.current&&clearTimeout(W.current),y(!0),C(null);let n=H.getXrefId(),r=new Set([`salutation`,`title`,`name`,`fullName`,`full_name`,`firstName`,`lastName`,`email`,`phone`,`mobile`,`phoneNumber`,`registration_type`,`selected_items`,`custom_data`,`xref_id`]),i=g?.form_schema?.fields||[],a=new Map;i.forEach(e=>a.set(e.id,e));let o={...t.custom_data||{}};for(let[e,n]of Object.entries(t))if(!r.has(e)){let t=$(e,a.get(e)?.label);o[t]=n,t!==e&&(o[e]=n)}let s={xref_id:n,salutation:t.salutation||t.title||``,name:t.name||t.fullName||t.full_name||[t.firstName,t.lastName].filter(Boolean).join(` `)||``,email:t.email||``,phone:t.phone||t.mobile||t.phoneNumber||``,registration_type:g.id,custom_data:o,selected_items:t.selected_items||[]};try{let t=await V.submitRegistration(s);H.updateXrefId(),ne(null);let n=t?.data?.payment_url||t?.payment_url||null;T(n),n&&typeof n==`string`&&n.trim()!==``&&window.open(n,`_blank`,`noopener,noreferrer`),x(!0);let r={registrationType:g.id,payload:s,response:t,paymentUrl:n};e.onEvent?.(`submitted`,r),e.onRegister?.(r),e.onRegistered?.(r)}catch(t){B.error(`Submission failed`,t);let n=t?.message||`Registration failed. Please check your information and try again.`,r={type:`submit_error`,message:n,error:t};e.onEvent?.(`error`,r),e.onError?.(r),C(n)}finally{y(!1)}},J=()=>{x(!1),C(null),T(null),_(null),ne(null)},X=(0,n.useCallback)(e=>{if(e.stopPropagation(),e.button!==0||!F.current)return;let t=F.current.getBoundingClientRect();I.current={startX:e.clientX,startY:e.clientY,rect:t,corner:E},L.current=!1,N(!0)},[E]);if((0,n.useEffect)(()=>{if(!M)return;let t=e=>{if(!I.current)return;let t=e.clientX-I.current.startX,n=e.clientY-I.current.startY;L.current||Math.hypot(t,n)>5&&(L.current=!0),L.current&&k({x:t,y:n})},n=t=>{if(!I.current){N(!1),k(null),L.current=!1;return}let{rect:n,startX:r,startY:i}=I.current,a=t.clientX-r,o=t.clientY-i,s=L.current;if(I.current=null,N(!1),setTimeout(()=>{L.current=!1},100),!s){k(null);return}let c=n.left+a,l=n.top+o,u=c+n.width/2,d=l+n.height/2,f=typeof window<`u`?window.innerWidth:1024,p=typeof window<`u`?window.innerHeight:768,m=u>=f/2,h=d>=p/2,g=h?m?`bottom-right`:`bottom-left`:m?`top-right`:`top-left`,_=m?f-n.width-20:20,v=h?p-n.height-20:20,y=c-_,b=l-v;j({transform:`translate3d(${y}px, ${b}px, 0)`,transition:`none`}),k(null),D(g),e.onEvent?.(`position_changed`,{position:g}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{j({transform:`translate3d(0, 0, 0)`,transition:`transform 0.35s cubic-bezier(0.16, 1, 0.3, 1)`}),setTimeout(()=>{j(null)},360)})})};return window.addEventListener(`pointermove`,t),window.addEventListener(`pointerup`,n),window.addEventListener(`pointercancel`,n),()=>{window.removeEventListener(`pointermove`,t),window.removeEventListener(`pointerup`,n),window.removeEventListener(`pointercancel`,n)}},[M,e]),!a&&e.displayMode===`popup`){let e={..._e(E),...O?{transform:`translate3d(${O.x}px, ${O.y}px, 0) scale(1.05)`,transition:`none`,userSelect:`none`}:A?{transform:A.transform,transition:A.transition}:{transition:`all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`}},t=ee||M;return(0,r.jsxs)(`div`,{ref:F,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),className:`fixed ${ve(E)} z-50 select-none group`,style:e,children:[(0,r.jsx)(`div`,{onPointerDown:X,className:`absolute -top-1.5 -left-1.5 w-7 h-7 rounded-full bg-slate-900 text-white shadow-lg border-2 border-white flex items-center justify-center cursor-grab active:cursor-grabbing hover:bg-black hover:scale-110 active:scale-95 transition-all duration-200 z-10 touch-none ${t?`opacity-100 scale-100 pointer-events-auto`:`opacity-0 scale-75 pointer-events-none group-hover:opacity-100 group-hover:scale-100 group-hover:pointer-events-auto`}`,title:`Hold and drag to change position`,children:(0,r.jsx)(ae,{size:13,className:`pointer-events-none text-white`})}),(0,r.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),!M&&o(!0)},className:`w-16 h-16 rounded-full text-white shadow-xl flex items-center justify-center cursor-pointer hover:scale-105 active:scale-95 transition-transform`,style:{backgroundColor:z},title:`Click to open registration`,children:(0,r.jsx)(`span`,{className:`font-bold text-sm tracking-wide pointer-events-none`,children:`Join`})})]})}let Z=e.displayMode===`fullscreen`||e.displayMode===`popup`&&s,oe=`${R?`bg-black text-white border-zinc-800`:`bg-white text-gray-900 border-gray-200`} overflow-hidden flex flex-col shadow-2xl border transition-all duration-300 ease-in-out `,Q={fontFamily:e.theme?.fontFamily||`sans-serif`};return Z?(oe+=`fixed inset-0 z-[9999] rounded-none `,Q.width=`100vw`,Q.height=`100vh`):e.displayMode===`popup`?(oe+=`fixed ${ve(E)} z-50 rounded-xl `,Q.width=e.width||`400px`,Q.height=e.height||`700px`,Q.maxHeight=`90vh`,Q.maxWidth=`calc(100vw - 32px)`,Object.assign(Q,_e(E))):(oe+=`rounded-xl relative `,Q.width=`100%`,Q.height=`100%`),(0,r.jsx)(`div`,{className:oe,style:Q,children:v?(0,r.jsxs)(`div`,{className:`flex h-full items-center justify-center font-medium`,style:{color:z},children:[(0,r.jsxs)(`svg`,{className:`animate-spin -ml-1 mr-3 h-8 w-8`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),`Processing...`]}):b?w?(0,r.jsxs)(`div`,{className:`flex flex-col h-full relative overflow-y-auto ${R?`bg-black text-white`:`bg-white text-gray-900`}`,children:[(0,r.jsxs)(`div`,{className:`p-4 shadow-sm flex justify-between items-center z-10`,style:{backgroundColor:z,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{className:`text-xl font-bold`,children:`Complete Payment`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Registration Submitted`})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>c(!s),title:s?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:s?(0,r.jsx)(Y,{size:18}):(0,r.jsx)(ie,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(pe,{size:24})})]})})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 text-center`,children:[(0,r.jsx)(`div`,{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 text-2xl shadow-md`,style:{backgroundColor:`color-mix(in srgb, ${z} 12%, transparent)`,color:z},children:`💳`}),(0,r.jsx)(`h3`,{className:`text-2xl font-bold mb-2 ${R?`text-white`:`text-gray-900`}`,children:`Done Your Payment First`}),(0,r.jsx)(`p`,{className:`text-sm mb-6 max-w-xs leading-relaxed ${R?`text-zinc-300`:`text-gray-600`}`,children:`Please complete your payment in the new tab to confirm your booking and finalize your registration.`}),(0,r.jsxs)(`div`,{className:`w-full max-w-xs space-y-3`,children:[(0,r.jsxs)(`a`,{href:w,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full`,style:{backgroundColor:z},children:[(0,r.jsx)(`span`,{children:`Open Payment Page`}),(0,r.jsx)(te,{size:16})]}),(0,r.jsx)(`button`,{onClick:J,className:`w-full py-2.5 px-4 text-sm font-semibold transition-colors cursor-pointer ${R?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:`Register Another Person`})]})]})]}):(0,r.jsxs)(`div`,{className:`flex flex-col h-full items-center justify-center p-8 text-center relative ${R?`bg-black text-white`:`bg-white text-gray-900`}`,children:[e.displayMode===`popup`&&(0,r.jsx)(`div`,{className:`absolute top-4 right-4 flex items-center gap-2`,children:(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`cursor-pointer ${R?`text-zinc-400 hover:text-white`:`text-gray-400 hover:text-gray-900`}`,children:(0,r.jsx)(pe,{size:24})})}),(0,r.jsx)(`div`,{className:`w-20 h-20 rounded-full flex items-center justify-center mb-6 text-4xl shadow-md`,style:{backgroundColor:z,color:`white`},children:`✓`}),(0,r.jsx)(`h2`,{className:`text-3xl font-bold mb-3 ${R?`text-white`:`text-gray-900`}`,children:`Thank You!`}),(0,r.jsx)(`p`,{className:`mb-8 ${R?`text-zinc-300`:`text-gray-600`}`,children:`Your registration has been successfully received.`}),(0,r.jsx)(`button`,{onClick:J,style:{backgroundColor:z},className:`text-white font-bold py-3 px-8 rounded-md hover:opacity-90 transition-opacity shadow-md cursor-pointer`,children:`Register Another Person`})]}):S?(0,r.jsxs)(`div`,{className:`flex flex-col h-full relative overflow-y-auto ${R?`bg-black text-white`:`bg-white text-gray-900`}`,children:[(0,r.jsxs)(`div`,{className:`p-4 shadow-sm flex justify-between items-center z-10 bg-red-600 text-white`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{className:`text-xl font-bold`,children:`Registration Failed`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Please try again`})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(pe,{size:24})})})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 text-center`,children:[(0,r.jsx)(`div`,{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 text-2xl shadow-md border ${R?`bg-red-950/60 text-red-400 border-red-900`:`bg-red-50 text-red-600 border-red-200`}`,children:`✕`}),(0,r.jsx)(`h3`,{className:`text-2xl font-bold mb-2 ${R?`text-white`:`text-gray-900`}`,children:`Submission Error`}),(0,r.jsx)(`p`,{className:`text-sm mb-6 max-w-xs leading-relaxed ${R?`text-zinc-300`:`text-gray-600`}`,children:S}),(0,r.jsxs)(`div`,{className:`w-full max-w-xs space-y-3`,children:[(0,r.jsx)(`button`,{onClick:()=>C(null),style:{backgroundColor:z},className:`flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full cursor-pointer`,children:(0,r.jsx)(`span`,{children:`Try Again`})}),(0,r.jsx)(`button`,{onClick:()=>{C(null),_(null)},className:`w-full py-2.5 px-4 text-sm font-semibold transition-colors cursor-pointer ${R?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:`Choose Another Ticket`})]})]})]}):g?(0,r.jsx)(me,{schema:g.form_schema,theme:e.theme,displayMode:e.displayMode,isExpanded:s,onToggleExpand:()=>c(!s),onClose:()=>o(!1),onSubmit:q,onChange:re,initialValues:K,isDark:R,apiClient:V,storage:H,onError:e.onError,onEvent:e.onEvent,onBack:()=>{W.current&&clearTimeout(W.current),_(null)}}):(0,r.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden ${R?`bg-black text-white`:`bg-gray-50 text-gray-900`}`,children:[(0,r.jsxs)(`div`,{className:`p-4 shadow-sm flex justify-between items-center z-10 shrink-0`,style:{backgroundColor:z,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{className:`text-xl font-bold`,children:t===`registration`?`Select Ticket`:`Attendee Portal`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:t===`registration`?d:`Registration & Profile Management`})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>c(!s),title:s?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:s?(0,r.jsx)(Y,{size:18}):(0,r.jsx)(ie,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>o(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(pe,{size:22})})]})})]}),(0,r.jsxs)(`div`,{className:`flex border-b shrink-0 shadow-2xs ${R?`border-zinc-800 bg-black`:`border-gray-200 bg-white`}`,children:[(0,r.jsxs)(`button`,{type:`button`,onClick:()=>i(`registration`),className:`flex-1 py-3 text-sm font-semibold text-center transition-all cursor-pointer relative`,style:{color:t===`registration`?z:R?`#a1a1aa`:`#6b7280`},children:[`Registration`,t===`registration`&&(0,r.jsx)(`span`,{className:`absolute bottom-0 left-0 right-0 h-0.5`,style:{backgroundColor:z}})]}),(0,r.jsxs)(`button`,{type:`button`,onClick:()=>i(`attendee`),className:`flex-1 py-3 text-sm font-semibold text-center transition-all cursor-pointer relative`,style:{color:t===`attendee`?z:R?`#a1a1aa`:`#6b7280`},children:[`Attendee Login`,t===`attendee`&&(0,r.jsx)(`span`,{className:`absolute bottom-0 left-0 right-0 h-0.5`,style:{backgroundColor:z}})]})]}),t===`registration`?(0,r.jsx)(`div`,{className:`p-5 space-y-4 overflow-y-auto flex-1 ${R?`bg-black`:`bg-gray-50`}`,children:l.length===0?(0,r.jsx)(`div`,{className:`text-center py-10 text-sm ${R?`text-zinc-500`:`text-gray-400`}`,children:`No tickets currently available.`}):l.map(e=>(0,r.jsxs)(`div`,{onClick:()=>_(e),className:`p-5 border-2 rounded-xl cursor-pointer transition-all shadow-sm hover:shadow-md ${R?`bg-zinc-900`:`bg-white`}`,style:{borderColor:R?`#27272a`:`#e5e7eb`},onMouseEnter:e=>e.currentTarget.style.borderColor=z,onMouseLeave:e=>e.currentTarget.style.borderColor=R?`#27272a`:`#e5e7eb`,children:[(0,r.jsx)(`div`,{className:`font-bold text-lg ${R?`text-white`:`text-gray-900`}`,children:e.type}),(0,r.jsxs)(`div`,{className:`font-semibold mt-1`,style:{color:z},children:[e.currency,` `,Number(e.price)>0?Number(e.price).toLocaleString():`Free`]})]},e.id))}):(0,r.jsx)(`div`,{className:`flex-1 overflow-hidden flex flex-col`,children:(0,r.jsx)(he,{apiClient:V,storage:H,logger:B,primaryColor:z,isDark:R,onEvent:e.onEvent,onError:e.onError})})]})})},be=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
3
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-950:oklch(28.2% .091 267.935);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-y-0{inset-block:0}.-top-1\\.5{top:calc(var(--spacing) * -1.5)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.right-0{right:0}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.bottom-0{bottom:0}.bottom-5{bottom:calc(var(--spacing) * 5)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.left-0{left:0}.left-2\\.5{left:calc(var(--spacing) * 2.5)}.left-5{left:calc(var(--spacing) * 5)}.z-10{z-index:10}.z-50{z-index:50}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1\\.5{margin-inline:calc(var(--spacing) * -1.5)}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-\\[650px\\]{height:650px}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-md{max-width:var(--container-md)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-900\\/50{border-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.border-amber-900\\/50{border-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-800{border-color:var(--color-blue-800)}.border-blue-800\\/80{border-color:#193cb8cc}@supports (color:color-mix(in lab, red, red)){.border-blue-800\\/80{border-color:color-mix(in oklab, var(--color-blue-800) 80%, transparent)}}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-800\\/80{border-color:#005f46cc}@supports (color:color-mix(in lab, red, red)){.border-emerald-800\\/80{border-color:color-mix(in oklab, var(--color-emerald-800) 80%, transparent)}}.border-emerald-900{border-color:var(--color-emerald-900)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-900{border-color:var(--color-gray-900)}.border-green-200{border-color:var(--color-green-200)}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-600{border-color:var(--color-purple-600)}.border-red-200{border-color:var(--color-red-200)}.border-red-900{border-color:var(--color-red-900)}.border-red-900\\/50{border-color:#82181a80}@supports (color:color-mix(in lab, red, red)){.border-red-900\\/50{border-color:color-mix(in oklab, var(--color-red-900) 50%, transparent)}}.border-red-900\\/60{border-color:#82181a99}@supports (color:color-mix(in lab, red, red)){.border-red-900\\/60{border-color:color-mix(in oklab, var(--color-red-900) 60%, transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-800{border-color:var(--color-zinc-800)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-950\\/60{background-color:#46190199}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\\/60{background-color:color-mix(in oklab, var(--color-amber-950) 60%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/40{background-color:#eff6ff66}@supports (color:color-mix(in lab, red, red)){.bg-blue-50\\/40{background-color:color-mix(in oklab, var(--color-blue-50) 40%, transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-950\\/40{background-color:#16245666}@supports (color:color-mix(in lab, red, red)){.bg-blue-950\\/40{background-color:color-mix(in oklab, var(--color-blue-950) 40%, transparent)}}.bg-blue-950\\/50{background-color:#16245680}@supports (color:color-mix(in lab, red, red)){.bg-blue-950\\/50{background-color:color-mix(in oklab, var(--color-blue-950) 50%, transparent)}}.bg-blue-950\\/60{background-color:#16245699}@supports (color:color-mix(in lab, red, red)){.bg-blue-950\\/60{background-color:color-mix(in oklab, var(--color-blue-950) 60%, transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-950\\/60{background-color:#002c2299}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\\/60{background-color:color-mix(in oklab, var(--color-emerald-950) 60%, transparent)}}.bg-emerald-950\\/80{background-color:#002c22cc}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\\/80{background-color:color-mix(in oklab, var(--color-emerald-950) 80%, transparent)}}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-red-950\\/40{background-color:#46080966}@supports (color:color-mix(in lab, red, red)){.bg-red-950\\/40{background-color:color-mix(in oklab, var(--color-red-950) 40%, transparent)}}.bg-red-950\\/50{background-color:#46080980}@supports (color:color-mix(in lab, red, red)){.bg-red-950\\/50{background-color:color-mix(in oklab, var(--color-red-950) 50%, transparent)}}.bg-red-950\\/60{background-color:#46080999}@supports (color:color-mix(in lab, red, red)){.bg-red-950\\/60{background-color:color-mix(in oklab, var(--color-red-950) 60%, transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-white{background-color:var(--color-white)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab, red, red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab, var(--color-zinc-900) 60%, transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/60{background-color:#09090b99}@supports (color:color-mix(in lab, red, red)){.bg-zinc-950\\/60{background-color:color-mix(in oklab, var(--color-zinc-950) 60%, transparent)}}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-amber-400{color:var(--color-amber-400)}.text-amber-700{color:var(--color-amber-700)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-white{color:var(--color-white)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.placeholder-zinc-500::placeholder{color:var(--color-zinc-500)}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.contrast-200{--tw-contrast:contrast(200%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\\:scale-100:is(:where(.group):hover *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-solid:hover{--tw-border-style:solid;border-style:solid}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:border-zinc-500:hover{border-color:var(--color-zinc-500)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-black:hover{background-color:var(--color-black)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\\:bg-red-900\\/50:hover{background-color:#82181a80}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-900\\/50:hover{background-color:color-mix(in oklab, var(--color-red-900) 50%, transparent)}}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:text-blue-300:hover{color:var(--color-blue-300)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:opacity-50:disabled{opacity:.5}@media (width>=48rem){.md\\:inline-block{display:inline-block}.md\\:w-1\\/2{width:50%}.md\\:pr-3{padding-right:calc(var(--spacing) * 3)}}@media (width>=64rem){.lg\\:w-1\\/3{width:33.3333%}.lg\\:w-2\\/3{width:66.6667%}.lg\\:flex-row{flex-direction:row}}@media (prefers-color-scheme:dark){.dark\\:border-zinc-800{border-color:var(--color-zinc-800)}.dark\\:bg-red-950\\/40{background-color:#46080966}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-red-950\\/40{background-color:color-mix(in oklab, var(--color-red-950) 40%, transparent)}}.dark\\:text-emerald-400{color:var(--color-emerald-400)}.dark\\:text-red-400{color:var(--color-red-400)}}}:host{all:initial;font-family:inherit}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}`,xe=({children:e,useShadow:t=!0})=>{let a=(0,n.useRef)(null),[o,s]=(0,n.useState)(null);return(0,n.useLayoutEffect)(()=>{if(typeof document>`u`||!a.current||!t)return;let e=a.current.shadowRoot,n=null;if(e)n=e.querySelector(`.voxket-widget-root`);else{a.current.setAttribute(`data-voxket-shadow-host`,``),a.current.style.cssText=`width: 100%; height: 100%; display: block; position: relative;`,e=a.current.attachShadow({mode:`open`});let t=document.createElement(`style`);t.innerText=`:host, *, *::before, *::after, ::backdrop {
4
4
  --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate-x: initial;
5
5
  --tw-rotate-y: initial; --tw-rotate-z: initial; --tw-skew-x: initial;
6
6
  --tw-skew-y: initial; --tw-space-y-reverse: 0; --tw-space-x-reverse: 0;
7
7
  --tw-border-style: solid; --tw-shadow: 0 0 #0000;
8
8
  --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff;
9
- }`,e.appendChild(t);let r=document.createElement(`style`);r.textContent=pe,e.appendChild(r),n=document.createElement(`div`),n.className=`voxket-widget-root`,n.style.cssText=`
9
+ }`,e.appendChild(t);let r=document.createElement(`style`);r.textContent=be,e.appendChild(r),n=document.createElement(`div`),n.className=`voxket-widget-root`,n.style.cssText=`
10
10
  all: initial;
11
11
  box-sizing: border-box !important;
12
12
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif !important;
@@ -14,4 +14,4 @@
14
14
  color: #1a1a1a !important;
15
15
  position: relative !important;
16
16
  background-color: transparent !important;
17
- `,e.appendChild(n)}n&&s(n)},[t]),t?(0,r.jsx)(`div`,{ref:a,className:`w-full h-full`,children:o&&e?(0,i.createPortal)(e,o):null}):(0,r.jsx)(r.Fragment,{children:e})},$=({config:e})=>n.default.createElement(me,{useShadow:!0},n.default.createElement(fe,{config:e})),he=class{config;container=null;root=null;constructor(e){this.config=e}mount(e){if(this.container=typeof e==`string`?document.getElementById(e):e,!this.container)throw Error(`EventWidget: Mount container not found.`);this.root||=(0,t.createRoot)(this.container),this.root.render(n.default.createElement($,{config:this.config}))}updateConfig(e){this.config={...this.config,...e},this.root&&this.root.render(n.default.createElement($,{config:this.config}))}setConfig(e){this.config=e,this.root&&this.root.render(n.default.createElement($,{config:this.config}))}unmount(){if(this.root){let e=this.root;this.root=null,e.unmount()}}};e.EventWidget=$,e.EventWidgetClient=he});
17
+ `,e.appendChild(n)}n&&s(n)},[t]),t?(0,r.jsx)(`div`,{ref:a,className:`w-full h-full`,children:o&&e?(0,i.createPortal)(e,o):null}):(0,r.jsx)(r.Fragment,{children:e})},Se=({config:e})=>n.default.createElement(xe,{useShadow:!0},n.default.createElement(ye,{config:e})),Ce=class{config;container=null;root=null;constructor(e){this.config=e}mount(e){if(this.container=typeof e==`string`?document.getElementById(e):e,!this.container)throw Error(`EventWidget: Mount container not found.`);this.root||=(0,t.createRoot)(this.container),this.root.render(n.default.createElement(Se,{config:this.config}))}updateConfig(e){this.config={...this.config,...e},this.root&&this.root.render(n.default.createElement(Se,{config:this.config}))}setConfig(e){this.config=e,this.root&&this.root.render(n.default.createElement(Se,{config:this.config}))}unmount(){if(this.root){let e=this.root;this.root=null,e.unmount()}}};e.EventWidget=Se,e.EventWidgetClient=Ce});
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type WidgetConfig } from './types';
3
- export { type WidgetConfig } from './types';
3
+ export { type WidgetConfig, type WidgetPosition, type ThemeMode, type RegistrationSuccessPayload, type WidgetErrorPayload } from './types';
4
4
  export declare const EventWidget: React.FC<{
5
5
  config: WidgetConfig;
6
6
  }>;
package/dist/types.d.ts CHANGED
@@ -1,14 +1,38 @@
1
+ export type WidgetPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'right-bottom' | 'left-bottom' | 'right-top' | 'left-top';
2
+ export type ThemeMode = 'light' | 'dark';
3
+ export interface RegistrationSuccessPayload {
4
+ registrationType: string | number;
5
+ payload: Record<string, any>;
6
+ response?: any;
7
+ paymentUrl?: string | null;
8
+ }
9
+ export interface WidgetErrorPayload {
10
+ type: 'submit_error' | 'schema_load' | 'login_error' | 'profile_update_error' | 'file_upload_error' | 'file_delete_error' | 'network_error' | string;
11
+ message: string;
12
+ error?: any;
13
+ }
1
14
  export interface WidgetConfig {
2
15
  eventSlug: string;
3
16
  baseUrl: string;
4
17
  displayMode?: 'popup' | 'widget' | 'fullscreen';
18
+ position?: WidgetPosition;
19
+ themeMode?: ThemeMode;
5
20
  width?: string;
6
21
  height?: string;
7
22
  theme?: {
8
- mode?: 'blue' | 'white' | 'custom';
23
+ mode?: 'light' | 'dark' | 'blue' | 'white' | 'custom';
9
24
  primaryColor?: string;
10
25
  fontFamily?: string;
11
26
  };
12
27
  debug?: boolean;
28
+ /** Request timeout in milliseconds. Defaults to 120000 (2 minutes). */
29
+ timeoutMs?: number;
30
+ /** Generic event listener for all internal events */
13
31
  onEvent?: (eventName: string, payload: any) => void;
32
+ /** Fired when registration is successfully completed */
33
+ onRegister?: (data: RegistrationSuccessPayload) => void;
34
+ /** Alias for onRegister */
35
+ onRegistered?: (data: RegistrationSuccessPayload) => void;
36
+ /** Fired when an error occurs (e.g. submit error, schema load error, network failure) */
37
+ onError?: (error: WidgetErrorPayload) => void;
14
38
  }
@@ -2,6 +2,7 @@ export declare class Logger {
2
2
  private isDebug;
3
3
  constructor(debugFlag?: boolean);
4
4
  log(message: string, ...args: any[]): void;
5
+ warn(message: string, ...args: any[]): void;
5
6
  error(message: string, ...args: any[]): void;
6
7
  private getCallerInfo;
7
8
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Utility functions for form schema and field key normalization.
3
+ */
4
+ /**
5
+ * Normalizes field keys when schema field IDs are auto-generated timestamps
6
+ * (e.g. `field_1785493567167`). Converts the field label to lowercase snake_case.
7
+ *
8
+ * Example:
9
+ * - id: "field_1785493567167", label: "College Name" -> "college_name"
10
+ * - id: "field_1785493567167", label: "State" -> "state"
11
+ * - id: "email", label: "Email Address" -> "email" (unchanged because id is already a standard key)
12
+ */
13
+ export declare function normalizeFieldKey(id: string, label?: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voxket-ai/events-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Event registration and ticketing widget SDK",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -71,4 +71,4 @@
71
71
  "typescript-eslint": "^8.69.0",
72
72
  "vite": "^8.3.0"
73
73
  }
74
- }
74
+ }