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