@inploi/plugin-chatbot 14.19.0 → 14.19.1
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.
- package/cdn/index.js +8 -8
- package/cdn/style.css +1 -1
- package/dist/{chatbot-body-DNPAc97n.cjs → chatbot-body-6xpvcL2-.cjs} +1 -1
- package/dist/{chatbot-body-B75cUCyM.js → chatbot-body-P5Ibik_l.js} +1 -1
- package/dist/index-BYzXbN3_.cjs +25 -0
- package/dist/index-C3o615ny.js +4132 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index-CGRnGR-K.js +0 -4132
- package/dist/index-NnL-o0w8.cjs +0 -25
package/cdn/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ab=Object.defineProperty;var ob=(Qe,Ve,Ut)=>Ve in Qe?ab(Qe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Qe[Ve]=Ut;var ve=(Qe,Ve,Ut)=>ob(Qe,typeof Ve!="symbol"?Ve+"":Ve,Ut);(function(){"use strict";var Qe=typeof document<"u"?document.currentScript:null,Ve=new Set(["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AbortError","TimeoutError","NetworkError","NotAllowedError","NotFoundError","NotSupportedError","InvalidStateError","QuotaExceededError","SecurityError","DataCloneError","ChunkLoadError"]),Ut=[/^Cannot (?:read|set) properties of (?:undefined|null) \((?:reading|setting) '[\w$]{1,40}'\)$/,/^[\w$.]{1,60} is (?:not a function|not iterable|not defined|not a constructor|undefined|null)$/,/^(?:undefined|null) is not an object \(evaluating '[\w$.]{1,60}'\)$/,/^can't access property "[\w$]{1,40}", [\w$.]{1,60} is (?:undefined|null)$/,/^(?:Script error\.|Assignment to constant variable\.|Maximum call stack size exceeded|Invalid array length|Invalid time value|Failed to fetch|Load failed|Importing a module script failed\.|NetworkError when attempting to fetch resource\.)$/],jl=`IDBDatabase IDBObjectStore IDBTransaction IDBFactory IDBRequest IDBOpenDBRequest IDBIndex IDBCursor IDBKeyRange
|
|
2
2
|
Storage StorageManager Window Document Element HTMLElement HTMLIFrameElement HTMLMediaElement HTMLFormElement
|
|
3
3
|
HTMLInputElement Node EventTarget Navigator Clipboard ServiceWorkerContainer ServiceWorkerRegistration Response
|
|
4
4
|
Request Headers URL URLSearchParams Blob File FileReader FormData MessagePort Worker Cache CacheStorage History
|
|
@@ -12,9 +12,9 @@ var ib=Object.defineProperty;var ob=(Qe,Ve,Ut)=>Ve in Qe?ib(Qe,Ve,{enumerable:!0
|
|
|
12
12
|
getRegistration requestStorageAccess focus blur scrollTo scrollIntoView setAttribute getAttribute
|
|
13
13
|
getBoundingClientRect attachShadow define pushState replaceState assign replace reload send close abort
|
|
14
14
|
requestAnimationFrame matchMedia getComputedStyle createElement structuredClone localStorage sessionStorage
|
|
15
|
-
indexedDB serviceWorker clipboard cookie`,Fl=["The operation is insecure.","The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.","The user aborted a request.","The operation was aborted.","signal is aborted without reason","Fetch is aborted","The quota has been exceeded.","The object is in an invalid state.","The string did not match the expected pattern.","The object can not be found here.","The operation is not supported.","The database connection is closing.","The transaction has finished.","The transaction is not active.","The transaction was aborted, so the request cannot be fulfilled.","One of the specified object stores was not found.","Connection to Indexed Database server lost. Refresh the page to try again","Attempt to get a record from database without an in-progress transaction","Database deleted by request of the user","An internal error was encountered in the Indexed Database server","Internal error opening backing store for indexedDB.open.","Access is denied for this document.","Access to the IndexedDB API is denied in this context.","The document is sandboxed and lacks the 'allow-same-origin' flag.","The play() request was interrupted by a call to pause().","The play() request was interrupted because the media was removed from the document.","play() failed because the user didn't interact with the document first.","The network connection was lost.","The request timed out.","The Internet connection appears to be offline.","A server with the specified hostname could not be found.","Network request failed","Illegal invocation","cancelled"],Ol=/^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/,
|
|
16
|
-
`,1e3).length:0}}}catch{return r}},Kl=(e,t,r="")=>{let n=jr(e),{message:
|
|
17
|
-
`,60)){let p=h.indexOf(t),g=p!==-1&&(p===0||" (@".includes(h[p-1])),v=g?zl.exec(h.slice(p+t.length).trim()):null;v?c.push([v[1],v[2],v[3]].filter(Boolean).join(":")):g?f.add("build"):Pl.test(h)&&f.add(Bl(h))}c.splice(10);let d={name:n,message:l,stack:c,foreign:[...f].sort(),thrown:o};for(;JSON.stringify(d).length>1400&&d.stack.length;)d.stack.pop();return d},oi="inploi-candidate-beacon-seed",Gl=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},Yl=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),si=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=Math.imul(t^a,2654435761),r=Math.imul(r^a,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0)},Jl=(e,t)=>{try{let r=e==null?void 0:e.getItem(oi);if(r)return r;let n=t();return e==null||e.setItem(oi,n),n}catch{return t()}},Zl=[["facebook",/\bFB(?:AN|AV|_IAB)\b/],["instagram",/\bInstagram (\d+)/],["linkedin",/\bLinkedInApp\b/],["tiktok",/\b(?:musical_ly|BytedanceWebview|TikTok)\b/],["samsung",/\bSamsungBrowser\/(\d+)/],["edge",/\bEdg(?:e|A|iOS)?\/(\d+)/],["opera",/\bOPR\/(\d+)/],["firefox",/\b(?:Firefox|FxiOS)\/(\d+)/],["chrome",/\b(?:Chrome|CriOS)\/(\d+)/],["safari",/\bVersion\/(\d+)[\d.]* (?:Mobile\/\S+ )?Safari\//]],Xl=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],Ql=e=>{var n,a;let t=Zl.find(([,i])=>i.test(e)),r=(n=t==null?void 0:t[1].exec(e))==null?void 0:n[1];return{browser:t?[t[0],r].filter(Boolean).join(" "):"other",platform:((a=Xl.find(([,i])=>i.test(e)))==null?void 0:a[0])??"other"}},ec=(e=typeof document>"u"?void 0:document)=>{var i,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,a=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(i=e==null?void 0:e.defaultView)==null||i.addEventListener("pagehide",()=>a=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>a=!1),()=>{var c;let s=typeof navigator>"u"?void 0:navigator,l=(c=s==null?void 0:s.connection)==null?void 0:c.effectiveType;return{visibility:(e==null?void 0:e.visibilityState)??"unknown",was_hidden:r!==null,hidden_at_ms:r,shown_at_ms:n,unloading:a,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...Ql((s==null?void 0:s.userAgent)??""),page_ms:t()}}},tc=new Set(["boot_failed","fatal","submit_blocked"]),rc=(e,t,r)=>{if(t.unloading||t.visibility==="hidden")return!0;if(e!=="boot_failed"||t.hidden_at_ms===null)return!1;if(r.elapsed_ms===void 0)return!0;let n=t.page_ms-r.elapsed_ms;return t.hidden_at_ms>=n||t.shown_at_ms!==null&&t.shown_at_ms>=n},nc=(e,t,r,n,a)=>{var o;if(t)return"abandoned";if(a.online===!1)return"offline";let i=[n.phase,n.stage,r==null?void 0:r.slice(0,40),n.http_status??((o=n.error)==null?void 0:o.name)];return[...new Set(i.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},ac=({config:e,version:t,env:r,seed:n,automated:a=typeof navigator<"u"&&navigator.webdriver===!0,company:i,page:o=ec(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=si(n),f=s(),d=e!==void 0&&c%1e4<e.sampleRate*1e4,h=new Set;return{send:(p,g,v={})=>{if(!e||!d||!t)return;let _=o(),S=tc.has(p),x=S&&rc(p,_,v),L=x?`${p}:abandoned`:p;if(h.has(L))return;h.add(L);let{error:j,...F}=v,V={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(i==null?void 0:i())??null,env:r==="production"?"production":"staging",mode:a?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...g&&{reason:g.slice(0,40)},...S&&{abandoned:x,cause:nc(p,x,g,v,_).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),..._,...F,...j&&{error:j,error_message:j.message,error_frame:j.stack[0]??null}};l(`https://${e.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(V)}).catch(()=>{})}}},He,ic={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function li(e){return!e&&!He?ic:{lang:(e==null?void 0:e.lang)??(He==null?void 0:He.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(He==null?void 0:He.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(He==null?void 0:He.abortPipeEarly)}}var kn;function oc(e){return kn==null?void 0:kn.get(e)}var Sn;function sc(e){return Sn==null?void 0:Sn.get(e)}var Cn;function lc(e,t){var r;return(r=Cn==null?void 0:Cn.get(e))==null?void 0:r.get(t)}function En(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function De(e,t,r,n,a){let i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??En(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??lc(e.reference,l.lang)??(c?sc(l.lang):null)??n.message??oc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}var ci=new WeakMap;function xe(e){let t=ci.get(e);return t||(t={version:1,vendor:"valibot",validate(r){return e["~run"]({value:r},li())}},ci.set(e,t)),t}function cc(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function $n(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function di(e){return{kind:"transformation",type:"transform",reference:di,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}var dc={abortEarly:!0};function uc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function An(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function ui(){return{kind:"schema",type:"any",reference:ui,expects:"any",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function fi(e,t){return{kind:"schema",type:"array",reference:fi,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){var i;let a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){let s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:a,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else De(this,"type",r,n);return r}}}function In(e){return{kind:"schema",type:"boolean",reference:In,expects:"boolean",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:De(this,"type",t,r),t}}}function Me(e,t){return{kind:"schema",type:"literal",reference:Me,expects:En(e),async:!1,literal:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:De(this,"type",r,n),r}}}function pi(e){return{kind:"schema",type:"null",reference:pi,expects:"null",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return t.value===null?t.typed=!0:De(this,"type",t,r),t}}}function St(e,t){return{kind:"schema",type:"nullable",reference:St,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Fr(e){return{kind:"schema",type:"number",reference:Fr,expects:"number",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:De(this,"type",t,r),t}}}function re(e,t){return{kind:"schema",type:"object",reference:re,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){var i;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in a?a[o]:An(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:a,key:o,value:l};for(let d of c.issues)d.path?d.path.unshift(f):d.path=[f],(i=r.issues)==null||i.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=uc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(De(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else De(this,"type",r,n);return r}}}function Se(e,t){return{kind:"schema",type:"optional",reference:Se,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function hi(e,t){return{kind:"schema",type:"picklist",reference:hi,expects:$n(e.map(En),"|"),async:!1,options:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:De(this,"type",r,n),r}}}function Tn(e,t,r){return{kind:"schema",type:"record",reference:Tn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return xe(this)},"~run"(n,a){var o,s;let i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(let l in i)if(cc(i,l)){let c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){let h={type:"object",origin:"key",input:i,key:l,value:c};for(let p of f.issues)p.path=[h],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}let d=this.value["~run"]({value:c},a);if(d.issues){let h={type:"object",origin:"value",input:i,key:l,value:c};for(let p of d.issues)p.path?p.path.unshift(h):p.path=[h],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else De(this,"type",n,a);return n}}}function we(e){return{kind:"schema",type:"string",reference:we,expects:"string",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:De(this,"type",t,r),t}}}function gi(e){let t;if(e)for(let r of e)if(t)for(let n of r.issues)t.push(n);else t=r.issues;return t}function Dn(e,t){return{kind:"schema",type:"union",reference:Dn,expects:$n(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){let a,i,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];De(this,"type",r,n,{issues:gi(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];De(this,"type",r,n,{issues:gi(o)})}return r}}}function qt(){return{kind:"schema",type:"unknown",reference:qt,expects:"unknown",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function bi(e,t,r){return{kind:"schema",type:"variant",reference:bi,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return xe(this)},"~run"(n,a){let i=n.value;if(i&&typeof i=="object"){let o,s=0,l=this.key,c=[],f=(d,h)=>{for(let p of d.options){if(p.type==="variant")f(p,new Set(h).add(p.key));else{let g=!0,v=0;for(let _ of h){let S=p.entries[_];if(_ in i?S["~run"]({typed:!1,value:i[_]},dc).issues:S.type!=="exact_optional"&&S.type!=="optional"&&S.type!=="nullish"){g=!1,l!==_&&(s<v||s===v&&_ in i&&!(l in i))&&(s=v,l=_,c=[]),l===_&&c.push(p.entries[_].expects);break}v++}if(g){let _=p["~run"]({value:i},a);(!o||!o.typed&&_.typed)&&(o=_)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;De(this,"type",n,a,{input:i[l],expected:$n(c,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else De(this,"type",n,a);return n}}}function fc(...e){return{...e[0],pipe:e,get"~standard"(){return xe(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function ir(e,t,r){let n=e["~run"]({value:t},li(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var pc=e=>({ok:!0,err:!1,val:e}),hc=e=>({err:!0,ok:!1,val:e}),Mn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Ln(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let a=(o=t[n.data.participationKey])==null?void 0:o.value,i={};if(a===!0)for(let l of Mn(e)){let c=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(c)&&c.length===1&&(c=c[0]),(typeof c=="boolean"||typeof c=="string")&&(i[l.data.key]=c)}return{node_id:n.id,flow_session_id:r,participation:a,answers:i}}function gc(e,t){let r=Ln(e,t,""),n=Mn(e).map(i=>{let o=i.data.preApply,s=r==null?void 0:r.answers[i.data.key],l=i.type==="question-boolean"?typeof s=="boolean":i.data.options.some(c=>c.value===s);return{key:i.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),a=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(i=>i.valid)?"completed":"unavailable";return{status:a,hasHardConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="hard"):null,hasAdvisoryConcerns:a==="completed"?n.some(i=>!i.matched&&i.severity==="advisory"):null,answers:a==="completed"?n:[]}}function bc(e,t){let r=new Set(Mn(e).map(n=>n.data.key));for(let n of e)n.type==="pre-apply-result"&&(r.add(n.data.key),r.add(n.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([n])=>!r.has(n)))}var mc=()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return typeof e=="string"&&e.length>0?e:void 0}catch{return}},pt=class extends Error{constructor(){super("Aborted")}},or=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},vc=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let a in e){let i=e[a];i&&(n&&!n.has(a)||(r[a]=i.value))}return r},mi=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,a])=>a!==void 0&&a.type!=="integration"&&!r.has(n))},wc=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},vi=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let a=or(n,t);switch(typeof a){case"string":return{type:"string",value:a};case"number":return{type:"number",value:a};case"boolean":return{type:"boolean",value:a};default:console.warn(`Unexpected type for $context.${t.join(".")}`,a);return}}return r[e]},yc=e=>{let t=e.split(".").pop();return t?pc(t?"."+t:""):hc("No file extension found")},Or=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let a=yc(n.name);return a.ok&&r.includes(a.val.toLowerCase())})},jn={".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".rtf":"application/rtf",".odt":"application/vnd.oasis.opendocument.text",".txt":"text/plain",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png"},_c=e=>[...new Set([...e,...e.map(t=>jn[t.toLowerCase()]).filter(t=>t!==void 0)])].join(","),xc=64*1024,kc=1024,Sc=[208,207,17,224,161,177,26,225],Cc=[80,75,3,4],Fn=(e,t)=>t.every((r,n)=>e[n]===r),wi=(e,t,r=e.length)=>{let n=Array.from(t,i=>i.charCodeAt(0)),a=Math.min(r,e.length)-n.length;for(let i=0;i<=a;i++)if(Fn(e.subarray(i),n))return!0;return!1},Ec=e=>{if(wi(e,"%PDF-",kc))return".pdf";if(Fn(e,Sc))return".doc";if(Fn(e,Cc)&&wi(e,"word/"))return".docx"},$c=async(e,t)=>{if(Or([e],t))return e;let r=e.name.lastIndexOf(".");if((r===-1?"":e.name.slice(r).toLowerCase())in jn)return e;let n=Ec(new Uint8Array(await e.slice(0,xc).arrayBuffer()));return!n||!t.some(a=>a.toLowerCase()===n)?e:new File([e],`${e.name}${n}`,{type:jn[n],lastModified:e.lastModified})},Wt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Nr=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Ac=re({integration_response:re({data:re({redirect_url:we(),message:Se(St(we())),button_text:Se(St(we()))})})}),Pr=e=>ir(Ac,e).success,Ic=re({integration_response:re({status:Se(qt()),error:re({message:we(),data:Se(qt())})})}),yi=e=>ir(Ic,e).success,Tc=re({success:Me(!0),integration_response:re({data:re({outcome:Me("pending"),message:Se(qt())}),error:Se(pi())})}),Rr=e=>{let t=ir(Tc,e);if(!t.success||Pr(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};re({success:Me(!1),message:Se(qt())});var Dc=re({error:Me("Validation failed"),messages:re({})}),Mc=(e,t)=>t===422&&ir(Dc,e).success,On=(e,t)=>{if(!yi(e))return;let r=e.integration_response,n=r.error.data,a=typeof n=="object"&&n!==null?n:{},i=g=>typeof a[g]=="string"?a[g]:void 0,o=g=>typeof a[g]=="boolean"?a[g]:void 0,s=g=>{let v=a[g];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=g=>{let v=i(g),_=v===void 0?NaN:Date.parse(v);return Number.isFinite(_)?_:void 0},c=typeof r.status=="number"?r.status:t,f=i("phase"),d=i("verdict"),h=i("code"),p=c===409&&f==="submit"&&d==="confirmed"?"duplicate":c===410&&h==="job_closed"?"closed":f==="submit"&&d==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:d,code:h,reason:i("reason"),maintenanceUntil:l("maintenance_until"),field:i("field"),outcome:p}},Lc=bi("reason",[re({outcome:Me("sent"),reason:Me("sandbox"),ats_label:St(we())}),re({outcome:Me("held"),reason:hi(["production_connection","no_sandbox_known","company_hold"]),ats_label:St(we())}),re({outcome:Me("internal"),reason:Me("internal"),ats_label:St(we())}),re({outcome:Me("held"),reason:Me("redirect"),ats_label:we()})]),jc=e=>{let t=ir(re({staging_destination:Lc}),e);if(!t.success)return;let r=t.output.staging_destination;switch(r.reason){case"sandbox":return`Staging: sent to ${r.ats_label===null?"the ATS":r.ats_label} sandbox`;case"production_connection":return"Staging: held, production connection";case"no_sandbox_known":return"Staging: held, no sandbox known";case"company_hold":return"Staging: held, company set to hold all";case"internal":return"Staging: saved in inploi (no ATS)";case"redirect":return`Staging: held, redirect to ${r.ats_label}`}},_i=3e4,Fc=2e4,Oc=6e4,Nn=12e4,xi=360*6e4,ki=60*6e4,Si=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,r=t===void 0?0:t-Date.now();return r>0&&r<=xi?t:void 0},Nc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Si(e);return t===void 0?{}:{until:t}},Ci=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Pc=(e,t)=>{let r=Si(t);if(r!==void 0)return{waitMs:r-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:_i};let n=(e??0)+1,a=Math.min(n*Fc,Oc),i=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(a,i),Nn),throttles:n}},Ei=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Rc=e=>{if(!yi(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Vc=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",Bc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",zc=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,Uc=(e,t)=>{if(typeof e!="object"||e===null)return null;let r=e.integration_response;if(typeof r!="object"||r===null){if(t===void 0)return null;let l="code"in e&&typeof e.code=="string"?e.code:void 0;return{service:"API",response:{status:t,payload:l===void 0?{}:{code:l}}}}let n=r;if(typeof n.status!="number"||n.service!==void 0&&typeof n.service!="string")return null;let a="data"in n,i=n.error,o=typeof i=="object"&&i!==null&&typeof i.message=="string"&&"data"in i;if(!a&&!o)return null;let s=a?n.data:i.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Rr(e)&&{outcome:"pending"}}},qc=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},Wc=(e,t)=>{if(!qc(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},Hc=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{if(typeof n.result!="string"||!n.result)return r(new Error("Invalid file"));t(n.result)},n.onerror=r,n.readAsDataURL(e)}),$i=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Pn=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let a=e[r];return[r,$i(a)&&$i(n)?Pn(a,n):n]}))}:t,Kc=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let a=t[n];if(!a)continue;let i=or(e,n.split("."));if(a.required&&i==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(i!=null)switch(a.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:a.type}}},Ai={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb",lincolnshire:"gb",surrey:"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm",kosovo:"xk",xk:"xk"},Gc=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
15
|
+
indexedDB serviceWorker clipboard cookie`,Fl=["The operation is insecure.","The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.","The user aborted a request.","The operation was aborted.","signal is aborted without reason","Fetch is aborted","The quota has been exceeded.","The object is in an invalid state.","The string did not match the expected pattern.","The object can not be found here.","The operation is not supported.","The database connection is closing.","The transaction has finished.","The transaction is not active.","The transaction was aborted, so the request cannot be fulfilled.","One of the specified object stores was not found.","Connection to Indexed Database server lost. Refresh the page to try again","Attempt to get a record from database without an in-progress transaction","Database deleted by request of the user","An internal error was encountered in the Indexed Database server","Internal error opening backing store for indexedDB.open.","Access is denied for this document.","Access to the IndexedDB API is denied in this context.","The document is sandboxed and lacks the 'allow-same-origin' flag.","The play() request was interrupted by a call to pause().","The play() request was interrupted because the media was removed from the document.","play() failed because the user didn't interact with the document first.","The network connection was lost.","The request timed out.","The Internet connection appears to be offline.","A server with the specified hostname could not be found.","Network request failed","Illegal invocation","cancelled"],Ol=/^Failed to (?:execute|read|set|construct) (?:the )?'([\w$]{1,40})'(?: (?:on|property (?:from|on)|from) '([\w$]{1,40})')?(?:: (.*))?$/,ia,Nl=e=>{let{apis:t,sentences:r}=ia??(ia={apis:new Set(jl.split(/\s+/)),sentences:new Set(Fl)});if(r.has(e))return e;let n=Ol.exec(e);if(!n)return"";let[,i,a,o]=n;return t.has(i)&&(a===void 0||t.has(a))&&(o===void 0||r.has(o))?e:""},Pl=/^\s*at\s|@(?:[a-z][\w+.-]*:\/\/|\[native code\])/i,Rl=/\b(?:chrome|moz|safari|safari-web|ms-browser)-extension:\/\//,Vl=/\[native code\]|<anonymous>|\(native\)/,Bl=e=>Rl.test(e)?"extension":Vl.test(e)?"native":"script",aa=/^(Failed to fetch dynamically imported module|error loading dynamically imported module)/,zl=/^((?:[\w-]{1,20}\/){0,3}[\w.-]{1,80}\.js)(?:\?retry=\d{1,3})?:(\d{1,7})(?::(\d{1,7}))?\)?$/,Ul=/^ResizeObserver loop (?:completed with undelivered notifications\.|limit exceeded)$/,ql=({error:e,message:t})=>e==null&&Ul.test(t),jr=e=>e instanceof Error?Ve.has(e.name)?e.name:"Error":typeof e,Wl=new Set(["DOMException","Object","Array","Promise","Event","ErrorEvent","PromiseRejectionEvent","ProgressEvent","CloseEvent","MessageEvent","Response","Request","XMLHttpRequest"]),Hl=e=>{var n,i;let t=e===null?"null":typeof e,r={message:"",stack:"",thrown:{type:t,ctor:"",keys:0,message_length:0,stack_lines:0}};if(typeof e=="string")return{...r,thrown:{...r.thrown,message_length:e.length}};if(typeof e!="object"||e===null)return r;try{let{message:a,stack:o}=e,s=(i=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor)==null?void 0:i.name,l=typeof s!="string"?"":Ve.has(s)||Wl.has(s)?s:"other",c=typeof a=="string"?a:"",f=typeof o=="string"?o:"";return{message:e instanceof Error||Ve.has(l)||l==="DOMException"?c:"",stack:f,thrown:{type:t,ctor:l,keys:Object.keys(e).length,message_length:c.length,stack_lines:f?f.split(`
|
|
16
|
+
`,1e3).length:0}}}catch{return r}},Kl=(e,t,r="")=>{let n=jr(e),{message:i,stack:a,thrown:o}=Hl(e),s=(e==null?r:i).slice(0,300),l=Ut.some(h=>h.test(s))?s:aa.test(s)?aa.exec(s)[1]:Nl(s),c=[],f=new Set;for(let h of a.split(`
|
|
17
|
+
`,60)){let p=h.indexOf(t),g=p!==-1&&(p===0||" (@".includes(h[p-1])),v=g?zl.exec(h.slice(p+t.length).trim()):null;v?c.push([v[1],v[2],v[3]].filter(Boolean).join(":")):g?f.add("build"):Pl.test(h)&&f.add(Bl(h))}c.splice(10);let u={name:n,message:l,stack:c,foreign:[...f].sort(),thrown:o};for(;JSON.stringify(u).length>1400&&u.stack.length;)u.stack.pop();return u},oa="inploi-candidate-beacon-seed",Gl=()=>{try{return typeof sessionStorage>"u"?void 0:sessionStorage}catch{return}},Yl=()=>({host:"s2811583.eu-central-1a.betterstackdata.com",token:"LHJqsZXu82MrkgUP44JHAwvU",sampleRate:Math.min(1,Math.max(0,1))}),sa=e=>{let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);t=Math.imul(t^i,2654435761),r=Math.imul(r^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0)},Jl=(e,t)=>{try{let r=e==null?void 0:e.getItem(oa);if(r)return r;let n=t();return e==null||e.setItem(oa,n),n}catch{return t()}},Zl=[["facebook",/\bFB(?:AN|AV|_IAB)\b/],["instagram",/\bInstagram (\d+)/],["linkedin",/\bLinkedInApp\b/],["tiktok",/\b(?:musical_ly|BytedanceWebview|TikTok)\b/],["samsung",/\bSamsungBrowser\/(\d+)/],["edge",/\bEdg(?:e|A|iOS)?\/(\d+)/],["opera",/\bOPR\/(\d+)/],["firefox",/\b(?:Firefox|FxiOS)\/(\d+)/],["chrome",/\b(?:Chrome|CriOS)\/(\d+)/],["safari",/\bVersion\/(\d+)[\d.]* (?:Mobile\/\S+ )?Safari\//]],Xl=[["ios",/\b(?:iPhone|iPad|iPod)\b/],["android",/\bAndroid\b/],["windows",/\bWindows\b/],["chromeos",/\bCrOS\b/],["mac",/\bMacintosh\b/],["linux",/\bLinux\b/]],Ql=e=>{var n,i;let t=Zl.find(([,a])=>a.test(e)),r=(n=t==null?void 0:t[1].exec(e))==null?void 0:n[1];return{browser:t?[t[0],r].filter(Boolean).join(" "):"other",platform:((i=Xl.find(([,a])=>a.test(e)))==null?void 0:i[0])??"other"}},ec=(e=typeof document>"u"?void 0:document)=>{var a,o;let t=()=>typeof performance>"u"?0:Math.round(performance.now()),r=(e==null?void 0:e.visibilityState)==="hidden"?t():null,n=null,i=!1;return e==null||e.addEventListener("visibilitychange",()=>{e.visibilityState==="hidden"?r=t():r!==null&&(n=t())}),(a=e==null?void 0:e.defaultView)==null||a.addEventListener("pagehide",()=>i=!0),(o=e==null?void 0:e.defaultView)==null||o.addEventListener("pageshow",()=>i=!1),()=>{var c;let s=typeof navigator>"u"?void 0:navigator,l=(c=s==null?void 0:s.connection)==null?void 0:c.effectiveType;return{visibility:(e==null?void 0:e.visibilityState)??"unknown",was_hidden:r!==null,hidden_at_ms:r,shown_at_ms:n,unloading:i,online:typeof(s==null?void 0:s.onLine)=="boolean"?s.onLine:null,connection:typeof l=="string"?l.slice(0,8):null,...Ql((s==null?void 0:s.userAgent)??""),page_ms:t()}}},tc=new Set(["boot_failed","fatal","submit_blocked"]),rc=(e,t,r)=>{if(t.unloading||t.visibility==="hidden")return!0;if(e!=="boot_failed"||t.hidden_at_ms===null)return!1;if(r.elapsed_ms===void 0)return!0;let n=t.page_ms-r.elapsed_ms;return t.hidden_at_ms>=n||t.shown_at_ms!==null&&t.shown_at_ms>=n},nc=(e,t,r,n,i)=>{var o;if(t)return"abandoned";if(i.online===!1)return"offline";let a=[n.phase,n.stage,r==null?void 0:r.slice(0,40),n.http_status??((o=n.error)==null?void 0:o.name)];return[...new Set(a.filter(s=>s!==void 0&&s!=="").map(String))].join(":")||e},ic=({config:e,version:t,env:r,seed:n,automated:i=typeof navigator<"u"&&navigator.webdriver===!0,company:a,page:o=ec(),now:s=Date.now,post:l=(c,f)=>fetch(c,f)})=>{let c=sa(n),f=s(),u=e!==void 0&&c%1e4<e.sampleRate*1e4,h=new Set;return{send:(p,g,v={})=>{if(!e||!u||!t)return;let _=o(),S=tc.has(p),x=S&&rc(p,_,v),L=x?`${p}:abandoned`:p;if(h.has(L))return;h.add(L);let{error:j,...F}=v,V={dt:new Date(s()).toISOString(),message:"Candidate widget beacon",kind:p,version:t,company_slug:(a==null?void 0:a())??null,env:r==="production"?"production":"staging",mode:i?"test":"live",seed_hash:c.toString(36),sample_rate:e.sampleRate,...g&&{reason:g.slice(0,40)},...S&&{abandoned:x,cause:nc(p,x,g,v,_).slice(0,60)},since_start_ms:Math.max(0,Math.round(s()-f)),..._,...F,...j&&{error:j,error_message:j.message,error_frame:j.stack[0]??null}};l(`https://${e.host}`,{method:"POST",keepalive:!0,headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(V)}).catch(()=>{})}}},He,ac={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function la(e){return!e&&!He?ac:{lang:(e==null?void 0:e.lang)??(He==null?void 0:He.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(He==null?void 0:He.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(He==null?void 0:He.abortPipeEarly)}}var kn;function oc(e){return kn==null?void 0:kn.get(e)}var Sn;function sc(e){return Sn==null?void 0:Sn.get(e)}var Cn;function lc(e,t){var r;return(r=Cn==null?void 0:Cn.get(e))==null?void 0:r.get(t)}function En(e){var r,n;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function De(e,t,r,n,i){let a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??En(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??lc(e.reference,l.lang)??(c?sc(l.lang):null)??n.message??oc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}var ca=new WeakMap;function xe(e){let t=ca.get(e);return t||(t={version:1,vendor:"valibot",validate(r){return e["~run"]({value:r},la())}},ca.set(e,t)),t}function cc(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function $n(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function ua(e){return{kind:"transformation",type:"transform",reference:ua,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}var uc={abortEarly:!0};function dc(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function An(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function da(){return{kind:"schema",type:"any",reference:da,expects:"any",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function fa(e,t){return{kind:"schema",type:"array",reference:fa,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){var a;let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){let s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){let c={type:"array",origin:"value",input:i,key:o,value:s};for(let f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else De(this,"type",r,n);return r}}}function In(e){return{kind:"schema",type:"boolean",reference:In,expects:"boolean",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:De(this,"type",t,r),t}}}function Me(e,t){return{kind:"schema",type:"literal",reference:Me,expects:En(e),async:!1,literal:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:De(this,"type",r,n),r}}}function pa(e){return{kind:"schema",type:"null",reference:pa,expects:"null",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return t.value===null?t.typed=!0:De(this,"type",t,r),t}}}function St(e,t){return{kind:"schema",type:"nullable",reference:St,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Fr(e){return{kind:"schema",type:"number",reference:Fr,expects:"number",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:De(this,"type",t,r),t}}}function re(e,t){return{kind:"schema",type:"object",reference:re,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){var a;let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let o in this.entries){let s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){let l=o in i?i[o]:An(s),c=s["~run"]({value:l},n);if(c.issues){let f={type:"object",origin:"value",input:i,key:o,value:l};for(let u of c.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=dc(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(De(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else De(this,"type",r,n);return r}}}function Se(e,t){return{kind:"schema",type:"optional",reference:Se,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=An(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ha(e,t){return{kind:"schema",type:"picklist",reference:ha,expects:$n(e.map(En),"|"),async:!1,options:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:De(this,"type",r,n),r}}}function Tn(e,t,r){return{kind:"schema",type:"record",reference:Tn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return xe(this)},"~run"(n,i){var o,s;let a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(let l in a)if(cc(a,l)){let c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){let h={type:"object",origin:"key",input:a,key:l,value:c};for(let p of f.issues)p.path=[h],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:c},i);if(u.issues){let h={type:"object",origin:"value",input:a,key:l,value:c};for(let p of u.issues)p.path?p.path.unshift(h):p.path=[h],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else De(this,"type",n,i);return n}}}function we(e){return{kind:"schema",type:"string",reference:we,expects:"string",async:!1,message:e,get"~standard"(){return xe(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:De(this,"type",t,r),t}}}function ga(e){let t;if(e)for(let r of e)if(t)for(let n of r.issues)t.push(n);else t=r.issues;return t}function Dn(e,t){return{kind:"schema",type:"union",reference:Dn,expects:$n(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return xe(this)},"~run"(r,n){let i,a,o;for(let s of this.options){let l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];De(this,"type",r,n,{issues:ga(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];De(this,"type",r,n,{issues:ga(o)})}return r}}}function qt(){return{kind:"schema",type:"unknown",reference:qt,expects:"unknown",async:!1,get"~standard"(){return xe(this)},"~run"(e){return e.typed=!0,e}}}function ba(e,t,r){return{kind:"schema",type:"variant",reference:ba,expects:"Object",async:!1,key:e,options:t,message:r,get"~standard"(){return xe(this)},"~run"(n,i){let a=n.value;if(a&&typeof a=="object"){let o,s=0,l=this.key,c=[],f=(u,h)=>{for(let p of u.options){if(p.type==="variant")f(p,new Set(h).add(p.key));else{let g=!0,v=0;for(let _ of h){let S=p.entries[_];if(_ in a?S["~run"]({typed:!1,value:a[_]},uc).issues:S.type!=="exact_optional"&&S.type!=="optional"&&S.type!=="nullish"){g=!1,l!==_&&(s<v||s===v&&_ in a&&!(l in a))&&(s=v,l=_,c=[]),l===_&&c.push(p.entries[_].expects);break}v++}if(g){let _=p["~run"]({value:a},i);(!o||!o.typed&&_.typed)&&(o=_)}}if(o&&!o.issues)break}};if(f(this,new Set([this.key])),o)return o;De(this,"type",n,i,{input:a[l],expected:$n(c,"|"),path:[{type:"object",origin:"value",input:a,key:l,value:a[l]}]})}else De(this,"type",n,i);return n}}}function fc(...e){return{...e[0],pipe:e,get"~standard"(){return xe(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function ar(e,t,r){let n=e["~run"]({value:t},la(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var pc=e=>({ok:!0,err:!1,val:e}),hc=e=>({err:!0,ok:!1,val:e}),Mn=e=>e.filter(t=>(t.type==="question-boolean"||t.type==="question-enum")&&!!t.data.preApply);function Ln(e,t,r){var o,s;let n=e.find(l=>l.type==="pre-apply-result");if(!n)return;let i=(o=t[n.data.participationKey])==null?void 0:o.value,a={};if(i===!0)for(let l of Mn(e)){let c=(s=t[l.data.key])==null?void 0:s.value;Array.isArray(c)&&c.length===1&&(c=c[0]),(typeof c=="boolean"||typeof c=="string")&&(a[l.data.key]=c)}return{node_id:n.id,flow_session_id:r,participation:i,answers:a}}function gc(e,t){let r=Ln(e,t,""),n=Mn(e).map(a=>{let o=a.data.preApply,s=r==null?void 0:r.answers[a.data.key],l=a.type==="question-boolean"?typeof s=="boolean":a.data.options.some(c=>c.value===s);return{key:a.data.key,severity:o.severity,message:o.mismatchMessage,matched:l&&s===o.expectedValue,valid:l}}),i=(r==null?void 0:r.participation)===!1?"skipped":(r==null?void 0:r.participation)===!0&&n.length>0&&n.every(a=>a.valid)?"completed":"unavailable";return{status:i,hasHardConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="hard"):null,hasAdvisoryConcerns:i==="completed"?n.some(a=>!a.matched&&a.severity==="advisory"):null,answers:i==="completed"?n:[]}}function bc(e,t){let r=new Set(Mn(e).map(n=>n.data.key));for(let n of e)n.type==="pre-apply-result"&&(r.add(n.data.key),r.add(n.data.participationKey));return Object.fromEntries(Object.entries(t).filter(([n])=>!r.has(n)))}var mc=()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return typeof e=="string"&&e.length>0?e:void 0}catch{return}},pt=class extends Error{constructor(){super("Aborted")}},or=(e,t)=>{if(t.length===0)return;let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n]}return r},vc=(e,t="all")=>{let r={},n=t==="all"?null:new Set(t);for(let i in e){let a=e[i];a&&(n&&!n.has(i)||(r[i]=a.value))}return r},ma=(e,t)=>{let r=new Set(e.flatMap(n=>n.type==="add-submission"?[n.data.key]:[]));return Object.entries(t).some(([n,i])=>i!==void 0&&i.type!=="integration"&&!r.has(n))},wc=({key:e,submissions:t})=>{var n;let r=(n=t[e])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r},va=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;let i=or(n,t);switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r[e]},yc=e=>{let t=e.split(".").pop();return t?pc(t?"."+t:""):hc("No file extension found")},Or=(e,t)=>{if(t.length===0)return!0;let r=t.map(n=>n.toLowerCase());return e.every(n=>{let i=yc(n.name);return i.ok&&r.includes(i.val.toLowerCase())})},jn={".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".rtf":"application/rtf",".odt":"application/vnd.oasis.opendocument.text",".txt":"text/plain",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png"},_c=e=>[...new Set([...e,...e.map(t=>jn[t.toLowerCase()]).filter(t=>t!==void 0)])].join(","),xc=64*1024,kc=1024,Sc=[208,207,17,224,161,177,26,225],Cc=[80,75,3,4],Fn=(e,t)=>t.every((r,n)=>e[n]===r),wa=(e,t,r=e.length)=>{let n=Array.from(t,a=>a.charCodeAt(0)),i=Math.min(r,e.length)-n.length;for(let a=0;a<=i;a++)if(Fn(e.subarray(a),n))return!0;return!1},Ec=e=>{if(wa(e,"%PDF-",kc))return".pdf";if(Fn(e,Sc))return".doc";if(Fn(e,Cc)&&wa(e,"word/"))return".docx"},$c=async(e,t)=>{if(Or([e],t))return e;let r=e.name.lastIndexOf(".");if((r===-1?"":e.name.slice(r).toLowerCase())in jn)return e;let n=Ec(new Uint8Array(await e.slice(0,xc).arrayBuffer()));return!n||!t.some(i=>i.toLowerCase()===n)?e:new File([e],`${e.name}${n}`,{type:jn[n],lastModified:e.lastModified})},Wt=e=>e<=1e3?`${Math.round(e)}KB`:e<1e3*10?`${(e/1e3).toFixed(1)}MB`:`${Math.round(e/1e3)}MB`,Nr=e=>typeof e=="string"?e:`+${e.countryCode} ${e.phoneNumber}`,Ac=re({integration_response:re({data:re({redirect_url:we(),message:Se(St(we())),button_text:Se(St(we()))})})}),Pr=e=>ar(Ac,e).success,Ic=re({integration_response:re({status:Se(qt()),error:re({message:we(),data:Se(qt())})})}),ya=e=>ar(Ic,e).success,Tc=re({success:Me(!0),integration_response:re({data:re({outcome:Me("pending"),message:Se(qt())}),error:Se(pa())})}),Rr=e=>{let t=ar(Tc,e);if(!t.success||Pr(e))return;let{message:r}=t.output.integration_response.data;return typeof r=="string"&&r.trim()?{message:r}:{}};re({success:Me(!1),message:Se(qt())});var Dc=re({error:Me("Validation failed"),messages:re({})}),Mc=(e,t)=>t===422&&ar(Dc,e).success,On=(e,t)=>{if(!ya(e))return;let r=e.integration_response,n=r.error.data,i=typeof n=="object"&&n!==null?n:{},a=g=>typeof i[g]=="string"?i[g]:void 0,o=g=>typeof i[g]=="boolean"?i[g]:void 0,s=g=>{let v=i[g];return Number.isSafeInteger(v)&&v>=0?v:void 0},l=g=>{let v=a(g),_=v===void 0?NaN:Date.parse(v);return Number.isFinite(_)?_:void 0},c=typeof r.status=="number"?r.status:t,f=a("phase"),u=a("verdict"),h=a("code"),p=c===409&&f==="submit"&&u==="confirmed"?"duplicate":c===410&&h==="job_closed"?"closed":f==="submit"&&u==="unknown"?"unknown":void 0;return{message:r.error.message,status:c,phase:f,providerStatus:s("provider_status"),retryAfterSeconds:s("retry_after_seconds"),retryable:o("retryable"),verdict:u,code:h,reason:a("reason"),maintenanceUntil:l("maintenance_until"),field:a("field"),outcome:p}},Lc=ba("reason",[re({outcome:Me("sent"),reason:Me("sandbox"),ats_label:St(we())}),re({outcome:Me("held"),reason:ha(["production_connection","no_sandbox_known","company_hold"]),ats_label:St(we())}),re({outcome:Me("internal"),reason:Me("internal"),ats_label:St(we())}),re({outcome:Me("held"),reason:Me("redirect"),ats_label:we()})]),jc=e=>{let t=ar(re({staging_destination:Lc}),e);if(!t.success)return;let r=t.output.staging_destination;switch(r.reason){case"sandbox":return`Staging: sent to ${r.ats_label===null?"the ATS":r.ats_label} sandbox`;case"production_connection":return"Staging: held, production connection";case"no_sandbox_known":return"Staging: held, no sandbox known";case"company_hold":return"Staging: held, company set to hold all";case"internal":return"Staging: saved in inploi (no ATS)";case"redirect":return`Staging: held, redirect to ${r.ats_label}`}},_a=3e4,Fc=2e4,Oc=6e4,Nn=12e4,xa=360*6e4,ka=60*6e4,Sa=e=>{let t=(e==null?void 0:e.reason)==="provider_maintenance"?e.maintenanceUntil:void 0,r=t===void 0?0:t-Date.now();return r>0&&r<=xa?t:void 0},Nc=e=>{if((e==null?void 0:e.reason)!=="provider_maintenance"||e.outcome==="unknown")return;let t=Sa(e);return t===void 0?{}:{until:t}},Ca=(e,t)=>new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).format(e),Pc=(e,t)=>{let r=Sa(t);if(r!==void 0)return{waitMs:r-Date.now(),throttles:(e??0)+1,maintenance:!0};if(!((t==null?void 0:t.reason)==="provider_maintenance"||(t==null?void 0:t.retryable)===!0&&(t.providerStatus===429||t.providerStatus!==void 0&&t.providerStatus>=500||t.phase==="workflow"&&t.verdict==="not_submitted")))return{waitMs:_a};let n=(e??0)+1,i=Math.min(n*Fc,Oc),a=(t.retryAfterSeconds??0)*1e3;return{waitMs:Math.min(Math.max(i,a),Nn),throttles:n}},Ea=e=>(e==null?void 0:e.code)==="captcha_failed"&&e.verdict==="not_submitted",Rc=e=>{if(!ya(e))return!1;let t=e.integration_response.error.data;return typeof t=="object"&&t!==null&&"fallback"in t&&t.fallback==="contact"},Vc=e=>((e==null?void 0:e.phase)==="workflow"||(e==null?void 0:e.phase)==="authentication"||(e==null?void 0:e.code)==="captcha_failed")&&e.retryable===!0&&e.verdict==="not_submitted",Bc=e=>(e==null?void 0:e.outcome)==="unknown"&&e.code==="repeatable_provider_crash",zc=e=>(e==null?void 0:e.phase)==="submit"&&e.verdict==="confirmed"&&e.code==="unreadable_document"&&typeof e.field=="string"&&e.status!==void 0&&e.status>=400&&e.status<500?e.field:void 0,Uc=(e,t)=>{if(typeof e!="object"||e===null)return null;let r=e.integration_response;if(typeof r!="object"||r===null){if(t===void 0)return null;let l="code"in e&&typeof e.code=="string"?e.code:void 0;return{service:"API",response:{status:t,payload:l===void 0?{}:{code:l}}}}let n=r;if(typeof n.status!="number"||n.service!==void 0&&typeof n.service!="string")return null;let i="data"in n,a=n.error,o=typeof a=="object"&&a!==null&&typeof a.message=="string"&&"data"in a;if(!i&&!o)return null;let s=i?n.data:a.data??null;return{service:n.service??"INVALID_SERVICE",response:{status:n.status,payload:s},...Rr(e)&&{outcome:"pending"}}},qc=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isFinite(t.getTime())&&t.toISOString().slice(0,10)===e},Wc=(e,t)=>{if(!qc(e))throw new RangeError("Invalid ISO calendar date");return new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}).format(new Date(`${e}T00:00:00Z`))},Hc=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{if(typeof n.result!="string"||!n.result)return r(new Error("Invalid file"));t(n.result)},n.onerror=r,n.readAsDataURL(e)}),$a=e=>typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Pn=(e,t)=>e?{...e,...Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>{let i=e[r];return[r,$a(i)&&$a(n)?Pn(i,n):n]}))}:t,Kc=({context:e,schema:t,logger:r})=>{if(t)for(let n in t){let i=t[n];if(!i)continue;let a=or(e,n.split("."));if(i.required&&a==null){let o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}if(a!=null)switch(i.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},Aa={uk:"gb","great britain":"gb",england:"gb",scotland:"gb",wales:"gb","northern ireland":"gb",lincolnshire:"gb",surrey:"gb","republic of ireland":"ie",eire:"ie","hong kong sar":"hk","united states of america":"us",turkey:"tr","czech republic":"cz",burma:"mm",kosovo:"xk",xk:"xk"},Gc=`adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel
|
|
18
18
|
bfbfa bgbgr bhbhr bibdi bjben blblm bmbmu bnbrn bobol bqbes brbra bsbhs btbtn bvbvt bwbwa byblr bzblz cacan cccck cdcod
|
|
19
19
|
cfcaf cgcog chche ciciv ckcok clchl cmcmr cnchn cocol crcri cucub cvcpv cwcuw cxcxr cycyp czcze dedeu djdji dkdnk dmdma
|
|
20
20
|
dodom dzdza ececu eeest egegy ehesh ereri esesp eteth fifin fjfji fkflk fmfsm fofro frfra gagab gbgbr gdgrd gegeo gfguf
|
|
@@ -26,12 +26,12 @@ ncncl nener nfnfk ngnga ninic nlnld nonor npnpl nrnru nuniu nznzl omomn papan pe
|
|
|
26
26
|
pnpcn prpri pspse ptprt pwplw pypry qaqat rereu rorou rssrb rurus rwrwa sasau sbslb scsyc sdsdn seswe sgsgp shshn sisvn
|
|
27
27
|
sjsjm sksvk slsle smsmr snsen sosom srsur ssssd ststp svslv sxsxm sysyr szswz tctca tdtcd tfatf tgtgo ththa tjtjk tktkl
|
|
28
28
|
tltls tmtkm tntun toton trtur tttto tvtuv twtwn tztza uaukr uguga umumi ususa uyury uzuzb vavat vcvct veven vgvgb vivir
|
|
29
|
-
vnvnm vuvut wfwlf wswsm yeyem ytmyt zazaf zmzmb zwzwe`,Ct,Yc=()=>{if(Ct)return Ct;Ct=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of Gc.split(/\s+/)){let r=t.slice(0,2),n=e.of(r.toUpperCase());n&&Ct.set(n.toLowerCase(),r),Ct.set(r,r),Ct.set(t.slice(2),r)}return Ct},Jc=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Ai,t))return Ai[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return Yc().get(r)},Zc=e=>[...new Set(e.flatMap(t=>Jc(t)??[]))].sort();let Ke;const Xc={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Vr(e){return!e&&!Ke?Xc:{lang:(e==null?void 0:e.lang)??(Ke==null?void 0:Ke.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ke==null?void 0:Ke.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ke==null?void 0:Ke.abortPipeEarly)}}let Rn;function Qc(e){return Rn==null?void 0:Rn.get(e)}let Vn;function ed(e){return Vn==null?void 0:Vn.get(e)}let Bn;function td(e,t){var r;return(r=Bn==null?void 0:Bn.get(e))==null?void 0:r.get(t)}function Et(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function he(e,t,r,n,a){const i=a&&"input"in a?a.input:r.value,o=(a==null?void 0:a.expected)??e.expects??null,s=(a==null?void 0:a.received)??Et(i),l={kind:e.kind,type:e.type,input:i,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??td(e.reference,l.lang)??(c?ed(l.lang):null)??n.message??Qc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}const Ii=new WeakMap;function Ce(e){let t=Ii.get(e);return t||(t={version:1,vendor:"valibot",validate(r){return e["~run"]({value:r},Vr())}},Ii.set(e,t)),t}function rd(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Ti(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function nd(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Di=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};const ad=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Mi(e,t){return{kind:"validation",type:"check",reference:Mi,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&he(this,"input",r,n),r}}}function zn(e){return{kind:"validation",type:"email",reference:zn,expects:null,async:!1,requirement:ad,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&he(this,"email",t,r),t}}}function $t(e,t){return{kind:"validation",type:"max_length",reference:$t,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&he(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Li(e,t){return{kind:"validation",type:"max_value",reference:Li,async:!1,expects:`<=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&he(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function et(e,t){return{kind:"validation",type:"min_length",reference:et,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&he(this,"length",r,n,{received:`${r.value.length}`}),r}}}function ji(e,t){return{kind:"validation",type:"min_value",reference:ji,async:!1,expects:`>=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&he(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function Un(e,t){return{kind:"validation",type:"regex",reference:Un,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&he(this,"format",r,n),r}}}function Br(e){return{kind:"transformation",type:"transform",reference:Br,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function qn(){return{kind:"transformation",type:"trim",reference:qn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Fi(e){return{kind:"validation",type:"url",reference:Fi,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&he(this,"URL",t,r),t}}}function id(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function zr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function sr(e,t){return{kind:"schema",type:"array",reference:sr,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){var i;const a=r.value;if(Array.isArray(a)){r.typed=!0,r.value=[];for(let o=0;o<a.length;o++){const s=a[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:a,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(i=r.issues)==null||i.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else he(this,"type",r,n);return r}}}function Ur(e){return{kind:"schema",type:"boolean",reference:Ur,expects:"boolean",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:he(this,"type",t,r),t}}}function Oi(e,t){return{kind:"schema",type:"literal",reference:Oi,expects:Et(e),async:!1,literal:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:he(this,"type",r,n),r}}}function J(e,t){return{kind:"schema",type:"nullable",reference:J,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function tt(e,t){return{kind:"schema",type:"nullish",reference:tt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Re(e){return{kind:"schema",type:"number",reference:Re,expects:"number",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:he(this,"type",t,r),t}}}function te(e,t){return{kind:"schema",type:"object",reference:te,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){var i;const a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in a||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in a?a[o]:zr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:a,key:o,value:l};for(const d of c.issues)d.path?d.path.unshift(f):d.path=[f],(i=r.issues)==null||i.push(d);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=id(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(he(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:a,key:o,value:a[o]}]}),n.abortEarly))break}}else he(this,"type",r,n);return r}}}function Le(e,t){return{kind:"schema",type:"optional",reference:Le,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function rt(e,t){return{kind:"schema",type:"picklist",reference:rt,expects:Ti(e.map(Et),"|"),async:!1,options:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:he(this,"type",r,n),r}}}function lr(e,t,r){return{kind:"schema",type:"record",reference:lr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Ce(this)},"~run"(n,a){var o,s;const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const l in i)if(rd(i,l)){const c=i[l],f=this.key["~run"]({value:l},a);if(f.issues){const h={type:"object",origin:"key",input:i,key:l,value:c};for(const p of f.issues)p.path=[h],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),a.abortEarly){n.typed=!1;break}}const d=this.value["~run"]({value:c},a);if(d.issues){const h={type:"object",origin:"value",input:i,key:l,value:c};for(const p of d.issues)p.path?p.path.unshift(h):p.path=[h],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=d.issues),a.abortEarly){n.typed=!1;break}}(!f.typed||!d.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=d.value)}}else he(this,"type",n,a);return n}}}function M(e){return{kind:"schema",type:"string",reference:M,expects:"string",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:he(this,"type",t,r),t}}}function Ni(e){let t;if(e)for(const r of e)if(t)for(const n of r.issues)t.push(n);else t=r.issues;return t}function Pi(e,t){return{kind:"schema",type:"union",reference:Pi,expects:Ti(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){let a,i,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{a=l;break}else o?o.push(l):o=[l]}if(a)return a;if(i){if(i.length===1)return i[0];he(this,"type",r,n,{issues:Ni(i)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];he(this,"type",r,n,{issues:Ni(o)})}return r}}}function Ri(){return{kind:"schema",type:"unknown",reference:Ri,expects:"unknown",async:!1,get"~standard"(){return Ce(this)},"~run"(e){return e.typed=!0,e}}}function Vi(e,t,r){const n=e["~run"]({value:t},Vr(r));if(n.issues)throw new Di(n.issues);return n.value}function od(e,t){const r={};for(const n in e.entries)r[n]=Le(e.entries[n]);return{...e,entries:r,get"~standard"(){return Ce(this)}}}function je(...e){return{...e[0],pipe:e,get"~standard"(){return Ce(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Wn(e,t,r){const n=e["~run"]({value:t},Vr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}async function sd(e,t,r){const n=await e["~run"]({value:t},Vr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var ld=e=>e,cd=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},dd=class extends cd{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},ud={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},fd=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16));function Hn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function sb(e){return e}var pd=["agent","sdk","form","integration","migration"],hd=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],gd=["screening","cv_match","interview","overall"],bd=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],md=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Bi=rt(pd),vd=rt(hd),wd=je(M(),qn(),et(1),$t(100)),yd=rt(gd),_d=rt(bd),xd=je(M(),qn(),et(1),$t(100)),kd=rt(md),zi=te({id:M(),email:J(M()),firstName:J(M()),lastName:J(M()),phone:J(M()),source:J(Bi),identifiedAt:J(M()),createdAt:M(),updatedAt:M()}),Ui=je(M(),et(1)),Kn=lr(M(),Ri()),Sd=te({id:M(),applicationId:M(),status:_d,scheduledAt:J(M()),completedAt:J(M()),meta:J(Kn),createdAt:M(),updatedAt:M()}),Cd=te({score:Re(),reason:M(),confidence:Re()}),qi=te({id:M(),candidateId:M(),jobId:Re(),stage:wd,stageGroup:vd,stageEnteredAt:M(),rating:J(Re()),disqualifiedAt:J(M()),disqualificationReason:J(xd),disqualificationNote:J(M()),source:kd,sourceDetail:J(M()),sessionId:J(Re()),externalApplicationId:J(M()),meta:J(Kn),context:J(Kn),scoredAt:J(M()),createdAt:M(),updatedAt:M()}),Ed=te({id:M(),applicationId:M(),scoreType:yd,score:J(Re()),reason:J(M()),categories:J(lr(M(),Cd)),scoredBy:J(M()),createdAt:M()});({...qi.entries},{...zi.entries});var $d=te({anonymousId:Ui,email:Ui,firstName:tt(M()),lastName:tt(M()),phone:tt(M()),source:tt(Bi)}),Ad=te({candidateId:M(),isNew:Ur()}),Id=te({id:M(),stageGroup:M(),createdAt:M()}),Td=te({isDuplicate:Ur(),existingApplication:Le(Id)}),Dd=({environment:e,publishableKey:t,logger:r})=>{let n=ud[e];return{async checkDuplicate(a){try{let i=new URLSearchParams({email:a.email,scope:a.scope});a.scope==="job"&&a.jobId!=null&&i.set("job_id",String(a.jobId));let o=await fetch(`${n}/applications/check-duplicate?${i}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Wn(Td,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(i){return r.error("[TalentBankClient] checkDuplicate failed:",i),{isDuplicate:!1}}},async identify(a){try{if(!a.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let i={email:a.email,firstName:a.firstName,lastName:a.lastName,phone:a.phone,anonymousId:a.anonymousId,source:a.source??"sdk"},o=Wn($d,i);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Wn(Ad,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(i){return r.error("[TalentBankClient] identify failed:",i),null}}}},Md=["DAILY","WEEKLY","MONTHLY"],Ld=lr(M(),Pi([M(),sr(M()),te({type:Oi("provided"),lat:Re(),lng:Re(),radius:Re(),unit:Le(rt(["miles","km"])),label:Le(M())})])),jd={pathname:"/job/:id",method:"GET",schema:{response:te({id:Re(),external_id:tt(M()),city:tt(M()),town:tt(M()),category:tt(M())})}};async function Fd(e,{contact:t,job:r}){var a;let n={};if(r){let i=await e.request(jd,{params:{id:r.id}});if((r.id_type==="internal"?String(i.id):i.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(a=i[o])==null?void 0:a.trim();s&&(n[o]=[s])}}await e.request(Od,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var Od={pathname:"/search/save",method:"POST",schema:{response:Hn(),body:te({contact:te({email:je(Le(M()),M(),zn()),first_name:Le(M()),last_name:Le(M())}),alerts:je(Le(M()),M(),rt(Md)),filters:Ld})}},Nd=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:je(te({country:Le(sr(te({value:M()})),[])}),Br(({country:r})=>r.map(({value:n})=>n))),searchParams:Hn()}};return e.request(t,{searchParams:{filters:{country:null}}})},qr=new WeakMap,Wi=e=>(qr.has(e)||(qr.set(e,void 0),Nd(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>ph);qr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),qr.get(e)),Pd=(e,t)=>{let r=new Set,n=[];for(let a=0;a<Math.max(e.length,t.length);a++)for(let i of[e[a],t[a]]){if(!i)continue;let o=i.mapbox_id||i.full_address||[i.name,i.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(i),n.length===5))return n}return n},Rd=600,Vd=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,a)=>{let i,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),a(r==null?void 0:r.reason)},d=()=>{c(),(i==null?void 0:i.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Pd(i.value,o.value)):(i==null?void 0:i.status)==="fulfilled"?n(i.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(i==null?void 0:i.status)==="rejected"&&a(i.reason)},h=(p,g)=>{l||(p?i=g:o=g,i&&o?d():g.status==="fulfilled"&&g.value.length>0&&(s=setTimeout(d,Rd)))};r==null||r.addEventListener("abort",f,{once:!0});for(let p of[!0,!1])e(p?t:void 0).then(g=>h(p,{status:"fulfilled",value:g}),g=>h(p,{status:"rejected",reason:g}))})},Hi=fc(Dn([we(),Fr()]),di(String)),Ki=re({id:Hi,version:Fr(),build:Fr(),nodes:fi(ui()),context_schema:Se(St(Tn(we(),re({required:In(),type:Dn([Me("string"),Me("number")])}))))}),Bd=re({flow:Ki}),zd=re({company:re({name:we()}),context:Se(Tn(we(),qt())),flow:Ki,job:re({id:Hi,title:we()}),user:Se(re({city:Se(we()),country:Se(we()),isEU:Se(In()),continent:Se(we())}))}),Ud=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),qd={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Hn(),response:zd}},Wd={pathname:"/flow/id/:id",method:"GET",schema:{response:Bd}},cr,R,Gi,Yi,At,Ji,Zi,Gn,Xi,Ht={},Qi=[],Hd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wr=Array.isArray;function nt(e,t){for(var r in t)e[r]=t[r];return e}function eo(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,a,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?cr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return dr(e,o,n,a,null)}function dr(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Gi};return a==null&&R.vnode!=null&&R.vnode(i),i}function Kd(){return{current:null}}function ce(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Hr(e,t){if(t==null)return e.__?Hr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Hr(e):null}function to(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return to(e)}}function Yn(e){(!e.__d&&(e.__d=!0)&&At.push(e)&&!Kr.__r++||Ji!==R.debounceRendering)&&((Ji=R.debounceRendering)||Zi)(Kr)}function Kr(){var e,t,r,n,a,i,o,s,l;for(At.sort(Gn);e=At.shift();)e.__d&&(t=At.length,n=void 0,a=void 0,i=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],a=[],(i=nt({},o)).__v=o.__v+1,Jn(l,o,i,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Hr(o),o.__h,a),lo(n,o,a),o.__e!=s&&to(o)),At.length>t&&At.sort(Gn));Kr.__r=0}function ro(e,t,r,n,a,i,o,s,l,c,f){var d,h,p,g,v,_,S,x,L,j,F=0,V=n&&n.__k||Qi,B=V.length,k=B,C=t.length;for(r.__k=[],d=0;d<C;d++)(g=r.__k[d]=(g=t[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?dr(null,g,null,null,g):Wr(g)?dr(ce,{children:g},null,null,null):g.__b>0?dr(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(x=Gd(g,V,S=d+F,k))===-1?p=Ht:(p=V[x]||Ht,V[x]=void 0,k--),Jn(e,g,p,a,i,o,s,l,c,f),v=g.__e,(h=g.ref)&&p.ref!=h&&(p.ref&&Zn(p.ref,null,g),f.push(h,g.__c||v,g)),v!=null&&(_==null&&(_=v),j=!(L=p===Ht||p.__v===null)&&x===S,L?x==-1&&F--:x!==S&&(x===S+1?(F++,j=!0):x>S?k>C-S?(F+=x-S,j=!0):F--:F=x<S&&x==S-1?x-S:0),S=d+F,j=j||x==d&&!L,typeof g.type!="function"||x===S&&p.__k!==g.__k?typeof g.type=="function"||j?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=ao(e,v,l):l=no(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,d=B;d--;)V[d]!=null&&(typeof r.type=="function"&&V[d].__e!=null&&V[d].__e==r.__d&&(r.__d=V[d].__e.nextSibling),co(V[d],V[d]))}function no(e,t,r){for(var n,a=e.__k,i=0;a&&i<a.length;i++)(n=a[i])&&(n.__=e,t=typeof n.type=="function"?no(n,t,r):ao(r,n.__e,t));return t}function at(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wr(e)?e.some(function(r){at(r,t)}):t.push(e)),t}function ao(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function Gd(e,t,r,n){var a=e.key,i=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&a==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&a==l.key&&i===l.type)return o;o--}if(s<t.length){if((l=t[s])&&a==l.key&&i===l.type)return s;s++}}return-1}function Yd(e,t,r,n,a){var i;for(i in r)i==="children"||i==="key"||i in t||Gr(e,i,null,r[i],n);for(i in t)a&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||Gr(e,i,t[i],r[i],n)}function io(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Hd.test(t)?r:r+"px"}function Gr(e,t,r,n,a){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||io(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||io(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?so:oo,i):e.removeEventListener(t,i?so:oo,i);else if(t!=="dangerouslySetInnerHTML"){if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function oo(e){return this.l[e.type+!1](R.event?R.event(e):e)}function so(e){return this.l[e.type+!0](R.event?R.event(e):e)}function Jn(e,t,r,n,a,i,o,s,l,c){var f,d,h,p,g,v,_,S,x,L,j,F,V,B,k,C=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=R.__b)&&f(t);try{e:if(typeof C=="function"){if(S=t.props,x=(f=C.contextType)&&n[f.__c],L=f?x?x.props.value:f.__:n,r.__c?_=(d=t.__c=r.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(S,L):(t.__c=d=new Be(S,L),d.constructor=C,d.render=Zd),x&&x.sub(d),d.props=S,d.state||(d.state={}),d.context=L,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=nt({},d.__s)),nt(d.__s,C.getDerivedStateFromProps(S,d.__s))),p=d.props,g=d.state,d.__v=t,h)C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(C.getDerivedStateFromProps==null&&S!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(S,L),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(S,d.__s,L)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=S,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(I){I&&(I.__=t)}),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(S,d.__s,L),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,g,v)})}if(d.context=L,d.props=S,d.__P=e,d.__e=!1,F=R.__r,V=0,"prototype"in C&&C.prototype.render){for(d.state=d.__s,d.__d=!1,F&&F(t),f=d.render(d.props,d.state,d.context),B=0;B<d._sb.length;B++)d.__h.push(d._sb[B]);d._sb=[]}else do d.__d=!1,F&&F(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++V<25);d.state=d.__s,d.getChildContext!=null&&(n=nt(nt({},n),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(v=d.getSnapshotBeforeUpdate(p,g)),ro(e,Wr(k=f!=null&&f.type===ce&&f.key==null?f.props.children:f)?k:[k],t,r,n,a,i,o,s,l,c),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),_&&(d.__E=d.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Jd(r.__e,t,r,n,a,i,o,l,c);(f=R.diffed)&&f(t)}catch(I){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),R.__e(I,t,r)}}function lo(e,t,r){for(var n=0;n<r.length;n++)Zn(r[n],r[++n],r[++n]);R.__c&&R.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){R.__e(i,a.__v)}})}function Jd(e,t,r,n,a,i,o,s,l){var c,f,d,h=r.props,p=t.props,g=t.type,v=0;if(g==="svg"&&(a=!0),i!=null){for(;v<i.length;v++)if((c=i[v])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,i[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=a?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),i=null,s=!1}if(g===null)h===p||s&&e.data===p||(e.data=p);else{if(i=i&&cr.call(e.childNodes),f=(h=r.props||Ht).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!s){if(i!=null)for(h={},v=0;v<e.attributes.length;v++)h[e.attributes[v].name]=e.attributes[v].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(Yd(e,p,h,a,s),d)t.__k=[];else if(ro(e,Wr(v=t.props.children)?v:[v],t,r,n,a&&g!=="foreignObject",i,o,i?i[0]:r.__k&&Hr(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&eo(i[v]);s||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==h.value)&&Gr(e,"value",v,h.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Gr(e,"checked",v,h.checked,!1))}return e}function Zn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){R.__e(n,r)}}function co(e,t,r){var n,a;if(R.unmount&&R.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Zn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){R.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&co(n[a],t,r||typeof e.type!="function");r||e.__e==null||eo(e.__e),e.__=e.__e=e.__d=void 0}function Zd(e,t,r){return this.constructor(e,r)}function It(e,t,r){var n,a,i,o;R.__&&R.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],o=[],Jn(t,e=(!n&&r||t).__k=Oe(ce,null,[e]),a||Ht,Ht,t.ownerSVGElement!==void 0,!n&&r?[r]:a?null:t.firstChild?cr.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,o),lo(i,e,o)}function uo(e,t){It(e,t,uo)}function Xd(e,t,r){var n,a,i,o,s=nt({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?cr.call(arguments,2):r),dr(e.type,s,n||e.key,a||e.ref,null)}function fo(e,t){var r={__c:t="__cC"+Xi++,__:e,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,i;return this.getChildContext||(a=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&a.some(function(s){s.__e=!0,Yn(s)})},this.sub=function(o){a.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){a.splice(a.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}cr=Qi.slice,R={__e:function(e,t,r,n){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),o=a.__d),o)return a.__E=a}catch(s){e=s}throw e}},Gi=0,Yi=function(e){return e!=null&&e.constructor===void 0},Be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},r),this.props)),e&&nt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Yn(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yn(this))},Be.prototype.render=ce,At=[],Zi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gn=function(e,t){return e.__v.__b-t.__v.__b},Kr.__r=0,Xi=0;var ht,ne,Xn,po,Kt=0,ho=[],Yr=[],go=R.__b,bo=R.__r,mo=R.diffed,vo=R.__c,wo=R.unmount;function Gt(e,t){R.__h&&R.__h(ne,e,Kt||t),Kt=0;var r=ne.__H||(ne.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Yr}),r.__[e]}function ze(e){return Kt=1,yo(ko,e)}function yo(e,t,r){var n=Gt(ht++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):ko(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=ne,!ne.u)){var a=function(s,l,c){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!i||i.call(this,s,l,c);var d=!1;return f.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!i||i.call(this,s,l,c))};ne.u=!0;var i=ne.shouldComponentUpdate,o=ne.componentWillUpdate;ne.componentWillUpdate=function(s,l,c){if(this.__e){var f=i;i=void 0,a(s,l,c),i=f}o&&o.call(this,s,l,c)},ne.shouldComponentUpdate=a}return n.__N||n.__}function Tt(e,t){var r=Gt(ht++,3);!R.__s&&ea(r.__H,t)&&(r.__=e,r.i=t,ne.__H.__h.push(r))}function Ee(e,t){var r=Gt(ht++,4);!R.__s&&ea(r.__H,t)&&(r.__=e,r.i=t,ne.__h.push(r))}function ge(e){return Kt=5,gt(function(){return{current:e}},[])}function Qd(e,t,r){Kt=6,Ee(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function gt(e,t){var r=Gt(ht++,7);return ea(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function eu(e,t){return Kt=8,gt(function(){return e},t)}function _o(e){var t=ne.context[e.__c],r=Gt(ht++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(ne)),t.props.value):e.__}function tu(e,t){R.useDebugValue&&R.useDebugValue(t?t(e):e)}function ru(){var e=Gt(ht++,11);if(!e.__){for(var t=ne.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function nu(){for(var e;e=ho.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Jr),e.__H.__h.forEach(Qn),e.__H.__h=[]}catch(t){e.__H.__h=[],R.__e(t,e.__v)}}R.__b=function(e){ne=null,go&&go(e)},R.__r=function(e){bo&&bo(e),ht=0;var t=(ne=e.__c).__H;t&&(Xn===ne?(t.__h=[],ne.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Yr,r.__N=r.i=void 0})):(t.__h.forEach(Jr),t.__h.forEach(Qn),t.__h=[],ht=0)),Xn=ne},R.diffed=function(e){mo&&mo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ho.push(t)!==1&&po===R.requestAnimationFrame||((po=R.requestAnimationFrame)||au)(nu)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Yr&&(r.__=r.__V),r.i=void 0,r.__V=Yr})),Xn=ne=null},R.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Jr),r.__h=r.__h.filter(function(n){return!n.__||Qn(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],R.__e(n,r.__v)}}),vo&&vo(e,t)},R.unmount=function(e){wo&&wo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Jr(n)}catch(a){t=a}}),r.__H=void 0,t&&R.__e(t,r.__v))};var xo=typeof requestAnimationFrame=="function";function au(e){var t,r=function(){clearTimeout(n),xo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);xo&&(t=requestAnimationFrame(r))}function Jr(e){var t=ne,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),ne=t}function Qn(e){var t=ne;e.__c=e.__(),ne=t}function ea(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ko(e,t){return typeof t=="function"?t(e):t}var iu=Symbol.for("preact-signals");function ta(){if(Yt>1)Yt--;else{for(var e,t=!1;ur!==void 0;){var r=ur;for(ur=void 0,ra++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Co(r))try{r.c()}catch(a){t||(e=a,t=!0)}r=n}}if(ra=0,Yt--,t)throw e}}var Z=void 0,ur=void 0,Yt=0,ra=0,Zr=0;function So(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ye(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ye.prototype.brand=iu,ye.prototype.h=function(){return!0},ye.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ye.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ye.prototype.subscribe=function(e){var t=this;return Xr(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},ye.prototype.valueOf=function(){return this.value},ye.prototype.toString=function(){return this.value+""},ye.prototype.toJSON=function(){return this.value},ye.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(ye.prototype,"value",{get:function(){var e=So(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ra>100)throw new Error("Cycle detected");this.v=e,this.i++,Zr++,Yt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ta()}}}});function Ne(e){return new ye(e)}function Co(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Eo(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function $o(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Jt(e){ye.call(this,void 0),this.x=e,this.s=void 0,this.g=Zr-1,this.f=4}(Jt.prototype=new ye).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Zr))return!0;if(this.g=Zr,this.f|=1,this.i>0&&!Co(this))return this.f&=-2,!0;var e=Z;try{Eo(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,$o(this),this.f&=-2,!0},Jt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ye.prototype.S.call(this,e)},Jt.prototype.U=function(e){if(this.t!==void 0&&(ye.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Jt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Jt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=So(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ou(e){return new Jt(e)}function Ao(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Yt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,na(e),n}finally{Z=r,ta()}}}function na(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ao(e)}function su(e){if(Z!==this)throw new Error("Out-of-order effect");$o(this),Z=e,this.f&=-2,8&this.f&&na(this),ta()}function fr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}fr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},fr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ao(this),Eo(this),Yt++;var e=Z;return Z=this,su.bind(this,e)},fr.prototype.N=function(){2&this.f||(this.f|=2,this.o=ur,ur=this)},fr.prototype.d=function(){this.f|=8,1&this.f||na(this)};function Xr(e){var t=new fr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var aa;function Zt(e,t){R[e]=t.bind(null,R[e]||function(){})}function Qr(e){aa&&aa(),aa=e&&e.S()}function Io(e){var t=this,r=e.data,n=cu(r);n.value=r;var a=gt(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Yi(a.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=a.peek():(t.__$f|=1,t.setState({}))},ou(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return a.value}Io.displayName="_st",Object.defineProperties(ye.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Io},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Zt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var a in n)if(a!=="children"){var i=n[a];i instanceof ye&&(r||(t.__np=r={}),r[a]=i,n[a]=i.peek())}}e(t)}),Zt("__r",function(e,t){Qr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(a){var i;return Xr(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),Qr(r),e(t)}),Zt("__e",function(e,t,r,n){Qr(),e(t,r,n)}),Zt("diffed",function(e,t){Qr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,a=t.props;if(n){var i=r.U;if(i)for(var o in i){var s=i[o];s!==void 0&&!(o in n)&&(s.d(),i[o]=void 0)}else r.U=i={};for(var l in n){var c=i[l],f=n[l];c===void 0?(c=lu(r,l,f,a),i[l]=c):c.o(f,a)}}}e(t)});function lu(e,t,r,n){var a=t in e&&e.ownerSVGElement===void 0,i=Ne(r);return{o:function(o,s){i.value=o,n=s},d:Xr(function(){var o=i.value.value;n[t]!==o&&(n[t]=o,a?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Zt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var a in n){var i=n[a];i&&i.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Zt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function cu(e){return gt(function(){return Ne(e)},[])}const $e=Symbol.for("@ts-pattern/matcher"),To=Symbol.for("@ts-pattern/isVariadic"),en="@ts-pattern/anonymous-select-key",ia=e=>!!(e&&typeof e=="object"),tn=e=>e&&!!e[$e],ue=(e,t,r)=>{if(tn(e)){const n=e[$e](),{matched:a,selections:i}=n.match(t);return a&&i&&Object.keys(i).forEach(o=>r(o,i[o])),a}if(ia(e)){if(!ia(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],a=[],i=[];for(const o of e.keys()){const s=e[o];tn(s)&&s[To]?i.push(s):i.length?a.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+a.length)return!1;const o=t.slice(0,n.length),s=a.length===0?[]:t.slice(-a.length),l=t.slice(n.length,a.length===0?1/0:-a.length);return n.every((c,f)=>ue(c,o[f],r))&&a.every((c,f)=>ue(c,s[f],r))&&(i.length===0||ue(i[0],l,r))}return e.length===t.length&&e.every((o,s)=>ue(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const a=e[n];return(n in t||tn(i=a)&&i[$e]().matcherType==="optional")&&ue(a,t[n],r);var i})}return Object.is(t,e)},Ae=e=>{var t,r,n;return ia(e)?tn(e)?(t=(r=(n=e[$e]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?pr(e,Ae):pr(Object.values(e),Ae):[]},pr=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Do(...e){if(e.length===1){const[t]=e;return r=>ue(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ue(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function be(e){return Object.assign(e,{optional:()=>sa(e),and:t=>ae(e,t),or:t=>Mo(e,t),select:t=>t===void 0?hr(e):hr(t,e)})}function oa(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[To]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=n[r++])!=null?a:n.at(-1)}}}}))(e),{optional:()=>oa(sa(e)),select:t=>oa(t===void 0?hr(e):hr(t,e))})}function sa(e){return be({[$e]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return t===void 0?(Ae(e).forEach(a=>n(a,void 0)),{matched:!0,selections:r}):{matched:ue(e,t,n),selections:r}},getSelectionKeys:()=>Ae(e),matcherType:"optional"})})}const du=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},uu=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},fu=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function ae(...e){return be({[$e]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return{matched:e.every(a=>ue(a,t,n)),selections:r}},getSelectionKeys:()=>pr(e,Ae),matcherType:"and"})})}function Mo(...e){return be({[$e]:()=>({match:t=>{let r={};const n=(a,i)=>{r[a]=i};return pr(e,Ae).forEach(a=>n(a,void 0)),{matched:e.some(a=>ue(a,t,n)),selections:r}},getSelectionKeys:()=>pr(e,Ae),matcherType:"or"})})}function W(e){return{[$e]:()=>({match:t=>({matched:!!e(t)})})}}function hr(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return be({[$e]:()=>({match:n=>{let a={[t??en]:n};return{matched:r===void 0||ue(r,n,(i,o)=>{a[i]=o}),selections:a}},getSelectionKeys:()=>[t??en].concat(r===void 0?[]:Ae(r))})})}function Lo(e){return!0}function Ge(e){return typeof e=="number"}function bt(e){return typeof e=="string"}function mt(e){return typeof e=="bigint"}const jo=be(W(Lo)),pu=be(W(Lo)),hu=jo,vt=e=>Object.assign(be(e),{startsWith:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&n.endsWith(r)))));var r},minLength:t=>vt(ae(e,(r=>W(n=>bt(n)&&n.length>=r))(t))),length:t=>vt(ae(e,(r=>W(n=>bt(n)&&n.length===r))(t))),maxLength:t=>vt(ae(e,(r=>W(n=>bt(n)&&n.length<=r))(t))),includes:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&n.includes(r)))));var r},regex:t=>{return vt(ae(e,(r=t,W(n=>bt(n)&&!!n.match(r)))));var r}}),Fo=vt(W(bt)),Ye=e=>Object.assign(be(e),{between:(t,r)=>Ye(ae(e,((n,a)=>W(i=>Ge(i)&&n<=i&&a>=i))(t,r))),lt:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n<r))(t))),gt:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n>r))(t))),lte:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n<=r))(t))),gte:t=>Ye(ae(e,(r=>W(n=>Ge(n)&&n>=r))(t))),int:()=>Ye(ae(e,W(t=>Ge(t)&&Number.isInteger(t)))),finite:()=>Ye(ae(e,W(t=>Ge(t)&&Number.isFinite(t)))),positive:()=>Ye(ae(e,W(t=>Ge(t)&&t>0))),negative:()=>Ye(ae(e,W(t=>Ge(t)&&t<0)))}),gu=Ye(W(Ge)),wt=e=>Object.assign(be(e),{between:(t,r)=>wt(ae(e,((n,a)=>W(i=>mt(i)&&n<=i&&a>=i))(t,r))),lt:t=>wt(ae(e,(r=>W(n=>mt(n)&&n<r))(t))),gt:t=>wt(ae(e,(r=>W(n=>mt(n)&&n>r))(t))),lte:t=>wt(ae(e,(r=>W(n=>mt(n)&&n<=r))(t))),gte:t=>wt(ae(e,(r=>W(n=>mt(n)&&n>=r))(t))),positive:()=>wt(ae(e,W(t=>mt(t)&&t>0))),negative:()=>wt(ae(e,W(t=>mt(t)&&t<0)))}),bu=wt(W(mt)),mu=be(W(function(e){return typeof e=="boolean"})),vu=be(W(function(e){return typeof e=="symbol"})),wu=be(W(function(e){return e==null})),yu=be(W(function(e){return e!=null}));var Dt={__proto__:null,matcher:$e,optional:sa,array:function(...e){return oa({[$e]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return Ae(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const a=(i,o)=>{n[i]=(n[i]||[]).concat([o])};return{matched:t.every(i=>ue(r,i,a)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ae(e[0])})})},set:function(...e){return be({[$e]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,o)=>{r[i]=(r[i]||[]).concat([o])},a=e[0];return{matched:du(t,i=>ue(a,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ae(e[0])})})},map:function(...e){return be({[$e]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var a;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=e[0])==null?void 0:a.toString()}`);const[i,o]=e;return{matched:uu(t,(s,l)=>{const c=ue(i,l,n),f=ue(o,s,n);return c&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...Ae(e[0]),...Ae(e[1])]})})},record:function(...e){return be({[$e]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const a=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[i,o]=e.length===1?[Fo,e[0]]:e;return{matched:fu(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&ue(i,c,a),d=ue(i,s,a),h=ue(o,l,a);return(d||f)&&h}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ae(e[0]),...Ae(e[1])]})})},intersection:ae,union:Mo,not:function(e){return be({[$e]:()=>({match:t=>({matched:!ue(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:hr,any:jo,unknown:pu,_:hu,string:Fo,number:gu,bigint:bu,boolean:mu,symbol:vu,nullish:wu,nonNullable:yu,instanceOf:function(e){return be(W((function(t){return r=>r instanceof t})(e)))},shape:function(e){return be(W(Do(e)))}};let _u=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const la={matched:!1,value:void 0};function rn(e){return new xu(e,la)}let xu=class ni{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let a;t.length===3&&typeof t[1]=="function"?a=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(c,f)=>{i=!0,o[c]=f},l=!n.some(c=>ue(c,this.input,s))||a&&!a(this.input)?la:{matched:!0,value:r(i?en in o?o[en]:o:this.input,this.input)};return new ni(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new ni(this.input,n?{matched:!0,value:r(this.input,this.input)}:la)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=ku){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function ku(e){throw new _u(e)}var Su=0;function u(e,t,r,n,a,i){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Su,__source:a,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return R.vnode&&R.vnode(c),c}function Oo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Oo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Oo(e))&&(n&&(n+=" "),n+=t);return n}const No=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Po=it,Mt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Po(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const f=r==null?void 0:r[c],d=i==null?void 0:i[c];if(f===null)return null;const h=No(f)||No(d);return a[c][h]}),s=r&&Object.entries(r).reduce((c,f)=>{let[d,h]=f;return h===void 0||(c[d]=h),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(g=>{let[v,_]=g;return Array.isArray(_)?_.includes({...i,...s}[v]):{...i,...s}[v]===_})?[...c,d,h]:c},[]);return Po(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Ro(e,t){for(var r in t)e[r]=t[r];return e}function ca(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function da(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function ua(e){this.props=e}function Cu(e,t){function r(a){var i=this.props.ref,o=i==a.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,a)||!o:ca(this.props,a)}function n(a){return this.shouldComponentUpdate=r,Oe(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ua.prototype=new Be).isPureReactComponent=!0,ua.prototype.shouldComponentUpdate=function(e,t){return ca(this.props,e)||ca(this.state,t)};var Vo=R.__b;R.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Vo&&Vo(e)};var Eu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function fa(e){function t(r){var n=Ro({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Eu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Bo=function(e,t){return e==null?null:at(at(e).map(t))},$u={map:Bo,forEach:Bo,count:function(e){return e?at(e).length:0},only:function(e){var t=at(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:at},Au=R.__e;R.__e=function(e,t,r,n){if(e.then){for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),a.__c(e,t)}Au(e,t,r,n)};var zo=R.unmount;function Uo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Ro({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Uo(n,t,r)})),e}function qo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return qo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function gr(){this.__u=0,this.t=null,this.__b=null}function Wo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ho(e){var t,r,n;function a(i){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return Oe(r,i)}return a.displayName="Lazy",a.__f=!0,a}function br(){this.u=null,this.o=null}R.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),zo&&zo(e)},(gr.prototype=new Be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var a=Wo(n.__v),i=!1,o=function(){i||(i=!0,r.__R=null,a?a(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=qo(c,c.__c.__P,c.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},gr.prototype.componentWillUnmount=function(){this.t=[]},gr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Uo(this.__b,r,n.__O=n.__P)}this.__b=null}var a=t.__a&&Oe(ce,null,e.fallback);return a&&(a.__h=null),[Oe(ce,null,t.__a?null:e.children),a]};var Ko=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Iu(e){return this.getChildContext=function(){return e.context},e.children}function Tu(e){var t=this,r=e.i;t.componentWillUnmount=function(){It(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),It(Oe(Iu,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Du(e,t){var r=Oe(Tu,{__v:e,i:t});return r.containerInfo=t,r}(br.prototype=new Be).__a=function(e){var t=this,r=Wo(t.__v),n=t.o.get(e);return n[0]++,function(a){var i=function(){t.props.revealOrder?(n.push(a),Ko(t,e,n)):a()};r?r(i):i()}},br.prototype.render=function(e){this.u=null,this.o=new Map;var t=at(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},br.prototype.componentDidUpdate=br.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ko(e,r,t)})};var Go=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Mu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Lu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ju=/[A-Z0-9]/g,Fu=typeof document<"u",Ou=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Nu(e,t,r){return t.__k==null&&(t.textContent=""),It(e,t),typeof r=="function"&&r(),e?e.__c:null}function Pu(e,t,r){return uo(e,t),typeof r=="function"&&r(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Yo=R.event;function Ru(){}function Vu(){return this.cancelBubble}function Bu(){return this.defaultPrevented}R.event=function(e){return Yo&&(e=Yo(e)),e.persist=Ru,e.isPropagationStopped=Vu,e.isDefaultPrevented=Bu,e.nativeEvent=e};var pa,zu={enumerable:!1,configurable:!0,get:function(){return this.class}},Jo=R.vnode;R.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,a={};for(var i in r){var o=r[i];if(!(i==="value"&&"defaultValue"in r&&o==null||Fu&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Ou(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Lu.test(i)?i=s:n.indexOf("-")===-1&&Mu.test(i)?i=i.replace(ju,"-$&").toLowerCase():o===null&&(o=void 0):s=i="oninput",s==="oninput"&&a[i=s]&&(i="oninputCapture"),a[i]=o}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.value.indexOf(l.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=at(r.children).forEach(function(l){l.props.selected=a.multiple?a.defaultValue.indexOf(l.props.value)!=-1:a.defaultValue==l.props.value})),r.class&&!r.className?(a.class=r.class,Object.defineProperty(a,"className",zu)):(r.className&&!r.class||r.class&&r.className)&&(a.class=a.className=r.className),t.props=a})(e),e.$$typeof=Go,Jo&&Jo(e)};var Zo=R.__r;R.__r=function(e){Zo&&Zo(e),pa=e.__c};var Xo=R.diffed;R.diffed=function(e){Xo&&Xo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),pa=null};var Uu={ReactCurrentDispatcher:{current:{readContext:function(e){return pa.__n[e.__c].props.value}}}};function qu(e){return Oe.bind(null,e)}function Qo(e){return!!e&&e.$$typeof===Go}function Wu(e){return Qo(e)?Xd.apply(null,arguments):e}function Hu(e){return!!e.__k&&(It(null,e),!0)}function Ku(e){return e&&(e.base||e.nodeType===1&&e)||null}var Gu=function(e,t){return e(t)},Yu=function(e,t){return e(t)},Ju=ce;function es(e){e()}function Zu(e){return e}function Xu(){return[!1,es]}var Qu=Ee;function ef(e,t){var r=t(),n=ze({h:{__:r,v:t}}),a=n[0].h,i=n[1];return Ee(function(){a.__=r,a.v=t,da(a.__,t())||i({h:a})},[e,r,t]),Tt(function(){return da(a.__,a.v())||i({h:a}),e(function(){da(a.__,a.v())||i({h:a})})},[e]),r}var Ie={useState:ze,useId:ru,useReducer:yo,useEffect:Tt,useLayoutEffect:Ee,useInsertionEffect:Qu,useTransition:Xu,useDeferredValue:Zu,useSyncExternalStore:ef,startTransition:es,useRef:ge,useImperativeHandle:Qd,useMemo:gt,useCallback:eu,useContext:_o,useDebugValue:tu,version:"17.0.2",Children:$u,render:Nu,hydrate:Pu,unmountComponentAtNode:Hu,createPortal:Du,createElement:Oe,createContext:fo,createFactory:qu,cloneElement:Wu,createRef:Kd,Fragment:ce,isValidElement:Qo,findDOMNode:Ku,Component:Be,PureComponent:ua,memo:Cu,forwardRef:fa,flushSync:Yu,unstable_batchedUpdates:Gu,StrictMode:Ju,Suspense:gr,SuspenseList:br,lazy:Ho,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Uu},tf=["other","few","many","two","one","zero"],ts=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function a(i,o){const s=(t==null?void 0:t[i])??e[i];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var f;return((f=o==null?void 0:o[c])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${i.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=tf.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${i.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,f)=>{var d;return((d=o==null?void 0:o[f])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${i.toString()}”.`)}}return a},rs=fo(null),ns=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const a=gt(()=>ts({locale:n,terms:e,overrides:t}),[t,n]);return u(rs.Provider,{value:{t:a,locale:n},children:r})},useTranslation:()=>{const t=_o(rs);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>ts({terms:e,overrides:t,locale:r})}),rf={conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"Sorry, this role closed while you were applying.",submission_duplicate_earlier_attempt:"You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown_do_not_resubmit:"We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",submission_cooldown:{one:"Submit will be available again in {{count}} second.",other:"Submit will be available again in {{count}} seconds."},submission_cooldown_ready:"Submit is available again.",captcha_check:"One quick check before we send your application",submission_still_working:"Sending your application, this can take up to a minute. Please keep this page open.",file_preparing:{one:"Preparing your file…",other:"Preparing your files…"},file_ready:{one:"Your file is ready to send",other:"Your files are ready to send"},file_read_error:"We couldn't read this file. Select it again or choose another file.",file_read_error_replacement:"We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.",address_error:"We couldn't search for that address. Try again, or fill it in manually.",address_searching:"Searching addresses…",address_no_results:"We couldn't find that address. Check the spelling or postcode, or fill it in manually.",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",loading:"Loading",minimize:"Minimise"},{defaultTerms:nf}=ns({submission_redirect_message:"One last step: finish your application on the employer's site.",complete_submission:"Continue on the employer's site",submission_completed:"Submission completed!",submission_pending:"Thanks, we've received your application and are processing it.",submission_failed:"Failed to submit",submission_provider_maintenance:"Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_available_at:"Submit will be available again at {{time}}.",resume_prompt:"You have an unfinished application for this role. Continue where you left off?",resume_continue:"Continue",resume_start_again:"Start again",captcha_failed:"Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_whole:"Enter a whole number",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_file_empty:"This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:af,useTranslation:de,createTFunction:of}=ns({...nf,...rf,error_heading:"Something unexpected happened",flow_closed:"This role is no longer accepting applications.",undo:"Change answer",job_alerts_offer:"Want to hear about similar roles? We can email you at {{email}} when new ones open.",job_alerts_accept:"Get job alerts",job_alerts_decline:"No thanks",job_alerts_privacy:"We'll use your email only for these alerts. You can unsubscribe at any time.",job_alerts_privacy_sender:"{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.",job_alerts_success:"Done. We'll email you about similar roles.",job_alerts_error:"Sorry, we couldn't set that up. Please try again later.",submission_duplicate:"You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",submission_retryable:"We couldn't submit your application. Please try again.",submission_unknown:"We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.",maximize:"Maximise",submit:"Submit",file_more:{one:"+{{count}} file",other:"+{{count}} files"}});function ot(e,t){if(!e)throw new Error(t)}var mr=/\b(?:GIR\s*0AA|[a-z]{1,2}\d[\da-z]?\s*\d[a-z]{2}|[a-z](?:\d{2}|\d[a-z])\s*[\da-z]{4})\b/i,as=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,is=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,os=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const a=((e==null?void 0:e.trim())||((s=t.match(mr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(as.test(a))return a.startsWith("BT")?"ni":"gb";if(is.test(a))return"ie";const i=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(i(r??"")==="northern ireland"||t.split(",").some(f=>i(f)==="northern ireland"))return"ni";const o=(c=(n==null?void 0:n.trim())||((l=t.split(",").at(-1))==null?void 0:l.trim()))==null?void 0:c.toLowerCase();return o==="united kingdom"||o==="gb"?"gb":o==="ireland"||o==="ie"?"ie":null},sf="https://maps.inploi.com/address",lf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),ss=e=>e.split(",").map(t=>lf(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),ls=e=>as.test(e)?`gb:${e.slice(0,-3)}`:is.test(e)?`ie:${e.slice(0,3)}`:null,cf=(e,t,r)=>{const[n="",a=""]=ss(e),i=ls(t),o=a.replace(mr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!i&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=ss(c);if(!f.includes(n))return!1;const d=((p=c.match(mr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",h=ls(d);return i&&h?i===h:!!(s&&f.some(g=>g.replace(mr,"").trim()===o))});return l===-1?null:l+1},df=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:a,pickedState:i,log:o})=>{var l,c,f;if(!t||!t.split(",").every(d=>/^(gb|ie)$/i.test(d.trim())))return;let s;try{const d=new AbortController;s=setTimeout(()=>d.abort(),1500);const h=new URL(sf);h.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(h.href,{signal:d.signal});if(!p.ok)return;const g=await p.json();if(typeof g!="object"||g===null||!("results"in g)||!Array.isArray(g.results)||!("source"in g)||g.source!=="photon"&&g.source!=="mapbox")return;const v=g.results,_=[];for(const B of v){if(typeof B!="object"||B===null||!("label"in B)||typeof B.label!="string")return;_.push(B.label)}const S=((n==null?void 0:n.trim())||((l=r.match(mr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),x=cf(r,S,_),L=(f=(c=p.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],j=L===void 0?null:Number(L),F=p.headers.get("X-Geo-Fallback"),V=os({postcode:n,label:r,state:i,country:a});await o({hit:x!==null,rank:x,results:_.length,source:g.source,fallback:F&&/^[a-z0-9_-]{1,64}$/i.test(F)?F:null,ms:j!==null&&Number.isFinite(j)?j:null,region:V})}catch{}finally{clearTimeout(s)}},uf="https://maps.inploi.com",ff=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,a=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",a,{once:!0});let i;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),i=setTimeout(()=>n.abort(),Math.max(0,r-Date.now()))}),s=await Promise.race([e(n.signal),o]);return t==null||t.throwIfAborted(),s}catch{t==null||t.throwIfAborted();return}finally{clearTimeout(i),t==null||t.removeEventListener("abort",a)}},pf=async(e,t,r)=>await ff(async a=>{const{lookupAddress:i}=await Promise.resolve().then(()=>wh);return a.throwIfAborted(),i({...e,signal:a})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},hf=e=>{try{const t=new URL("/outcome",uf);t.search=new URLSearchParams({kind:e.kind,surface:e.surface,arm:e.arm,picked:e.picked?"1":"0"}).toString(),t.searchParams.set("source",e.source),e.picked&&e.edited!==void 0&&t.searchParams.set("edited",e.edited?"1":"0"),e.region&&t.searchParams.set("region",e.region),fetch(t.href,{keepalive:!0}).catch(()=>{})}catch{}},ha=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(ha):Object.keys(e).sort().reduce((t,r)=>(t[r]=ha(e[r]),t),{}),gf=e=>{let t=JSON.stringify(ha(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const ga=(e,t)=>t.some(r=>e instanceof r);let cs,ds;function bf(){return cs||(cs=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function mf(){return ds||(ds=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ba=new WeakMap,ma=new WeakMap,nn=new WeakMap;function vf(e){const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{r(Lt(e.result)),a()},o=()=>{n(e.error),a()};e.addEventListener("success",i),e.addEventListener("error",o)});return nn.set(t,e),t}function wf(e){if(ba.has(e))return;const t=new Promise((r,n)=>{const a=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{r(),a()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),a()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});ba.set(e,t)}let va={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return ba.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Lt(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function us(e){va=e(va)}function yf(e){return mf().includes(e)?function(...t){return e.apply(wa(this),t),Lt(this.request)}:function(...t){return Lt(e.apply(wa(this),t))}}function _f(e){return typeof e=="function"?yf(e):(e instanceof IDBTransaction&&wf(e),ga(e,bf())?new Proxy(e,va):e)}function Lt(e){if(e instanceof IDBRequest)return vf(e);if(ma.has(e))return ma.get(e);const t=_f(e);return t!==e&&(ma.set(e,t),nn.set(t,e)),t}const wa=e=>nn.get(e);function xf(e,t,{blocked:r,upgrade:n,blocking:a,terminated:i}={}){const o=indexedDB.open(e,t),s=Lt(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Lt(o.result),l.oldVersion,l.newVersion,Lt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),a&&l.addEventListener("versionchange",c=>a(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const kf=["get","getKey","getAll","getAllKeys","count"],Sf=["put","add","delete","clear"],ya=new Map;function fs(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ya.get(t))return ya.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,a=Sf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(a||kf.includes(r)))return;const i=async function(o,...s){const l=this.transaction(o,a?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),a&&l.done]))[0]};return ya.set(t,i),i}us(e=>({...e,get:(t,r,n)=>fs(t,r)||e.get(t,r,n),has:(t,r)=>!!fs(t,r)||e.has(t,r)}));const Cf=["continue","continuePrimaryKey","advance"],ps={},_a=new WeakMap,hs=new WeakMap,Ef={get(e,t){if(!Cf.includes(t))return e[t];let r=ps[t];return r||(r=ps[t]=function(...n){_a.set(this,hs.get(this)[t](...n))}),r}};async function*$f(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Ef);for(hs.set(r,t),nn.set(r,wa(t));t;)yield r,t=await(_a.get(r)||t.continue()),_a.delete(r)}function gs(e,t){return t===Symbol.asyncIterator&&ga(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ga(e,[IDBIndex,IDBObjectStore])}us(e=>({...e,get(t,r,n){return gs(t,r)?$f:e.get(t,r,n)},has(t,r){return gs(t,r)||e.has(t,r)}}));const bs=()=>xf("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let an;const xa=async e=>{if(typeof indexedDB>"u")return;const t=an??(an=bs());try{return await e(await t)}catch(r){if(!(r instanceof Error&&r.name==="InvalidStateError"))throw r;return an===t&&(an=bs()),e(await an)}},Af=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let on,ka,vr;const ms=()=>{if(!on)return vr;const e=on;on=void 0;const t=ln(e),r=xa(n=>n.put("state",Af(e.data),t)).finally(()=>{vr===r&&(vr=void 0)});return vr=r,vr},ke={getStateData:async(e,t,r)=>{const n=ln({...e,flowKeys:t,context:r});return xa(a=>a.get("state",n))},getAllStateData:async()=>await xa(e=>e.getAll("state"))??[],setStateData:e=>{on=e,clearTimeout(ka),ka=setTimeout(()=>{ms()},1e3)},flushStateData:()=>(clearTimeout(ka),ms()??Promise.resolve())},Xt=e=>t=>t?t.type===e:!1,If=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),vs=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:If()}),Tf=e=>rn(e).with({nativeEvent:{submitter:Dt.select(Dt.union(Dt.instanceOf(HTMLButtonElement),Dt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),sn=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const a=e.find(c=>c.id===t.nextId);if(a===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===i),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(sn(e,a,r,n+s).remainingSteps,sn(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+sn(e,a,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Df=e=>{const t={},r=e.find(n=>n.isHead);return r&&sn(e,r,(n,a)=>{t[n]=a}),t},ln=e=>[...e.flowKeys,e.id,e.version,e.build,gf(e.hostContext??e.context)].join("/"),Mf=({data:e,nodes:t})=>{const r=e.startedWriteNodeIds===void 0?t.some(n=>n.type==="integration-application-submit"&&e.nodeHistory.includes(n.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!r&&mi(t,e.submissions)},ws=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||mi(t,e.submissions))},Je=Ne({state:"idle"}),Sa=new Set,jt=e=>{const{state:t,flow:r}=Je.value;if(t!=="loaded")return;ot(r,"No flow to update");const n=e(r.data);r.data=n,Je.value={state:t,flow:r},ke.setStateData(r)},O={current$:Je,viewState$:Ne("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:a,title:i,analytics:o,job:s,employer:l,locationOrigin:c})=>{await ke.flushStateData().catch(()=>{});const f=await ke.getStateData(t,a,r),d=f??vs(),h=ln({...t,flowKeys:a,context:r}),p=f!==void 0&&!Sa.has(h)&&Mf({data:d,nodes:t.nodes});return p||Sa.add(h),{jobAlerts:e,data:d,offerResume:p,startedAt:new Date,nodeIdToProgress:Df(t.nodes),flowKeys:a,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:Pn(n,r),hostContext:n===void 0?void 0:r,title:i,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Je.value={state:"loaded",flow:e},ke.setStateData(e)},settleResume:e=>{e.offerResume=!1,Sa.add(ln(e))},cancelCurrentFlow:()=>{Je.value={state:"idle"},O.viewState$.value="closed"},markAsFinished:()=>jt(e=>({...e,isFinished:!0})),markAsInteracted:()=>jt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>jt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{jt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await ke.flushStateData()},restart:()=>{const{state:e,flow:t}=Je.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r={...vs(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},n={...t,data:r,startedAt:new Date,offerResume:!1};Je.value={state:e,flow:n},ke.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return jt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Je.value;ot(t==="loaded","Application not loaded");const n=r.data.messages.filter(a=>!a.groupId||!e.includes(a.groupId));r.data.messages=n,ke.setStateData(r)},setSubmission:(e,t)=>jt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>jt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Je.peek().flow===e&&(Je.value={state:"loaded",flow:e}),ke.setStateData(e),await ke.flushStateData()}},ys=({heading:e})=>{const{t}=de();return u("div",{class:"flex flex-grow flex-col items-center justify-center",children:[u("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),u("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),u("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),u("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),u("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),u("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),u("path",{d:"M38 56h19"})]}),u("div",{class:"flex flex-col gap-2 text-center",children:u("p",{class:"text-error-11 font-bold",children:t(e)})})]})},cn=e=>{const{t}=de();return u("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[u("title",{children:t("loading")}),u("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),u("g",{id:"s1",transform:"translate(12,0)",children:u("g",{id:"s2",transform:"scale(0,0)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s3",transform:"translate(12,12)",children:u("g",{id:"s4",transform:"scale(1,1)",children:u("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),u("g",{id:"s5",transform:"translate(12,0)",children:u("g",{id:"s6",transform:"scale(0,0)",children:u("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),u("g",{id:"s7",transform:"translate(12,0)",children:u("g",{id:"s8",transform:"scale(0,0)",children:u("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},_s=()=>u("div",{class:"flex flex-grow flex-col items-center justify-center",children:u(cn,{class:"text-neutral-6 h-8 w-8"})}),Lf=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},jf=Mt("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),wr=({class:e,children:t,variant:r,...n})=>u("button",{class:it(jf({variant:r}),e),...n,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),xs=()=>u("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Ff=()=>{if(O.current$.value.state!=="loaded")return null;const e=O.current$.value.flow.nodeIdToProgress,t=O.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return u("div",{class:"bg-accent-3",children:u("div",{style:{width:Lf(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Of=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:a}=de(),i=O.viewState$,o=!!t.feedback&&O.current$.value.state==="loaded"&&i.value==="maximised",s=o&&n.value,l=ge(!1);return Tt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=O.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),u(ce,{children:u("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[u("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[u("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),u("button",{"aria-label":a("minimize"),onClick:()=>{i.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ca,children:u("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),u("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?u("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:it({hidden:!o}),children:u("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,O.current$.value.state==="loaded"&&u(wr,{class:"mx-1","aria-label":a("restart"),onClick:()=>{O.restart()},children:[u("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),u("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),u(wr,{class:"view-switch mx-1",onTouchStart:Ca,"aria-label":a("minimize"),onClick:()=>i.value="minimised",children:u(xs,{})},"minmax")]})]}),u(Ff,{})]})})};function Ca(){}const Nf=Ho(()=>Promise.resolve().then(()=>tb).then(e=>e.ChatbotBody)),ks=Mt("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Ss=Mt("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Pf=({open:e,...t})=>{const r=ge(null);return Ee(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),u("dialog",{ref:r,...t})},Rf=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:a,talentBankClient:i,params:o,feedbackReady:s})=>{const{state:l,flow:c}=O.current$.value,f=O.viewState$.value,d=l!=="idle"&&f==="maximised",h=ge(null),p=c?[...c.data.nodeHistory].reverse().map(g=>c.nodes.find(v=>v.id===g)).find(g=>(g==null?void 0:g.type)==="flow-section"):void 0;return u(af,{terms:o.terms,locale:void 0,children:[u(Pf,{open:d,onClose:()=>O.viewState$.value="minimised",children:u("div",{ref:h,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ks({view:"maximised"}),children:u("div",{class:Ss({view:"maximised"}),children:[u(Of,{params:o,analytics:a,feedbackReady:s,children:p?u(ce,{children:[u("span",{class:"block",children:p.data.title}),u("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),rn({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>u(_s,{},"loading")).with({state:"loaded"},()=>u(gr,{fallback:u(_s,{},"loading"),children:u(Nf,{env:e,rpcClient:n,analytics:a,apiClient:r,logger:t,talentBankClient:i})})).with({state:"closed"},()=>u(ys,{heading:"flow_closed"})).with({state:"error"},()=>u(ys,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?u(Vf,{flow:c}):null]})},Vf=({flow:e})=>{const{t}=de();return u("div",{class:ks({view:"minimised",class:"z-100 isolate"}),children:u("div",{class:Ss({view:"minimised"}),children:[u("button",{onClick:()=>{O.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ca,children:u("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),u("div",{class:"flex items-center px-0.5",children:u(wr,{class:"mx-1","aria-label":t("close_application"),onClick:O.cancelCurrentFlow,variant:"white",children:u("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Cs="14.19.0",Bf=(e,t=Cs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=new Headers(n==null?void 0:n.headers);return a.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(a.entries())})}};let yr,Es,dn;const zf=e=>{const t=e.slice(0,e.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(t)?t:void 0},$s=(e,t,r)=>{const n=Kl(e,t??`
|
|
30
|
-
`,r);return{...n,stack:n.stack.filter(a=>a.startsWith("index.js:"))}},Ea=e=>$s(e,dn),As=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,Qt=(e,t,r={})=>yr==null?void 0:yr.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:Es}),Uf=e=>{const t=(r,n,a)=>{if(O.viewState$.value==="closed")return;const i=$s(n,e,a);i.stack.length&&Qt("fatal",jr(n),{phase:"render",error:{...i,via:r}})};window.addEventListener("error",r=>{ql(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},qf=(e,t,r=Qe&&Qe.tagName.toUpperCase()==="SCRIPT"&&Qe.src||new URL("index.js",document.baseURI).href)=>{const n=Yl();yr||!n||!e||(Es=t?si(t).toString(36):void 0,yr=ac({config:n,version:Cs,env:e,seed:Jl(Gl(),fd)}),dn=zf(r),dn&&Uf(dn))},Wf=e=>{let t={application:void 0,attempts:0,blocked:!1};return{fetch:async(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const a=O.current$.value.flow;a!==t.application&&(t={application:a,attempts:0,blocked:!1});const i=t,o=++i.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw As(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(i.blocked=!0,Qt("submit_blocked",jr(c),{phase:"submit",error:Ea(c),endpoint:"flow_submit",attempt:o,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(n==null?void 0:n.body)=="string"?Math.round(n.body.length/1024):void 0})),c});return i.blocked&&Qt("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},Hf='[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height: calc(100vh - 64px) ;--content-height: calc(100svh - 64px) }@media screen and (min-width:768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px) );--content-height: min(640px, calc(100svh - 16px) ) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media(min-width:640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media(min-width:768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media(min-width:1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media(min-width:1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media(min-width:1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .size-\\[1lh\\]{width:1lh;height:1lh}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[44px\\]{min-height:44px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 16px)}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-64{width:256px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-2\\.5{gap:10px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .text-balance{text-wrap:balance}[data-widget=inploi-chatbot] .text-pretty{text-wrap:pretty}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:6px;padding-right:6px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:10px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .blur{--tw-blur: blur(8px);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)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));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)}[data-widget=inploi-chatbot] .grayscale{--tw-grayscale: grayscale(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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .sepia{--tw-sepia: sepia(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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media(pointer:coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}',Is="inploi-chatbot",$a=`[data-widget='${Is}']`,Kf=()=>({getChatbotElement:()=>document.querySelector($a),getOrCreateChatbotElement:()=>{const e=document.querySelector($a);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Is,t}});var Gf="9.15.0",Ts=`https://sdk.inploi.com/@inploi/flows@${Gf}/cdn/captcha/index.html`,Yf=new URL(Ts).origin,Ds=3e4,Jf=5*6e4,Zf=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",Aa=new WeakMap,Xf=e=>{let t=Aa.get(e);return t||(t=e.fetch("/flow/captcha").then(r=>{let n=r==null?void 0:r.site_key;return typeof n=="string"&&n!==""?n:void 0}).catch(r=>{throw Aa.delete(e),r}),Aa.set(e,t)),t},Qf=(e,t={})=>new Promise((r,n)=>{let{signal:a,container:i=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),a==null||a.removeEventListener("abort",h),c(),v())},d=v=>f(()=>n(new Error(v))),h=()=>d("Captcha aborted"),p,g=v=>{clearTimeout(p),p=setTimeout(()=>d("Captcha timed out"),v)};if(g(Ds),a==null?void 0:a.aborted)return h();a==null||a.addEventListener("abort",h),(async()=>{let v=await Xf(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let _=document.createElement("iframe");_.src=`${Ts}?${new URLSearchParams({sitekey:v,origin:window.location.origin,...o&&{theme:o}}).toString()}`,_.title="Cloudflare security check",_.style.cssText=`display:block;border:0;width:${i?"100%":"300px"};height:0;color-scheme:normal`,i?i.appendChild(_):(_.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(_));let S=!1,x=L=>{if(!_.contentWindow||L.source!==_.contentWindow||L.origin!==Yf||!Zf(L.data))return;let j=L.data;switch(j.type){case"token":return f(()=>r(j.token));case"resize":_.style.height=`${Math.max(0,Math.ceil(j.height))}px`;return;case"before-interactive":return S=!0,g(Jf),s==null?void 0:s();case"after-interactive":return S=!1,g(Ds);case"error":!S&&!j.interactive&&d("Captcha failed");return;case"expired":return d("Captcha expired");case"timeout":return d("Captcha timed out")}};window.addEventListener("message",x),c=()=>{window.removeEventListener("message",x),_.remove()}})().catch(v=>f(()=>n(v)))}),Ms=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[a,...i]=e.compareKey.split(".");if(!a)return!1;let o=vi({context:t,key:a,path:i,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=or(o.value,i);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=or(o.value,i),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return _r(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return _r(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return _r(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?_r(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?Nr(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},_r=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let a of n)if(Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let a of n)if(!Ms({condition:a,context:t,submissions:r,ifBlock:e}))return!1;return!0}},ep=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,tp=(e,{context:t,submissions:r})=>e.replace(ep,(n,a,i="")=>{let[o,...s]=a.trim().split("."),l=vi({key:o,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${Wt(c.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(c=>c&&c.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"phone":return Nr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=or(l.value,s);switch(typeof c){case"boolean":return c===!0?"true":"false";case"string":return c;case"number":return c.toString();case"object":if(Array.isArray(c)&&c.every(f=>typeof f=="string"))return c.join(", ")}break}}return i});function rp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ia(e,t,r=""){const n=rp(e),a=e==null?void 0:e.length;if(!n||t!==void 0){const o=r&&`"${r}" `,s="",l=n?`length=${a}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Ls(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function np(e,t){Ia(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Ta(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Da(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ze(e,t){return e<<32-t|e>>>t}const ap=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ip=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function op(e){if(Ia(e),ap)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=ip[e[r]];return t}function sp(e,t={}){const r=(a,i)=>e(i).update(a).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=a=>e(a),Object.assign(r,t),Object.freeze(r)}const lp=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function cp(e,t,r){return e&t^~e&r}function dp(e,t,r){return e&t^e&r^t&r}class up{constructor(t,r,n,a){ve(this,"blockLen");ve(this,"outputLen");ve(this,"padOffset");ve(this,"isLE");ve(this,"buffer");ve(this,"view");ve(this,"finished",!1);ve(this,"length",0);ve(this,"pos",0);ve(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=a,this.buffer=new Uint8Array(t),this.view=Da(this.buffer)}update(t){Ls(this),Ia(t);const{view:r,buffer:n,blockLen:a}=this,i=t.length;for(let o=0;o<i;){const s=Math.min(a-this.pos,i-o);if(s===a){const l=Da(t);for(;a<=i-o;o+=a)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===a&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ls(this),np(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:a,isLE:i}=this;let{pos:o}=this;r[o++]=128,Ta(this.buffer.subarray(o)),this.padOffset>a-o&&(this.process(n,0),o=0);for(let d=o;d<a;d++)r[d]=0;n.setBigUint64(a-8,BigInt(this.length*8),i),this.process(n,0);const s=Da(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<c;d++)s.setUint32(4*d,f[d],i)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:a,finished:i,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=i,t.length=a,t.pos=s,a%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),fp=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_t=new Uint32Array(64);class pp extends up{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:a,E:i,F:o,G:s,H:l}=this;return[t,r,n,a,i,o,s,l]}set(t,r,n,a,i,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=a|0,this.E=i|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,r){for(let d=0;d<16;d++,r+=4)_t[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const h=_t[d-15],p=_t[d-2],g=Ze(h,7)^Ze(h,18)^h>>>3,v=Ze(p,17)^Ze(p,19)^p>>>10;_t[d]=v+_t[d-7]+g+_t[d-16]|0}let{A:n,B:a,C:i,D:o,E:s,F:l,G:c,H:f}=this;for(let d=0;d<64;d++){const h=Ze(s,6)^Ze(s,11)^Ze(s,25),p=f+h+cp(s,l,c)+fp[d]+_t[d]|0,v=(Ze(n,2)^Ze(n,13)^Ze(n,22))+dp(n,a,i)|0;f=c,c=l,l=s,s=o+p|0,o=i,i=a,a=n,n=p+v|0}n=n+this.A|0,a=a+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,a,i,o,s,l,c,f)}roundClean(){Ta(_t)}destroy(){this.set(0,0,0,0,0,0,0,0),Ta(this.buffer)}}class hp extends pp{constructor(){super(32);ve(this,"A",yt[0]|0);ve(this,"B",yt[1]|0);ve(this,"C",yt[2]|0);ve(this,"D",yt[3]|0);ve(this,"E",yt[4]|0);ve(this,"F",yt[5]|0);ve(this,"G",yt[6]|0);ve(this,"H",yt[7]|0)}}const gp=sp(()=>new hp,lp(1));var js=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Ma=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(n=>n.groupId&&e.nodes.some(a=>a.id===n.groupId&&a.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},La=e=>Array.isArray(e)?e.map(La):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,La(r)])):typeof e=="function"?void 0:e,bp=e=>op(gp(new TextEncoder().encode(JSON.stringify(La(e)))));function mp(e,t,r,n){var a;if(n!=null&&n.aborted)return;let i=bp(r),o=(a=e.data).preApplyFingerprints??(a.preApplyFingerprints=[]);if(o.includes(i))return;o.push(i);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(i);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Fs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Ue=(e,t)=>tp(e,Fs(t)),vp=(e,t)=>_r(e,Fs(t)),Os=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(a=>a.id===e.nextId):void 0;if(n)return Os({node:n,nodes:t,stopWhen:r})},wp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let a=t.find(o=>o.id===n.branchId);if(!a)return!1;let i=Os({node:a,nodes:t,stopWhen:o=>o.id===e.id});return!(!i||i.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},yp=3,_p=({flow:e,analytics:t,logger:r,talentBankClient:n,context:a,apiClient:i,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:d,closedRoleBehaviour:h,settledOutcomes:p=h,dateEchoLocale:g,onFlowEnd:v,onInterpret:_,holdBefore:S,forceSubmitConfirmation:x,flowType:L,t:j})=>{var F;let V=new AbortController,B={submitAccepted:!1};(F=e.data).startedWriteNodeIds??(F.startedWriteNodeIds=e.nodes.flatMap(E=>{var T,z;if(E.type!=="integration-application-submit"||!e.data.nodeHistory.includes(E.id))return[];let $=E.data.key?(T=o())==null?void 0:T[E.data.key]:void 0;return($==null?void 0:$.type)==="integration"&&((z=On($.value))==null?void 0:z.verdict)==="not_submitted"?[]:[E.id]}));let k={...t.service,log:E=>t.service.log({...E,customProperties:{...E.customProperties,...t.customProperties}})},C=(E,$)=>{if($.aborted)return;let T=S==null?void 0:S(void 0);return T?T.then(()=>{if(!$.aborted)return v==null?void 0:v(E)}):v==null?void 0:v(E)},I=async(E,$)=>{let T=V.signal;if(T.aborted)return;let z=S==null?void 0:S(E);if(z&&(await z,T.aborted))return;let U=o(),H=s(),oe=(H==null?void 0:H.submitNodeId)===E.id?e.nodes.find(Q=>{var ee;return Q.id===H.fileQuestionNodeId&&Q.type==="question-file"&&((ee=U==null?void 0:U[Q.data.key])==null?void 0:ee.type)!=="file"}):void 0;if(oe)return I(oe,$);_==null||_(E,$);try{await xp({flow:e,analytics:k,logger:r,talentBankClient:n,apiClient:i,context:a,node:E,submissions:U,applicationRecovery:H,setApplicationRecovery:async Q=>{if(!T.aborted)try{await l(Q)}catch(ee){r.error("Failed to persist application recovery",ee)}},forceSubmitConfirmation:x||(H==null?void 0:H.submitNodeId)===E.id,run:B,persistWriteBarrier:f,onSubmitNetworkError:d,settledOutcomes:p,dateEchoLocale:g,flowType:L,signal:T,t:j,chat:{sendMessage:async Q=>c.send({groupId:E.id,message:Q,signal:T}),userInput:async Q=>c.input({input:Q,signal:T}),setSubmission:(Q,ee)=>{T.aborted||c.setSubmission(Q,ee)},captcha:c.captcha},next:Q=>{if(T.aborted)return;let ee=(H==null?void 0:H.fileQuestionNodeId)===E.id?H.submitNodeId:Q,se=ee?e.nodes.find(Y=>Y.id===ee):wp({childNode:E,nodes:e.nodes});return se?I(se,E):C(E,T)},end:()=>{C(E,T)}})}catch(Q){if(Q instanceof pt)return;throw Q}};return{interpret:async E=>{let $=e.nodes.find(T=>T.id===E)??js(e.nodes);return I($)},undo:E=>{var Q;if(delete e.data.reviewReplay,((Q=e.data.startedWriteNodeIds)==null?void 0:Q.length)||e.data.isFinished)return{removed:0};let $=Ma(e),T=$?E.lastIndexOf($):-1,z=e.nodes.find(ee=>ee.id===$);if(T===-1||!z)return{removed:0};let U=e.nodes.find(ee=>ee.id===E[E.length-1]);V.abort();let H=E.splice(T);e.data.messages=e.data.messages.filter(ee=>!ee.groupId||!H.includes(ee.groupId)),e.data.currentInput=null;let oe=o();for(let ee of H.slice(1)){let se=e.nodes.find(Y=>Y.id===ee);if(!(!se||!oe||se.id===$)&&("key"in se.data&&se.data.key&&delete oe[se.data.key],"keys"in se.data))for(let Y of Object.values(se.data.keys))typeof Y=="string"&&delete oe[Y]}return V=new AbortController,I(z,U),{removed:H.length}},abort:()=>{V.abort()}}};async function xp(e){let t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return Wp({...e,node:t});case"text":return Fp({...e,node:t});case"image":return Op({...e,node:t});case"question-text":return Np({...e,node:t});case"question-enum":return Vp({...e,node:t});case"question-number":return Pp({...e,node:t});case"question-phone":return Rp({...e,node:t});case"question-boolean":return Bp({...e,node:t});case"question-file":return Up({...e,node:t});case"question-address":return zp({...e,node:t});case"end-flow":return qp({...e,node:t});case"if-block":return jp({...e,node:t});case"jump":return Cp({...e,node:t});case"link":return Lp({...e,node:t});case"integration-application-submit":return Dp({...e,node:t});case"add-submission":return Ep({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Sp({...e,node:t});case"feedback":return kp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function kp({next:e,node:t}){e(t.nextId)}async function Sp({next:e,node:t,talentBankClient:r,submissions:n,flow:a,logger:i,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=a.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:wc({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){i.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Cp({next:e,node:t}){e(t.data.targetId)}async function Ep({next:e,node:t,logger:r,submissions:n,context:a}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Ue(t.data.value,{submissions:n,context:a})},e(t.nextId)}var $p=5e3,Ns=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Ap=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?xi:e.throttles?Nn:_i)),Ip=(e,t,r)=>{let{waitMs:n,throttles:a,maintenance:i}=Pc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...a!==void 0&&{throttles:a},...i&&{maintenance:i}}},Tp=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],ja=e=>e instanceof Error&&Tp.includes(e.name)?e:void 0,Ps=e=>{let t=ja(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Dp({chat:e,next:t,end:r,node:n,logger:a,apiClient:i,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:d,flowType:h,run:p,persistWriteBarrier:g,signal:v,onSubmitNetworkError:_,settledOutcomes:S,t:x}){var k,C;let L=async({redirect_url:I,message:E,button_text:$})=>{let{anonymous_id:T,session_id:z}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:E??x("submission_redirect_message")});try{let U=new URL(I);T&&!U.searchParams.has("anonymous_id")&&U.searchParams.set("anonymous_id",T),await e.sendMessage({type:"link",href:U.toString(),text:$??x("complete_submission"),onClick:()=>{if(!z){a.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:z,flow_version:l.version,href:U.toString(),job:l.job}})}})}catch(U){a.error(`Invalid redirect URL: ${I}`,U),e.sendMessage({type:"system",variant:"error",text:x("redirect_url_error")})}};if((k=l.data.startedWriteNodeIds)!=null&&k.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let I=(C=l.data.submitRedirects)==null?void 0:C[n.id];return I?(await L(I),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:x("submission_unknown")}),r())}let j=Ns(n.id,l.job),F=0,V=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,B=async I=>{var _n,xn,ei,Lr,b,m,w,D,A;let E=((_n=l.data.submitCooldown)==null?void 0:_n.key)===j?l.data.submitCooldown:void 0;E&&(E.until=Ap(E));let $=E==null?void 0:E.until;(l.data.reviewRequiresSend===!0&&!V||I!==!0||$!==void 0&&$>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...$!==void 0&&{availableAt:$}}}),V=!1;let T;if(n.data.captcha){let y=e.captcha,P=!0;try{T=await Qf(i,{signal:v,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:x("captcha_check")}).catch(()=>{}).then(()=>{P&&(y==null||y.reveal(!0))})}})}catch(K){if(a.error("Captcha check failed",K),v.aborted)return}finally{P=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:x("submitting")});let{anonymous_id:z,session_id:U}=s.getSessionInfo();if(v.aborted)return;let H=((xn=l.data.startedWriteNodeIds)==null?void 0:xn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),H||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await g().catch(y=>a.error("Failed to persist application write barrier",y)),v.aborted)return;let oe,Q=setTimeout(()=>{oe=e.sendMessage({type:"loading",semantic:"submission-still-working",text:x("submission_still_working")}).catch(y=>a.error("Failed to send submission progress message",y))},$p),ee=mc(),se,Y=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...ee!==void 0&&{browser_timezone:ee},log_submit:!1,integration_id:n.data.integrationId,anonymous_id:z,session_id:U,job:l.job,flow_build:l.build,...T!==void 0&&{captcha_token:T},submissions:bc(l.nodes,vc(o||{},n.data.submitKeys)),pre_apply:Ln(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{se=y;let P=Ps(y);return(P==null?void 0:P.data)!==void 0?P.data:y});if(clearTimeout(Q),await oe,v.aborted)return;if(se!==void 0&&!ja(se)&&_)return await _(se,v),B(!0);l.data.stagingDestination=jc(Y),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Y});let $r=(ei=Ps(se))==null?void 0:ei.status,Ar=typeof $r=="number"?$r:void 0,q=On(Y,Ar),Ir=q===void 0&&Ar===429,Pt=S==="terminal"&&((q==null?void 0:q.outcome)==="closed"||(q==null?void 0:q.outcome)==="duplicate"),Rt=l.data.failedAttemptAt,ut=Rt==null?void 0:Rt[j];Rt&&ut!==void 0&&ut>Date.now()&&(ut=Rt[j]=Date.now());let Tr=ut!==void 0&&Date.now()-ut<ki||((Lr=l.data.unconfirmedAttemptKeys)==null?void 0:Lr.includes(j))===!0,ar=(b=ja(se))==null?void 0:b.status,ft=Uc(Y,typeof ar=="number"?ar:void 0);ft&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:ft.service,response:ft.response,captured:(Y==null?void 0:Y.captured)===!0,flow_type:(h==null?void 0:h())??"CHATBOT_DRAWER",job:l.job,...(q==null?void 0:q.outcome)==="duplicate"&&{outcome:Tr?"duplicate_after_own_attempt":"duplicate"},...ft.outcome&&{outcome:ft.outcome}}});let yn=Pr(Y)||(Y==null?void 0:Y.success)===!0;if((yn||Rr(Y))&&(p.submitAccepted=!0),yn&&((m=l.data.submitCooldown)==null?void 0:m.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(y=>a.error("Failed to persist submit cooldown reset",y))),Pr(Y)){let{redirect_url:y,message:P,button_text:K}=Y.integration_response.data,G={redirect_url:y,message:P,button_text:K};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:G},await g().catch(_e=>a.error("Failed to persist submit redirect",_e)),await L(G),t(n.nextId))}let Dr=Rr(Y);if(Dr)return await e.sendMessage({type:"system",variant:"success",text:Dr.message??x("submission_pending")}),t(n.nextId);if((Y==null?void 0:Y.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:x("submission_completed")}),t(n.nextId);let Mr=zc(q),Vt=Mr!==void 0&&((w=o==null?void 0:o[Mr])==null?void 0:w.type)==="file"?Mr:void 0,Bt=Vt===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===Vt);if(!Bt&&!Pt&&!Ei(q)&&(l.data.submitCooldown=Ip(j,E,q)),(q==null?void 0:q.outcome)!=="duplicate"&&!Ir&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[j]:Date.now()},(D=l.data.unconfirmedAttemptKeys)!=null&&D.includes(j)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==j))),(q==null?void 0:q.verdict)==="not_submitted"||(q==null?void 0:q.outcome)==="duplicate"||(q==null?void 0:q.outcome)==="closed"||Ir||Mc(Y,Ar)?(H||(l.data.startedWriteNodeIds=(A=l.data.startedWriteNodeIds)==null?void 0:A.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await g().catch(y=>a.error("Failed to persist application write barrier release",y))):await g().catch(y=>a.error("Failed to persist submit cooldown",y)),q){if(a.error(se??q.message),Bt&&Vt!==void 0)return e.setSubmission(Vt,null),await f({fileQuestionNodeId:Bt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:x("submission_unreadable_document")}),t(Bt.id);if(q.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Pt?"success":"info",semantic:"submission-duplicate",text:x(Tr?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Pt?(delete l.data.submitCooldown,r()):B(!1);if(q.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:x("submission_closed")}),Pt?(delete l.data.submitCooldown,r()):B(!1);let y=Nc(q);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?x("submission_provider_maintenance_later"):x("submission_provider_maintenance",{time:Ci(y.until,void 0)})}),B(!1)):q.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:x(Bc(q)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):Ei(q)?Rc(Y)?(await e.sendMessage({type:"text",author:"bot",text:q.message}),B(!1)):(F===0&&await e.sendMessage({type:"system",variant:"warning",text:x("captcha_failed")}),F++,B(F<=yp)):Vc(q)?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())}return a.error(se??Y),Ir?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())};await B(d===!0&&!V?!1:n.data.skipConfirmation)}var Mp=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Rs=(e,t)=>{if(!Mp.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Lp({chat:e,next:t,node:r,submissions:n,context:a,analytics:i,flow:o}){let s=Ue(r.data.href,{submissions:n,context:a}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:Ue(r.data.cta,{submissions:n,context:a}),...Rs(r.data.href,s)&&{onClick:()=>{i.log({event:"FLOW_REDIRECT",properties:{flow_build:o.build,flow_id:o.id,flow_session_id:l,flow_version:o.version,href:s,job:o.job}})}}}),t(r.nextId)}async function jp({submissions:e,next:t,node:r,context:n}){t(vp(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Fp({chat:e,next:t,node:r,submissions:n,context:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.text,{submissions:n,context:a})}),t(r.nextId)}async function Op({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Np({chat:e,next:t,node:r,submissions:n,context:a,t:i,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let s=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars,multiline:r.data.format==="text"&&r.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Nr(s.value):r.data.format==="date"&&o!==void 0?Wc(s.value,o):s.value}),t(r.nextId)}async function Pp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Rp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Nr(o.value):o.value}),t(r.nextId)}async function Vp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function Bp({chat:e,next:t,node:r,submissions:n,context:a,t:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:a})});let o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function zp({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let a=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,line2Required:r.data.line2Required,placeholder:r.data.placeholder}});if(a===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let i=Object.values(a.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:i})}return t(r.nextId)}async function Up({node:e,chat:t,next:r,submissions:n,context:a,t:i}){await t.sendMessage({author:"bot",type:"text",text:Ue(e.data.question,{submissions:n,context:a})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:i("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function qp({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function Wp({node:e,flow:t,submissions:r,chat:n,next:a,apiClient:i,analytics:o,signal:s,context:l}){let c=gc(t.nodes,r||{}),{answers:f,...d}=c;if(n.setSubmission(e.data.key,{type:"integration",value:d}),mp(t,i,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Ln(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let h=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let p of["hard","advisory"]){let g=f.filter(v=>!v.matched&&v.severity===p);g.length&&h.push((p==="hard"?"Role requirements":"Other things to consider")+`
|
|
29
|
+
vnvnm vuvut wfwlf wswsm yeyem ytmyt zazaf zmzmb zwzwe`,Ct,Yc=()=>{if(Ct)return Ct;Ct=new Map;let e=new Intl.DisplayNames(["en"],{type:"region",fallback:"none"});for(let t of Gc.split(/\s+/)){let r=t.slice(0,2),n=e.of(r.toUpperCase());n&&Ct.set(n.toLowerCase(),r),Ct.set(r,r),Ct.set(t.slice(2),r)}return Ct},Jc=e=>{let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(Aa,t))return Aa[t];let r=/^[a-z]{2}-[a-z0-9]{1,3}$/.test(t)?t.slice(0,2):t;return Yc().get(r)},Zc=e=>[...new Set(e.flatMap(t=>Jc(t)??[]))].sort();let Ke;const Xc={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Vr(e){return!e&&!Ke?Xc:{lang:(e==null?void 0:e.lang)??(Ke==null?void 0:Ke.lang),message:e==null?void 0:e.message,abortEarly:(e==null?void 0:e.abortEarly)??(Ke==null?void 0:Ke.abortEarly),abortPipeEarly:(e==null?void 0:e.abortPipeEarly)??(Ke==null?void 0:Ke.abortPipeEarly)}}let Rn;function Qc(e){return Rn==null?void 0:Rn.get(e)}let Vn;function eu(e){return Vn==null?void 0:Vn.get(e)}let Bn;function tu(e,t){var r;return(r=Bn==null?void 0:Bn.get(e))==null?void 0:r.get(t)}function Et(e){var r,n;const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((n=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:n.name))??"null":t}function he(e,t,r,n,i){const a=i&&"input"in i?i.input:r.value,o=(i==null?void 0:i.expected)??e.expects??null,s=(i==null?void 0:i.received)??Et(a),l={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${s}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=e.kind==="schema",f=(i==null?void 0:i.message)??e.message??tu(e.reference,l.lang)??(c?eu(l.lang):null)??n.message??Qc(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}const Ia=new WeakMap;function Ce(e){let t=Ia.get(e);return t||(t={version:1,vendor:"valibot",validate(r){return e["~run"]({value:r},Vr())}},Ia.set(e,t)),t}function ru(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Ta(e,t){const r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}function nu(e){if(e.path){let t="";for(const r of e.path)if(typeof r.key=="string"||typeof r.key=="number")t?t+=`.${r.key}`:t+=r.key;else return null;return t}return null}var Da=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};const iu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Ma(e,t){return{kind:"validation",type:"check",reference:Ma,async:!1,expects:null,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&he(this,"input",r,n),r}}}function zn(e){return{kind:"validation",type:"email",reference:zn,expects:null,async:!1,requirement:iu,message:e,"~run"(t,r){return t.typed&&!this.requirement.test(t.value)&&he(this,"email",t,r),t}}}function $t(e,t){return{kind:"validation",type:"max_length",reference:$t,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&he(this,"length",r,n,{received:`${r.value.length}`}),r}}}function La(e,t){return{kind:"validation",type:"max_value",reference:La,async:!1,expects:`<=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&he(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function et(e,t){return{kind:"validation",type:"min_length",reference:et,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&he(this,"length",r,n,{received:`${r.value.length}`}),r}}}function ja(e,t){return{kind:"validation",type:"min_value",reference:ja,async:!1,expects:`>=${e instanceof Date?e.toJSON():Et(e)}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&he(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Et(r.value)}),r}}}function Un(e,t){return{kind:"validation",type:"regex",reference:Un,async:!1,expects:`${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&!this.requirement.test(r.value)&&he(this,"format",r,n),r}}}function Br(e){return{kind:"transformation",type:"transform",reference:Br,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function qn(){return{kind:"transformation",type:"trim",reference:qn,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}function Fa(e){return{kind:"validation",type:"url",reference:Fa,async:!1,expects:null,requirement(t){try{return new URL(t),!0}catch{return!1}},message:e,"~run"(t,r){return t.typed&&!this.requirement(t.value)&&he(this,"URL",t,r),t}}}function au(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function zr(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function sr(e,t){return{kind:"schema",type:"array",reference:sr,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){var a;const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let o=0;o<i.length;o++){const s=i[o],l=this.item["~run"]({value:s},n);if(l.issues){const c={type:"array",origin:"value",input:i,key:o,value:s};for(const f of l.issues)f.path?f.path.unshift(c):f.path=[c],(a=r.issues)==null||a.push(f);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else he(this,"type",r,n);return r}}}function Ur(e){return{kind:"schema",type:"boolean",reference:Ur,expects:"boolean",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:he(this,"type",t,r),t}}}function Oa(e,t){return{kind:"schema",type:"literal",reference:Oa,expects:Et(e),async:!1,literal:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===this.literal?r.typed=!0:he(this,"type",r,n),r}}}function J(e,t){return{kind:"schema",type:"nullable",reference:J,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===null&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function tt(e,t){return{kind:"schema",type:"nullish",reference:tt,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return(r.value===null||r.value===void 0)&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===null||r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Re(e){return{kind:"schema",type:"number",reference:Re,expects:"number",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:he(this,"type",t,r),t}}}function te(e,t){return{kind:"schema",type:"object",reference:te,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){var a;const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const o in this.entries){const s=this.entries[o];if(o in i||(s.type==="exact_optional"||s.type==="optional"||s.type==="nullish")&&s.default!==void 0){const l=o in i?i[o]:zr(s),c=s["~run"]({value:l},n);if(c.issues){const f={type:"object",origin:"value",input:i,key:o,value:l};for(const u of c.issues)u.path?u.path.unshift(f):u.path=[f],(a=r.issues)==null||a.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value[o]=c.value}else if(s.fallback!==void 0)r.value[o]=au(s);else if(s.type!=="exact_optional"&&s.type!=="optional"&&s.type!=="nullish"&&(he(this,"key",r,n,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),n.abortEarly))break}}else he(this,"type",r,n);return r}}}function Le(e,t){return{kind:"schema",type:"optional",reference:Le,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Ce(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=zr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function rt(e,t){return{kind:"schema",type:"picklist",reference:rt,expects:Ta(e.map(Et),"|"),async:!1,options:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:he(this,"type",r,n),r}}}function lr(e,t,r){return{kind:"schema",type:"record",reference:lr,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return Ce(this)},"~run"(n,i){var o,s;const a=n.value;if(a&&typeof a=="object"){n.typed=!0,n.value={};for(const l in a)if(ru(a,l)){const c=a[l],f=this.key["~run"]({value:l},i);if(f.issues){const h={type:"object",origin:"key",input:a,key:l,value:c};for(const p of f.issues)p.path=[h],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}const u=this.value["~run"]({value:c},i);if(u.issues){const h={type:"object",origin:"value",input:a,key:l,value:c};for(const p of u.issues)p.path?p.path.unshift(h):p.path=[h],(s=n.issues)==null||s.push(p);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!f.typed||!u.typed)&&(n.typed=!1),f.typed&&(n.value[f.value]=u.value)}}else he(this,"type",n,i);return n}}}function M(e){return{kind:"schema",type:"string",reference:M,expects:"string",async:!1,message:e,get"~standard"(){return Ce(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:he(this,"type",t,r),t}}}function Na(e){let t;if(e)for(const r of e)if(t)for(const n of r.issues)t.push(n);else t=r.issues;return t}function Pa(e,t){return{kind:"schema",type:"union",reference:Pa,expects:Ta(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Ce(this)},"~run"(r,n){let i,a,o;for(const s of this.options){const l=s["~run"]({value:r.value},n);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];he(this,"type",r,n,{issues:Na(a)}),r.typed=!0}else{if((o==null?void 0:o.length)===1)return o[0];he(this,"type",r,n,{issues:Na(o)})}return r}}}function Ra(){return{kind:"schema",type:"unknown",reference:Ra,expects:"unknown",async:!1,get"~standard"(){return Ce(this)},"~run"(e){return e.typed=!0,e}}}function Va(e,t,r){const n=e["~run"]({value:t},Vr(r));if(n.issues)throw new Da(n.issues);return n.value}function ou(e,t){const r={};for(const n in e.entries)r[n]=Le(e.entries[n]);return{...e,entries:r,get"~standard"(){return Ce(this)}}}function je(...e){return{...e[0],pipe:e,get"~standard"(){return Ce(this)},"~run"(t,r){for(const n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function Wn(e,t,r){const n=e["~run"]({value:t},Vr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}async function su(e,t,r){const n=await e["~run"]({value:t},Vr(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var lu=e=>e,cu=class extends Error{constructor(t,r){super(t),this.status=r,this.name="ErrorWithStatus"}},uu=class extends cu{constructor(t,r,n){super(t),this.data=n,this.name="ApiError",this.status=r??500}},du={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},fu=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16));function Hn(){return{"~standard":{vendor:"inploi",version:1,validate:e=>({value:e})}}}function sb(e){return e}var pu=["agent","sdk","form","integration","migration"],hu=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"],gu=["screening","cv_match","interview","overall"],bu=["PENDING","SCHEDULED","IN_PROGRESS","COMPLETED","CANCELLED"],mu=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],Ba=rt(pu),vu=rt(hu),wu=je(M(),qn(),et(1),$t(100)),yu=rt(gu),_u=rt(bu),xu=je(M(),qn(),et(1),$t(100)),ku=rt(mu),za=te({id:M(),email:J(M()),firstName:J(M()),lastName:J(M()),phone:J(M()),source:J(Ba),identifiedAt:J(M()),createdAt:M(),updatedAt:M()}),Ua=je(M(),et(1)),Kn=lr(M(),Ra()),Su=te({id:M(),applicationId:M(),status:_u,scheduledAt:J(M()),completedAt:J(M()),meta:J(Kn),createdAt:M(),updatedAt:M()}),Cu=te({score:Re(),reason:M(),confidence:Re()}),qa=te({id:M(),candidateId:M(),jobId:Re(),stage:wu,stageGroup:vu,stageEnteredAt:M(),rating:J(Re()),disqualifiedAt:J(M()),disqualificationReason:J(xu),disqualificationNote:J(M()),source:ku,sourceDetail:J(M()),sessionId:J(Re()),externalApplicationId:J(M()),meta:J(Kn),context:J(Kn),scoredAt:J(M()),createdAt:M(),updatedAt:M()}),Eu=te({id:M(),applicationId:M(),scoreType:yu,score:J(Re()),reason:J(M()),categories:J(lr(M(),Cu)),scoredBy:J(M()),createdAt:M()});({...qa.entries},{...za.entries});var $u=te({anonymousId:Ua,email:Ua,firstName:tt(M()),lastName:tt(M()),phone:tt(M()),source:tt(Ba)}),Au=te({candidateId:M(),isNew:Ur()}),Iu=te({id:M(),stageGroup:M(),createdAt:M()}),Tu=te({isDuplicate:Ur(),existingApplication:Le(Iu)}),Du=({environment:e,publishableKey:t,logger:r})=>{let n=du[e];return{async checkDuplicate(i){try{let a=new URLSearchParams({email:i.email,scope:i.scope});i.scope==="job"&&i.jobId!=null&&a.set("job_id",String(i.jobId));let o=await fetch(`${n}/applications/check-duplicate?${a}`,{method:"GET",headers:{Accept:"application/json","x-publishable-key":t}});if(!o.ok)return r.error(`[TalentBankClient] checkDuplicate failed with status ${o.status}`),{isDuplicate:!1};let s=await o.json(),l=Wn(Tu,s);return l.success?l.output:(r.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof s=="object"&&s!=null&&typeof s.isDuplicate=="boolean"?{isDuplicate:s.isDuplicate}:{isDuplicate:!1})}catch(a){return r.error("[TalentBankClient] checkDuplicate failed:",a),{isDuplicate:!1}}},async identify(i){try{if(!i.anonymousId)return r.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let a={email:i.email,firstName:i.firstName,lastName:i.lastName,phone:i.phone,anonymousId:i.anonymousId,source:i.source??"sdk"},o=Wn($u,a);if(!o.success)return r.error("[TalentBankClient] identify received invalid input"),null;let s=await fetch(`${n}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":t},body:JSON.stringify(o.output)});if(!s.ok)return r.error(`[TalentBankClient] identify failed with status ${s.status}`),null;let l=Wn(Au,await s.json());return l.success?l.output:(r.error("[TalentBankClient] identify returned an invalid response"),null)}catch(a){return r.error("[TalentBankClient] identify failed:",a),null}}}},Mu=["DAILY","WEEKLY","MONTHLY"],Lu=lr(M(),Pa([M(),sr(M()),te({type:Oa("provided"),lat:Re(),lng:Re(),radius:Re(),unit:Le(rt(["miles","km"])),label:Le(M())})])),ju={pathname:"/job/:id",method:"GET",schema:{response:te({id:Re(),external_id:tt(M()),city:tt(M()),town:tt(M()),category:tt(M())})}};async function Fu(e,{contact:t,job:r}){var i;let n={};if(r){let a=await e.request(ju,{params:{id:r.id}});if((r.id_type==="internal"?String(a.id):a.external_id)!==r.id)throw new Error("Job lookup returned a different role");for(let o of["city","town","category"]){let s=(i=a[o])==null?void 0:i.trim();s&&(n[o]=[s])}}await e.request(Ou,{body:{contact:t,alerts:"WEEKLY",filters:n}})}var Ou={pathname:"/search/save",method:"POST",schema:{response:Hn(),body:te({contact:te({email:je(Le(M()),M(),zn()),first_name:Le(M()),last_name:Le(M())}),alerts:je(Le(M()),M(),rt(Mu)),filters:Lu})}},Nu=async e=>{let t={method:"GET",pathname:"/search/filters",schema:{response:je(te({country:Le(sr(te({value:M()})),[])}),Br(({country:r})=>r.map(({value:n})=>n))),searchParams:Hn()}};return e.request(t,{searchParams:{filters:{country:null}}})},qr=new WeakMap,Wa=e=>(qr.has(e)||(qr.set(e,void 0),Nu(e).then(async t=>{let{jobCountryCodes:r}=await Promise.resolve().then(()=>ph);qr.set(e,r(t).join(",")||void 0)}).catch(()=>{})),qr.get(e)),Pu=(e,t)=>{let r=new Set,n=[];for(let i=0;i<Math.max(e.length,t.length);i++)for(let a of[e[i],t[i]]){if(!a)continue;let o=a.mapbox_id||a.full_address||[a.name,a.place_formatted].filter(Boolean).join(", ");if(!r.has(o)&&(r.add(o),n.push(a),n.length===5))return n}return n},Ru=600,Vu=async(e,t,r)=>{if(r==null||r.throwIfAborted(),!t){let n=await e();return r==null||r.throwIfAborted(),n}return new Promise((n,i)=>{let a,o,s,l=!1,c=()=>{l=!0,clearTimeout(s),r==null||r.removeEventListener("abort",f)},f=()=>{c(),i(r==null?void 0:r.reason)},u=()=>{c(),(a==null?void 0:a.status)==="fulfilled"&&(o==null?void 0:o.status)==="fulfilled"?n(Pu(a.value,o.value)):(a==null?void 0:a.status)==="fulfilled"?n(a.value):(o==null?void 0:o.status)==="fulfilled"?n(o.value):(a==null?void 0:a.status)==="rejected"&&i(a.reason)},h=(p,g)=>{l||(p?a=g:o=g,a&&o?u():g.status==="fulfilled"&&g.value.length>0&&(s=setTimeout(u,Ru)))};r==null||r.addEventListener("abort",f,{once:!0});for(let p of[!0,!1])e(p?t:void 0).then(g=>h(p,{status:"fulfilled",value:g}),g=>h(p,{status:"rejected",reason:g}))})},Ha=fc(Dn([we(),Fr()]),ua(String)),Ka=re({id:Ha,version:Fr(),build:Fr(),nodes:fa(da()),context_schema:Se(St(Tn(we(),re({required:In(),type:Dn([Me("string"),Me("number")])}))))}),Bu=re({flow:Ka}),zu=re({company:re({name:we()}),context:Se(Tn(we(),qt())),flow:Ka,job:re({id:Ha,title:we()}),user:Se(re({city:Se(we()),country:Se(we()),isEU:Se(In()),continent:Se(we())}))}),Uu=(e,t)=>({id:e.job.id,id_type:(t==null?void 0:t.idType)==="internal"&&t.id===e.job.id?"internal":"external"}),qu={pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Hn(),response:zu}},Wu={pathname:"/flow/id/:id",method:"GET",schema:{response:Bu}},cr,R,Ga,Ya,At,Ja,Za,Gn,Xa,Ht={},Qa=[],Hu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wr=Array.isArray;function nt(e,t){for(var r in t)e[r]=t[r];return e}function eo(e){var t=e.parentNode;t&&t.removeChild(e)}function Oe(e,t,r){var n,i,a,o={};for(a in t)a=="key"?n=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?cr.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ur(e,o,n,i,null)}function ur(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Ga};return i==null&&R.vnode!=null&&R.vnode(a),a}function Ku(){return{current:null}}function ce(e){return e.children}function Be(e,t){this.props=e,this.context=t}function Hr(e,t){if(t==null)return e.__?Hr(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Hr(e):null}function to(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return to(e)}}function Yn(e){(!e.__d&&(e.__d=!0)&&At.push(e)&&!Kr.__r++||Ja!==R.debounceRendering)&&((Ja=R.debounceRendering)||Za)(Kr)}function Kr(){var e,t,r,n,i,a,o,s,l;for(At.sort(Gn);e=At.shift();)e.__d&&(t=At.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(a=nt({},o)).__v=o.__v+1,Jn(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Hr(o),o.__h,i),lo(n,o,i),o.__e!=s&&to(o)),At.length>t&&At.sort(Gn));Kr.__r=0}function ro(e,t,r,n,i,a,o,s,l,c,f){var u,h,p,g,v,_,S,x,L,j,F=0,V=n&&n.__k||Qa,B=V.length,k=B,C=t.length;for(r.__k=[],u=0;u<C;u++)(g=r.__k[u]=(g=t[u])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?ur(null,g,null,null,g):Wr(g)?ur(ce,{children:g},null,null,null):g.__b>0?ur(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(x=Gu(g,V,S=u+F,k))===-1?p=Ht:(p=V[x]||Ht,V[x]=void 0,k--),Jn(e,g,p,i,a,o,s,l,c,f),v=g.__e,(h=g.ref)&&p.ref!=h&&(p.ref&&Zn(p.ref,null,g),f.push(h,g.__c||v,g)),v!=null&&(_==null&&(_=v),j=!(L=p===Ht||p.__v===null)&&x===S,L?x==-1&&F--:x!==S&&(x===S+1?(F++,j=!0):x>S?k>C-S?(F+=x-S,j=!0):F--:F=x<S&&x==S-1?x-S:0),S=u+F,j=j||x==u&&!L,typeof g.type!="function"||x===S&&p.__k!==g.__k?typeof g.type=="function"||j?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=v.nextSibling:l=io(e,v,l):l=no(g,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,u=B;u--;)V[u]!=null&&(typeof r.type=="function"&&V[u].__e!=null&&V[u].__e==r.__d&&(r.__d=V[u].__e.nextSibling),co(V[u],V[u]))}function no(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t=typeof n.type=="function"?no(n,t,r):io(r,n.__e,t));return t}function it(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wr(e)?e.some(function(r){it(r,t)}):t.push(e)),t}function io(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function Gu(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&a===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&i==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&i==l.key&&a===l.type)return s;s++}}return-1}function Yu(e,t,r,n,i){var a;for(a in r)a==="children"||a==="key"||a in t||Gr(e,a,null,r[a],n);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||Gr(e,a,t[a],r[a],n)}function ao(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Hu.test(t)?r:r+"px"}function Gr(e,t,r,n,i){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||ao(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||ao(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?so:oo,a):e.removeEventListener(t,a?so:oo,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function oo(e){return this.l[e.type+!1](R.event?R.event(e):e)}function so(e){return this.l[e.type+!0](R.event?R.event(e):e)}function Jn(e,t,r,n,i,a,o,s,l,c){var f,u,h,p,g,v,_,S,x,L,j,F,V,B,k,C=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(f=R.__b)&&f(t);try{e:if(typeof C=="function"){if(S=t.props,x=(f=C.contextType)&&n[f.__c],L=f?x?x.props.value:f.__:n,r.__c?_=(u=t.__c=r.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(S,L):(t.__c=u=new Be(S,L),u.constructor=C,u.render=Zu),x&&x.sub(u),u.props=S,u.state||(u.state={}),u.context=L,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),C.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=nt({},u.__s)),nt(u.__s,C.getDerivedStateFromProps(S,u.__s))),p=u.props,g=u.state,u.__v=t,h)C.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(C.getDerivedStateFromProps==null&&S!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,L),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,L)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(I){I&&(I.__=t)}),j=0;j<u._sb.length;j++)u.__h.push(u._sb[j]);u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,L),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,g,v)})}if(u.context=L,u.props=S,u.__P=e,u.__e=!1,F=R.__r,V=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,F&&F(t),f=u.render(u.props,u.state,u.context),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[]}else do u.__d=!1,F&&F(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++V<25);u.state=u.__s,u.getChildContext!=null&&(n=nt(nt({},n),u.getChildContext())),h||u.getSnapshotBeforeUpdate==null||(v=u.getSnapshotBeforeUpdate(p,g)),ro(e,Wr(k=f!=null&&f.type===ce&&f.key==null?f.props.children:f)?k:[k],t,r,n,i,a,o,s,l,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),_&&(u.__E=u.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Ju(r.__e,t,r,n,i,a,o,l,c);(f=R.diffed)&&f(t)}catch(I){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),R.__e(I,t,r)}}function lo(e,t,r){for(var n=0;n<r.length;n++)Zn(r[n],r[++n],r[++n]);R.__c&&R.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){R.__e(a,i.__v)}})}function Ju(e,t,r,n,i,a,o,s,l){var c,f,u,h=r.props,p=t.props,g=t.type,v=0;if(g==="svg"&&(i=!0),a!=null){for(;v<a.length;v++)if((c=a[v])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,a[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),a=null,s=!1}if(g===null)h===p||s&&e.data===p||(e.data=p);else{if(a=a&&cr.call(e.childNodes),f=(h=r.props||Ht).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(a!=null)for(h={},v=0;v<e.attributes.length;v++)h[e.attributes[v].name]=e.attributes[v].value;(u||f)&&(u&&(f&&u.__html==f.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(Yu(e,p,h,i,s),u)t.__k=[];else if(ro(e,Wr(v=t.props.children)?v:[v],t,r,n,i&&g!=="foreignObject",a,o,a?a[0]:r.__k&&Hr(r,0),s,l),a!=null)for(v=a.length;v--;)a[v]!=null&&eo(a[v]);s||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==h.value)&&Gr(e,"value",v,h.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Gr(e,"checked",v,h.checked,!1))}return e}function Zn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){R.__e(n,r)}}function co(e,t,r){var n,i;if(R.unmount&&R.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Zn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){R.__e(a,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&co(n[i],t,r||typeof e.type!="function");r||e.__e==null||eo(e.__e),e.__=e.__e=e.__d=void 0}function Zu(e,t,r){return this.constructor(e,r)}function It(e,t,r){var n,i,a,o;R.__&&R.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Jn(t,e=(!n&&r||t).__k=Oe(ce,null,[e]),i||Ht,Ht,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?cr.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),lo(a,e,o)}function uo(e,t){It(e,t,uo)}function Xu(e,t,r){var n,i,a,o,s=nt({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?cr.call(arguments,2):r),ur(e.type,s,n||e.key,i||e.ref,null)}function fo(e,t){var r={__c:t="__cC"+Xa++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Yn(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}cr=Qa.slice,R={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},Ga=0,Ya=function(e){return e!=null&&e.constructor===void 0},Be.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=nt({},this.state),typeof e=="function"&&(e=e(nt({},r),this.props)),e&&nt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Yn(this))},Be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yn(this))},Be.prototype.render=ce,At=[],Za=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gn=function(e,t){return e.__v.__b-t.__v.__b},Kr.__r=0,Xa=0;var ht,ne,Xn,po,Kt=0,ho=[],Yr=[],go=R.__b,bo=R.__r,mo=R.diffed,vo=R.__c,wo=R.unmount;function Gt(e,t){R.__h&&R.__h(ne,e,Kt||t),Kt=0;var r=ne.__H||(ne.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Yr}),r.__[e]}function ze(e){return Kt=1,yo(ko,e)}function yo(e,t,r){var n=Gt(ht++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):ko(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=ne,!ne.u)){var i=function(s,l,c){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!a||a.call(this,s,l,c);var u=!1;return f.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!a||a.call(this,s,l,c))};ne.u=!0;var a=ne.shouldComponentUpdate,o=ne.componentWillUpdate;ne.componentWillUpdate=function(s,l,c){if(this.__e){var f=a;a=void 0,i(s,l,c),a=f}o&&o.call(this,s,l,c)},ne.shouldComponentUpdate=i}return n.__N||n.__}function Tt(e,t){var r=Gt(ht++,3);!R.__s&&ei(r.__H,t)&&(r.__=e,r.i=t,ne.__H.__h.push(r))}function Ee(e,t){var r=Gt(ht++,4);!R.__s&&ei(r.__H,t)&&(r.__=e,r.i=t,ne.__h.push(r))}function ge(e){return Kt=5,gt(function(){return{current:e}},[])}function Qu(e,t,r){Kt=6,Ee(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function gt(e,t){var r=Gt(ht++,7);return ei(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ed(e,t){return Kt=8,gt(function(){return e},t)}function _o(e){var t=ne.context[e.__c],r=Gt(ht++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(ne)),t.props.value):e.__}function td(e,t){R.useDebugValue&&R.useDebugValue(t?t(e):e)}function rd(){var e=Gt(ht++,11);if(!e.__){for(var t=ne.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function nd(){for(var e;e=ho.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Jr),e.__H.__h.forEach(Qn),e.__H.__h=[]}catch(t){e.__H.__h=[],R.__e(t,e.__v)}}R.__b=function(e){ne=null,go&&go(e)},R.__r=function(e){bo&&bo(e),ht=0;var t=(ne=e.__c).__H;t&&(Xn===ne?(t.__h=[],ne.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Yr,r.__N=r.i=void 0})):(t.__h.forEach(Jr),t.__h.forEach(Qn),t.__h=[],ht=0)),Xn=ne},R.diffed=function(e){mo&&mo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ho.push(t)!==1&&po===R.requestAnimationFrame||((po=R.requestAnimationFrame)||id)(nd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Yr&&(r.__=r.__V),r.i=void 0,r.__V=Yr})),Xn=ne=null},R.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Jr),r.__h=r.__h.filter(function(n){return!n.__||Qn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],R.__e(n,r.__v)}}),vo&&vo(e,t)},R.unmount=function(e){wo&&wo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Jr(n)}catch(i){t=i}}),r.__H=void 0,t&&R.__e(t,r.__v))};var xo=typeof requestAnimationFrame=="function";function id(e){var t,r=function(){clearTimeout(n),xo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);xo&&(t=requestAnimationFrame(r))}function Jr(e){var t=ne,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),ne=t}function Qn(e){var t=ne;e.__c=e.__(),ne=t}function ei(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ko(e,t){return typeof t=="function"?t(e):t}var ad=Symbol.for("preact-signals");function ti(){if(Yt>1)Yt--;else{for(var e,t=!1;dr!==void 0;){var r=dr;for(dr=void 0,ri++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Co(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(ri=0,Yt--,t)throw e}}var Z=void 0,dr=void 0,Yt=0,ri=0,Zr=0;function So(e){if(Z!==void 0){var t=e.n;if(t===void 0||t.t!==Z)return t={i:0,S:e,p:Z.s,n:void 0,t:Z,e:void 0,x:void 0,r:t},Z.s!==void 0&&(Z.s.n=t),Z.s=t,e.n=t,32&Z.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Z.s,t.n=void 0,Z.s.n=t,Z.s=t),t}}function ye(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ye.prototype.brand=ad,ye.prototype.h=function(){return!0},ye.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},ye.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},ye.prototype.subscribe=function(e){var t=this;return Xr(function(){var r=t.value,n=Z;Z=void 0;try{e(r)}finally{Z=n}})},ye.prototype.valueOf=function(){return this.value},ye.prototype.toString=function(){return this.value+""},ye.prototype.toJSON=function(){return this.value},ye.prototype.peek=function(){var e=Z;Z=void 0;try{return this.value}finally{Z=e}},Object.defineProperty(ye.prototype,"value",{get:function(){var e=So(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ri>100)throw new Error("Cycle detected");this.v=e,this.i++,Zr++,Yt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ti()}}}});function Ne(e){return new ye(e)}function Co(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Eo(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function $o(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Jt(e){ye.call(this,void 0),this.x=e,this.s=void 0,this.g=Zr-1,this.f=4}(Jt.prototype=new ye).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Zr))return!0;if(this.g=Zr,this.f|=1,this.i>0&&!Co(this))return this.f&=-2,!0;var e=Z;try{Eo(this),Z=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Z=e,$o(this),this.f&=-2,!0},Jt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ye.prototype.S.call(this,e)},Jt.prototype.U=function(e){if(this.t!==void 0&&(ye.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Jt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Jt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=So(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function od(e){return new Jt(e)}function Ao(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Yt++;var r=Z;Z=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,ni(e),n}finally{Z=r,ti()}}}function ni(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ao(e)}function sd(e){if(Z!==this)throw new Error("Out-of-order effect");$o(this),Z=e,this.f&=-2,8&this.f&&ni(this),ti()}function fr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}fr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},fr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ao(this),Eo(this),Yt++;var e=Z;return Z=this,sd.bind(this,e)},fr.prototype.N=function(){2&this.f||(this.f|=2,this.o=dr,dr=this)},fr.prototype.d=function(){this.f|=8,1&this.f||ni(this)};function Xr(e){var t=new fr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var ii;function Zt(e,t){R[e]=t.bind(null,R[e]||function(){})}function Qr(e){ii&&ii(),ii=e&&e.S()}function Io(e){var t=this,r=e.data,n=cd(r);n.value=r;var i=gt(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Ya(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},od(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}Io.displayName="_st",Object.defineProperties(ye.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Io},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Zt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var a=n[i];a instanceof ye&&(r||(t.__np=r={}),r[i]=a,n[i]=a.peek())}}e(t)}),Zt("__r",function(e,t){Qr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(i){var a;return Xr(function(){a=this}),a.c=function(){n.__$f|=1,n.setState({})},a})())),Qr(r),e(t)}),Zt("__e",function(e,t,r,n){Qr(),e(t,r,n)}),Zt("diffed",function(e,t){Qr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in n)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in n){var c=a[l],f=n[l];c===void 0?(c=ld(r,l,f,i),a[l]=c):c.o(f,i)}}}e(t)});function ld(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=Ne(r);return{o:function(o,s){a.value=o,n=s},d:Xr(function(){var o=a.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Zt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var a=n[i];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),Zt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),Be.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function cd(e){return gt(function(){return Ne(e)},[])}const $e=Symbol.for("@ts-pattern/matcher"),To=Symbol.for("@ts-pattern/isVariadic"),en="@ts-pattern/anonymous-select-key",ai=e=>!!(e&&typeof e=="object"),tn=e=>e&&!!e[$e],de=(e,t,r)=>{if(tn(e)){const n=e[$e](),{matched:i,selections:a}=n.match(t);return i&&a&&Object.keys(a).forEach(o=>r(o,a[o])),i}if(ai(e)){if(!ai(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],a=[];for(const o of e.keys()){const s=e[o];tn(s)&&s[To]?a.push(s):a.length?i.push(s):n.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const o=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((c,f)=>de(c,o[f],r))&&i.every((c,f)=>de(c,s[f],r))&&(a.length===0||de(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>de(o,t[s],r))}return Reflect.ownKeys(e).every(n=>{const i=e[n];return(n in t||tn(a=i)&&a[$e]().matcherType==="optional")&&de(i,t[n],r);var a})}return Object.is(t,e)},Ae=e=>{var t,r,n;return ai(e)?tn(e)?(t=(r=(n=e[$e]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?pr(e,Ae):pr(Object.values(e),Ae):[]},pr=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Do(...e){if(e.length===1){const[t]=e;return r=>de(t,r,()=>{})}if(e.length===2){const[t,r]=e;return de(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function be(e){return Object.assign(e,{optional:()=>si(e),and:t=>ie(e,t),or:t=>Mo(e,t),select:t=>t===void 0?hr(e):hr(t,e)})}function oi(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(t,{[To]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var i;return(i=n[r++])!=null?i:n.at(-1)}}}}))(e),{optional:()=>oi(si(e)),select:t=>oi(t===void 0?hr(e):hr(t,e))})}function si(e){return be({[$e]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return t===void 0?(Ae(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:de(e,t,n),selections:r}},getSelectionKeys:()=>Ae(e),matcherType:"optional"})})}const ud=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},dd=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0},fd=(e,t)=>{const r=Reflect.ownKeys(e);for(const n of r)if(!t(n,e[n]))return!1;return!0};function ie(...e){return be({[$e]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return{matched:e.every(i=>de(i,t,n)),selections:r}},getSelectionKeys:()=>pr(e,Ae),matcherType:"and"})})}function Mo(...e){return be({[$e]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return pr(e,Ae).forEach(i=>n(i,void 0)),{matched:e.some(i=>de(i,t,n)),selections:r}},getSelectionKeys:()=>pr(e,Ae),matcherType:"or"})})}function W(e){return{[$e]:()=>({match:t=>({matched:!!e(t)})})}}function hr(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return be({[$e]:()=>({match:n=>{let i={[t??en]:n};return{matched:r===void 0||de(r,n,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??en].concat(r===void 0?[]:Ae(r))})})}function Lo(e){return!0}function Ge(e){return typeof e=="number"}function bt(e){return typeof e=="string"}function mt(e){return typeof e=="bigint"}const jo=be(W(Lo)),pd=be(W(Lo)),hd=jo,vt=e=>Object.assign(be(e),{startsWith:t=>{return vt(ie(e,(r=t,W(n=>bt(n)&&n.startsWith(r)))));var r},endsWith:t=>{return vt(ie(e,(r=t,W(n=>bt(n)&&n.endsWith(r)))));var r},minLength:t=>vt(ie(e,(r=>W(n=>bt(n)&&n.length>=r))(t))),length:t=>vt(ie(e,(r=>W(n=>bt(n)&&n.length===r))(t))),maxLength:t=>vt(ie(e,(r=>W(n=>bt(n)&&n.length<=r))(t))),includes:t=>{return vt(ie(e,(r=t,W(n=>bt(n)&&n.includes(r)))));var r},regex:t=>{return vt(ie(e,(r=t,W(n=>bt(n)&&!!n.match(r)))));var r}}),Fo=vt(W(bt)),Ye=e=>Object.assign(be(e),{between:(t,r)=>Ye(ie(e,((n,i)=>W(a=>Ge(a)&&n<=a&&i>=a))(t,r))),lt:t=>Ye(ie(e,(r=>W(n=>Ge(n)&&n<r))(t))),gt:t=>Ye(ie(e,(r=>W(n=>Ge(n)&&n>r))(t))),lte:t=>Ye(ie(e,(r=>W(n=>Ge(n)&&n<=r))(t))),gte:t=>Ye(ie(e,(r=>W(n=>Ge(n)&&n>=r))(t))),int:()=>Ye(ie(e,W(t=>Ge(t)&&Number.isInteger(t)))),finite:()=>Ye(ie(e,W(t=>Ge(t)&&Number.isFinite(t)))),positive:()=>Ye(ie(e,W(t=>Ge(t)&&t>0))),negative:()=>Ye(ie(e,W(t=>Ge(t)&&t<0)))}),gd=Ye(W(Ge)),wt=e=>Object.assign(be(e),{between:(t,r)=>wt(ie(e,((n,i)=>W(a=>mt(a)&&n<=a&&i>=a))(t,r))),lt:t=>wt(ie(e,(r=>W(n=>mt(n)&&n<r))(t))),gt:t=>wt(ie(e,(r=>W(n=>mt(n)&&n>r))(t))),lte:t=>wt(ie(e,(r=>W(n=>mt(n)&&n<=r))(t))),gte:t=>wt(ie(e,(r=>W(n=>mt(n)&&n>=r))(t))),positive:()=>wt(ie(e,W(t=>mt(t)&&t>0))),negative:()=>wt(ie(e,W(t=>mt(t)&&t<0)))}),bd=wt(W(mt)),md=be(W(function(e){return typeof e=="boolean"})),vd=be(W(function(e){return typeof e=="symbol"})),wd=be(W(function(e){return e==null})),yd=be(W(function(e){return e!=null}));var Dt={__proto__:null,matcher:$e,optional:si,array:function(...e){return oi({[$e]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return Ae(r).forEach(a=>{n[a]=[]}),{matched:!0,selections:n};const i=(a,o)=>{n[a]=(n[a]||[]).concat([o])};return{matched:t.every(a=>de(r,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Ae(e[0])})})},set:function(...e){return be({[$e]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(a,o)=>{r[a]=(r[a]||[]).concat([o])},i=e[0];return{matched:ud(t,a=>de(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Ae(e[0])})})},map:function(...e){return be({[$e]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:dd(t,(s,l)=>{const c=de(a,l,n),f=de(o,s,n);return c&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...Ae(e[0]),...Ae(e[1])]})})},record:function(...e){return be({[$e]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var r;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=e[0])==null?void 0:r.toString()}`);let n={};const i=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[a,o]=e.length===1?[Fo,e[0]]:e;return{matched:fd(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),f=c!==null&&de(a,c,i),u=de(a,s,i),h=de(o,l,i);return(u||f)&&h}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Ae(e[0]),...Ae(e[1])]})})},intersection:ie,union:Mo,not:function(e){return be({[$e]:()=>({match:t=>({matched:!de(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:W,select:hr,any:jo,unknown:pd,_:hd,string:Fo,number:gd,bigint:bd,boolean:md,symbol:vd,nullish:wd,nonNullable:yd,instanceOf:function(e){return be(W((function(t){return r=>r instanceof t})(e)))},shape:function(e){return be(W(Do(e)))}};let _d=class extends Error{constructor(t){let r;try{r=JSON.stringify(t)}catch{r=t}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=t}};const li={matched:!1,value:void 0};function rn(e){return new xd(e,li)}let xd=class na{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(c,f)=>{a=!0,o[c]=f},l=!n.some(c=>de(c,this.input,s))||i&&!i(this.input)?li:{matched:!0,value:r(a?en in o?o[en]:o:this.input,this.input)};return new na(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new na(this.input,n?{matched:!0,value:r(this.input,this.input)}:li)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=kd){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function kd(e){throw new _d(e)}var Sd=0;function d(e,t,r,n,i,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Sd,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return R.vnode&&R.vnode(c),c}function Oo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Oo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function at(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Oo(e))&&(n&&(n+=" "),n+=t);return n}const No=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Po=at,Mt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Po(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(c=>{const f=r==null?void 0:r[c],u=a==null?void 0:a[c];if(f===null)return null;const h=No(f)||No(u);return i[c][h]}),s=r&&Object.entries(r).reduce((c,f)=>{let[u,h]=f;return h===void 0||(c[u]=h),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:u,className:h,...p}=f;return Object.entries(p).every(g=>{let[v,_]=g;return Array.isArray(_)?_.includes({...a,...s}[v]):{...a,...s}[v]===_})?[...c,u,h]:c},[]);return Po(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Ro(e,t){for(var r in t)e[r]=t[r];return e}function ci(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ui(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function di(e){this.props=e}function Cd(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:ci(this.props,i)}function n(i){return this.shouldComponentUpdate=r,Oe(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(di.prototype=new Be).isPureReactComponent=!0,di.prototype.shouldComponentUpdate=function(e,t){return ci(this.props,e)||ci(this.state,t)};var Vo=R.__b;R.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Vo&&Vo(e)};var Ed=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function fi(e){function t(r){var n=Ro({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Ed,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Bo=function(e,t){return e==null?null:it(it(e).map(t))},$d={map:Bo,forEach:Bo,count:function(e){return e?it(e).length:0},only:function(e){var t=it(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:it},Ad=R.__e;R.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Ad(e,t,r,n)};var zo=R.unmount;function Uo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Ro({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Uo(n,t,r)})),e}function qo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return qo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function gr(){this.__u=0,this.t=null,this.__b=null}function Wo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ho(e){var t,r,n;function i(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return Oe(r,a)}return i.displayName="Lazy",i.__f=!0,i}function br(){this.u=null,this.o=null}R.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),zo&&zo(e)},(gr.prototype=new Be).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Wo(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var c=n.state.__a;n.__v.__k[0]=qo(c,c.__c.__P,c.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},gr.prototype.componentWillUnmount=function(){this.t=[]},gr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Uo(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&Oe(ce,null,e.fallback);return i&&(i.__h=null),[Oe(ce,null,t.__a?null:e.children),i]};var Ko=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Id(e){return this.getChildContext=function(){return e.context},e.children}function Td(e){var t=this,r=e.i;t.componentWillUnmount=function(){It(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),It(Oe(Id,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Dd(e,t){var r=Oe(Td,{__v:e,i:t});return r.containerInfo=t,r}(br.prototype=new Be).__a=function(e){var t=this,r=Wo(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),Ko(t,e,n)):i()};r?r(a):a()}},br.prototype.render=function(e){this.u=null,this.o=new Map;var t=it(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},br.prototype.componentDidUpdate=br.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ko(e,r,t)})};var Go=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Md=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ld=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,jd=/[A-Z0-9]/g,Fd=typeof document<"u",Od=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Nd(e,t,r){return t.__k==null&&(t.textContent=""),It(e,t),typeof r=="function"&&r(),e?e.__c:null}function Pd(e,t,r){return uo(e,t),typeof r=="function"&&r(),e?e.__c:null}Be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Be.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Yo=R.event;function Rd(){}function Vd(){return this.cancelBubble}function Bd(){return this.defaultPrevented}R.event=function(e){return Yo&&(e=Yo(e)),e.persist=Rd,e.isPropagationStopped=Vd,e.isDefaultPrevented=Bd,e.nativeEvent=e};var pi,zd={enumerable:!1,configurable:!0,get:function(){return this.class}},Jo=R.vnode;R.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Fd&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Od(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Ld.test(a)?a=s:n.indexOf("-")===-1&&Md.test(a)?a=a.replace(jd,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&i[a=s]&&(a="oninputCapture"),i[a]=o}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=it(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=it(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",zd)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i})(e),e.$$typeof=Go,Jo&&Jo(e)};var Zo=R.__r;R.__r=function(e){Zo&&Zo(e),pi=e.__c};var Xo=R.diffed;R.diffed=function(e){Xo&&Xo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),pi=null};var Ud={ReactCurrentDispatcher:{current:{readContext:function(e){return pi.__n[e.__c].props.value}}}};function qd(e){return Oe.bind(null,e)}function Qo(e){return!!e&&e.$$typeof===Go}function Wd(e){return Qo(e)?Xu.apply(null,arguments):e}function Hd(e){return!!e.__k&&(It(null,e),!0)}function Kd(e){return e&&(e.base||e.nodeType===1&&e)||null}var Gd=function(e,t){return e(t)},Yd=function(e,t){return e(t)},Jd=ce;function es(e){e()}function Zd(e){return e}function Xd(){return[!1,es]}var Qd=Ee;function ef(e,t){var r=t(),n=ze({h:{__:r,v:t}}),i=n[0].h,a=n[1];return Ee(function(){i.__=r,i.v=t,ui(i.__,t())||a({h:i})},[e,r,t]),Tt(function(){return ui(i.__,i.v())||a({h:i}),e(function(){ui(i.__,i.v())||a({h:i})})},[e]),r}var Ie={useState:ze,useId:rd,useReducer:yo,useEffect:Tt,useLayoutEffect:Ee,useInsertionEffect:Qd,useTransition:Xd,useDeferredValue:Zd,useSyncExternalStore:ef,startTransition:es,useRef:ge,useImperativeHandle:Qu,useMemo:gt,useCallback:ed,useContext:_o,useDebugValue:td,version:"17.0.2",Children:$d,render:Nd,hydrate:Pd,unmountComponentAtNode:Hd,createPortal:Dd,createElement:Oe,createContext:fo,createFactory:qd,cloneElement:Wd,createRef:Ku,Fragment:ce,isValidElement:Qo,findDOMNode:Kd,Component:Be,PureComponent:di,memo:Cd,forwardRef:fi,flushSync:Yd,unstable_batchedUpdates:Gd,StrictMode:Jd,Suspense:gr,SuspenseList:br,lazy:Ho,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ud},tf=["other","few","many","two","one","zero"],ts=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function i(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,c)=>{var f;return((f=o==null?void 0:o[c])==null?void 0:f.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=n.select(o.count);if(!(l in s)){const c=tf.find(f=>f in s);if(!c)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=c}return s[l].replace(/{{(\w+)}}/g,(c,f)=>{var u;return((u=o==null?void 0:o[f])==null?void 0:u.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return i},rs=fo(null),ns=e=>({defaultTerms:e,TranslationProvider:({terms:t,children:r,locale:n})=>{const i=gt(()=>ts({locale:n,terms:e,overrides:t}),[t,n]);return d(rs.Provider,{value:{t:i,locale:n},children:r})},useTranslation:()=>{const t=_o(rs);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>ts({terms:e,overrides:t,locale:r})}),rf={conversation_history:"Conversation history",jump_to_current:"Jump to current question",send:"Send",submitting:"Sending your application…",skip:"Skip",skipped:"Skipped",submission_closed:"Sorry, this role closed while you were applying.",submission_duplicate_earlier_attempt:"You've already applied for this role. If that doesn't sound right, it's most likely a hiccup from your earlier attempt — don't worry, we have your application.",submission_failed:"We couldn't submit your application. Choose Restart to try again.",submission_unknown_do_not_resubmit:"We couldn't confirm whether your application went through, and submitting it again won't help. Please don't keep resubmitting — check your email for a confirmation, or contact the employer if nothing arrives.",submission_unreadable_document:"We couldn't read that file. Please upload a different one.",submission_cooldown:{one:"Submit will be available again in {{count}} second.",other:"Submit will be available again in {{count}} seconds."},submission_cooldown_ready:"Submit is available again.",captcha_check:"One quick check before we send your application",submission_still_working:"Sending your application, this can take up to a minute. Please keep this page open.",file_preparing:{one:"Preparing your file…",other:"Preparing your files…"},file_ready:{one:"Your file is ready to send",other:"Your files are ready to send"},file_read_error:"We couldn't read this file. Select it again or choose another file.",file_read_error_replacement:"We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.",address_error:"We couldn't search for that address. Try again, or fill it in manually.",address_searching:"Searching addresses…",address_no_results:"We couldn't find that address. Check the spelling or postcode, or fill it in manually.",restart:"Restart",chat_messages:"Chat messages",file_name:"File name",file_size:"File size",file_total_size:"{{size}} total",loading:"Loading",minimize:"Minimise"},{defaultTerms:nf}=ns({submission_redirect_message:"One last step: finish your application on the employer's site.",complete_submission:"Continue on the employer's site",submission_completed:"Submission completed!",submission_pending:"Thanks, we've received your application and are processing it.",submission_failed:"Failed to submit",submission_provider_maintenance:"Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_provider_maintenance_later:"Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.",submission_available_at:"Submit will be available again at {{time}}.",resume_prompt:"You have an unfinished application for this role. Continue where you left off?",resume_continue:"Continue",resume_start_again:"Start again",captcha_failed:"Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.",close_application:"Close application",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country",select_country:"Select a country",validation_empty:"Please enter a value",validation_date:"Please enter a valid date (YYYY-MM-DD)",validation_email:"That doesn’t look like a valid email address",validation_url:"That doesn’t look like a valid URL",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_phone_min_chars:"Your phone number must be at least {{count}} digits long",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_whole:"Enter a whole number",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_min:{one:"Please upload at least one file",other:"Please only upload at least {{count}} files"},validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"},validation_file_size:"Your file is too big. Please upload a file smaller than {{size}}",validation_file_empty:"This file is empty. If it’s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.",validation_required:"This field is required.",validation_multiple_choice_min:{one:"Please select at least {{count}} option",other:"Please select at least {{count}} options"},validation_multiple_choice_max:{one:"Please select at most {{count}} option",other:"Please select at most {{count}} options"},optional:"optional"});const{TranslationProvider:af,useTranslation:ue,createTFunction:of}=ns({...nf,...rf,error_heading:"Something unexpected happened",flow_closed:"This role is no longer accepting applications.",undo:"Change answer",job_alerts_offer:"Want to hear about similar roles? We can email you at {{email}} when new ones open.",job_alerts_accept:"Get job alerts",job_alerts_decline:"No thanks",job_alerts_privacy:"We'll use your email only for these alerts. You can unsubscribe at any time.",job_alerts_privacy_sender:"{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.",job_alerts_success:"Done. We'll email you about similar roles.",job_alerts_error:"Sorry, we couldn't set that up. Please try again later.",submission_duplicate:"You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.",submission_retryable:"We couldn't submit your application. Please try again.",submission_unknown:"We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.",maximize:"Maximise",submit:"Submit",file_more:{one:"+{{count}} file",other:"+{{count}} files"}});function ot(e,t){if(!e)throw new Error(t)}var mr=/\b(?:GIR\s*0AA|[a-z]{1,2}\d[\da-z]?\s*\d[a-z]{2}|[a-z](?:\d{2}|\d[a-z])\s*[\da-z]{4})\b/i,is=/^(?:GIR0AA|[A-Z]{1,2}\d[\dA-Z]?\d[A-Z]{2})$/,as=/^[A-Z](?:\d{2}|\d[A-Z])[\dA-Z]{4}$/,os=({postcode:e,label:t="",state:r,country:n})=>{var s,l,c;const i=((e==null?void 0:e.trim())||((s=t.match(mr))==null?void 0:s[0])||"").replace(/\s/g,"").toUpperCase();if(is.test(i))return i.startsWith("BT")?"ni":"gb";if(as.test(i))return"ie";const a=f=>f.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim();if(a(r??"")==="northern ireland"||t.split(",").some(f=>a(f)==="northern ireland"))return"ni";const o=(c=(n==null?void 0:n.trim())||((l=t.split(",").at(-1))==null?void 0:l.trim()))==null?void 0:c.toLowerCase();return o==="united kingdom"||o==="gb"?"gb":o==="ireland"||o==="ie"?"ie":null},sf="https://maps.inploi.com/address",lf=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim(),ss=e=>e.split(",").map(t=>lf(t).replace(/^\d+[a-z]?(?:\s*[-/]\s*\d+[a-z]?)?(?:\s+|$)/,"").trim()),ls=e=>is.test(e)?`gb:${e.slice(0,-3)}`:as.test(e)?`ie:${e.slice(0,3)}`:null,cf=(e,t,r)=>{const[n="",i=""]=ss(e),a=ls(t),o=i.replace(mr,"").trim(),s=o&&!["united kingdom","ireland","england","scotland","wales","northern ireland"].includes(o);if(!n||!a&&!s)return null;const l=r.slice(0,3).findIndex(c=>{var p;const f=ss(c);if(!f.includes(n))return!1;const u=((p=c.match(mr))==null?void 0:p[0].replace(/\s/g,"").toUpperCase())??"",h=ls(u);return a&&h?a===h:!!(s&&f.some(g=>g.replace(mr,"").trim()===o))});return l===-1?null:l+1},uf=async({query:e,country:t,pickedLabel:r,pickedPostcode:n,pickedCountry:i,pickedState:a,log:o})=>{var l,c,f;if(!t||!t.split(",").every(u=>/^(gb|ie)$/i.test(u.trim())))return;let s;try{const u=new AbortController;s=setTimeout(()=>u.abort(),1500);const h=new URL(sf);h.search=new URLSearchParams({q:e,country:t,limit:"5"}).toString();const p=await fetch(h.href,{signal:u.signal});if(!p.ok)return;const g=await p.json();if(typeof g!="object"||g===null||!("results"in g)||!Array.isArray(g.results)||!("source"in g)||g.source!=="photon"&&g.source!=="mapbox")return;const v=g.results,_=[];for(const B of v){if(typeof B!="object"||B===null||!("label"in B)||typeof B.label!="string")return;_.push(B.label)}const S=((n==null?void 0:n.trim())||((l=r.match(mr))==null?void 0:l[0])||"").replace(/\s/g,"").toUpperCase(),x=cf(r,S,_),L=(f=(c=p.headers.get("Server-Timing"))==null?void 0:c.match(/(?:^|,)\s*lookup\s*;\s*dur=([\d.]+)/))==null?void 0:f[1],j=L===void 0?null:Number(L),F=p.headers.get("X-Geo-Fallback"),V=os({postcode:n,label:r,state:a,country:i});await o({hit:x!==null,rank:x,results:_.length,source:g.source,fallback:F&&/^[a-z0-9_-]{1,64}$/i.test(F)?F:null,ms:j!==null&&Number.isFinite(j)?j:null,region:V})}catch{}finally{clearTimeout(s)}},df="https://maps.inploi.com",ff=async(e,t,r=Date.now()+2500)=>{t==null||t.throwIfAborted();const n=new AbortController,i=()=>n.abort(t==null?void 0:t.reason);t==null||t.addEventListener("abort",i,{once:!0});let a;try{const o=new Promise((l,c)=>{n.signal.addEventListener("abort",()=>c(n.signal.reason),{once:!0}),a=setTimeout(()=>n.abort(),Math.max(0,r-Date.now()))}),s=await Promise.race([e(n.signal),o]);return t==null||t.throwIfAborted(),s}catch{t==null||t.throwIfAborted();return}finally{clearTimeout(a),t==null||t.removeEventListener("abort",i)}},pf=async(e,t,r)=>await ff(async i=>{const{lookupAddress:a}=await Promise.resolve().then(()=>wh);return i.throwIfAborted(),a({...e,signal:i})},e.signal,r)??{results:await t(),arm:"direct",source:"direct"},hf=e=>{try{const t=new URL("/outcome",df);t.search=new URLSearchParams({kind:e.kind,surface:e.surface,arm:e.arm,picked:e.picked?"1":"0"}).toString(),t.searchParams.set("source",e.source),e.picked&&e.edited!==void 0&&t.searchParams.set("edited",e.edited?"1":"0"),e.region&&t.searchParams.set("region",e.region),fetch(t.href,{keepalive:!0}).catch(()=>{})}catch{}},hi=e=>e===null||typeof e!="object"?e:Array.isArray(e)?e.map(hi):Object.keys(e).sort().reduce((t,r)=>(t[r]=hi(e[r]),t),{}),gf=e=>{let t=JSON.stringify(hi(e)),r=5381;for(let n=0;n<t.length;n++)r=r*33^t.charCodeAt(n);return(r>>>0).toString(36)};const gi=(e,t)=>t.some(r=>e instanceof r);let cs,us;function bf(){return cs||(cs=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function mf(){return us||(us=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bi=new WeakMap,mi=new WeakMap,nn=new WeakMap;function vf(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(Lt(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return nn.set(t,e),t}function wf(e){if(bi.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});bi.set(e,t)}let vi={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return bi.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Lt(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function ds(e){vi=e(vi)}function yf(e){return mf().includes(e)?function(...t){return e.apply(wi(this),t),Lt(this.request)}:function(...t){return Lt(e.apply(wi(this),t))}}function _f(e){return typeof e=="function"?yf(e):(e instanceof IDBTransaction&&wf(e),gi(e,bf())?new Proxy(e,vi):e)}function Lt(e){if(e instanceof IDBRequest)return vf(e);if(mi.has(e))return mi.get(e);const t=_f(e);return t!==e&&(mi.set(e,t),nn.set(t,e)),t}const wi=e=>nn.get(e);function xf(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Lt(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Lt(o.result),l.oldVersion,l.newVersion,Lt(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const kf=["get","getKey","getAll","getAllKeys","count"],Sf=["put","add","delete","clear"],yi=new Map;function fs(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(yi.get(t))return yi.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Sf.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||kf.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(s.shift())),(await Promise.all([c[r](...s),i&&l.done]))[0]};return yi.set(t,a),a}ds(e=>({...e,get:(t,r,n)=>fs(t,r)||e.get(t,r,n),has:(t,r)=>!!fs(t,r)||e.has(t,r)}));const Cf=["continue","continuePrimaryKey","advance"],ps={},_i=new WeakMap,hs=new WeakMap,Ef={get(e,t){if(!Cf.includes(t))return e[t];let r=ps[t];return r||(r=ps[t]=function(...n){_i.set(this,hs.get(this)[t](...n))}),r}};async function*$f(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Ef);for(hs.set(r,t),nn.set(r,wi(t));t;)yield r,t=await(_i.get(r)||t.continue()),_i.delete(r)}function gs(e,t){return t===Symbol.asyncIterator&&gi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&gi(e,[IDBIndex,IDBObjectStore])}ds(e=>({...e,get(t,r,n){return gs(t,r)?$f:e.get(t,r,n)},has(t,r){return gs(t,r)||e.has(t,r)}}));const bs=()=>xf("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}});let an;const xi=async e=>{if(typeof indexedDB>"u")return;const t=an??(an=bs());try{return await e(await t)}catch(r){if(!(r instanceof Error&&r.name==="InvalidStateError"))throw r;return an===t&&(an=bs()),e(await an)}},Af=e=>({...e,messages:e.messages.map(t=>{if(t.type!=="link")return t;const{onClick:r,...n}=t;return n})});let on,ki,vr;const ms=()=>{if(!on)return vr;const e=on;on=void 0;const t=ln(e),r=xi(n=>n.put("state",Af(e.data),t)).finally(()=>{vr===r&&(vr=void 0)});return vr=r,vr},ke={getStateData:async(e,t,r)=>{const n=ln({...e,flowKeys:t,context:r});return xi(i=>i.get("state",n))},getAllStateData:async()=>await xi(e=>e.getAll("state"))??[],setStateData:e=>{on=e,clearTimeout(ki),ki=setTimeout(()=>{ms()},1e3)},flushStateData:()=>(clearTimeout(ki),ms()??Promise.resolve())},Xt=e=>t=>t?t.type===e:!1,If=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),vs=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],startedWriteNodeIds:[],isFinished:!1,hasInteracted:!1,sequence:0,flowSessionId:If()}),Tf=e=>rn(e).with({nativeEvent:{submitter:Dt.select(Dt.union(Dt.instanceOf(HTMLButtonElement),Dt.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),sn=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(c=>c.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(c=>c.id===a),s=t.type.includes("question")?1:0;if(o){const c=s+Math.max(sn(e,i,r,n+s).remainingSteps,sn(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}}const l=s+sn(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},Df=e=>{const t={},r=e.find(n=>n.isHead);return r&&sn(e,r,(n,i)=>{t[n]=i}),t},ln=e=>[...e.flowKeys,e.id,e.version,e.build,gf(e.hostContext??e.context)].join("/"),Mf=({data:e,nodes:t})=>{const r=e.startedWriteNodeIds===void 0?t.some(n=>n.type==="integration-application-submit"&&e.nodeHistory.includes(n.id)):e.startedWriteNodeIds.length>0;return!e.isFinished&&!r&&ma(t,e.submissions)},ws=({data:e,nodes:t})=>{var r;return!e.isFinished&&((((r=e.startedWriteNodeIds)==null?void 0:r.length)??0)>0||ma(t,e.submissions))},Je=Ne({state:"idle"}),Si=new Set,jt=e=>{const{state:t,flow:r}=Je.value;if(t!=="loaded")return;ot(r,"No flow to update");const n=e(r.data);r.data=n,Je.value={state:t,flow:r},ke.setStateData(r)},O={current$:Je,viewState$:Ne("closed"),prepareFlow:async({jobAlerts:e,flow:t,context:r={},jobContext:n,flowKeys:i,title:a,analytics:o,job:s,employer:l,locationOrigin:c})=>{await ke.flushStateData().catch(()=>{});const f=await ke.getStateData(t,i,r),u=f??vs(),h=ln({...t,flowKeys:i,context:r}),p=f!==void 0&&!Si.has(h)&&Mf({data:u,nodes:t.nodes});return p||Si.add(h),{jobAlerts:e,data:u,offerResume:p,startedAt:new Date,nodeIdToProgress:Df(t.nodes),flowKeys:i,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:n===void 0?r:Pn(n,r),hostContext:n===void 0?void 0:r,title:a,analytics:o,job:s,employer:l,locationOrigin:c}},commitFlow:e=>{Je.value={state:"loaded",flow:e},ke.setStateData(e)},settleResume:e=>{e.offerResume=!1,Si.add(ln(e))},cancelCurrentFlow:()=>{Je.value={state:"idle"},O.viewState$.value="closed"},markAsFinished:()=>jt(e=>({...e,isFinished:!0})),markAsInteracted:()=>jt(e=>({...e,hasInteracted:!0})),setCurrentNodeId:e=>jt(t=>(t.nodeHistory.push(e),t)),setApplicationRecovery:async e=>{jt(t=>(e?t.applicationRecovery=e:delete t.applicationRecovery,t)),await ke.flushStateData()},restart:()=>{const{state:e,flow:t}=Je.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r={...vs(),failedAttemptAt:t.data.failedAttemptAt,unconfirmedAttemptKeys:t.data.unconfirmedAttemptKeys,submitCooldown:t.data.submitCooldown},n={...t,data:r,startedAt:new Date,offerResume:!1};Je.value={state:e,flow:n},ke.setStateData(n)},addMessage:(e,t)=>{const r={...e,groupId:t};return jt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Je.value;ot(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,ke.setStateData(r)},setSubmission:(e,t)=>jt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>jt(t=>({...t,currentInput:e??null})),persistWriteBarrier:async e=>{Je.peek().flow===e&&(Je.value={state:"loaded",flow:e}),ke.setStateData(e),await ke.flushStateData()}},ys=({heading:e})=>{const{t}=ue();return d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:d("p",{class:"text-error-11 font-bold",children:t(e)})})]})},cn=e=>{const{t}=ue();return d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:t("loading")}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]})},_s=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(cn,{class:"text-neutral-6 h-8 w-8"})}),Lf=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},jf=Mt("touch-hitbox fr relative flex-none rounded-full p-2 transition-all",{variants:{variant:{neutral:"text-neutral-11 hover:text-neutral-12 active:text-neutral-12 hover:bg-interactive-bg-hover active:bg-interactive-bg-active ",white:"text-white/80 hover:text-white active:text-white hover:bg-white/20 active:bg-white/30"}},defaultVariants:{variant:"neutral"}}),wr=({class:e,children:t,variant:r,...n})=>d("button",{class:at(jf({variant:r}),e),...n,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),xs=()=>d("path",{d:"M12.5 6.5L8 11L3.5 6.5"}),Ff=()=>{if(O.current$.value.state!=="loaded")return null;const e=O.current$.value.flow.nodeIdToProgress,t=O.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:Lf(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Of=({children:e,params:t,analytics:r,feedbackReady:n})=>{const{t:i}=ue(),a=O.viewState$,o=!!t.feedback&&O.current$.value.state==="loaded"&&a.value==="maximised",s=o&&n.value,l=ge(!1);return Tt(()=>{var c,f;!s||l.current||(l.current=!0,r.log({event:"INTERACTION",properties:{tag:"feedback_shown"},customProperties:(f=(c=O.current$.peek().flow)==null?void 0:c.analytics)==null?void 0:f.customProperties}))},[s,r]),d(ce,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"ring-neutral-7 flex h-[var(--header-height)] gap-2 rounded-t-3xl ring-0 ring-inset transition-all duration-300 [&:has(>.view-switch:focus-visible)]:ring-1",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{"aria-label":i("minimize"),onClick:()=>{a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ci,children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[t.feedback?d("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:at({hidden:!o}),children:d("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,O.current$.value.state==="loaded"&&d(wr,{class:"mx-1","aria-label":i("restart"),onClick:()=>{O.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(wr,{class:"view-switch mx-1",onTouchStart:Ci,"aria-label":i("minimize"),onClick:()=>a.value="minimised",children:d(xs,{})},"minmax")]})]}),d(Ff,{})]})})};function Ci(){}const Nf=Ho(()=>Promise.resolve().then(()=>tb).then(e=>e.ChatbotBody)),ks=Mt("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"max-w-[min(300px,calc(100vw-4rem))] h-[var(--header-height)] animate-slide-in-bottom",maximised:"max-w-[450px] h-[var(--content-height)] animate-maximise"}}}),Ss=Mt("relative flex h-full overflow-hidden rounded-3xl outline outline-1",{variants:{view:{closed:"hidden",minimised:"outline-accent-10 bg-accent-9",maximised:"outline-neutral-3 bg-neutral-1 flex-col"}}}),Pf=({open:e,...t})=>{const r=ge(null);return Ee(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),d("dialog",{ref:r,...t})},Rf=({env:e,logger:t,apiClient:r,rpcClient:n,analytics:i,talentBankClient:a,params:o,feedbackReady:s})=>{const{state:l,flow:c}=O.current$.value,f=O.viewState$.value,u=l!=="idle"&&f==="maximised",h=ge(null),p=c?[...c.data.nodeHistory].reverse().map(g=>c.nodes.find(v=>v.id===g)).find(g=>(g==null?void 0:g.type)==="flow-section"):void 0;return d(af,{terms:o.terms,locale:void 0,children:[d(Pf,{open:u,onClose:()=>O.viewState$.value="minimised",children:d("div",{ref:h,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:ks({view:"maximised"}),children:d("div",{class:Ss({view:"maximised"}),children:[d(Of,{params:o,analytics:i,feedbackReady:s,children:p?d(ce,{children:[d("span",{class:"block",children:p.data.title}),d("span",{class:"block truncate text-xs font-normal",children:c==null?void 0:c.title})]}):c==null?void 0:c.title}),rn({state:l,view:f}).with({state:"idle"},()=>null).with({state:"loading"},()=>d(_s,{},"loading")).with({state:"loaded"},()=>d(gr,{fallback:d(_s,{},"loading"),children:d(Nf,{env:e,rpcClient:n,analytics:i,apiClient:r,logger:t,talentBankClient:a})})).with({state:"closed"},()=>d(ys,{heading:"flow_closed"})).with({state:"error"},()=>d(ys,{heading:"error_heading"})).exhaustive()]})})}),f==="minimised"?d(Vf,{flow:c}):null]})},Vf=({flow:e})=>{const{t}=ue();return d("div",{class:ks({view:"minimised",class:"z-100 isolate"}),children:d("div",{class:Ss({view:"minimised"}),children:[d("button",{onClick:()=>{O.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:Ci,children:d("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:e==null?void 0:e.title})}),d("div",{class:"flex items-center px-0.5",children:d(wr,{class:"mx-1","aria-label":t("close_application"),onClick:O.cancelCurrentFlow,variant:"white",children:d("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Cs="14.19.1",Bf=(e,t=Cs)=>t===void 0?e:{fetch:(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const i=new Headers(n==null?void 0:n.headers);return i.set("x-inploi-widget-version",t),e.fetch(r,{...n,headers:Object.fromEntries(i.entries())})}};let yr,Es,un;const zf=e=>{const t=e.slice(0,e.lastIndexOf("/")+1);return/^https:\/\/[^/?#]+\/@inploi\/plugin-chatbot(?:@[\w.-]+)?\/cdn\/$/.test(t)?t:void 0},$s=(e,t,r)=>{const n=Kl(e,t??`
|
|
30
|
+
`,r);return{...n,stack:n.stack.filter(i=>i.startsWith("index.js:"))}},Ei=e=>$s(e,un),As=e=>typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"?e.status:void 0,Qt=(e,t,r={})=>yr==null?void 0:yr.send(e,t,{...r,message:"Chatbot widget beacon",widget:"chatbot",key_hash:Es}),Uf=e=>{const t=(r,n,i)=>{if(O.viewState$.value==="closed")return;const a=$s(n,e,i);a.stack.length&&Qt("fatal",jr(n),{phase:"render",error:{...a,via:r}})};window.addEventListener("error",r=>{ql(r)||t("error",r.error,r.message)}),window.addEventListener("unhandledrejection",r=>t("rejection",r.reason))},qf=(e,t,r=Qe&&Qe.tagName.toUpperCase()==="SCRIPT"&&Qe.src||new URL("index.js",document.baseURI).href)=>{const n=Yl();yr||!n||!e||(Es=t?sa(t).toString(36):void 0,yr=ic({config:n,version:Cs,env:e,seed:Jl(Gl(),fu)}),un=zf(r),un&&Uf(un))},Wf=e=>{let t={application:void 0,attempts:0,blocked:!1};return{fetch:async(r,n)=>{if(r!=="/flow/submit")return e.fetch(r,n);const i=O.current$.value.flow;i!==t.application&&(t={application:i,attempts:0,blocked:!1});const a=t,o=++a.attempts,s=performance.now(),l=await e.fetch(r,n).catch(c=>{throw As(c)===void 0&&!(c instanceof Error&&c.name==="AbortError")&&(a.blocked=!0,Qt("submit_blocked",jr(c),{phase:"submit",error:Ei(c),endpoint:"flow_submit",attempt:o,elapsed_ms:Math.round(performance.now()-s),body_kb:typeof(n==null?void 0:n.body)=="string"?Math.round(n.body.length/1024):void 0})),c});return a.blocked&&Qt("submit_recovered",void 0,{phase:"submit",endpoint:"flow_submit",attempt:o}),l}}},Hf='[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;z-index:2147483647;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height: calc(100vh - 64px) ;--content-height: calc(100svh - 64px) }@media screen and (min-width:768px){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px) );--content-height: min(640px, calc(100svh - 16px) ) }}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot] ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] .container{width:100%}@media(min-width:640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media(min-width:768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media(min-width:1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media(min-width:1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media(min-width:1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-widget=inploi-chatbot] .\\!visible{visibility:visible!important}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-1{bottom:4px}[data-widget=inploi-chatbot] .bottom-2{bottom:8px}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:10px}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-1\\/2{left:50%}[data-widget=inploi-chatbot] .left-2{left:8px}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-0\\.5{right:2px}[data-widget=inploi-chatbot] .right-1{right:4px}[data-widget=inploi-chatbot] .right-2{right:8px}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-1{margin-left:4px;margin-right:4px}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:4px}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-0\\.5{margin-top:2px}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .h-1\\.5{height:6px}[data-widget=inploi-chatbot] .h-16{height:64px}[data-widget=inploi-chatbot] .h-4{height:16px}[data-widget=inploi-chatbot] .h-48{height:192px}[data-widget=inploi-chatbot] .h-8{height:32px}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(100\\%-var\\(--header-height\\)-4rem\\)\\]{max-height:calc(100% - var(--header-height) - 64px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-0{min-height:0px}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[44px\\]{min-height:44px}[data-widget=inploi-chatbot] .w-1\\.5{width:6px}[data-widget=inploi-chatbot] .w-16{width:64px}[data-widget=inploi-chatbot] .w-24{width:96px}[data-widget=inploi-chatbot] .w-4{width:16px}[data-widget=inploi-chatbot] .w-8{width:32px}[data-widget=inploi-chatbot] .w-\\[72px\\]{width:72px}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:32px}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,384px)}[data-widget=inploi-chatbot] .max-w-\\[min\\(300px\\,calc\\(100vw-4rem\\)\\)\\]{max-width:min(300px,calc(100vw - 64px))}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-auto{flex:1 1 auto}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0,[data-widget=inploi-chatbot] .shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .flex-grow{flex-grow:1}[data-widget=inploi-chatbot] .-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}[data-widget=inploi-chatbot] .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes pulse{50%{opacity:.5}}[data-widget=inploi-chatbot] .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(1.25)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-none{resize:none}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .scroll-pb-12{scroll-padding-bottom:48px}[data-widget=inploi-chatbot] .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-start{align-items:flex-start}[data-widget=inploi-chatbot] .items-end{align-items:flex-end}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:4px}[data-widget=inploi-chatbot] .gap-1\\.5{gap:6px}[data-widget=inploi-chatbot] .gap-2{gap:8px}[data-widget=inploi-chatbot] .gap-3{gap:12px}[data-widget=inploi-chatbot] .gap-4{gap:16px}[data-widget=inploi-chatbot] .self-center{align-self:center}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overscroll-contain{overscroll-behavior:contain}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:4px}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:16px}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:24px}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:8px}[data-widget=inploi-chatbot] .rounded-md{border-radius:6px}[data-widget=inploi-chatbot] .rounded-xl{border-radius:12px}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-t-3xl{border-top-left-radius:24px;border-top-right-radius:24px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:6px}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:6px}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:4px}[data-widget=inploi-chatbot] .p-1\\.5{padding:6px}[data-widget=inploi-chatbot] .p-2{padding:8px}[data-widget=inploi-chatbot] .p-2\\.5{padding:10px}[data-widget=inploi-chatbot] .p-3{padding:12px}[data-widget=inploi-chatbot] .p-4{padding:16px}[data-widget=inploi-chatbot] .px-0\\.5{padding-left:2px;padding-right:2px}[data-widget=inploi-chatbot] .px-1{padding-left:4px;padding-right:4px}[data-widget=inploi-chatbot] .px-2{padding-left:8px;padding-right:8px}[data-widget=inploi-chatbot] .px-3{padding-left:12px;padding-right:12px}[data-widget=inploi-chatbot] .px-4{padding-left:16px;padding-right:16px}[data-widget=inploi-chatbot] .px-5{padding-left:20px;padding-right:20px}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:2px;padding-bottom:2px}[data-widget=inploi-chatbot] .py-1{padding-top:4px;padding-bottom:4px}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .py-2{padding-top:8px;padding-bottom:8px}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:10px;padding-bottom:10px}[data-widget=inploi-chatbot] .py-3{padding-top:12px;padding-bottom:12px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:8px}[data-widget=inploi-chatbot] .pb-6{padding-bottom:24px}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:6px}[data-widget=inploi-chatbot] .pl-2{padding-left:8px}[data-widget=inploi-chatbot] .pl-3{padding-left:12px}[data-widget=inploi-chatbot] .pl-4{padding-left:16px}[data-widget=inploi-chatbot] .pr-1{padding-right:4px}[data-widget=inploi-chatbot] .pr-16{padding-right:64px}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:10px}[data-widget=inploi-chatbot] .pr-3{padding-right:12px}[data-widget=inploi-chatbot] .pr-4{padding-right:16px}[data-widget=inploi-chatbot] .pt-2{padding-top:8px}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:10px}[data-widget=inploi-chatbot] .pt-3{padding-top:12px}[data-widget=inploi-chatbot] .pt-5{padding-top:20px}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 16px)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:16px;line-height:24px}[data-widget=inploi-chatbot] .text-sm{font-size:14px;line-height:20px}[data-widget=inploi-chatbot] .text-xs{font-size:12px;line-height:16px}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-normal{font-weight:400}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .leading-3{line-height:12px}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-system-success{color:var(--i-system-message-success)}[data-widget=inploi-chatbot] .text-system-warning{color:var(--i-system-message-warning)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-white\\/80{color:#fffc}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-10{outline-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .ring-inset{--tw-ring-inset: inset}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-7{--tw-ring-color: var(--i-color-n-7)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-divider:hover{background-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-white\\/20:hover{background-color:#fff3}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .hover\\:ring-divider:hover{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-hover:active{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-white\\/30:active{background-color:#ffffff4d}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-neutral-12:active{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .active\\:text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-interactive-bg-hover:active{--tw-ring-color: var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .aria-disabled\\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}[data-widget=inploi-chatbot] .aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:border-accent-9:hover[aria-disabled=true]{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:hover\\:bg-accent-9:hover[aria-disabled=true]{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-1:active[aria-disabled=true]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}[data-widget=inploi-chatbot] .aria-disabled\\:active\\:ring-offset-\\[1\\.5px\\]:active[aria-disabled=true]{--tw-ring-offset-width: 1.5px}@media(pointer:coarse){[data-widget=inploi-chatbot] .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-12:has(+*>input:focus){color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\>\\.view-switch\\:focus-visible\\)\\]\\:ring-1:has(>.view-switch:focus-visible){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot] [data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out}}@media(prefers-reduced-motion:reduce){[data-widget=inploi-chatbot],[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] *:before,[data-widget=inploi-chatbot] *:after,[data-widget=inploi-chatbot] dialog::backdrop{animation:none!important;transition-property:opacity,color,background-color,border-color!important;transition-duration:.15s!important;scroll-behavior:auto!important}[data-widget=inploi-chatbot] .animate-fade-in,[data-widget=inploi-chatbot] .animate-bubble-in,[data-widget=inploi-chatbot] .animate-maximise,[data-widget=inploi-chatbot] .animate-slide-in-bottom,[data-widget=inploi-chatbot] dialog::backdrop{animation:inploi-chatbot-fade .15s ease-out!important}}@keyframes inploi-chatbot-fade{0%{opacity:0}}',Is="inploi-chatbot",$i=`[data-widget='${Is}']`,Kf=()=>({getChatbotElement:()=>document.querySelector($i),getOrCreateChatbotElement:()=>{const e=document.querySelector($i);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.dataset.widget=Is,t}});var Gf="9.15.0",Ts=`https://sdk.inploi.com/@inploi/flows@${Gf}/cdn/captcha/index.html`,Yf=new URL(Ts).origin,Ds=3e4,Jf=5*6e4,Zf=e=>typeof e=="object"&&e!==null&&e.source==="inploi-captcha",Ai=new WeakMap,Xf=e=>{let t=Ai.get(e);return t||(t=e.fetch("/flow/captcha").then(r=>{let n=r==null?void 0:r.site_key;return typeof n=="string"&&n!==""?n:void 0}).catch(r=>{throw Ai.delete(e),r}),Ai.set(e,t)),t},Qf=(e,t={})=>new Promise((r,n)=>{let{signal:i,container:a=null,theme:o,onInteractive:s}=t instanceof AbortSignal?{signal:t}:t,l=!1,c=()=>{},f=v=>{l||(l=!0,clearTimeout(p),i==null||i.removeEventListener("abort",h),c(),v())},u=v=>f(()=>n(new Error(v))),h=()=>u("Captcha aborted"),p,g=v=>{clearTimeout(p),p=setTimeout(()=>u("Captcha timed out"),v)};if(g(Ds),i==null?void 0:i.aborted)return h();i==null||i.addEventListener("abort",h),(async()=>{let v=await Xf(e);if(v===void 0)return f(()=>r(void 0));if(l)return;let _=document.createElement("iframe");_.src=`${Ts}?${new URLSearchParams({sitekey:v,origin:window.location.origin,...o&&{theme:o}}).toString()}`,_.title="Cloudflare security check",_.style.cssText=`display:block;border:0;width:${a?"100%":"300px"};height:0;color-scheme:normal`,a?a.appendChild(_):(_.style.cssText+=";position:fixed;bottom:16px;right:16px;z-index:2147483647",document.body.appendChild(_));let S=!1,x=L=>{if(!_.contentWindow||L.source!==_.contentWindow||L.origin!==Yf||!Zf(L.data))return;let j=L.data;switch(j.type){case"token":return f(()=>r(j.token));case"resize":_.style.height=`${Math.max(0,Math.ceil(j.height))}px`;return;case"before-interactive":return S=!0,g(Jf),s==null?void 0:s();case"after-interactive":return S=!1,g(Ds);case"error":!S&&!j.interactive&&u("Captcha failed");return;case"expired":return u("Captcha expired");case"timeout":return u("Captcha timed out")}};window.addEventListener("message",x),c=()=>{window.removeEventListener("message",x),_.remove()}})().catch(v=>f(()=>n(v)))}),Ms=({condition:e,context:t,submissions:r,ifBlock:n})=>{let[i,...a]=e.compareKey.split(".");if(!i)return!1;let o=va({context:t,key:i,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{let s=or(o.value,a);switch(e.compare){case"equals":return s===e.compareValue;case"contains":return typeof s!="string"?!1:s.includes(e.compareValue);case"notEquals":return s!==e.compareValue;case"notContains":return typeof s!="string"?!0:!s.includes(e.compareValue)}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;let s=or(o.value,a),l={...n,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof s){case"boolean":return _r(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return _r(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return _r(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(c=>typeof c=="string")?_r(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{let s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{let s=o.type==="phone"?Nr(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{let s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},_r=(e,{context:t,submissions:r})=>{let n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let i of n)if(Ms({condition:i,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let i of n)if(!Ms({condition:i,context:t,submissions:r,ifBlock:e}))return!1;return!0}},ep=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,tp=(e,{context:t,submissions:r})=>e.replace(ep,(n,i,a="")=>{let[o,...s]=i.trim().split("."),l=va({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(c=>`${c.name} (${Wt(c.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(c=>c&&c.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():a;case"phone":return Nr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;let c=or(l.value,s);switch(typeof c){case"boolean":return c===!0?"true":"false";case"string":return c;case"number":return c.toString();case"object":if(Array.isArray(c)&&c.every(f=>typeof f=="string"))return c.join(", ")}break}}return a});function rp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ii(e,t,r=""){const n=rp(e),i=e==null?void 0:e.length;if(!n||t!==void 0){const o=r&&`"${r}" `,s="",l=n?`length=${i}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+s+", got "+l)}return e}function Ls(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function np(e,t){Ii(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Ti(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Di(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ze(e,t){return e<<32-t|e>>>t}const ip=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ap=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function op(e){if(Ii(e),ip)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=ap[e[r]];return t}function sp(e,t={}){const r=(i,a)=>e(a).update(i).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>e(i),Object.assign(r,t),Object.freeze(r)}const lp=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function cp(e,t,r){return e&t^~e&r}function up(e,t,r){return e&t^e&r^t&r}class dp{constructor(t,r,n,i){ve(this,"blockLen");ve(this,"outputLen");ve(this,"padOffset");ve(this,"isLE");ve(this,"buffer");ve(this,"view");ve(this,"finished",!1);ve(this,"length",0);ve(this,"pos",0);ve(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=Di(this.buffer)}update(t){Ls(this),Ii(t);const{view:r,buffer:n,blockLen:i}=this,a=t.length;for(let o=0;o<a;){const s=Math.min(i-this.pos,a-o);if(s===i){const l=Di(t);for(;i<=a-o;o+=i)this.process(l,o);continue}n.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ls(this),np(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;r[o++]=128,Ti(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let u=o;u<i;u++)r[u]=0;n.setBigUint64(i-8,BigInt(this.length*8),a),this.process(n,0);const s=Di(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)s.setUint32(4*u,f[u],a)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:a,destroyed:o,pos:s}=this;return t.destroyed=o,t.finished=a,t.length=i,t.pos=s,i%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),fp=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_t=new Uint32Array(64);class pp extends dp{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:r,C:n,D:i,E:a,F:o,G:s,H:l}=this;return[t,r,n,i,a,o,s,l]}set(t,r,n,i,a,o,s,l){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=l|0}process(t,r){for(let u=0;u<16;u++,r+=4)_t[u]=t.getUint32(r,!1);for(let u=16;u<64;u++){const h=_t[u-15],p=_t[u-2],g=Ze(h,7)^Ze(h,18)^h>>>3,v=Ze(p,17)^Ze(p,19)^p>>>10;_t[u]=v+_t[u-7]+g+_t[u-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:l,G:c,H:f}=this;for(let u=0;u<64;u++){const h=Ze(s,6)^Ze(s,11)^Ze(s,25),p=f+h+cp(s,l,c)+fp[u]+_t[u]|0,v=(Ze(n,2)^Ze(n,13)^Ze(n,22))+up(n,i,a)|0;f=c,c=l,l=s,s=o+p|0,o=a,a=i,i=n,n=p+v|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,i,a,o,s,l,c,f)}roundClean(){Ti(_t)}destroy(){this.set(0,0,0,0,0,0,0,0),Ti(this.buffer)}}class hp extends pp{constructor(){super(32);ve(this,"A",yt[0]|0);ve(this,"B",yt[1]|0);ve(this,"C",yt[2]|0);ve(this,"D",yt[3]|0);ve(this,"E",yt[4]|0);ve(this,"F",yt[5]|0);ve(this,"G",yt[6]|0);ve(this,"H",yt[7]|0)}}const gp=sp(()=>new hp,lp(1));var js=e=>{let t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Mi=e=>{var t,r;if(!(e.data.isFinished||(t=e.data.startedWriteNodeIds)!=null&&t.length))return(r=[...e.data.messages].reverse().find(n=>n.groupId&&e.nodes.some(i=>i.id===n.groupId&&i.type.startsWith("question-"))&&(n.type==="system"||"author"in n&&n.author==="user")))==null?void 0:r.groupId},Li=e=>Array.isArray(e)?e.map(Li):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>[t,Li(r)])):typeof e=="function"?void 0:e,bp=e=>op(gp(new TextEncoder().encode(JSON.stringify(Li(e)))));function mp(e,t,r,n){var i;if(n!=null&&n.aborted)return;let a=bp(r),o=(i=e.data).preApplyFingerprints??(i.preApplyFingerprints=[]);if(o.includes(a))return;o.push(a);let s=new AbortController,l=setTimeout(()=>s.abort(),5e3);t.fetch("/flow/pre-apply",{method:"POST",signal:s.signal,body:JSON.stringify(r)}).catch(()=>{let c=o.indexOf(a);c!==-1&&o.splice(c,1)}).finally(()=>{clearTimeout(l)})}var Fs=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Ue=(e,t)=>tp(e,Fs(t)),vp=(e,t)=>_r(e,Fs(t)),Os=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;let n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Os({node:n,nodes:t,stopWhen:r})},wp=({childNode:e,nodes:t})=>{let r=t.filter(n=>n.type==="if-block").find(n=>{if(!n.branchId)return!1;let i=t.find(o=>o.id===n.branchId);if(!i)return!1;let a=Os({node:i,nodes:t,stopWhen:o=>o.id===e.id});return!(!a||a.id!==e.id)});if(r!=null&&r.nextId)return t.find(n=>n.id===r.nextId)},yp=3,_p=({flow:e,analytics:t,logger:r,talentBankClient:n,context:i,apiClient:a,getSubmissions:o,getApplicationRecovery:s,setApplicationRecovery:l,chatService:c,persistWriteBarrier:f,onSubmitNetworkError:u,closedRoleBehaviour:h,settledOutcomes:p=h,dateEchoLocale:g,onFlowEnd:v,onInterpret:_,holdBefore:S,forceSubmitConfirmation:x,flowType:L,t:j})=>{var F;let V=new AbortController,B={submitAccepted:!1};(F=e.data).startedWriteNodeIds??(F.startedWriteNodeIds=e.nodes.flatMap(E=>{var T,z;if(E.type!=="integration-application-submit"||!e.data.nodeHistory.includes(E.id))return[];let $=E.data.key?(T=o())==null?void 0:T[E.data.key]:void 0;return($==null?void 0:$.type)==="integration"&&((z=On($.value))==null?void 0:z.verdict)==="not_submitted"?[]:[E.id]}));let k={...t.service,log:E=>t.service.log({...E,customProperties:{...E.customProperties,...t.customProperties}})},C=(E,$)=>{if($.aborted)return;let T=S==null?void 0:S(void 0);return T?T.then(()=>{if(!$.aborted)return v==null?void 0:v(E)}):v==null?void 0:v(E)},I=async(E,$)=>{let T=V.signal;if(T.aborted)return;let z=S==null?void 0:S(E);if(z&&(await z,T.aborted))return;let U=o(),H=s(),oe=(H==null?void 0:H.submitNodeId)===E.id?e.nodes.find(Q=>{var ee;return Q.id===H.fileQuestionNodeId&&Q.type==="question-file"&&((ee=U==null?void 0:U[Q.data.key])==null?void 0:ee.type)!=="file"}):void 0;if(oe)return I(oe,$);_==null||_(E,$);try{await xp({flow:e,analytics:k,logger:r,talentBankClient:n,apiClient:a,context:i,node:E,submissions:U,applicationRecovery:H,setApplicationRecovery:async Q=>{if(!T.aborted)try{await l(Q)}catch(ee){r.error("Failed to persist application recovery",ee)}},forceSubmitConfirmation:x||(H==null?void 0:H.submitNodeId)===E.id,run:B,persistWriteBarrier:f,onSubmitNetworkError:u,settledOutcomes:p,dateEchoLocale:g,flowType:L,signal:T,t:j,chat:{sendMessage:async Q=>c.send({groupId:E.id,message:Q,signal:T}),userInput:async Q=>c.input({input:Q,signal:T}),setSubmission:(Q,ee)=>{T.aborted||c.setSubmission(Q,ee)},captcha:c.captcha},next:Q=>{if(T.aborted)return;let ee=(H==null?void 0:H.fileQuestionNodeId)===E.id?H.submitNodeId:Q,se=ee?e.nodes.find(Y=>Y.id===ee):wp({childNode:E,nodes:e.nodes});return se?I(se,E):C(E,T)},end:()=>{C(E,T)}})}catch(Q){if(Q instanceof pt)return;throw Q}};return{interpret:async E=>{let $=e.nodes.find(T=>T.id===E)??js(e.nodes);return I($)},undo:E=>{var Q;if(delete e.data.reviewReplay,((Q=e.data.startedWriteNodeIds)==null?void 0:Q.length)||e.data.isFinished)return{removed:0};let $=Mi(e),T=$?E.lastIndexOf($):-1,z=e.nodes.find(ee=>ee.id===$);if(T===-1||!z)return{removed:0};let U=e.nodes.find(ee=>ee.id===E[E.length-1]);V.abort();let H=E.splice(T);e.data.messages=e.data.messages.filter(ee=>!ee.groupId||!H.includes(ee.groupId)),e.data.currentInput=null;let oe=o();for(let ee of H.slice(1)){let se=e.nodes.find(Y=>Y.id===ee);if(!(!se||!oe||se.id===$)&&("key"in se.data&&se.data.key&&delete oe[se.data.key],"keys"in se.data))for(let Y of Object.values(se.data.keys))typeof Y=="string"&&delete oe[Y]}return V=new AbortController,I(z,U),{removed:H.length}},abort:()=>{V.abort()}}};async function xp(e){let t=e.node;switch(t.type){case"flow-section":return await e.chat.sendMessage({type:"system",variant:"info",text:t.data.title}),e.next(t.nextId);case"pre-apply-result":return Wp({...e,node:t});case"text":return Fp({...e,node:t});case"image":return Op({...e,node:t});case"question-text":return Np({...e,node:t});case"question-enum":return Vp({...e,node:t});case"question-number":return Pp({...e,node:t});case"question-phone":return Rp({...e,node:t});case"question-boolean":return Bp({...e,node:t});case"question-file":return Up({...e,node:t});case"question-address":return zp({...e,node:t});case"end-flow":return qp({...e,node:t});case"if-block":return jp({...e,node:t});case"jump":return Cp({...e,node:t});case"link":return Lp({...e,node:t});case"integration-application-submit":return Dp({...e,node:t});case"add-submission":return Ep({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"check-duplicate":return Sp({...e,node:t});case"feedback":return kp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}async function kp({next:e,node:t}){e(t.nextId)}async function Sp({next:e,node:t,talentBankClient:r,submissions:n,flow:i,logger:a,chat:o}){var l;let s={isDuplicate:!1};if(n&&r){let c=t.data.scope==="job"?(l=i.job)==null?void 0:l.id:void 0;if(t.data.scope==="company"||c!=null)try{s=await r.checkDuplicate({email:wc({key:t.data.email,submissions:n}).toString(),jobId:c,scope:t.data.scope})}catch(f){a.error("[check-duplicate]",f)}}o.setSubmission(t.data.key,{type:"integration",value:s}),e(t.nextId)}async function Cp({next:e,node:t}){e(t.data.targetId)}async function Ep({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Ue(t.data.value,{submissions:n,context:i})},e(t.nextId)}var $p=5e3,Ns=(e,t)=>t?`${e}@${t.id_type}:${t.id}`:e,Ap=(e,t=Date.now())=>Math.min(e.until,t+(e.maintenance?xa:e.throttles?Nn:_a)),Ip=(e,t,r)=>{let{waitMs:n,throttles:i,maintenance:a}=Pc(t==null?void 0:t.throttles,r);return{key:e,until:Date.now()+n,...i!==void 0&&{throttles:i},...a&&{maintenance:a}}},Tp=["ApiError","NotFoundError","UnauthorisedError","SchemaValidationError","ParsingError"],ji=e=>e instanceof Error&&Tp.includes(e.name)?e:void 0,Ps=e=>{let t=ji(e);return(t==null?void 0:t.name)==="ApiError"?t:void 0};async function Dp({chat:e,next:t,end:r,node:n,logger:i,apiClient:a,submissions:o,analytics:s,flow:l,applicationRecovery:c,setApplicationRecovery:f,forceSubmitConfirmation:u,flowType:h,run:p,persistWriteBarrier:g,signal:v,onSubmitNetworkError:_,settledOutcomes:S,t:x}){var k,C;let L=async({redirect_url:I,message:E,button_text:$})=>{let{anonymous_id:T,session_id:z}=s.getSessionInfo();await e.sendMessage({type:"text",author:"bot",text:E??x("submission_redirect_message")});try{let U=new URL(I);T&&!U.searchParams.has("anonymous_id")&&U.searchParams.set("anonymous_id",T),await e.sendMessage({type:"link",href:U.toString(),text:$??x("complete_submission"),onClick:()=>{if(!z){i.error("session_id not set, cannot log FLOW_REDIRECT event");return}s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:z,flow_version:l.version,href:U.toString(),job:l.job}})}})}catch(U){i.error(`Invalid redirect URL: ${I}`,U),e.sendMessage({type:"system",variant:"error",text:x("redirect_url_error")})}};if((k=l.data.startedWriteNodeIds)!=null&&k.includes(n.id)&&(c==null?void 0:c.submitNodeId)!==n.id){let I=(C=l.data.submitRedirects)==null?void 0:C[n.id];return I?(await L(I),t(n.nextId)):(await e.sendMessage({type:"system",variant:"warning",text:x("submission_unknown")}),r())}let j=Ns(n.id,l.job),F=0,V=p.submitAccepted&&n.data.skipConfirmation===!0&&(c==null?void 0:c.submitNodeId)!==n.id,B=async I=>{var _n,xn,ea,Lr,b,m,w,D,A;let E=((_n=l.data.submitCooldown)==null?void 0:_n.key)===j?l.data.submitCooldown:void 0;E&&(E.until=Ap(E));let $=E==null?void 0:E.until;(l.data.reviewRequiresSend===!0&&!V||I!==!0||$!==void 0&&$>Date.now())&&await e.userInput({type:"submit",key:void 0,config:{label:n.data.submitLabel,...$!==void 0&&{availableAt:$}}}),V=!1;let T;if(n.data.captcha){let y=e.captcha,P=!0;try{T=await Qf(a,{signal:v,container:(y==null?void 0:y.container())??null,theme:y==null?void 0:y.theme,onInteractive:()=>{e.sendMessage({type:"text",author:"bot",text:x("captcha_check")}).catch(()=>{}).then(()=>{P&&(y==null||y.reveal(!0))})}})}catch(K){if(i.error("Captcha check failed",K),v.aborted)return}finally{P=!1,y==null||y.reveal(!1)}}await e.sendMessage({type:"loading",text:x("submitting")});let{anonymous_id:z,session_id:U}=s.getSessionInfo();if(v.aborted)return;let H=((xn=l.data.startedWriteNodeIds)==null?void 0:xn.includes(n.id))===!0;if((c==null?void 0:c.submitNodeId)===n.id&&await f(void 0),H||(l.data.startedWriteNodeIds=[...l.data.startedWriteNodeIds??[],n.id]),await g().catch(y=>i.error("Failed to persist application write barrier",y)),v.aborted)return;let oe,Q=setTimeout(()=>{oe=e.sendMessage({type:"loading",semantic:"submission-still-working",text:x("submission_still_working")}).catch(y=>i.error("Failed to send submission progress message",y))},$p),ee=mc(),se,Y=await a.fetch("/flow/submit",{method:"POST",body:JSON.stringify({...ee!==void 0&&{browser_timezone:ee},log_submit:!1,integration_id:n.data.integrationId,anonymous_id:z,session_id:U,job:l.job,flow_build:l.build,...T!==void 0&&{captcha_token:T},submissions:bc(l.nodes,vc(o||{},n.data.submitKeys)),pre_apply:Ln(l.nodes,o||{},l.data.flowSessionId)})}).catch(y=>{se=y;let P=Ps(y);return(P==null?void 0:P.data)!==void 0?P.data:y});if(clearTimeout(Q),await oe,v.aborted)return;if(se!==void 0&&!ji(se)&&_)return await _(se,v),B(!0);l.data.stagingDestination=jc(Y),n.data.key&&e.setSubmission(n.data.key,{type:"integration",value:Y});let $r=(ea=Ps(se))==null?void 0:ea.status,Ar=typeof $r=="number"?$r:void 0,q=On(Y,Ar),Ir=q===void 0&&Ar===429,Pt=S==="terminal"&&((q==null?void 0:q.outcome)==="closed"||(q==null?void 0:q.outcome)==="duplicate"),Rt=l.data.failedAttemptAt,dt=Rt==null?void 0:Rt[j];Rt&&dt!==void 0&&dt>Date.now()&&(dt=Rt[j]=Date.now());let Tr=dt!==void 0&&Date.now()-dt<ka||((Lr=l.data.unconfirmedAttemptKeys)==null?void 0:Lr.includes(j))===!0,ir=(b=ji(se))==null?void 0:b.status,ft=Uc(Y,typeof ir=="number"?ir:void 0);ft&&s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,service:ft.service,response:ft.response,captured:(Y==null?void 0:Y.captured)===!0,flow_type:(h==null?void 0:h())??"CHATBOT_DRAWER",job:l.job,...(q==null?void 0:q.outcome)==="duplicate"&&{outcome:Tr?"duplicate_after_own_attempt":"duplicate"},...ft.outcome&&{outcome:ft.outcome}}});let yn=Pr(Y)||(Y==null?void 0:Y.success)===!0;if((yn||Rr(Y))&&(p.submitAccepted=!0),yn&&((m=l.data.submitCooldown)==null?void 0:m.throttles)!==void 0&&(delete l.data.submitCooldown.throttles,await g().catch(y=>i.error("Failed to persist submit cooldown reset",y))),Pr(Y)){let{redirect_url:y,message:P,button_text:K}=Y.integration_response.data,G={redirect_url:y,message:P,button_text:K};return v.aborted?void 0:(l.data.submitRedirects={...l.data.submitRedirects,[n.id]:G},await g().catch(_e=>i.error("Failed to persist submit redirect",_e)),await L(G),t(n.nextId))}let Dr=Rr(Y);if(Dr)return await e.sendMessage({type:"system",variant:"success",text:Dr.message??x("submission_pending")}),t(n.nextId);if((Y==null?void 0:Y.success)===!0)return n.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:x("submission_completed")}),t(n.nextId);let Mr=zc(q),Vt=Mr!==void 0&&((w=o==null?void 0:o[Mr])==null?void 0:w.type)==="file"?Mr:void 0,Bt=Vt===void 0?void 0:l.nodes.find(y=>y.type==="question-file"&&y.data.key===Vt);if(!Bt&&!Pt&&!Ea(q)&&(l.data.submitCooldown=Ip(j,E,q)),(q==null?void 0:q.outcome)!=="duplicate"&&!Ir&&(l.data.failedAttemptAt={...l.data.failedAttemptAt,[j]:Date.now()},(D=l.data.unconfirmedAttemptKeys)!=null&&D.includes(j)&&(l.data.unconfirmedAttemptKeys=l.data.unconfirmedAttemptKeys.filter(y=>y!==j))),(q==null?void 0:q.verdict)==="not_submitted"||(q==null?void 0:q.outcome)==="duplicate"||(q==null?void 0:q.outcome)==="closed"||Ir||Mc(Y,Ar)?(H||(l.data.startedWriteNodeIds=(A=l.data.startedWriteNodeIds)==null?void 0:A.filter(y=>y!==n.id)),(c==null?void 0:c.submitNodeId)===n.id&&await f(c),await g().catch(y=>i.error("Failed to persist application write barrier release",y))):await g().catch(y=>i.error("Failed to persist submit cooldown",y)),q){if(i.error(se??q.message),Bt&&Vt!==void 0)return e.setSubmission(Vt,null),await f({fileQuestionNodeId:Bt.id,submitNodeId:n.id}),await e.sendMessage({type:"system",variant:"error",text:x("submission_unreadable_document")}),t(Bt.id);if(q.outcome==="duplicate")return await e.sendMessage({type:"system",variant:Pt?"success":"info",semantic:"submission-duplicate",text:x(Tr?"submission_duplicate_earlier_attempt":"submission_duplicate")}),Pt?(delete l.data.submitCooldown,r()):B(!1);if(q.outcome==="closed")return await e.sendMessage({type:"system",variant:"info",semantic:"submission-closed",text:x("submission_closed")}),Pt?(delete l.data.submitCooldown,r()):B(!1);let y=Nc(q);return y?(await e.sendMessage({type:"system",variant:"warning",text:y.until===void 0?x("submission_provider_maintenance_later"):x("submission_provider_maintenance",{time:Ca(y.until,void 0)})}),B(!1)):q.outcome==="unknown"?(await e.sendMessage({type:"system",variant:"warning",text:x(Bc(q)?"submission_unknown_do_not_resubmit":"submission_unknown")}),B(!1)):Ea(q)?Rc(Y)?(await e.sendMessage({type:"text",author:"bot",text:q.message}),B(!1)):(F===0&&await e.sendMessage({type:"system",variant:"warning",text:x("captcha_failed")}),F++,B(F<=yp)):Vc(q)?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())}return i.error(se??Y),Ir?(await e.sendMessage({type:"system",variant:"error",text:x("submission_retryable")}),B(!1)):(await e.sendMessage({type:"system",variant:"error",text:x("submission_failed")}),r())};await B(u===!0&&!V?!1:n.data.skipConfirmation)}var Mp=/{{\s*\$context\.job\.apply_url\s*(?:\|[^}]*)?}}/,Rs=(e,t)=>{if(!Mp.test(e))return!1;try{let{protocol:r}=new URL(t);return r==="https:"||r==="http:"}catch{return!1}};async function Lp({chat:e,next:t,node:r,submissions:n,context:i,analytics:a,flow:o}){let s=Ue(r.data.href,{submissions:n,context:i}),{flowSessionId:l}=o.data;await e.sendMessage({type:"link",href:s,text:Ue(r.data.cta,{submissions:n,context:i}),...Rs(r.data.href,s)&&{onClick:()=>{a.log({event:"FLOW_REDIRECT",properties:{flow_build:o.build,flow_id:o.id,flow_session_id:l,flow_version:o.version,href:s,job:o.job}})}}}),t(r.nextId)}async function jp({submissions:e,next:t,node:r,context:n}){t(vp(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Fp({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function Op({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Np({chat:e,next:t,node:r,submissions:n,context:i,t:a,dateEchoLocale:o}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:i})});let s=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,minChars:r.data.minChars,maxChars:r.data.maxChars,submissionFormat:"text",defaultValue:{}}}):await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars,multiline:r.data.format==="text"&&r.data.multiline===!0}});s===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:s.type==="phone"?Nr(s.value):r.data.format==="date"&&o!==void 0?Wc(s.value,o):s.value}),t(r.nextId)}async function Pp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Rp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?Nr(o.value):o.value}),t(r.nextId)}async function Vp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function Bp({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:Ue(r.data.question,{submissions:n,context:i})});let o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function zp({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});let i=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,line2Required:r.data.line2Required,placeholder:r.data.placeholder}});if(i===null)await e.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:n("skipped")});else{let a=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function Up({node:e,chat:t,next:r,submissions:n,context:i,t:a}){await t.sendMessage({author:"bot",type:"text",text:Ue(e.data.question,{submissions:n,context:i})});let o=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(o===null)await t.sendMessage({type:"system",variant:"info",semantic:"question-skipped",text:a("skipped")});else for(let s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});return r(e.nextId)}async function qp({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}async function Wp({node:e,flow:t,submissions:r,chat:n,next:i,apiClient:a,analytics:o,signal:s,context:l}){let c=gc(t.nodes,r||{}),{answers:f,...u}=c;if(n.setSubmission(e.data.key,{type:"integration",value:u}),mp(t,a,{...o.getSessionInfo(),job:t.job,flow_build:t.build,pre_apply:Ln(t.nodes,r||{},t.data.flowSessionId)},s),c.status!=="skipped"){let h=[c.status==="unavailable"?"We could not prepare your pre-apply summary. You can still continue to your application.":c.hasHardConcerns?e.data.messages.hard:c.hasAdvisoryConcerns?e.data.messages.advisory:e.data.messages.matched];for(let p of["hard","advisory"]){let g=f.filter(v=>!v.matched&&v.severity===p);g.length&&h.push((p==="hard"?"Role requirements":"Other things to consider")+`
|
|
31
31
|
`+g.map(v=>`• ${v.message}`).join(`
|
|
32
32
|
`))}await n.sendMessage({type:"text",author:"bot",text:h.join(`
|
|
33
33
|
|
|
34
|
-
`)}),c.hasHardConcerns&&e.data.alternativeLink&&await n.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await n.userInput({type:"submit",key:void 0,config:{label:Ue(e.data.continueLabel,{submissions:r,context:l})}})}return a(e.nextId)}var Hp=new TextEncoder,Fa=e=>{if(e==null)return 2;if(typeof e=="boolean")return 4;if(typeof e=="number")return Number.isInteger(e)?3+String(e).length:3+String(e).length+17;if(typeof e=="string"){let r=Hp.encode(e).length;return 6+String(r).length+r}let t=Array.isArray(e)?e.map((r,n)=>[n,r]):Object.entries(e);return 5+String(t.length).length+t.reduce((r,[n,a])=>r+Fa(n)+Fa(a),0)},Kp=e=>{let t=e;for(;t.length>1&&Fa(t)>8e3;)t=t.slice(1);return{steps:t.map(r=>({...r})),omitted:e.length-t.length}},Gp=()=>{let e=typeof screen>"u"?0:screen.width;return{pointer:typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches?"coarse":"fine",width:e<480?"xs":e<768?"s":e<1024?"m":"l"}},Yp=(e,t=Date.now,r,n)=>{let a=()=>{var h;return(h=e()).path??(h.path={steps:[],attempts:0})},i,o=t(),s,l=()=>{a().unsent=!0,r==null||r()},c=()=>{o=t(),l()},f=()=>{let h=a().steps.at(-1);return h&&h.o===void 0?h:void 0},d=(h,p)=>{let g=a();if(!g.unsent)return;let{steps:v,omitted:_}=Kp(g.steps);return{trigger:h,steps:v,..._>0&&{steps_omitted:_},...p!==void 0&&{to_node_id:p},idle_ms:t()-o,submit_attempts:g.attempts,...g.result!==void 0&&{submit_result:g.result},...g.cv&&{cv:g.cv},device:Gp(),...g.redirect}};return{shown:h=>{var g;if(i=t(),((g=f())==null?void 0:g.k)===h.key)return;let{steps:p}=a();p.push({k:h.key,i:p.length+1,t:h.inputType}),l()},answered:(h,p)=>{let g=f();!g||p!==void 0&&g.k!==p||(g.o=h?"s":"a",i!==void 0&&(g.ms=t()-i),c())},refused:()=>{let h=f();h&&(h.e=(h.e??0)+1,c())},revised:h=>{let p=h===void 0?void 0:a().steps.findLast(g=>g.k===h);p&&(p.r=(p.r??0)+1,c())},active:()=>{o=t()},cv:h=>{let p=a();p.cv===h||p.cv==="attached"||(p.cv=h,h==="attached"?c():l())},submitted:h=>{let p=a();p.attempts++,p.result=h,h==="redirect"&&(s=t()),l()},redirected:()=>{let h=s===void 0,p=a();p.redirect||(p.redirect={redirect_clicked:!0,...h?{redirect_revisit:!0}:s!==void 0&&{redirect_ms:t()-s}},c())},summary:(h,p)=>{let g=d(h,p);return delete a().unsent,g},peek:d,reset:()=>{e().path={steps:[],attempts:0},i=void 0,s=void 0,o=t()}}};const Vs=new WeakMap,st=e=>{let t=Vs.get(e);return t||(t=Yp(()=>e.data,Date.now,()=>ke.setStateData(e)),Vs.set(e,t)),t},Ft=(e,t,r)=>{var a;const n=st(t).summary(r,t.data.nodeHistory.at(-1));if(n){try{e.log({event:"FLOW_NODE",properties:{flow_id:t.id,flow_version:t.version,flow_build:t.build,flow_session_id:t.data.flowSessionId,flow_type:"CHATBOT_DRAWER",job:t.job,...n},customProperties:(a=t.analytics)==null?void 0:a.customProperties,...(r==="hidden"||r==="pagehide"||r==="redirect")&&{keepalive:!0}}).catch(()=>{})}catch{}ke.setStateData(t)}},Jp=e=>{let t,r;const n=Xr(()=>{const i=O.current$.value.flow,o=O.viewState$.value;t&&t!==i?Ft(e,t,"restart"):i&&o==="minimised"&&r!==o&&Ft(e,i,"minimise"),t=i,r=o}),a=i=>{const o=O.current$.peek().flow;o&&(i.type==="pagehide"?Ft(e,o,"pagehide"):document.visibilityState==="hidden"&&Ft(e,o,"hidden"),ke.flushStateData().catch(()=>{}))};return document.addEventListener("visibilitychange",a),window.addEventListener("pagehide",a),()=>{n(),document.removeEventListener("visibilitychange",a),window.removeEventListener("pagehide",a)}},Zp=(e,t,r)=>({fetch:async(n,a)=>{if(n!=="/flow/submit")return e.fetch(n,a);const i=r.data.nodeHistory.at(-1),o=i===void 0?void 0:Ns(i,r.job),s=(l,c,f=!1)=>{var v,_,S;if((v=a==null?void 0:a.signal)!=null&&v.aborted||O.current$.peek().flow!==r)return;const d=On(l,c),h=o===void 0||(_=r.data.failedAttemptAt)==null?void 0:_[o],p=h!==void 0&&Date.now()-Math.min(h,Date.now())<ki||o!==void 0&&((S=r.data.unconfirmedAttemptKeys)==null?void 0:S.includes(o))===!0,g=f?"network_error":Pr(l)?"redirect":Rr(l)?"pending":typeof l=="object"&&l!==null&&"success"in l&&l.success===!0?"success":(d==null?void 0:d.outcome)==="duplicate"?p?"duplicate_after_own_attempt":"duplicate":(d==null?void 0:d.outcome)??"failed";st(r).submitted(g),Ft(t,r,"submit")};try{const l=await e.fetch(n,a);return s(l),l}catch(l){if(!(l instanceof Error&&l.name==="AbortError")){const c=typeof l=="object"&&l!==null&&"status"in l&&typeof l.status=="number"?l.status:void 0,f=typeof l=="object"&&l!==null&&"data"in l?l.data:void 0;s(f,c,c===void 0)}throw l}}});var Xp=e=>e.type.startsWith("question-");const Qp=25,Bs=Ne(()=>{}),zs=["wheel","touchmove","keydown"],eh=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new pt);const a=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(a),n(new pt)},{once:!0})}),ie={onSubmitSuccessFn$:Ne(()=>{}),onInteractionFn$:Ne(()=>{}),isBotTyping$:Ne(!1),captchaVisible$:Ne(!1),themeMode$:Ne("light"),isReadingHistory$:Ne(!1),scrollToEnd:()=>Bs.value()},th=()=>{const e=ge(null),t=ge(-1/0);Ee(()=>{const n=e.current;if(!n)return;const a=()=>{ie.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};Bs.value=a;const i=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?ie.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ie.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of zs)n.addEventListener(l,i,{passive:!0});const s=new ResizeObserver(()=>{ie.isReadingHistory$.peek()||a()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of zs)n.removeEventListener(l,i);s.disconnect()}},[]);const r=gt(()=>({setSubmission:(a,i)=>O.setSubmission(a,i),captcha:{container:()=>{var a;return((a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))??null},get theme(){return ie.themeMode$.peek()},reveal:a=>{ie.captchaVisible$.value=a,a&&requestAnimationFrame(()=>{var i,o;(o=(i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))==null||o.focus(),ie.scrollToEnd()})}},send:async({message:a,signal:i,groupId:o})=>{if(await rn(a).with({author:"bot",type:"text"},async s=>{if(i!=null&&i.aborted)throw new pt;ie.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Qp;try{await eh(l,i)}finally{ie.isBotTyping$.value=!1}}).otherwise(async()=>{}),i!=null&&i.aborted)throw new pt;O.addMessage(a,o)},input:(({input:a,signal:i})=>{if(i!=null&&i.aborted)throw new pt;const o=O.current$.peek().flow,s=o==null?void 0:o.nodes.find(c=>c.id===o.data.nodeHistory.at(-1)),l=o&&s&&Xp(s)&&s.data.key===a.key?s:void 0;return o&&l&&st(o).shown({key:l.data.key,inputType:l.type.slice(9)}),O.setInput(a),new Promise(c=>{const f=d=>{if(i!=null&&i.aborted)throw new pt;o&&l&&st(o).answered(d===null||d.type==="enum"&&d.value.length===0),t.current=-1/0,O.setInput(void 0),a.key&&O.setSubmission(a.key,d),c(d)};ie.onSubmitSuccessFn$.value=f})})}),[]);return{chatRef:e,chatService:r}};var rh=["1","2","3","4","5","6","7","8","9","10","11","12"],nh={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[56,.23],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},ah=(e,t=1,r)=>n=>{const[a,i]=nh[r][n];return"oklch("+a+"% "+i*t+" "+e+")"},Oa=e=>{const t=ah(e.hue,e.chroma,e.mode);return Object.fromEntries(rh.map(r=>[e.prefix+r,e.transform(t(r))]))},Na=e=>e,ih=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(a=>{const i=n[a];return[`${String(r)}.${a}`,i]}):[[r,n]]});return Object.fromEntries(t)},un=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Pa=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(un(e)&&un(r))for(const n in r){const a=r[n];if(un(a)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];un(i)&&Pa(i,a)}else Object.assign(e,{[n]:r[n]})}return Pa(e,...t)},oh=e=>{function t(r,n){const a=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${a}`:`var(--${a})`}return t},sh=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:a,getToken:i}=n,o=h=>i("reference",h.toString()),s=e({theme:a}),l=t({theme:a,core:o,raw:{core:s}}),c=r({theme:a,core:o,semantic:o,raw:{core:s,semantic:l}}),f=ih(Pa(s,l,c)),d=([h,p],g)=>{const v=[g,h].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(_=>d(_,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>d(h))),ref:h=>i("reference",h.toString())}}})})})});const[Ra,Va,Us]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],lh=sh().core(({theme:e})=>({color:{black:Ra,white:Va,lowest:e.mode==="light"?Va:Ra,highest:e.mode==="light"?Ra:Va,...Oa({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Na}),...Oa({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Na}),...Oa({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Na})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(a,i)=>t.core.color[a].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Us,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const a=(i,o)=>e.core.color[i].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Us,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),ch=oh({prefix:"i-"}),dh=e=>{const t=lh.from({theme:e,getToken:ch}),r=Object.entries(t.declarations).map(([n,a])=>`${n}: ${a};`);return`${$a} {
|
|
34
|
+
`)}),c.hasHardConcerns&&e.data.alternativeLink&&await n.sendMessage({type:"link",href:e.data.alternativeLink.href,text:e.data.alternativeLink.label}),await n.userInput({type:"submit",key:void 0,config:{label:Ue(e.data.continueLabel,{submissions:r,context:l})}})}return i(e.nextId)}var Hp=new TextEncoder,Fi=e=>{if(e==null)return 2;if(typeof e=="boolean")return 4;if(typeof e=="number")return Number.isInteger(e)?3+String(e).length:3+String(e).length+17;if(typeof e=="string"){let r=Hp.encode(e).length;return 6+String(r).length+r}let t=Array.isArray(e)?e.map((r,n)=>[n,r]):Object.entries(e);return 5+String(t.length).length+t.reduce((r,[n,i])=>r+Fi(n)+Fi(i),0)},Kp=e=>{let t=e;for(;t.length>1&&Fi(t)>8e3;)t=t.slice(1);return{steps:t.map(r=>({...r})),omitted:e.length-t.length}},Gp=()=>{let e=typeof screen>"u"?0:screen.width;return{pointer:typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches?"coarse":"fine",width:e<480?"xs":e<768?"s":e<1024?"m":"l"}},Yp=(e,t=Date.now,r,n)=>{let i=()=>{var h;return(h=e()).path??(h.path={steps:[],attempts:0})},a,o=t(),s,l=()=>{i().unsent=!0,r==null||r()},c=()=>{o=t(),l()},f=()=>{let h=i().steps.at(-1);return h&&h.o===void 0?h:void 0},u=(h,p)=>{let g=i();if(!g.unsent)return;let{steps:v,omitted:_}=Kp(g.steps);return{trigger:h,steps:v,..._>0&&{steps_omitted:_},...p!==void 0&&{to_node_id:p},idle_ms:t()-o,submit_attempts:g.attempts,...g.result!==void 0&&{submit_result:g.result},...g.cv&&{cv:g.cv},device:Gp(),...g.redirect}};return{shown:h=>{var g;if(a=t(),((g=f())==null?void 0:g.k)===h.key)return;let{steps:p}=i();p.push({k:h.key,i:p.length+1,t:h.inputType}),l()},answered:(h,p)=>{let g=f();!g||p!==void 0&&g.k!==p||(g.o=h?"s":"a",a!==void 0&&(g.ms=t()-a),c())},refused:()=>{let h=f();h&&(h.e=(h.e??0)+1,c())},revised:h=>{let p=h===void 0?void 0:i().steps.findLast(g=>g.k===h);p&&(p.r=(p.r??0)+1,c())},active:()=>{o=t()},cv:h=>{let p=i();p.cv===h||p.cv==="attached"||(p.cv=h,h==="attached"?c():l())},submitted:h=>{let p=i();p.attempts++,p.result=h,h==="redirect"&&(s=t()),l()},redirected:()=>{let h=s===void 0,p=i();p.redirect||(p.redirect={redirect_clicked:!0,...h?{redirect_revisit:!0}:s!==void 0&&{redirect_ms:t()-s}},c())},summary:(h,p)=>{let g=u(h,p);return delete i().unsent,g},peek:u,reset:()=>{e().path={steps:[],attempts:0},a=void 0,s=void 0,o=t()}}};const Vs=new WeakMap,st=e=>{let t=Vs.get(e);return t||(t=Yp(()=>e.data,Date.now,()=>ke.setStateData(e)),Vs.set(e,t)),t},Ft=(e,t,r)=>{var i;const n=st(t).summary(r,t.data.nodeHistory.at(-1));if(n){try{e.log({event:"FLOW_NODE",properties:{flow_id:t.id,flow_version:t.version,flow_build:t.build,flow_session_id:t.data.flowSessionId,flow_type:"CHATBOT_DRAWER",job:t.job,...n},customProperties:(i=t.analytics)==null?void 0:i.customProperties,...(r==="hidden"||r==="pagehide"||r==="redirect")&&{keepalive:!0}}).catch(()=>{})}catch{}ke.setStateData(t)}},Jp=e=>{let t,r;const n=Xr(()=>{const a=O.current$.value.flow,o=O.viewState$.value;t&&t!==a?Ft(e,t,"restart"):a&&o==="minimised"&&r!==o&&Ft(e,a,"minimise"),t=a,r=o}),i=a=>{const o=O.current$.peek().flow;o&&(a.type==="pagehide"?Ft(e,o,"pagehide"):document.visibilityState==="hidden"&&Ft(e,o,"hidden"),ke.flushStateData().catch(()=>{}))};return document.addEventListener("visibilitychange",i),window.addEventListener("pagehide",i),()=>{n(),document.removeEventListener("visibilitychange",i),window.removeEventListener("pagehide",i)}},Zp=(e,t,r)=>({fetch:async(n,i)=>{if(n!=="/flow/submit")return e.fetch(n,i);const a=r.data.nodeHistory.at(-1),o=a===void 0?void 0:Ns(a,r.job),s=(l,c,f=!1)=>{var v,_,S;if((v=i==null?void 0:i.signal)!=null&&v.aborted||O.current$.peek().flow!==r)return;const u=On(l,c),h=o===void 0||(_=r.data.failedAttemptAt)==null?void 0:_[o],p=h!==void 0&&Date.now()-Math.min(h,Date.now())<ka||o!==void 0&&((S=r.data.unconfirmedAttemptKeys)==null?void 0:S.includes(o))===!0,g=f?"network_error":Pr(l)?"redirect":Rr(l)?"pending":typeof l=="object"&&l!==null&&"success"in l&&l.success===!0?"success":(u==null?void 0:u.outcome)==="duplicate"?p?"duplicate_after_own_attempt":"duplicate":(u==null?void 0:u.outcome)??"failed";st(r).submitted(g),Ft(t,r,"submit")};try{const l=await e.fetch(n,i);return s(l),l}catch(l){if(!(l instanceof Error&&l.name==="AbortError")){const c=typeof l=="object"&&l!==null&&"status"in l&&typeof l.status=="number"?l.status:void 0,f=typeof l=="object"&&l!==null&&"data"in l?l.data:void 0;s(f,c,c===void 0)}throw l}}});var Xp=e=>e.type.startsWith("question-");const Qp=25,Bs=Ne(()=>{}),zs=["wheel","touchmove","keydown"],eh=(e,t)=>new Promise((r,n)=>{if(t!=null&&t.aborted)return n(new pt);const i=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(i),n(new pt)},{once:!0})}),ae={onSubmitSuccessFn$:Ne(()=>{}),onInteractionFn$:Ne(()=>{}),isBotTyping$:Ne(!1),captchaVisible$:Ne(!1),themeMode$:Ne("light"),isReadingHistory$:Ne(!1),scrollToEnd:()=>Bs.value()},th=()=>{const e=ge(null),t=ge(-1/0);Ee(()=>{const n=e.current;if(!n)return;const i=()=>{ae.isReadingHistory$.value=!1,n.scrollTo({top:n.scrollHeight,behavior:"instant"})};Bs.value=i;const a=()=>t.current=performance.now(),o=()=>{n.scrollHeight-n.scrollTop-n.clientHeight<=24?ae.isReadingHistory$.value=!1:performance.now()-t.current<1e3&&(ae.isReadingHistory$.value=!0)};n.addEventListener("scroll",o,{passive:!0});for(const l of zs)n.addEventListener(l,a,{passive:!0});const s=new ResizeObserver(()=>{ae.isReadingHistory$.peek()||i()});return s.observe(n),n.firstElementChild&&s.observe(n.firstElementChild),()=>{n.removeEventListener("scroll",o);for(const l of zs)n.removeEventListener(l,a);s.disconnect()}},[]);const r=gt(()=>({setSubmission:(i,a)=>O.setSubmission(i,a),captcha:{container:()=>{var i;return((i=e.current)==null?void 0:i.querySelector("[data-captcha-slot]"))??null},get theme(){return ae.themeMode$.peek()},reveal:i=>{ae.captchaVisible$.value=i,i&&requestAnimationFrame(()=>{var a,o;(o=(a=e.current)==null?void 0:a.querySelector("[data-captcha-slot]"))==null||o.focus(),ae.scrollToEnd()})}},send:async({message:i,signal:a,groupId:o})=>{if(await rn(i).with({author:"bot",type:"text"},async s=>{if(a!=null&&a.aborted)throw new pt;ae.isBotTyping$.value=!0;const l=Math.min(Math.max(20,s.text.length),100)*Qp;try{await eh(l,a)}finally{ae.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new pt;O.addMessage(i,o)},input:(({input:i,signal:a})=>{if(a!=null&&a.aborted)throw new pt;const o=O.current$.peek().flow,s=o==null?void 0:o.nodes.find(c=>c.id===o.data.nodeHistory.at(-1)),l=o&&s&&Xp(s)&&s.data.key===i.key?s:void 0;return o&&l&&st(o).shown({key:l.data.key,inputType:l.type.slice(9)}),O.setInput(i),new Promise(c=>{const f=u=>{if(a!=null&&a.aborted)throw new pt;o&&l&&st(o).answered(u===null||u.type==="enum"&&u.value.length===0),t.current=-1/0,O.setInput(void 0),i.key&&O.setSubmission(i.key,u),c(u)};ae.onSubmitSuccessFn$.value=f})})}),[]);return{chatRef:e,chatService:r}};var rh=["1","2","3","4","5","6","7","8","9","10","11","12"],nh={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[56,.23],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},ih=(e,t=1,r)=>n=>{const[i,a]=nh[r][n];return"oklch("+i+"% "+a*t+" "+e+")"},Oi=e=>{const t=ih(e.hue,e.chroma,e.mode);return Object.fromEntries(rh.map(r=>[e.prefix+r,e.transform(t(r))]))},Ni=e=>e,ah=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(i=>{const a=n[i];return[`${String(r)}.${i}`,a]}):[[r,n]]});return Object.fromEntries(t)},dn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Pi=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(dn(e)&&dn(r))for(const n in r){const i=r[n];if(dn(i)){e[n]||Object.assign(e,{[n]:{}});const a=e[n];dn(a)&&Pi(a,i)}else Object.assign(e,{[n]:r[n]})}return Pi(e,...t)},oh=e=>{function t(r,n){const i=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return t},sh=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:i,getToken:a}=n,o=h=>a("reference",h.toString()),s=e({theme:i}),l=t({theme:i,core:o,raw:{core:s}}),c=r({theme:i,core:o,semantic:o,raw:{core:s,semantic:l}}),f=ah(Pi(s,l,c)),u=([h,p],g)=>{const v=[g,h].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(_=>u(_,v)):[[n.getToken("declaration",v),p]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>u(h))),ref:h=>a("reference",h.toString())}}})})})});const[Ri,Vi,Us]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],lh=sh().core(({theme:e})=>({color:{black:Ri,white:Vi,lowest:e.mode==="light"?Vi:Ri,highest:e.mode==="light"?Ri:Vi,...Oi({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Ni}),...Oi({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Ni}),...Oi({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Ni})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(i,a)=>t.core.color[i].replace(")",` / ${a})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:Us,"bg-hover":n("n-10",.2),"bg-active":n("n-10",.3)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const i=(a,o)=>e.core.color[a].replace(")",` / ${o})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":Us,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")},"system-message":{warning:t.mode==="dark"?"#FFC107":"#8A5A00",success:t.mode==="dark"?"#4CAF50":"#2E7D32"}}}),ch=oh({prefix:"i-"}),uh=e=>{const t=lh.from({theme:e,getToken:ch}),r=Object.entries(t.declarations).map(([n,i])=>`${n}: ${i};`);return`${$i} {
|
|
35
35
|
${r.concat(r).join(`
|
|
36
36
|
`)}
|
|
37
|
-
}`};class qs extends dd{}const uh=({_internal_domManager:e=Kf(),theme:t,terms:r,feedback:n,jobAlerts:a})=>ld(({apiClient:i,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let d=!1,h=0,p;qf(f,c);const g=Wf(Bf(i));let v=0;const _=new WeakMap,S=(k,C)=>{const I=++v,E=performance.now();return C.catch($=>{throw typeof $=="object"&&$!==null&&_.set($,{endpoint:k,attempt:I,elapsed_ms:Math.round(performance.now()-E)}),$})},x=(k,C)=>{const I=As(k);I===404||I===410||Qt("fatal","application_unavailable",{phase:"flow",stage:C,error:Ea(k),http_status:I,...C==="flow_fetch"&&typeof k=="object"&&k!==null&&_.get(k)})},L=c&&f?Dd({environment:f,publishableKey:c,logger:s}):void 0,j=k=>k===h,F=()=>{if(typeof window>"u")return;h++,p==null||p(),p=void 0,ke.flushStateData().catch(()=>{}),O.cancelCurrentFlow(),ie.isBotTyping$.value=!1;const k=e.getChatbotElement();k&&(It(null,k),k.remove()),d=!1,s.info("Chatbot plugin destroyed")},V=()=>{if(typeof window>"u")return;const k=h,C=[Oe("style",{id:"inploi-chatbot-styles"},Hf),Oe("style",{id:"inploi-chatbot-theme"},dh(t))],I=e.getOrCreateChatbotElement();ie.themeMode$.value=t.mode;const E=Ne(!1);if(It(Oe(ce,{},[C,Oe(Rf,{env:f,rpcClient:o,apiClient:g,logger:s,analytics:l,talentBankClient:L,params:{theme:t,terms:r,feedback:n},feedbackReady:E})]),I),n){const $=T=>{var U,H;if(!j(k))return;const z=(U=e.getChatbotElement())==null?void 0:U.querySelector("dialog");z&&fh({instance:T({rpcClient:o,apiClient:i,logger:s,analytics:l}),theme:t,terms:((H=n.params)==null?void 0:H.terms)??{},host:z}).then(()=>{E.value=!0},oe=>s.error("Error rendering feedback plugin",oe))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:T})=>{$(T())}).catch(T=>{s.error("Error preparing feedback plugin",T)}):$(n.plugin)}p??(p=Jp(l)),d=!0},B=async(k,C)=>{if(!j(C))return;Kc({context:Pn(k.jobContext,k.context||{}),schema:k.flow.context_schema,logger:s});const I=await O.prepareFlow({...k,jobAlerts:k.jobAlerts??a});j(C)&&O.commitFlow(I)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(d)return;V(),s.info("Chatbot plugin prepared")}catch(k){s.error("Error preparing chatbot plugin",k)}},fetchFlowByJobId:async(k,C)=>{const I=(C==null?void 0:C.idType)==="inploi"?"internal":"external";return S("flow_by_job",o.request(qd,{params:{id:k},searchParams:{id_type:I}})).catch(E=>{throw Do({name:"ApiError",message:Dt.string,status:410,data:Dt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},E)?new qs(E.message,E.status,E.data):E}).then(E=>({flow:E.flow,title:E.job.title,flowKeys:[E.job.id,...(C==null?void 0:C.flowKeys)??[]],job:Ud(E,{id:k,idType:I}),employer:E.company.name,...C,jobContext:E.context,context:{user:E.user,...C==null?void 0:C.context}}))},fetchFlowById:async(k,C)=>S("flow_by_id",o.request(Wd,{params:{id:k}})).then(I=>{var E;return{flow:I.flow,title:"Chatbot",flowKeys:(C==null?void 0:C.flowKeys)??[],...C,analytics:{customProperties:{flow_id:I.flow.id,flow_version:I.flow.version,...(E=C==null?void 0:C.analytics)==null?void 0:E.customProperties}}}}),open:async k=>{if(typeof window>"u")return;const C=performance.now();try{O.cancelCurrentFlow(),O.viewState$.value="maximised",d||V()}catch(E){s.error("Error starting flow",E),Qt("boot_failed",jr(E),{phase:"config",error:Ea(E),elapsed_ms:Math.round(performance.now()-C)});return}Qt("boot");const I=h;if(k instanceof Promise){O.current$.value={state:"loading"};const E=$=>T=>{j(I)&&(s.error("Error loading flow",T),O.current$.value={state:T instanceof qs?"closed":"error"},x(T,$))};k.then($=>B($,I).catch(E("create")),E("flow_fetch"))}else await B(k,I).catch(E=>{s.error("Error starting flow",E),x(E,"create")})},hasApplicationInProgress:async k=>{const C=await ke.getStateData(k.flow,k.flowKeys,k.context??{});return C!==void 0&&ws({data:C,nodes:k.flow.nodes})},hasAnyApplicationInProgress:async()=>(await ke.getAllStateData()).some(k=>ws({data:k,nodes:[]})),close:async()=>{typeof window>"u"||(O.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:F}});function fh({instance:e,terms:t,theme:r,host:n}){return e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=uh;const ph=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:Zc},Symbol.toStringTag,{value:"Module"}));var hh="https://maps.inploi.com",gh=(e,t)=>{const r=new URL(`/${e}`,hh);return r.search=new URLSearchParams({q:t.query,limit:"5",surface:t.surface,seed:t.seed}).toString(),t.country&&r.searchParams.set("country",t.country),r},Ba=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),bh=e=>{if(!Ba(e)||typeof e.label!="string"||!Ba(e.address)||e.country!==void 0&&typeof e.country!="string")return;const t={};for(const r of["line1","line2","line3","city","state","postcode","country"]){const n=e.address[r];if(n!==void 0&&typeof n!="string")return;n!==void 0&&(t[r]=n)}return{id:e.label,label:e.label,country:e.country,address:t}},mh=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const a=n.headers.get("X-Geo-Arm"),i=await n.json();if(a!=="inploi"&&a!=="mapbox"||!Ba(i)||!Array.isArray(i.results)||i.source!=="photon"&&i.source!=="mapbox"&&i.source!=="places"||typeof i.attribution!="string")return;const o=[];for(const s of i.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:a,source:i.source}},vh=e=>{const t=gh("address",{...e,seed:e.session});return t.searchParams.set("session",e.session),e.lat!==void 0&&e.lng!==void 0&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180&&(t.searchParams.set("lat",String(e.lat)),t.searchParams.set("lng",String(e.lng))),mh(t,bh,e.signal)};const wh=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:vh},Symbol.toStringTag,{value:"Module"})),Ws=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})},za="resume-prompt",yh=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:za,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return O.removeMessagesSentByNodeIds([za]),(n==null?void 0:n.value)!==!1},Ot=({class:e,...t})=>{const{t:r}=de();return u("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:u("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[u("title",{children:r("send")}),u("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),u("path",{d:"M8 4V13"})]})})},er=({error:e,refusal:t=!1})=>{const r=e==null?void 0:e.message;return Ee(()=>{const n=O.current$.peek().flow;t&&r&&n&&st(n).refused()},[r,t]),!e||!e.message?null:u("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[u("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),u("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),u("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),u("p",{class:"break-words pr-1 text-sm",children:e.message})]})},lt=({class:e,...t})=>{const{t:r}=de();return u("button",{type:"button",class:it("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[u("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[u("title",{children:r("skip")}),u("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),u("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Ua={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},_h=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Ua).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const tr=Mt("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),xh="https://api.mapbox.com/search/searchbox/v1/suggest",kh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Sh=e=>atob(e).split("").reverse().join(""),ct=te({name:M()}),Ch=te({suggestions:sr(te({feature_type:Le(M()),full_address:Le(M()),place_formatted:Le(M()),name:Le(M()),mapbox_id:M(),context:od(te({address:ct,street:ct,neighborhood:ct,locality:ct,district:ct,place:ct,region:ct,postcode:ct,country:ct}))}))}),Eh=e=>(Tt(()=>{e&&Wi(e)},[e]),gt(()=>{var r;const t=(r=O.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,a)=>{var c;const i=e&&Wi(e),o=(c=O.current$.peek().flow)==null?void 0:c.locationOrigin,s=o&&o.lat!==void 0&&o.lng!==void 0&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180;return{...await pf({query:n,country:i,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:a},async()=>{const f=new URL(xh);return f.searchParams.set("q",n),f.searchParams.set("session_token",t),f.searchParams.set("limit","5"),s&&f.searchParams.set("proximity",`${o.lng},${o.lat}`),f.searchParams.set("access_token",Sh(kh)),(await Vd(async p=>{const g=new URL(f);p&&g.searchParams.set("country",p);const v=await fetch(g.href,{signal:a});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return Vi(Ch,await v.json()).suggestions},i,a)).map(p=>{var g,v,_,S,x,L,j,F,V;return{country:i,label:p.full_address??([p.name,p.place_formatted].filter(Boolean).join(", ")||p.mapbox_id),id:p.mapbox_id,address:{line1:((g=p.context.address)==null?void 0:g.name)??((v=p.context.street)==null?void 0:v.name),line2:void 0,line3:((_=p.context.neighborhood)==null?void 0:_.name)??((S=p.context.locality)==null?void 0:S.name),city:((x=p.context.place)==null?void 0:x.name)??((L=p.context.district)==null?void 0:L.name),state:(j=p.context.region)==null?void 0:j.name,postcode:((F=p.context.postcode)==null?void 0:F.name)??(p.feature_type==="postcode"?p.name:void 0),country:(V=p.context.country)==null?void 0:V.name}}})}),country:i}}}:{enabled:!1}},[e])),Hs=e=>{const{t}=de();return u("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M10 3L5 8L10 13"})}),u("span",{children:t("back")})]})},$h=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:a})=>{const{t:i}=de(),[o,s]=ze(),{enabled:l,getPredictions:c}=Eh(a),[f,d]=ze(l?"query":"manual"),[h,p]=ze(""),[g,v]=ze(),_=ge(),S=()=>{var k;(k=_.current)==null||k.controller.abort(),_.current=void 0};Tt(()=>S,[]);const x=ge(),L=ge(),j=ge(!1),F=k=>{const C=k!==null?x.current:void 0,I=(C==null?void 0:C.lookup)??L.current;if(I&&!j.current){j.current=!0;const E=z=>{const U=e.config.keys[z];return k&&U?k.value[U]:void 0},$=E("country")??(C==null?void 0:C.suggestion.address.country)??(C==null?void 0:C.suggestion.country),T=k&&os({postcode:E("postcode")??(C!=null&&C.edited||o==null?void 0:o.postcode),label:C!=null&&C.edited||C==null?void 0:C.suggestion.label,state:E("state")??(C!=null&&C.edited||o==null?void 0:o.state),country:$});hf({kind:"address",surface:"chatbot",...I,picked:!!C,...C?{edited:C.edited}:{},region:T??($!=null&&$.trim()?"other":null)})}t(k)},V=k=>{var I;if(ot(l,"Query state should not be enabled"),k=k.trim(),k===((I=_.current)==null?void 0:I.query)||k===(g==null?void 0:g.query)&&g.status==="done")return;if(S(),p(k),k===""){v(void 0);return}const C=_.current={query:k,controller:new AbortController};v({query:k,status:"pending"}),c(k,C.controller.signal).then(E=>{_.current===C&&(_.current=void 0,L.current={arm:E.arm,source:E.source},v({query:k,status:"done",items:E.results,...L.current,country:E.country}))},E=>{_.current===C&&(_.current=void 0,L.current={arm:"direct",source:"direct"},r.error("Failed to get address details",E instanceof Di?"Unexpected response":E),v({query:k,status:"failed",error:i("address_error")}))})},B=(k,C)=>{x.current&&(o==null?void 0:o[k])!==C&&(x.current.edited=!0),s(I=>({...I,[k]:C}))};switch(f){case"query":return ot(l,"Query state should not be enabled"),u(Ah,{input:e,onSkip:()=>F(null),onAddressSelect:(k,C)=>{var E;if(k===""){_.current&&(S(),v(void 0)),d("manual");return}if((g==null?void 0:g.status)!=="done")return;const I=g.items.find($=>$.id===k);I&&(g.arm!=="inploi"&&df({query:C,country:g.country,pickedLabel:I.label,pickedPostcode:I.address.postcode,pickedCountry:I.address.country,pickedState:I.address.state,log:$=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:$})}),((E=x.current)==null?void 0:E.suggestion.id)!==k?(s(I.address),x.current={suggestion:I,lookup:{arm:g.arm,source:g.source},edited:!1}):x.current.lookup={arm:g.arm,source:g.source},d("details"))},onAddressSearch:V,lookup:g,query:h});case"details":return ot(o!==void 0),u(Ks,{input:e,logger:r,onSubmitSuccess:F,addressFields:o,onFieldChange:B,actions:u(Hs,{onClick:()=>{d("query")}})});case"manual":return u(Ks,{logger:r,input:e,onSubmitSuccess:F,addressFields:o??{},onFieldChange:B,actions:l?u(Hs,{onClick:()=>{d("query")}}):e.config.optional?u(lt,{onClick:()=>F(null)}):void 0})}},Ah=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:a,onAddressSearch:i})=>{const{t:o}=de(),s=ge(null);return Ee(()=>{s.current&&(s.current.focus(),s.current.select())},[]),u(ce,{children:[u("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&i(f)},class:"flex gap-2 p-2.5",children:[u("div",{class:"group relative flex-1",children:[u("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:a,class:tr({optional:!!e.config.optional,className:"w-full rounded-full"})}),u("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[u("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[u("circle",{cx:"7",cy:"7",r:"4"}),u("path",{d:"M10 10L13 13"})]})}),u("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&u(lt,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?u(er,{error:{message:r.error}}):null,u("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?u(ce,{children:[u(cn,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),u("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??a??"")},children:[u("span",{class:"flex-grow",children:l.label}),u("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),u("li",{children:u("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??a??"")},children:u("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},qa=["line1","line2","line3","city","state","postcode","country"],Ks=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:a})=>{const i=ge(null),o=ge(!1);Ee(()=>{if(i.current){const c=i.current.querySelector("input");c&&(c.focus(),c.select())}},[]);const s=Object.keys(Ua),{t:l}=de();return u("form",{class:"flex flex-col px-2 pt-2",onInputCapture:()=>{o.current=!1},onInvalidCapture:()=>{const c=O.current$.peek().flow;!o.current&&c&&st(c).refused(),o.current=!0},onSubmit:c=>{c.preventDefault();const f=c.currentTarget,d=[...f.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of d){g.value="";const v=qa.find(_=>a.config.keys[_]===g.name);v&&t(v,"")}if(d.length>0&&!f.checkValidity()){f.reportValidity();return}const h=new FormData(f),p=Object.fromEntries(h.entries());r({type:"address",value:p})},children:[u("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:i,children:qa.map((c,f)=>{const d=`isdk_${c}`,h=a.config.keys[c];return h?u(ce,{children:[u("label",{for:d,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:l(c)}),u("div",{class:"flex flex-col items-stretch gap-1.5",children:[c==="country"?u("div",{class:"relative",children:[u("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:h,id:d,defaultValue:e[c],onChange:p=>t(c,p.currentTarget.value),required:!0,children:[e.country&&!s.includes(e.country)?u("option",{value:e[c],children:e[c]}):u("option",{value:"",children:l("select_country")}),s.map(p=>u("option",{value:p,children:p},p))]}),u("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):u("input",{autoFocus:f===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:h,id:d,defaultValue:e[c],onInput:p=>t(c,p.currentTarget.value),required:c==="line2"?a.config.line2Required===!0:c!=="line3"}),f===qa.length-1?u("hr",{class:"m-0 w-full border-b border-b-transparent"}):u("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),u("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,u(Ot,{class:"ml-auto"})]})]})},Wa=()=>{const e=ge(null);return Tt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Gs=["true","false"],Ih=rt(Gs),Th="answer",Ys="flex items-center flex-wrap gap-2 p-2.5",Js="min-w-0 max-w-full flex-auto",Zs=fa(({label:e,...t},r)=>u("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:u("p",{class:"text-center text-base",children:e})})),Dh=({input:e,onSubmitSuccess:t})=>{const r=Wa();return u("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const a=Tf(n).value,i=Vi(Ih,a);t({type:"boolean",value:i==="true"})},children:[u("ul",{class:Ys,children:Gs.map((n,a)=>u("li",{class:Js,children:u(Zs,{ref:a===0?r:null,type:"submit",name:Th,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&u("div",{class:"px-2 pb-2",children:u(lt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Xs=e=>e.reduce((t,r)=>t+r.sizeKb,0),Mh=Xt("file"),Qs=3,fn=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Lh=({file:e,class:t,...r})=>{const{t:n}=de(),[a,i]=fn(e.name);return u("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[u("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[u("span",{class:"sr-only",children:[n("file_name"),": "]}),u("span",{class:"block truncate",children:a}),u("span",{children:i})]}),u("p",{class:"text-accent-11",children:[u("span",{class:"sr-only",children:[n("file_size"),": "]}),Wt(e.sizeKb)]})]})},el=({class:e,...t})=>u("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),jh=(e,t)=>{const[r,n]=fn(e);return`${r.slice(0,t)}${n}`},pn=e=>({name:jh(e.name,42),sizeKb:e.size/1e3}),Fh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Oh=(e,t,r)=>{const n=fn(t.name)[1].toLowerCase(),a=[...r.map(o=>o.toLowerCase()),...Fh],i=n===""?"none":a.includes(n)?n:"other";return`chatbot-file-refused:${e}:${i}`},Nh=({input:e,onSubmitSuccess:t,analytics:r})=>{var _;const n=(_=O.current$.value.flow)==null?void 0:_.data.submissions[e.key],[a,i]=ze(Mh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=ge(0),s=a.status==="ready"?a.files:[],l=a.status==="ready"||a.status==="pending"?a.files:[],c=a.status==="error"?a.error:void 0,f=l.length-Qs,d=Xs(l),h=Wa(),{t:p}=de(),g=(S,x=e.config.extensions)=>{if(!S.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!Or(S,x))return{reason:"type",file:S.find(L=>!Or([L],x)),error:{type:"validate",message:p("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(S.some(L=>L.sizeKb===0))return{reason:"empty",file:S.find(L=>L.sizeKb===0),error:{type:"validate",message:p("validation_file_empty")}};if(e.config.fileSizeLimitKib&&Xs(S)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:Wt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&S.length>1)return{reason:"count",error:{type:"invalid",message:p("validation_file_max",{count:1})}}},v=(S,x)=>{var L,j;return r.log({event:"INTERACTION",properties:{tag:Oh(S,x,e.config.extensions)},customProperties:(j=(L=O.current$.peek().flow)==null?void 0:L.analytics)==null?void 0:j.customProperties})};return u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:S=>{if(S.preventDefault(),a.status==="pending"||a.status==="error")return;const x=g(s);x?i({status:"error",error:x.error}):t({type:"file",value:s})},children:[u("div",{class:"flex items-center gap-2",children:[u("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?u("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,Qs).map(S=>{const[x,L]=fn(S.name);return u(el,{class:"flex overflow-hidden",children:[u("span",{class:"block truncate",children:x}),u("span",{children:L})]})}),f>0?u(el,{children:p("file_more",{count:f})}):null]}):u("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[u("header",{class:"flex flex-col items-center gap-0",children:[u("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),u("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?u("p",{class:"text-neutral-11 text-xs",children:["(",p("file_max_size",{size:Wt(e.config.fileSizeLimitKib)}),")"]}):null]}),u("aside",{class:"flex flex-col items-center gap-2",children:[u("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),u("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(S=>u("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:S.replace(".","")}))})]})]}),u("p",{role:"status",class:it("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:a.status==="pending"?u(ce,{children:[u(cn,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):a.status==="ready"?u(ce,{children:[s.length>1?p("file_total_size",{size:Wt(d)}):Wt(d),u("span",{class:"sr-only",children:[". ",p("file_ready",{count:s.length})]})]}):null}),u("input",{id:"dropzone-file","aria-label":p("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async S=>{ot(S.target instanceof HTMLInputElement);const x=S.target.files?Array.from(S.target.files):[];if(S.target.value="",!x[0])return;const L=++o.current,j=a.status==="ready";let F=x;if(!Or(x,e.config.extensions)){const I=g(x.map(pn),[]);if(I)return v(I.reason,I.file??x[0]),i({status:"error",error:I.error});i({status:"pending",files:x.map(pn)});let E;try{F=await Promise.all(x.map($=>$c($,e.config.extensions).catch(T=>{throw E??(E=$),T})))}catch{return o.current!==L?void 0:(v("unreadable",E??x[0]),i({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}}))}}const[V]=F;if(!V||o.current!==L)return;const B=F.map(pn),k=g(B);if(k)return v(k.reason,k.file??V),i({status:"error",error:k.error});i({status:"pending",files:B});let C;try{const I=await Promise.all(F.map(async E=>{try{return{...pn(E),data:await Hc(E)}}catch($){throw C??(C=E),$}}));o.current===L&&i({status:"ready",files:I})}catch{if(o.current!==L)return;v("unreadable",C??V),i({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:_c(e.config.extensions),type:"file",class:"sr-only"})]}),u("div",{class:"flex h-full flex-col items-center gap-2",children:[u(Ot,{disabled:s.length===0}),e.config.optional&&u(lt,{class:"relative",onClick:()=>t(null)})]})]}),u(er,{error:c,refusal:!0})]})};var xr=e=>e.type==="checkbox",Nt=e=>e instanceof Date,Fe=e=>e==null;const tl=e=>typeof e=="object";var fe=e=>!Fe(e)&&!Array.isArray(e)&&tl(e)&&!Nt(e),Ph=e=>fe(e)&&e.target?xr(e.target)?e.target.checked:e.target.value:e,Rh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vh=(e,t)=>e.has(Rh(t)),Bh=e=>{const t=e.constructor&&e.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},Ha=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function me(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ha&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(fe(e)&&Bh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=me(e[a]));return n}var hn=e=>/^\w*$/.test(e),le=e=>e===void 0,Ka=e=>Array.isArray(e)?e.filter(Boolean):[],Ga=e=>Ka(e.replace(/["|']|\]/g,"").split(/\.|\[/)),N=(e,t,r)=>{if(!t||!fe(e))return r;const n=(hn(t)?[t]:Ga(t)).reduce((a,i)=>Fe(a)?a:a[i],e);return le(n)||n===e?le(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean",qe=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const a=hn(t)?[t]:Ga(t),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=r;if(n!==o){const c=e[s];l=fe(c)||Array.isArray(c)?c:isNaN(+a[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const rl={BLUR:"blur",FOCUS_OUT:"focusout"},We={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zh=Ie.createContext(null);zh.displayName="HookFormControlContext";var Uh=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==We.all&&(t._proxyFormState[o]=!n||We.all),e[o]}});return a};const qh=typeof window<"u"?Ie.useLayoutEffect:Ie.useEffect;var Pe=e=>typeof e=="string",Wh=(e,t,r,n,a)=>Pe(e)?(n&&t.watch.add(e),N(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),N(r,i))):(n&&(t.watchAll=!0),r),Ya=e=>Fe(e)||!tl(e);function xt(e,t,r=new WeakSet){if(Ya(e)||Ya(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const o=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Nt(o)&&Nt(s)||fe(o)&&fe(s)||Array.isArray(o)&&Array.isArray(s)?!xt(o,s,r):!Object.is(o,s))return!1}}return!0}const Hh=Ie.createContext(null);Hh.displayName="HookFormContext";var nl=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},kr=e=>Array.isArray(e)?e:[e],al=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function il(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const a=e[n],i=t[n];if(a&&fe(a)&&i){const o=il(a,i);fe(o)&&(r[n]=o)}else e[n]&&(r[n]=i)}return r}var Te=e=>fe(e)&&!Object.keys(e).length,Ja=e=>e.type==="file",gn=e=>{if(!Ha)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ol=e=>e.type==="select-multiple",Za=e=>e.type==="radio",Kh=e=>Za(e)||xr(e),Xa=e=>gn(e)&&e.isConnected;function Gh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=le(e)?n++:e[t[n++]];return e}function Yh(e){for(const t in e)if(e.hasOwnProperty(t)&&!le(e[t]))return!1;return!0}function pe(e,t){const r=Array.isArray(t)?t:hn(t)?[t]:Ga(t),n=r.length===1?e:Gh(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(fe(n)&&Te(n)||Array.isArray(n)&&Yh(n))&&pe(e,r.slice(0,-1)),e}var Jh=e=>{for(const t in e)if(qe(e[t]))return!0;return!1};function sl(e){return Array.isArray(e)||fe(e)&&!Jh(e)}function Qa(e,t={}){for(const r in e){const n=e[r];sl(n)?(t[r]=Array.isArray(n)?[]:{},Qa(n,t[r])):le(n)||(t[r]=!0)}return t}function rr(e,t,r){r||(r=Qa(t));for(const n in e){const a=e[n];if(sl(a))le(t)||Ya(r[n])?r[n]=Qa(a,Array.isArray(a)?[]:{}):rr(a,Fe(t)?{}:t[n],r[n]);else{const i=t[n];r[n]=!xt(a,i)}}return r}const ll={value:!1,isValid:!1},cl={value:!0,isValid:!0};var dl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!le(e[0].attributes.value)?le(e[0].value)||e[0].value===""?cl:{value:e[0].value,isValid:!0}:cl:ll}return ll},ul=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>le(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;const fl={isValid:!1,value:null};var pl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,fl):fl;function hl(e){const t=e.ref;return Ja(t)?t.files:Za(t)?pl(e.refs).value:ol(t)?[...t.selectedOptions].map(({value:r})=>r):xr(t)?dl(e.refs).value:ul(le(t.value)?e.ref.value:t.value,e)}var Zh=(e,t,r,n)=>{const a={};for(const i of e){const o=N(t,i);o&&X(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},bn=e=>e instanceof RegExp,Sr=e=>le(e)?e:bn(e)?e.source:fe(e)?bn(e.value)?e.value.source:e.value:e,gl=e=>({isOnSubmit:!e||e===We.onSubmit,isOnBlur:e===We.onBlur,isOnChange:e===We.onChange,isOnAll:e===We.all,isOnTouch:e===We.onTouched});const bl="AsyncFunction";var Xh=e=>!!e&&!!e.validate&&!!(qe(e.validate)&&e.validate.constructor.name===bl||fe(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===bl)),Qh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ml=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Cr=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=N(e,a);if(i){const{_f:o,...s}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Cr(s,t))break}else if(fe(s)&&Cr(s,t))break}}};function vl(e,t,r){const n=N(e,r);if(n||hn(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=N(t,i),s=N(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};a.pop()}return{name:r}}var eg=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return Te(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||We.all))},tg=(e,t,r)=>!e||!t||e===t||kr(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),rg=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,ng=(e,t)=>!Ka(N(e,t)).length&&pe(e,t),ag=(e,t,r)=>{const n=kr(N(e,r));return X(n,"root",t[r]),X(e,r,n),e};function wl(e,t,r="validate"){if(Pe(e)||Array.isArray(e)&&e.every(Pe)||Xe(e)&&!e)return{type:r,message:Pe(e)?e:"",ref:t}}var nr=e=>fe(e)&&!bn(e)?e:{value:e,message:""},yl=async(e,t,r,n,a,i)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:d,max:h,pattern:p,validate:g,name:v,valueAsNumber:_,mount:S}=e._f,x=N(r,v);if(!S||t.has(v))return{};const L=s?s[0]:o,j=$=>{a&&L.reportValidity&&(L.setCustomValidity(Xe($)?"":$||""),L.reportValidity())},F={},V=Za(o),B=xr(o),k=V||B,C=(_||Ja(o))&&le(o.value)&&le(x)||gn(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,I=nl.bind(null,v,n,F),E=($,T,z,U=dt.maxLength,H=dt.minLength)=>{const oe=$?T:z;F[v]={type:$?U:H,message:oe,ref:o,...I($?U:H,oe)}};if(i?!Array.isArray(x)||!x.length:l&&(!k&&(C||Fe(x))||Xe(x)&&!x||B&&!dl(s).isValid||V&&!pl(s).isValid)){const{value:$,message:T}=Pe(l)?{value:!!l,message:l}:nr(l);if($&&(F[v]={type:dt.required,message:T,ref:L,...I(dt.required,T)},!n))return j(T),F}if(!C&&(!Fe(d)||!Fe(h))){let $,T;const z=nr(h),U=nr(d);if(!Fe(x)&&!isNaN(x)){const H=o.valueAsNumber||x&&+x;Fe(z.value)||($=H>z.value),Fe(U.value)||(T=H<U.value)}else{const H=o.valueAsDate||new Date(x),oe=se=>new Date(new Date().toDateString()+" "+se),Q=o.type=="time",ee=o.type=="week";Pe(z.value)&&x&&($=Q?oe(x)>oe(z.value):ee?x>z.value:H>new Date(z.value)),Pe(U.value)&&x&&(T=Q?oe(x)<oe(U.value):ee?x<U.value:H<new Date(U.value))}if(($||T)&&(E(!!$,z.message,U.message,dt.max,dt.min),!n))return j(F[v].message),F}if((c||f)&&!C&&(Pe(x)||i&&Array.isArray(x))){const $=nr(c),T=nr(f),z=!Fe($.value)&&x.length>+$.value,U=!Fe(T.value)&&x.length<+T.value;if((z||U)&&(E(z,$.message,T.message),!n))return j(F[v].message),F}if(p&&!C&&Pe(x)){const{value:$,message:T}=nr(p);if(bn($)&&!x.match($)&&(F[v]={type:dt.pattern,message:T,ref:o,...I(dt.pattern,T)},!n))return j(T),F}if(g){if(qe(g)){const $=await g(x,r),T=wl($,L);if(T&&(F[v]={...T,...I(dt.validate,T.message)},!n))return j(T.message),F}else if(fe(g)){let $={};for(const T in g){if(!Te($)&&!n)break;const z=wl(await g[T](x,r),L,T);z&&($={...z,...I(T,z.message)},j(z.message),n&&(F[v]=$))}if(!Te($)&&(F[v]={ref:L,...$},!n))return F}}return j(!0),F};const ig={mode:We.onSubmit,reValidateMode:We.onChange,shouldFocusError:!0};function og(e={}){let t={...ig,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:qe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=fe(t.defaultValues)||fe(t.values)?me(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:me(a),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...f};let h={...d};const p={array:al(),state:al()},g=t.criteriaMode===We.all,v=b=>m=>{clearTimeout(c),c=setTimeout(b,m)},_=async b=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||b)){let m;t.resolver?(m=Te((await k()).errors),S()):m=await I(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},S=(b,m)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((b||Array.from(s.mount)).forEach(w=>{w&&(m?X(r.validatingFields,w,m):pe(r.validatingFields,w))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Te(r.validatingFields)}))},x=(b,m=[],w,D,A=!0,y=!0)=>{if(D&&w&&!t.disabled){if(o.action=!0,y&&Array.isArray(N(n,b))){const P=w(N(n,b),D.argA,D.argB);A&&X(n,b,P)}if(y&&Array.isArray(N(r.errors,b))){const P=w(N(r.errors,b),D.argA,D.argB);A&&X(r.errors,b,P),ng(r.errors,b)}if((d.touchedFields||h.touchedFields)&&y&&Array.isArray(N(r.touchedFields,b))){const P=w(N(r.touchedFields,b),D.argA,D.argB);A&&X(r.touchedFields,b,P)}(d.dirtyFields||h.dirtyFields)&&(r.dirtyFields=rr(a,i)),p.state.next({name:b,isDirty:$(b,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(i,b,m)},L=(b,m)=>{X(r.errors,b,m),p.state.next({errors:r.errors})},j=b=>{r.errors=b,p.state.next({errors:r.errors,isValid:!1})},F=(b,m,w,D)=>{const A=N(n,b);if(A){const y=N(i,b,le(w)?N(a,b):w);le(y)||D&&D.defaultChecked||m?X(i,b,m?y:hl(A._f)):U(b,y),o.mount&&!o.action&&_()}},V=(b,m,w,D,A)=>{let y=!1,P=!1;const K={name:b};if(!t.disabled){if(!w||D){(d.isDirty||h.isDirty)&&(P=r.isDirty,r.isDirty=K.isDirty=$(),y=P!==K.isDirty);const G=xt(N(a,b),m);P=!!N(r.dirtyFields,b),G?pe(r.dirtyFields,b):X(r.dirtyFields,b,!0),K.dirtyFields=r.dirtyFields,y=y||(d.dirtyFields||h.dirtyFields)&&P!==!G}if(w){const G=N(r.touchedFields,b);G||(X(r.touchedFields,b,w),K.touchedFields=r.touchedFields,y=y||(d.touchedFields||h.touchedFields)&&G!==w)}y&&A&&p.state.next(K)}return y?K:{}},B=(b,m,w,D)=>{const A=N(r.errors,b),y=(d.isValid||h.isValid)&&Xe(m)&&r.isValid!==m;if(t.delayError&&w?(l=v(()=>L(b,w)),l(t.delayError)):(clearTimeout(c),l=null,w?X(r.errors,b,w):pe(r.errors,b)),(w?!xt(A,w):A)||!Te(D)||y){const P={...D,...y&&Xe(m)?{isValid:m}:{},errors:r.errors,name:b};r={...r,...P},p.state.next(P)}},k=async b=>(S(b,!0),await t.resolver(i,t.context,Zh(b||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),C=async b=>{const{errors:m}=await k(b);if(S(b),b)for(const w of b){const D=N(m,w);D?X(r.errors,w,D):pe(r.errors,w)}else r.errors=m;return m},I=async(b,m,w={valid:!0})=>{for(const D in b){const A=b[D];if(A){const{_f:y,...P}=A;if(y){const K=s.array.has(y.name),G=A._f&&Xh(A._f);G&&d.validatingFields&&S([y.name],!0);const _e=await yl(A,s.disabled,i,g,t.shouldUseNativeValidation&&!m,K);if(G&&d.validatingFields&&S([y.name]),_e[y.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(N(_e,y.name)?K?ag(r.errors,_e,y.name):X(r.errors,y.name,_e[y.name]):pe(r.errors,y.name))}!Te(P)&&await I(P,m,w)}}return w.valid},E=()=>{for(const b of s.unMount){const m=N(n,b);m&&(m._f.refs?m._f.refs.every(w=>!Xa(w)):!Xa(m._f.ref))&&ut(b)}s.unMount=new Set},$=(b,m)=>!t.disabled&&(b&&m&&X(i,b,m),!xt(Y(),a)),T=(b,m,w)=>Wh(b,s,{...o.mount?i:le(m)?a:Pe(b)?{[b]:m}:m},w,m),z=b=>Ka(N(o.mount?i:a,b,t.shouldUnregister?N(a,b,[]):[])),U=(b,m,w={})=>{const D=N(n,b);let A=m;if(D){const y=D._f;y&&(!y.disabled&&X(i,b,ul(m,y)),A=gn(y.ref)&&Fe(m)?"":m,ol(y.ref)?[...y.ref.options].forEach(P=>P.selected=A.includes(P.value)):y.refs?xr(y.ref)?y.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(A)?P.checked=!!A.find(K=>K===P.value):P.checked=A===P.value||!!A)}):y.refs.forEach(P=>P.checked=P.value===A):Ja(y.ref)?y.ref.value="":(y.ref.value=A,y.ref.type||p.state.next({name:b,values:me(i)})))}(w.shouldDirty||w.shouldTouch)&&V(b,A,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&se(b)},H=(b,m,w)=>{for(const D in m){if(!m.hasOwnProperty(D))return;const A=m[D],y=b+"."+D,P=N(n,y);(s.array.has(b)||fe(A)||P&&!P._f)&&!Nt(A)?H(y,A,w):U(y,A,w)}},oe=(b,m,w={})=>{const D=N(n,b),A=s.array.has(b),y=me(m);X(i,b,y),A?(p.array.next({name:b,values:me(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&w.shouldDirty&&p.state.next({name:b,dirtyFields:rr(a,i),isDirty:$(b,y)})):D&&!D._f&&!Fe(y)?H(b,y,w):U(b,y,w),ml(b,s)?p.state.next({...r,name:b,values:me(i)}):p.state.next({name:o.mount?b:void 0,values:me(i)})},Q=async b=>{o.mount=!0;const m=b.target;let w=m.name,D=!0;const A=N(n,w),y=G=>{D=Number.isNaN(G)||Nt(G)&&isNaN(G.getTime())||xt(G,N(i,w,G))},P=gl(t.mode),K=gl(t.reValidateMode);if(A){let G,_e;const zt=m.type?hl(A._f):Ph(b),kt=b.type===rl.BLUR||b.type===rl.FOCUS_OUT,rb=!Qh(A._f)&&!t.resolver&&!N(r.errors,w)&&!A._f.deps||rg(kt,N(r.touchedFields,w),r.isSubmitted,K,P),ti=ml(w,s,kt);X(i,w,zt),kt?(!m||!m.readOnly)&&(A._f.onBlur&&A._f.onBlur(b),l&&l(0)):A._f.onChange&&A._f.onChange(b);const ri=V(w,zt,kt),nb=!Te(ri)||ti;if(!kt&&p.state.next({name:w,type:b.type,values:me(i)}),rb)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?kt&&_():kt||_()),nb&&p.state.next({name:w,...ti?{}:ri});if(!kt&&ti&&p.state.next({...r}),t.resolver){const{errors:Ml}=await k([w]);if(S([w]),y(zt),D){const ab=vl(r.errors,n,w),Ll=vl(Ml,n,ab.name||w);G=Ll.error,w=Ll.name,_e=Te(Ml)}}else S([w],!0),G=(await yl(A,s.disabled,i,g,t.shouldUseNativeValidation))[w],S([w]),y(zt),D&&(G?_e=!1:(d.isValid||h.isValid)&&(_e=await I(n,!0)));D&&(A._f.deps&&(!Array.isArray(A._f.deps)||A._f.deps.length>0)&&se(A._f.deps),B(w,_e,G,ri))}},ee=(b,m)=>{if(N(r.errors,m)&&b.focus)return b.focus(),1},se=async(b,m={})=>{let w,D;const A=kr(b);if(t.resolver){const y=await C(le(b)?b:A);w=Te(y),D=b?!A.some(P=>N(y,P)):w}else b?(D=(await Promise.all(A.map(async y=>{const P=N(n,y);return await I(P&&P._f?{[y]:P}:P)}))).every(Boolean),!(!D&&!r.isValid)&&_()):D=w=await I(n);return p.state.next({...!Pe(b)||(d.isValid||h.isValid)&&w!==r.isValid?{}:{name:b},...t.resolver||!b?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!D&&Cr(n,ee,b?A:s.mount),D},Y=(b,m)=>{let w={...o.mount?i:a};return m&&(w=il(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),le(b)?w:Pe(b)?N(w,b):b.map(D=>N(w,D))},$r=(b,m)=>({invalid:!!N((m||r).errors,b),isDirty:!!N((m||r).dirtyFields,b),error:N((m||r).errors,b),isValidating:!!N(r.validatingFields,b),isTouched:!!N((m||r).touchedFields,b)}),Ar=b=>{const m=b?kr(b):void 0;m==null||m.forEach(w=>pe(r.errors,w)),m?m.forEach(w=>{p.state.next({name:w,errors:r.errors})}):p.state.next({errors:{}})},q=(b,m,w)=>{const D=(N(n,b,{_f:{}})._f||{}).ref,A=N(r.errors,b)||{},{ref:y,message:P,type:K,...G}=A;X(r.errors,b,{...G,...m,ref:D}),p.state.next({name:b,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&D&&D.focus&&D.focus()},Ir=(b,m)=>qe(b)?p.state.subscribe({next:w=>"values"in w&&b(T(void 0,m),w)}):T(b,m,!0),Pt=b=>p.state.subscribe({next:m=>{tg(b.name,m.name,b.exact)&&eg(m,b.formState||d,xn,b.reRenderRoot)&&b.callback({values:{...i},...r,...m,defaultValues:a})}}).unsubscribe,Rt=b=>(o.mount=!0,h={...h,...b.formState},Pt({...b,formState:{...f,...b.formState}})),ut=(b,m={})=>{for(const w of b?kr(b):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(pe(n,w),pe(i,w)),!m.keepError&&pe(r.errors,w),!m.keepDirty&&pe(r.dirtyFields,w),!m.keepTouched&&pe(r.touchedFields,w),!m.keepIsValidating&&pe(r.validatingFields,w),!t.shouldUnregister&&!m.keepDefaultValue&&pe(a,w);p.state.next({values:me(i)}),p.state.next({...r,...m.keepDirty?{isDirty:$()}:{}}),!m.keepIsValid&&_()},Tr=({disabled:b,name:m})=>{if(Xe(b)&&o.mount||b||s.disabled.has(m)){const A=s.disabled.has(m)!==!!b;b?s.disabled.add(m):s.disabled.delete(m),A&&o.mount&&!o.action&&_()}},ar=(b,m={})=>{let w=N(n,b);const D=Xe(m.disabled)||Xe(t.disabled);return X(n,b,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:b}},name:b,mount:!0,...m}}),s.mount.add(b),w?Tr({disabled:Xe(m.disabled)?m.disabled:t.disabled,name:b}):F(b,!0,m.value),{...D?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:Sr(m.min),max:Sr(m.max),minLength:Sr(m.minLength),maxLength:Sr(m.maxLength),pattern:Sr(m.pattern)}:{},name:b,onChange:Q,onBlur:Q,ref:A=>{if(A){ar(b,m),w=N(n,b);const y=le(A.value)&&A.querySelectorAll&&A.querySelectorAll("input,select,textarea")[0]||A,P=Kh(y),K=w._f.refs||[];if(P?K.find(G=>G===y):y===w._f.ref)return;X(n,b,{_f:{...w._f,...P?{refs:[...K.filter(Xa),y,...Array.isArray(N(a,b))?[{}]:[]],ref:{type:y.type,name:b}}:{ref:y}}}),F(b,!1,void 0,y)}else w=N(n,b,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Vh(s.array,b)&&o.action)&&s.unMount.add(b)}}},ft=()=>t.shouldFocusError&&Cr(n,ee,s.mount),yn=b=>{Xe(b)&&(p.state.next({disabled:b}),Cr(n,(m,w)=>{const D=N(n,w);D&&(m.disabled=D._f.disabled||b,Array.isArray(D._f.refs)&&D._f.refs.forEach(A=>{A.disabled=D._f.disabled||b}))},0,!1))},Dr=(b,m)=>async w=>{let D;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let A=me(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:y,values:P}=await k();S(),r.errors=y,A=me(P)}else await I(n);if(s.disabled.size)for(const y of s.disabled)pe(A,y);if(pe(r.errors,"root"),Te(r.errors)){p.state.next({errors:{}});try{await b(A,w)}catch(y){D=y}}else m&&await m({...r.errors},w),ft(),setTimeout(ft);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Te(r.errors)&&!D,submitCount:r.submitCount+1,errors:r.errors}),D)throw D},Mr=(b,m={})=>{N(n,b)&&(le(m.defaultValue)?oe(b,me(N(a,b))):(oe(b,m.defaultValue),X(a,b,me(m.defaultValue))),m.keepTouched||pe(r.touchedFields,b),m.keepDirty||(pe(r.dirtyFields,b),r.isDirty=m.defaultValue?$(b,me(N(a,b))):$()),m.keepError||(pe(r.errors,b),d.isValid&&_()),p.state.next({...r}))},Vt=(b,m={})=>{const w=b?me(b):a,D=me(w),A=Te(b),y=A?a:D;if(m.keepDefaultValues||(a=w),!m.keepValues){if(m.keepDirtyValues){const P=new Set([...s.mount,...Object.keys(rr(a,i))]);for(const K of Array.from(P)){const G=N(r.dirtyFields,K),_e=N(i,K),zt=N(y,K);G&&!le(_e)?X(y,K,_e):!G&&!le(zt)&&oe(K,zt)}}else{if(Ha&&le(b))for(const P of s.mount){const K=N(n,P);if(K&&K._f){const G=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(gn(G)){const _e=G.closest("form");if(_e){_e.reset();break}}}}if(m.keepFieldsRef)for(const P of s.mount)oe(P,N(y,P));else n={}}i=t.shouldUnregister?m.keepDefaultValues?me(a):{}:me(y),p.array.next({values:{...y}}),p.state.next({values:{...y}})}s={mount:m.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!m.keepIsValid||!!m.keepDirtyValues||!t.shouldUnregister&&!Te(y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!m.keepIsValid,o.action=!1,m.keepErrors||(r.errors={}),p.state.next({submitCount:m.keepSubmitCount?r.submitCount:0,isDirty:A?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!xt(b,a)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:A?{}:m.keepDirtyValues?m.keepDefaultValues&&i?rr(a,i):r.dirtyFields:m.keepDefaultValues&&b?rr(a,b):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Bt=(b,m)=>Vt(qe(b)?b(i):b,{...t.resetOptions,...m}),_n=(b,m={})=>{const w=N(n,b),D=w&&w._f;if(D){const A=D.refs?D.refs[0]:D.ref;A.focus&&setTimeout(()=>{A.focus(),m.shouldSelect&&qe(A.select)&&A.select()})}},xn=b=>{r={...r,...b}},Lr={control:{register:ar,unregister:ut,getFieldState:$r,handleSubmit:Dr,setError:q,_subscribe:Pt,_runSchema:k,_updateIsValidating:S,_focusError:ft,_getWatch:T,_getDirty:$,_setValid:_,_setFieldArray:x,_setDisabledField:Tr,_setErrors:j,_getFieldArray:z,_reset:Vt,_resetDefaultValues:()=>qe(t.defaultValues)&&t.defaultValues().then(b=>{Bt(b,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:E,_disableForm:yn,_subjects:p,_proxyFormState:d,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(b){o=b},get _defaultValues(){return a},get _names(){return s},set _names(b){s=b},get _formState(){return r},get _options(){return t},set _options(b){t={...t,...b}}},subscribe:Rt,trigger:se,register:ar,handleSubmit:Dr,watch:Ir,setValue:oe,getValues:Y,reset:Bt,resetField:Mr,clearErrors:Ar,unregister:ut,setError:q,setFocus:_n,getFieldState:$r};return{...Lr,formControl:Lr}}function mn(e={}){const t=Ie.useRef(void 0),r=Ie.useRef(void 0),[n,a]=Ie.useState({isDirty:!1,isValidating:!1,isLoading:qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:qe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!qe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=og(e);t.current={...s,formState:n}}const i=t.current.control;return i._options=e,qh(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(s=>({...s,isReady:!0})),i._formState.isReady=!0,o},[i]),Ie.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Ie.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),Ie.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),Ie.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),Ie.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),Ie.useEffect(()=>{var o;e.values&&!xt(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((o=i._options.resetOptions)===null||o===void 0)&&o.keepIsValid||i._setValid(),r.current=e.values,a(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),Ie.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Ie.useMemo(()=>Uh(n,i),[i,n]),t.current}const _l=(e,t,r)=>{if(e&&"reportValidity"in e){const n=N(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},sg=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?_l(n.ref,r,e):n.refs&&n.refs.forEach(a=>_l(a,r,e))}},lg=(e,t)=>{t.shouldUseNativeValidation&&sg(e,t);const r={};for(const n in e){const a=N(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(cg(t.names||Object.keys(e),n)){const o=Object.assign({},N(r,n));X(o,"root",i),X(r,n,o)}else X(r,n,i)}return r},cg=(e,t)=>e.some(r=>r.startsWith(t+"."));var vn=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{var o=!i.shouldUseNativeValidation&&i.criteriaMode==="all";return Promise.resolve(sd(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var c=s.issues[0],f=nd(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var d=l[f].types,h=d&&d[c.type];l[f]=nl(f,o,l,c.type,h?[].concat(h,c.message):c.message)}s.issues.shift()}return{values:{},errors:lg(l,i)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const xl=27,kl=12,Sl=10,dg=Xt("enum"),ug=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return vn(te({checked:je(lr(M(),Ur()),Br(n=>Object.entries(n).filter(([a,i])=>i).map(([a,i])=>a)),$t(r.max,t("validation_multiple_choice_max",{count:r.max})),et(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},fg=fa(({option:e,...t},r)=>u(ce,{children:[u("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),u("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Cl=Mt("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:Ys}}}),pg=({input:e,onSubmitSuccess:t})=>{var f,d;const r=e.key?(f=O.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,a=n&&e.config.options.length===2,{t:i}=de(),{register:o,handleSubmit:s,formState:{errors:l}}=mn({defaultValues:{checked:n?{}:dg(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:ug(e.config,i)}),c=Wa();return a?u(ce,{children:[u("ul",{style:{maxHeight:6.5*xl+5*kl+2*Sl},class:Cl({variant:"booleanLike"}),children:e.config.options.map((h,p)=>u("li",{class:Js,children:u(Zs,{type:"submit",ref:g=>{g&&p===0&&(c.current=g)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}),e.config.minSelected===0&&u("div",{class:"px-2 pb-2",children:u(lt,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):u("form",{noValidate:!0,onSubmit:h=>s(p=>{const g=p.checked;t({type:"enum",value:g})})(h),children:[u("div",{class:"flex items-center gap-1",children:[u("ul",{style:{maxHeight:6.5*xl+5*kl+2*Sl},class:Cl({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,p)=>{const g=`checked.${h.value}`,{ref:v,..._}=o(g);return u("li",{class:"relative",children:u(fg,{option:h,autoFocus:p===0,ref:S=>{S&&p===0&&(c.current=S),v(S)},id:g,..._,onClick:n?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),u("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:u(Ot,{}),e.config.minSelected===0&&u(lt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),u("div",{class:"px-1",children:u(er,{error:(d=l.checked)==null?void 0:d.root,refusal:!0})})]})},hg=Xt("number"),gg=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,a=e.decimalCases??0;return vn(te({number:je(Re(t("validation_number")),ji(r,t("validation_number_min",{min:r})),Li(n,t("validation_number_max",{max:n})),Mi(i=>i===Number(i.toFixed(a)),t("validation_number_decimal_cases",{count:a})))}))},bg=({input:e,onSubmitSuccess:t})=>{var d;const r=e.config.defaultValue,n=e.key?(d=O.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:a}=de(),{register:i,handleSubmit:o,formState:{errors:s}}=mn({defaultValues:{number:hg(n)?n.value:r?Number(r):void 0},resolver:gg(e.config,a)}),{ref:l,...c}=i("number",{required:!e.config.optional,valueAsNumber:!0}),f=ge();return Ee(()=>{f.current&&(f.current.focus(),f.current.select())},[]),u("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-grow",children:[u("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(f.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:tr({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&u(lt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ot,{})]}),u(er,{error:s.number,refusal:!0})]})},mg="44",vg=/^[0-9 ]+$/,wg=Xt("string"),yg=Xt("phone"),_g=e=>{const t=je(M(e("validation_country_code")),Un(vg,e("validation_country_code"))),r=je(M(e("validation_phone")),et(1,e("validation_phone")),Br(n=>n.replace(/[^0-9]/g,"")));return vn(te({countryCode:t,phoneNumber:r}))},xg=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=O.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=de(),[a,i]=ze(),o=wg(r)?_h(r.value):yg(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=mn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??mg,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:_g(n)}),{ref:d,...h}=s("phoneNumber",{required:!e.config.optional}),p=ge(),g=f("countryCode");return Ee(()=>{p.current&&(p.current.focus(),p.current.select())},[]),u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(_=>{const S=_.phoneNumber.replace(/[^0-9]/g,""),x=_.countryCode.replace(/[^0-9]/g,"");i(void 0);const L=e.config.minChars??7,j=S.length+x.length;if(j<L)return i(n("validation_phone_min_chars",{count:L}));const F=e.config.maxChars;if(F!=null&&j>F)return i(n("validation_max_chars",{count:F}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:x,phoneNumber:S}}):t({type:"string",value:g+_.phoneNumber})}),children:[u("div",{class:"flex items-center gap-2",children:[u("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[u("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[u("span",{children:["+",g]}),u("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Ua).map(([_,S])=>u("option",{value:S,children:[_," (+",S,")"]},_))})]}),u("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(p.current=_),d(_)},class:tr({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&u(lt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),u(Ot,{})]}),u(er,{error:c.countryCode||c.phoneNumber||{message:a},refusal:!0})]})},wn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),El=(e,t,r,n)=>r!==void 0&&n*1e3>Nn?e("submission_available_at",{time:Ci(r,t)}):e("submission_cooldown",{count:n}),kg=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Sg=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=de(),{availableAt:a}=e.config,[i,o]=ze(()=>wn(a)),[s,l]=ze("");Tt(()=>{const f=wn(a);if(o(f),f===0)return;l(El(r,n,a,f));const d=setInterval(()=>{const h=wn(a);o(h),!(h>0)&&(clearInterval(d),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(d)},[a,n,r]);const c=i>0;return u("div",{class:"flex flex-col items-center gap-2 py-3",children:[u("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{wn(a)>0||t(null)},children:u("span",{class:"flex items-center gap-1.5",children:[u("span",{class:"inline-flex items-center text-sm font-medium",children:kg(e.config.label,r)}),u("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M4 8L8 4L12 8"}),u("path",{d:"M8 4V13"})]})]})}),c&&u("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:El(r,n,a,i)}),u("p",{role:"status",class:"sr-only",children:s})]})},Cg=160,$l=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Cg)}px`},Eg={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},$g=Xt("string"),Ag=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return vn(te({text:{date:je(M(t("validation_date")),Un(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:je(M(t("validation_email")),zn(t("validation_email")),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength)),text:je(M(),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength)),url:je(M(t("validation_url")),Fi(t("validation_url")),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength))}[e.format]}))},Ig={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=de(),n=e.key?(v=O.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,a=e.config.defaultValue,i=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=mn({defaultValues:{text:$g(n)?n.value:a??""},resolver:Ag(e.config,r)}),{ref:f,...d}=o("text",{required:!e.config.optional}),h=ge();Ee(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&$l(h.current),h.current.focus(),h.current.select())},[]);const p=e.config.maxChars,g=i&&p!==void 0?l("text").length:void 0;return u("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(_=>{t({type:"string",value:_.text})}),children:[u("div",{class:i?"flex items-end gap-2":"flex items-center gap-2",children:[u("div",{class:"relative min-w-0 flex-1",children:[i?u("textarea",{id:"chat-input",...d,rows:2,maxLength:p,autoFocus:!0,"aria-describedby":g!==void 0?"chat-input-count":void 0,onInput:_=>$l(_.currentTarget),onKeyDown:_=>{var S;_.key==="Enter"&&(_.ctrlKey||_.metaKey)&&(_.preventDefault(),(S=_.currentTarget.form)==null||S.requestSubmit())},ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:tr({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):u("input",{id:"chat-input",...d,...Eg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:tr({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&u(lt,{class:i?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),u(Ot,{})]}),g!==void 0&&p!==void 0&&u("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[g,"/",p]}),u(er,{error:c.text,refusal:!0})]})},phone:xg,"multiple-choice":pg,boolean:Dh,file:Nh,submit:Sg,address:$h,number:bg},Tg=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=O.current$.value.flow)==null?void 0:o.data.currentInput,a=ge(null),i=()=>ie.onInteractionFn$.value();return Ee(()=>{var s;(s=a.current)==null||s.scrollTo({top:0})},[n]),u("div",{ref:a,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:u("div",{class:"flex flex-col",onPointerDownCapture:n?i:void 0,onKeyDownCapture:n?i:void 0,onInputCapture:n?i:void 0,children:n?(()=>{const s=Ig[n.type];return u(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ie.onSubmitSuccessFn$.value,input:n})})():u("div",{class:"flex items-center gap-2 p-2.5",children:[u("input",{"aria-hidden":"true",id:"chat-input",class:tr({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),u(Ot,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Dg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mg=function(e){return e instanceof RegExp},Lg=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Al=function(e){return typeof e=="string"},jg=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Fg(e,t,r){var n=0,a=0;if(e==="")return e;if(!e||!Al(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=t;Mg(i)||(i=new RegExp("("+Lg(i)+")","gi"));for(var o=e.split(i),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}a=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=a}return o}var Og=function(t,r,n){return Array.isArray(t)||(t=[t]),jg(t.map(function(a){return Al(a)?Fg(a,r,n):a}))};const Er=Dg(Og),Ng=/(\[[^\]]+\]\([^)]+\))/g,Pg=/\[([^\]]+)\]\(([^)]+)\)/,Rg=/(https?:\/\/[^\s]+)/g,Vg=/_(.*?)_/g,Bg=/\*\*(.*?)\*\*/g,zg=/(\\n|\n)/g,Il="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Ug=e=>{const t=Er(e,Ng,(s,l)=>{const[,c,f]=s.match(Pg)??[];return f?u("a",{class:Il,href:f,children:c??f},f+l):u("span",{children:"INVALID LINK"})}),r=Er(t,Rg,(s,l)=>u("a",{class:Il,href:s,children:s},s+l)),n=Er(r,Vg,(s,l)=>u("em",{children:s},s+l)),a=Er(n,Bg,(s,l)=>u("strong",{children:s},s+l));let i=0;return Er(a,zg,()=>u("br",{},`br-${i++}`))},qg=Mt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Wg=({children:e,className:t,animate:r,side:n,...a})=>u("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:qg({className:t,side:n,animate:r}),...a,children:e}),Tl=new Map,Dl=of({overrides:{},locale:void 0}),Hg=(e,t)=>{const r=t==null?void 0:t.trim();if(!r)return e("job_alerts_privacy");const n=e("job_alerts_privacy_sender",{employer:r});return e("job_alerts_privacy")!==Dl("job_alerts_privacy")&&n===Dl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Kg=({flow:e,rpcClient:t})=>{const{t:r}=de(),n=e.data.flowSessionId,a=Tl.get(n)??Ne("offer");Tl.set(n,a);const i=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=i("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[i(l.data.key)]:[]).find(l=>!!l);if(!o||a.value==="declined")return null;if(a.value==="success")return u("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(a.value!=="offer"&&a.value!=="error")){a.value="saving";try{await Fd(t,{contact:{email:o,first_name:i("first_name"),last_name:i("last_name")},job:e.job}),a.value="success"}catch{a.value="error"}}};return u("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[u("p",{children:r("job_alerts_offer",{email:o})}),a.value==="error"?u("p",{role:"alert",children:r("job_alerts_error")}):null,u("div",{class:"flex gap-2",children:[u("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:a.value==="saving",onClick:s,children:r("job_alerts_accept")}),u("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:a.value==="saving",onClick:()=>{a.value!=="offer"&&a.value!=="error"||(a.value="declined")},children:r("job_alerts_decline")})]}),u("p",{class:"text-xs",children:Hg(r,e.employer)})]})},Gg=({message:e,analytics:t})=>u("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:u("a",{onClick:()=>{var a;const r=O.current$.peek().flow,n=r==null?void 0:r.nodes.find(i=>i.id===e.groupId);r&&((n==null?void 0:n.type)==="integration-application-submit"||(n==null?void 0:n.type)==="link"&&Rs(n.data.href,e.href))&&(st(r).redirected(),Ft(t,r,"redirect")),(a=e.onClick)==null||a.call(e)},class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,u("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Yg=({className:e,...t})=>u("div",{"aria-hidden":!0,children:ie.isBotTyping$.value===!0?u("div",{"data-testid":"typing-indicator",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>u("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),Jg={bot:"left",user:"right"},Zg=Mt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),Xg=({env:e,lastSentMessageFooter:t,rpcClient:r,analytics:n})=>{const{t:a}=de(),i=O.current$.value.flow,o=(i==null?void 0:i.data.messages)??[],s=o.findIndex(c=>c.type==="system"&&c.semantic==="submission-closed"),l=i?Ma(i):void 0;return u("ol",{"aria-label":a("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[o.map((c,f)=>u(ce,{children:[u("li",{class:"flex",tabIndex:f===o.length-1?-1:void 0,children:[l&&c.groupId===l&&!o.slice(f+1).some(d=>d.groupId===l)?t:null,rn(c).with({type:"system"},d=>u("p",{class:Zg({variant:d.variant}),children:d.text})).with({type:"text",author:Dt.union("bot","user")},d=>{const h=f===o.length-1,p=d.author==="bot"?Ug(d.text):d.text;return u(ce,{children:u(Wg,{animate:h,side:Jg[d.author],children:p},f)})}).with({type:"link"},d=>u(Gg,{message:d,analytics:n})).with({type:"image"},d=>u("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:d.url,style:{aspectRatio:d.width/d.height}})).with({type:"file"},d=>u(Lh,{class:d.author==="bot"?void 0:"ml-auto",file:{name:d.fileName,sizeKb:d.fileSizeKb}})).with({type:"loading"},d=>{const h=o[o.length-1];return!(d===h)||ie.isBotTyping$.value||i!=null&&i.data.isFinished?null:u("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[u(cn,{"aria-hidden":d.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),d.text?u("p",{role:"status",class:"text-neutral-11 text-sm",children:d.text}):null]})}).exhaustive()]}),f===s&&(i!=null&&i.jobAlerts)&&r?u("li",{children:u(Kg,{flow:i,rpcClient:r},i.data.flowSessionId)}):null]},f)),e&&e!=="production"&&(i==null?void 0:i.data.isFinished)&&i.data.stagingDestination&&u("li",{class:"text-neutral-11 text-center text-xs",children:i.data.stagingDestination}),u("li",{class:ie.captchaVisible$.value?"flex":"hidden",children:u("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":a("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),u(Yg,{},"typing")]})},Qg=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:a,env:i})=>{const{flow:o}=O.current$.value;ot(o,"Flow is required to exist to show chatbot body");const s=O.viewState$.value,{chatRef:l,chatService:c}=th(),{t:f}=de(),[d,h]=ze();return Ee(()=>{s==="maximised"&&ie.scrollToEnd()},[s]),Ee(()=>{var B;const{state:p,flow:g}=O.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=g.data.nodeHistory.at(-1);if(ie.scrollToEnd(),O.setInput(void 0),g.data.isFinished)return;const _=()=>{const k=O.current$.peek().flow;k&&st(k).active(),!(!k||k.data.hasInteracted)&&(O.markAsInteracted(),Ws(n,k,"FLOW_INTERACT"))};ie.onInteractionFn$.value=_,v===void 0?(v=js(o.nodes).id,O.setCurrentNodeId(v),Ws(n,g,"FLOW_START")):O.removeMessagesSentByNodeIds([v,za]);const{interpret:S,abort:x,undo:L}=_p({context:o.context,analytics:{service:n,customProperties:(B=o.analytics)==null?void 0:B.customProperties},apiClient:Zp(t,n,g),logger:e,talentBankClient:a,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var k;return(k=O.current$.peek().flow)==null?void 0:k.data.applicationRecovery},setApplicationRecovery:O.setApplicationRecovery,persistWriteBarrier:()=>O.persistWriteBarrier(g),getSubmissions:()=>{var k;return(k=O.current$.peek().flow)==null?void 0:k.data.submissions},onInterpret:k=>O.setCurrentNodeId(k.id),onFlowEnd:async()=>{var C;O.markAsFinished(),Ft(n,g,"submit");const k=O.current$.peek().flow;ot(k),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:k.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(C=o.analytics)==null?void 0:C.customProperties})}}),j=v,F=()=>{h(()=>L),S(j)},V=new AbortController;return g.offerResume?yh({chatService:c,t:f,signal:V.signal}).then(k=>(O.settleResume(g),k?F():(O.restart(),ke.flushStateData()))).catch(k=>{k instanceof pt||e.error("Resume prompt failed",k)}):F(),()=>{V.abort(),ie.onInteractionFn$.value===_&&(ie.onInteractionFn$.value=()=>{}),x()}},[n,t,c,e,o,a,f]),u(ce,{children:[u("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[u("div",{ref:l,role:"region","aria-label":f("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:u(Xg,{analytics:n,env:i,rpcClient:r,lastSentMessageFooter:!Ma(o)||!d?null:u(eb,{undoFn:d})})}),ie.isReadingHistory$.value&&!o.data.isFinished&&!ie.isBotTyping$.value&&u("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:u(wr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var g,v;ie.scrollToEnd(),(v=((g=l.current)==null?void 0:g.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:u(xs,{})})})]}),u(Tg,{logger:e,analytics:n,rpcClient:r})]})},eb=({undoFn:e})=>{const{t}=de();return u("div",{class:"flex flex-1 items-center justify-end px-1",children:u(wr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=O.current$.peek();ot(r),st(r).active(),e(r.data.nodeHistory)},children:u("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},tb=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Qg},Symbol.toStringTag,{value:"Module"}))})();
|
|
37
|
+
}`};class qs extends uu{}const dh=({_internal_domManager:e=Kf(),theme:t,terms:r,feedback:n,jobAlerts:i})=>lu(({apiClient:a,rpcClient:o,logger:s,analytics:l,publishableKey:c,env:f})=>{let u=!1,h=0,p;qf(f,c);const g=Wf(Bf(a));let v=0;const _=new WeakMap,S=(k,C)=>{const I=++v,E=performance.now();return C.catch($=>{throw typeof $=="object"&&$!==null&&_.set($,{endpoint:k,attempt:I,elapsed_ms:Math.round(performance.now()-E)}),$})},x=(k,C)=>{const I=As(k);I===404||I===410||Qt("fatal","application_unavailable",{phase:"flow",stage:C,error:Ei(k),http_status:I,...C==="flow_fetch"&&typeof k=="object"&&k!==null&&_.get(k)})},L=c&&f?Du({environment:f,publishableKey:c,logger:s}):void 0,j=k=>k===h,F=()=>{if(typeof window>"u")return;h++,p==null||p(),p=void 0,ke.flushStateData().catch(()=>{}),O.cancelCurrentFlow(),ae.isBotTyping$.value=!1;const k=e.getChatbotElement();k&&(It(null,k),k.remove()),u=!1,s.info("Chatbot plugin destroyed")},V=()=>{if(typeof window>"u")return;const k=h,C=[Oe("style",{id:"inploi-chatbot-styles"},Hf),Oe("style",{id:"inploi-chatbot-theme"},uh(t))],I=e.getOrCreateChatbotElement();ae.themeMode$.value=t.mode;const E=Ne(!1);if(It(Oe(ce,{},[C,Oe(Rf,{env:f,rpcClient:o,apiClient:g,logger:s,analytics:l,talentBankClient:L,params:{theme:t,terms:r,feedback:n},feedbackReady:E})]),I),n){const $=T=>{var U,H;if(!j(k))return;const z=(U=e.getChatbotElement())==null?void 0:U.querySelector("dialog");z&&fh({instance:T({rpcClient:o,apiClient:a,logger:s,analytics:l}),theme:t,terms:((H=n.params)==null?void 0:H.terms)??{},host:z}).then(()=>{E.value=!0},oe=>s.error("Error rendering feedback plugin",oe))};n.plugin instanceof Promise?n.plugin.then(({feedbackPlugin:T})=>{$(T())}).catch(T=>{s.error("Error preparing feedback plugin",T)}):$(n.plugin)}p??(p=Jp(l)),u=!0},B=async(k,C)=>{if(!j(C))return;Kc({context:Pn(k.jobContext,k.context||{}),schema:k.flow.context_schema,logger:s});const I=await O.prepareFlow({...k,jobAlerts:k.jobAlerts??i});j(C)&&O.commitFlow(I)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;V(),s.info("Chatbot plugin prepared")}catch(k){s.error("Error preparing chatbot plugin",k)}},fetchFlowByJobId:async(k,C)=>{const I=(C==null?void 0:C.idType)==="inploi"?"internal":"external";return S("flow_by_job",o.request(qu,{params:{id:k},searchParams:{id_type:I}})).catch(E=>{throw Do({name:"ApiError",message:Dt.string,status:410,data:Dt.union({job:{status:"closed"}},{integration_response:{error:{data:{code:"job_closed"}}}})},E)?new qs(E.message,E.status,E.data):E}).then(E=>({flow:E.flow,title:E.job.title,flowKeys:[E.job.id,...(C==null?void 0:C.flowKeys)??[]],job:Uu(E,{id:k,idType:I}),employer:E.company.name,...C,jobContext:E.context,context:{user:E.user,...C==null?void 0:C.context}}))},fetchFlowById:async(k,C)=>S("flow_by_id",o.request(Wu,{params:{id:k}})).then(I=>{var E;return{flow:I.flow,title:"Chatbot",flowKeys:(C==null?void 0:C.flowKeys)??[],...C,analytics:{customProperties:{flow_id:I.flow.id,flow_version:I.flow.version,...(E=C==null?void 0:C.analytics)==null?void 0:E.customProperties}}}}),open:async k=>{if(typeof window>"u")return;const C=performance.now();try{O.cancelCurrentFlow(),O.viewState$.value="maximised",u||V()}catch(E){s.error("Error starting flow",E),Qt("boot_failed",jr(E),{phase:"config",error:Ei(E),elapsed_ms:Math.round(performance.now()-C)});return}Qt("boot");const I=h;if(k instanceof Promise){O.current$.value={state:"loading"};const E=$=>T=>{j(I)&&(s.error("Error loading flow",T),O.current$.value={state:T instanceof qs?"closed":"error"},x(T,$))};k.then($=>B($,I).catch(E("create")),E("flow_fetch"))}else await B(k,I).catch(E=>{s.error("Error starting flow",E),x(E,"create")})},hasApplicationInProgress:async k=>{const C=await ke.getStateData(k.flow,k.flowKeys,k.context??{});return C!==void 0&&ws({data:C,nodes:k.flow.nodes})},hasAnyApplicationInProgress:async()=>(await ke.getAllStateData()).some(k=>ws({data:k,nodes:[]})),close:async()=>{typeof window>"u"||(O.cancelCurrentFlow(),s.info("Closed flow from an external source"))},destroy:F}});function fh({instance:e,terms:t,theme:r,host:n}){return e.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:r.chroma??1,hue:r.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:r.mode,corners:"rounded",highlights:"stroke"},terms:t,host:n})}if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=dh;const ph=Object.freeze(Object.defineProperty({__proto__:null,jobCountryCodes:Zc},Symbol.toStringTag,{value:"Module"}));var hh="https://maps.inploi.com",gh=(e,t)=>{const r=new URL(`/${e}`,hh);return r.search=new URLSearchParams({q:t.query,limit:"5",surface:t.surface,seed:t.seed}).toString(),t.country&&r.searchParams.set("country",t.country),r},Bi=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),bh=e=>{if(!Bi(e)||typeof e.label!="string"||!Bi(e.address)||e.country!==void 0&&typeof e.country!="string")return;const t={};for(const r of["line1","line2","line3","city","state","postcode","country"]){const n=e.address[r];if(n!==void 0&&typeof n!="string")return;n!==void 0&&(t[r]=n)}return{id:e.label,label:e.label,country:e.country,address:t}},mh=async(e,t,r)=>{const n=await fetch(e.href,{signal:r});if(!n.ok)return;const i=n.headers.get("X-Geo-Arm"),a=await n.json();if(i!=="inploi"&&i!=="mapbox"||!Bi(a)||!Array.isArray(a.results)||a.source!=="photon"&&a.source!=="mapbox"&&a.source!=="places"||typeof a.attribution!="string")return;const o=[];for(const s of a.results){const l=t(s);if(l===void 0)return;o.push(l)}return{results:o,arm:i,source:a.source}},vh=e=>{const t=gh("address",{...e,seed:e.session});return t.searchParams.set("session",e.session),e.lat!==void 0&&e.lng!==void 0&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180&&(t.searchParams.set("lat",String(e.lat)),t.searchParams.set("lng",String(e.lng))),mh(t,bh,e.signal)};const wh=Object.freeze(Object.defineProperty({__proto__:null,lookupAddress:vh},Symbol.toStringTag,{value:"Module"})),Ws=(e,t,r)=>{var n;return e.log({event:r,properties:{flow_id:t.id,flow_version:t.version,flow_session_id:t.data.flowSessionId,flow_build:t.build,flow_type:"CHATBOT_DRAWER",job:t.job},customProperties:(n=t.analytics)==null?void 0:n.customProperties})},zi="resume-prompt",yh=async({chatService:e,t,signal:r})=>{await e.send({message:{type:"text",author:"bot",text:t("resume_prompt")},groupId:zi,signal:r});const n=await e.input({input:{type:"boolean",key:void 0,config:{labels:{true:t("resume_continue"),false:t("resume_start_again")},optional:!1}},signal:r});return O.removeMessagesSentByNodeIds([zi]),(n==null?void 0:n.value)!==!1},Ot=({class:e,...t})=>{const{t:r}=ue();return d("button",{class:at("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:r("send")}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})})},er=({error:e,refusal:t=!1})=>{const r=e==null?void 0:e.message;return Ee(()=>{const n=O.current$.peek().flow;t&&r&&n&&st(n).refused()},[r,t]),!e||!e.message?null:d("div",{role:"alert",class:"text-error-11 flex max-w-full items-start gap-1 overflow-hidden rounded-2xl px-2 py-2",children:[d("svg",{class:"text-error-9 mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"break-words pr-1 text-sm",children:e.message})]})},lt=({class:e,...t})=>{const{t:r}=ue();return d("button",{type:"button",class:at("fr touch-hitbox text-neutral-11 bg-neutral-1 ring-divider hover:ring-divider active:ring-interactive-bg-hover hover:text-neutral-12 active:text-neutral-12 hover:bg-divider active:bg-interactive-bg-hover flex flex-shrink-0 items-center justify-center gap-1 self-center rounded-full py-1 pl-2 pr-2.5 text-sm ring-1 transition-all",e),...t,children:[d("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:r("skip")}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var Ui={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},_h=e=>{if(e==="")return{countryCode:"",phoneNumber:""};let t=Object.values(Ui).find(n=>e.startsWith(n))??"",r=e.replace(t,"");return/^\d+$/.test(r)?{countryCode:t,phoneNumber:r}:{countryCode:"",phoneNumber:""}};const tr=Mt("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),xh="https://api.mapbox.com/search/searchbox/v1/suggest",kh="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Sh=e=>atob(e).split("").reverse().join(""),ct=te({name:M()}),Ch=te({suggestions:sr(te({feature_type:Le(M()),full_address:Le(M()),place_formatted:Le(M()),name:Le(M()),mapbox_id:M(),context:ou(te({address:ct,street:ct,neighborhood:ct,locality:ct,district:ct,place:ct,region:ct,postcode:ct,country:ct}))}))}),Eh=e=>(Tt(()=>{e&&Wa(e)},[e]),gt(()=>{var r;const t=(r=O.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async(n,i)=>{var c;const a=e&&Wa(e),o=(c=O.current$.peek().flow)==null?void 0:c.locationOrigin,s=o&&o.lat!==void 0&&o.lng!==void 0&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&o.lat>=-90&&o.lat<=90&&o.lng>=-180&&o.lng<=180;return{...await pf({query:n,country:a,session:t,surface:"chatbot",...s?{lat:o.lat,lng:o.lng}:{},signal:i},async()=>{const f=new URL(xh);return f.searchParams.set("q",n),f.searchParams.set("session_token",t),f.searchParams.set("limit","5"),s&&f.searchParams.set("proximity",`${o.lng},${o.lat}`),f.searchParams.set("access_token",Sh(kh)),(await Vu(async p=>{const g=new URL(f);p&&g.searchParams.set("country",p);const v=await fetch(g.href,{signal:i});if(!v.ok)throw new Error(`Address lookup failed with ${v.status}`);return Va(Ch,await v.json()).suggestions},a,i)).map(p=>{var g,v,_,S,x,L,j,F,V;return{country:a,label:p.full_address??([p.name,p.place_formatted].filter(Boolean).join(", ")||p.mapbox_id),id:p.mapbox_id,address:{line1:((g=p.context.address)==null?void 0:g.name)??((v=p.context.street)==null?void 0:v.name),line2:void 0,line3:((_=p.context.neighborhood)==null?void 0:_.name)??((S=p.context.locality)==null?void 0:S.name),city:((x=p.context.place)==null?void 0:x.name)??((L=p.context.district)==null?void 0:L.name),state:(j=p.context.region)==null?void 0:j.name,postcode:((F=p.context.postcode)==null?void 0:F.name)??(p.feature_type==="postcode"?p.name:void 0),country:(V=p.context.country)==null?void 0:V.name}}})}),country:a}}}:{enabled:!1}},[e])),Hs=e=>{const{t}=ue();return d("button",{type:"button",class:"touch-hitbox text-neutral-11 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 relative flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:t("back")})]})},$h=({input:e,onSubmitSuccess:t,logger:r,analytics:n,rpcClient:i})=>{const{t:a}=ue(),[o,s]=ze(),{enabled:l,getPredictions:c}=Eh(i),[f,u]=ze(l?"query":"manual"),[h,p]=ze(""),[g,v]=ze(),_=ge(),S=()=>{var k;(k=_.current)==null||k.controller.abort(),_.current=void 0};Tt(()=>S,[]);const x=ge(),L=ge(),j=ge(!1),F=k=>{const C=k!==null?x.current:void 0,I=(C==null?void 0:C.lookup)??L.current;if(I&&!j.current){j.current=!0;const E=z=>{const U=e.config.keys[z];return k&&U?k.value[U]:void 0},$=E("country")??(C==null?void 0:C.suggestion.address.country)??(C==null?void 0:C.suggestion.country),T=k&&os({postcode:E("postcode")??(C!=null&&C.edited||o==null?void 0:o.postcode),label:C!=null&&C.edited||C==null?void 0:C.suggestion.label,state:E("state")??(C!=null&&C.edited||o==null?void 0:o.state),country:$});hf({kind:"address",surface:"chatbot",...I,picked:!!C,...C?{edited:C.edited}:{},region:T??($!=null&&$.trim()?"other":null)})}t(k)},V=k=>{var I;if(ot(l,"Query state should not be enabled"),k=k.trim(),k===((I=_.current)==null?void 0:I.query)||k===(g==null?void 0:g.query)&&g.status==="done")return;if(S(),p(k),k===""){v(void 0);return}const C=_.current={query:k,controller:new AbortController};v({query:k,status:"pending"}),c(k,C.controller.signal).then(E=>{_.current===C&&(_.current=void 0,L.current={arm:E.arm,source:E.source},v({query:k,status:"done",items:E.results,...L.current,country:E.country}))},E=>{_.current===C&&(_.current=void 0,L.current={arm:"direct",source:"direct"},r.error("Failed to get address details",E instanceof Da?"Unexpected response":E),v({query:k,status:"failed",error:a("address_error")}))})},B=(k,C)=>{x.current&&(o==null?void 0:o[k])!==C&&(x.current.edited=!0),s(I=>({...I,[k]:C}))};switch(f){case"query":return ot(l,"Query state should not be enabled"),d(Ah,{input:e,onSkip:()=>F(null),onAddressSelect:(k,C)=>{var E;if(k===""){_.current&&(S(),v(void 0)),u("manual");return}if((g==null?void 0:g.status)!=="done")return;const I=g.items.find($=>$.id===k);I&&(g.arm!=="inploi"&&uf({query:C,country:g.country,pickedLabel:I.label,pickedPostcode:I.address.postcode,pickedCountry:I.address.country,pickedState:I.address.state,log:$=>n.log({event:"ADDRESS_SHADOW_COMPARED",properties:$})}),((E=x.current)==null?void 0:E.suggestion.id)!==k?(s(I.address),x.current={suggestion:I,lookup:{arm:g.arm,source:g.source},edited:!1}):x.current.lookup={arm:g.arm,source:g.source},u("details"))},onAddressSearch:V,lookup:g,query:h});case"details":return ot(o!==void 0),d(Ks,{input:e,logger:r,onSubmitSuccess:F,addressFields:o,onFieldChange:B,actions:d(Hs,{onClick:()=>{u("query")}})});case"manual":return d(Ks,{logger:r,input:e,onSubmitSuccess:F,addressFields:o??{},onFieldChange:B,actions:l?d(Hs,{onClick:()=>{u("query")}}):e.config.optional?d(lt,{onClick:()=>F(null)}):void 0})}},Ah=({input:e,onSkip:t,lookup:r,onAddressSelect:n,query:i,onAddressSearch:a})=>{const{t:o}=ue(),s=ge(null);return Ee(()=>{s.current&&(s.current.focus(),s.current.select())},[]),d(ce,{children:[d("form",{noValidate:!0,onSubmit:l=>{l.preventDefault();const f=new FormData(l.currentTarget).get("address");typeof f=="string"&&a(f)},class:"flex gap-2 p-2.5",children:[d("div",{class:"group relative flex-1",children:[d("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1",autoFocus:!0,placeholder:e.config.placeholder||o("address_search"),defaultValue:i,class:tr({optional:!!e.config.optional,className:"w-full rounded-full"})}),d("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:[d("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[d("circle",{cx:"7",cy:"7",r:"4"}),d("path",{d:"M10 10L13 13"})]})}),d("span",{class:"sr-only",children:o("search")})]})]}),e.config.optional&&d(lt,{class:"relative",onClick:t})]}),(r==null?void 0:r.status)==="failed"?d(er,{error:{message:r.error}}):null,d("p",{role:"status",class:(r==null?void 0:r.status)==="pending"||(r==null?void 0:r.status)==="done"&&r.items.length===0?"text-neutral-11 flex items-center gap-2 px-4 py-2 text-sm":"sr-only",children:(r==null?void 0:r.status)==="pending"?d(ce,{children:[d(cn,{"aria-hidden":"true",class:"h-4 w-4 shrink-0"}),o("address_searching")]}):(r==null?void 0:r.status)==="done"&&r.items.length===0?o("address_no_results"):null}),d("ul",{children:[((r==null?void 0:r.status)==="done"?r.items:[]).map(l=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var c;n(l.id,((c=s.current)==null?void 0:c.value)??i??"")},children:[d("span",{class:"flex-grow",children:l.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},l.id)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{var l;n("",((l=s.current)==null?void 0:l.value)??i??"")},children:d("span",{class:"flex-grow",children:o("address_manual")})})},"")]})]})},qi=["line1","line2","line3","city","state","postcode","country"],Ks=({addressFields:e,onFieldChange:t,onSubmitSuccess:r,actions:n,input:i})=>{const a=ge(null),o=ge(!1);Ee(()=>{if(a.current){const c=a.current.querySelector("input");c&&(c.focus(),c.select())}},[]);const s=Object.keys(Ui),{t:l}=ue();return d("form",{class:"flex flex-col px-2 pt-2",onInputCapture:()=>{o.current=!1},onInvalidCapture:()=>{const c=O.current$.peek().flow;!o.current&&c&&st(c).refused(),o.current=!0},onSubmit:c=>{c.preventDefault();const f=c.currentTarget,u=[...f.querySelectorAll("input")].filter(g=>g.value!==""&&!g.value.trim());for(const g of u){g.value="";const v=qi.find(_=>i.config.keys[_]===g.name);v&&t(v,"")}if(u.length>0&&!f.checkValidity()){f.reportValidity();return}const h=new FormData(f),p=Object.fromEntries(h.entries());r({type:"address",value:p})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:a,children:qi.map((c,f)=>{const u=`isdk_${c}`,h=i.config.keys[c];return h?d(ce,{children:[d("label",{for:u,class:"text-neutral-11 [&:has(+*>input:focus)]:text-neutral-12 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:l(c)}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[c==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:h,id:u,defaultValue:e[c],onChange:p=>t(c,p.currentTarget.value),required:!0,children:[e.country&&!s.includes(e.country)?d("option",{value:e[c],children:e[c]}):d("option",{value:"",children:l("select_country")}),s.map(p=>d("option",{value:p,children:p},p))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:f===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:h,id:u,defaultValue:e[c],onInput:p=>t(c,p.currentTarget.value),required:c==="line2"?i.config.line2Required===!0:c!=="line3"}),f===qi.length-1?d("hr",{class:"m-0 w-full border-b border-b-transparent"}):d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),d("div",{class:"bg-neutral-1 sticky bottom-0 flex items-center py-2",children:[n,d(Ot,{class:"ml-auto"})]})]})},Wi=()=>{const e=ge(null);return Tt(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Gs=["true","false"],Ih=rt(Gs),Th="answer",Ys="flex items-center flex-wrap gap-2 p-2.5",Js="min-w-0 max-w-full flex-auto",Zs=fi(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"text-center text-base",children:e})})),Dh=({input:e,onSubmitSuccess:t})=>{const r=Wi();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=Tf(n).value,a=Va(Ih,i);t({type:"boolean",value:a==="true"})},children:[d("ul",{class:Ys,children:Gs.map((n,i)=>d("li",{class:Js,children:d(Zs,{ref:i===0?r:null,type:"submit",name:Th,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(lt,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},Xs=e=>e.reduce((t,r)=>t+r.sizeKb,0),Mh=Xt("file"),Qs=3,fn=e=>{const t=e.lastIndexOf(".");return t===-1?[e,""]:[e.slice(0,t),e.slice(t)]},Lh=({file:e,class:t,...r})=>{const{t:n}=ue(),[i,a]=fn(e.name);return d("div",{class:at("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"sr-only",children:[n("file_name"),": "]}),d("span",{class:"block truncate",children:i}),d("span",{children:a})]}),d("p",{class:"text-accent-11",children:[d("span",{class:"sr-only",children:[n("file_size"),": "]}),Wt(e.sizeKb)]})]})},el=({class:e,...t})=>d("li",{class:at("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),jh=(e,t)=>{const[r,n]=fn(e);return`${r.slice(0,t)}${n}`},pn=e=>({name:jh(e.name,42),sizeKb:e.size/1e3}),Fh=[".heic",".heif",".jpg",".jpeg",".png",".gif",".webp",".txt",".rtf",".odt",".pages",".zip"],Oh=(e,t,r)=>{const n=fn(t.name)[1].toLowerCase(),i=[...r.map(o=>o.toLowerCase()),...Fh],a=n===""?"none":i.includes(n)?n:"other";return`chatbot-file-refused:${e}:${a}`},Nh=({input:e,onSubmitSuccess:t,analytics:r})=>{var _;const n=(_=O.current$.value.flow)==null?void 0:_.data.submissions[e.key],[i,a]=ze(Mh(n)&&n.value.length?{status:"ready",files:n.value}:{status:"empty"}),o=ge(0),s=i.status==="ready"?i.files:[],l=i.status==="ready"||i.status==="pending"?i.files:[],c=i.status==="error"?i.error:void 0,f=l.length-Qs,u=Xs(l),h=Wi(),{t:p}=ue(),g=(S,x=e.config.extensions)=>{if(!S.length)return{reason:"required",error:{type:"required",message:p("validation_file")}};if(!Or(S,x))return{reason:"type",file:S.find(L=>!Or([L],x)),error:{type:"validate",message:p("validation_file_ext",{ext:e.config.extensions.join(", ")})}};if(S.some(L=>L.sizeKb===0))return{reason:"empty",file:S.find(L=>L.sizeKb===0),error:{type:"validate",message:p("validation_file_empty")}};if(e.config.fileSizeLimitKib&&Xs(S)>e.config.fileSizeLimitKib)return{reason:"size",error:{type:"max",message:p("validation_file_size",{size:Wt(e.config.fileSizeLimitKib)})}};if(!e.config.allowMultiple&&S.length>1)return{reason:"count",error:{type:"invalid",message:p("validation_file_max",{count:1})}}},v=(S,x)=>{var L,j;return r.log({event:"INTERACTION",properties:{tag:Oh(S,x,e.config.extensions)},customProperties:(j=(L=O.current$.peek().flow)==null?void 0:L.analytics)==null?void 0:j.customProperties})};return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:S=>{if(S.preventDefault(),i.status==="pending"||i.status==="error")return;const x=g(s);x?a({status:"error",error:x.error}):t({type:"file",value:s})},children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:h,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[l.length>0?d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[l.slice(0,Qs).map(S=>{const[x,L]=fn(S.name);return d(el,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:x}),d("span",{children:L})]})}),f>0?d(el,{children:p("file_more",{count:f})}):null]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:p("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-11 text-xs",children:["(",p("file_max_size",{size:Wt(e.config.fileSizeLimitKib)}),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:p("file_extensions")}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(S=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-11 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:S.replace(".","")}))})]})]}),d("p",{role:"status",class:at("text-neutral-11 flex items-center gap-1.5 text-xs",l.length===0&&"sr-only"),children:i.status==="pending"?d(ce,{children:[d(cn,{"aria-hidden":"true",class:"h-4 w-4"}),p("file_preparing",{count:l.length})]}):i.status==="ready"?d(ce,{children:[s.length>1?p("file_total_size",{size:Wt(u)}):Wt(u),d("span",{class:"sr-only",children:[". ",p("file_ready",{count:s.length})]})]}):null}),d("input",{id:"dropzone-file","aria-label":p("upload_file",{count:e.config.allowMultiple?2:1}),onInput:async S=>{ot(S.target instanceof HTMLInputElement);const x=S.target.files?Array.from(S.target.files):[];if(S.target.value="",!x[0])return;const L=++o.current,j=i.status==="ready";let F=x;if(!Or(x,e.config.extensions)){const I=g(x.map(pn),[]);if(I)return v(I.reason,I.file??x[0]),a({status:"error",error:I.error});a({status:"pending",files:x.map(pn)});let E;try{F=await Promise.all(x.map($=>$c($,e.config.extensions).catch(T=>{throw E??(E=$),T})))}catch{return o.current!==L?void 0:(v("unreadable",E??x[0]),a({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}}))}}const[V]=F;if(!V||o.current!==L)return;const B=F.map(pn),k=g(B);if(k)return v(k.reason,k.file??V),a({status:"error",error:k.error});a({status:"pending",files:B});let C;try{const I=await Promise.all(F.map(async E=>{try{return{...pn(E),data:await Hc(E)}}catch($){throw C??(C=E),$}}));o.current===L&&a({status:"ready",files:I})}catch{if(o.current!==L)return;v("unreadable",C??V),a({status:"error",error:{type:"invalid",message:p(j?"file_read_error_replacement":"file_read_error")}})}},multiple:e.config.allowMultiple,accept:_c(e.config.extensions),type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Ot,{disabled:s.length===0}),e.config.optional&&d(lt,{class:"relative",onClick:()=>t(null)})]})]}),d(er,{error:c,refusal:!0})]})};var xr=e=>e.type==="checkbox",Nt=e=>e instanceof Date,Fe=e=>e==null;const tl=e=>typeof e=="object";var fe=e=>!Fe(e)&&!Array.isArray(e)&&tl(e)&&!Nt(e),Ph=e=>fe(e)&&e.target?xr(e.target)?e.target.checked:e.target.value:e,Rh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vh=(e,t)=>e.has(Rh(t)),Bh=e=>{const t=e.constructor&&e.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},Hi=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function me(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Hi&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(fe(e)&&Bh(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=me(e[i]));return n}var hn=e=>/^\w*$/.test(e),le=e=>e===void 0,Ki=e=>Array.isArray(e)?e.filter(Boolean):[],Gi=e=>Ki(e.replace(/["|']|\]/g,"").split(/\.|\[/)),N=(e,t,r)=>{if(!t||!fe(e))return r;const n=(hn(t)?[t]:Gi(t)).reduce((i,a)=>Fe(i)?i:i[a],e);return le(n)||n===e?le(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean",qe=e=>typeof e=="function",X=(e,t,r)=>{let n=-1;const i=hn(t)?[t]:Gi(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const c=e[s];l=fe(c)||Array.isArray(c)?c:isNaN(+i[n+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=l,e=e[s]}};const rl={BLUR:"blur",FOCUS_OUT:"focusout"},We={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ut={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zh=Ie.createContext(null);zh.displayName="HookFormControlContext";var Uh=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==We.all&&(t._proxyFormState[o]=!n||We.all),e[o]}});return i};const qh=typeof window<"u"?Ie.useLayoutEffect:Ie.useEffect;var Pe=e=>typeof e=="string",Wh=(e,t,r,n,i)=>Pe(e)?(n&&t.watch.add(e),N(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),N(r,a))):(n&&(t.watchAll=!0),r),Yi=e=>Fe(e)||!tl(e);function xt(e,t,r=new WeakSet){if(Yi(e)||Yi(t))return Object.is(e,t);if(Nt(e)&&Nt(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const s=t[a];if(Nt(o)&&Nt(s)||fe(o)&&fe(s)||Array.isArray(o)&&Array.isArray(s)?!xt(o,s,r):!Object.is(o,s))return!1}}return!0}const Hh=Ie.createContext(null);Hh.displayName="HookFormContext";var nl=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},kr=e=>Array.isArray(e)?e:[e],il=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function al(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&fe(i)&&a){const o=al(i,a);fe(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var Te=e=>fe(e)&&!Object.keys(e).length,Ji=e=>e.type==="file",gn=e=>{if(!Hi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ol=e=>e.type==="select-multiple",Zi=e=>e.type==="radio",Kh=e=>Zi(e)||xr(e),Xi=e=>gn(e)&&e.isConnected;function Gh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=le(e)?n++:e[t[n++]];return e}function Yh(e){for(const t in e)if(e.hasOwnProperty(t)&&!le(e[t]))return!1;return!0}function pe(e,t){const r=Array.isArray(t)?t:hn(t)?[t]:Gi(t),n=r.length===1?e:Gh(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(fe(n)&&Te(n)||Array.isArray(n)&&Yh(n))&&pe(e,r.slice(0,-1)),e}var Jh=e=>{for(const t in e)if(qe(e[t]))return!0;return!1};function sl(e){return Array.isArray(e)||fe(e)&&!Jh(e)}function Qi(e,t={}){for(const r in e){const n=e[r];sl(n)?(t[r]=Array.isArray(n)?[]:{},Qi(n,t[r])):le(n)||(t[r]=!0)}return t}function rr(e,t,r){r||(r=Qi(t));for(const n in e){const i=e[n];if(sl(i))le(t)||Yi(r[n])?r[n]=Qi(i,Array.isArray(i)?[]:{}):rr(i,Fe(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!xt(i,a)}}return r}const ll={value:!1,isValid:!1},cl={value:!0,isValid:!0};var ul=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!le(e[0].attributes.value)?le(e[0].value)||e[0].value===""?cl:{value:e[0].value,isValid:!0}:cl:ll}return ll},dl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>le(e)?e:t?e===""?NaN:e&&+e:r&&Pe(e)?new Date(e):n?n(e):e;const fl={isValid:!1,value:null};var pl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,fl):fl;function hl(e){const t=e.ref;return Ji(t)?t.files:Zi(t)?pl(e.refs).value:ol(t)?[...t.selectedOptions].map(({value:r})=>r):xr(t)?ul(e.refs).value:dl(le(t.value)?e.ref.value:t.value,e)}var Zh=(e,t,r,n)=>{const i={};for(const a of e){const o=N(t,a);o&&X(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},bn=e=>e instanceof RegExp,Sr=e=>le(e)?e:bn(e)?e.source:fe(e)?bn(e.value)?e.value.source:e.value:e,gl=e=>({isOnSubmit:!e||e===We.onSubmit,isOnBlur:e===We.onBlur,isOnChange:e===We.onChange,isOnAll:e===We.all,isOnTouch:e===We.onTouched});const bl="AsyncFunction";var Xh=e=>!!e&&!!e.validate&&!!(qe(e.validate)&&e.validate.constructor.name===bl||fe(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===bl)),Qh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ml=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Cr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=N(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Cr(s,t))break}else if(fe(s)&&Cr(s,t))break}}};function vl(e,t,r){const n=N(e,r);if(n||hn(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=N(t,a),s=N(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var eg=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Te(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||We.all))},tg=(e,t,r)=>!e||!t||e===t||kr(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),rg=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,ng=(e,t)=>!Ki(N(e,t)).length&&pe(e,t),ig=(e,t,r)=>{const n=kr(N(e,r));return X(n,"root",t[r]),X(e,r,n),e};function wl(e,t,r="validate"){if(Pe(e)||Array.isArray(e)&&e.every(Pe)||Xe(e)&&!e)return{type:r,message:Pe(e)?e:"",ref:t}}var nr=e=>fe(e)&&!bn(e)?e:{value:e,message:""},yl=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:f,min:u,max:h,pattern:p,validate:g,name:v,valueAsNumber:_,mount:S}=e._f,x=N(r,v);if(!S||t.has(v))return{};const L=s?s[0]:o,j=$=>{i&&L.reportValidity&&(L.setCustomValidity(Xe($)?"":$||""),L.reportValidity())},F={},V=Zi(o),B=xr(o),k=V||B,C=(_||Ji(o))&&le(o.value)&&le(x)||gn(o)&&o.value===""||x===""||Array.isArray(x)&&!x.length,I=nl.bind(null,v,n,F),E=($,T,z,U=ut.maxLength,H=ut.minLength)=>{const oe=$?T:z;F[v]={type:$?U:H,message:oe,ref:o,...I($?U:H,oe)}};if(a?!Array.isArray(x)||!x.length:l&&(!k&&(C||Fe(x))||Xe(x)&&!x||B&&!ul(s).isValid||V&&!pl(s).isValid)){const{value:$,message:T}=Pe(l)?{value:!!l,message:l}:nr(l);if($&&(F[v]={type:ut.required,message:T,ref:L,...I(ut.required,T)},!n))return j(T),F}if(!C&&(!Fe(u)||!Fe(h))){let $,T;const z=nr(h),U=nr(u);if(!Fe(x)&&!isNaN(x)){const H=o.valueAsNumber||x&&+x;Fe(z.value)||($=H>z.value),Fe(U.value)||(T=H<U.value)}else{const H=o.valueAsDate||new Date(x),oe=se=>new Date(new Date().toDateString()+" "+se),Q=o.type=="time",ee=o.type=="week";Pe(z.value)&&x&&($=Q?oe(x)>oe(z.value):ee?x>z.value:H>new Date(z.value)),Pe(U.value)&&x&&(T=Q?oe(x)<oe(U.value):ee?x<U.value:H<new Date(U.value))}if(($||T)&&(E(!!$,z.message,U.message,ut.max,ut.min),!n))return j(F[v].message),F}if((c||f)&&!C&&(Pe(x)||a&&Array.isArray(x))){const $=nr(c),T=nr(f),z=!Fe($.value)&&x.length>+$.value,U=!Fe(T.value)&&x.length<+T.value;if((z||U)&&(E(z,$.message,T.message),!n))return j(F[v].message),F}if(p&&!C&&Pe(x)){const{value:$,message:T}=nr(p);if(bn($)&&!x.match($)&&(F[v]={type:ut.pattern,message:T,ref:o,...I(ut.pattern,T)},!n))return j(T),F}if(g){if(qe(g)){const $=await g(x,r),T=wl($,L);if(T&&(F[v]={...T,...I(ut.validate,T.message)},!n))return j(T.message),F}else if(fe(g)){let $={};for(const T in g){if(!Te($)&&!n)break;const z=wl(await g[T](x,r),L,T);z&&($={...z,...I(T,z.message)},j(z.message),n&&(F[v]=$))}if(!Te($)&&(F[v]={ref:L,...$},!n))return F}}return j(!0),F};const ag={mode:We.onSubmit,reValidateMode:We.onChange,shouldFocusError:!0};function og(e={}){let t={...ag,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:qe(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=fe(t.defaultValues)||fe(t.values)?me(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:me(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={...f};let h={...u};const p={array:il(),state:il()},g=t.criteriaMode===We.all,v=b=>m=>{clearTimeout(c),c=setTimeout(b,m)},_=async b=>{if(!o.keepIsValid&&!t.disabled&&(u.isValid||h.isValid||b)){let m;t.resolver?(m=Te((await k()).errors),S()):m=await I(n,!0),m!==r.isValid&&p.state.next({isValid:m})}},S=(b,m)=>{!t.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((b||Array.from(s.mount)).forEach(w=>{w&&(m?X(r.validatingFields,w,m):pe(r.validatingFields,w))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Te(r.validatingFields)}))},x=(b,m=[],w,D,A=!0,y=!0)=>{if(D&&w&&!t.disabled){if(o.action=!0,y&&Array.isArray(N(n,b))){const P=w(N(n,b),D.argA,D.argB);A&&X(n,b,P)}if(y&&Array.isArray(N(r.errors,b))){const P=w(N(r.errors,b),D.argA,D.argB);A&&X(r.errors,b,P),ng(r.errors,b)}if((u.touchedFields||h.touchedFields)&&y&&Array.isArray(N(r.touchedFields,b))){const P=w(N(r.touchedFields,b),D.argA,D.argB);A&&X(r.touchedFields,b,P)}(u.dirtyFields||h.dirtyFields)&&(r.dirtyFields=rr(i,a)),p.state.next({name:b,isDirty:$(b,m),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else X(a,b,m)},L=(b,m)=>{X(r.errors,b,m),p.state.next({errors:r.errors})},j=b=>{r.errors=b,p.state.next({errors:r.errors,isValid:!1})},F=(b,m,w,D)=>{const A=N(n,b);if(A){const y=N(a,b,le(w)?N(i,b):w);le(y)||D&&D.defaultChecked||m?X(a,b,m?y:hl(A._f)):U(b,y),o.mount&&!o.action&&_()}},V=(b,m,w,D,A)=>{let y=!1,P=!1;const K={name:b};if(!t.disabled){if(!w||D){(u.isDirty||h.isDirty)&&(P=r.isDirty,r.isDirty=K.isDirty=$(),y=P!==K.isDirty);const G=xt(N(i,b),m);P=!!N(r.dirtyFields,b),G?pe(r.dirtyFields,b):X(r.dirtyFields,b,!0),K.dirtyFields=r.dirtyFields,y=y||(u.dirtyFields||h.dirtyFields)&&P!==!G}if(w){const G=N(r.touchedFields,b);G||(X(r.touchedFields,b,w),K.touchedFields=r.touchedFields,y=y||(u.touchedFields||h.touchedFields)&&G!==w)}y&&A&&p.state.next(K)}return y?K:{}},B=(b,m,w,D)=>{const A=N(r.errors,b),y=(u.isValid||h.isValid)&&Xe(m)&&r.isValid!==m;if(t.delayError&&w?(l=v(()=>L(b,w)),l(t.delayError)):(clearTimeout(c),l=null,w?X(r.errors,b,w):pe(r.errors,b)),(w?!xt(A,w):A)||!Te(D)||y){const P={...D,...y&&Xe(m)?{isValid:m}:{},errors:r.errors,name:b};r={...r,...P},p.state.next(P)}},k=async b=>(S(b,!0),await t.resolver(a,t.context,Zh(b||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),C=async b=>{const{errors:m}=await k(b);if(S(b),b)for(const w of b){const D=N(m,w);D?X(r.errors,w,D):pe(r.errors,w)}else r.errors=m;return m},I=async(b,m,w={valid:!0})=>{for(const D in b){const A=b[D];if(A){const{_f:y,...P}=A;if(y){const K=s.array.has(y.name),G=A._f&&Xh(A._f);G&&u.validatingFields&&S([y.name],!0);const _e=await yl(A,s.disabled,a,g,t.shouldUseNativeValidation&&!m,K);if(G&&u.validatingFields&&S([y.name]),_e[y.name]&&(w.valid=!1,m||e.shouldUseNativeValidation))break;!m&&(N(_e,y.name)?K?ig(r.errors,_e,y.name):X(r.errors,y.name,_e[y.name]):pe(r.errors,y.name))}!Te(P)&&await I(P,m,w)}}return w.valid},E=()=>{for(const b of s.unMount){const m=N(n,b);m&&(m._f.refs?m._f.refs.every(w=>!Xi(w)):!Xi(m._f.ref))&&dt(b)}s.unMount=new Set},$=(b,m)=>!t.disabled&&(b&&m&&X(a,b,m),!xt(Y(),i)),T=(b,m,w)=>Wh(b,s,{...o.mount?a:le(m)?i:Pe(b)?{[b]:m}:m},w,m),z=b=>Ki(N(o.mount?a:i,b,t.shouldUnregister?N(i,b,[]):[])),U=(b,m,w={})=>{const D=N(n,b);let A=m;if(D){const y=D._f;y&&(!y.disabled&&X(a,b,dl(m,y)),A=gn(y.ref)&&Fe(m)?"":m,ol(y.ref)?[...y.ref.options].forEach(P=>P.selected=A.includes(P.value)):y.refs?xr(y.ref)?y.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(A)?P.checked=!!A.find(K=>K===P.value):P.checked=A===P.value||!!A)}):y.refs.forEach(P=>P.checked=P.value===A):Ji(y.ref)?y.ref.value="":(y.ref.value=A,y.ref.type||p.state.next({name:b,values:me(a)})))}(w.shouldDirty||w.shouldTouch)&&V(b,A,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&se(b)},H=(b,m,w)=>{for(const D in m){if(!m.hasOwnProperty(D))return;const A=m[D],y=b+"."+D,P=N(n,y);(s.array.has(b)||fe(A)||P&&!P._f)&&!Nt(A)?H(y,A,w):U(y,A,w)}},oe=(b,m,w={})=>{const D=N(n,b),A=s.array.has(b),y=me(m);X(a,b,y),A?(p.array.next({name:b,values:me(a)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&w.shouldDirty&&p.state.next({name:b,dirtyFields:rr(i,a),isDirty:$(b,y)})):D&&!D._f&&!Fe(y)?H(b,y,w):U(b,y,w),ml(b,s)?p.state.next({...r,name:b,values:me(a)}):p.state.next({name:o.mount?b:void 0,values:me(a)})},Q=async b=>{o.mount=!0;const m=b.target;let w=m.name,D=!0;const A=N(n,w),y=G=>{D=Number.isNaN(G)||Nt(G)&&isNaN(G.getTime())||xt(G,N(a,w,G))},P=gl(t.mode),K=gl(t.reValidateMode);if(A){let G,_e;const zt=m.type?hl(A._f):Ph(b),kt=b.type===rl.BLUR||b.type===rl.FOCUS_OUT,rb=!Qh(A._f)&&!t.resolver&&!N(r.errors,w)&&!A._f.deps||rg(kt,N(r.touchedFields,w),r.isSubmitted,K,P),ta=ml(w,s,kt);X(a,w,zt),kt?(!m||!m.readOnly)&&(A._f.onBlur&&A._f.onBlur(b),l&&l(0)):A._f.onChange&&A._f.onChange(b);const ra=V(w,zt,kt),nb=!Te(ra)||ta;if(!kt&&p.state.next({name:w,type:b.type,values:me(a)}),rb)return(u.isValid||h.isValid)&&(t.mode==="onBlur"?kt&&_():kt||_()),nb&&p.state.next({name:w,...ta?{}:ra});if(!kt&&ta&&p.state.next({...r}),t.resolver){const{errors:Ml}=await k([w]);if(S([w]),y(zt),D){const ib=vl(r.errors,n,w),Ll=vl(Ml,n,ib.name||w);G=Ll.error,w=Ll.name,_e=Te(Ml)}}else S([w],!0),G=(await yl(A,s.disabled,a,g,t.shouldUseNativeValidation))[w],S([w]),y(zt),D&&(G?_e=!1:(u.isValid||h.isValid)&&(_e=await I(n,!0)));D&&(A._f.deps&&(!Array.isArray(A._f.deps)||A._f.deps.length>0)&&se(A._f.deps),B(w,_e,G,ra))}},ee=(b,m)=>{if(N(r.errors,m)&&b.focus)return b.focus(),1},se=async(b,m={})=>{let w,D;const A=kr(b);if(t.resolver){const y=await C(le(b)?b:A);w=Te(y),D=b?!A.some(P=>N(y,P)):w}else b?(D=(await Promise.all(A.map(async y=>{const P=N(n,y);return await I(P&&P._f?{[y]:P}:P)}))).every(Boolean),!(!D&&!r.isValid)&&_()):D=w=await I(n);return p.state.next({...!Pe(b)||(u.isValid||h.isValid)&&w!==r.isValid?{}:{name:b},...t.resolver||!b?{isValid:w}:{},errors:r.errors}),m.shouldFocus&&!D&&Cr(n,ee,b?A:s.mount),D},Y=(b,m)=>{let w={...o.mount?a:i};return m&&(w=al(m.dirtyFields?r.dirtyFields:r.touchedFields,w)),le(b)?w:Pe(b)?N(w,b):b.map(D=>N(w,D))},$r=(b,m)=>({invalid:!!N((m||r).errors,b),isDirty:!!N((m||r).dirtyFields,b),error:N((m||r).errors,b),isValidating:!!N(r.validatingFields,b),isTouched:!!N((m||r).touchedFields,b)}),Ar=b=>{const m=b?kr(b):void 0;m==null||m.forEach(w=>pe(r.errors,w)),m?m.forEach(w=>{p.state.next({name:w,errors:r.errors})}):p.state.next({errors:{}})},q=(b,m,w)=>{const D=(N(n,b,{_f:{}})._f||{}).ref,A=N(r.errors,b)||{},{ref:y,message:P,type:K,...G}=A;X(r.errors,b,{...G,...m,ref:D}),p.state.next({name:b,errors:r.errors,isValid:!1}),w&&w.shouldFocus&&D&&D.focus&&D.focus()},Ir=(b,m)=>qe(b)?p.state.subscribe({next:w=>"values"in w&&b(T(void 0,m),w)}):T(b,m,!0),Pt=b=>p.state.subscribe({next:m=>{tg(b.name,m.name,b.exact)&&eg(m,b.formState||u,xn,b.reRenderRoot)&&b.callback({values:{...a},...r,...m,defaultValues:i})}}).unsubscribe,Rt=b=>(o.mount=!0,h={...h,...b.formState},Pt({...b,formState:{...f,...b.formState}})),dt=(b,m={})=>{for(const w of b?kr(b):s.mount)s.mount.delete(w),s.array.delete(w),m.keepValue||(pe(n,w),pe(a,w)),!m.keepError&&pe(r.errors,w),!m.keepDirty&&pe(r.dirtyFields,w),!m.keepTouched&&pe(r.touchedFields,w),!m.keepIsValidating&&pe(r.validatingFields,w),!t.shouldUnregister&&!m.keepDefaultValue&&pe(i,w);p.state.next({values:me(a)}),p.state.next({...r,...m.keepDirty?{isDirty:$()}:{}}),!m.keepIsValid&&_()},Tr=({disabled:b,name:m})=>{if(Xe(b)&&o.mount||b||s.disabled.has(m)){const A=s.disabled.has(m)!==!!b;b?s.disabled.add(m):s.disabled.delete(m),A&&o.mount&&!o.action&&_()}},ir=(b,m={})=>{let w=N(n,b);const D=Xe(m.disabled)||Xe(t.disabled);return X(n,b,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:b}},name:b,mount:!0,...m}}),s.mount.add(b),w?Tr({disabled:Xe(m.disabled)?m.disabled:t.disabled,name:b}):F(b,!0,m.value),{...D?{disabled:m.disabled||t.disabled}:{},...t.progressive?{required:!!m.required,min:Sr(m.min),max:Sr(m.max),minLength:Sr(m.minLength),maxLength:Sr(m.maxLength),pattern:Sr(m.pattern)}:{},name:b,onChange:Q,onBlur:Q,ref:A=>{if(A){ir(b,m),w=N(n,b);const y=le(A.value)&&A.querySelectorAll&&A.querySelectorAll("input,select,textarea")[0]||A,P=Kh(y),K=w._f.refs||[];if(P?K.find(G=>G===y):y===w._f.ref)return;X(n,b,{_f:{...w._f,...P?{refs:[...K.filter(Xi),y,...Array.isArray(N(i,b))?[{}]:[]],ref:{type:y.type,name:b}}:{ref:y}}}),F(b,!1,void 0,y)}else w=N(n,b,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||m.shouldUnregister)&&!(Vh(s.array,b)&&o.action)&&s.unMount.add(b)}}},ft=()=>t.shouldFocusError&&Cr(n,ee,s.mount),yn=b=>{Xe(b)&&(p.state.next({disabled:b}),Cr(n,(m,w)=>{const D=N(n,w);D&&(m.disabled=D._f.disabled||b,Array.isArray(D._f.refs)&&D._f.refs.forEach(A=>{A.disabled=D._f.disabled||b}))},0,!1))},Dr=(b,m)=>async w=>{let D;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let A=me(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:y,values:P}=await k();S(),r.errors=y,A=me(P)}else await I(n);if(s.disabled.size)for(const y of s.disabled)pe(A,y);if(pe(r.errors,"root"),Te(r.errors)){p.state.next({errors:{}});try{await b(A,w)}catch(y){D=y}}else m&&await m({...r.errors},w),ft(),setTimeout(ft);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Te(r.errors)&&!D,submitCount:r.submitCount+1,errors:r.errors}),D)throw D},Mr=(b,m={})=>{N(n,b)&&(le(m.defaultValue)?oe(b,me(N(i,b))):(oe(b,m.defaultValue),X(i,b,me(m.defaultValue))),m.keepTouched||pe(r.touchedFields,b),m.keepDirty||(pe(r.dirtyFields,b),r.isDirty=m.defaultValue?$(b,me(N(i,b))):$()),m.keepError||(pe(r.errors,b),u.isValid&&_()),p.state.next({...r}))},Vt=(b,m={})=>{const w=b?me(b):i,D=me(w),A=Te(b),y=A?i:D;if(m.keepDefaultValues||(i=w),!m.keepValues){if(m.keepDirtyValues){const P=new Set([...s.mount,...Object.keys(rr(i,a))]);for(const K of Array.from(P)){const G=N(r.dirtyFields,K),_e=N(a,K),zt=N(y,K);G&&!le(_e)?X(y,K,_e):!G&&!le(zt)&&oe(K,zt)}}else{if(Hi&&le(b))for(const P of s.mount){const K=N(n,P);if(K&&K._f){const G=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(gn(G)){const _e=G.closest("form");if(_e){_e.reset();break}}}}if(m.keepFieldsRef)for(const P of s.mount)oe(P,N(y,P));else n={}}a=t.shouldUnregister?m.keepDefaultValues?me(i):{}:me(y),p.array.next({values:{...y}}),p.state.next({values:{...y}})}s={mount:m.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!m.keepIsValid||!!m.keepDirtyValues||!t.shouldUnregister&&!Te(y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!m.keepIsValid,o.action=!1,m.keepErrors||(r.errors={}),p.state.next({submitCount:m.keepSubmitCount?r.submitCount:0,isDirty:A?!1:m.keepDirty?r.isDirty:!!(m.keepDefaultValues&&!xt(b,i)),isSubmitted:m.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:A?{}:m.keepDirtyValues?m.keepDefaultValues&&a?rr(i,a):r.dirtyFields:m.keepDefaultValues&&b?rr(i,b):m.keepDirty?r.dirtyFields:{},touchedFields:m.keepTouched?r.touchedFields:{},errors:m.keepErrors?r.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Bt=(b,m)=>Vt(qe(b)?b(a):b,{...t.resetOptions,...m}),_n=(b,m={})=>{const w=N(n,b),D=w&&w._f;if(D){const A=D.refs?D.refs[0]:D.ref;A.focus&&setTimeout(()=>{A.focus(),m.shouldSelect&&qe(A.select)&&A.select()})}},xn=b=>{r={...r,...b}},Lr={control:{register:ir,unregister:dt,getFieldState:$r,handleSubmit:Dr,setError:q,_subscribe:Pt,_runSchema:k,_updateIsValidating:S,_focusError:ft,_getWatch:T,_getDirty:$,_setValid:_,_setFieldArray:x,_setDisabledField:Tr,_setErrors:j,_getFieldArray:z,_reset:Vt,_resetDefaultValues:()=>qe(t.defaultValues)&&t.defaultValues().then(b=>{Bt(b,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:E,_disableForm:yn,_subjects:p,_proxyFormState:u,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(b){o=b},get _defaultValues(){return i},get _names(){return s},set _names(b){s=b},get _formState(){return r},get _options(){return t},set _options(b){t={...t,...b}}},subscribe:Rt,trigger:se,register:ir,handleSubmit:Dr,watch:Ir,setValue:oe,getValues:Y,reset:Bt,resetField:Mr,clearErrors:Ar,unregister:dt,setError:q,setFocus:_n,getFieldState:$r};return{...Lr,formControl:Lr}}function mn(e={}){const t=Ie.useRef(void 0),r=Ie.useRef(void 0),[n,i]=Ie.useState({isDirty:!1,isValidating:!1,isLoading:qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:qe(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!qe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...s}=og(e);t.current={...s,formState:n}}const a=t.current.control;return a._options=e,qh(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),Ie.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),Ie.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),Ie.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),Ie.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),Ie.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),Ie.useEffect(()=>{var o;e.values&&!xt(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),Ie.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=Ie.useMemo(()=>Uh(n,a),[a,n]),t.current}const _l=(e,t,r)=>{if(e&&"reportValidity"in e){const n=N(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},sg=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?_l(n.ref,r,e):n.refs&&n.refs.forEach(i=>_l(i,r,e))}},lg=(e,t)=>{t.shouldUseNativeValidation&&sg(e,t);const r={};for(const n in e){const i=N(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(cg(t.names||Object.keys(e),n)){const o=Object.assign({},N(r,n));X(o,"root",a),X(r,n,o)}else X(r,n,a)}return r},cg=(e,t)=>e.some(r=>r.startsWith(t+"."));var vn=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{var o=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(su(e,n,Object.assign({},t,{abortPipeEarly:!o}))).then(function(s){if(s.issues){for(var l={};s.issues.length;){var c=s.issues[0],f=nu(c);if(f&&(l[f]||(l[f]={message:c.message,type:c.type}),o)){var u=l[f].types,h=u&&u[c.type];l[f]=nl(f,o,l,c.type,h?[].concat(h,c.message):c.message)}s.issues.shift()}return{values:{},errors:lg(l,a)}}return{values:r.raw?n:s.output,errors:{}}})}catch(s){return Promise.reject(s)}}};const xl=27,kl=12,Sl=10,ug=Xt("enum"),dg=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return vn(te({checked:je(lr(M(),Ur()),Br(n=>Object.entries(n).filter(([i,a])=>a).map(([i,a])=>i)),$t(r.max,t("validation_multiple_choice_max",{count:r.max})),et(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},fg=fi(({option:e,...t},r)=>d(ce,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Cl=Mt("gutter-stable flex w-full flex-1 flex-wrap gap-2 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:Ys}}}),pg=({input:e,onSubmitSuccess:t})=>{var f,u;const r=e.key?(f=O.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.maxSelected===1,i=n&&e.config.options.length===2,{t:a}=ue(),{register:o,handleSubmit:s,formState:{errors:l}}=mn({defaultValues:{checked:n?{}:ug(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:dg(e.config,a)}),c=Wi();return i?d(ce,{children:[d("ul",{style:{maxHeight:6.5*xl+5*kl+2*Sl},class:Cl({variant:"booleanLike"}),children:e.config.options.map((h,p)=>d("li",{class:Js,children:d(Zs,{type:"submit",ref:g=>{g&&p===0&&(c.current=g)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}),e.config.minSelected===0&&d("div",{class:"px-2 pb-2",children:d(lt,{class:"relative w-full",type:"button",onClick:()=>t({type:"enum",value:[]})})})]}):d("form",{noValidate:!0,onSubmit:h=>s(p=>{const g=p.checked;t({type:"enum",value:g})})(h),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*xl+5*kl+2*Sl},class:Cl({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,p)=>{const g=`checked.${h.value}`,{ref:v,..._}=o(g);return d("li",{class:"relative",children:d(fg,{option:h,autoFocus:p===0,ref:S=>{S&&p===0&&(c.current=S),v(S)},id:g,..._,onClick:n?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Ot,{}),e.config.minSelected===0&&d(lt,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(er,{error:(u=l.checked)==null?void 0:u.root,refusal:!0})})]})},hg=Xt("number"),gg=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return vn(te({number:je(Re(t("validation_number")),ja(r,t("validation_number_min",{min:r})),La(n,t("validation_number_max",{max:n})),Ma(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i})))}))},bg=({input:e,onSubmitSuccess:t})=>{var u;const r=e.config.defaultValue,n=e.key?(u=O.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,{t:i}=ue(),{register:a,handleSubmit:o,formState:{errors:s}}=mn({defaultValues:{number:hg(n)?n.value:r?Number(r):void 0},resolver:gg(e.config,i)}),{ref:l,...c}=a("number",{required:!e.config.optional,valueAsNumber:!0}),f=ge();return Ee(()=>{f.current&&(f.current.focus(),f.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(f.current=h),l(h)},type:"text",min:e.config.min,max:e.config.max,class:tr({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&d(lt,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ot,{})]}),d(er,{error:s.number,refusal:!0})]})},mg="44",vg=/^[0-9 ]+$/,wg=Xt("string"),yg=Xt("phone"),_g=e=>{const t=je(M(e("validation_country_code")),Un(vg,e("validation_country_code"))),r=je(M(e("validation_phone")),et(1,e("validation_phone")),Br(n=>n.replace(/[^0-9]/g,"")));return vn(te({countryCode:t,phoneNumber:r}))},xg=({input:e,onSubmitSuccess:t})=>{var v;const r=e.key?(v=O.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:n}=ue(),[i,a]=ze(),o=wg(r)?_h(r.value):yg(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:c},watch:f}=mn({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??mg,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:_g(n)}),{ref:u,...h}=s("phoneNumber",{required:!e.config.optional}),p=ge(),g=f("countryCode");return Ee(()=>{p.current&&(p.current.focus(),p.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(_=>{const S=_.phoneNumber.replace(/[^0-9]/g,""),x=_.countryCode.replace(/[^0-9]/g,"");a(void 0);const L=e.config.minChars??7,j=S.length+x.length;if(j<L)return a(n("validation_phone_min_chars",{count:L}));const F=e.config.maxChars;if(F!=null&&j>F)return a(n("validation_max_chars",{count:F}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:x,phoneNumber:S}}):t({type:"string",value:g+_.phoneNumber})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[d("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[d("span",{children:["+",g]}),d("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(Ui).map(([_,S])=>d("option",{value:S,children:[_," (+",S,")"]},_))})]}),d("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(p.current=_),u(_)},class:tr({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&d(lt,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),d(Ot,{})]}),d(er,{error:c.countryCode||c.phoneNumber||{message:i},refusal:!0})]})},wn=e=>e===void 0?0:Math.max(0,Math.ceil((e-Date.now())/1e3)),El=(e,t,r,n)=>r!==void 0&&n*1e3>Nn?e("submission_available_at",{time:Ca(r,t)}):e("submission_cooldown",{count:n}),kg=(e,t)=>{const r=e==null?void 0:e.trim();return r&&r!=="Submit"?r:t("submit")},Sg=({input:e,onSubmitSuccess:t})=>{const{t:r,locale:n}=ue(),{availableAt:i}=e.config,[a,o]=ze(()=>wn(i)),[s,l]=ze("");Tt(()=>{const f=wn(i);if(o(f),f===0)return;l(El(r,n,i,f));const u=setInterval(()=>{const h=wn(i);o(h),!(h>0)&&(clearInterval(u),l(r("submission_cooldown_ready")))},250);return()=>clearInterval(u)},[i,n,r]);const c=a>0;return d("div",{class:"flex flex-col items-center gap-2 py-3",children:[d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 aria-disabled:hover:bg-accent-9 aria-disabled:hover:border-accent-9 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:active:ring-1 aria-disabled:active:ring-offset-[1.5px]",name:e.key,"aria-disabled":c,"aria-describedby":c?"submit-cooldown":void 0,onClick:()=>{wn(i)>0||t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:kg(e.config.label,r)}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})}),c&&d("p",{id:"submit-cooldown","aria-hidden":"true",class:"text-neutral-11 text-xs",children:El(r,n,i,a)}),d("p",{role:"status",class:"sr-only",children:s})]})},Cg=160,$l=e=>{e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Cg)}px`},Eg={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},$g=Xt("string"),Ag=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return vn(te({text:{date:je(M(t("validation_date")),Un(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:je(M(t("validation_email")),zn(t("validation_email")),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength)),text:je(M(),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength)),url:je(M(t("validation_url")),Fa(t("validation_url")),et(e.minChars??1,r.minLength),$t(e.maxChars??1/0,r.maxLength))}[e.format]}))},Ig={text:({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=ue(),n=e.key?(v=O.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,i=e.config.defaultValue,a=e.config.multiline===!0&&e.config.format==="text",{register:o,handleSubmit:s,watch:l,formState:{errors:c}}=mn({defaultValues:{text:$g(n)?n.value:i??""},resolver:Ag(e.config,r)}),{ref:f,...u}=o("text",{required:!e.config.optional}),h=ge();Ee(()=>{h.current&&(h.current instanceof HTMLTextAreaElement&&$l(h.current),h.current.focus(),h.current.select())},[]);const p=e.config.maxChars,g=a&&p!==void 0?l("text").length:void 0;return d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(_=>{t({type:"string",value:_.text})}),children:[d("div",{class:a?"flex items-end gap-2":"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-1",children:[a?d("textarea",{id:"chat-input",...u,rows:2,maxLength:p,autoFocus:!0,"aria-describedby":g!==void 0?"chat-input-count":void 0,onInput:_=>$l(_.currentTarget),onKeyDown:_=>{var S;_.key==="Enter"&&(_.ctrlKey||_.metaKey)&&(_.preventDefault(),(S=_.currentTarget.form)==null||S.requestSubmit())},ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:tr({optional:!!e.config.optional,className:"block w-full resize-none overflow-y-auto rounded-2xl"})}):d("input",{id:"chat-input",...u,...Eg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:_=>{_&&(h.current=_),f(_)},placeholder:e.config.placeholder,class:tr({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&d(lt,{class:a?"absolute bottom-1 right-0.5":"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),d(Ot,{})]}),g!==void 0&&p!==void 0&&d("p",{id:"chat-input-count",class:"text-neutral-10 px-3 text-right text-xs",children:[g,"/",p]}),d(er,{error:c.text,refusal:!0})]})},phone:xg,"multiple-choice":pg,boolean:Dh,file:Nh,submit:Sg,address:$h,number:bg},Tg=({logger:e,analytics:t,rpcClient:r})=>{var o;const n=(o=O.current$.value.flow)==null?void 0:o.data.currentInput,i=ge(null),a=()=>ae.onInteractionFn$.value();return Ee(()=>{var s;(s=i.current)==null||s.scrollTo({top:0})},[n]),d("div",{ref:i,class:"border-divider max-h-[calc(100%-var(--header-height)-4rem)] w-full shrink-0 scroll-pb-12 overflow-y-auto overscroll-contain border-t",children:d("div",{class:"flex flex-col",onPointerDownCapture:n?a:void 0,onKeyDownCapture:n?a:void 0,onInputCapture:n?a:void 0,children:n?(()=>{const s=Ig[n.type];return d(s,{logger:e,analytics:t,rpcClient:r,onSubmitSuccess:ae.onSubmitSuccessFn$.value,input:n})})():d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:tr({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),d(Ot,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function Dg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mg=function(e){return e instanceof RegExp},Lg=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Al=function(e){return typeof e=="string"},jg=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Fg(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!Al(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Mg(a)||(a=new RegExp("("+Lg(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=i}return o}var Og=function(t,r,n){return Array.isArray(t)||(t=[t]),jg(t.map(function(i){return Al(i)?Fg(i,r,n):i}))};const Er=Dg(Og),Ng=/(\[[^\]]+\]\([^)]+\))/g,Pg=/\[([^\]]+)\]\(([^)]+)\)/,Rg=/(https?:\/\/[^\s]+)/g,Vg=/_(.*?)_/g,Bg=/\*\*(.*?)\*\*/g,zg=/(\\n|\n)/g,Il="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Ug=e=>{const t=Er(e,Ng,(s,l)=>{const[,c,f]=s.match(Pg)??[];return f?d("a",{class:Il,href:f,children:c??f},f+l):d("span",{children:"INVALID LINK"})}),r=Er(t,Rg,(s,l)=>d("a",{class:Il,href:s,children:s},s+l)),n=Er(r,Vg,(s,l)=>d("em",{children:s},s+l)),i=Er(n,Bg,(s,l)=>d("strong",{children:s},s+l));let a=0;return Er(i,zg,()=>d("br",{},`br-${a++}`))},qg=Mt("select-text max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Wg=({children:e,className:t,animate:r,side:n,...i})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:qg({className:t,side:n,animate:r}),...i,children:e}),Tl=new Map,Dl=of({overrides:{},locale:void 0}),Hg=(e,t)=>{const r=t==null?void 0:t.trim();if(!r)return e("job_alerts_privacy");const n=e("job_alerts_privacy_sender",{employer:r});return e("job_alerts_privacy")!==Dl("job_alerts_privacy")&&n===Dl("job_alerts_privacy_sender",{employer:r})?e("job_alerts_privacy"):n},Kg=({flow:e,rpcClient:t})=>{const{t:r}=ue(),n=e.data.flowSessionId,i=Tl.get(n)??Ne("offer");Tl.set(n,i);const a=l=>{const c=e.data.submissions[l];return(c==null?void 0:c.type)==="string"?c.value.trim():void 0},o=a("email")||e.nodes.flatMap(l=>l.type==="question-text"&&l.data.format==="email"?[a(l.data.key)]:[]).find(l=>!!l);if(!o||i.value==="declined")return null;if(i.value==="success")return d("p",{role:"status",children:r("job_alerts_success")});const s=async()=>{if(!(i.value!=="offer"&&i.value!=="error")){i.value="saving";try{await Fu(t,{contact:{email:o,first_name:a("first_name"),last_name:a("last_name")},job:e.job}),i.value="success"}catch{i.value="error"}}};return d("div",{class:"bg-neutral-2 flex flex-col gap-2 rounded-xl p-3 text-sm",children:[d("p",{children:r("job_alerts_offer",{email:o})}),i.value==="error"?d("p",{role:"alert",children:r("job_alerts_error")}):null,d("div",{class:"flex gap-2",children:[d("button",{type:"button",class:"bg-accent-9 min-h-[44px] rounded-lg px-3 py-2 text-white",disabled:i.value==="saving",onClick:s,children:r("job_alerts_accept")}),d("button",{type:"button",class:"min-h-[44px] rounded-lg px-3 py-2",disabled:i.value==="saving",onClick:()=>{i.value!=="offer"&&i.value!=="error"||(i.value="declined")},children:r("job_alerts_decline")})]}),d("p",{class:"text-xs",children:Hg(r,e.employer)})]})},Gg=({message:e,analytics:t})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:()=>{var i;const r=O.current$.peek().flow,n=r==null?void 0:r.nodes.find(a=>a.id===e.groupId);r&&((n==null?void 0:n.type)==="integration-application-submit"||(n==null?void 0:n.type)==="link"&&Rs(n.data.href,e.href))&&(st(r).redirected(),Ft(t,r,"redirect")),(i=e.onClick)==null||i.call(e)},class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Yg=({className:e,...t})=>d("div",{"aria-hidden":!0,children:ae.isBotTyping$.value===!0?d("div",{"data-testid":"typing-indicator",class:at("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0}),Jg={bot:"left",user:"right"},Zg=Mt("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-11",warning:"text-system-warning",error:"text-error-11",success:"text-system-success"}}}),Xg=({env:e,lastSentMessageFooter:t,rpcClient:r,analytics:n})=>{const{t:i}=ue(),a=O.current$.value.flow,o=(a==null?void 0:a.data.messages)??[],s=o.findIndex(c=>c.type==="system"&&c.semantic==="submission-closed"),l=a?Mi(a):void 0;return d("ol",{"aria-label":i("chat_messages"),"aria-live":"polite",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[o.map((c,f)=>d(ce,{children:[d("li",{class:"flex",tabIndex:f===o.length-1?-1:void 0,children:[l&&c.groupId===l&&!o.slice(f+1).some(u=>u.groupId===l)?t:null,rn(c).with({type:"system"},u=>d("p",{class:Zg({variant:u.variant}),children:u.text})).with({type:"text",author:Dt.union("bot","user")},u=>{const h=f===o.length-1,p=u.author==="bot"?Ug(u.text):u.text;return d(ce,{children:d(Wg,{animate:h,side:Jg[u.author],children:p},f)})}).with({type:"link"},u=>d(Gg,{message:u,analytics:n})).with({type:"image"},u=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:u.url,style:{aspectRatio:u.width/u.height}})).with({type:"file"},u=>d(Lh,{class:u.author==="bot"?void 0:"ml-auto",file:{name:u.fileName,sizeKb:u.fileSizeKb}})).with({type:"loading"},u=>{const h=o[o.length-1];return!(u===h)||ae.isBotTyping$.value||a!=null&&a.data.isFinished?null:d("div",{class:"flex flex-grow flex-col items-center justify-center gap-2",children:[d(cn,{"aria-hidden":u.text?"true":void 0,class:"text-neutral-6 h-8 w-8"}),u.text?d("p",{role:"status",class:"text-neutral-11 text-sm",children:u.text}):null]})}).exhaustive()]}),f===s&&(a!=null&&a.jobAlerts)&&r?d("li",{children:d(Kg,{flow:a,rpcClient:r},a.data.flowSessionId)}):null]},f)),e&&e!=="production"&&(a==null?void 0:a.data.isFinished)&&a.data.stagingDestination&&d("li",{class:"text-neutral-11 text-center text-xs",children:a.data.stagingDestination}),d("li",{class:ae.captchaVisible$.value?"flex":"hidden",children:d("div",{"data-captcha-slot":!0,tabIndex:-1,role:"group","aria-label":i("captcha_check"),class:"w-full max-w-[min(100%,24rem)] rounded-md"})},"captcha"),d(Yg,{},"typing")]})},Qg=({logger:e,apiClient:t,rpcClient:r,analytics:n,talentBankClient:i,env:a})=>{const{flow:o}=O.current$.value;ot(o,"Flow is required to exist to show chatbot body");const s=O.viewState$.value,{chatRef:l,chatService:c}=th(),{t:f}=ue(),[u,h]=ze();return Ee(()=>{s==="maximised"&&ae.scrollToEnd()},[s]),Ee(()=>{var B;const{state:p,flow:g}=O.current$.peek();if(p!=="loaded")throw new Error(f("invalid_state"));let v=g.data.nodeHistory.at(-1);if(ae.scrollToEnd(),O.setInput(void 0),g.data.isFinished)return;const _=()=>{const k=O.current$.peek().flow;k&&st(k).active(),!(!k||k.data.hasInteracted)&&(O.markAsInteracted(),Ws(n,k,"FLOW_INTERACT"))};ae.onInteractionFn$.value=_,v===void 0?(v=js(o.nodes).id,O.setCurrentNodeId(v),Ws(n,g,"FLOW_START")):O.removeMessagesSentByNodeIds([v,zi]);const{interpret:S,abort:x,undo:L}=_p({context:o.context,analytics:{service:n,customProperties:(B=o.analytics)==null?void 0:B.customProperties},apiClient:Zp(t,n,g),logger:e,talentBankClient:i,flow:o,chatService:c,t:f,getApplicationRecovery:()=>{var k;return(k=O.current$.peek().flow)==null?void 0:k.data.applicationRecovery},setApplicationRecovery:O.setApplicationRecovery,persistWriteBarrier:()=>O.persistWriteBarrier(g),getSubmissions:()=>{var k;return(k=O.current$.peek().flow)==null?void 0:k.data.submissions},onInterpret:k=>O.setCurrentNodeId(k.id),onFlowEnd:async()=>{var C;O.markAsFinished(),Ft(n,g,"submit");const k=O.current$.peek().flow;ot(k),n.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:k.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(C=o.analytics)==null?void 0:C.customProperties})}}),j=v,F=()=>{h(()=>L),S(j)},V=new AbortController;return g.offerResume?yh({chatService:c,t:f,signal:V.signal}).then(k=>(O.settleResume(g),k?F():(O.restart(),ke.flushStateData()))).catch(k=>{k instanceof pt||e.error("Resume prompt failed",k)}):F(),()=>{V.abort(),ae.onInteractionFn$.value===_&&(ae.onInteractionFn$.value=()=>{}),x()}},[n,t,c,e,o,i,f]),d(ce,{children:[d("div",{class:"relative flex min-h-0 w-full max-w-full flex-grow flex-col",children:[d("div",{ref:l,role:"region","aria-label":f("conversation_history"),tabIndex:0,className:"hide-scrollbars fr flex min-h-0 w-full max-w-full flex-grow flex-col overflow-y-auto ring-inset",style:{WebkitOverflowScrolling:"touch"},children:d(Xg,{analytics:n,env:a,rpcClient:r,lastSentMessageFooter:!Mi(o)||!u?null:d(eb,{undoFn:u})})}),ae.isReadingHistory$.value&&!o.data.isFinished&&!ae.isBotTyping$.value&&d("div",{class:"absolute bottom-2 left-1/2 -translate-x-1/2",children:d(wr,{class:"bg-neutral-1 ring-divider shadow-surface-md ring-1","aria-label":f("jump_to_current"),onClick:()=>{var g,v;ae.scrollToEnd(),(v=((g=l.current)==null?void 0:g.querySelector('li[tabindex="-1"]'))??l.current)==null||v.focus({preventScroll:!0})},children:d(xs,{})})})]}),d(Tg,{logger:e,analytics:n,rpcClient:r})]})},eb=({undoFn:e})=>{const{t}=ue();return d("div",{class:"flex flex-1 items-center justify-end px-1",children:d(wr,{"aria-label":t("undo"),onClick:async()=>{const{flow:r}=O.current$.peek();ot(r),st(r).active(),e(r.data.nodeHistory)},children:d("path",{d:"M3 13h2.67l6.66-6.67a1.9 1.9 0 0 0 0-2.66 1.91 1.91 0 0 0-2.66 0L3 10.33V13Zm4.6-7.25 2.67 2.67"})})})},tb=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Qg},Symbol.toStringTag,{value:"Module"}))})();
|