@inploi/plugin-chatbot 10.0.0 → 11.0.0
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 +3 -3
- package/dist/chatbot-body-5d5ea35e.cjs +1 -0
- package/dist/{chatbot-body-46d6ae0c.js → chatbot-body-e9d58f57.js} +46 -46
- package/dist/{index-8b83b99d.js → index-523342dc.js} +778 -770
- package/dist/index-da8d6977.cjs +5 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +5 -5
- package/dist/chatbot-body-92fd0d1f.cjs +0 -1
- package/dist/index-002c5e40.cjs +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-002c5e40.cjs");require("@inploi/sdk");var nt=({condition:e,context:t,submissions:r,ifBlock:s})=>{let[o,...a]=e.compareKey.split(".");if(!o)return!1;let l=n.oe({context:t,key:o,path:a,submissions:r});if(!l)return!1;switch(l.type){case"address":{let i=n.H(l.value,a);switch(e.compare){case"equals":return i===e.compareValue;case"contains":return typeof i!="string"?!1:i.includes(e.compareValue);case"notEquals":return i!==e.compareValue;case"notContains":return typeof i!="string"?!0:!i.includes(e.compareValue)}break}case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))return!1;let i=n.H(l.value,a),f={...s,data:{compareKey:"_temp",compare:e.compare,compareValue:e.compareValue}};switch(typeof i){case"boolean":return xe(f,{submissions:{_temp:{value:i,type:"boolean"}},context:t});case"string":return xe(f,{submissions:{_temp:{value:i,type:"string"}},context:t});case"number":return xe(f,{submissions:{_temp:{value:i,type:"number"}},context:t});case"object":return Array.isArray(i)&&i.every(p=>typeof p=="string")?xe(f,{submissions:{_temp:{value:i,type:"enum"}},context:t}):!1}break}case"boolean":{let i=e.compareValue==="true";switch(e.compare){case"equals":return l.value===i;case"notEquals":return l.value!==i}break}case"phone":case"string":{let i=l.type==="phone"?n.pe(l.value):l.value;switch(e.compare){case"equals":return i===e.compareValue;case"contains":return i?i.includes(e.compareValue):!1;case"notEquals":return i!==e.compareValue;case"notContains":return i?!i.includes(e.compareValue):!0}break}case"number":{try{let i=Number(e.compareValue);switch(e.compare){case"equals":return l.value===i;case"notEquals":return l.value!==i;case"greaterThan":return l.value>i;case"greaterThanOrEqualTo":return l.value>=i;case"lessThan":return l.value<i;case"lessThanOrEqualTo":return l.value<=i}}catch{return console.error(`Failed to parse number in if-block ${s.id}`,l.value),!1}break}case"enum":switch(e.compare){case"equals":return l.value.length===1&&l.value[0]===e.compareValue;case"notEquals":return l.value.length===1&&l.value[0]!==e.compareValue;case"contains":return l.value.includes(e.compareValue);case"notContains":return!l.value.includes(e.compareValue)}break}},xe=(e,{context:t,submissions:r})=>{let s="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(let o of s)if(nt({condition:o,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(let o of s)if(!nt({condition:o,context:t,submissions:r,ifBlock:e}))return!1;return!0}},rr=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,nr=(e,{context:t,submissions:r})=>e.replace(rr,(s,o,a="")=>{let[l,...i]=o.trim().split("."),f=n.oe({key:l,path:i,submissions:r,context:t});if(!f)return a;switch(f.type){case"boolean":return f.value===!0?"true":"false";case"file":return f.value.map(p=>`${p.name} (${n.ce(p.sizeKb)})`).join(", ");case"enum":return f.value.join(", ");case"address":return Object.values(f.value).filter(p=>p&&p.trim().length>0).join(", ");case"number":case"string":return f.value?f.value.toString():a;case"phone":return n.pe(f.value);case"integration":{if(typeof f.value!="object"||Array.isArray(f.value))break;let p=n.H(f.value,i);switch(typeof p){case"boolean":return p===!0?"true":"false";case"string":return p;case"number":return p.toString();case"object":if(Array.isArray(p)&&p.every(C=>typeof C=="string"))return p.join(", ")}break}}return a});const Ft=({context:e,submissions:t})=>({context:e,submissions:t??{}}),Y=(e,t)=>nr(e,Ft(t)),sr=(e,t)=>xe(e,Ft(t)),It=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const s=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(s)return It({node:s,nodes:t,stopWhen:r})},ar=({childNode:e,nodes:t})=>{const s=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const a=t.find(i=>i.id===o.branchId);if(!a)return!1;const l=It({node:a,nodes:t,stopWhen:i=>i.id===e.id});return!(!l||l.id!==e.id)});if(s!=null&&s.nextId)return t.find(o=>o.id===s.nextId)},ir=({flow:e,analytics:t,logger:r,talentBankClient:s,context:o,apiClient:a,getSubmissions:l,chatService:i,onFlowEnd:f,onInterpret:p,t:C})=>{let v=new AbortController;const h={...t.service,log:b=>t.service.log({...b,customProperties:{...b.customProperties,...t.customProperties}})},y=async(b,E)=>{if(v.signal.aborted)return;const V=l();p==null||p(b,E);try{await or({flow:e,analytics:h,logger:r,talentBankClient:s,apiClient:a,context:o,node:b,submissions:V,t:C,chat:{sendMessage:async x=>i.send({groupId:b.id,message:x,signal:v.signal}),userInput:async x=>i.input({input:x,signal:v.signal}),addToSubmissions:(x,_)=>{v.signal.aborted||i.addToSubmissions(x,_)}},next:x=>{const _=x?e.nodes.find(I=>I.id===x):ar({childNode:b,nodes:e.nodes});return _?y(_,b):f==null?void 0:f(b)},end:()=>f==null?void 0:f(b)})}catch(x){if(x instanceof n.AbortedError)return;throw x}};return{interpret:async b=>{const E=e.nodes.find(V=>V.id===b)??n.getHeadOrThrow(e.nodes);return y(E)},undo:b=>{let E=1;const V=e.nodes.find(_=>_.id===b[b.length-1]);for(let _=b.length-2;_>0;_--){const I=b[_],D=e.nodes.find(L=>L.id===I);if(!D||(E++,D.type.startsWith("question-")))break}v.abort(),v=new AbortController;const x=e.nodes.find(_=>_.id===b[b.length-E]);return n.invariant(x,"Undo failed: new start node not found"),y(x,V),{removed:E}},abort:()=>{v.abort()}}},Lt=e=>`+${e.countryCode} ${e.phoneNumber}`;async function or(e){const t=e.node;switch(t.type){case"text":return gr({...e,node:t});case"image":return yr({...e,node:t});case"question-text":return br({...e,node:t});case"question-enum":return wr({...e,node:t});case"question-number":return vr({...e,node:t});case"question-phone":return xr({...e,node:t});case"question-boolean":return kr({...e,node:t});case"question-file":return Cr({...e,node:t});case"question-address":return _r({...e,node:t});case"end-flow":return Sr({...e,node:t});case"if-block":return mr({...e,node:t});case"jump":return dr({...e,node:t});case"link":return pr({...e,node:t});case"integration-application-submit":return hr({...e,node:t});case"add-submission":return fr({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return cr({...e,node:t});case"check-duplicate":return ur({...e,node:t});case"feedback":return lr({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}const fe=(e,t)=>{var s;const r=(s=e[t])==null?void 0:s.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${t}” is not a string or number`);return r};async function lr({next:e,node:t}){e(t.nextId)}async function cr({next:e,node:t,analytics:r,submissions:s,logger:o}){if(!s)return e(t.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:fe(s,t.data.key).toString(),first_name:t.data.firstName?fe(s,t.data.firstName).toString():void 0,last_name:t.data.lastName?fe(s,t.data.lastName).toString():void 0,email:t.data.email?fe(s,t.data.email).toString():void 0,phone_number:t.data.phoneNumber?fe(s,t.data.phoneNumber).toString():void 0,custom_traits:t.data.customTraits?Object.fromEntries(t.data.customTraits.map(({key:a,value:l})=>{var i;return[a,(i=s[l])==null?void 0:i.value]})):void 0}})}catch(a){o.error(a)}finally{e(t.nextId)}}async function ur({next:e,node:t,talentBankClient:r,submissions:s,flow:o,logger:a,chat:l}){var f;let i={isDuplicate:!1};if(s&&r){const p=t.data.scope==="job"?(f=o.job)==null?void 0:f.id:void 0;if(t.data.scope==="company"||p!=null)try{i=await r.checkDuplicate({email:fe(s,t.data.email).toString(),jobId:p,scope:t.data.scope})}catch(C){a.error("[check-duplicate]",C)}}l.addToSubmissions(t.data.key,{type:"integration",value:i}),e(t.nextId)}async function dr({next:e,node:t}){e(t.data.targetId)}async function fr({next:e,node:t,logger:r,submissions:s,context:o}){if(!s){r.error("Submissions not found");return}s[t.data.key]={type:"string",value:Y(t.data.value,{submissions:s,context:o})},e(t.nextId)}async function hr({chat:e,next:t,node:r,logger:s,apiClient:o,submissions:a,analytics:l,flow:i,t:f}){const p=async C=>{C!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:v,session_id:h}=l.getSessionInfo(),y=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:v,session_id:h,job:i.job,submissions:n.ue(a||{})})}).catch(b=>b);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:y}),n.M(y).with({integration_response:n.z.select(n.z.union({service:n.z.optional(n.z.string),status:n.z.number,data:n.z.any},{service:n.z.optional(n.z.string),status:n.z.number,error:{message:n.z.string,data:n.z.any}}))},b=>{l.log({event:"FLOW_SUBMIT",properties:{flow_id:i.id,flow_version:i.version,flow_session_id:i.data.flowSessionId,flow_build:i.build,service:b.service??"INVALID_SERVICE",response:{status:b.status,payload:"data"in b?b.data:b.error.data??null},job:i.job}})}).otherwise(()=>{}),await n.M(y).with({integration_response:{data:n.z.select("redirect",{redirect_url:n.z.string,message:n.z.optional(n.z.union(n.z.string,n.z.nullish)),button_text:n.z.optional(n.z.union(n.z.string,n.z.nullish))})}},async b=>{await e.sendMessage({type:"text",author:"bot",text:b.redirect.message??f("submission_redirect_message")});try{const E=new URL(b.redirect.redirect_url);v&&!E.searchParams.has("anonymous_id")&&E.searchParams.set("anonymous_id",v),await e.sendMessage({type:"link",href:E.toString(),text:b.redirect.button_text??f("complete_submission"),onClick:()=>{if(!h){s.error("session_id not set, cannot log FLOW_REDIRECT event");return}l.log({event:"FLOW_REDIRECT",properties:{flow_build:i.build,flow_id:i.id,flow_session_id:h,flow_version:i.version,href:E.toString(),job:i.job}})}})}catch(E){s.error(`Invalid redirect URL: ${b.redirect.redirect_url}`,E),e.sendMessage({type:"system",variant:"error",text:f("redirect_url_error")})}t(r.nextId)}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:f("submission_completed")}),t(r.nextId)}).with({integration_response:{error:n.z.select("error",{message:n.z.string})}},async b=>{s.error(b.error),await e.sendMessage({type:"system",variant:"error",text:b.error.message||f("submission_failed")}),await p(!1)}).otherwise(async b=>{s.error(b),await e.sendMessage({type:"system",variant:"error",text:f("submission_failed")}),await p(!1)})};await p(r.data.skipConfirmation)}async function pr({chat:e,next:t,node:r,submissions:s,context:o}){await e.sendMessage({type:"link",href:Y(r.data.href,{submissions:s,context:o}),text:Y(r.data.cta,{submissions:s,context:o})}),t(r.nextId)}async function mr({submissions:e,next:t,node:r,context:s}){t(sr(r,{submissions:e,context:s})?r.branchId:r.nextId)}async function gr({chat:e,next:t,node:r,submissions:s,context:o}){await e.sendMessage({author:"bot",type:"text",text:Y(r.data.text,{submissions:s,context:o})}),t(r.nextId)}async function yr({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 br({chat:e,next:t,node:r,submissions:s,context:o,t:a}){await e.sendMessage({author:"bot",type:"text",text:Y(r.data.question,{submissions:s,context:o})});const l=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}});l===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:l.type==="phone"?Lt(l.value):l.value}),t(r.nextId)}async function vr({chat:e,next:t,node:r,submissions:s,context:o,t:a}){await e.sendMessage({author:"bot",type:"text",text:Y(r.data.question,{submissions:s,context:o})});const l=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}});l===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:l.value.toString()}),t(r.nextId)}async function xr({chat:e,next:t,node:r,submissions:s,context:o}){await e.sendMessage({author:"bot",type:"text",text:Y(r.data.question,{submissions:s,context:o})});const a=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}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?Lt(a.value):a.value}),t(r.nextId)}async function wr({chat:e,next:t,node:r,submissions:s,context:o,t:a}){await e.sendMessage({author:"bot",type:"text",text:Y(r.data.question,{submissions:s,context:o})});const l=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});l.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(i=>l.value.includes(i.value)).map(i=>i.label).join(", ")}),t(r.nextId)}async function kr({chat:e,next:t,node:r,submissions:s,context:o,t:a}){await e.sendMessage({author:"bot",type:"text",text:Y(r.data.question,{submissions:s,context:o})});const l=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});l===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:l.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function _r({chat:e,next:t,node:r,t:s}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const o=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(o===null)await e.sendMessage({type:"system",variant:"info",text:s("skipped")});else{const a=Object.values(o.value).filter(l=>l&&l.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function Cr({node:e,chat:t,next:r,submissions:s,context:o,t:a}){await t.sendMessage({author:"bot",type:"text",text:Y(e.data.question,{submissions:s,context:o})});const l=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(l===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const i of l.value)await t.sendMessage({author:"user",type:"file",fileName:i.name,fileSizeKb:i.sizeKb});r(e.nextId)}async function Sr({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}function st(e,t){let r;return(...s)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...s),t)}}function Vr({debounce:e,scroll:t,polyfill:r,offsetSize:s}={debounce:0,scroll:!1,offsetSize:!1}){const o=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,l]=n.h({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),i=n._({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),f=e?typeof e=="number"?e:e.scroll:null,p=e?typeof e=="number"?e:e.resize:null,C=n._(!1);n.p(()=>(C.current=!0,()=>void(C.current=!1)));const[v,h,y]=n.F(()=>{const x=()=>{if(!i.current.element)return;const{left:_,top:I,width:D,height:L,bottom:ae,right:ue,x:Q,y:re}=i.current.element.getBoundingClientRect(),j={left:_,top:I,width:D,height:L,bottom:ae,right:ue,x:Q,y:re};i.current.element instanceof HTMLElement&&s&&(j.height=i.current.element.offsetHeight,j.width=i.current.element.offsetWidth),Object.freeze(j),C.current&&!Lr(i.current.lastBounds,j)&&l(i.current.lastBounds=j)};return[x,p?st(x,p):x,f?st(x,f):x]},[l,s,f,p]);function b(){i.current.scrollContainers&&(i.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",y,!0)),i.current.scrollContainers=null),i.current.resizeObserver&&(i.current.resizeObserver.disconnect(),i.current.resizeObserver=null),i.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",i.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",i.current.orientationHandler))}function E(){i.current.element&&(i.current.resizeObserver=new o(y),i.current.resizeObserver.observe(i.current.element),t&&i.current.scrollContainers&&i.current.scrollContainers.forEach(x=>x.addEventListener("scroll",y,{capture:!0,passive:!0})),i.current.orientationHandler=()=>{y()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",i.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",i.current.orientationHandler))}const V=x=>{!x||x===i.current.element||(b(),i.current.element=x,i.current.scrollContainers=At(x),E())};return Fr(y,!!t),Er(h),n.p(()=>{b(),E()},[t,y,h]),n.p(()=>b,[]),[V,a,v]}function Er(e){n.p(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Fr(e,t){n.p(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function At(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:s,overflowY:o}=window.getComputedStyle(e);return[r,s,o].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...At(e.parentElement)]}const Ir=["x","y","top","bottom","left","right","width","height"],Lr=(e,t)=>Ir.every(r=>e[r]===t[r]),le=({class:e,...t})=>{const{t:r}=n.useTranslation();return n.o("button",{class:n.clsx("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:n.o("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[n.o("title",{children:r("send")}),n.o("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),n.o("path",{d:"M8 4V13"})]})})},pe=({error:e})=>!e||!e.message?null:n.o("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[n.o("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.o("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),n.o("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),n.o("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),n.o("p",{class:"truncate pr-1 text-sm",children:e.message})]}),ce=({class:e,...t})=>{const{t:r}=n.useTranslation();return n.o("button",{type:"button",class:n.clsx("fr touch-hitbox text-neutral-10 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:[n.o("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:[n.o("title",{children:r("skip")}),n.o("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),n.o("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})};var ze={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"};const _e=n.cva("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}}),Ar="https://api.mapbox.com/search/searchbox/v1/suggest",Mr="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Tr=e=>atob(e).split("").reverse().join(""),ee=n.object({name:n.string()}),Nr=n.object({suggestions:n.array(n.object({full_address:n.optional(n.string()),place_formatted:n.optional(n.string()),name:n.optional(n.string()),mapbox_id:n.string(),context:n.partial(n.object({address:ee,street:ee,neighborhood:ee,locality:ee,district:ee,place:ee,region:ee,postcode:ee,country:ee}))}))}),Dr=({logger:e,t})=>n.F(()=>{var s;const r=(s=n.store.current$.peek().flow)==null?void 0:s.data.flowSessionId;return r?{enabled:!0,getPredictions:async o=>{var v;const a=new URL(Ar);a.searchParams.set("q",o),a.searchParams.set("session_token",r);const l=(v=n.store.current$.peek().flow)==null?void 0:v.locationOrigin;l&&l.lat!==void 0&&l.lng!==void 0&&l.lat>=-90&&l.lat<=90&&l.lng>=-180&&l.lng<=180&&a.searchParams.set("proximity",`${l.lng},${l.lat}`),a.searchParams.set("access_token",Tr(Mr));const f=await fetch(a);if(!f.ok)return e.error("Failed to get address details",f),{ok:!1,error:t("address_error")};const p=n.safeParse(Nr,await f.json());if(p.success===!1)return e.error("Failed to parse address details",p.issues),{ok:!1,error:t("address_error")};const{suggestions:C}=p.output;return{ok:!0,data:C.map(h=>{var y,b,E,V,x,_,I,D,L;return{label:h.full_address??h.place_formatted??h.name??h.mapbox_id,id:h.mapbox_id,address:{line1:((y=h.context.address)==null?void 0:y.name)??((b=h.context.street)==null?void 0:b.name),line2:void 0,line3:((E=h.context.neighborhood)==null?void 0:E.name)??((V=h.context.locality)==null?void 0:V.name),city:((x=h.context.place)==null?void 0:x.name)??((_=h.context.district)==null?void 0:_.name),state:(I=h.context.region)==null?void 0:I.name,postcode:(D=h.context.postcode)==null?void 0:D.name,country:(L=h.context.country)==null?void 0:L.name}}})}}}:{enabled:!1}},[e,t]),at=e=>{const{t}=n.useTranslation();return n.o("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 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:[n.o("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:n.o("path",{d:"M10 3L5 8L10 13"})}),n.o("span",{children:t("back")})]})},Or=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:s}=n.useTranslation(),[o,a]=n.h(),[l,i]=n.h([]),{enabled:f,getPredictions:p}=Dr({logger:r,t:s}),[C,v]=n.h(f?"query":"manual"),[h,y]=n.h(""),[b,E]=n.h(),V=x=>{n.invariant(f,"Query state should not be enabled"),x=x.trim(),x!==(h==null?void 0:h.trim())&&(y(x),x===""&&i([]),E(void 0),p(x).then(_=>{if(_.ok===!1){i([]),E(_.error);return}i(_.data)}))};switch(C){case"query":return n.invariant(f,"Query state should not be enabled"),n.o(Rr,{input:e,onSkip:()=>t(null),onAddressSelect:x=>{if(x===""){a(void 0),v("manual");return}const _=l.find(I=>I.id===x);_&&(a(_.address),v("details"))},onAddressSearch:x=>{V(x)},suggestions:l,query:h,error:b});case"details":return n.invariant(o!==void 0),n.o(ot,{input:e,logger:r,onSubmitSuccess:t,addressFields:o,actions:n.o(at,{onClick:()=>{v("query")}})});case"manual":return n.o(ot,{logger:r,input:e,onSubmitSuccess:t,addressFields:{},actions:f?n.o(at,{onClick:()=>{v("query")}}):void 0})}},Rr=({input:e,onSkip:t,suggestions:r,onAddressSelect:s,query:o,onAddressSearch:a,error:l})=>{const{t:i}=n.useTranslation(),f=n._(null);return n.y(()=>{f.current&&(f.current.focus(),f.current.select())},[]),n.o(n.k,{children:[n.o("form",{noValidate:!0,onSubmit:p=>{p.preventDefault();const v=new FormData(p.currentTarget).get("address");typeof v=="string"&&a(v)},class:"flex gap-2 p-2.5",children:[n.o("div",{class:"group relative flex-1",children:[n.o("input",{ref:f,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||i("address_search"),defaultValue:o,class:_e({optional:!!e.config.optional,className:"w-full rounded-full"})}),n.o("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:n.o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.o("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[n.o("circle",{cx:"7",cy:"7",r:"4"}),n.o("path",{d:"M10 10L13 13"})]}),n.o("span",{class:"sr-only",children:i("search")})]})})]}),e.config.optional&&n.o(ce,{class:"relative",onClick:t})]}),l?n.o(pe,{error:{message:l}}):null,n.o("ul",{children:[r.map(p=>n.o("li",{children:n.o("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:()=>{s(p.id)},children:[n.o("span",{class:"flex-grow",children:p.label}),n.o("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:n.o("path",{d:"M6 3L11 8L6 13"})})]})},p.id)),n.o("li",{children:n.o("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:()=>{s("")},children:n.o("span",{class:"flex-grow",children:i("address_manual")})})},"")]})]})},it=["line1","line2","line3","city","state","postcode","country"],ot=({addressFields:e,onSubmitSuccess:t,actions:r,input:s})=>{const o=n._(null);n.y(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]);const a=Object.keys(ze),{t:l}=n.useTranslation();return n.o("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const f=new FormData(i.currentTarget),p=Object.fromEntries(f.entries());t({type:"address",value:p})},children:[n.o("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:o,children:it.map((i,f)=>{const p=`isdk_${i}`,C=s.config.keys[i];return C?n.o(n.k,{children:[n.o("label",{for:p,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:l(i)}),n.o("div",{class:"flex flex-col items-stretch gap-1.5",children:[i==="country"?n.o("div",{class:"relative",children:[n.o("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:C,id:p,defaultValue:e[i],required:!0,children:[e.country&&!a.includes(e.country)?n.o("option",{value:e[i],children:e[i]}):n.o("option",{value:"",children:l("select_country")}),a.map(v=>n.o("option",{value:v,children:v},v))]}),n.o("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:n.o("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):n.o("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:C,id:p,defaultValue:e[i],required:!0}),f===it.length-1?n.o("hr",{class:"m-0 w-full border-b border-b-transparent"}):n.o("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),n.o("div",{class:"flex w-full flex-1 ",children:[n.o("div",{class:"flex-grow",children:r}),n.o(le,{class:"flex items-center justify-center"})]})]})},Pe=()=>{const e=n._(null);return n.p(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Mt=["true","false"],Br=n.picklist(Mt),zr="answer",Tt="flex items-center flex-wrap gap-2 p-2.5",Nt="min-w-0 max-w-full flex-auto",Dt=n.k$1(({label:e,...t},r)=>n.o("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:n.o("p",{class:"text-center text-base",children:e})})),Pr=({input:e,onSubmitSuccess:t})=>{const r=Pe();return n.o("form",{noValidate:!0,class:"",onSubmit:s=>{s.preventDefault();const o=n.getFormSubmitter(s).value,a=n.parse(Br,o);t({type:"boolean",value:a==="true"})},children:[n.o("ul",{class:Tt,children:Mt.map((s,o)=>n.o("li",{class:Nt,children:n.o(Dt,{ref:o===0?r:null,type:"submit",name:zr,value:s,label:e.config.labels[s]},s)}))}),e.config.optional&&n.o("div",{class:"px-2 pb-2",children:n.o(ce,{class:"relative w-full",type:"button",onClick:()=>t(null)})})]})},jr=e=>new Promise((t,r)=>{const s=new FileReader;s.readAsDataURL(e),s.onload=()=>s.result?t(s.result.toString()):r("No result from reader"),s.onerror=r}),$r=e=>e.reduce((t,r)=>t+r.sizeKb,0),Ur=n.isSubmissionOfType("file"),lt=3,qr=({file:e,class:t,...r})=>{const s=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${s}$`),"");return n.o("div",{class:n.clsx("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:[n.o("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[n.o("span",{class:"block truncate",children:o}),n.o("span",{children:[".",s]})]}),n.o("p",{"aria-label":"File size",class:"text-accent-11",children:n.ce(e.sizeKb)})]})},ct=({class:e,...t})=>n.o("li",{class:n.clsx("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),Ot=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Hr=({allowedExtensions:e,files:t})=>{const r=e.map(s=>s.toLowerCase());return t.every(s=>r.includes(Ot(s.name).toLowerCase()))},Kr=(e,t)=>{const r=Ot(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Gr=({input:e,onSubmitSuccess:t})=>{var v;const r=(v=n.store.current$.value.flow)==null?void 0:v.data.submissions[e.key],[s,o]=n.h(Ur(r)?r.value:[]),[a,l]=n.h(),i=s.length-lt,f=$r(s),p=Pe(),{t:C}=n.useTranslation();return n.o("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:h=>(h.preventDefault(),l(void 0),s.length===0?l({type:"required",message:C("validation_file")}):e.config.extensions.length>0&&!Hr({allowedExtensions:e.config.extensions,files:s})?l({type:"validate",message:`${C("validation_file_ext",{ext:e.config.extensions.join(", ")})}`}):e.config.fileSizeLimitKib&&f>e.config.fileSizeLimitKib?l({type:"max",message:`File size exceeds limit of ${n.ce(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&s.length>1?l({type:"invalid",message:C("validation_file_max",{count:1})}):t({type:"file",value:s})),children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("label",{ref:p,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:[s.length>0?n.o(n.k,{children:[n.o("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[s.slice(0,lt).map(h=>{const y=h.name.split(".").pop(),b=h.name.replace(new RegExp(`.${y}$`),"");return n.o(ct,{class:"flex overflow-hidden",children:[n.o("span",{class:"block truncate",children:b}),n.o("span",{children:[".",y]})]})}),i>0?n.o(ct,{children:["+",i," file",i!==1?"s":""]}):null]}),n.o("p",{class:"text-neutral-11 text-xs",children:[n.ce(f)," ",s.length>1?"total":""]})]}):n.o("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[n.o("header",{class:"flex flex-col items-center gap-0",children:[n.o("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:n.o("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"})}),n.o("p",{class:"text-neutral-12 tracking-[-0.01em]",children:C("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?n.o("p",{class:"text-neutral-10 text-xs",children:["(",C("file_max_size",{size:n.ce(e.config.fileSizeLimitKib)}),")"]}):null]}),n.o("aside",{class:"flex flex-col items-center gap-2",children:[n.o("p",{id:"accepted-filetypes",class:"sr-only",children:C("file_extensions")}),n.o("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(h=>n.o("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:h.replace(".","")}))})]})]}),n.o("input",{id:"dropzone-file",onInput:async h=>{n.invariant(h.target instanceof HTMLInputElement);const y=h.target.files?Array.from(h.target.files):[],b=await Promise.allSettled(y.map(async V=>{const x=await jr(V);return{name:Kr(V.name,42),data:x,sizeKb:V.size/1e3}}));if(b.some(({status:V})=>V==="rejected"))return l({type:"invalid",message:"Invalid file"});const E=b.map(V=>V.status==="fulfilled"?V.value:null).filter(Boolean);o(E)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),n.o("div",{class:"flex h-full flex-col items-center gap-2",children:[n.o(le,{disabled:s.length===0}),e.config.optional&&n.o(ce,{class:"relative",onClick:()=>t(null)})]})]}),n.o(pe,{error:a})]})};var Ce=e=>e.type==="checkbox",oe=e=>e instanceof Date,H=e=>e==null;const Rt=e=>typeof e=="object";var B=e=>!H(e)&&!Array.isArray(e)&&Rt(e)&&!oe(e),Wr=e=>B(e)&&e.target?Ce(e.target)?e.target.checked:e.target.value:e,Jr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Zr=(e,t)=>e.has(Jr(t)),Xr=e=>{const t=e.constructor&&e.constructor.prototype;return B(t)&&t.hasOwnProperty("isPrototypeOf")},je=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(je&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(B(e)&&Xr(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=P(e[o]));return s}var Fe=e=>/^\w*$/.test(e),O=e=>e===void 0,$e=e=>Array.isArray(e)?e.filter(Boolean):[],Ue=e=>$e(e.replace(/["|']|\]/g,"").split(/\.|\[/)),k=(e,t,r)=>{if(!t||!B(e))return r;const s=(Fe(t)?[t]:Ue(t)).reduce((o,a)=>H(o)?o:o[a],e);return O(s)||s===e?O(e[t])?r:e[t]:s},X=e=>typeof e=="boolean",J=e=>typeof e=="function",N=(e,t,r)=>{let s=-1;const o=Fe(t)?[t]:Ue(t),a=o.length,l=a-1;for(;++s<a;){const i=o[s];let f=r;if(s!==l){const p=e[i];f=B(p)||Array.isArray(p)?p:isNaN(+o[s+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=f,e=e[i]}};const ut={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Z={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},te={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Yr=n.Cn.createContext(null);Yr.displayName="HookFormControlContext";var Qr=(e,t,r,s=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const l=a;return t._proxyFormState[l]!==Z.all&&(t._proxyFormState[l]=!s||Z.all),r&&(r[l]=!0),e[l]}});return o};const en=typeof window<"u"?n.Cn.useLayoutEffect:n.Cn.useEffect;var G=e=>typeof e=="string",tn=(e,t,r,s,o)=>G(e)?(s&&t.watch.add(e),k(r,e,o)):Array.isArray(e)?e.map(a=>(s&&t.watch.add(a),k(r,a))):(s&&(t.watchAll=!0),r),Re=e=>H(e)||!Rt(e);function se(e,t,r=new WeakSet){if(Re(e)||Re(t))return Object.is(e,t);if(oe(e)&&oe(t))return Object.is(e.getTime(),t.getTime());const s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of s){const l=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const i=t[a];if(oe(l)&&oe(i)||B(l)&&B(i)||Array.isArray(l)&&Array.isArray(i)?!se(l,i,r):!Object.is(l,i))return!1}}return!0}const rn=n.Cn.createContext(null);rn.displayName="HookFormContext";var Bt=(e,t,r,s,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:o||!0}}:{},we=e=>Array.isArray(e)?e:[e],dt=()=>{let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}};function zt(e,t){const r={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],a=t[s];if(o&&B(o)&&a){const l=zt(o,a);B(l)&&(r[s]=l)}else e[s]&&(r[s]=a)}return r}var q=e=>B(e)&&!Object.keys(e).length,qe=e=>e.type==="file",Ve=e=>{if(!je)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Pt=e=>e.type==="select-multiple",He=e=>e.type==="radio",nn=e=>He(e)||Ce(e),Oe=e=>Ve(e)&&e.isConnected;function sn(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=O(e)?s++:e[t[s++]];return e}function an(e){for(const t in e)if(e.hasOwnProperty(t)&&!O(e[t]))return!1;return!0}function R(e,t){const r=Array.isArray(t)?t:Fe(t)?[t]:Ue(t),s=r.length===1?e:sn(e,r),o=r.length-1,a=r[o];return s&&delete s[a],o!==0&&(B(s)&&q(s)||Array.isArray(s)&&an(s))&&R(e,r.slice(0,-1)),e}var on=e=>{for(const t in e)if(J(e[t]))return!0;return!1};function jt(e){return Array.isArray(e)||B(e)&&!on(e)}function Be(e,t={}){for(const r in e){const s=e[r];jt(s)?(t[r]=Array.isArray(s)?[]:{},Be(s,t[r])):O(s)||(t[r]=!0)}return t}function he(e,t,r){r||(r=Be(t));for(const s in e){const o=e[s];if(jt(o))O(t)||Re(r[s])?r[s]=Be(o,Array.isArray(o)?[]:{}):he(o,H(t)?{}:t[s],r[s]);else{const a=t[s];r[s]=!se(o,a)}}return r}const ft={value:!1,isValid:!1},ht={value:!0,isValid:!0};var $t=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&&!O(e[0].attributes.value)?O(e[0].value)||e[0].value===""?ht:{value:e[0].value,isValid:!0}:ht:ft}return ft},Ut=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>O(e)?e:t?e===""?NaN:e&&+e:r&&G(e)?new Date(e):s?s(e):e;const pt={isValid:!1,value:null};var qt=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,pt):pt;function mt(e){const t=e.ref;return qe(t)?t.files:He(t)?qt(e.refs).value:Pt(t)?[...t.selectedOptions].map(({value:r})=>r):Ce(t)?$t(e.refs).value:Ut(O(t.value)?e.ref.value:t.value,e)}var ln=(e,t,r,s)=>{const o={};for(const a of e){const l=k(t,a);l&&N(o,a,l._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,be=e=>O(e)?e:Ee(e)?e.source:B(e)?Ee(e.value)?e.value.source:e.value:e,gt=e=>({isOnSubmit:!e||e===Z.onSubmit,isOnBlur:e===Z.onBlur,isOnChange:e===Z.onChange,isOnAll:e===Z.all,isOnTouch:e===Z.onTouched});const yt="AsyncFunction";var cn=e=>!!e&&!!e.validate&&!!(J(e.validate)&&e.validate.constructor.name===yt||B(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===yt)),un=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),bt=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const ke=(e,t,r,s)=>{for(const o of r||Object.keys(e)){const a=k(e,o);if(a){const{_f:l,...i}=a;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!s)return!0;if(l.ref&&t(l.ref,l.name)&&!s)return!0;if(ke(i,t))break}else if(B(i)&&ke(i,t))break}}};function vt(e,t,r){const s=k(e,r);if(s||Fe(r))return{error:s,name:r};const o=r.split(".");for(;o.length;){const a=o.join("."),l=k(t,a),i=k(e,a);if(l&&!Array.isArray(l)&&r!==a)return{name:r};if(i&&i.type)return{name:a,error:i};if(i&&i.root&&i.root.type)return{name:`${a}.root`,error:i.root};o.pop()}return{name:r}}var dn=(e,t,r,s)=>{r(e);const{name:o,...a}=e;return q(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(l=>t[l]===(!s||Z.all))},fn=(e,t,r)=>!e||!t||e===t||we(e).some(s=>s&&(r?s===t:s.startsWith(t)||t.startsWith(s))),hn=(e,t,r,s,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?s.isOnBlur:o.isOnBlur)?!e:(r?s.isOnChange:o.isOnChange)?e:!0,pn=(e,t)=>!$e(k(e,t)).length&&R(e,t),mn=(e,t,r)=>{const s=we(k(e,r));return N(s,"root",t[r]),N(e,r,s),e};function xt(e,t,r="validate"){if(G(e)||Array.isArray(e)&&e.every(G)||X(e)&&!e)return{type:r,message:G(e)?e:"",ref:t}}var de=e=>B(e)&&!Ee(e)?e:{value:e,message:""},wt=async(e,t,r,s,o,a)=>{const{ref:l,refs:i,required:f,maxLength:p,minLength:C,min:v,max:h,pattern:y,validate:b,name:E,valueAsNumber:V,mount:x}=e._f,_=k(r,E);if(!x||t.has(E))return{};const I=i?i[0]:l,D=F=>{o&&I.reportValidity&&(I.setCustomValidity(X(F)?"":F||""),I.reportValidity())},L={},ae=He(l),ue=Ce(l),Q=ae||ue,re=(V||qe(l))&&O(l.value)&&O(_)||Ve(l)&&l.value===""||_===""||Array.isArray(_)&&!_.length,j=Bt.bind(null,E,s,L),Se=(F,A,z,$=te.maxLength,W=te.minLength)=>{const K=F?A:z;L[E]={type:F?$:W,message:K,ref:l,...j(F?$:W,K)}};if(a?!Array.isArray(_)||!_.length:f&&(!Q&&(re||H(_))||X(_)&&!_||ue&&!$t(i).isValid||ae&&!qt(i).isValid)){const{value:F,message:A}=G(f)?{value:!!f,message:f}:de(f);if(F&&(L[E]={type:te.required,message:A,ref:I,...j(te.required,A)},!s))return D(A),L}if(!re&&(!H(v)||!H(h))){let F,A;const z=de(h),$=de(v);if(!H(_)&&!isNaN(_)){const W=l.valueAsNumber||_&&+_;H(z.value)||(F=W>z.value),H($.value)||(A=W<$.value)}else{const W=l.valueAsDate||new Date(_),K=ye=>new Date(new Date().toDateString()+" "+ye),me=l.type=="time",ge=l.type=="week";G(z.value)&&_&&(F=me?K(_)>K(z.value):ge?_>z.value:W>new Date(z.value)),G($.value)&&_&&(A=me?K(_)<K($.value):ge?_<$.value:W<new Date($.value))}if((F||A)&&(Se(!!F,z.message,$.message,te.max,te.min),!s))return D(L[E].message),L}if((p||C)&&!re&&(G(_)||a&&Array.isArray(_))){const F=de(p),A=de(C),z=!H(F.value)&&_.length>+F.value,$=!H(A.value)&&_.length<+A.value;if((z||$)&&(Se(z,F.message,A.message),!s))return D(L[E].message),L}if(y&&!re&&G(_)){const{value:F,message:A}=de(y);if(Ee(F)&&!_.match(F)&&(L[E]={type:te.pattern,message:A,ref:l,...j(te.pattern,A)},!s))return D(A),L}if(b){if(J(b)){const F=await b(_,r),A=xt(F,I);if(A&&(L[E]={...A,...j(te.validate,A.message)},!s))return D(A.message),L}else if(B(b)){let F={};for(const A in b){if(!q(F)&&!s)break;const z=xt(await b[A](_,r),I,A);z&&(F={...z,...j(A,z.message)},D(z.message),s&&(L[E]=F))}if(!q(F)&&(L[E]={ref:I,...F},!s))return L}}return D(!0),L};const gn={mode:Z.onSubmit,reValidateMode:Z.onChange,shouldFocusError:!0};function yn(e={}){let t={...gn,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:J(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},s={},o=B(t.defaultValues)||B(t.values)?P(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:P(o),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,p=0;const C={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={...C};let h={...v};const y={array:dt(),state:dt()},b=t.criteriaMode===Z.all,E=c=>u=>{clearTimeout(p),p=setTimeout(c,u)},V=async c=>{if(!l.keepIsValid&&!t.disabled&&(v.isValid||h.isValid||c)){let u;t.resolver?(u=q((await Q()).errors),x()):u=await j(s,!0),u!==r.isValid&&y.state.next({isValid:u})}},x=(c,u)=>{!t.disabled&&(v.isValidating||v.validatingFields||h.isValidating||h.validatingFields)&&((c||Array.from(i.mount)).forEach(d=>{d&&(u?N(r.validatingFields,d,u):R(r.validatingFields,d))}),y.state.next({validatingFields:r.validatingFields,isValidating:!q(r.validatingFields)}))},_=(c,u=[],d,w,g=!0,m=!0)=>{if(w&&d&&!t.disabled){if(l.action=!0,m&&Array.isArray(k(s,c))){const S=d(k(s,c),w.argA,w.argB);g&&N(s,c,S)}if(m&&Array.isArray(k(r.errors,c))){const S=d(k(r.errors,c),w.argA,w.argB);g&&N(r.errors,c,S),pn(r.errors,c)}if((v.touchedFields||h.touchedFields)&&m&&Array.isArray(k(r.touchedFields,c))){const S=d(k(r.touchedFields,c),w.argA,w.argB);g&&N(r.touchedFields,c,S)}(v.dirtyFields||h.dirtyFields)&&(r.dirtyFields=he(o,a)),y.state.next({name:c,isDirty:F(c,u),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else N(a,c,u)},I=(c,u)=>{N(r.errors,c,u),y.state.next({errors:r.errors})},D=c=>{r.errors=c,y.state.next({errors:r.errors,isValid:!1})},L=(c,u,d,w)=>{const g=k(s,c);if(g){const m=k(a,c,O(d)?k(o,c):d);O(m)||w&&w.defaultChecked||u?N(a,c,u?m:mt(g._f)):$(c,m),l.mount&&!l.action&&V()}},ae=(c,u,d,w,g)=>{let m=!1,S=!1;const M={name:c};if(!t.disabled){if(!d||w){(v.isDirty||h.isDirty)&&(S=r.isDirty,r.isDirty=M.isDirty=F(),m=S!==M.isDirty);const T=se(k(o,c),u);S=!!k(r.dirtyFields,c),T?R(r.dirtyFields,c):N(r.dirtyFields,c,!0),M.dirtyFields=r.dirtyFields,m=m||(v.dirtyFields||h.dirtyFields)&&S!==!T}if(d){const T=k(r.touchedFields,c);T||(N(r.touchedFields,c,d),M.touchedFields=r.touchedFields,m=m||(v.touchedFields||h.touchedFields)&&T!==d)}m&&g&&y.state.next(M)}return m?M:{}},ue=(c,u,d,w)=>{const g=k(r.errors,c),m=(v.isValid||h.isValid)&&X(u)&&r.isValid!==u;if(t.delayError&&d?(f=E(()=>I(c,d)),f(t.delayError)):(clearTimeout(p),f=null,d?N(r.errors,c,d):R(r.errors,c)),(d?!se(g,d):g)||!q(w)||m){const S={...w,...m&&X(u)?{isValid:u}:{},errors:r.errors,name:c};r={...r,...S},y.state.next(S)}},Q=async c=>(x(c,!0),await t.resolver(a,t.context,ln(c||i.mount,s,t.criteriaMode,t.shouldUseNativeValidation))),re=async c=>{const{errors:u}=await Q(c);if(x(c),c)for(const d of c){const w=k(u,d);w?N(r.errors,d,w):R(r.errors,d)}else r.errors=u;return u},j=async(c,u,d={valid:!0})=>{for(const w in c){const g=c[w];if(g){const{_f:m,...S}=g;if(m){const M=i.array.has(m.name),T=g._f&&cn(g._f);T&&v.validatingFields&&x([m.name],!0);const U=await wt(g,i.disabled,a,b,t.shouldUseNativeValidation&&!u,M);if(T&&v.validatingFields&&x([m.name]),U[m.name]&&(d.valid=!1,u||e.shouldUseNativeValidation))break;!u&&(k(U,m.name)?M?mn(r.errors,U,m.name):N(r.errors,m.name,U[m.name]):R(r.errors,m.name))}!q(S)&&await j(S,u,d)}}return d.valid},Se=()=>{for(const c of i.unMount){const u=k(s,c);u&&(u._f.refs?u._f.refs.every(d=>!Oe(d)):!Oe(u._f.ref))&&Ae(c)}i.unMount=new Set},F=(c,u)=>!t.disabled&&(c&&u&&N(a,c,u),!se(Ke(),o)),A=(c,u,d)=>tn(c,i,{...l.mount?a:O(u)?o:G(c)?{[c]:u}:u},d,u),z=c=>$e(k(l.mount?a:o,c,t.shouldUnregister?k(o,c,[]):[])),$=(c,u,d={})=>{const w=k(s,c);let g=u;if(w){const m=w._f;m&&(!m.disabled&&N(a,c,Ut(u,m)),g=Ve(m.ref)&&H(u)?"":u,Pt(m.ref)?[...m.ref.options].forEach(S=>S.selected=g.includes(S.value)):m.refs?Ce(m.ref)?m.refs.forEach(S=>{(!S.defaultChecked||!S.disabled)&&(Array.isArray(g)?S.checked=!!g.find(M=>M===S.value):S.checked=g===S.value||!!g)}):m.refs.forEach(S=>S.checked=S.value===g):qe(m.ref)?m.ref.value="":(m.ref.value=g,m.ref.type||y.state.next({name:c,values:P(a)})))}(d.shouldDirty||d.shouldTouch)&&ae(c,g,d.shouldTouch,d.shouldDirty,!0),d.shouldValidate&&ye(c)},W=(c,u,d)=>{for(const w in u){if(!u.hasOwnProperty(w))return;const g=u[w],m=c+"."+w,S=k(s,m);(i.array.has(c)||B(g)||S&&!S._f)&&!oe(g)?W(m,g,d):$(m,g,d)}},K=(c,u,d={})=>{const w=k(s,c),g=i.array.has(c),m=P(u);N(a,c,m),g?(y.array.next({name:c,values:P(a)}),(v.isDirty||v.dirtyFields||h.isDirty||h.dirtyFields)&&d.shouldDirty&&y.state.next({name:c,dirtyFields:he(o,a),isDirty:F(c,m)})):w&&!w._f&&!H(m)?W(c,m,d):$(c,m,d),bt(c,i)?y.state.next({...r,name:c,values:P(a)}):y.state.next({name:l.mount?c:void 0,values:P(a)})},me=async c=>{l.mount=!0;const u=c.target;let d=u.name,w=!0;const g=k(s,d),m=T=>{w=Number.isNaN(T)||oe(T)&&isNaN(T.getTime())||se(T,k(a,d,T))},S=gt(t.mode),M=gt(t.reValidateMode);if(g){let T,U;const ie=u.type?mt(g._f):Wr(c),ne=c.type===ut.BLUR||c.type===ut.FOCUS_OUT,Qt=!un(g._f)&&!t.resolver&&!k(r.errors,d)&&!g._f.deps||hn(ne,k(r.touchedFields,d),r.isSubmitted,M,S),Ne=bt(d,i,ne);N(a,d,ie),ne?(!u||!u.readOnly)&&(g._f.onBlur&&g._f.onBlur(c),f&&f(0)):g._f.onChange&&g._f.onChange(c);const De=ae(d,ie,ne),er=!q(De)||Ne;if(!ne&&y.state.next({name:d,type:c.type,values:P(a)}),Qt)return(v.isValid||h.isValid)&&(t.mode==="onBlur"?ne&&V():ne||V()),er&&y.state.next({name:d,...Ne?{}:De});if(!ne&&Ne&&y.state.next({...r}),t.resolver){const{errors:tt}=await Q([d]);if(x([d]),m(ie),w){const tr=vt(r.errors,s,d),rt=vt(tt,s,tr.name||d);T=rt.error,d=rt.name,U=q(tt)}}else x([d],!0),T=(await wt(g,i.disabled,a,b,t.shouldUseNativeValidation))[d],x([d]),m(ie),w&&(T?U=!1:(v.isValid||h.isValid)&&(U=await j(s,!0)));w&&(g._f.deps&&(!Array.isArray(g._f.deps)||g._f.deps.length>0)&&ye(g._f.deps),ue(d,U,T,De))}},ge=(c,u)=>{if(k(r.errors,u)&&c.focus)return c.focus(),1},ye=async(c,u={})=>{let d,w;const g=we(c);if(t.resolver){const m=await re(O(c)?c:g);d=q(m),w=c?!g.some(S=>k(m,S)):d}else c?(w=(await Promise.all(g.map(async m=>{const S=k(s,m);return await j(S&&S._f?{[m]:S}:S)}))).every(Boolean),!(!w&&!r.isValid)&&V()):w=d=await j(s);return y.state.next({...!G(c)||(v.isValid||h.isValid)&&d!==r.isValid?{}:{name:c},...t.resolver||!c?{isValid:d}:{},errors:r.errors}),u.shouldFocus&&!w&&ke(s,ge,c?g:i.mount),w},Ke=(c,u)=>{let d={...l.mount?a:o};return u&&(d=zt(u.dirtyFields?r.dirtyFields:r.touchedFields,d)),O(c)?d:G(c)?k(d,c):c.map(w=>k(d,w))},Ge=(c,u)=>({invalid:!!k((u||r).errors,c),isDirty:!!k((u||r).dirtyFields,c),error:k((u||r).errors,c),isValidating:!!k(r.validatingFields,c),isTouched:!!k((u||r).touchedFields,c)}),Kt=c=>{const u=c?we(c):void 0;u==null||u.forEach(d=>R(r.errors,d)),u?u.forEach(d=>{y.state.next({name:d,errors:r.errors})}):y.state.next({errors:{}})},We=(c,u,d)=>{const w=(k(s,c,{_f:{}})._f||{}).ref,g=k(r.errors,c)||{},{ref:m,message:S,type:M,...T}=g;N(r.errors,c,{...T,...u,ref:w}),y.state.next({name:c,errors:r.errors,isValid:!1}),d&&d.shouldFocus&&w&&w.focus&&w.focus()},Gt=(c,u)=>J(c)?y.state.subscribe({next:d=>"values"in d&&c(A(void 0,u),d)}):A(c,u,!0),Je=c=>y.state.subscribe({next:u=>{fn(c.name,u.name,c.exact)&&dn(u,c.formState||v,Yt,c.reRenderRoot)&&c.callback({values:{...a},...r,...u,defaultValues:o})}}).unsubscribe,Wt=c=>(l.mount=!0,h={...h,...c.formState},Je({...c,formState:{...C,...c.formState}})),Ae=(c,u={})=>{for(const d of c?we(c):i.mount)i.mount.delete(d),i.array.delete(d),u.keepValue||(R(s,d),R(a,d)),!u.keepError&&R(r.errors,d),!u.keepDirty&&R(r.dirtyFields,d),!u.keepTouched&&R(r.touchedFields,d),!u.keepIsValidating&&R(r.validatingFields,d),!t.shouldUnregister&&!u.keepDefaultValue&&R(o,d);y.state.next({values:P(a)}),y.state.next({...r,...u.keepDirty?{isDirty:F()}:{}}),!u.keepIsValid&&V()},Ze=({disabled:c,name:u})=>{if(X(c)&&l.mount||c||i.disabled.has(u)){const g=i.disabled.has(u)!==!!c;c?i.disabled.add(u):i.disabled.delete(u),g&&l.mount&&!l.action&&V()}},Me=(c,u={})=>{let d=k(s,c);const w=X(u.disabled)||X(t.disabled);return N(s,c,{...d||{},_f:{...d&&d._f?d._f:{ref:{name:c}},name:c,mount:!0,...u}}),i.mount.add(c),d?Ze({disabled:X(u.disabled)?u.disabled:t.disabled,name:c}):L(c,!0,u.value),{...w?{disabled:u.disabled||t.disabled}:{},...t.progressive?{required:!!u.required,min:be(u.min),max:be(u.max),minLength:be(u.minLength),maxLength:be(u.maxLength),pattern:be(u.pattern)}:{},name:c,onChange:me,onBlur:me,ref:g=>{if(g){Me(c,u),d=k(s,c);const m=O(g.value)&&g.querySelectorAll&&g.querySelectorAll("input,select,textarea")[0]||g,S=nn(m),M=d._f.refs||[];if(S?M.find(T=>T===m):m===d._f.ref)return;N(s,c,{_f:{...d._f,...S?{refs:[...M.filter(Oe),m,...Array.isArray(k(o,c))?[{}]:[]],ref:{type:m.type,name:c}}:{ref:m}}}),L(c,!1,void 0,m)}else d=k(s,c,{}),d._f&&(d._f.mount=!1),(t.shouldUnregister||u.shouldUnregister)&&!(Zr(i.array,c)&&l.action)&&i.unMount.add(c)}}},Te=()=>t.shouldFocusError&&ke(s,ge,i.mount),Jt=c=>{X(c)&&(y.state.next({disabled:c}),ke(s,(u,d)=>{const w=k(s,d);w&&(u.disabled=w._f.disabled||c,Array.isArray(w._f.refs)&&w._f.refs.forEach(g=>{g.disabled=w._f.disabled||c}))},0,!1))},Xe=(c,u)=>async d=>{let w;d&&(d.preventDefault&&d.preventDefault(),d.persist&&d.persist());let g=P(a);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:m,values:S}=await Q();x(),r.errors=m,g=P(S)}else await j(s);if(i.disabled.size)for(const m of i.disabled)R(g,m);if(R(r.errors,"root"),q(r.errors)){y.state.next({errors:{}});try{await c(g,d)}catch(m){w=m}}else u&&await u({...r.errors},d),Te(),setTimeout(Te);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:q(r.errors)&&!w,submitCount:r.submitCount+1,errors:r.errors}),w)throw w},Zt=(c,u={})=>{k(s,c)&&(O(u.defaultValue)?K(c,P(k(o,c))):(K(c,u.defaultValue),N(o,c,P(u.defaultValue))),u.keepTouched||R(r.touchedFields,c),u.keepDirty||(R(r.dirtyFields,c),r.isDirty=u.defaultValue?F(c,P(k(o,c))):F()),u.keepError||(R(r.errors,c),v.isValid&&V()),y.state.next({...r}))},Ye=(c,u={})=>{const d=c?P(c):o,w=P(d),g=q(c),m=g?o:w;if(u.keepDefaultValues||(o=d),!u.keepValues){if(u.keepDirtyValues){const S=new Set([...i.mount,...Object.keys(he(o,a))]);for(const M of Array.from(S)){const T=k(r.dirtyFields,M),U=k(a,M),ie=k(m,M);T&&!O(U)?N(m,M,U):!T&&!O(ie)&&K(M,ie)}}else{if(je&&O(c))for(const S of i.mount){const M=k(s,S);if(M&&M._f){const T=Array.isArray(M._f.refs)?M._f.refs[0]:M._f.ref;if(Ve(T)){const U=T.closest("form");if(U){U.reset();break}}}}if(u.keepFieldsRef)for(const S of i.mount)K(S,k(m,S));else s={}}a=t.shouldUnregister?u.keepDefaultValues?P(o):{}:P(m),y.array.next({values:{...m}}),y.state.next({values:{...m}})}i={mount:u.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!v.isValid||!!u.keepIsValid||!!u.keepDirtyValues||!t.shouldUnregister&&!q(m),l.watch=!!t.shouldUnregister,l.keepIsValid=!!u.keepIsValid,l.action=!1,u.keepErrors||(r.errors={}),y.state.next({submitCount:u.keepSubmitCount?r.submitCount:0,isDirty:g?!1:u.keepDirty?r.isDirty:!!(u.keepDefaultValues&&!se(c,o)),isSubmitted:u.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:g?{}:u.keepDirtyValues?u.keepDefaultValues&&a?he(o,a):r.dirtyFields:u.keepDefaultValues&&c?he(o,c):u.keepDirty?r.dirtyFields:{},touchedFields:u.keepTouched?r.touchedFields:{},errors:u.keepErrors?r.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Qe=(c,u)=>Ye(J(c)?c(a):c,{...t.resetOptions,...u}),Xt=(c,u={})=>{const d=k(s,c),w=d&&d._f;if(w){const g=w.refs?w.refs[0]:w.ref;g.focus&&setTimeout(()=>{g.focus(),u.shouldSelect&&J(g.select)&&g.select()})}},Yt=c=>{r={...r,...c}},et={control:{register:Me,unregister:Ae,getFieldState:Ge,handleSubmit:Xe,setError:We,_subscribe:Je,_runSchema:Q,_updateIsValidating:x,_focusError:Te,_getWatch:A,_getDirty:F,_setValid:V,_setFieldArray:_,_setDisabledField:Ze,_setErrors:D,_getFieldArray:z,_reset:Ye,_resetDefaultValues:()=>J(t.defaultValues)&&t.defaultValues().then(c=>{Qe(c,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:Se,_disableForm:Jt,_subjects:y,_proxyFormState:v,get _fields(){return s},get _formValues(){return a},get _state(){return l},set _state(c){l=c},get _defaultValues(){return o},get _names(){return i},set _names(c){i=c},get _formState(){return r},get _options(){return t},set _options(c){t={...t,...c}}},subscribe:Wt,trigger:ye,register:Me,handleSubmit:Xe,watch:Gt,setValue:K,getValues:Ke,reset:Qe,resetField:Zt,clearErrors:Kt,unregister:Ae,setError:We,setFocus:Xt,getFieldState:Ge};return{...et,formControl:et}}function Ie(e={}){const t=n.Cn.useRef(void 0),r=n.Cn.useRef(void 0),[s,o]=n.Cn.useState({isDirty:!1,isValidating:!1,isLoading:J(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:J(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:s},e.defaultValues&&!J(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...i}=yn(e);t.current={...i,formState:s}}const a=t.current.control;return a._options=e,en(()=>{const l=a._subscribe({formState:a._proxyFormState,callback:()=>o({...a._formState}),reRenderRoot:!0});return o(i=>({...i,isReady:!0})),a._formState.isReady=!0,l},[a]),n.Cn.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),n.Cn.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),n.Cn.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),n.Cn.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),n.Cn.useEffect(()=>{if(a._proxyFormState.isDirty){const l=a._getDirty();l!==s.isDirty&&a._subjects.state.next({isDirty:l})}},[a,s.isDirty]),n.Cn.useEffect(()=>{var l;e.values&&!se(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((l=a._options.resetOptions)===null||l===void 0)&&l.keepIsValid||a._setValid(),r.current=e.values,o(i=>({...i}))):a._resetDefaultValues()},[a,e.values]),n.Cn.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=n.Cn.useMemo(()=>Qr(s,a),[a,s]),t.current}const kt=(e,t,r)=>{if(e&&"reportValidity"in e){const s=k(r,t);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},bn=(e,t)=>{for(const r in t.fields){const s=t.fields[r];s&&s.ref&&"reportValidity"in s.ref?kt(s.ref,r,e):s.refs&&s.refs.forEach(o=>kt(o,r,e))}},vn=(e,t)=>{t.shouldUseNativeValidation&&bn(e,t);const r={};for(const s in e){const o=k(t.fields,s),a=Object.assign(e[s]||{},{ref:o&&o.ref});if(xn(t.names||Object.keys(e),s)){const l=Object.assign({},k(r,s));N(l,"root",a),N(r,s,l)}else N(r,s,a)}return r},xn=(e,t)=>e.some(r=>r.startsWith(t+"."));var Le=function(e,t,r){return r===void 0&&(r={}),function(s,o,a){try{var l=!a.shouldUseNativeValidation&&a.criteriaMode==="all";return Promise.resolve(n.safeParseAsync(e,s,Object.assign({},t,{abortPipeEarly:!l}))).then(function(i){if(i.issues){for(var f={};i.issues.length;){var p=i.issues[0],C=n.getDotPath(p);if(C&&(f[C]||(f[C]={message:p.message,type:p.type}),l)){var v=f[C].types,h=v&&v[p.type];f[C]=Bt(C,l,f,p.type,h?[].concat(h,p.message):p.message)}i.issues.shift()}return{values:{},errors:vn(f,a)}}return{values:r.raw?s:i.output,errors:{}}})}catch(i){return Promise.reject(i)}}};const _t=27,Ct=12,St=10,wn=n.isSubmissionOfType("enum"),kn=(e,t)=>{const r={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Le(n.object({checked:n.pipe(n.record(n.string(),n.boolean()),n.transform(s=>Object.entries(s).filter(([o,a])=>a).map(([o,a])=>o)),n.maxLength(r.max,t("validation_multiple_choice_max",{count:r.max})),n.minLength(r.min,t("validation_multiple_choice_min",{count:r.min})))}))},_n=n.k$1(({option:e,...t},r)=>n.o(n.k,{children:[n.o("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),n.o("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})]})),Vt=n.cva("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:Tt}}}),Cn=({input:e,onSubmitSuccess:t})=>{var C,v;const r=e.key?(C=n.store.current$.value.flow)==null?void 0:C.data.submissions[e.key]:void 0,s=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,o=s&&e.config.options.length===2,{t:a}=n.useTranslation(),{register:l,handleSubmit:i,formState:{errors:f}}=Ie({defaultValues:{checked:s?{}:wn(r)?Object.fromEntries(r.value.map(h=>[h,!0])):{}},resolver:kn(e.config,a)}),p=Pe();return o?n.o("ul",{style:{maxHeight:6.5*_t+5*Ct+2*St},class:Vt({variant:"booleanLike"}),children:e.config.options.map((h,y)=>n.o("li",{class:Nt,children:n.o(Dt,{type:"submit",ref:b=>{b&&y===0&&(p.current=b)},label:h.label,value:"true",onClick:()=>t({type:"enum",value:[h.value]})})},h.value))}):n.o("form",{noValidate:!0,onSubmit:h=>i(y=>{const b=y.checked;t({type:"enum",value:b})})(h),children:[n.o("div",{class:"flex items-center gap-1",children:[n.o("ul",{style:{maxHeight:6.5*_t+5*Ct+2*St},class:Vt({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((h,y)=>{const b=`checked.${h.value}`,{ref:E,...V}=l(b);return n.o("li",{class:"relative",children:n.o(_n,{option:h,autoFocus:y===0,ref:x=>{x&&y===0&&(p.current=x),E(x)},id:b,...V,onClick:s?()=>t({type:"enum",value:[h.value]}):void 0})},h.value)})}),n.o("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[s?null:n.o(le,{}),e.config.minSelected===0&&n.o(ce,{class:"relative",type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),n.o("div",{class:"px-1",children:n.o(pe,{error:(v=f.checked)==null?void 0:v.root})})]})},Sn=n.isSubmissionOfType("number"),Vn=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,s=e.max??Number.MAX_SAFE_INTEGER,o=e.decimalCases??0;return Le(n.object({number:n.pipe(n.number(t("validation_number")),n.minValue(r,t("validation_number_min",{min:r})),n.maxValue(s,t("validation_number_max",{max:s})),n.check(a=>a===Number(a.toFixed(o)),t("validation_number_decimal_cases",{count:o})))}))},En=({input:e,onSubmitSuccess:t})=>{var v;const r=e.config.defaultValue,s=e.key?(v=n.store.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,{t:o}=n.useTranslation(),{register:a,handleSubmit:l,formState:{errors:i}}=Ie({defaultValues:{number:r?Number(r):Sn(s)?s.value:void 0},resolver:Vn(e.config,o)}),{ref:f,...p}=a("number",{required:!e.config.optional,valueAsNumber:!0}),C=n._();return n.y(()=>{C.current&&(C.current.focus(),C.current.select())},[]),n.o("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:l(h=>{h.number!==void 0&&t({type:"number",value:h.number})}),children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("div",{class:"relative min-w-0 flex-grow",children:[n.o("input",{...p,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(C.current=h),f(h)},type:"text",min:e.config.min,max:e.config.max,class:_e({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&&n.o(ce,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),n.o(le,{})]}),n.o(pe,{error:i.number})]})},Fn=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(ze).find(o=>e.startsWith(o[1])),r=t?t[1]:"",s=e.replace(r,"");return/^\d+$/.test(s)?{countryCode:r,phoneNumber:s}:{countryCode:"",phoneNumber:""}},In="44",Ln=/^[0-9 ]+$/,An=n.isSubmissionOfType("string"),Mn=n.isSubmissionOfType("phone"),Tn=e=>{const t=n.pipe(n.string(e("validation_country_code")),n.regex(Ln,e("validation_country_code"))),r=n.pipe(n.string(e("validation_phone")),n.minLength(1,e("validation_phone")),n.transform(s=>s.replace(/[^0-9]/g,"")));return Le(n.object({countryCode:t,phoneNumber:r}))},Nn=({input:e,onSubmitSuccess:t})=>{var E;const r=e.key?(E=n.store.current$.value.flow)==null?void 0:E.data.submissions[e.key]:void 0,{t:s}=n.useTranslation(),[o,a]=n.h(),l=An(r)?Fn(r.value):Mn(r)?r.value:void 0,{register:i,handleSubmit:f,formState:{errors:p},watch:C}=Ie({defaultValues:{countryCode:(l==null?void 0:l.countryCode)??e.config.defaultValue.countryCode??In,phoneNumber:(l==null?void 0:l.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:Tn(s)}),{ref:v,...h}=i("phoneNumber",{required:!e.config.optional}),y=n._(),b=C("countryCode");return n.y(()=>{y.current&&(y.current.focus(),y.current.select())},[]),n.o("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:f(V=>{const x=V.phoneNumber.replace(/[^0-9]/g,""),_=V.countryCode.replace(/[^0-9]/g,"");a(void 0);const I=e.config.minChars??7,D=x.length+_.length;if(D<I)return a(s("validation_phone_min_chars",{count:I}));const L=e.config.maxChars;if(L!=null&&D>L)return a(s("validation_max_chars",{count:L}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:x}}):t({type:"string",value:b+V.phoneNumber})}),children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[n.o("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:[n.o("span",{children:["+",b]}),n.o("select",{...i("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(ze).map(([V,x])=>n.o("option",{value:x,children:[V," (+",x,")"]},V))})]}),n.o("input",{...h,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:V=>{V&&(y.current=V),v(V)},class:_e({optional:e.config.optional,className:"min-w-0 flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&n.o(ce,{class:"absolute bottom-0 right-1 top-0",onClick:()=>t(null)})]}),n.o(le,{})]}),n.o(pe,{error:p.countryCode||p.phoneNumber||{message:o}})]})},Dn=({input:e,onSubmitSuccess:t})=>n.o("div",{class:"flex flex-col items-center py-3",children:n.o("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 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",name:e.key,onClick:()=>{t(null)},children:n.o("span",{class:"flex items-center gap-1.5",children:[n.o("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),n.o("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:[n.o("path",{d:"M4 8L8 4L12 8"}),n.o("path",{d:"M8 4V13"})]})]})})}),On={date:{type:"date",inputMode:"text"},email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Rn=n.isSubmissionOfType("string"),Bn=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return Le(n.object({text:{date:n.pipe(n.string(t("validation_date")),n.regex(/^\d{4}-\d{2}-\d{2}$/,t("validation_date"))),email:n.pipe(n.string(t("validation_email")),n.email(t("validation_email")),n.minLength(e.minChars??1,r.minLength),n.maxLength(e.maxChars??1/0,r.maxLength)),text:n.pipe(n.string(),n.minLength(e.minChars??1,r.minLength),n.maxLength(e.maxChars??1/0,r.maxLength)),url:n.pipe(n.string(t("validation_url")),n.url(t("validation_url")),n.minLength(e.minChars??1,r.minLength),n.maxLength(e.maxChars??1/0,r.maxLength))}[e.format]}))},zn=({input:e,onSubmitSuccess:t})=>{var v;const{t:r}=n.useTranslation(),s=e.key?(v=n.store.current$.value.flow)==null?void 0:v.data.submissions[e.key]:void 0,o=e.config.defaultValue,{register:a,handleSubmit:l,formState:{errors:i}}=Ie({defaultValues:{text:o||(Rn(s)?s.value:"")},resolver:Bn(e.config,r)}),{ref:f,...p}=a("text",{required:!e.config.optional}),C=n._();return n.y(()=>{C.current&&(C.current.focus(),C.current.select())},[]),n.o("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(h=>{t({type:"string",value:h.text})}),children:[n.o("div",{class:"flex items-center gap-2",children:[n.o("div",{class:"relative min-w-0 flex-1",children:[n.o("input",{id:"chat-input",...p,...On[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:h=>{h&&(C.current=h),f(h)},placeholder:e.config.placeholder,class:_e({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&n.o(ce,{class:"absolute bottom-0 right-0.5 top-0",onClick:()=>t(null)})]}),n.o(le,{})]}),n.o(pe,{error:i.text})]})},Pn={text:zn,phone:Nn,"multiple-choice":Cn,boolean:Pr,file:Gr,submit:Dn,address:Or,number:En},jn=({logger:e})=>{var a;const t=(a=n.store.current$.value.flow)==null?void 0:a.data.currentInput,[r,s]=Vr(),o=n._(null);return n.store.inputHeight$.value=s.height,n.p(()=>{const l=o.current;if(l)return l.addEventListener("transitionstart",n.chatStore.scrollToEnd.smooth),l.addEventListener("transitioncancel",n.chatStore.scrollToEnd.smooth),l.addEventListener("transitionend",n.chatStore.scrollToEnd.smooth),()=>{l.removeEventListener("transitionstart",n.chatStore.scrollToEnd.smooth),l.removeEventListener("transitioncancel",n.chatStore.scrollToEnd.smooth),l.removeEventListener("transitionend",n.chatStore.scrollToEnd.smooth)}},[]),n.o("div",{ref:o,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:s.height},children:n.o("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:t?(()=>{const l=Pn[t.type];return n.o(l,{logger:e,onSubmitSuccess:n.chatStore.onSubmitSuccessFn$.value,input:t})})():n.o("div",{class:"flex items-center gap-2 p-2.5",children:[n.o("input",{"aria-hidden":"true",id:"chat-input",class:_e({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),n.o(le,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};function $n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Un=function(e){return e instanceof RegExp},qn=function(t){var r=/[\\^$.*+?()[\]{}|]/g,s=RegExp(r.source);return t&&s.test(t)?t.replace(r,"\\$&"):t},Ht=function(e){return typeof e=="string"},Hn=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Kn(e,t,r){var s=0,o=0;if(e==="")return e;if(!e||!Ht(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Un(a)||(a=new RegExp("("+qn(a)+")","gi"));for(var l=e.split(a),i=1,f=l.length;i<f;i+=2){if(l[i]===void 0||l[i-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}o=l[i].length,s+=l[i-1].length,l[i]=r(l[i],i,s),s+=o}return l}var Gn=function(t,r,s){return Array.isArray(t)||(t=[t]),Hn(t.map(function(o){return Ht(o)?Kn(o,r,s):o}))};const ve=$n(Gn),Wn=/(\[[^\]]+\]\([^)]+\))/g,Jn=/\[([^\]]+)\]\(([^)]+)\)/,Zn=/(https?:\/\/[^\s]+)/g,Xn=/_(.*?)_/g,Yn=/\*\*(.*?)\*\*/g,Qn=/\\n|\n/g,Et="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",es=e=>{const t=ve(e,Wn,(l,i)=>{const[,f,p]=l.match(Jn)??[];return p?n.o("a",{class:Et,href:p,children:f??p},p+i):n.o("span",{children:"INVALID LINK"})}),r=ve(t,Zn,(l,i)=>n.o("a",{class:Et,href:l,children:l},l+i)),s=ve(r,Xn,(l,i)=>n.o("em",{children:l},l+i)),o=ve(s,Yn,(l,i)=>n.o("strong",{children:l},l+i));return ve(o,Qn,(l,i)=>n.o("br",{},`br-${i}`))},ts=n.cva("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"}}),rs=({children:e,className:t,animate:r,side:s,...o})=>n.o("p",{style:{transformOrigin:s==="left"?"0% 50%":"100% 50%"},class:ts({className:t,side:s,animate:r}),...o,children:e}),ns=({message:e})=>n.o("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:n.o("a",{onClick:e.onClick,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,n.o("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.o("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"})})]})}),ss=({className:e,...t})=>(n.p(()=>{n.chatStore.scrollToEnd.smooth()}),n.o("div",{"aria-hidden":!0,children:n.chatStore.isBotTyping$.value===!0?n.o("div",{"aria-label":"Typing…",class:n.clsx("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,s)=>n.o("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-s*200}ms`}}))}):void 0})),as={bot:"left",user:"right"},is=n.cva("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-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),os=({lastSentMessageFooter:e})=>{var r;const t=((r=n.store.current$.value.flow)==null?void 0:r.data.messages)??[];return n.p(()=>{n.chatStore.scrollToEnd.smooth()},[t.length]),n.o("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((s,o)=>n.o(n.k,{children:n.o("li",{class:"flex",children:n.M(s).with({type:"system"},a=>n.o("p",{class:is({variant:a.variant}),children:a.text})).with({type:"text",author:n.z.union("bot","user")},a=>{const l=a.author==="user"&&!t.slice(o+1).some(p=>p.type==="text"&&p.author==="user"),i=o===t.length-1,f=a.author==="bot"?es(a.text):a.text;return n.o(n.k,{children:[l?e:null,n.o(rs,{animate:i,side:as[a.author],children:f},o)]})}).with({type:"link"},a=>n.o(ns,{message:a})).with({type:"image"},a=>n.o("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:a.url,style:{aspectRatio:a.width/a.height}})).with({type:"file"},a=>n.o(qr,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const l=t[t.length-1];return!(a===l)||n.chatStore.isBotTyping$.value?null:n.o("div",{class:"flex flex-grow flex-col items-center justify-center",children:n.o(n.LoadingIndicator,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},o)),n.o(ss,{},"typing")]})},ls=({logger:e,apiClient:t,analytics:r,talentBankClient:s})=>{const{flow:o}=n.store.current$.value;n.invariant(o,"Flow is required to exist to show chatbot body");const a=n.store.viewState$.value,{chatRef:l,chatService:i}=n.useChatService(),{t:f}=n.useTranslation(),[p,C]=n.h();return n.y(()=>{a==="maximised"&&n.chatStore.scrollToEnd.instant()},[a]),n.y(()=>{var x,_;const{state:v,flow:h}=n.store.current$.peek();if(v!=="loaded")throw new Error(f("invalid_state"));let y=h.data.nodeHistory.at(-1);if(n.chatStore.scrollToEnd.instant(),n.store.setInput(void 0),h.data.isFinished)return;y===void 0?(y=n.getHeadOrThrow(o.nodes).id,n.store.setCurrentNodeId(y),r.log({event:"FLOW_START",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:h.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(x=o.analytics)==null?void 0:x.customProperties})):n.store.removeMessagesSentByNodeIds([y]);const{interpret:b,abort:E,undo:V}=ir({context:o.context,analytics:{service:r,customProperties:(_=o.analytics)==null?void 0:_.customProperties},apiClient:t,logger:e,talentBankClient:s,flow:o,chatService:i,t:f,getSubmissions:()=>{var I;return(I=n.store.current$.peek().flow)==null?void 0:I.data.submissions},onInterpret:I=>n.store.setCurrentNodeId(I.id),onFlowEnd:async()=>{var D;n.store.markAsFinished();const I=n.store.current$.peek().flow;n.invariant(I),r.log({event:"FLOW_END",properties:{flow_id:o.id,flow_version:o.version,flow_session_id:I.data.flowSessionId,flow_build:o.build,job:o.job},customProperties:(D=o.analytics)==null?void 0:D.customProperties})}});return C(()=>V),b(y),E},[r,t,i,e,o,s,f]),n.o(n.k,{children:[n.o("div",{ref:l,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:n.store.inputHeight$.value},children:n.o(os,{lastSentMessageFooter:o.data.isFinished||!p?null:n.o(us,{undoFn:p})})}),n.o(jn,{logger:e})]})},cs=e=>e.type==="identify"?[]:"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],us=({undoFn:e})=>{const{t}=n.useTranslation();return n.o(n.SvgIconButton,{onClick:async()=>{const{flow:r}=n.store.current$.peek();n.invariant(r);const{removed:s}=e(r.data.nodeHistory),o=r.data.nodeHistory.splice(-s);o.length!==0&&(n.store.removeMessagesSentByNodeIds(o),n.store.setInput(void 0),o.pop(),o.map(a=>r.nodes.find(l=>l.id===a)).filter(Boolean).flatMap(cs).forEach(a=>delete r.data.submissions[a]),n.store.current$.value={...n.store.current$.value})},children:[n.o("title",{children:t("undo")}),n.o("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"})]})};exports.ChatbotBody=ls;
|
package/dist/index-002c5e40.cjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";const Ct=require("@inploi/sdk");var W;function ta(t){return{lang:(t==null?void 0:t.lang)??(W==null?void 0:W.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(W==null?void 0:W.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(W==null?void 0:W.abortPipeEarly)}}var ce;function ea(t){return ce==null?void 0:ce.get(t)}var se;function ia(t){return se==null?void 0:se.get(t)}var de;function oa(t,e){var i;return(i=de==null?void 0:de.get(t))==null?void 0:i.get(e)}function Vi(t){var i,o;let e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&((o=(i=Object.getPrototypeOf(t))==null?void 0:i.constructor)==null?void 0:o.name))??"null":e}function Wt(t,e,i,o,a){let n=a&&"input"in a?a.input:i.value,r=(a==null?void 0:a.expected)??t.expects??null,l=(a==null?void 0:a.received)??Vi(n),s={kind:t.kind,type:t.type,input:n,expected:r,received:l,message:`Invalid ${e}: ${r?`Expected ${r} but r`:"R"}eceived ${l}`,requirement:t.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:o.lang,abortEarly:o.abortEarly,abortPipeEarly:o.abortPipeEarly},d=t.kind==="schema",u=(a==null?void 0:a.message)??t.message??oa(t.reference,s.lang)??(d?ia(s.lang):null)??o.message??ea(s.lang);u!==void 0&&(s.message=typeof u=="function"?u(s):u),d&&(i.typed=!1),i.issues?i.issues.push(s):i.issues=[s]}function zt(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},ta())}}}function aa(t,e,i){return typeof t.fallback=="function"?t.fallback(e,i):t.fallback}function Ye(t,e,i){return typeof t.default=="function"?t.default(e,i):t.default}function Wi(t,e){return{kind:"schema",type:"literal",reference:Wi,expects:Vi(t),async:!1,literal:t,message:e,get"~standard"(){return zt(this)},"~run"(i,o){return i.value===this.literal?i.typed=!0:Wt(this,"type",i,o),i}}}function $e(t,e){return{kind:"schema",type:"nullable",reference:$e,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return zt(this)},"~run"(i,o){return i.value===null&&(this.default!==void 0&&(i.value=Ye(this,i,o)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,o)}}}function Bt(t,e){return{kind:"schema",type:"object",reference:Bt,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return zt(this)},"~run"(i,o){var n;let a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(let r in this.entries){let l=this.entries[r];if(r in a||(l.type==="exact_optional"||l.type==="optional"||l.type==="nullish")&&l.default!==void 0){let s=r in a?a[r]:Ye(l),d=l["~run"]({value:s},o);if(d.issues){let u={type:"object",origin:"value",input:a,key:r,value:s};for(let c of d.issues)c.path?c.path.unshift(u):c.path=[u],(n=i.issues)==null||n.push(c);if(i.issues||(i.issues=d.issues),o.abortEarly){i.typed=!1;break}}d.typed||(i.typed=!1),i.value[r]=d.value}else if(l.fallback!==void 0)i.value[r]=aa(l);else if(l.type!=="exact_optional"&&l.type!=="optional"&&l.type!=="nullish"&&(Wt(this,"key",i,o,{input:void 0,expected:`"${r}"`,path:[{type:"object",origin:"key",input:a,key:r,value:a[r]}]}),o.abortEarly))break}}else Wt(this,"type",i,o);return i}}}function Se(t,e){return{kind:"schema",type:"optional",reference:Se,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return zt(this)},"~run"(i,o){return i.value===void 0&&(this.default!==void 0&&(i.value=Ye(this,i,o)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,o)}}}function Mt(t){return{kind:"schema",type:"string",reference:Mt,expects:"string",async:!1,message:t,get"~standard"(){return zt(this)},"~run"(e,i){return typeof e.value=="string"?e.typed=!0:Wt(this,"type",e,i),e}}}var Ke=(t,e)=>{if(e.length===0)return;let i=t;for(let o of e){if(i==null||typeof i!="object")return;i=i[o]}return i},na=t=>{let e={};for(let i in t){let o=t[i];o&&(e[i]=o.value)}return e},ra=({key:t,path:e,submissions:i,context:o})=>{if(t==="$context"){if(!e)return;let a=Ke(o,e);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.${e.join(".")}`,a);return}}return i[t]},la=t=>t<=1e3?`${Math.round(t)}KB`:t<1e3*10?`${(t/1e3).toFixed(1)}MB`:`${Math.round(t/1e3)}MB`,ca=t=>typeof t=="string"?t:`+${t.countryCode} ${t.phoneNumber}`;Bt({success:Wi(!0),integration_response:Bt({data:Bt({redirect_url:Mt(),message:Se($e(Mt())),button_text:Se($e(Mt()))})})});var sa=({context:t,schema:e,logger:i})=>{if(e)for(let o in e){let a=e[o];if(!a)continue;let n=Ke(t,o.split("."));if(a.required&&n==null){let r=`Configuration error in context: ${o} is required`;throw i.error(r),new Error(r)}if(n!=null)switch(a.type){case"number":if(typeof n!="number")throw new Error(`Configuration error in context: ${o} is not a number`);break;case"string":if(typeof n!="string")throw new Error(`Configuration error in context: ${o} is not a string`);break;default:a.type}}},It,h,Yi,Ki,rt,di,qi,Ee,Gi,ht={},Ji=[],da=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,te=Array.isArray;function G(t,e){for(var i in e)t[i]=e[i];return t}function Xi(t){var e=t.parentNode;e&&e.removeChild(t)}function M(t,e,i){var o,a,n,r={};for(n in e)n=="key"?o=e[n]:n=="ref"?a=e[n]:r[n]=e[n];if(arguments.length>2&&(r.children=arguments.length>3?It.call(arguments,2):i),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)r[n]===void 0&&(r[n]=t.defaultProps[n]);return kt(t,r,o,a,null)}function kt(t,e,i,o,a){var n={type:t,props:e,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Yi};return a==null&&h.vnode!=null&&h.vnode(n),n}function ua(){return{current:null}}function L(t){return t.children}function F(t,e){this.props=t,this.context=e}function Yt(t,e){if(e==null)return t.__?Yt(t.__,t.__.__k.indexOf(t)+1):null;for(var i;e<t.__k.length;e++)if((i=t.__k[e])!=null&&i.__e!=null)return i.__e;return typeof t.type=="function"?Yt(t):null}function Zi(t){var e,i;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((i=t.__k[e])!=null&&i.__e!=null){t.__e=t.__c.base=i.__e;break}return Zi(t)}}function Ce(t){(!t.__d&&(t.__d=!0)&&rt.push(t)&&!Kt.__r++||di!==h.debounceRendering)&&((di=h.debounceRendering)||qi)(Kt)}function Kt(){var t,e,i,o,a,n,r,l,s;for(rt.sort(Ee);t=rt.shift();)t.__d&&(e=rt.length,o=void 0,a=void 0,n=void 0,l=(r=(i=t).__v).__e,(s=i.__P)&&(o=[],a=[],(n=G({},r)).__v=r.__v+1,qe(s,r,n,i.__n,s.ownerSVGElement!==void 0,r.__h!=null?[l]:null,o,l??Yt(r),r.__h,a),io(o,r,a),r.__e!=l&&Zi(r)),rt.length>e&&rt.sort(Ee));Kt.__r=0}function Qi(t,e,i,o,a,n,r,l,s,d,u){var c,w,v,f,g,D,k,b,_,y,C=0,T=o&&o.__k||Ji,H=T.length,U=H,I=e.length;for(i.__k=[],c=0;c<I;c++)(f=i.__k[c]=(f=e[c])==null||typeof f=="boolean"||typeof f=="function"?null:typeof f=="string"||typeof f=="number"||typeof f=="bigint"?kt(null,f,null,null,f):te(f)?kt(L,{children:f},null,null,null):f.__b>0?kt(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null&&(f.__=i,f.__b=i.__b+1,(b=pa(f,T,k=c+C,U))===-1?v=ht:(v=T[b]||ht,T[b]=void 0,U--),qe(t,f,v,a,n,r,l,s,d,u),g=f.__e,(w=f.ref)&&v.ref!=w&&(v.ref&&Ge(v.ref,null,f),u.push(w,f.__c||g,f)),g!=null&&(D==null&&(D=g),y=!(_=v===ht||v.__v===null)&&b===k,_?b==-1&&C--:b!==k&&(b===k+1?(C++,y=!0):b>k?U>I-k?(C+=b-k,y=!0):C--:C=b<k&&b==k-1?b-k:0),k=c+C,y=y||b==c&&!_,typeof f.type!="function"||b===k&&v.__k!==f.__k?typeof f.type=="function"||y?f.__d!==void 0?(s=f.__d,f.__d=void 0):s=g.nextSibling:s=eo(t,g,s):s=to(f,s,t),typeof i.type=="function"&&(i.__d=s)));for(i.__e=D,c=H;c--;)T[c]!=null&&(typeof i.type=="function"&&T[c].__e!=null&&T[c].__e==i.__d&&(i.__d=T[c].__e.nextSibling),oo(T[c],T[c]))}function to(t,e,i){for(var o,a=t.__k,n=0;a&&n<a.length;n++)(o=a[n])&&(o.__=t,e=typeof o.type=="function"?to(o,e,i):eo(i,o.__e,e));return e}function X(t,e){return e=e||[],t==null||typeof t=="boolean"||(te(t)?t.some(function(i){X(i,e)}):e.push(t)),e}function eo(t,e,i){return i==null||i.parentNode!==t?t.insertBefore(e,null):e==i&&e.parentNode!=null||t.insertBefore(e,i),e.nextSibling}function pa(t,e,i,o){var a=t.key,n=t.type,r=i-1,l=i+1,s=e[i];if(s===null||s&&a==s.key&&n===s.type)return i;if(o>(s!=null?1:0))for(;r>=0||l<e.length;){if(r>=0){if((s=e[r])&&a==s.key&&n===s.type)return r;r--}if(l<e.length){if((s=e[l])&&a==s.key&&n===s.type)return l;l++}}return-1}function ha(t,e,i,o,a){var n;for(n in i)n==="children"||n==="key"||n in e||qt(t,n,null,i[n],o);for(n in e)a&&typeof e[n]!="function"||n==="children"||n==="key"||n==="value"||n==="checked"||i[n]===e[n]||qt(t,n,e[n],i[n],o)}function ui(t,e,i){e[0]==="-"?t.setProperty(e,i??""):t[e]=i==null?"":typeof i!="number"||da.test(e)?i:i+"px"}function qt(t,e,i,o,a){var n;t:if(e==="style")if(typeof i=="string")t.style.cssText=i;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)i&&e in i||ui(t.style,e,"");if(i)for(e in i)o&&i[e]===o[e]||ui(t.style,e,i[e])}else if(e[0]==="o"&&e[1]==="n")n=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=i,i?o||t.addEventListener(e,n?hi:pi,n):t.removeEventListener(e,n?hi:pi,n);else if(e!=="dangerouslySetInnerHTML"){if(a)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=i??"";break t}catch{}typeof i=="function"||(i==null||i===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,i))}}function pi(t){return this.l[t.type+!1](h.event?h.event(t):t)}function hi(t){return this.l[t.type+!0](h.event?h.event(t):t)}function qe(t,e,i,o,a,n,r,l,s,d){var u,c,w,v,f,g,D,k,b,_,y,C,T,H,U,I=e.type;if(e.constructor!==void 0)return null;i.__h!=null&&(s=i.__h,l=e.__e=i.__e,e.__h=null,n=[l]),(u=h.__b)&&u(e);try{t:if(typeof I=="function"){if(k=e.props,b=(u=I.contextType)&&o[u.__c],_=u?b?b.props.value:u.__:o,i.__c?D=(c=e.__c=i.__c).__=c.__E:("prototype"in I&&I.prototype.render?e.__c=c=new I(k,_):(e.__c=c=new F(k,_),c.constructor=I,c.render=wa),b&&b.sub(c),c.props=k,c.state||(c.state={}),c.context=_,c.__n=o,w=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),I.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=G({},c.__s)),G(c.__s,I.getDerivedStateFromProps(k,c.__s))),v=c.props,f=c.state,c.__v=e,w)I.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(I.getDerivedStateFromProps==null&&k!==v&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(k,_),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(k,c.__s,_)===!1||e.__v===i.__v)){for(e.__v!==i.__v&&(c.props=k,c.state=c.__s,c.__d=!1),e.__e=i.__e,e.__k=i.__k,e.__k.forEach(function(Nt){Nt&&(Nt.__=e)}),y=0;y<c._sb.length;y++)c.__h.push(c._sb[y]);c._sb=[],c.__h.length&&r.push(c);break t}c.componentWillUpdate!=null&&c.componentWillUpdate(k,c.__s,_),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(v,f,g)})}if(c.context=_,c.props=k,c.__P=t,c.__e=!1,C=h.__r,T=0,"prototype"in I&&I.prototype.render){for(c.state=c.__s,c.__d=!1,C&&C(e),u=c.render(c.props,c.state,c.context),H=0;H<c._sb.length;H++)c.__h.push(c._sb[H]);c._sb=[]}else do c.__d=!1,C&&C(e),u=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++T<25);c.state=c.__s,c.getChildContext!=null&&(o=G(G({},o),c.getChildContext())),w||c.getSnapshotBeforeUpdate==null||(g=c.getSnapshotBeforeUpdate(v,f)),Qi(t,te(U=u!=null&&u.type===L&&u.key==null?u.props.children:u)?U:[U],e,i,o,a,n,r,l,s,d),c.base=e.__e,e.__h=null,c.__h.length&&r.push(c),D&&(c.__E=c.__=null)}else n==null&&e.__v===i.__v?(e.__k=i.__k,e.__e=i.__e):e.__e=fa(i.__e,e,i,o,a,n,r,s,d);(u=h.diffed)&&u(e)}catch(Nt){e.__v=null,(s||n!=null)&&(e.__e=l,e.__h=!!s,n[n.indexOf(l)]=null),h.__e(Nt,e,i)}}function io(t,e,i){for(var o=0;o<i.length;o++)Ge(i[o],i[++o],i[++o]);h.__c&&h.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(n){n.call(a)})}catch(n){h.__e(n,a.__v)}})}function fa(t,e,i,o,a,n,r,l,s){var d,u,c,w=i.props,v=e.props,f=e.type,g=0;if(f==="svg"&&(a=!0),n!=null){for(;g<n.length;g++)if((d=n[g])&&"setAttribute"in d==!!f&&(f?d.localName===f:d.nodeType===3)){t=d,n[g]=null;break}}if(t==null){if(f===null)return document.createTextNode(v);t=a?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,v.is&&v),n=null,l=!1}if(f===null)w===v||l&&t.data===v||(t.data=v);else{if(n=n&&It.call(t.childNodes),u=(w=i.props||ht).dangerouslySetInnerHTML,c=v.dangerouslySetInnerHTML,!l){if(n!=null)for(w={},g=0;g<t.attributes.length;g++)w[t.attributes[g].name]=t.attributes[g].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===t.innerHTML)||(t.innerHTML=c&&c.__html||""))}if(ha(t,v,w,a,l),c)e.__k=[];else if(Qi(t,te(g=e.props.children)?g:[g],e,i,o,a&&f!=="foreignObject",n,r,n?n[0]:i.__k&&Yt(i,0),l,s),n!=null)for(g=n.length;g--;)n[g]!=null&&Xi(n[g]);l||("value"in v&&(g=v.value)!==void 0&&(g!==t.value||f==="progress"&&!g||f==="option"&&g!==w.value)&&qt(t,"value",g,w.value,!1),"checked"in v&&(g=v.checked)!==void 0&&g!==t.checked&&qt(t,"checked",g,w.checked,!1))}return t}function Ge(t,e,i){try{typeof t=="function"?t(e):t.current=e}catch(o){h.__e(o,i)}}function oo(t,e,i){var o,a;if(h.unmount&&h.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||Ge(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(n){h.__e(n,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(a=0;a<o.length;a++)o[a]&&oo(o[a],e,i||typeof t.type!="function");i||t.__e==null||Xi(t.__e),t.__=t.__e=t.__d=void 0}function wa(t,e,i){return this.constructor(t,i)}function dt(t,e,i){var o,a,n,r;h.__&&h.__(t,e),a=(o=typeof i=="function")?null:i&&i.__k||e.__k,n=[],r=[],qe(e,t=(!o&&i||e).__k=M(L,null,[t]),a||ht,ht,e.ownerSVGElement!==void 0,!o&&i?[i]:a?null:e.firstChild?It.call(e.childNodes):null,n,!o&&i?i:a?a.__e:e.firstChild,o,r),io(n,t,r)}function ao(t,e){dt(t,e,ao)}function va(t,e,i){var o,a,n,r,l=G({},t.props);for(n in t.type&&t.type.defaultProps&&(r=t.type.defaultProps),e)n=="key"?o=e[n]:n=="ref"?a=e[n]:l[n]=e[n]===void 0&&r!==void 0?r[n]:e[n];return arguments.length>2&&(l.children=arguments.length>3?It.call(arguments,2):i),kt(t.type,l,o||t.key,a||t.ref,null)}function no(t,e){var i={__c:e="__cC"+Gi++,__:t,Consumer:function(o,a){return o.children(a)},Provider:function(o){var a,n;return this.getChildContext||(a=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(r){this.props.value!==r.value&&a.some(function(l){l.__e=!0,Ce(l)})},this.sub=function(r){a.push(r);var l=r.componentWillUnmount;r.componentWillUnmount=function(){a.splice(a.indexOf(r),1),l&&l.call(r)}}),o.children}};return i.Provider.__=i.Consumer.contextType=i}It=Ji.slice,h={__e:function(t,e,i,o){for(var a,n,r;e=e.__;)if((a=e.__c)&&!a.__)try{if((n=a.constructor)&&n.getDerivedStateFromError!=null&&(a.setState(n.getDerivedStateFromError(t)),r=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(t,o||{}),r=a.__d),r)return a.__E=a}catch(l){t=l}throw t}},Yi=0,Ki=function(t){return t!=null&&t.constructor===void 0},F.prototype.setState=function(t,e){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=G({},this.state),typeof t=="function"&&(t=t(G({},i),this.props)),t&&G(i,t),t!=null&&this.__v&&(e&&this._sb.push(e),Ce(this))},F.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ce(this))},F.prototype.render=L,rt=[],qi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ee=function(t,e){return t.__v.__b-e.__v.__b},Kt.__r=0,Gi=0;function ro(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(i=ro(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function ee(){for(var t,e,i=0,o="",a=arguments.length;i<a;i++)(t=arguments[i])&&(e=ro(t))&&(o&&(o+=" "),o+=e);return o}const fi=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,wi=ee,ie=(t,e)=>i=>{var o;if((e==null?void 0:e.variants)==null)return wi(t,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:a,defaultVariants:n}=e,r=Object.keys(a).map(d=>{const u=i==null?void 0:i[d],c=n==null?void 0:n[d];if(u===null)return null;const w=fi(u)||fi(c);return a[d][w]}),l=i&&Object.entries(i).reduce((d,u)=>{let[c,w]=u;return w===void 0||(d[c]=w),d},{}),s=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((d,u)=>{let{class:c,className:w,...v}=u;return Object.entries(v).every(f=>{let[g,D]=f;return Array.isArray(D)?D.includes({...n,...l}[g]):{...n,...l}[g]===D})?[...d,c,w]:d},[]);return wi(t,r,s,i==null?void 0:i.class,i==null?void 0:i.className)};var ot,E,ue,vi,wt=0,lo=[],Ft=[],gi=h.__b,bi=h.__r,_i=h.diffed,mi=h.__c,yi=h.unmount;function vt(t,e){h.__h&&h.__h(E,t,wt||e),wt=0;var i=E.__H||(E.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:Ft}),i.__[t]}function Je(t){return wt=1,co(uo,t)}function co(t,e,i){var o=vt(ot++,2);if(o.t=t,!o.__c&&(o.__=[i?i(e):uo(void 0,e),function(l){var s=o.__N?o.__N[0]:o.__[0],d=o.t(s,l);s!==d&&(o.__N=[d,o.__[1]],o.__c.setState({}))}],o.__c=E,!E.u)){var a=function(l,s,d){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(w){return w.__c});if(u.every(function(w){return!w.__N}))return!n||n.call(this,l,s,d);var c=!1;return u.forEach(function(w){if(w.__N){var v=w.__[0];w.__=w.__N,w.__N=void 0,v!==w.__[0]&&(c=!0)}}),!(!c&&o.__c.props===l)&&(!n||n.call(this,l,s,d))};E.u=!0;var n=E.shouldComponentUpdate,r=E.componentWillUpdate;E.componentWillUpdate=function(l,s,d){if(this.__e){var u=n;n=void 0,a(l,s,d),n=u}r&&r.call(this,l,s,d)},E.shouldComponentUpdate=a}return o.__N||o.__}function Xe(t,e){var i=vt(ot++,3);!h.__s&&Ze(i.__H,e)&&(i.__=t,i.i=e,E.__H.__h.push(i))}function pt(t,e){var i=vt(ot++,4);!h.__s&&Ze(i.__H,e)&&(i.__=t,i.i=e,E.__h.push(i))}function jt(t){return wt=5,nt(function(){return{current:t}},[])}function ga(t,e,i){wt=6,pt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},i==null?i:i.concat(t))}function nt(t,e){var i=vt(ot++,7);return Ze(i.__H,e)?(i.__V=t(),i.i=e,i.__h=t,i.__V):i.__}function ba(t,e){return wt=8,nt(function(){return t},e)}function so(t){var e=E.context[t.__c],i=vt(ot++,9);return i.c=t,e?(i.__==null&&(i.__=!0,e.sub(E)),e.props.value):t.__}function _a(t,e){h.useDebugValue&&h.useDebugValue(e?e(t):t)}function ma(){var t=vt(ot++,11);if(!t.__){for(var e=E.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var i=e.__m||(e.__m=[0,0]);t.__="P"+i[0]+"-"+i[1]++}return t.__}function ya(){for(var t;t=lo.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Lt),t.__H.__h.forEach(Pe),t.__H.__h=[]}catch(e){t.__H.__h=[],h.__e(e,t.__v)}}h.__b=function(t){E=null,gi&&gi(t)},h.__r=function(t){bi&&bi(t),ot=0;var e=(E=t.__c).__H;e&&(ue===E?(e.__h=[],E.__h=[],e.__.forEach(function(i){i.__N&&(i.__=i.__N),i.__V=Ft,i.__N=i.i=void 0})):(e.__h.forEach(Lt),e.__h.forEach(Pe),e.__h=[],ot=0)),ue=E},h.diffed=function(t){_i&&_i(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(lo.push(e)!==1&&vi===h.requestAnimationFrame||((vi=h.requestAnimationFrame)||xa)(ya)),e.__H.__.forEach(function(i){i.i&&(i.__H=i.i),i.__V!==Ft&&(i.__=i.__V),i.i=void 0,i.__V=Ft})),ue=E=null},h.__c=function(t,e){e.some(function(i){try{i.__h.forEach(Lt),i.__h=i.__h.filter(function(o){return!o.__||Pe(o)})}catch(o){e.some(function(a){a.__h&&(a.__h=[])}),e=[],h.__e(o,i.__v)}}),mi&&mi(t,e)},h.unmount=function(t){yi&&yi(t);var e,i=t.__c;i&&i.__H&&(i.__H.__.forEach(function(o){try{Lt(o)}catch(a){e=a}}),i.__H=void 0,e&&h.__e(e,i.__v))};var xi=typeof requestAnimationFrame=="function";function xa(t){var e,i=function(){clearTimeout(o),xi&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(i,100);xi&&(e=requestAnimationFrame(i))}function Lt(t){var e=E,i=t.__c;typeof i=="function"&&(t.__c=void 0,i()),E=e}function Pe(t){var e=E;t.__c=t.__(),E=e}function Ze(t,e){return!t||t.length!==e.length||e.some(function(i,o){return i!==t[o]})}function uo(t,e){return typeof e=="function"?e(t):e}function po(t,e){for(var i in e)t[i]=e[i];return t}function Te(t,e){for(var i in t)if(i!=="__source"&&!(i in e))return!0;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return!0;return!1}function pe(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function Oe(t){this.props=t}function ka(t,e){function i(a){var n=this.props.ref,r=n==a.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,a)||!r:Te(this.props,a)}function o(a){return this.shouldComponentUpdate=i,M(t,a)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Oe.prototype=new F).isPureReactComponent=!0,Oe.prototype.shouldComponentUpdate=function(t,e){return Te(this.props,t)||Te(this.state,e)};var ki=h.__b;h.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ki&&ki(t)};var $a=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ho(t){function e(i){var o=po({},i);return delete o.ref,t(o,i.ref||null)}return e.$$typeof=$a,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var $i=function(t,e){return t==null?null:X(X(t).map(e))},Sa={map:$i,forEach:$i,count:function(t){return t?X(t).length:0},only:function(t){var e=X(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:X},Ea=h.__e;h.__e=function(t,e,i,o){if(t.then){for(var a,n=e;n=n.__;)if((a=n.__c)&&a.__c)return e.__e==null&&(e.__e=i.__e,e.__k=i.__k),a.__c(t,e)}Ea(t,e,i,o)};var Si=h.unmount;function fo(t,e,i){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),t.__c.__H=null),(t=po({},t)).__c!=null&&(t.__c.__P===i&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(o){return fo(o,e,i)})),t}function wo(t,e,i){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return wo(o,e,i)}),t.__c&&t.__c.__P===e&&(t.__e&&i.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=i)),t}function $t(){this.__u=0,this.t=null,this.__b=null}function vo(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function go(t){var e,i,o;function a(n){if(e||(e=t()).then(function(r){i=r.default||r},function(r){o=r}),o)throw o;if(!i)throw e;return M(i,n)}return a.displayName="Lazy",a.__f=!0,a}function yt(){this.u=null,this.o=null}h.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Si&&Si(t)},($t.prototype=new F).__c=function(t,e){var i=e.__c,o=this;o.t==null&&(o.t=[]),o.t.push(i);var a=vo(o.__v),n=!1,r=function(){n||(n=!0,i.__R=null,a?a(l):l())};i.__R=r;var l=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=wo(d,d.__c.__P,d.__c.__O)}var u;for(o.setState({__a:o.__b=null});u=o.t.pop();)u.forceUpdate()}},s=e.__h===!0;o.__u++||s||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(r,r)},$t.prototype.componentWillUnmount=function(){this.t=[]},$t.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=fo(this.__b,i,o.__O=o.__P)}this.__b=null}var a=e.__a&&M(L,null,t.fallback);return a&&(a.__h=null),[M(L,null,e.__a?null:t.children),a]};var Ei=function(t,e,i){if(++i[1]===i[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(i=t.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;t.u=i=i[2]}};function Ca(t){return this.getChildContext=function(){return t.context},t.children}function Pa(t){var e=this,i=t.i;e.componentWillUnmount=function(){dt(null,e.l),e.l=null,e.i=null},e.i&&e.i!==i&&e.componentWillUnmount(),t.__v?(e.l||(e.i=i,e.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(o){this.childNodes.push(o),e.i.appendChild(o)},insertBefore:function(o,a){this.childNodes.push(o),e.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),e.i.removeChild(o)}}),dt(M(Ca,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Ta(t,e){var i=M(Pa,{__v:t,i:e});return i.containerInfo=e,i}(yt.prototype=new F).__a=function(t){var e=this,i=vo(e.__v),o=e.o.get(t);return o[0]++,function(a){var n=function(){e.props.revealOrder?(o.push(a),Ei(e,t,o)):a()};i?i(n):n()}},yt.prototype.render=function(t){this.u=null,this.o=new Map;var e=X(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var i=e.length;i--;)this.o.set(e[i],this.u=[1,0,this.u]);return t.children},yt.prototype.componentDidUpdate=yt.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,i){Ei(t,i,e)})};var bo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Oa=/^(?: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]/,za=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ia=/[A-Z0-9]/g,ja=typeof document<"u",Da=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Na(t,e,i){return e.__k==null&&(e.textContent=""),dt(t,e),typeof i=="function"&&i(),t?t.__c:null}function Aa(t,e,i){return ao(t,e),typeof i=="function"&&i(),t?t.__c:null}F.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(F.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ci=h.event;function Ba(){}function Ma(){return this.cancelBubble}function Fa(){return this.defaultPrevented}h.event=function(t){return Ci&&(t=Ci(t)),t.persist=Ba,t.isPropagationStopped=Ma,t.isDefaultPrevented=Fa,t.nativeEvent=t};var Qe,La={enumerable:!1,configurable:!0,get:function(){return this.class}},Pi=h.vnode;h.vnode=function(t){typeof t.type=="string"&&function(e){var i=e.props,o=e.type,a={};for(var n in i){var r=i[n];if(!(n==="value"&&"defaultValue"in i&&r==null||ja&&n==="children"&&o==="noscript"||n==="class"||n==="className")){var l=n.toLowerCase();n==="defaultValue"&&"value"in i&&i.value==null?n="value":n==="download"&&r===!0?r="":l==="ondoubleclick"?n="ondblclick":l!=="onchange"||o!=="input"&&o!=="textarea"||Da(i.type)?l==="onfocus"?n="onfocusin":l==="onblur"?n="onfocusout":za.test(n)?n=l:o.indexOf("-")===-1&&Oa.test(n)?n=n.replace(Ia,"-$&").toLowerCase():r===null&&(r=void 0):l=n="oninput",l==="oninput"&&a[n=l]&&(n="oninputCapture"),a[n]=r}}o=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=X(i.children).forEach(function(s){s.props.selected=a.value.indexOf(s.props.value)!=-1})),o=="select"&&a.defaultValue!=null&&(a.value=X(i.children).forEach(function(s){s.props.selected=a.multiple?a.defaultValue.indexOf(s.props.value)!=-1:a.defaultValue==s.props.value})),i.class&&!i.className?(a.class=i.class,Object.defineProperty(a,"className",La)):(i.className&&!i.class||i.class&&i.className)&&(a.class=a.className=i.className),e.props=a}(t),t.$$typeof=bo,Pi&&Pi(t)};var Ti=h.__r;h.__r=function(t){Ti&&Ti(t),Qe=t.__c};var Oi=h.diffed;h.diffed=function(t){Oi&&Oi(t);var e=t.props,i=t.__e;i!=null&&t.type==="textarea"&&"value"in e&&e.value!==i.value&&(i.value=e.value==null?"":e.value),Qe=null};var Ha={ReactCurrentDispatcher:{current:{readContext:function(t){return Qe.__n[t.__c].props.value}}}};function Ua(t){return M.bind(null,t)}function _o(t){return!!t&&t.$$typeof===bo}function Ra(t){return _o(t)?va.apply(null,arguments):t}function Va(t){return!!t.__k&&(dt(null,t),!0)}function Wa(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ya=function(t,e){return t(e)},Ka=function(t,e){return t(e)},qa=L;function mo(t){t()}function Ga(t){return t}function Ja(){return[!1,mo]}var Xa=pt;function Za(t,e){var i=e(),o=Je({h:{__:i,v:e}}),a=o[0].h,n=o[1];return pt(function(){a.__=i,a.v=e,pe(a.__,e())||n({h:a})},[t,i,e]),Xe(function(){return pe(a.__,a.v())||n({h:a}),t(function(){pe(a.__,a.v())||n({h:a})})},[t]),i}var Qa={useState:Je,useId:ma,useReducer:co,useEffect:Xe,useLayoutEffect:pt,useInsertionEffect:Xa,useTransition:Ja,useDeferredValue:Ga,useSyncExternalStore:Za,startTransition:mo,useRef:jt,useImperativeHandle:ga,useMemo:nt,useCallback:ba,useContext:so,useDebugValue:_a,version:"17.0.2",Children:Sa,render:Na,hydrate:Aa,unmountComponentAtNode:Va,createPortal:Ta,createElement:M,createContext:no,createFactory:Ua,cloneElement:Ra,createRef:ua,Fragment:L,isValidElement:_o,findDOMNode:Wa,Component:F,PureComponent:Oe,memo:ka,forwardRef:ho,flushSync:Ka,unstable_batchedUpdates:Ya,StrictMode:qa,Suspense:$t,SuspenseList:yt,lazy:go,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ha};const A=Symbol.for("@ts-pattern/matcher"),yo=Symbol.for("@ts-pattern/isVariadic"),Gt="@ts-pattern/anonymous-select-key",ze=t=>!!(t&&typeof t=="object"),Ht=t=>t&&!!t[A],P=(t,e,i)=>{if(Ht(t)){const o=t[A](),{matched:a,selections:n}=o.match(e);return a&&n&&Object.keys(n).forEach(r=>i(r,n[r])),a}if(ze(t)){if(!ze(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let o=[],a=[],n=[];for(const r of t.keys()){const l=t[r];Ht(l)&&l[yo]?n.push(l):n.length?a.push(l):o.push(l)}if(n.length){if(n.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<o.length+a.length)return!1;const r=e.slice(0,o.length),l=a.length===0?[]:e.slice(-a.length),s=e.slice(o.length,a.length===0?1/0:-a.length);return o.every((d,u)=>P(d,r[u],i))&&a.every((d,u)=>P(d,l[u],i))&&(n.length===0||P(n[0],s,i))}return t.length===e.length&&t.every((r,l)=>P(r,e[l],i))}return Reflect.ownKeys(t).every(o=>{const a=t[o];return(o in e||Ht(n=a)&&n[A]().matcherType==="optional")&&P(a,e[o],i);var n})}return Object.is(e,t)},N=t=>{var e,i,o;return ze(t)?Ht(t)?(e=(i=(o=t[A]()).getSelectionKeys)==null?void 0:i.call(o))!=null?e:[]:Array.isArray(t)?Pt(t,N):Pt(Object.values(t),N):[]},Pt=(t,e)=>t.reduce((i,o)=>i.concat(e(o)),[]);function tn(...t){if(t.length===1){const[e]=t;return i=>P(e,i,()=>{})}if(t.length===2){const[e,i]=t;return P(e,i,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function O(t){return Object.assign(t,{optional:()=>ti(t),and:e=>S(t,e),or:e=>xo(t,e),select:e=>e===void 0?Tt(t):Tt(e,t)})}function Ie(t){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let i=0;const o=[{value:Object.assign(e,{[yo]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var a;return(a=o[i++])!=null?a:o.at(-1)}}}}))(t),{optional:()=>Ie(ti(t)),select:e=>Ie(e===void 0?Tt(t):Tt(e,t))})}function ti(t){return O({[A]:()=>({match:e=>{let i={};const o=(a,n)=>{i[a]=n};return e===void 0?(N(t).forEach(a=>o(a,void 0)),{matched:!0,selections:i}):{matched:P(t,e,o),selections:i}},getSelectionKeys:()=>N(t),matcherType:"optional"})})}const en=(t,e)=>{for(const i of t)if(!e(i))return!1;return!0},on=(t,e)=>{for(const[i,o]of t.entries())if(!e(o,i))return!1;return!0},an=(t,e)=>{const i=Reflect.ownKeys(t);for(const o of i)if(!e(o,t[o]))return!1;return!0};function S(...t){return O({[A]:()=>({match:e=>{let i={};const o=(a,n)=>{i[a]=n};return{matched:t.every(a=>P(a,e,o)),selections:i}},getSelectionKeys:()=>Pt(t,N),matcherType:"and"})})}function xo(...t){return O({[A]:()=>({match:e=>{let i={};const o=(a,n)=>{i[a]=n};return Pt(t,N).forEach(a=>o(a,void 0)),{matched:t.some(a=>P(a,e,o)),selections:i}},getSelectionKeys:()=>Pt(t,N),matcherType:"or"})})}function m(t){return{[A]:()=>({match:e=>({matched:!!t(e)})})}}function Tt(...t){const e=typeof t[0]=="string"?t[0]:void 0,i=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return O({[A]:()=>({match:o=>{let a={[e??Gt]:o};return{matched:i===void 0||P(i,o,(n,r)=>{a[n]=r}),selections:a}},getSelectionKeys:()=>[e??Gt].concat(i===void 0?[]:N(i))})})}function ko(t){return!0}function R(t){return typeof t=="number"}function Z(t){return typeof t=="string"}function Q(t){return typeof t=="bigint"}const $o=O(m(ko)),nn=O(m(ko)),rn=$o,tt=t=>Object.assign(O(t),{startsWith:e=>{return tt(S(t,(i=e,m(o=>Z(o)&&o.startsWith(i)))));var i},endsWith:e=>{return tt(S(t,(i=e,m(o=>Z(o)&&o.endsWith(i)))));var i},minLength:e=>tt(S(t,(i=>m(o=>Z(o)&&o.length>=i))(e))),length:e=>tt(S(t,(i=>m(o=>Z(o)&&o.length===i))(e))),maxLength:e=>tt(S(t,(i=>m(o=>Z(o)&&o.length<=i))(e))),includes:e=>{return tt(S(t,(i=e,m(o=>Z(o)&&o.includes(i)))));var i},regex:e=>{return tt(S(t,(i=e,m(o=>Z(o)&&!!o.match(i)))));var i}}),zi=tt(m(Z)),V=t=>Object.assign(O(t),{between:(e,i)=>V(S(t,((o,a)=>m(n=>R(n)&&o<=n&&a>=n))(e,i))),lt:e=>V(S(t,(i=>m(o=>R(o)&&o<i))(e))),gt:e=>V(S(t,(i=>m(o=>R(o)&&o>i))(e))),lte:e=>V(S(t,(i=>m(o=>R(o)&&o<=i))(e))),gte:e=>V(S(t,(i=>m(o=>R(o)&&o>=i))(e))),int:()=>V(S(t,m(e=>R(e)&&Number.isInteger(e)))),finite:()=>V(S(t,m(e=>R(e)&&Number.isFinite(e)))),positive:()=>V(S(t,m(e=>R(e)&&e>0))),negative:()=>V(S(t,m(e=>R(e)&&e<0)))}),ln=V(m(R)),et=t=>Object.assign(O(t),{between:(e,i)=>et(S(t,((o,a)=>m(n=>Q(n)&&o<=n&&a>=n))(e,i))),lt:e=>et(S(t,(i=>m(o=>Q(o)&&o<i))(e))),gt:e=>et(S(t,(i=>m(o=>Q(o)&&o>i))(e))),lte:e=>et(S(t,(i=>m(o=>Q(o)&&o<=i))(e))),gte:e=>et(S(t,(i=>m(o=>Q(o)&&o>=i))(e))),positive:()=>et(S(t,m(e=>Q(e)&&e>0))),negative:()=>et(S(t,m(e=>Q(e)&&e<0)))}),cn=et(m(Q)),sn=O(m(function(t){return typeof t=="boolean"})),dn=O(m(function(t){return typeof t=="symbol"})),un=O(m(function(t){return t==null})),pn=O(m(function(t){return t!=null}));var xt={__proto__:null,matcher:A,optional:ti,array:function(...t){return Ie({[A]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const i=t[0];let o={};if(e.length===0)return N(i).forEach(n=>{o[n]=[]}),{matched:!0,selections:o};const a=(n,r)=>{o[n]=(o[n]||[]).concat([r])};return{matched:e.every(n=>P(i,n,a)),selections:o}},getSelectionKeys:()=>t.length===0?[]:N(t[0])})})},set:function(...t){return O({[A]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let i={};if(e.size===0)return{matched:!0,selections:i};if(t.length===0)return{matched:!0};const o=(n,r)=>{i[n]=(i[n]||[]).concat([r])},a=t[0];return{matched:en(e,n=>P(a,n,o)),selections:i}},getSelectionKeys:()=>t.length===0?[]:N(t[0])})})},map:function(...t){return O({[A]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let i={};if(e.size===0)return{matched:!0,selections:i};const o=(l,s)=>{i[l]=(i[l]||[]).concat([s])};if(t.length===0)return{matched:!0};var a;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(a=t[0])==null?void 0:a.toString()}`);const[n,r]=t;return{matched:on(e,(l,s)=>{const d=P(n,s,o),u=P(r,l,o);return d&&u}),selections:i}},getSelectionKeys:()=>t.length===0?[]:[...N(t[0]),...N(t[1])]})})},record:function(...t){return O({[A]:()=>({match:e=>{if(e===null||typeof e!="object"||Array.isArray(e))return{matched:!1};var i;if(t.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(i=t[0])==null?void 0:i.toString()}`);let o={};const a=(l,s)=>{o[l]=(o[l]||[]).concat([s])},[n,r]=t.length===1?[zi,t[0]]:t;return{matched:an(e,(l,s)=>{const d=typeof l!="string"||Number.isNaN(Number(l))?null:Number(l),u=d!==null&&P(n,d,a),c=P(n,l,a),w=P(r,s,a);return(c||u)&&w}),selections:o}},getSelectionKeys:()=>t.length===0?[]:[...N(t[0]),...N(t[1])]})})},intersection:S,union:xo,not:function(t){return O({[A]:()=>({match:e=>({matched:!P(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:m,select:Tt,any:$o,unknown:nn,_:rn,string:zi,number:ln,bigint:cn,boolean:sn,symbol:dn,nullish:un,nonNullable:pn,instanceOf:function(t){return O(m(function(e){return i=>i instanceof e}(t)))},shape:function(t){return O(m(tn(t)))}};class hn extends Error{constructor(e){let i;try{i=JSON.stringify(e)}catch{i=e}super(`Pattern matching error: no pattern matches value ${i}`),this.input=void 0,this.input=e}}const je={matched:!1,value:void 0};function oe(t){return new Jt(t,je)}class Jt{constructor(e,i){this.input=void 0,this.state=void 0,this.input=e,this.state=i}with(...e){if(this.state.matched)return this;const i=e[e.length-1],o=[e[0]];let a;e.length===3&&typeof e[1]=="function"?a=e[1]:e.length>2&&o.push(...e.slice(1,e.length-1));let n=!1,r={};const l=(d,u)=>{n=!0,r[d]=u},s=!o.some(d=>P(d,this.input,l))||a&&!a(this.input)?je:{matched:!0,value:i(n?Gt in r?r[Gt]:r:this.input,this.input)};return new Jt(this.input,s)}when(e,i){if(this.state.matched)return this;const o=!!e(this.input);return new Jt(this.input,o?{matched:!0,value:i(this.input,this.input)}:je)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=fn){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function fn(t){throw new hn(t)}var wn=["other","few","many","two","one","zero"],Ii=({terms:t,overrides:e,locale:i})=>{const o=new Intl.PluralRules(i);function a(n,r){const l=(e==null?void 0:e[n])??t[n];switch(typeof l){case"string":return l.replace(/{{(\w+)}}/g,(s,d)=>{var u;return((u=r==null?void 0:r[d])==null?void 0:u.toString())??""});case"object":{if(typeof(r==null?void 0:r.count)!="number")throw new Error(`Missing count for translation key “${n.toString()}”`);let s=o.select(r.count);if(!(s in l)){const d=wn.find(u=>u in l);if(!d)throw new Error(`Missing plural rule for translation key “${n.toString()}”`);s=d}return l[s].replace(/{{(\w+)}}/g,(d,u)=>{var c;return((c=r==null?void 0:r[u])==null?void 0:c.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${n.toString()}”.`)}}return a},vn=0;function p(t,e,i,o,a,n){var r,l,s={};for(l in e)l=="ref"?r=e[l]:s[l]=e[l];var d={type:t,props:s,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--vn,__source:a,__self:n};if(typeof t=="function"&&(r=t.defaultProps))for(l in r)s[l]===void 0&&(s[l]=r[l]);return h.vnode&&h.vnode(d),d}var ji=no(null),So=t=>({defaultTerms:t,TranslationProvider:({terms:e,children:i,locale:o})=>{const a=nt(()=>Ii({locale:o,terms:t,overrides:e}),[e,o]);return p(ji.Provider,{value:{t:a,locale:o},children:i})},useTranslation:()=>{const e=so(ji);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:i})=>Ii({terms:t,overrides:e,locale:i})}),{TranslationProvider:Or,useTranslation:zr,createTFunction:Ir,defaultTerms:gn}=So({submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",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_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_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:bn,useTranslation:ae,createTFunction:_n}=So({...gn,error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",maximize:"Maximise",minimize:"Minimise"});function ei(t,e){if(!t)throw new Error(e)}var De=t=>t===null||typeof t!="object"?t:Array.isArray(t)?t.map(De):Object.keys(t).sort().reduce((e,i)=>(e[i]=De(t[i]),e),{}),mn=t=>{let e=JSON.stringify(De(t)),i=5381;for(let o=0;o<e.length;o++)i=i*33^e.charCodeAt(o);return(i>>>0).toString(36)},yn=Symbol.for("preact-signals");function ii(){if(ft>1)ft--;else{for(var t,e=!1;St!==void 0;){var i=St;for(St=void 0,Ne++;i!==void 0;){var o=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&Co(i))try{i.c()}catch(a){e||(t=a,e=!0)}i=o}}if(Ne=0,ft--,e)throw t}}var $=void 0,St=void 0,ft=0,Ne=0,Xt=0;function Eo(t){if($!==void 0){var e=t.n;if(e===void 0||e.t!==$)return e={i:0,S:t,p:$.s,n:void 0,t:$,e:void 0,x:void 0,r:e},$.s!==void 0&&($.s.n=e),$.s=e,t.n=e,32&$.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=$.s,e.n=void 0,$.s.n=e,$.s=e),e}}function j(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}j.prototype.brand=yn;j.prototype.h=function(){return!0};j.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};j.prototype.U=function(t){if(this.t!==void 0){var e=t.e,i=t.x;e!==void 0&&(e.x=i,t.e=void 0),i!==void 0&&(i.e=e,t.x=void 0),t===this.t&&(this.t=i)}};j.prototype.subscribe=function(t){var e=this;return ai(function(){var i=e.value,o=$;$=void 0;try{t(i)}finally{$=o}})};j.prototype.valueOf=function(){return this.value};j.prototype.toString=function(){return this.value+""};j.prototype.toJSON=function(){return this.value};j.prototype.peek=function(){var t=$;$=void 0;try{return this.value}finally{$=t}};Object.defineProperty(j.prototype,"value",{get:function(){var t=Eo(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Ne>100)throw new Error("Cycle detected");this.v=t,this.i++,Xt++,ft++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ii()}}}});function at(t){return new j(t)}function Co(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Po(t){for(var e=t.s;e!==void 0;e=e.n){var i=e.S.n;if(i!==void 0&&(e.r=i),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function To(t){for(var e=t.s,i=void 0;e!==void 0;){var o=e.p;e.i===-1?(e.S.U(e),o!==void 0&&(o.n=e.n),e.n!==void 0&&(e.n.p=o)):i=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=o}t.s=i}function gt(t){j.call(this,void 0),this.x=t,this.s=void 0,this.g=Xt-1,this.f=4}(gt.prototype=new j).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Xt))return!0;if(this.g=Xt,this.f|=1,this.i>0&&!Co(this))return this.f&=-2,!0;var t=$;try{Po(this),$=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return $=t,To(this),this.f&=-2,!0};gt.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}j.prototype.S.call(this,t)};gt.prototype.U=function(t){if(this.t!==void 0&&(j.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};gt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(gt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Eo(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function xn(t){return new gt(t)}function Oo(t){var e=t.u;if(t.u=void 0,typeof e=="function"){ft++;var i=$;$=void 0;try{e()}catch(o){throw t.f&=-2,t.f|=8,oi(t),o}finally{$=i,ii()}}}function oi(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Oo(t)}function kn(t){if($!==this)throw new Error("Out-of-order effect");To(this),$=t,this.f&=-2,8&this.f&&oi(this),ii()}function Dt(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Dt.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};Dt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Oo(this),Po(this),ft++;var t=$;return $=this,kn.bind(this,t)};Dt.prototype.N=function(){2&this.f||(this.f|=2,this.o=St,St=this)};Dt.prototype.d=function(){this.f|=8,1&this.f||oi(this)};function ai(t){var e=new Dt(t);try{e.c()}catch(i){throw e.d(),i}return e.d.bind(e)}var he;function bt(t,e){h[t]=e.bind(null,h[t]||function(){})}function Zt(t){he&&he(),he=t&&t.S()}function zo(t){var e=this,i=t.data,o=Sn(i);o.value=i;var a=nt(function(){for(var n=e.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}return e.__$u.c=function(){var r;!Ki(a.peek())&&((r=e.base)==null?void 0:r.nodeType)===3?e.base.data=a.peek():(e.__$f|=1,e.setState({}))},xn(function(){var r=o.value.value;return r===0?0:r===!0?"":r||""})},[]);return a.value}zo.displayName="_st";Object.defineProperties(j.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:zo},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});bt("__b",function(t,e){if(typeof e.type=="string"){var i,o=e.props;for(var a in o)if(a!=="children"){var n=o[a];n instanceof j&&(i||(e.__np=i={}),i[a]=n,o[a]=n.peek())}}t(e)});bt("__r",function(t,e){Zt();var i,o=e.__c;o&&(o.__$f&=-2,(i=o.__$u)===void 0&&(o.__$u=i=function(a){var n;return ai(function(){n=this}),n.c=function(){o.__$f|=1,o.setState({})},n}())),Zt(i),t(e)});bt("__e",function(t,e,i,o){Zt(),t(e,i,o)});bt("diffed",function(t,e){Zt();var i;if(typeof e.type=="string"&&(i=e.__e)){var o=e.__np,a=e.props;if(o){var n=i.U;if(n)for(var r in n){var l=n[r];l!==void 0&&!(r in o)&&(l.d(),n[r]=void 0)}else i.U=n={};for(var s in o){var d=n[s],u=o[s];d===void 0?(d=$n(i,s,u,a),n[s]=d):d.o(u,a)}}}t(e)});function $n(t,e,i,o){var a=e in t&&t.ownerSVGElement===void 0,n=at(i);return{o:function(r,l){n.value=r,o=l},d:ai(function(){var r=n.value.value;o[e]!==r&&(o[e]=r,a?t[e]=r:r?t.setAttribute(e,r):t.removeAttribute(e))})}}bt("unmount",function(t,e){if(typeof e.type=="string"){var i=e.__e;if(i){var o=i.U;if(o){i.U=void 0;for(var a in o){var n=o[a];n&&n.d()}}}}else{var r=e.__c;if(r){var l=r.__$u;l&&(r.__$u=void 0,l.d())}}t(e)});bt("__h",function(t,e,i,o){(o<3||o===9)&&(e.__$f|=2),t(e,i,o)});F.prototype.shouldComponentUpdate=function(t,e){var i=this.__$u;if(!(i&&i.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var o in e)return!0;for(var a in t)if(a!=="__source"&&t[a]!==this.props[a])return!0;for(var n in this.props)if(!(n in t))return!0;return!1};function Sn(t){return nt(function(){return at(t)},[])}const Ae=(t,e)=>e.some(i=>t instanceof i);let Di,Ni;function En(){return Di||(Di=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Cn(){return Ni||(Ni=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Be=new WeakMap,fe=new WeakMap,ne=new WeakMap;function Pn(t){const e=new Promise((i,o)=>{const a=()=>{t.removeEventListener("success",n),t.removeEventListener("error",r)},n=()=>{i(st(t.result)),a()},r=()=>{o(t.error),a()};t.addEventListener("success",n),t.addEventListener("error",r)});return ne.set(e,t),e}function Tn(t){if(Be.has(t))return;const e=new Promise((i,o)=>{const a=()=>{t.removeEventListener("complete",n),t.removeEventListener("error",r),t.removeEventListener("abort",r)},n=()=>{i(),a()},r=()=>{o(t.error||new DOMException("AbortError","AbortError")),a()};t.addEventListener("complete",n),t.addEventListener("error",r),t.addEventListener("abort",r)});Be.set(t,e)}let Me={get(t,e,i){if(t instanceof IDBTransaction){if(e==="done")return Be.get(t);if(e==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return st(t[e])},set(t,e,i){return t[e]=i,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Io(t){Me=t(Me)}function On(t){return Cn().includes(t)?function(...e){return t.apply(Fe(this),e),st(this.request)}:function(...e){return st(t.apply(Fe(this),e))}}function zn(t){return typeof t=="function"?On(t):(t instanceof IDBTransaction&&Tn(t),Ae(t,En())?new Proxy(t,Me):t)}function st(t){if(t instanceof IDBRequest)return Pn(t);if(fe.has(t))return fe.get(t);const e=zn(t);return e!==t&&(fe.set(t,e),ne.set(e,t)),e}const Fe=t=>ne.get(t);function In(t,e,{blocked:i,upgrade:o,blocking:a,terminated:n}={}){const r=indexedDB.open(t,e),l=st(r);return o&&r.addEventListener("upgradeneeded",s=>{o(st(r.result),s.oldVersion,s.newVersion,st(r.transaction),s)}),i&&r.addEventListener("blocked",s=>i(s.oldVersion,s.newVersion,s)),l.then(s=>{n&&s.addEventListener("close",()=>n()),a&&s.addEventListener("versionchange",d=>a(d.oldVersion,d.newVersion,d))}).catch(()=>{}),l}const jn=["get","getKey","getAll","getAllKeys","count"],Dn=["put","add","delete","clear"],we=new Map;function Ai(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(we.get(e))return we.get(e);const i=e.replace(/FromIndex$/,""),o=e!==i,a=Dn.includes(i);if(!(i in(o?IDBIndex:IDBObjectStore).prototype)||!(a||jn.includes(i)))return;const n=async function(r,...l){const s=this.transaction(r,a?"readwrite":"readonly");let d=s.store;return o&&(d=d.index(l.shift())),(await Promise.all([d[i](...l),a&&s.done]))[0]};return we.set(e,n),n}Io(t=>({...t,get:(e,i,o)=>Ai(e,i)||t.get(e,i,o),has:(e,i)=>!!Ai(e,i)||t.has(e,i)}));const Nn=["continue","continuePrimaryKey","advance"],Bi={},Le=new WeakMap,jo=new WeakMap,An={get(t,e){if(!Nn.includes(e))return t[e];let i=Bi[e];return i||(i=Bi[e]=function(...o){Le.set(this,jo.get(this)[e](...o))}),i}};async function*Bn(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const i=new Proxy(e,An);for(jo.set(i,e),ne.set(i,Fe(e));e;)yield i,e=await(Le.get(i)||e.continue()),Le.delete(i)}function Mi(t,e){return e===Symbol.asyncIterator&&Ae(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Ae(t,[IDBIndex,IDBObjectStore])}Io(t=>({...t,get(e,i,o){return Mi(e,i)?Bn:t.get(e,i,o)},has(e,i){return Mi(e,i)||t.has(e,i)}}));const Ut=typeof indexedDB>"u"?void 0:In("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}});let Rt,ve,_t;const Fi=()=>{if(!Rt)return _t;const t=Rt;Rt=void 0;const e=Do(t),i=Ut==null?void 0:Ut.then(o=>o.put("state",t.data,e)).finally(()=>{_t===i&&(_t=void 0)});return _t=i,_t},lt={getStateData:async(t,e,i)=>{var a;const o=Do({...t,flowKeys:e,context:i});return(a=await Ut)==null?void 0:a.get("state",o)},setStateData:t=>{Rt=t,clearTimeout(ve),ve=setTimeout(()=>void Fi(),1e3)},flushStateData:()=>(clearTimeout(ve),Fi()??Promise.resolve())},Mn=t=>{const e=t.find(i=>i.isHead);if(!e)throw new Error("No head node found");return e},Fn=t=>e=>e?e.type===t:!1;class ct extends Error{constructor(){super("Aborted")}}const Ln=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Li=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Ln()}),Hn=t=>oe(t).with({nativeEvent:{submitter:xt.select(xt.union(xt.instanceOf(HTMLButtonElement),xt.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),Vt=(t,e,i,o=0)=>{if(!e.nextId)return i(e.id,{stepsMade:o,remainingSteps:0}),{stepsMade:o,remainingSteps:0};const a=t.find(d=>d.id===e.nextId);if(a===void 0)return{stepsMade:o,remainingSteps:0};const n=e.type==="if-block"?e.branchId:void 0,r=t.find(d=>d.id===n),l=e.type.includes("question")?1:0;if(r){const d=l+Math.max(Vt(t,a,i,o+l).remainingSteps,Vt(t,r,i,o+l).remainingSteps);return i(e.id,{stepsMade:o,remainingSteps:d}),{stepsMade:o,remainingSteps:d}}const s=l+Vt(t,a,i,o+l).remainingSteps;return i(e.id,{stepsMade:o,remainingSteps:s}),{stepsMade:o,remainingSteps:s}},Un=t=>{const e={},i=t.find(o=>o.isHead);return i&&Vt(t,i,(o,a)=>{e[o]=a}),e},Do=t=>[...t.flowKeys,t.id,t.version,mn(t.context)].join("/"),it=at({state:"idle"}),mt=t=>{const{state:e,flow:i}=it.value;if(e!=="loaded")return;ei(i,"No flow to update");const o=t(i.data);i.data=o,it.value={state:e,flow:i},lt.setStateData(i)},x={current$:it,viewState$:at("closed"),inputHeight$:at(53),prepareFlow:async({flow:t,context:e={},flowKeys:i,title:o,analytics:a,job:n,locationOrigin:r})=>(await lt.flushStateData().catch(()=>{}),{data:await lt.getStateData(t,i,e)??Li(),startedAt:new Date,nodeIdToProgress:Un(t.nodes),flowKeys:i,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:o,analytics:a,job:n,locationOrigin:r}),commitFlow:t=>{it.value={state:"loaded",flow:t},lt.setStateData(t)},cancelCurrentFlow:()=>{it.value={state:"idle"},x.viewState$.value="closed"},markAsFinished:()=>mt(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>mt(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=it.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const i=Li();it.value={state:t,flow:{...e,data:i,startedAt:new Date}},lt.setStateData(e)},addMessage:(t,e)=>{const i={...t,groupId:e};return mt(o=>(o.messages.push(i),o))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:i}=it.value;ei(e==="loaded","Application not loaded");const o=i.data.messages.filter(a=>!a.groupId||!t.includes(a.groupId));i.data.messages=o,lt.setStateData(i)},setSubmission:(t,e)=>mt(i=>(e===null?delete i.submissions[t]:i.submissions[t]=e,i)),setInput:t=>mt(e=>({...e,currentInput:t??null}))},Rn=({message:t})=>{const{t:e}=ae();return p("div",{class:"flex flex-grow flex-col items-center justify-center",children:[p("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:[p("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"}),p("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"}),p("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),p("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),p("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),p("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),p("path",{d:"M38 56h19"})]}),p("div",{class:"flex flex-col gap-2 text-center",children:[p("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&p("p",{class:"text-neutral-9 text-sm",children:t})]})]})},No=t=>p("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[p("title",{children:"Loading"}),p("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)}}"}),p("g",{id:"s1",transform:"translate(12,0)",children:p("g",{id:"s2",transform:"scale(0,0)",children:p("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),p("g",{id:"s3",transform:"translate(12,12)",children:p("g",{id:"s4",transform:"scale(1,1)",children:p("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),p("g",{id:"s5",transform:"translate(12,0)",children:p("g",{id:"s6",transform:"scale(0,0)",children:p("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"})})}),p("g",{id:"s7",transform:"translate(12,0)",children:p("g",{id:"s8",transform:"scale(0,0)",children:p("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"})})})]}),Hi=()=>p("div",{class:"flex flex-grow flex-col items-center justify-center",children:p(No,{class:"text-neutral-6 h-8 w-8"})}),Vn=t=>{const i=t/100,o=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-i,o))*100)}%`},Wn=ie("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"}}),Qt=({class:t,children:e,variant:i,...o})=>p("div",{class:"flex flex-1 items-center justify-end px-1",children:p("button",{class:ee(Wn({variant:i}),t),...o,children:p("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:e})})}),Yn=()=>{if(x.current$.value.state!=="loaded")return null;const t=x.current$.value.flow.nodeIdToProgress,e=x.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const i=t[e];if(i===void 0)return null;const o=100*(i.stepsMade/(i.remainingSteps+i.stepsMade));return p("div",{class:"bg-accent-3",children:p("div",{style:{width:Vn(o)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Kn=({children:t,params:e})=>{const{t:i}=ae(),o=x.viewState$;return p(L,{children:p("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:[p("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:[p("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),p("button",{onClick:()=>{o.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:He,children:p("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),p("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?p("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header",class:ee({hidden:x.current$.value.state!=="loaded"||o.value!=="maximised"}),children:p("div",{class:"ring-neutral-4 bg-neutral-3 h-8 w-[72px] animate-pulse rounded-full ring-1"})}):null,x.current$.value.state==="loaded"&&p(Qt,{"aria-label":"Restart",onClick:()=>{x.restart()},children:[p("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"}),p("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),p(Qt,{class:"view-switch",onTouchStart:He,"aria-label":i("minimize"),onClick:()=>o.value="minimised",children:p("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]}),p(Yn,{})]})})};function He(){}const qn=go(()=>Promise.resolve().then(()=>require("./chatbot-body-92fd0d1f.cjs")).then(t=>t.ChatbotBody)),Ao=ie("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"}}}),Bo=ie("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"}}}),Gn=({open:t,...e})=>{const i=jt(null);return pt(()=>{const o=i.current;o&&(t?o.showModal():o.close())},[t]),p("dialog",{ref:i,...e})},Jn=({logger:t,apiClient:e,analytics:i,talentBankClient:o,params:a})=>{const{state:n,flow:r,error:l}=x.current$.value,s=x.viewState$.value,d=n!=="idle"&&s==="maximised",u=jt(null);return p(bn,{terms:a.terms,locale:void 0,children:[p(Gn,{open:d,onClose:()=>x.viewState$.value="minimised",children:p("div",{ref:u,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:Ao({view:"maximised"}),children:p("div",{class:Bo({view:"maximised"}),children:[p(Kn,{params:a,children:r==null?void 0:r.title}),oe({state:n,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>p(Hi,{},"loading")).with({state:"loaded"},()=>p($t,{fallback:p(Hi,{},"loading"),children:p(qn,{analytics:i,apiClient:e,logger:t,talentBankClient:o})})).with({state:"error"},()=>p(Rn,{message:l})).exhaustive()]})})}),s==="minimised"?p(Xn,{flow:r}):null]})},Xn=({flow:t})=>{const{t:e}=ae();return p("div",{class:Ao({view:"minimised",class:"z-100 isolate"}),children:p("div",{class:Bo({view:"minimised"}),children:[p("button",{onClick:()=>{x.viewState$.value="maximised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1 focus-visible:outline-none",onTouchStart:He,children:p("p",{"aria-hidden":!0,class:"truncate text-sm font-bold tracking-tight text-white",children:t==null?void 0:t.title})}),p("div",{class:"flex items-center px-0.5",children:p(Qt,{"aria-label":e("close_application"),onClick:x.cancelCurrentFlow,variant:"white",children:p("path",{d:"M12 12L4 4M12 4L4 12"})},"close")})]})})},Zn=`[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}[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-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-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-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-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\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 16px)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[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] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[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-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[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-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] .overflow-y-scroll{overflow-y:scroll}[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-b-3xl{border-bottom-right-radius:24px;border-bottom-left-radius:24px}[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-10{padding:40px}[data-widget=inploi-chatbot] .p-11{padding:44px}[data-widget=inploi-chatbot] .p-12{padding:48px}[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] .p-5{padding:20px}[data-widget=inploi-chatbot] .p-6{padding:24px}[data-widget=inploi-chatbot] .p-7{padding:28px}[data-widget=inploi-chatbot] .p-8{padding:32px}[data-widget=inploi-chatbot] .p-9{padding:36px}[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\\.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-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-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-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity, 1))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[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-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[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-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-blur-xl{--tw-backdrop-blur: blur(24px);-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] .duration-700{transition-duration:.7s}[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-\\[height\\]{will-change:height}[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] .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-11:has(+*>input:focus){color:var(--i-color-n-11)}[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)}
|
|
2
|
-
`,Mo="inploi-chatbot",Ue=`[data-widget='${Mo}']`,Qn=()=>({getChatbotElement:()=>document.querySelector(Ue),getOrCreateChatbotElement:()=>{const t=document.querySelector(Ue);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=Mo,e}}),tr=25,Re=at({instant:()=>{},smooth:()=>{}}),er=(t,e)=>new Promise((i,o)=>{if(e!=null&&e.aborted)return o(new ct);const a=setTimeout(i,t);e==null||e.addEventListener("abort",()=>{clearTimeout(a),o(new ct)},{once:!0})}),Et={onSubmitSuccessFn$:at(()=>{}),isBotTyping$:at(!1),scrollToEnd:{instant:()=>Re.value.instant(),smooth:()=>Re.value.smooth()}},ir=()=>{const t=jt(null);pt(()=>{Re.value={instant:()=>{var i;return(i=t.current)==null?void 0:i.scrollTo({top:t.current.scrollHeight,behavior:"instant"})},smooth:()=>{t.current&&t.current.scrollHeight-t.current.scrollTop<=t.current.clientHeight*2&&t.current.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})}}},[t]);const e=nt(()=>({addToSubmissions:(o,a)=>x.setSubmission(o,a),send:async({message:o,signal:a,groupId:n})=>{if(await oe(o).with({author:"bot",type:"text"},async r=>{if(a!=null&&a.aborted)throw new ct;Et.isBotTyping$.value=!0;const l=Math.min(Math.max(20,r.text.length),100)*tr;try{await er(l,a)}finally{Et.isBotTyping$.value=!1}}).otherwise(async()=>{}),a!=null&&a.aborted)throw new ct;x.addMessage(o,n)},input:({input:o,signal:a})=>{if(a!=null&&a.aborted)throw new ct;return x.setInput(o),new Promise(n=>{const r=l=>{if(a!=null&&a.aborted)throw new ct;x.setInput(void 0),o.key&&x.setSubmission(o.key,l),n(l)};Et.onSubmitSuccessFn$.value=r})}}),[]);return{chatRef:t,chatService:e}};var Y;function re(t){return{lang:(t==null?void 0:t.lang)??(Y==null?void 0:Y.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(Y==null?void 0:Y.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(Y==null?void 0:Y.abortPipeEarly)}}var ge;function or(t){return ge==null?void 0:ge.get(t)}var be;function ar(t){return be==null?void 0:be.get(t)}var _e;function nr(t,e){var i;return(i=_e==null?void 0:_e.get(t))==null?void 0:i.get(e)}function ut(t){var i,o;const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&((o=(i=Object.getPrototypeOf(t))==null?void 0:i.constructor)==null?void 0:o.name))??"null":e}function z(t,e,i,o,a){const n=a&&"input"in a?a.input:i.value,r=(a==null?void 0:a.expected)??t.expects??null,l=(a==null?void 0:a.received)??ut(n),s={kind:t.kind,type:t.type,input:n,expected:r,received:l,message:`Invalid ${e}: ${r?`Expected ${r} but r`:"R"}eceived ${l}`,requirement:t.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:o.lang,abortEarly:o.abortEarly,abortPipeEarly:o.abortPipeEarly},d=t.kind==="schema",u=(a==null?void 0:a.message)??t.message??nr(t.reference,s.lang)??(d?ar(s.lang):null)??o.message??or(s.lang);u!==void 0&&(s.message=typeof u=="function"?u(s):u),d&&(i.typed=!1),i.issues?i.issues.push(s):i.issues=[s]}function B(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},re())}}}function rr(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Fo(t,e){const i=[...new Set(t)];return i.length>1?`(${i.join(` ${e} `)})`:i[0]??"never"}function lr(t){if(t.path){let e="";for(const i of t.path)if(typeof i.key=="string"||typeof i.key=="number")e?e+=`.${i.key}`:e+=i.key;else return null;return e}return null}var cr=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}},sr=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Lo(t,e){return{kind:"validation",type:"check",reference:Lo,async:!1,expects:null,requirement:t,message:e,"~run"(i,o){return i.typed&&!this.requirement(i.value)&&z(this,"input",i,o),i}}}function Ho(t){return{kind:"validation",type:"email",reference:Ho,expects:null,async:!1,requirement:sr,message:t,"~run"(e,i){return e.typed&&!this.requirement.test(e.value)&&z(this,"email",e,i),e}}}function Uo(t,e){return{kind:"validation",type:"max_length",reference:Uo,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(i,o){return i.typed&&i.value.length>this.requirement&&z(this,"length",i,o,{received:`${i.value.length}`}),i}}}function Ro(t,e){return{kind:"validation",type:"max_value",reference:Ro,async:!1,expects:`<=${t instanceof Date?t.toJSON():ut(t)}`,requirement:t,message:e,"~run"(i,o){return i.typed&&!(i.value<=this.requirement)&&z(this,"value",i,o,{received:i.value instanceof Date?i.value.toJSON():ut(i.value)}),i}}}function Vo(t,e){return{kind:"validation",type:"min_length",reference:Vo,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(i,o){return i.typed&&i.value.length<this.requirement&&z(this,"length",i,o,{received:`${i.value.length}`}),i}}}function Wo(t,e){return{kind:"validation",type:"min_value",reference:Wo,async:!1,expects:`>=${t instanceof Date?t.toJSON():ut(t)}`,requirement:t,message:e,"~run"(i,o){return i.typed&&!(i.value>=this.requirement)&&z(this,"value",i,o,{received:i.value instanceof Date?i.value.toJSON():ut(i.value)}),i}}}function Yo(t,e){return{kind:"validation",type:"regex",reference:Yo,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(i,o){return i.typed&&!this.requirement.test(i.value)&&z(this,"format",i,o),i}}}function ni(t){return{kind:"transformation",type:"transform",reference:ni,async:!1,operation:t,"~run"(e){return e.value=this.operation(e.value),e}}}function Ko(t){return{kind:"validation",type:"url",reference:Ko,async:!1,expects:null,requirement(e){try{return new URL(e),!0}catch{return!1}},message:t,"~run"(e,i){return e.typed&&!this.requirement(e.value)&&z(this,"URL",e,i),e}}}function dr(t,e,i){return typeof t.fallback=="function"?t.fallback(e,i):t.fallback}function ri(t,e,i){return typeof t.default=="function"?t.default(e,i):t.default}function qo(){return{kind:"schema",type:"any",reference:qo,expects:"any",async:!1,get"~standard"(){return B(this)},"~run"(t){return t.typed=!0,t}}}function li(t,e){return{kind:"schema",type:"array",reference:li,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return B(this)},"~run"(i,o){var n;const a=i.value;if(Array.isArray(a)){i.typed=!0,i.value=[];for(let r=0;r<a.length;r++){const l=a[r],s=this.item["~run"]({value:l},o);if(s.issues){const d={type:"array",origin:"value",input:a,key:r,value:l};for(const u of s.issues)u.path?u.path.unshift(d):u.path=[d],(n=i.issues)==null||n.push(u);if(i.issues||(i.issues=s.issues),o.abortEarly){i.typed=!1;break}}s.typed||(i.typed=!1),i.value.push(s.value)}}else z(this,"type",i,o);return i}}}function le(t){return{kind:"schema",type:"boolean",reference:le,expects:"boolean",async:!1,message:t,get"~standard"(){return B(this)},"~run"(e,i){return typeof e.value=="boolean"?e.typed=!0:z(this,"type",e,i),e}}}function Ve(t,e){return{kind:"schema",type:"literal",reference:Ve,expects:ut(t),async:!1,literal:t,message:e,get"~standard"(){return B(this)},"~run"(i,o){return i.value===this.literal?i.typed=!0:z(this,"type",i,o),i}}}function Go(t,e){return{kind:"schema",type:"nullable",reference:Go,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,get"~standard"(){return B(this)},"~run"(i,o){return i.value===null&&(this.default!==void 0&&(i.value=ri(this,i,o)),i.value===null)?(i.typed=!0,i):this.wrapped["~run"](i,o)}}}function Ot(t){return{kind:"schema",type:"number",reference:Ot,expects:"number",async:!1,message:t,get"~standard"(){return B(this)},"~run"(e,i){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:z(this,"type",e,i),e}}}function J(t,e){return{kind:"schema",type:"object",reference:J,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return B(this)},"~run"(i,o){var n;const a=i.value;if(a&&typeof a=="object"){i.typed=!0,i.value={};for(const r in this.entries){const l=this.entries[r];if(r in a||(l.type==="exact_optional"||l.type==="optional"||l.type==="nullish")&&l.default!==void 0){const s=r in a?a[r]:ri(l),d=l["~run"]({value:s},o);if(d.issues){const u={type:"object",origin:"value",input:a,key:r,value:s};for(const c of d.issues)c.path?c.path.unshift(u):c.path=[u],(n=i.issues)==null||n.push(c);if(i.issues||(i.issues=d.issues),o.abortEarly){i.typed=!1;break}}d.typed||(i.typed=!1),i.value[r]=d.value}else if(l.fallback!==void 0)i.value[r]=dr(l);else if(l.type!=="exact_optional"&&l.type!=="optional"&&l.type!=="nullish"&&(z(this,"key",i,o,{input:void 0,expected:`"${r}"`,path:[{type:"object",origin:"key",input:a,key:r,value:a[r]}]}),o.abortEarly))break}}else z(this,"type",i,o);return i}}}function K(t,e){return{kind:"schema",type:"optional",reference:K,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return B(this)},"~run"(i,o){return i.value===void 0&&(this.default!==void 0&&(i.value=ri(this,i,o)),i.value===void 0)?(i.typed=!0,i):this.wrapped["~run"](i,o)}}}function Jo(t,e){return{kind:"schema",type:"picklist",reference:Jo,expects:Fo(t.map(ut),"|"),async:!1,options:t,message:e,get"~standard"(){return B(this)},"~run"(i,o){return this.options.includes(i.value)?i.typed=!0:z(this,"type",i,o),i}}}function ci(t,e,i){return{kind:"schema",type:"record",reference:ci,expects:"Object",async:!1,key:t,value:e,message:i,get"~standard"(){return B(this)},"~run"(o,a){var r,l;const n=o.value;if(n&&typeof n=="object"){o.typed=!0,o.value={};for(const s in n)if(rr(n,s)){const d=n[s],u=this.key["~run"]({value:s},a);if(u.issues){const w={type:"object",origin:"key",input:n,key:s,value:d};for(const v of u.issues)v.path=[w],(r=o.issues)==null||r.push(v);if(o.issues||(o.issues=u.issues),a.abortEarly){o.typed=!1;break}}const c=this.value["~run"]({value:d},a);if(c.issues){const w={type:"object",origin:"value",input:n,key:s,value:d};for(const v of c.issues)v.path?v.path.unshift(w):v.path=[w],(l=o.issues)==null||l.push(v);if(o.issues||(o.issues=c.issues),a.abortEarly){o.typed=!1;break}}(!u.typed||!c.typed)&&(o.typed=!1),u.typed&&(o.value[u.value]=c.value)}}else z(this,"type",o,a);return o}}}function q(t){return{kind:"schema",type:"string",reference:q,expects:"string",async:!1,message:t,get"~standard"(){return B(this)},"~run"(e,i){return typeof e.value=="string"?e.typed=!0:z(this,"type",e,i),e}}}function Ui(t){let e;if(t)for(const i of t)e?e.push(...i.issues):e=i.issues;return e}function si(t,e){return{kind:"schema",type:"union",reference:si,expects:Fo(t.map(i=>i.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return B(this)},"~run"(i,o){let a,n,r;for(const l of this.options){const s=l["~run"]({value:i.value},o);if(s.typed)if(s.issues)n?n.push(s):n=[s];else{a=s;break}else r?r.push(s):r=[s]}if(a)return a;if(n){if(n.length===1)return n[0];z(this,"type",i,o,{issues:Ui(n)}),i.typed=!0}else{if((r==null?void 0:r.length)===1)return r[0];z(this,"type",i,o,{issues:Ui(r)})}return i}}}function ur(t,e,i){const o=t["~run"]({value:e},re(i));if(o.issues)throw new cr(o.issues);return o.value}function pr(t,e){const i={};for(const o in t.entries)i[o]=!e||e.includes(o)?K(t.entries[o]):t.entries[o];return{...t,entries:i,get"~standard"(){return B(this)}}}function Xo(...t){return{...t[0],pipe:t,get"~standard"(){return B(this)},"~run"(e,i){for(const o of t)if(o.kind!=="metadata"){if(e.issues&&(o.kind==="schema"||o.kind==="transformation")){e.typed=!1;break}(!e.issues||!i.abortEarly&&!i.abortPipeEarly)&&(e=o["~run"](e,i))}return e}}}function hr(t,e,i){const o=t["~run"]({value:e},re(i));return{typed:o.typed,success:!o.issues,output:o.value,issues:o.issues}}async function fr(t,e,i){const o=await t["~run"]({value:e},re(i));return{typed:o.typed,success:!o.issues,output:o.value,issues:o.issues}}const Zo=Xo(si([q(),Ot()]),ni(String)),Qo=J({id:Zo,version:Ot(),build:Ot(),nodes:li(qo()),context_schema:K(Go(ci(q(),J({required:le(),type:si([Ve("string"),Ve("number")])}))))}),wr=J({flow:Qo}),vr=J({company:J({name:q()}),flow:Qo,job:J({id:Zo,title:q()}),user:K(J({city:K(q()),country:K(q()),isEU:K(le()),continent:K(q())}))}),gr=Ct.endpoint({pathname:"/flow/job/:id",method:"GET",schema:{searchParams:Ct.typed(),response:vr}}),br=Ct.endpoint({pathname:"/flow/id/:id",method:"GET",schema:{response:wr}});var _r=["1","2","3","4","5","6","7","8","9","10","11","12"],mr={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]}},yr=(t,e=1,i)=>o=>{const[a,n]=mr[i][o];return"oklch("+a+"% "+n*e+" "+t+")"},me=t=>{const e=yr(t.hue,t.chroma,t.mode);return Object.fromEntries(_r.map(i=>[t.prefix+i,t.transform(e(i))]))},ye=t=>t,xr=t=>{const e=Object.keys(t).flatMap(i=>{const o=t[i];return typeof o=="object"&&o!==null?Object.keys(o).map(a=>{const n=o[a];return[`${String(i)}.${a}`,n]}):[[i,o]]});return Object.fromEntries(e)},At=t=>!!t&&typeof t=="object"&&!Array.isArray(t),We=(t,...e)=>{if(!e.length)return t;const i=e.shift();if(At(t)&&At(i))for(const o in i){const a=i[o];if(At(a)){t[o]||Object.assign(t,{[o]:{}});const n=t[o];At(n)&&We(n,a)}else Object.assign(t,{[o]:i[o]})}return We(t,...e)},kr=t=>{function e(i,o){const a=[t.prefix,o.toString().replace(/\./g,"-")].join("");return i==="declaration"?`--${a}`:`var(--${a})`}return e},$r=()=>({core:t=>({semantic:e=>({component:i=>({from:o=>{const{theme:a,getToken:n}=o,r=w=>n("reference",w.toString()),l=t({theme:a}),s=e({theme:a,core:r,raw:{core:l}}),d=i({theme:a,core:r,semantic:r,raw:{core:l,semantic:s}}),u=xr(We(l,s,d)),c=([w,v],f)=>{const g=[f,w].filter(Boolean).join(".");return typeof v=="object"?Object.entries(v).flatMap(D=>c(D,g)):[[o.getToken("declaration",g),v]]};return{values:u,declarations:Object.fromEntries(Object.entries(u).flatMap(w=>c(w))),ref:w=>n("reference",w.toString())}}})})})});const[xe,ke,Ri]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Sr=$r().core(({theme:t})=>({color:{black:xe,white:ke,lowest:t.mode==="light"?ke:xe,highest:t.mode==="light"?xe:ke,...me({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:ye}),...me({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:ye}),...me({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:ye})},typography:{}})).semantic(({core:t,raw:e,theme:i})=>{const o=(a,n)=>e.core.color[a].replace(")",` / ${n})`);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:o("n-8",i.mode==="dark"?.4:.2)},"copy-body":t("color.n-12"),"copy-headings":t("color.n-12"),interactive:{copy:t("color.n-11"),"copy-hover":t("color.n-12"),"copy-active":t("color.n-12"),bg:Ri,"bg-hover":o("n-10",.2),"bg-active":o("n-10",.3)}}}).component(({raw:t,theme:e,semantic:i,core:o})=>{const a=(n,r)=>t.core.color[n].replace(")",` / ${r})`);return{app:{bg:o(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:a("black",.4)},bubble:{"weak-bg":o(e.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":i("color.divider"),"strong-shadow":a("a-9",.05)},"status-bar":{bg:a("n-2",.8),"bg-button":Ri,"bg-button-hover":a("n-10",.4),"bg-button-active":a("n-10",.5)},"submit-button":{"bg-active":o(e.mode==="dark"?"color.a-8":"color.a-11")}}}),Er=kr({prefix:"i-"}),Cr=t=>{const e=Sr.from({theme:t,getToken:Er}),i=Object.entries(e.declarations).map(([o,a])=>`${o}: ${a};`);return`${Ue} {
|
|
3
|
-
${i.concat(i).join(`
|
|
4
|
-
`)}
|
|
5
|
-
}`},Pr=({_internal_domManager:t=Qn(),theme:e,terms:i,feedback:o})=>Ct.createPlugin(({apiClient:a,rpcClient:n,logger:r,analytics:l,publishableKey:s,env:d})=>{let u=!1,c=0;const w=_n({locale:void 0,overrides:i??{}}),v=s&&d?Ct.createTalentBankClient({environment:d,publishableKey:s,logger:r}):void 0,f=b=>b===c,g=()=>{if(typeof window>"u")return;c++,lt.flushStateData().catch(()=>{}),x.cancelCurrentFlow(),x.inputHeight$.value=53,Et.isBotTyping$.value=!1;const b=t.getChatbotElement();b&&(dt(null,b),b.remove()),u=!1,r.info("Chatbot plugin destroyed")},D=()=>{if(typeof window>"u")return;const b=c,_=[M("style",{id:"inploi-chatbot-styles"},Zn),M("style",{id:"inploi-chatbot-theme"},Cr(e))],y=t.getOrCreateChatbotElement();if(dt(M(L,{},[_,M(Jn,{apiClient:a,logger:r,analytics:l,talentBankClient:v,params:{theme:e,terms:i,feedback:o}})]),y),o){const C=T=>{var U,I;if(!f(b))return;const H=(U=t.getChatbotElement())==null?void 0:U.querySelector("dialog");H&&Tr({instance:T({rpcClient:n,apiClient:a,logger:r,analytics:l}),theme:e,terms:((I=o.params)==null?void 0:I.terms)??{},host:H})};o.plugin instanceof Promise?o.plugin.then(({feedbackPlugin:T})=>{C(T())}).catch(T=>{r.error("Error preparing feedback plugin",T)}):C(o.plugin)}u=!0},k=async(b,_)=>{if(!f(_))return;sa({context:b.context||{},schema:b.flow.context_schema,logger:r});const y=await x.prepareFlow(b);f(_)&&x.commitFlow(y)};return{prepare:async()=>{if(!(typeof window>"u"))try{if(u)return;D(),r.info("Chatbot plugin prepared")}catch(b){r.error("Error preparing chatbot plugin",b)}},fetchFlowByJobId:async(b,_)=>n.request(gr,{params:{id:b},searchParams:{id_type:(_==null?void 0:_.idType)==="inploi"?"internal":"external"}}).then(y=>({flow:y.flow,title:y.job.title,flowKeys:[y.job.id,...(_==null?void 0:_.flowKeys)??[]],job:{id:y.job.id,id_type:"external"},..._,context:{user:y.user,..._==null?void 0:_.context}})),fetchFlowById:async(b,_)=>n.request(br,{params:{id:b}}).then(y=>{var C;return{flow:y.flow,title:"Chatbot",flowKeys:(_==null?void 0:_.flowKeys)??[],..._,analytics:{customProperties:{flow_id:y.flow.id,flow_version:y.flow.version,...(C=_==null?void 0:_.analytics)==null?void 0:C.customProperties}}}}),open:async b=>{if(!(typeof window>"u"))try{x.cancelCurrentFlow(),x.viewState$.value="maximised",u||D();const _=c;b instanceof Promise?(x.current$.value={state:"loading"},b.then(y=>k(y,_)).catch(y=>{if(!f(_))return;const C=y instanceof Error?y.message:w("unknown_error");x.current$.value={state:"error",error:C}})):await k(b,_)}catch(_){r.error("Error starting flow",_)}},close:async()=>{typeof window>"u"||(x.cancelCurrentFlow(),r.info("Closed flow from an external source"))},destroy:g}});function Tr({instance:t,terms:e,theme:i,host:o}){t.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:i.chroma??1,hue:i.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:i.mode,corners:"rounded",highlights:"stroke"},terms:e,host:o})}exports.AbortedError=ct;exports.Cn=Qa;exports.F=nt;exports.H=Ke;exports.LoadingIndicator=No;exports.M=oe;exports.SvgIconButton=Qt;exports._=jt;exports.array=li;exports.boolean=le;exports.ce=la;exports.chatStore=Et;exports.chatbotPlugin=Pr;exports.check=Lo;exports.clsx=ee;exports.cva=ie;exports.email=Ho;exports.getDotPath=lr;exports.getFormSubmitter=Hn;exports.getHeadOrThrow=Mn;exports.h=Je;exports.invariant=ei;exports.isSubmissionOfType=Fn;exports.k=L;exports.k$1=ho;exports.maxLength=Uo;exports.maxValue=Ro;exports.minLength=Vo;exports.minValue=Wo;exports.number=Ot;exports.o=p;exports.object=J;exports.oe=ra;exports.optional=K;exports.p=Xe;exports.parse=ur;exports.partial=pr;exports.pe=ca;exports.picklist=Jo;exports.pipe=Xo;exports.record=ci;exports.regex=Yo;exports.safeParse=hr;exports.safeParseAsync=fr;exports.store=x;exports.string=q;exports.transform=ni;exports.ue=na;exports.url=Ko;exports.useChatService=ir;exports.useTranslation=ae;exports.y=pt;exports.z=xt;
|