@opens/widget-ui 1.0.13 → 1.0.16
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/dist/app-text.vue.d.ts.map +1 -0
- package/dist/components/pages/app-chat-service.vue.d.ts +13 -0
- package/dist/components/pages/app-service-page.vue.d.ts +2 -2
- package/dist/components/pages/app-voice-service.vue.d.ts +7 -0
- package/dist/components/widget/app-widget-view.vue.d.ts +2 -2
- package/dist/components/widget/app-widget.vue.d.ts +2 -2
- package/dist/composables/use-app-widget.d.ts +8 -5
- package/dist/composables/use-service-chat-behavior.d.ts +2 -2
- package/dist/composables/use-service-page.d.ts +2 -2
- package/dist/icons/app-icon.vue.d.ts.map +1 -0
- package/dist/pages/app-chat-service.vue.d.ts +4 -0
- package/dist/pages/app-chat-service.vue.d.ts.map +1 -0
- package/dist/pages/app-voice-service.vue.d.ts +4 -0
- package/dist/pages/app-voice-service.vue.d.ts.map +1 -0
- package/dist/ui/app-carousel.vue.d.ts +1 -1
- package/dist/widget/app-widget-view.vue.d.ts +1 -1
- package/dist/widget/app-widget.vue.d.ts +1 -1
- package/dist/yunique_widget_ui.cjs.js +1 -1
- package/dist/yunique_widget_ui.css +1 -1
- package/dist/yunique_widget_ui.es.js +2828 -2522
- package/dist/yunique_widget_ui.umd.js +2 -2
- package/package.json +2 -2
- package/dist/app-icon.vue.d.ts.map +0 -1
- package/dist/typography/app-text.vue.d.ts.map +0 -1
- /package/dist/{typography/app-text.vue.d.ts → app-text.vue.d.ts} +0 -0
- /package/dist/{app-icon.vue.d.ts → icons/app-icon.vue.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function bo(){return{maskPhone:i=>{if(!i)return"";let s=i.replace(/\D/g,"");return s.length<=4?s:(s.startsWith("0")&&!s.startsWith("0800")&&s.length>3&&(s=s.replace(/^0+/,"")),s.startsWith("0800")?s.length>11?s:s.replace(/(0800)(\d{0,3})(\d{0,4})/,(a,l,u,c)=>[l,u,c].filter(Boolean).join(" ")):s.length>11?s:s.length<=8?s.replace(/(\d{4})(\d{0,4})/,"$1-$2").replace(/-$/,""):s.length===9?s.replace(/(\d{5})(\d{0,4})/,"$1-$2"):s.length===10?s.replace(/(\d{2})(\d{0,4})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""):s.replace(/(\d{2})(\d{0,5})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""))},maskCnpj:i=>{const s=i.toUpperCase().replace(/[^0-9A-Z]/g,"");let a="";for(const l of s){if(a.length>=14)break;(a.length<12||/\d/.test(l))&&(a+=l)}return a.replace(/^([0-9A-Z]{2})([0-9A-Z])/,"$1.$2").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3/$4").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})\/([0-9A-Z]{4})(\d)/,"$1.$2.$3/$4-$5")},maskCep:i=>i.replace(/\D/g,"").slice(0,8).replace(/^(\d{5})(\d)/,"$1-$2"),maskCpf:i=>i.replace(/\D/g,"").slice(0,11).replace(/^(\d{3})(\d)/,"$1.$2").replace(/^(\d{3})\.(\d{3})(\d)/,"$1.$2.$3").replace(/^(\d{3})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3-$4")}}function Ht(){return{}}const He=e.ref([]),ko=e.ref(""),Co=e.ref(!1),$o=e.ref(!1),Bo=e.ref(!1);function Ft(){return{isErrorLoadingMessages:Co,isLoadingMessages:$o,isSendingMessage:Bo,messages:He,text:ko,setMessages:n=>{He.value=[...n]},addMessage:n=>{He.value.push(n)}}}function Dt(){const t=Ft(),o=Ht();return{chat:t,voice:o}}const fe=e.ref([]),Fe=e.ref(void 0),te=e.ref(void 0),ue=()=>{const t=p=>{const v=new Set(Object.values(p.edges??{}).flatMap(y=>y.map(g=>g.nextRuleId)));return p.rules.find(y=>!v.has(y.id))??p.rules[0]},o=(p,v)=>{const y=new Map(p.rules.map(g=>[g.id,g]));return(p.edges[v]??[]).flatMap(g=>{const d=y.get(g.nextRuleId);return d?[d]:[]})},n=e.computed(()=>new Map((te.value?.rules??[]).map(p=>[p.id,p]))),r=e.computed(()=>te.value?t(te.value):void 0),i=e.computed(()=>{const p=Fe.value;return p&&n.value.get(p)||r.value}),s=e.computed(()=>!te.value||!i.value?[]:o(te.value,i.value.id)),a=Dt();return{currentRuleId:Fe,currentRule:i,rootRule:r,workflow:te,history:fe,edges:s,setCurrentRuleId:p=>{Fe.value=p},clearHistory:()=>{fe.value=[]},setWorkflow:p=>{te.value=p},pushHistory:p=>{fe.value.push(p)},setHistory:p=>{fe.value=[...p]},popHistory:()=>fe.value.pop(),...a}},se=t=>t==="name",pt=t=>!!t?.trim(),_o=t=>{const o=t.filter(r=>se(r.name)),n=t.filter(r=>!se(r.name));return[...o,...n]};function So(t,o){const{maskPhone:n,maskCpf:r}=bo(),{history:i}=ue(),s=e.ref(0),a=e.ref("forward"),l=e.ref(null),u=e.computed(()=>{const k=e.toValue(t),T=k.settings?.form&&k.settings.form.fields||[];return _o(T)}),c=e.reactive(Object.fromEntries(u.value.map(k=>[k.name,""]))),w=e.computed(()=>u.value[s.value]),h=e.computed(()=>s.value>=u.value.length-1),f=e.computed(()=>i.value.length>0||s.value>0),p=e.computed(()=>a.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const k=l.value;if(!k)return;(k.querySelector(".is-active input")??k.querySelector("input"))?.focus({preventScroll:!0})});const v=e.computed(()=>u.value.every(k=>!k.required||pt(c[k.name]))),y=k=>{const T=u.value[k];return T?T.required&&!pt(c[T.name])?!1:k>=u.value.length-1?v.value:!0:v.value},g=e.computed(()=>y(s.value)),d=e.computed(()=>{const k=u.value.find(T=>se(T.name));return k?c[k.name]?.trim().split(/\s+/)[0]??"":""}),m=k=>{const T=u.value[k],E=d.value,R=u.value.length?`Passo ${k+1} de ${u.value.length}`:"",z=e.toValue(t),M=k>=u.value.length-1;if(!T)return{eyebrow:R,title:z.settings?.body?.title??"",subtitle:z.settings?.body?.subtitle??""};if(se(T.name))return{eyebrow:R,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const O=M?E?`Quase lá, ${E}.`:"Quase lá.":E?`Olá, ${E}.`:"Olá.",W=T.required?`Informe seu ${T.alias} para continuar.`:`Gostaria de deixar seu ${T.alias}?`;return{eyebrow:R,title:O,subtitle:W}},b=e.computed(()=>m(s.value)),B=k=>k==="email"?"email":k==="phone"?"tel":"text",_=k=>k==="email"?"email":k==="phone"?"call":se(k)?"person":k==="order"?"receipt":"badge",C=k=>k.required?`${k.alias} *`:k.alias,x=k=>se(k.name)?"Seu nome":k.name==="phone"?"Seu telefone":k.name==="email"?"Seu e-mail":k.name==="cpf"?"000.000.000-00":k.alias,$=k=>{if(k==="phone")return n;if(k==="cpf")return r},N=()=>{v.value&&o("submit",{...c})};return{stepTransition:p,currentField:w,canContinue:g,currentStep:s,isLastStep:h,stepIntro:b,fieldHost:l,showBack:f,fields:u,form:c,continueStep:()=>{if(g.value){if(h.value||u.value.length===0)return N();a.value="forward",s.value+=1}},canContinueAt:y,introFor:m,fieldLabel:C,fieldPlaceholder:x,fieldType:B,fieldMask:$,fieldIcon:_,goBack:()=>{if(s.value>0){a.value="back",s.value-=1;return}o("back")}}}function It(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":"!wu-h-12 !wu-min-h-[3rem]"),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,width:r}}function Ao(t,o){const n=e.computed(()=>({"!wu-font-plus":o.plus,"!wu-font-inter":o.inter,"!wu-font-titillium":o.titillium,"!wu-font-mono":o.mono})),r=e.computed(()=>({"!wu-text-white":o.white,"!wu-text-primary":o.primary,"!wu-text-secondary":o.secondary,"!wu-text-base":o.neutral,"!wu-text-neutral dark:!wu-text-neutral-200":o.gray})),i=e.computed(()=>({"!wu-font-thin":o.thin,"!wu-font-extralight":o.extralight,"!wu-font-light":o.light,"!wu-font-normal":o.normal,"!wu-font-medium":o.medium,"!wu-font-semibold":o.semibold,"!wu-font-bold":o.bold,"!wu-font-extrabold":o.extrabold,"!wu-font-black":o.black})),s=e.computed(()=>({...{title:{"!wu-text-xl":o.small,"!wu-text-2xl":o.base,"!wu-text-3xl":o.large,"!wu-text-4xl":o.extraLarge},subtitle:{"!wu-text-sm":o.small,"!wu-text-md":o.base,"!wu-text-xl":o.large},text:{"!wu-text-xxs":o.extraSmall,"!wu-text-xs":o.small,"!wu-text-sm":o.base,"!wu-text-lg":o.large,"!wu-text-2xl":o.extraLarge}}[t]}));return{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}}const To=e.defineComponent({__name:"app-text",props:{extraSmall:{type:Boolean},inter:{type:Boolean},plus:{type:Boolean},titillium:{type:Boolean},mono:{type:Boolean},small:{type:Boolean},base:{type:Boolean},large:{type:Boolean},extraLarge:{type:Boolean},thin:{type:Boolean},extralight:{type:Boolean},light:{type:Boolean},normal:{type:Boolean},medium:{type:Boolean},semibold:{type:Boolean},bold:{type:Boolean},extrabold:{type:Boolean},black:{type:Boolean},primary:{type:Boolean},secondary:{type:Boolean},gray:{type:Boolean},neutral:{type:Boolean},white:{type:Boolean}},setup(t){const o=t,{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}=Ao("text",o);return(a,l)=>(e.openBlock(),e.createElementBlock("p",{class:e.normalizeClass(["wu-font-primary wu-text-sm wu-font-normal wu-text-gray-900 dark:wu-text-neutral-100",[e.unref(n),e.unref(r),e.unref(i),e.unref(s)]])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),Pe=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n},V=Pe(To,[["__scopeId","data-v-5fc0fe9d"]]),j=e.defineComponent({__name:"app-group",props:{fit:{type:Boolean},full:{type:Boolean},row:{type:Boolean},col:{type:Boolean},gapNone:{type:Boolean},gapXs:{type:Boolean},gapBase:{type:Boolean},gapSm:{type:Boolean},gapMd:{type:Boolean},gapLg:{type:Boolean},wrap:{type:Boolean},paddingNone:{type:Boolean},paddingBase:{type:Boolean},paddingXs:{type:Boolean},paddingSm:{type:Boolean},paddingMd:{type:Boolean},paddingLg:{type:Boolean},center:{type:Boolean},justifyEnd:{type:Boolean},centerBetween:{type:Boolean},border:{type:Boolean},borderPrimary:{type:Boolean},rounded:{type:Boolean},roundedTop:{type:Boolean},roundedBottom:{type:Boolean},bgPrimary:{type:Boolean},bgWhite:{type:Boolean},divisor:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>o.fit?"wu-w-fit wu-h-fit":o.full?"wu-w-full wu-h-full":""),r=e.computed(()=>o.justifyEnd?"wu-items-end wu-justify-end":o.center?"wu-items-center wu-justify-center":o.centerBetween?"wu-items-center wu-justify-between":""),i=e.computed(()=>o.row?"wu-flex-row":o.col?"wu-flex-col":"wu-flex-row"),s=e.computed(()=>o.gapBase?"wu-gap-4":o.gapXs?"wu-gap-1":o.gapSm?"wu-gap-2":o.gapMd?"wu-gap-6":o.gapLg?"wu-gap-8":o.gapNone?"wu-gap-0":"wu-gap-4"),a=e.computed(()=>o.wrap?"wu-flex-wrap":""),l=e.computed(()=>o.paddingXs?"wu-p-1":o.paddingSm?"wu-p-2":o.paddingBase?"wu-p-4":o.paddingMd?"wu-p-6":o.paddingLg?"wu-p-8":""),u=e.computed(()=>o.border?"wu-border":o.borderPrimary?"wu-border wu-border-primary":""),c=e.computed(()=>o.rounded?"wu-rounded-md":o.roundedTop?"wu-rounded-t-md":o.roundedBottom?"wu-rounded-b-md":""),w=e.computed(()=>o.bgPrimary?"wu-bg-primary":o.bgWhite?"wu-bg-white":""),h=e.computed(()=>o.divisor&&o.col?"wu-divide-y":o.divisor&&o.row?"wu-divide-x":""),f=e.computed(()=>[i.value,s.value,a.value,l.value,r.value,u.value,c.value,w.value,n.value,h.value]);return(p,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",f.value])},[e.renderSlot(p.$slots,"default")],2))}}),No={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},Vo=["value","type","placeholder","disabled","maxlength","aria-invalid"],Je=e.defineComponent({__name:"app-form-text-input",props:{modelValue:{default:""},type:{default:"text"},placeholder:{},maxLength:{},disabled:{type:Boolean},invalid:{type:Boolean},valid:{type:Boolean},fluid:{type:Boolean},maskFunction:{}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function a(g){return!!s.value[g]}const l=e.ref(""),u=e.ref(!1);function c(g){if(!r.maskFunction)return g;try{const d=r.maskFunction(g);return typeof d=="string"?d:g}catch{return g}}e.watch(()=>r.modelValue,g=>{if(g==null){l.value="";return}l.value=r.maskFunction?c(g):g},{immediate:!0});const{width:w}=It(r),h=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":""),f=e.computed(()=>r.invalid?"wu-text-red-600 placeholder:wu-text-red-300 placeholder:wu-font-medium":r.valid?"wu-text-green-700 placeholder:wu-font-medium":"wu-text-gray-900 placeholder:wu-text-gray-400 placeholder:wu-font-medium dark:wu-text-neutral-100 dark:placeholder:wu-text-neutral-500"),p=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),v=e.computed(()=>r.disabled?"wu-opacity-50 wu-pointer-events-none":"");function y(g){const m=g.target.value;l.value=r.maskFunction?c(m):m,i("update:modelValue",l.value)}return o({focus:u,content:l}),(g,d)=>(e.openBlock(),e.createBlock(j,{class:e.normalizeClass([e.unref(w),v.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",No,[a("default")?(e.openBlock(),e.createBlock(V,{key:0,small:"",gray:"",class:e.normalizeClass([h.value])},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["wu-w-full wu-bg-transparent wu-border-0 wu-outline-none wu-p-0 wu-m-0 wu-appearance-none wu-font-primary wu-text-2xl wu-leading-tight wu-caret-gray-900 dark:wu-caret-white",[f.value]]),value:l.value,type:t.type,placeholder:t.placeholder,disabled:t.disabled,maxlength:t.maxLength,"aria-invalid":t.invalid?!0:void 0,onInput:y,onFocus:d[0]||(d[0]=m=>u.value=!0),onBlur:d[1]||(d[1]=m=>u.value=!1),onKeyup:d[2]||(d[2]=e.withKeys(m=>i("keyup-enter"),["enter"]))},null,42,Vo)]),a("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[p.value]])},[e.renderSlot(g.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function Eo(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),i=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,padding:r,width:i}}const L=e.defineComponent({__name:"app-icon",props:{small:Boolean,large:Boolean,extraLarge:Boolean,gray:Boolean,base:Boolean,light:Boolean,dark:Boolean,outlined:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"!wu-text-xs wu-w-4 wu-h-4":o.large?"!wu-text-2xl wu-w-8 wu-h-8":o.extraLarge?"!wu-text-4xl wu-w-10 wu-h-10":"!wu-text-base wu-w-6 wu-h-6"),r=e.computed(()=>o.dark?"wu-text-neutral-800 dark:wu-text-white":o.light?"wu-text-white dark:wu-text-neutral-800":o.gray?"wu-text-gray-500 dark:wu-text-neutral-400":""),i=e.computed(()=>o.outlined?"material-symbols-outlined":"material-icons");return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["notranslate wu-flex wu-items-center wu-justify-center wu-text-center",[n.value,r.value,i.value]]),"data-testid":"app-icon"},[e.renderSlot(s.$slots,"default")],2))}}),Po=["disabled"],zo={class:"wu-flex wu-items-center wu-justify-center wu-gap-2"},X=e.defineComponent({__name:"app-button",props:{small:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,disabled:Boolean,loading:Boolean,alert:Boolean,warning:Boolean,success:Boolean,block:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(p){return!!n.value[p]}const{height:i,textSize:s,padding:a,width:l}=Eo(o),u=e.computed(()=>o.soft?"wu-bg-primary-50 !wu-text-primary-400":o.alert?"wu-bg-red-500 !wu-text-white":o.warning?"wu-bg-amber-500 !wu-text-white":o.success?"wu-bg-green-500 !wu-text-white":o.outline?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300 dark:!wu-border-neutral-600 dark:hover:!wu-bg-neutral-700 dark:hover:!wu-border-neutral-500 dark:!wu-text-neutral-100":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100 dark:!wu-text-neutral-200 dark:hover:!wu-bg-neutral-700":o.link?"wu-bg-transparent !wu-text-blue-600 hover:wu-underline":"wu-bg-primary-500 !wu-text-[var(--wu-primary-fg)]"),c=e.computed(()=>o.block?"wu-rounded-none":o.round?"wu-rounded-full":"wu-rounded-lg"),w=e.computed(()=>o.icon&&o.small?"!wu-w-8 !wu-h-8 wu-p-0":o.icon?"!wu-w-11 !wu-h-11 wu-p-0":a.value),h=e.computed(()=>o.icon?"wu-justify-center":"wu-justify-between"),f=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(p,v)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-gap-2 wu-cursor-pointer wu-transition-all wu-border wu-border-transparent disabled:wu-opacity-50 disabled:wu-pointer-events-none hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80",[e.unref(s),u.value,c.value,e.unref(l),e.unref(i),f.value,w.value,h.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:v[0]||(v[0]=y=>p.$emit("click",y))},[e.createElementVNode("div",zo,[t.loading?(e.openBlock(),e.createBlock(L,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...v[1]||(v[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):r("icon")?(e.openBlock(),e.createBlock(L,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&r("default")?(e.openBlock(),e.createBlock(V,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&r("trailing")?(e.openBlock(),e.createBlock(L,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,Po))}}),Lo=["aria-hidden"],Mo=e.defineComponent({__name:"app-carousel",props:{modelValue:{default:0},vertical:{type:Boolean},fill:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.useSlots(),a=e.ref(null),l=e.ref(null),u=e.ref(0),c=e.ref(0),w=e.ref(!1);let h=null;const f=e.computed(()=>Math.max(r.modelValue,0)),p=()=>(s.default?.()??[]).flatMap(x=>x.type===e.Comment||x.type===e.Text?[]:x.type===e.Fragment?(x.children??[]).filter($=>!!$&&typeof $=="object"&&$.type!==e.Comment&&$.type!==e.Text):[x]),v=x=>{const $=Math.abs(x-f.value);return $===0?"is-active":$===1?"is-adjacent":"is-far"},y=x=>{const $=l.value?.childElementCount||p().length,N=Math.min(Math.max(x,0),Math.max($-1,0));N!==r.modelValue&&i("update:modelValue",N)},g=()=>{const x=a.value;x&&(x.scrollLeft&&(x.scrollLeft=0),x.scrollTop&&(x.scrollTop=0))},d=()=>{const x=a.value,$=l.value;if(!x||!$)return;g();const N=[...$.children],A=parseFloat(getComputedStyle($).gap)||0,P=parseFloat(getComputedStyle(x).scrollPaddingTop)||0,k=z=>r.vertical?z.offsetHeight:z.offsetWidth,T=N[f.value]?k(N[f.value]):0,E=r.vertical&&r.fill?Math.max((x.clientHeight-T)/2,0):P,R=N.slice(0,f.value).reduce((z,M)=>z+k(M)+A,0);u.value=E-R,c.value=r.vertical&&!r.fill?T+P*2:0,w.value=!0},m=()=>{h?.disconnect();const x=a.value,$=l.value;if(!(!x||!$)&&(d(),!(typeof ResizeObserver>"u"))){if(h=new ResizeObserver(d),h.observe(x),r.vertical)for(const N of $.children)h.observe(N);x.removeEventListener("scroll",g),x.addEventListener("scroll",g,{passive:!0})}},b=e.computed(()=>[r.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":w.value,"wu-carousel--fill":r.fill}]),B=e.computed(()=>r.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),_=e.computed(()=>{if(!(!r.vertical||r.fill||!c.value))return{height:`${c.value}px`}}),C=e.computed(()=>{const x=`${u.value}px`;return{transform:r.vertical?`translate3d(0, ${x}, 0)`:`translate3d(${x}, 0, 0)`}});return e.watch(()=>[r.vertical,r.fill,r.modelValue],async()=>{await e.nextTick(),m()}),e.onMounted(async()=>{await e.nextTick(),m()}),e.onBeforeUnmount(()=>{h?.disconnect(),a.value?.removeEventListener("scroll",g)}),o({next:()=>y(f.value+1),prev:()=>y(f.value-1),goTo:y}),(x,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",b.value]),ref_key:"rootRef",ref:a,"data-testid":"app-carousel",style:e.normalizeStyle(_.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",B.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(C.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p(),(N,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",v(A)]),key:N.key??A,"aria-hidden":A!==f.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N)))],10,Lo))),128))],6)],6))}}),et=Pe(Mo,[["__scopeId","data-v-744169d9"]]),Ro={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},Oo={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},Ho={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},Fo={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},Do={class:"wu-flex wu-items-center wu-gap-1.5"},tt=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,r=o,{currentStep:i,fieldHost:s,showBack:a,fields:l,form:u,continueStep:c,canContinueAt:w,introFor:h,fieldPlaceholder:f,fieldType:p,fieldMask:v,goBack:y}=So(()=>n.rule,r);return(g,d)=>(e.openBlock(),e.createElementBlock("div",Ro,[e.createElementVNode("div",Oo,[e.createElementVNode("div",Ho,[e.createElementVNode("div",{class:e.normalizeClass(["wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",{"wu-invisible wu-pointer-events-none":!e.unref(a)}]),onClick:d[0]||(d[0]=(...m)=>e.unref(y)&&e.unref(y)(...m))},[e.createVNode(L,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",Fo,[e.createElementVNode("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",b<=e.unref(i)?"wu-bg-gray-900 dark:wu-bg-white":"wu-bg-gray-200 dark:wu-bg-neutral-600"]),key:b},null,2))),128))])])]),e.createElementVNode("div",{class:"wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-pb-12",ref_key:"fieldHost",ref:s},[e.createVNode(et,{class:"wu-w-full wu-h-full",modelValue:e.unref(i),"onUpdate:modelValue":d[1]||(d[1]=m=>e.isRef(i)?i.value=m:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(m,b)=>(e.openBlock(),e.createBlock(j,{class:"wu-w-full wu-gap-8",key:m.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(j,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(h)(b).title?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)(b).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(h)(b).subtitle?(e.openBlock(),e.createBlock(V,{key:1,class:"wu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)(b).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(V,{class:"wu-opacity-50 wu-absolute -wu-top-2 wu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b+1),1)]),_:2},1024)]),_:2},1024),e.createVNode(j,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(Je,{modelValue:e.unref(u)[m.name],"onUpdate:modelValue":B=>e.unref(u)[m.name]=B,"mask-function":e.unref(v)(m.name),placeholder:e.unref(f)(m),type:e.unref(p)(m.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.alias),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(X,{fluid:"",disabled:!e.unref(w)(b),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),Io=["disabled"],Wo=["src"],ot=e.defineComponent({__name:"app-widget-anchor",props:{small:Boolean,large:Boolean,logo:{type:String,default:""},label:{type:String,default:""},outline:Boolean,ghost:Boolean,disabled:Boolean,loading:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>!!o.label.trim()),r=e.computed(()=>o.outline?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100":"wu-bg-gradient-to-br wu-from-primary-500 wu-to-secondary-500 wu-text-white"),i=e.computed(()=>n.value?o.small?"wu-h-12 wu-w-fit wu-px-3 wu-gap-2":o.large?"wu-h-16 wu-w-fit wu-px-5 wu-gap-3":"wu-h-14 wu-w-fit wu-px-4 wu-gap-2":o.small?"wu-w-12 wu-h-12 wu-p-0":o.large?"wu-w-16 wu-h-16 wu-p-0":"wu-w-14 wu-h-14 wu-p-0"),s=e.computed(()=>o.small?"wu-w-6 wu-h-6":o.large?"wu-w-8 wu-h-8":"wu-w-7 wu-h-7"),a=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(l,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-rounded-full wu-inline-flex wu-items-center wu-justify-center wu-cursor-pointer wu-overflow-hidden wu-transition-all wu-border wu-border-transparent hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80 disabled:wu-opacity-50 disabled:wu-pointer-events-none",[i.value,r.value,a.value]]),type:"button","data-testid":"app-anchor",disabled:t.disabled||t.loading,onClick:u[0]||(u[0]=c=>l.$emit("click",c))},[t.loading?(e.openBlock(),e.createBlock(L,{key:0,class:"wu-animate-spin",outlined:"",large:!t.small&&!t.large,"extra-large":t.large},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("progress_activity",-1)])]),_:1},8,["large","extra-large"])):t.logo?(e.openBlock(),e.createElementBlock("img",{key:1,class:e.normalizeClass(["wu-object-contain wu-pointer-events-none wu-select-none wu-shrink-0",s.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,Wo)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(V,{key:2,class:"!wu-text-inherit wu-whitespace-nowrap",small:!t.large,"data-testid":"app-anchor-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["small"])):e.createCommentVNode("",!0)],10,Io))}}),jo={key:0,class:"wu-flex wu-shrink-0 wu-items-end","data-testid":"app-message-avatar"},qo={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},Se=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(c){return!!n.value[c]}const i=e.computed(()=>o.tertiary),s=e.computed(()=>!i.value&&o.secondary),a=e.computed(()=>!i.value&&r("avatar")),l=e.computed(()=>i.value?"wu-justify-center":s.value?"wu-flex-row-reverse":""),u=e.computed(()=>i.value?"wu-items-center wu-flex":s.value?"wu-rounded-br-none wu-bg-primary-100 wu-p-3 dark:wu-bg-primary-900":"wu-rounded-bl-none wu-bg-gray-200 wu-p-3 dark:wu-bg-neutral-700");return(c,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex wu-items-end wu-gap-2 wu-w-full",l.value]),"data-testid":"app-message"},[a.value?(e.openBlock(),e.createElementBlock("div",jo,[e.renderSlot(c.$slots,"avatar")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-md wu-relative wu-min-h-8",u.value]),"data-testid":"app-message-bubble"},[e.renderSlot(c.$slots,"default"),r("trailing")?(e.openBlock(),e.createElementBlock("div",qo,[e.renderSlot(c.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),nt=e.defineComponent({__name:"app-skeleton",props:{round:Boolean,fluid:Boolean,block:Boolean},setup(t){const o=t,n=e.computed(()=>o.fluid?"!wu-w-full":""),r=e.computed(()=>o.round?"!wu-rounded-full":o.block?"!wu-rounded-none":"!wu-rounded-lg");return(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-animate-pulse wu-bg-gray-200 dark:wu-bg-neutral-700",[r.value,n.value]])},null,2))}}),rt=e.defineComponent({__name:"app-empty",props:{error:{type:Boolean,default:!1}},emits:["refetch"],setup(t,{emit:o}){const n=o,r=e.computed(()=>e.useSlots());function i(s){return!!r.value[s]}return(s,a)=>(e.openBlock(),e.createBlock(j,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(L,{key:0,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):i("icon")?e.renderSlot(s.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(L,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(V,{class:"wu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(X,{key:3,onClick:a[0]||(a[0]=l=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...a[3]||(a[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[a[4]||(a[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),Go={class:"wu-flex wu-flex-col wu-items-center wu-h-full wu-w-full wu-overflow-hidden"},Zo={key:0,class:"wu-w-full wu-h-12"},Uo={key:0,class:"wu-flex wu-items-center wu-justify-center wu-rounded-full wu-bg-gray-100 wu-w-7 wu-h-7 dark:wu-bg-neutral-700"},Xo=["src"],Ko={key:1,class:"wu-flex wu-w-7 wu-h-7"},Yo={key:0,class:"wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-flex-col dark:wu-border-neutral-700"},Qo=["onKeydown","disabled"],Jo={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},it=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["send-message","retry-loading-messages"],setup(t,{emit:o}){const n=o,{history:r,chat:i}=ue(),{isErrorLoadingMessages:s,isLoadingMessages:a,isSendingMessage:l,messages:u,text:c,setMessages:w}=i,h=e.computed(()=>r.value.length>0),f=e.ref(null),p=(d=!0)=>{const m=f.value;m&&m.scrollTo({top:m.scrollHeight,behavior:d?"smooth":"auto"})},v=d=>`https://api.dicebear.com/10.x/marbles/svg?backgroundColor=&seed=${d==="operator"?"operator":"user"}`,y=()=>{n("send-message",c.value)};e.watch(()=>u.value.length,async()=>{await e.nextTick(),p()}),e.onMounted(()=>{p(!1)});const g=(d,m,b)=>m[b-1]?.from===d.from?"wu-mt-1":"wu-mt-4";return(d,m)=>(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",{class:"wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-overflow-y-auto",ref_key:"messagesList",ref:f,"data-testid":"app-service-messages"},[h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Zo)),e.unref(a)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(b,B)=>e.createVNode(Se,{key:B,primary:B%2===0,secondary:B%2===1},{default:e.withCtx(()=>[e.createVNode(nt,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(s)?(e.openBlock(),e.createBlock(rt,{key:2,class:"wu-h-full",onRefetch:m[0]||(m[0]=b=>n("retry-loading-messages")),error:""},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode("Ocorreu um erro ao carregar as mensagens.",-1)])]),_:1})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(e.unref(u),(b,B)=>(e.openBlock(),e.createBlock(Se,{key:B,primary:b.from==="operator",secondary:b.from==="contact",tertiary:b.from==="system",class:e.normalizeClass([g(b,e.unref(u),B)])},e.createSlots({default:e.withCtx(()=>[b.from=="system"?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-text-center",gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.text),1)]),_:2},1024)):(e.openBlock(),e.createBlock(V,{key:1,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.text),1)]),_:2},1024))]),_:2},[b.from==="operator"?{name:"avatar",fn:e.withCtx(()=>[e.unref(u)[B+1]?.from!==b.from?(e.openBlock(),e.createElementBlock("div",Uo,[e.createElementVNode("img",{class:"wu-rounded-full wu-w-full wu-h-full wu-object-contain",src:v(b.from)},null,8,Xo)])):(e.openBlock(),e.createElementBlock("div",Ko))]),key:"0"}:void 0,b.from!=="system"?{name:"trailing",fn:e.withCtx(()=>[e.createVNode(V,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[...m[3]||(m[3]=[e.createTextVNode("12:58",-1)])]),_:1})]),key:"1"}:void 0]),1032,["primary","secondary","tertiary","class"]))),128)),m[4]||(m[4]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-8"},null,-1))],512),!e.unref(a)&&!e.unref(s)?(e.openBlock(),e.createElementBlock("div",Yo,[e.withDirectives(e.createElementVNode("textarea",{class:"wu-w-full wu-p-6 wu-resize-none wu-font-primary wu-text-xs wu-bg-transparent wu-text-gray-900 placeholder:wu-text-neutral placeholder:wu-text-xs placeholder:wu-font-normal focus:wu-outline-none dark:wu-text-neutral-100 [&:disabled]:wu-opacity-50","onUpdate:modelValue":m[1]||(m[1]=b=>e.isRef(c)?c.value=b:null),onKeydown:e.withKeys(e.withModifiers(y,["exact","prevent"]),["enter"]),placeholder:"Escreva uma mensagem...",disabled:e.unref(l)},null,40,Qo),[[e.vModelText,e.unref(c)]]),e.createElementVNode("div",Jo,[e.createVNode(X,{disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(L,{class:"wu-rotate-45"},{default:e.withCtx(()=>[...m[5]||(m[5]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"]),e.createVNode(X,{onClick:y,loading:e.unref(l),disabled:!e.unref(c),small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(L,null,{default:e.withCtx(()=>[...m[6]||(m[6]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)]))}}),en=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},Wt=()=>{const t="#6D3595",o=i=>{const s=i.replace("#","").trim(),a=s.length===3&&/^[0-9a-fA-F]{3}$/.test(s)?`${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:s;return a.length!==6||!/^[0-9a-fA-F]{6}$/.test(a)?null:{r:parseInt(a.slice(0,2),16),g:parseInt(a.slice(2,4),16),b:parseInt(a.slice(4,6),16)}};return{isLightHex:i=>{const s=o(i);return s?(s.r*299+s.g*587+s.b*114)/1e3>160:!1},normalizeHex:i=>{const s=o(i)??o(t);return s?en(s):t.toLowerCase()},parseHex:o}},tn=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,jt=t=>{const{isLightHex:o,normalizeHex:n,parseHex:r}=Wt(),i=(h,f)=>h==="dark"?"dark":h==="light"?"light":f?"dark":"light",s=h=>{const f=n(h),p=r(f)??{r:109,g:53,b:149},v=o(f);return{"--wu-primary":f,"--wu-primary-rgb":`${p.r} ${p.g} ${p.b}`,"--wu-primary-fg":v?"#1c1917":"#ffffff","--wu-primary-border":v?"#e5e7eb":"color-mix(in srgb, var(--wu-primary-fg) 22%, transparent)","--wu-primary-50":`color-mix(in srgb, ${f} 8%, white)`,"--wu-primary-100":`color-mix(in srgb, ${f} 22%, white)`,"--wu-primary-200":`color-mix(in srgb, ${f} 38%, white)`,"--wu-primary-300":`color-mix(in srgb, ${f} 55%, white)`,"--wu-primary-400":v?`color-mix(in srgb, ${f} 70%, black)`:`color-mix(in srgb, ${f} 78%, white)`,"--wu-primary-500":f,"--wu-primary-600":`color-mix(in srgb, ${f} 82%, black)`,"--wu-primary-700":`color-mix(in srgb, ${f} 64%, black)`,"--wu-primary-800":`color-mix(in srgb, ${f} 42%, black)`,"--wu-primary-900":`color-mix(in srgb, ${f} 22%, black)`}},a=h=>{const f=e.ref(tn()),p=e.computed(()=>i(e.toValue(h),f.value)),v=e.computed(()=>p.value==="dark"),y=e.computed(()=>v.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const g=window.matchMedia("(prefers-color-scheme: dark)");f.value=g.matches;const d=m=>{f.value=m.matches};g.addEventListener("change",d),e.onBeforeUnmount(()=>g.removeEventListener("change",d))}),{isDark:v,resolvedTheme:p,themeClass:y}},{isDark:l,themeClass:u,resolvedTheme:c}=a(()=>e.toValue(t).theme),w=e.computed(()=>({...s(e.toValue(t).primaryColor),colorScheme:c.value}));return{isDark:l,themeClass:u,resolvedTheme:c,appearanceStyle:w}},on={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},nn={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},rn=["src"],sn={key:1,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},an=["src"],ln=["src"],st=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i}=ue(),s=e.computed(()=>i.value.length>0),a=e.computed(()=>n.edges??[]),l=e.computed(()=>n.rule.settings?.body);return(u,c)=>(e.openBlock(),e.createElementBlock("div",on,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nn)),e.createVNode(j,{class:"wu-px-6 wu-w-full",col:"",center:"","gap-base":""},{default:e.withCtx(()=>[l.value?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-object-contain",src:l.value.logo,alt:""},null,8,rn)):e.createCommentVNode("",!0),l.value?.eyebrow?(e.openBlock(),e.createBlock(V,{key:1,class:"wu-text-center wu-uppercase wu-tracking-widest wu-leading-none","extra-small":"",gray:"",mono:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.eyebrow),1)]),_:1})):e.createCommentVNode("",!0),l.value?.title?(e.openBlock(),e.createBlock(V,{key:2,class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.title),1)]),_:1})):e.createCommentVNode("",!0),l.value?.subtitle?(e.openBlock(),e.createBlock(V,{key:3,class:"wu-w-64 wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),a.value.length?(e.openBlock(),e.createElementBlock("div",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.slice(0,3),w=>(e.openBlock(),e.createBlock(X,{class:"hover:wu-translate-x-1 wu-max-w-[25rem]",key:w.id,outline:"",fluid:"",onClick:h=>r("edge-click",w)},e.createSlots({trailing:e.withCtx(()=>[c[0]||(c[0]=e.createTextVNode("chevron_right",-1))]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},[w.settings?.body?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"wu-w-4 wu-h-4 wu-object-contain",src:w.settings.body.logo,alt:""},null,8,an)]),key:"0"}:void 0]),1032,["onClick"]))),128)),e.createElementVNode("div",{class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":a.value.slice(3).length>4,"wu-justify-center":a.value.slice(3).length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.slice(3),w=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-gap-2",key:w.id},[e.createVNode(X,{outline:"",icon:"",onClick:h=>r("edge-click",w)},e.createSlots({_:2},[w.settings?.body?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"wu-w-5 wu-h-5 wu-object-contain",src:w.settings.body.logo,alt:""},null,8,ln)]),key:"0"}:void 0]),1032,["onClick"]),e.createVNode(V,{class:"wu-w-20 wu-text-center wu-leading-3 wu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},1024)]))),128))],2)])):e.createCommentVNode("",!0)]))}}),un="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAVCAYAAAAnzezqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVtSURBVHgBpVVriFVVFF6Pvc+5c+/MOM2Yo2hq41tDU1EsC50pU9NySqZUDCQiCwWZSKJQGOpHZjhpomOGNkE4pBQUgUIPGAz9Of0oGS0tCpWY0dIf93nO3q1zzzn3Xh+J1oHLPfusvb/v299ea22EO3hmz35RN2XGNyimOrZYr8g0aFZ1RH49k63VbIcogrsI4S6Wb4qhToGRmHwjk5IYypoLiu0hzjrbNn77xiW8FeHS+vdrdQOtR7ZPC8FkhbZOQIDRgIxByU/A5V/GaC2zEMQxLMatxJGL8wwU1wbvEtNk+zGTncc3p7b4+LhhS1SKPhKAdbJwlPwSjGAFFFWJPCQKCYq7sxQQczAHICQ3VkUilGxXYhCtb1Aupm9wYMm9eychwy6FfrMAOEVSARRgGy40AZiNCEMhoQj5FokruWGBKubEDgQiojW/lgTMH3qgpro21y7A7RIcwmWykm2lXcuuigICkBCsTH7NEUFkfXhU5aMxESakVUD+6PiuxcpmdxBioyz+XianZdJ98j+FA9sE/FoBEAriCBgt8o3Hcq2oIqEBSVRLRfFFoWepdWzXWGXsIUDyQJn5Z/Xgyiqb3TCiALOE/G3F5jryEJhjG9HEZ2orRNhYqPyCHCjFCMPNBGMi/Epl2bwpZZNOg7d8qOGWqVj/k9WWLpE9nshnn0ClR8uiuUR2IBLys9j6kOxifAR0kcA/KmBSntDCYB1xpldio8SdExJvkflN8p6Rbz0iplHGj4gDuRzmO3HZhL0DAH6PsXZLyrEXZEIqVihkrxL6fRppTiNU7x5M/F3nopkIKvej67v7RNSElI8LTcIsVWDPofLqFeBWhYMLyW0Yw8ZPkZs/5xrdJyY847KtId+m2cFJhGZE66Ft70hP8V1GHFRUGMaoErGlQfmIkHuUhq/JGhiAS1UJ4DNSt0ll3BccNh0IOMO6djKBeUx8/XPIwIgtucaLrTXpBiw45oi4NC2ZqRruJ7wT5OSvWJ/nogsrRLhHycttQf6RWHFaiKbAVTgvifdLOZHk3BT1SiebGJxllatHir3JwB1AM7lKq8tgC1cdyF9R5B9z0esr3H1xpVidhLqgZ9haweGcylTLZlLaqD0OQX+ygGvBy7/05P796UCAOEB7FHoHsZ6/YJNbRqS3S4LVSLJ+nvTtcd+Fb0RETzVnTuXA3cWE9yvM7/Wsv9BRNAvBP02Mm4DgiuRKL7HfJPkdlR2AZyCoin5A/ztFtMu45ljrJ52b4/JXR05t6F47fedy2fk+1k5nUtFWT9usk4epvvK/lDqdIVb2ZD13dEL5n0nh73ZJr0A0r8lxDWfG88yFNcqolAh/Oej7iJnpijQFx+kmaLpGmCkDR1xa7fxR3V/Z+EqNaN3M9553yWwVu8YU7SdLHOcCweua/F4RclJihkulCRgdmYlqn+JykzuhWO86KlsKy/Lwko+3P1spgOKX7r72g57NLZIS+kAI0kylboYaTZNCfCDIBWmtFDSeiDyub1Jxb6C4xmNxIU4gRHJmx/Wt/6a34eYH3xoHpFdLpm+SnQ2N22h4sQgYhgTXdb+wQVV8q2xg0tQ+XdT97qrbEhA/Hcs7kphxnhMHXhGQCSIg6v8QVkkwrrA7uqyKIsN2W7wJAwHS17w5zd07f7sjASUhHR1UcxIXCFg7sV0sgnTZARNdMCAiDKqKS6d8kZmNzQc799wM+7YExE9bWxu3ZKctEGvbmf1FQuaWGxdAOQHLF5EIPqN0et7DXV1//W8BlU/XUx3Dqtlbr8msF7KRlW6UckaaHLC3qvnDnT/8G85/FhA/h9s6HFKZVulya6SC5Ao30l3xdym7o5C2B5p7dgzeav0/0mtgehRo/YYAAAAASUVORK5CYII=",cn={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},dn={class:"wu-w-full wu-shrink-0 wu-border-b wu-flex wu-items-center wu-px-4 wu-justify-between wu-gap-2 wu-bg-primary wu-h-[4.4rem] wu-text-[var(--wu-primary-fg)] wu-border-[var(--wu-primary-border)]"},pn={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},fn=["src"],mn={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},hn={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},wn={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},gn={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},vn={class:"wu-h-7 wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-items-center wu-justify-center wu-p-2 wu-gap-1 wu-bg-white dark:wu-border-neutral-700 dark:wu-bg-neutral-800"},yn=["src"],xn=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["send-message","retry-loading-messages","edge-click","submit","close","back"],setup(t,{emit:o}){const n=t,r=o,{history:i,currentRule:s,edges:a,setWorkflow:l}=ue(),{appearanceStyle:u,themeClass:c}=jt(()=>n.config.configurations.appearance);l(n.workflow),e.watch(()=>n.workflow,g=>l(g));const w=e.computed(()=>i.value.length>0),h=e.computed(()=>w.value&&s.value?.action!=="identification"),f=e.computed(()=>n.config.configurations.general.isClosable),p={identification:tt,service:it,screen:st},v=e.computed(()=>{const g=s.value?.action;return g&&g in p?p[g]:void 0}),y=e.computed(()=>n.fullscreen?"wu-w-screen wu-h-screen":"wu-w-[24.4rem] wu-h-[38rem] widget-shadow wu-rounded-2xl");return(g,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[y.value,e.unref(c)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("div",cn,[e.createElementVNode("div",dn,[e.createElementVNode("div",pn,[e.unref(s)?.settings?.header?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-9 wu-h-9 wu-object-contain wu-rounded-lg wu-shrink-0",src:e.unref(s).settings.header.logo,alt:""},null,8,fn)):e.createCommentVNode("",!0),e.createElementVNode("div",mn,[e.unref(s)?.settings?.header?.title?(e.openBlock(),e.createBlock(V,{key:0,class:"wu-w-full wu-truncate !wu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).settings.header.title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)?.settings?.header?.subtitle?(e.openBlock(),e.createBlock(V,{key:1,class:"wu-w-full wu-truncate !wu-text-inherit wu-opacity-75","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).settings.header.subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),f.value?(e.openBlock(),e.createBlock(X,{key:0,class:"wu-shrink-0 !wu-bg-transparent hover:!wu-bg-[color-mix(in_srgb,var(--wu-primary-fg)_12%,transparent)]",onClick:d[0]||(d[0]=m=>r("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(L,null,{default:e.withCtx(()=>[...d[7]||(d[7]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",hn,[e.createVNode(e.Transition,{name:"page-transition",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-w-full wu-h-full wu-min-h-0",key:e.unref(s)?.id},[h.value?(e.openBlock(),e.createElementBlock("div",wn,[e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",onClick:d[1]||(d[1]=m=>r("back"))},[e.createVNode(L,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...d[8]||(d[8]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(V,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",gn,[v.value&&e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0,rule:e.unref(s),edges:e.unref(a),onSubmit:d[2]||(d[2]=m=>r("submit",m)),onBack:d[3]||(d[3]=m=>r("back")),onEdgeClick:d[4]||(d[4]=m=>r("edge-click",m)),onSendMessage:d[5]||(d[5]=m=>r("send-message",m)),onRetryLoadingMessages:d[6]||(d[6]=m=>r("retry-loading-messages"))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",vn,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref(un),alt:"Opens"},null,8,yn),e.createVNode(V,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),at=Pe(xn,[["__scopeId","data-v-fbee4c58"]]),bn={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},kn={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},Cn=["value","type","disabled","maxlength"],$n={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},qt=e.defineComponent({__name:"app-text-input",props:{modelValue:{default:""},type:{default:"text"},maxLength:{},disabled:{type:Boolean},loading:{type:Boolean},invalid:{type:Boolean},small:{type:Boolean},fluid:{type:Boolean},round:{type:Boolean},valid:{type:Boolean},block:{type:Boolean},maskFunction:{},passwordToggle:{type:Boolean}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function a(C){return!!s.value[C]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function w(C){if(!r.maskFunction)return C;try{const x=r.maskFunction(C);return typeof x=="string"?x:C}catch{return C}}e.watch(()=>r.modelValue,C=>{if(C==null){l.value="";return}l.value=r.maskFunction?w(C):C},{immediate:!0});function h(){return!(u.value||l.value)}const{height:f,textSize:p,width:v}=It(r),y=e.computed(()=>r.invalid?"wu-border-red-500 focus-within:wu-border-red-500":r.valid?"wu-border-green-500 focus-within:wu-border-green-500":"wu-border-gray-200 focus-within:!wu-border-primary/40 hover:wu-border-gray-300"),g=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),d=e.computed(()=>r.small&&h()?"wu-translate-y-[7px]":r.small&&!h()?"wu-translate-y-0":h()?"wu-translate-y-[11px]":"wu-translate-y-0"),m=e.computed(()=>a("icon")||r.loading?"wu-pl-[34px]":"wu-pl-3"),b=e.computed(()=>r.block?"wu-rounded-none":r.round?"wu-rounded-full":"wu-rounded-lg"),B=e.computed(()=>r.disabled||r.loading?"wu-opacity-50 wu-pointer-events-none":"");function _(C){const $=C.target.value;l.value=r.maskFunction?w($):$,i("update:modelValue",l.value)}return o({focus:u,content:l}),(C,x)=>(e.openBlock(),e.createBlock(j,{class:e.normalizeClass([e.unref(v)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(j,{col:"","gap-sm":""},{default:e.withCtx(()=>[a("label")?(e.openBlock(),e.createBlock(V,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"label")]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("label",{class:e.normalizeClass(["wu-relative wu-flex wu-flex-col wu-justify-center wu-items-start wu-border wu-cursor-text wu-transition-colors wu-w-full wu-bg-transparent",[b.value,B.value,e.unref(f),y.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",bn,[e.createElementVNode("div",kn,[!t.loading&&a("icon")?(e.openBlock(),e.createBlock(L,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(L,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...x[4]||(x[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{class:e.normalizeClass(["wu-py-1 wu-transition",[d.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default")]),_:3},8,["class"])]),e.createElementVNode("input",{class:e.normalizeClass(["wu-absolute wu-inset-0 wu-w-full wu-h-full wu-outline-none wu-appearance-none wu-bg-transparent wu-pt-3 wu-pr-3 wu-text-gray-700 wu-font-primary wu-z-0",[e.unref(p),m.value,b.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:_,onFocus:x[0]||(x[0]=$=>u.value=!0),onBlur:x[1]||(x[1]=$=>u.value=!1),onKeyup:x[2]||(x[2]=e.withKeys($=>i("keyup-enter"),["enter"]))},null,42,Cn),e.createElementVNode("div",$n,[t.maxLength?(e.openBlock(),e.createBlock(V,{key:0,small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`${l.value.length} / ${t.maxLength}`),1)]),_:1})):e.createCommentVNode("",!0),t.type==="password"&&t.passwordToggle?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-bg-transparent wu-border-0 wu-p-0 wu-cursor-pointer wu-flex wu-items-center",type:"button",tabindex:"-1",onClick:x[3]||(x[3]=$=>c.value=!c.value)},[e.createVNode(L,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"suffix")])],2)]),_:3}),a("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[g.value]])},[e.renderSlot(C.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Bn=()=>{const{isLightHex:t,normalizeHex:o}=Wt();return{getOffset:(s,a)=>{const l=`${a.x}px`,u=`${a.y}px`;switch(s){case"bottom-left":return{bottom:u,left:l};case"top-left":return{top:u,left:l};case"top-right":return{top:u,right:l};default:return{bottom:u,right:l}}},getPosition:s=>{switch(s){case"bottom-left":return"bottom left";case"top-left":return"top left";case"top-right":return"top right";default:return"bottom right"}},getTone:s=>{const a=o(s);return{backgroundImage:"none",backgroundColor:a,color:t(a)?"#1c1917":"#ffffff"}}}},_n=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["send-message","retry-loading-messages","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(n.config.configurations.general.defaultBehavior==="active"),s=e.ref(!i.value),{setWorkflow:a}=ue(),{getOffset:l,getPosition:u,getTone:c}=Bn(),{appearanceStyle:w,themeClass:h}=jt(()=>n.config.configurations.appearance),f=e.computed(()=>n.config.configurations.anchor),p=e.computed(()=>n.config.configurations.appearance),v=e.computed(()=>{if(!(i.value&&n.fullscreen))return l(f.value.position,f.value.offset)}),y=e.computed(()=>u(f.value.position)),g=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),d=e.computed(()=>({style:c(p.value.primaryColor),small:f.value.size==="small",large:f.value.size==="large",logo:f.value.logo??"",label:f.value.label??""})),m=async()=>{i.value||(s.value=!1,await e.nextTick(),i.value=!0,r("open"))},b=()=>{i.value&&(i.value=!1,r("close"))},B=()=>{s.value=!0};return a(n.workflow),e.watch(()=>n.workflow,_=>a(_)),e.watch(()=>n.config.configurations.general.defaultBehavior,_=>{_==="active"?m():b()}),(_,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(h),i.value&&t.fullscreen?"wu-inset-0":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":y.value},v.value,e.unref(w)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:B},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(at,e.mergeProps({key:0},g.value,{onClose:b,onBack:C[0]||(C[0]=x=>r("back")),onSubmit:C[1]||(C[1]=x=>r("submit",x)),onEdgeClick:C[2]||(C[2]=x=>r("edge-click",x)),onSendMessage:C[3]||(C[3]=x=>r("send-message",x)),onRetryLoadingMessages:C[4]||(C[4]=x=>r("retry-loading-messages"))}),null,16)):e.createCommentVNode("",!0)]),_:1}),s.value?(e.openBlock(),e.createBlock(ot,{key:0,style:e.normalizeStyle(d.value.style),small:d.value.small,large:d.value.large,logo:d.value.logo,label:d.value.label,onClick:m},null,8,["style","small","large","logo","label"])):e.createCommentVNode("",!0)],6))}}),Gt=Pe(_n,[["__scopeId","data-v-cabdae96"]]),Sn=["top","right","bottom","left"],ft=["start","end"],mt=Sn.reduce((t,o)=>t.concat(o,o+"-"+ft[0],o+"-"+ft[1]),[]),ye=Math.min,ne=Math.max,An={left:"right",right:"left",bottom:"top",top:"bottom"},Tn={start:"end",end:"start"};function Ze(t,o,n){return ne(t,ye(o,n))}function re(t,o){return typeof t=="function"?t(o):t}function Z(t){return t.split("-")[0]}function D(t){return t.split("-")[1]}function Zt(t){return t==="x"?"y":"x"}function lt(t){return t==="y"?"height":"width"}const Nn=new Set(["top","bottom"]);function U(t){return Nn.has(Z(t))?"y":"x"}function ut(t){return Zt(U(t))}function Ut(t,o,n){n===void 0&&(n=!1);const r=D(t),i=ut(t),s=lt(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(a=Te(a)),[a,Te(a)]}function Vn(t){const o=Te(t);return[Ae(t),o,Ae(o)]}function Ae(t){return t.replace(/start|end/g,o=>Tn[o])}const ht=["left","right"],wt=["right","left"],En=["top","bottom"],Pn=["bottom","top"];function zn(t,o,n){switch(t){case"top":case"bottom":return n?o?wt:ht:o?ht:wt;case"left":case"right":return o?En:Pn;default:return[]}}function Ln(t,o,n,r){const i=D(t);let s=zn(Z(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),o&&(s=s.concat(s.map(Ae)))),s}function Te(t){return t.replace(/left|right|bottom|top/g,o=>An[o])}function Mn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Xt(t){return typeof t!="number"?Mn(t):{top:t,right:t,bottom:t,left:t}}function he(t){const{x:o,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:o,right:o+r,bottom:n+i,x:o,y:n}}function gt(t,o,n){let{reference:r,floating:i}=t;const s=U(o),a=ut(o),l=lt(a),u=Z(o),c=s==="y",w=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,f=r[l]/2-i[l]/2;let p;switch(u){case"top":p={x:w,y:r.y-i.height};break;case"bottom":p={x:w,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-i.width,y:h};break;default:p={x:r.x,y:r.y}}switch(D(o)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const Rn=async(t,o,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(o));let c=await a.getElementRects({reference:t,floating:o,strategy:i}),{x:w,y:h}=gt(c,r,u),f=r,p={},v=0;for(let y=0;y<l.length;y++){const{name:g,fn:d}=l[y],{x:m,y:b,data:B,reset:_}=await d({x:w,y:h,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:a,elements:{reference:t,floating:o}});w=m??w,h=b??h,p={...p,[g]:{...p[g],...B}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:o,strategy:i}):_.rects),{x:w,y:h}=gt(c,f,u)),y=-1)}return{x:w,y:h,placement:f,strategy:i,middlewareData:p}};async function ze(t,o){var n;o===void 0&&(o={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:w="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=re(o,t),v=Xt(p),g=l[f?h==="floating"?"reference":"floating":h],d=he(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:w,strategy:u})),m=h==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),B=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},_=he(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:b,strategy:u}):m);return{top:(d.top-_.top+v.top)/B.y,bottom:(_.bottom-d.bottom+v.bottom)/B.y,left:(d.left-_.left+v.left)/B.x,right:(_.right-d.right+v.right)/B.x}}const On=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=o,{element:c,padding:w=0}=re(t,o)||{};if(c==null)return{};const h=Xt(w),f={x:n,y:r},p=ut(i),v=lt(p),y=await a.getDimensions(c),g=p==="y",d=g?"top":"left",m=g?"bottom":"right",b=g?"clientHeight":"clientWidth",B=s.reference[v]+s.reference[p]-f[p]-s.floating[v],_=f[p]-s.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let x=C?C[b]:0;(!x||!await(a.isElement==null?void 0:a.isElement(C)))&&(x=l.floating[b]||s.floating[v]);const $=B/2-_/2,N=x/2-y[v]/2-1,A=ye(h[d],N),P=ye(h[m],N),k=A,T=x-y[v]-P,E=x/2-y[v]/2+$,R=Ze(k,E,T),z=!u.arrow&&D(i)!=null&&E!==R&&s.reference[v]/2-(E<k?A:P)-y[v]/2<0,M=z?E<k?E-k:E-T:0;return{[p]:f[p]+M,data:{[p]:R,centerOffset:E-R-M,...z&&{alignmentOffset:M}},reset:z}}});function Hn(t,o,n){return(t?[...n.filter(i=>D(i)===t),...n.filter(i=>D(i)!==t)]:n.filter(i=>Z(i)===i)).filter(i=>t?D(i)===t||(o?Ae(i)!==i:!1):!0)}const Fn=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,r,i;const{rects:s,middlewareData:a,placement:l,platform:u,elements:c}=o,{crossAxis:w=!1,alignment:h,allowedPlacements:f=mt,autoAlignment:p=!0,...v}=re(t,o),y=h!==void 0||f===mt?Hn(h||null,p,f):f,g=await ze(o,v),d=((n=a.autoPlacement)==null?void 0:n.index)||0,m=y[d];if(m==null)return{};const b=Ut(m,s,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==m)return{reset:{placement:y[0]}};const B=[g[Z(m)],g[b[0]],g[b[1]]],_=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:m,overflows:B}],C=y[d+1];if(C)return{data:{index:d+1,overflows:_},reset:{placement:C}};const x=_.map(A=>{const P=D(A.placement);return[A.placement,P&&w?A.overflows.slice(0,2).reduce((k,T)=>k+T,0):A.overflows[0],A.overflows]}).sort((A,P)=>A[1]-P[1]),N=((i=x.filter(A=>A[2].slice(0,D(A[0])?2:3).every(P=>P<=0))[0])==null?void 0:i[0])||x[0][0];return N!==l?{data:{index:d+1,overflows:_},reset:{placement:N}}:{}}}},Dn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=o,{mainAxis:w=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...g}=re(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const d=Z(i),m=U(l),b=Z(l)===l,B=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=f||(b||!y?[Te(l)]:Vn(l)),C=v!=="none";!f&&C&&_.push(...Ln(l,y,v,B));const x=[l,..._],$=await ze(o,g),N=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(w&&N.push($[d]),h){const E=Ut(i,a,B);N.push($[E[0]],$[E[1]])}if(A=[...A,{placement:i,overflows:N}],!N.every(E=>E<=0)){var P,k;const E=(((P=s.flip)==null?void 0:P.index)||0)+1,R=x[E];if(R&&(!(h==="alignment"?m!==U(R):!1)||A.every(O=>U(O.placement)===m?O.overflows[0]>0:!0)))return{data:{index:E,overflows:A},reset:{placement:R}};let z=(k=A.filter(M=>M.overflows[0]<=0).sort((M,O)=>M.overflows[1]-O.overflows[1])[0])==null?void 0:k.placement;if(!z)switch(p){case"bestFit":{var T;const M=(T=A.filter(O=>{if(C){const W=U(O.placement);return W===m||W==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(W=>W>0).reduce((W,xo)=>W+xo,0)]).sort((O,W)=>O[1]-W[1])[0])==null?void 0:T[0];M&&(z=M);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}},In=new Set(["left","top"]);async function Wn(t,o){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Z(n),l=D(n),u=U(n)==="y",c=In.has(a)?-1:1,w=s&&u?-1:1,h=re(o,t);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),u?{x:p*w,y:f*c}:{x:f*c,y:p*w}}const jn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=o,u=await Wn(o,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},qn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:i}=o,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:d,y:m}=g;return{x:d,y:m}}},...u}=re(t,o),c={x:n,y:r},w=await ze(o,u),h=U(Z(i)),f=Zt(h);let p=c[f],v=c[h];if(s){const g=f==="y"?"top":"left",d=f==="y"?"bottom":"right",m=p+w[g],b=p-w[d];p=Ze(m,p,b)}if(a){const g=h==="y"?"top":"left",d=h==="y"?"bottom":"right",m=v+w[g],b=v-w[d];v=Ze(m,v,b)}const y=l.fn({...o,[f]:p,[h]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:s,[h]:a}}}}}},Gn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:i,rects:s,platform:a,elements:l}=o,{apply:u=()=>{},...c}=re(t,o),w=await ze(o,c),h=Z(i),f=D(i),p=U(i)==="y",{width:v,height:y}=s.floating;let g,d;h==="top"||h==="bottom"?(g=h,d=f===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(d=h,g=f==="end"?"top":"bottom");const m=y-w.top-w.bottom,b=v-w.left-w.right,B=ye(y-w[g],m),_=ye(v-w[d],b),C=!o.middlewareData.shift;let x=B,$=_;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&($=b),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(x=m),C&&!f){const A=ne(w.left,0),P=ne(w.right,0),k=ne(w.top,0),T=ne(w.bottom,0);p?$=v-2*(A!==0||P!==0?A+P:ne(w.left,w.right)):x=y-2*(k!==0||T!==0?k+T:ne(w.top,w.bottom))}await u({...o,availableWidth:$,availableHeight:x});const N=await a.getDimensions(l.floating);return v!==N.width||y!==N.height?{reset:{rects:!0}}:{}}}};function H(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function q(t){return H(t).getComputedStyle(t)}const vt=Math.min,we=Math.max,Ne=Math.round;function Kt(t){const o=q(t);let n=parseFloat(o.width),r=parseFloat(o.height);const i=t.offsetWidth,s=t.offsetHeight,a=Ne(n)!==i||Ne(r)!==s;return a&&(n=i,r=s),{width:n,height:r,fallback:a}}function ee(t){return Qt(t)?(t.nodeName||"").toLowerCase():""}let $e;function Yt(){if($e)return $e;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?($e=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),$e):navigator.userAgent}function G(t){return t instanceof H(t).HTMLElement}function Q(t){return t instanceof H(t).Element}function Qt(t){return t instanceof H(t).Node}function yt(t){return typeof ShadowRoot>"u"?!1:t instanceof H(t).ShadowRoot||t instanceof ShadowRoot}function Le(t){const{overflow:o,overflowX:n,overflowY:r,display:i}=q(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&!["inline","contents"].includes(i)}function Zn(t){return["table","td","th"].includes(ee(t))}function Ue(t){const o=/firefox/i.test(Yt()),n=q(t),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||o&&n.willChange==="filter"||o&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((i=>n.willChange.includes(i)))||["paint","layout","strict","content"].some((i=>{const s=n.contain;return s!=null&&s.includes(i)}))}function Jt(){return!/^((?!chrome|android).)*safari/i.test(Yt())}function ct(t){return["html","body","#document"].includes(ee(t))}function eo(t){return Q(t)?t:t.contextElement}const to={x:1,y:1};function ae(t){const o=eo(t);if(!G(o))return to;const n=o.getBoundingClientRect(),{width:r,height:i,fallback:s}=Kt(o);let a=(s?Ne(n.width):n.width)/r,l=(s?Ne(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function xe(t,o,n,r){var i,s;o===void 0&&(o=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),l=eo(t);let u=to;o&&(r?Q(r)&&(u=ae(r)):u=ae(t));const c=l?H(l):window,w=!Jt()&&n;let h=(a.left+(w&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,f=(a.top+(w&&((s=c.visualViewport)==null?void 0:s.offsetTop)||0))/u.y,p=a.width/u.x,v=a.height/u.y;if(l){const y=H(l),g=r&&Q(r)?H(r):r;let d=y.frameElement;for(;d&&r&&g!==y;){const m=ae(d),b=d.getBoundingClientRect(),B=getComputedStyle(d);b.x+=(d.clientLeft+parseFloat(B.paddingLeft))*m.x,b.y+=(d.clientTop+parseFloat(B.paddingTop))*m.y,h*=m.x,f*=m.y,p*=m.x,v*=m.y,h+=b.x,f+=b.y,d=H(d).frameElement}}return{width:p,height:v,top:f,right:h+p,bottom:f+v,left:h,x:h,y:f}}function J(t){return((Qt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Me(t){return Q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function oo(t){return xe(J(t)).left+Me(t).scrollLeft}function be(t){if(ee(t)==="html")return t;const o=t.assignedSlot||t.parentNode||yt(t)&&t.host||J(t);return yt(o)?o.host:o}function no(t){const o=be(t);return ct(o)?o.ownerDocument.body:G(o)&&Le(o)?o:no(o)}function Ve(t,o){var n;o===void 0&&(o=[]);const r=no(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=H(r);return i?o.concat(s,s.visualViewport||[],Le(r)?r:[]):o.concat(r,Ve(r))}function xt(t,o,n){return o==="viewport"?he((function(r,i){const s=H(r),a=J(r),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,w=0,h=0;if(l){u=l.width,c=l.height;const f=Jt();(f||!f&&i==="fixed")&&(w=l.offsetLeft,h=l.offsetTop)}return{width:u,height:c,x:w,y:h}})(t,n)):Q(o)?he((function(r,i){const s=xe(r,!0,i==="fixed"),a=s.top+r.clientTop,l=s.left+r.clientLeft,u=G(r)?ae(r):{x:1,y:1};return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:l*u.x,y:a*u.y}})(o,n)):he((function(r){const i=J(r),s=Me(r),a=r.ownerDocument.body,l=we(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),u=we(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+oo(r);const w=-s.scrollTop;return q(a).direction==="rtl"&&(c+=we(i.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:w}})(J(t)))}function bt(t){return G(t)&&q(t).position!=="fixed"?t.offsetParent:null}function kt(t){const o=H(t);let n=bt(t);for(;n&&Zn(n)&&q(n).position==="static";)n=bt(n);return n&&(ee(n)==="html"||ee(n)==="body"&&q(n).position==="static"&&!Ue(n))?o:n||(function(r){let i=be(r);for(;G(i)&&!ct(i);){if(Ue(i))return i;i=be(i)}return null})(t)||o}function Un(t,o,n){const r=G(o),i=J(o),s=xe(t,!0,n==="fixed",o);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&n!=="fixed")if((ee(o)!=="body"||Le(i))&&(a=Me(o)),G(o)){const u=xe(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else i&&(l.x=oo(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}const Xn={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:r,strategy:i}=t;const s=n==="clippingAncestors"?(function(c,w){const h=w.get(c);if(h)return h;let f=Ve(c).filter((g=>Q(g)&&ee(g)!=="body")),p=null;const v=q(c).position==="fixed";let y=v?be(c):c;for(;Q(y)&&!ct(y);){const g=q(y),d=Ue(y);(v?d||p:d||g.position!=="static"||!p||!["absolute","fixed"].includes(p.position))?p=g:f=f.filter((m=>m!==y)),y=be(y)}return w.set(c,f),f})(o,this._c):[].concat(n),a=[...s,r],l=a[0],u=a.reduce(((c,w)=>{const h=xt(o,w,i);return c.top=we(h.top,c.top),c.right=vt(h.right,c.right),c.bottom=vt(h.bottom,c.bottom),c.left=we(h.left,c.left),c}),xt(o,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:o,offsetParent:n,strategy:r}=t;const i=G(n),s=J(n);if(n===s)return o;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((ee(n)!=="body"||Le(s))&&(a=Me(n)),G(n))){const c=xe(n);l=ae(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-a.scrollLeft*l.x+u.x,y:o.y*l.y-a.scrollTop*l.y+u.y}},isElement:Q,getDimensions:function(t){return G(t)?Kt(t):t.getBoundingClientRect()},getOffsetParent:kt,getDocumentElement:J,getScale:ae,async getElementRects(t){let{reference:o,floating:n,strategy:r}=t;const i=this.getOffsetParent||kt,s=this.getDimensions;return{reference:Un(o,await i(n),r),floating:{x:0,y:0,...await s(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>q(t).direction==="rtl"},Kn=(t,o,n)=>{const r=new Map,i={platform:Xn,...n},s={...i.platform,_c:r};return Rn(t,o,{...i,platform:s})};function ro(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?ro(t[n],o[n]):t[n]=o[n])}const I={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:t=>[...t,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function ke(t,o){let n=I.themes[t]||{},r;do r=n[o],typeof r>"u"?n.$extend?n=I.themes[n.$extend]||{}:(n=null,r=I[o]):n=null;while(n);return r}function Yn(t){const o=[t];let n=I.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=I.themes[n.$extend]||{}):n=null;while(n);return o.map(r=>`v-popper--theme-${r}`)}function Ct(t){const o=[t];let n=I.themes[t]||{};do n.$extend?(o.push(n.$extend),n=I.themes[n.$extend]||{}):n=null;while(n);return o}let le=!1;if(typeof window<"u"){le=!1;try{const t=Object.defineProperty({},"passive",{get(){le=!0}});window.addEventListener("test",null,t)}catch{}}let io=!1;typeof window<"u"&&typeof navigator<"u"&&(io=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const so=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),$t={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Bt={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function _t(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function De(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const F=[];let oe=null;const St={};function At(t){let o=St[t];return o||(o=St[t]=[]),o}let Xe=function(){};typeof window<"u"&&(Xe=window.Element);function S(t){return function(o){return ke(o.theme,t)}}const Ie="__floating-vue__popper",ao=()=>e.defineComponent({name:"VPopper",provide(){return{[Ie]:{parentPopper:this}}},inject:{[Ie]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:S("disabled")},positioningDisabled:{type:Boolean,default:S("positioningDisabled")},placement:{type:String,default:S("placement"),validator:t=>so.includes(t)},delay:{type:[String,Number,Object],default:S("delay")},distance:{type:[Number,String],default:S("distance")},skidding:{type:[Number,String],default:S("skidding")},triggers:{type:Array,default:S("triggers")},showTriggers:{type:[Array,Function],default:S("showTriggers")},hideTriggers:{type:[Array,Function],default:S("hideTriggers")},popperTriggers:{type:Array,default:S("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:S("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:S("popperHideTriggers")},container:{type:[String,Object,Xe,Boolean],default:S("container")},boundary:{type:[String,Xe],default:S("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:S("strategy")},autoHide:{type:[Boolean,Function],default:S("autoHide")},handleResize:{type:Boolean,default:S("handleResize")},instantMove:{type:Boolean,default:S("instantMove")},eagerMount:{type:Boolean,default:S("eagerMount")},popperClass:{type:[String,Array,Object],default:S("popperClass")},computeTransformOrigin:{type:Boolean,default:S("computeTransformOrigin")},autoMinSize:{type:Boolean,default:S("autoMinSize")},autoSize:{type:[Boolean,String],default:S("autoSize")},autoMaxSize:{type:Boolean,default:S("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:S("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:S("preventOverflow")},overflowPadding:{type:[Number,String],default:S("overflowPadding")},arrowPadding:{type:[Number,String],default:S("arrowPadding")},arrowOverflow:{type:Boolean,default:S("arrowOverflow")},flip:{type:Boolean,default:S("flip")},shift:{type:Boolean,default:S("shift")},shiftCrossAxis:{type:Boolean,default:S("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:S("noAutoFocus")},disposeTimeout:{type:Number,default:S("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(t=>t.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var t;return(t=this[Ie])==null?void 0:t.parentPopper},hasPopperShowTriggerHover(){var t,o;return((t=this.popperTriggers)==null?void 0:t.includes("hover"))||((o=this.popperShowTriggers)==null?void 0:o.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(t){t?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((t,o)=>(t[o]="$_computePosition",t),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:t=null,skipDelay:o=!1,force:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(t,o),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:t=null,skipDelay:o=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:o}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(t,o),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var t;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((t=this.referenceNode)==null?void 0:t.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(o=>o.nodeType===o.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(jn({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(Fn({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(qn({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(Dn({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(On({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:i,middlewareData:s})=>{let a;const{centerOffset:l}=s.arrow;return r.startsWith("top")||r.startsWith("bottom")?a=Math.abs(l)>i.reference.width/2:a=Math.abs(l)>i.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:i,placement:s,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let u,c;return s.startsWith("top")||s.startsWith("bottom")?u=i.reference.width:c=i.reference.height,this.$_innerNode.style[r==="min"?"minWidth":r==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[r==="min"?"minHeight":r==="max"?"maxHeight":"height"]=c!=null?`${c}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,t.middleware.push(Gn({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:r,availableHeight:i})=>{this.$_innerNode.style.maxWidth=r!=null?`${r}px`:null,this.$_innerNode.style.maxHeight=i!=null?`${i}px`:null}})));const n=await Kn(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(t,o=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),oe&&this.instantMove&&oe.instantMove&&oe!==this.parentPopper){oe.$_applyHide(!0),this.$_applyShow(!0);return}o?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(t,o=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(oe=this),o?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(t){const o=this.delay;return parseInt(o&&o[t]||o||0)},async $_applyShow(t=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=t,!this.isShown&&(this.$_ensureTeleport(),await De(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ve(this.$_referenceNode),...Ve(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const o=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),r=n.parentNode.getBoundingClientRect(),i=o.x+o.width/2-(r.left+n.offsetLeft),s=o.y+o.height/2-(r.top+n.offsetTop);this.result.transformOrigin=`${i}px ${s}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const t=this.showGroup;if(t){let o;for(let n=0;n<F.length;n++)o=F[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}F.push(this),document.body.classList.add("v-popper--some-open");for(const o of Ct(this.theme))At(o).push(this),document.body.classList.add(`v-popper--some-open--${o}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await De(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(t=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=t,_t(F,this),F.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Ct(this.theme)){const r=At(n);_t(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}oe===this&&(oe=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const o=this.disposeTimeout;o!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},o)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await De(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let t=this.container;if(typeof t=="string"?t=window.document.querySelector(t):t===!1&&(t=this.$_targetNodes[0].parentNode),!t)throw new Error("No container for popover: "+this.container);t.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const t=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,$t,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],$t,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Bt,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],Bt,this.popperTriggers,this.popperHideTriggers,o)},$_registerEventListeners(t,o,n){this.$_events.push({targetNodes:t,eventType:o,handler:n}),t.forEach(r=>r.addEventListener(o,n,le?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,r,i){let s=n;r!=null&&(s=typeof r=="function"?r(s):r),s.forEach(a=>{const l=o[a];l&&this.$_registerEventListeners(t,l,i)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:r,eventType:i,handler:s}=n;!t||t===i?r.forEach(a=>a.removeEventListener(i,s)):o.push(n)}),this.$_events=o},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(t,o=!1){this.$_showFrameLocked||(this.hide({event:t}),t.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),o&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(t,o){for(const n of this.$_targetNodes){const r=n.getAttribute(t);r&&(n.removeAttribute(t),n.setAttribute(o,r))}},$_applyAttrsToTarget(t){for(const o of this.$_targetNodes)for(const n in t){const r=t[n];r==null?o.removeAttribute(n):o.setAttribute(n,r)}},$_updateParentShownChildren(t){let o=this.parentPopper;for(;o;)t?o.shownChildren.add(this.randomId):(o.shownChildren.delete(this.randomId),o.pendingHide&&o.hide()),o=o.parentPopper},$_isAimingPopper(){const t=this.$_referenceNode.getBoundingClientRect();if(ge>=t.left&&ge<=t.right&&ve>=t.top&&ve<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=ge-K,r=ve-Y,i=o.left+o.width/2-K+(o.top+o.height/2)-Y+o.width+o.height,s=K+n*i,a=Y+r*i;return Be(K,Y,s,a,o.left,o.top,o.left,o.bottom)||Be(K,Y,s,a,o.left,o.top,o.right,o.top)||Be(K,Y,s,a,o.right,o.top,o.right,o.bottom)||Be(K,Y,s,a,o.left,o.bottom,o.right,o.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(io){const t=le?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>Tt(o,!0),t),document.addEventListener("touchend",o=>Nt(o,!0),t)}else window.addEventListener("mousedown",t=>Tt(t,!1),!0),window.addEventListener("click",t=>Nt(t,!1),!0);window.addEventListener("resize",Jn)}function Tt(t,o){if(I.autoHideOnMousedown)lo(t,o);else for(let n=0;n<F.length;n++){const r=F[n];try{r.mouseDownContains=r.popperNode().contains(t.target)}catch{}}}function Nt(t,o){I.autoHideOnMousedown||lo(t,o)}function lo(t,o){const n={};for(let r=F.length-1;r>=0;r--){const i=F[r];try{const s=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(t.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&Vt(i,s,t)){if(i.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&s){let l=i.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let a=i.parentPopper;for(;a&&Vt(a,a.containsGlobalTarget,t);)a.$_handleGlobalClose(t,o),a=a.parentPopper}})}catch{}}}function Vt(t,o,n){return n.closeAllPopover||n.closePopover&&o||Qn(t,n)&&!o}function Qn(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function Jn(){for(let t=0;t<F.length;t++)F[t].$_computePosition()}let K=0,Y=0,ge=0,ve=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{K=ge,Y=ve,ge=t.clientX,ve=t.clientY},le?{passive:!0}:void 0);function Be(t,o,n,r,i,s,a,l){const u=((a-i)*(o-s)-(l-s)*(t-i))/((l-s)*(n-t)-(a-i)*(r-o)),c=((n-t)*(o-s)-(r-o)*(t-i))/((l-s)*(n-t)-(a-i)*(r-o));return u>=0&&u<=1&&c>=0&&c<=1}const er={extends:ao()},Re=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n};function tr(t,o,n,r,i,s){return e.openBlock(),e.createElementBlock("div",{ref:"reference",class:e.normalizeClass(["v-popper",{"v-popper--shown":t.slotData.isShown}])},[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.slotData)))],2)}const or=Re(er,[["render",tr]]);function nr(){var t=window.navigator.userAgent,o=t.indexOf("MSIE ");if(o>0)return parseInt(t.substring(o+5,t.indexOf(".",o)),10);var n=t.indexOf("Trident/");if(n>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let _e;function Ke(){Ke.init||(Ke.init=!0,_e=nr()!==-1)}var Oe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ke(),e.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",_e&&this.$el.appendChild(t),t.data="about:blank",_e||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!_e&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const rr=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const ir={class:"resize-observer",tabindex:"-1"};e.popScopeId();const sr=rr((t,o,n,r,i,s)=>(e.openBlock(),e.createBlock("div",ir)));Oe.render=sr;Oe.__scopeId="data-v-b329ee4c";Oe.__file="src/components/ResizeObserver.vue";const uo=(t="theme")=>({computed:{themeClass(){return Yn(this[t])}}}),ar=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:Oe},mixins:[uo()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(t){return t!=null&&!isNaN(t)?`${t}px`:null}}}),lr=["id","aria-hidden","tabindex","data-popper-placement"],ur={ref:"inner",class:"v-popper__inner"},cr=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),dr=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),pr=[cr,dr];function fr(t,o,n,r,i,s){const a=e.resolveComponent("ResizeObserver");return e.openBlock(),e.createElementBlock("div",{id:t.popperId,ref:"popover",class:e.normalizeClass(["v-popper__popper",[t.themeClass,t.classes.popperClass,{"v-popper__popper--shown":t.shown,"v-popper__popper--hidden":!t.shown,"v-popper__popper--show-from":t.classes.showFrom,"v-popper__popper--show-to":t.classes.showTo,"v-popper__popper--hide-from":t.classes.hideFrom,"v-popper__popper--hide-to":t.classes.hideTo,"v-popper__popper--skip-transition":t.skipTransition,"v-popper__popper--arrow-overflow":t.result&&t.result.arrow.overflow,"v-popper__popper--no-positioning":!t.result}]]),style:e.normalizeStyle(t.result?{position:t.result.strategy,transform:`translate3d(${Math.round(t.result.x)}px,${Math.round(t.result.y)}px,0)`}:void 0),"aria-hidden":t.shown?"false":"true",tabindex:t.autoHide?0:void 0,"data-popper-placement":t.result?t.result.placement:void 0,onKeyup:o[2]||(o[2]=e.withKeys(l=>t.autoHide&&t.$emit("hide"),["esc"]))},[e.createElementVNode("div",{class:"v-popper__backdrop",onClick:o[0]||(o[0]=l=>t.autoHide&&t.$emit("hide"))}),e.createElementVNode("div",{class:"v-popper__wrapper",style:e.normalizeStyle(t.result?{transformOrigin:t.result.transformOrigin}:void 0)},[e.createElementVNode("div",ur,[t.mounted?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",null,[e.renderSlot(t.$slots,"default")]),t.handleResize?(e.openBlock(),e.createBlock(a,{key:0,onNotify:o[1]||(o[1]=l=>t.$emit("resize",l))})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],512),e.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:e.normalizeStyle(t.result?{left:t.toPx(t.result.arrow.x),top:t.toPx(t.result.arrow.y)}:void 0)},pr,4)],4)],46,lr)}const co=Re(ar,[["render",fr]]),po={methods:{show(...t){return this.$refs.popper.show(...t)},hide(...t){return this.$refs.popper.hide(...t)},dispose(...t){return this.$refs.popper.dispose(...t)},onResize(...t){return this.$refs.popper.onResize(...t)}}};let Ye=function(){};typeof window<"u"&&(Ye=window.Element);const mr=e.defineComponent({name:"VPopperWrapper",components:{Popper:or,PopperContent:co},mixins:[po,uo("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Ye,Boolean],default:void 0},boundary:{type:[String,Ye],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(t=>t!==this.$refs.popperContent.$el)}}});function hr(t,o,n,r,i,s){const a=e.resolveComponent("PopperContent"),l=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(l,e.mergeProps({ref:"popper"},t.$props,{theme:t.finalTheme,"target-nodes":t.getTargetNodes,"popper-node":()=>t.$refs.popperContent.$el,class:[t.themeClass],onShow:o[0]||(o[0]=()=>t.$emit("show")),onHide:o[1]||(o[1]=()=>t.$emit("hide")),"onUpdate:shown":o[2]||(o[2]=u=>t.$emit("update:shown",u)),onApplyShow:o[3]||(o[3]=()=>t.$emit("apply-show")),onApplyHide:o[4]||(o[4]=()=>t.$emit("apply-hide")),onCloseGroup:o[5]||(o[5]=()=>t.$emit("close-group")),onCloseDirective:o[6]||(o[6]=()=>t.$emit("close-directive")),onAutoHide:o[7]||(o[7]=()=>t.$emit("auto-hide")),onResize:o[8]||(o[8]=()=>t.$emit("resize"))}),{default:e.withCtx(({popperId:u,isShown:c,shouldMountContent:w,skipTransition:h,autoHide:f,show:p,hide:v,handleResize:y,onResize:g,classes:d,result:m})=>[e.renderSlot(t.$slots,"default",{shown:c,show:p,hide:v}),e.createVNode(a,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:w,"skip-transition":h,"auto-hide":f,"handle-resize":y,classes:d,result:m,onHide:v,onResize:g},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:c,hide:v})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const dt=Re(mr,[["render",hr]]),wr={...dt,name:"VDropdown",vPopperTheme:"dropdown"},gr={...dt,name:"VMenu",vPopperTheme:"menu"},vr={...dt,name:"VTooltip",vPopperTheme:"tooltip"},yr=e.defineComponent({name:"VTooltipDirective",components:{Popper:ao(),PopperContent:co},mixins:[po],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>ke(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>ke(t.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(t){if(typeof this.content=="function"&&this.$_isShown&&(t||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const o=++this.$_fetchId,n=this.content(this);n.then?n.then(r=>this.onResult(o,r)):this.onResult(o,n)}},onResult(t,o){t===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=o)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),xr=["innerHTML"],br=["textContent"];function kr(t,o,n,r,i,s){const a=e.resolveComponent("PopperContent"),l=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(l,e.mergeProps({ref:"popper"},t.$attrs,{theme:t.theme,"target-nodes":t.targetNodes,"popper-node":()=>t.$refs.popperContent.$el,onApplyShow:t.onShow,onApplyHide:t.onHide}),{default:e.withCtx(({popperId:u,isShown:c,shouldMountContent:w,skipTransition:h,autoHide:f,hide:p,handleResize:v,onResize:y,classes:g,result:d})=>[e.createVNode(a,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:c,mounted:w,"skip-transition":h,"auto-hide":f,"handle-resize":v,classes:g,result:d,onHide:p,onResize:y},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,xr)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,br))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const Cr=Re(yr,[["render",kr]]),fo="v-popper--has-tooltip";function $r(t,o){let n=t.placement;if(!n&&o)for(const r of so)o[r]&&(n=r);return n||(n=ke(t.theme||"tooltip","placement")),n}function mo(t,o,n){let r;const i=typeof o;return i==="string"?r={content:o}:o&&i==="object"?r=o:r={content:!1},r.placement=$r(r,n),r.targetNodes=()=>[t],r.referenceNode=()=>t,r}let We,Ce,Br=0;function _r(){if(We)return;Ce=e.ref([]),We=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:Ce}},render(){return this.directives.map(o=>e.h(Cr,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),We.mount(t)}function Sr(t,o,n){_r();const r=e.ref(mo(t,o,n)),i=e.ref(!1),s={id:Br++,options:r,shown:i};return Ce.value.push(s),t.classList&&t.classList.add(fo),t.$_popper={options:r,item:s,show(){i.value=!0},hide(){i.value=!1}}}function ho(t){if(t.$_popper){const o=Ce.value.indexOf(t.$_popper.item);o!==-1&&Ce.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(fo)}function Et(t,{value:o,modifiers:n}){const r=mo(t,o,n);if(!r.content||ke(r.theme||"tooltip","disabled"))ho(t);else{let i;t.$_popper?(i=t.$_popper,i.options.value=r):i=Sr(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?i.show():i.hide())}}const Ar={beforeMount:Et,updated:Et,beforeUnmount(t){ho(t)}};function Pt(t){t.addEventListener("mousedown",Ee),t.addEventListener("click",Ee),t.addEventListener("touchstart",wo,le?{passive:!0}:!1)}function zt(t){t.removeEventListener("mousedown",Ee),t.removeEventListener("click",Ee),t.removeEventListener("touchstart",wo),t.removeEventListener("touchend",go),t.removeEventListener("touchcancel",vo)}function Ee(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function wo(t){if(t.changedTouches.length===1){const o=t.currentTarget;o.$_vclosepopover_touch=!0;const n=t.changedTouches[0];o.$_vclosepopover_touchPoint=n,o.addEventListener("touchend",go),o.addEventListener("touchcancel",vo)}}function go(t){const o=t.currentTarget;if(o.$_vclosepopover_touch=!1,t.changedTouches.length===1){const n=t.changedTouches[0],r=o.$_vclosepopover_touchPoint;t.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}}function vo(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const Tr={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&Pt(t)},updated(t,{value:o,oldValue:n,modifiers:r}){t.$_closePopoverModifiers=r,o!==n&&(typeof o>"u"||o?Pt(t):zt(t))},beforeUnmount(t){zt(t)}};function Nr(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,ro(I,o),t.directive("tooltip",Ar),t.directive("close-popper",Tr),t.component("VTooltip",vr),t.component("VDropdown",wr),t.component("VMenu",gr))}const Vr={version:"5.2.2",install:Nr,options:I},Er="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",Lt="2026-10-13T14:00:00.000Z",Pr="69756c6a-cd47-41ef-a9c3-faa0b1aeb4a1",je="https://i.allsvgicons.com/lucide",ie={marketplace:"https://svgl.app/library/mercado-libre.svg",support:`${je}/headphones.svg`,chat:`${je}/message-circle.svg`,cancel:`${je}/x.svg`},ce={logo:ie.marketplace,title:"Mercado Livre",subtitle:"Atendimento online"},de=(t,o,n)=>({logo:t,eyebrow:"MERCADO LIVRE",title:o,subtitle:n}),zr=[{name:"name",alias:"Nome",required:!0},{name:"phone",alias:"Telefone",required:!0},{name:"email",alias:"E-mail",required:!1}],Lr=[{name:"name",alias:"Nome",required:!0},{name:"phone",alias:"Telefone",required:!0},{name:"email",alias:"E-mail",required:!1},{name:"cpf",alias:"CPF",required:!0}],pe=t=>({id:t.id,companyId:Er,name:t.name,action:t.action,message:null,automaticMessage:null,callOnQueue:null,uraDescription:null,interactiveMessageId:null,configId:t.configId??null,queueId:null,redirectQueue:null,redirectRuleId:null,questionnaire:null,webhook:null,isRoot:!1,redirectDefault:!1,redirectTimeout:60,delay:null,disableTyping:!1,settings:t.settings??null,archivedAt:null,autoTagEnabled:!1,autoTagIds:[],createdAt:Lt,updatedAt:Lt}),me=(t,o)=>({id:t,nextRuleId:o}),Mt=pe({id:"a1111111-1111-4111-8111-111111111105",name:"Falar com atendente",action:"service",settings:{header:ce,body:de(ie.chat,"Falar com atendente","Conte o que você precisa e vamos te ajudar."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Rt=pe({id:"a1111111-1111-4111-8111-111111111101",name:"Consultar meu plano",action:"service",settings:{header:ce,body:de(ie.support,"Consultar meu plano","Vamos te ajudar a entender o seu plano."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Ot=pe({id:"a1111111-1111-4111-8111-111111111106",name:"Cancelar plano",action:"service",settings:{header:ce,body:de(ie.cancel,"Cancelar plano","Vamos verificar se o plano ainda pode ser cancelado."),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),qe=pe({id:"b2222222-2222-4222-8222-222222222201",name:"Consultar meu plano",action:"identification",settings:{header:ce,body:de(ie.support,"Consultar meu plano","Informe seus dados para consultar o plano."),form:{fields:[...zr]}}}),Ge=pe({id:"b2222222-2222-4222-8222-222222222204",name:"Cancelar plano",action:"identification",settings:{header:ce,body:de(ie.cancel,"Cancelar plano","Informe seus dados para verificar o cancelamento."),form:{fields:[...Lr]}}}),Qe=pe({id:"d0000000-0000-4000-8000-000000000001",name:"Mercado Livre",action:"screen",configId:"37b0b2d3-6a07-4567-a5ad-7456a820905d",settings:{header:ce,body:de(ie.marketplace,"Como podemos ajudar?","Escolha uma opção para continuar.")}}),yo={id:Pr,rules:[Mt,qe,Ge,Rt,Ot,Qe],edges:{[Qe.id]:[me("aa2db433-f691-4b0e-b2f3-703eb131fcc1",Mt.id),me("aa2db433-f691-4b0e-b2f3-703eb131fcc2",qe.id),me("aa2db433-f691-4b0e-b2f3-703eb131fcc3",Ge.id)],[qe.id]:[me("cc2db433-f691-4b0e-b2f3-703eb131fcc1",Rt.id)],[Ge.id]:[me("cc2db433-f691-4b0e-b2f3-703eb131fcc2",Ot.id)]}},Mr=Qe,Rr=t=>yo.rules.find(o=>o.id===t),Or={configurations:{alias:"Mercado Livre",general:{defaultBehavior:"inactive",language:"pt-BR",isClosable:!0},appearance:{theme:"light",primaryColor:"#FFE600"},anchor:{label:"Fale conosco",size:"medium",logo:"https://svgl.app/library/mercado-libre.svg",position:"bottom-right",offset:{x:32,y:36}}}},Hr={install:t=>{t.use(Vr),t.component("AppIdentificationPage",tt),t.component("AppFormTextInput",Je),t.component("AppWidgetAnchor",ot),t.component("AppServicePage",it),t.component("AppScreenPage",st),t.component("AppWidgetView",at),t.component("AppTextInput",qt),t.component("AppCarousel",et),t.component("AppSkeleton",nt),t.component("AppMessage",Se),t.component("AppWidget",Gt),t.component("AppButton",X),t.component("AppEmpty",rt),t.component("AppGroup",j),t.component("AppIcon",L),t.component("AppText",V)}};exports.AppButton=X;exports.AppCarousel=et;exports.AppEmpty=rt;exports.AppFormTextInput=Je;exports.AppGroup=j;exports.AppIcon=L;exports.AppIdentificationPage=tt;exports.AppMessage=Se;exports.AppScreenPage=st;exports.AppServicePage=it;exports.AppSkeleton=nt;exports.AppText=V;exports.AppTextInput=qt;exports.AppWidget=Gt;exports.AppWidgetAnchor=ot;exports.AppWidgetView=at;exports.default=Hr;exports.demoRootRule=Mr;exports.demoWidgetConfig=Or;exports.demoWorkflow=yo;exports.findDemoRuleById=Rr;exports.useAppWidget=ue;exports.useServiceChatBehavior=Ft;exports.useServicePage=Dt;exports.useServiceVoiceBehavior=Ht;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function Bo(){return{maskPhone:i=>{if(!i)return"";let s=i.replace(/\D/g,"");return s.length<=4?s:(s.startsWith("0")&&!s.startsWith("0800")&&s.length>3&&(s=s.replace(/^0+/,"")),s.startsWith("0800")?s.length>11?s:s.replace(/(0800)(\d{0,3})(\d{0,4})/,(l,a,u,d)=>[a,u,d].filter(Boolean).join(" ")):s.length>11?s:s.length<=8?s.replace(/(\d{4})(\d{0,4})/,"$1-$2").replace(/-$/,""):s.length===9?s.replace(/(\d{5})(\d{0,4})/,"$1-$2"):s.length===10?s.replace(/(\d{2})(\d{0,4})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""):s.replace(/(\d{2})(\d{0,5})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""))},maskCnpj:i=>{const s=i.toUpperCase().replace(/[^0-9A-Z]/g,"");let l="";for(const a of s){if(l.length>=14)break;(l.length<12||/\d/.test(a))&&(l+=a)}return l.replace(/^([0-9A-Z]{2})([0-9A-Z])/,"$1.$2").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})([0-9A-Z])/,"$1.$2.$3/$4").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})\.([0-9A-Z]{3})\/([0-9A-Z]{4})(\d)/,"$1.$2.$3/$4-$5")},maskCep:i=>i.replace(/\D/g,"").slice(0,8).replace(/^(\d{5})(\d)/,"$1-$2"),maskCpf:i=>i.replace(/\D/g,"").slice(0,11).replace(/^(\d{3})(\d)/,"$1.$2").replace(/^(\d{3})\.(\d{3})(\d)/,"$1.$2.$3").replace(/^(\d{3})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3-$4")}}function Ft(){return{}}const He=e.ref([]),_o=e.ref(""),So=e.ref(!1),No=e.ref(!1),Ao=e.ref(!1);function It(){return{isSendingMessage:So,isErrorLoading:No,isLoading:Ao,messages:He,text:_o,setMessages:n=>{He.value=[...n]},addMessage:n=>{He.value.push(n)}}}function Wt(){const t=It(),o=Ft();return{chat:t,voice:o}}const fe=e.ref([]),De=e.ref(void 0),K=e.ref(void 0),Ge=e.ref(void 0),jt=t=>!!(t?.logo?.trim()||t?.title?.trim()||t?.subtitle?.trim()),pt=t=>{!t||!jt(t)||(Ge.value={...t})},pe=()=>{const t=f=>{const y=new Set(Object.values(f.edges??{}).flatMap(v=>v.map(c=>c.nextRuleId)));return f.rules.find(v=>!y.has(v.id))??f.rules[0]},o=(f,y)=>{const v=new Map(f.rules.map(c=>[c.id,c]));return(f.edges[y]??[]).flatMap(c=>{const p=v.get(c.nextRuleId);return p?[p]:[]})},n=e.computed(()=>new Map((K.value?.rules??[]).map(f=>[f.id,f]))),r=e.computed(()=>K.value?t(K.value):void 0),i=e.computed(()=>{const f=De.value;return f&&n.value.get(f)||r.value}),s=e.computed(()=>!K.value||!i.value?[]:o(K.value,i.value.id)),l=e.computed(()=>{const f=i.value?.settings?.header;return jt(f)?f:Ge.value}),a=Wt();return{currentRuleId:De,currentRule:i,currentHeader:l,rootRule:r,workflow:K,history:fe,edges:s,setCurrentRuleId:f=>{De.value=f,pt(i.value?.settings?.header)},clearHistory:()=>{fe.value=[]},setWorkflow:f=>{K.value?.id!==f?.id&&(Ge.value=void 0),K.value=f,pt(i.value?.settings?.header)},pushHistory:f=>{fe.value.push(f)},setHistory:f=>{fe.value=[...f]},popHistory:()=>fe.value.pop(),...a}},ue=t=>t==="name",ft=t=>!!t?.trim(),To=t=>{const o=t.filter(r=>ue(r.name)),n=t.filter(r=>!ue(r.name));return[...o,...n]};function Vo(t,o){const{maskPhone:n,maskCpf:r}=Bo(),{history:i}=pe(),s=e.ref(0),l=e.ref("forward"),a=e.ref(null),u=e.computed(()=>{const b=e.toValue(t),V=b.settings?.form&&b.settings.form.fields||[];return To(V)}),d=e.reactive(Object.fromEntries(u.value.map(b=>[b.name,""]))),w=e.computed(()=>u.value[s.value]),h=e.computed(()=>s.value>=u.value.length-1),m=e.computed(()=>i.value.length>0||s.value>0),g=e.computed(()=>l.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const b=a.value;if(!b)return;(b.querySelector(".is-active input")??b.querySelector("input"))?.focus({preventScroll:!0})});const f=e.computed(()=>u.value.every(b=>!b.required||ft(d[b.name]))),y=b=>{const V=u.value[b];return V?V.required&&!ft(d[V.name])?!1:b>=u.value.length-1?f.value:!0:f.value},v=e.computed(()=>y(s.value)),c=e.computed(()=>{const b=u.value.find(V=>ue(V.name));return b?d[b.name]?.trim().split(/\s+/)[0]??"":""}),p=b=>{const V=u.value[b],E=c.value,H=u.value.length?`Passo ${b+1} de ${u.value.length}`:"",R=e.toValue(t),O=b>=u.value.length-1;if(!V)return{eyebrow:H,title:R.settings?.body?.title??R.name??"",subtitle:R.settings?.body?.subtitle??""};if(ue(V.name))return{eyebrow:H,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const L=O?E?`Quase lá, ${E}.`:"Quase lá.":E?`Olá, ${E}.`:"Olá.",F=V.required?`Informe seu ${V.label} para continuar.`:`Gostaria de deixar seu ${V.label}?`;return{eyebrow:H,title:L,subtitle:F}},x=e.computed(()=>p(s.value)),T=b=>b==="email"?"email":b==="phone"?"tel":"text",S=b=>b==="email"?"email":b==="phone"?"call":ue(b)?"person":b==="order"?"receipt":"badge",C=b=>b.required?`${b.label} *`:b.label,$=b=>ue(b.name)?"Seu nome":b.name==="phone"?"Seu telefone":b.name==="email"?"Seu e-mail":b.name==="cpf"?"000.000.000-00":b.placeholder||b.label,k=b=>{if(b==="phone")return n;if(b==="cpf")return r},_=()=>{f.value&&o("submit",{...d})};return{stepTransition:g,currentField:w,canContinue:v,currentStep:s,isLastStep:h,stepIntro:x,fieldHost:a,showBack:m,fields:u,form:d,continueStep:()=>{if(v.value){if(h.value||u.value.length===0)return _();l.value="forward",s.value+=1}},canContinueAt:y,introFor:p,fieldLabel:C,fieldPlaceholder:$,fieldType:T,fieldMask:k,fieldIcon:S,goBack:()=>{if(s.value>0){l.value="back",s.value-=1;return}o("back")}}}function qt(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":"!wu-h-12 !wu-min-h-[3rem]"),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,width:r}}function Po(t,o){const n=e.computed(()=>({"!wu-font-plus":o.plus,"!wu-font-inter":o.inter,"!wu-font-titillium":o.titillium,"!wu-font-mono":o.mono})),r=e.computed(()=>({"!wu-text-white":o.white,"!wu-text-primary":o.primary,"!wu-text-secondary":o.secondary,"!wu-text-base":o.neutral,"!wu-text-neutral dark:!wu-text-neutral-200":o.gray})),i=e.computed(()=>({"!wu-font-thin":o.thin,"!wu-font-extralight":o.extralight,"!wu-font-light":o.light,"!wu-font-normal":o.normal,"!wu-font-medium":o.medium,"!wu-font-semibold":o.semibold,"!wu-font-bold":o.bold,"!wu-font-extrabold":o.extrabold,"!wu-font-black":o.black})),s=e.computed(()=>({...{title:{"!wu-text-xl":o.small,"!wu-text-2xl":o.base,"!wu-text-3xl":o.large,"!wu-text-4xl":o.extraLarge},subtitle:{"!wu-text-sm":o.small,"!wu-text-md":o.base,"!wu-text-xl":o.large},text:{"!wu-text-xxs":o.extraSmall,"!wu-text-xs":o.small,"!wu-text-sm":o.base,"!wu-text-lg":o.large,"!wu-text-2xl":o.extraLarge}}[t]}));return{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}}const Eo=e.defineComponent({__name:"app-text",props:{extraSmall:{type:Boolean},inter:{type:Boolean},plus:{type:Boolean},titillium:{type:Boolean},mono:{type:Boolean},small:{type:Boolean},base:{type:Boolean},large:{type:Boolean},extraLarge:{type:Boolean},thin:{type:Boolean},extralight:{type:Boolean},light:{type:Boolean},normal:{type:Boolean},medium:{type:Boolean},semibold:{type:Boolean},bold:{type:Boolean},extrabold:{type:Boolean},black:{type:Boolean},primary:{type:Boolean},secondary:{type:Boolean},gray:{type:Boolean},neutral:{type:Boolean},white:{type:Boolean}},setup(t){const o=t,{fontClass:n,colorClass:r,weightClass:i,sizeClass:s}=Po("text",o);return(l,a)=>(e.openBlock(),e.createElementBlock("p",{class:e.normalizeClass(["wu-font-primary wu-text-sm wu-font-normal wu-text-gray-900 dark:wu-text-neutral-100",[e.unref(n),e.unref(r),e.unref(i),e.unref(s)]])},[e.renderSlot(l.$slots,"default",{},void 0,!0)],2))}}),Ee=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n},A=Ee(Eo,[["__scopeId","data-v-5fc0fe9d"]]),M=e.defineComponent({__name:"app-group",props:{fit:{type:Boolean},full:{type:Boolean},row:{type:Boolean},col:{type:Boolean},gapNone:{type:Boolean},gapXs:{type:Boolean},gapBase:{type:Boolean},gapSm:{type:Boolean},gapMd:{type:Boolean},gapLg:{type:Boolean},wrap:{type:Boolean},paddingNone:{type:Boolean},paddingBase:{type:Boolean},paddingXs:{type:Boolean},paddingSm:{type:Boolean},paddingMd:{type:Boolean},paddingLg:{type:Boolean},center:{type:Boolean},justifyEnd:{type:Boolean},centerBetween:{type:Boolean},border:{type:Boolean},borderPrimary:{type:Boolean},rounded:{type:Boolean},roundedTop:{type:Boolean},roundedBottom:{type:Boolean},bgPrimary:{type:Boolean},bgWhite:{type:Boolean},divisor:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>o.fit?"wu-w-fit wu-h-fit":o.full?"wu-w-full wu-h-full":""),r=e.computed(()=>o.justifyEnd?"wu-items-end wu-justify-end":o.center?"wu-items-center wu-justify-center":o.centerBetween?"wu-items-center wu-justify-between":""),i=e.computed(()=>o.row?"wu-flex-row":o.col?"wu-flex-col":"wu-flex-row"),s=e.computed(()=>o.gapBase?"wu-gap-4":o.gapXs?"wu-gap-1":o.gapSm?"wu-gap-2":o.gapMd?"wu-gap-6":o.gapLg?"wu-gap-8":o.gapNone?"wu-gap-0":"wu-gap-4"),l=e.computed(()=>o.wrap?"wu-flex-wrap":""),a=e.computed(()=>o.paddingXs?"wu-p-1":o.paddingSm?"wu-p-2":o.paddingBase?"wu-p-4":o.paddingMd?"wu-p-6":o.paddingLg?"wu-p-8":""),u=e.computed(()=>o.border?"wu-border":o.borderPrimary?"wu-border wu-border-primary":""),d=e.computed(()=>o.rounded?"wu-rounded-md":o.roundedTop?"wu-rounded-t-md":o.roundedBottom?"wu-rounded-b-md":""),w=e.computed(()=>o.bgPrimary?"wu-bg-primary":o.bgWhite?"wu-bg-white":""),h=e.computed(()=>o.divisor&&o.col?"wu-divide-y":o.divisor&&o.row?"wu-divide-x":""),m=e.computed(()=>[i.value,s.value,l.value,a.value,r.value,u.value,d.value,w.value,n.value,h.value]);return(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",m.value])},[e.renderSlot(g.$slots,"default")],2))}}),zo={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},Lo=["value","type","placeholder","disabled","maxlength","aria-invalid"],Je=e.defineComponent({__name:"app-form-text-input",props:{modelValue:{default:""},type:{default:"text"},placeholder:{},maxLength:{},disabled:{type:Boolean},invalid:{type:Boolean},valid:{type:Boolean},fluid:{type:Boolean},maskFunction:{}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function l(v){return!!s.value[v]}const a=e.ref(""),u=e.ref(!1);function d(v){if(!r.maskFunction)return v;try{const c=r.maskFunction(v);return typeof c=="string"?c:v}catch{return v}}e.watch(()=>r.modelValue,v=>{if(v==null){a.value="";return}a.value=r.maskFunction?d(v):v},{immediate:!0});const{width:w}=qt(r),h=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":""),m=e.computed(()=>r.invalid?"wu-text-red-600 placeholder:wu-text-red-300 placeholder:wu-font-medium":r.valid?"wu-text-green-700 placeholder:wu-font-medium":"wu-text-gray-900 placeholder:wu-text-gray-400 placeholder:wu-font-medium dark:wu-text-neutral-100 dark:placeholder:wu-text-neutral-500"),g=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),f=e.computed(()=>r.disabled?"wu-opacity-50 wu-pointer-events-none":"");function y(v){const p=v.target.value;a.value=r.maskFunction?d(p):p,i("update:modelValue",a.value)}return o({focus:u,content:a}),(v,c)=>(e.openBlock(),e.createBlock(M,{class:e.normalizeClass([e.unref(w),f.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",zo,[l("default")?(e.openBlock(),e.createBlock(A,{key:0,small:"",gray:"",class:e.normalizeClass([h.value])},{default:e.withCtx(()=>[e.renderSlot(v.$slots,"default")]),_:3},8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:e.normalizeClass(["wu-w-full wu-bg-transparent wu-border-0 wu-outline-none wu-p-0 wu-m-0 wu-appearance-none wu-font-primary wu-text-2xl wu-leading-tight wu-caret-gray-900 dark:wu-caret-white",[m.value]]),value:a.value,type:t.type,placeholder:t.placeholder,disabled:t.disabled,maxlength:t.maxLength,"aria-invalid":t.invalid?!0:void 0,onInput:y,onFocus:c[0]||(c[0]=p=>u.value=!0),onBlur:c[1]||(c[1]=p=>u.value=!1),onKeyup:c[2]||(c[2]=e.withKeys(p=>i("keyup-enter"),["enter"]))},null,42,Lo)]),l("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[g.value]])},[e.renderSlot(v.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function Mo(t){const o=e.computed(()=>t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),i=e.computed(()=>t.fluid?"!wu-w-full":"wu-w-fit");return{height:o,textSize:n,padding:r,width:i}}const z=e.defineComponent({__name:"app-icon",props:{small:Boolean,large:Boolean,extraLarge:Boolean,gray:Boolean,base:Boolean,light:Boolean,dark:Boolean,outlined:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"!wu-text-xs wu-w-4 wu-h-4":o.large?"!wu-text-xl wu-w-8 wu-h-8":o.extraLarge?"!wu-text-4xl wu-w-10 wu-h-10":"!wu-text-base wu-w-6 wu-h-6"),r=e.computed(()=>o.dark?"wu-text-neutral-800 dark:wu-text-white":o.light?"wu-text-white dark:wu-text-neutral-800":o.gray?"wu-text-gray-500 dark:wu-text-neutral-400":""),i=e.computed(()=>o.outlined?"material-symbols-outlined":"material-icons");return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["notranslate wu-flex wu-items-center wu-justify-center wu-text-center",[n.value,r.value,i.value]]),"data-testid":"app-icon"},[e.renderSlot(s.$slots,"default")],2))}}),Ro=["disabled"],Oo={class:"wu-flex wu-items-center wu-justify-center wu-gap-2"},D=e.defineComponent({__name:"app-button",props:{small:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,disabled:Boolean,loading:Boolean,alert:Boolean,warning:Boolean,success:Boolean,block:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(g){return!!n.value[g]}const{height:i,textSize:s,padding:l,width:a}=Mo(o),u=e.computed(()=>o.soft?"wu-bg-primary-50 !wu-text-primary-400":o.alert?"wu-bg-red-500 !wu-text-white":o.warning?"wu-bg-amber-500 !wu-text-white":o.success?"wu-bg-green-500 !wu-text-white":o.outline?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300 dark:!wu-border-neutral-600 dark:hover:!wu-bg-neutral-700 dark:hover:!wu-border-neutral-500 dark:!wu-text-neutral-100":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100 dark:!wu-text-neutral-200 dark:hover:!wu-bg-neutral-700":o.link?"wu-bg-transparent !wu-text-blue-600 hover:wu-underline":"wu-bg-primary-500 !wu-text-[var(--wu-primary-fg)]"),d=e.computed(()=>o.block?"wu-rounded-none":o.round?"wu-rounded-full":"wu-rounded-lg"),w=e.computed(()=>o.icon&&o.small?"!wu-w-8 !wu-h-8 wu-p-0":o.icon?"!wu-w-11 !wu-h-11 wu-p-0":l.value),h=e.computed(()=>o.icon?"wu-justify-center":"wu-justify-between"),m=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(g,f)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-gap-2 wu-cursor-pointer wu-transition-all wu-border wu-border-transparent disabled:wu-opacity-50 disabled:wu-pointer-events-none hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80",[e.unref(s),u.value,d.value,e.unref(a),e.unref(i),m.value,w.value,h.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:f[0]||(f[0]=y=>g.$emit("click",y))},[e.createElementVNode("div",Oo,[t.loading?(e.openBlock(),e.createBlock(z,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):r("icon")?(e.openBlock(),e.createBlock(z,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&r("default")?(e.openBlock(),e.createBlock(A,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&r("trailing")?(e.openBlock(),e.createBlock(z,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,Ro))}}),Ho=["aria-hidden"],Do=e.defineComponent({__name:"app-carousel",props:{modelValue:{default:0},vertical:{type:Boolean},fill:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.useSlots(),l=e.ref(null),a=e.ref(null),u=e.ref(0),d=e.ref(0),w=e.ref(!1);let h=null;const m=e.computed(()=>Math.max(r.modelValue,0)),g=()=>(s.default?.()??[]).flatMap(k=>k.type===e.Comment||k.type===e.Text?[]:k.type===e.Fragment?(k.children??[]).filter(_=>!!_&&typeof _=="object"&&_.type!==e.Comment&&_.type!==e.Text):[k]),f=k=>{const _=Math.abs(k-m.value);return _===0?"is-active":_===1?"is-adjacent":"is-far"},y=k=>{const _=a.value?.childElementCount||g().length,B=Math.min(Math.max(k,0),Math.max(_-1,0));B!==r.modelValue&&i("update:modelValue",B)},v=()=>{const k=l.value;k&&(k.scrollLeft&&(k.scrollLeft=0),k.scrollTop&&(k.scrollTop=0))},c=(k,_)=>{const B=getComputedStyle(k)[_].trim(),P=parseFloat(B);if(!Number.isFinite(P)||P<=0)return 0;if(B.endsWith("%")){const b=_==="scrollPaddingTop"?k.clientHeight:k.clientWidth;return P/100*b}return P},p=()=>{const k=l.value,_=a.value;if(!k||!_)return;v();const B=[..._.children],P=parseFloat(getComputedStyle(_).gap)||0,b=r.vertical?"scrollPaddingTop":"scrollPaddingLeft",V=c(k,b),E=L=>r.vertical?L.offsetHeight:L.offsetWidth,H=B[m.value]?E(B[m.value]):0,R=r.vertical&&r.fill?Math.max((k.clientHeight-H)/2,0):V,O=B.slice(0,m.value).reduce((L,F)=>L+E(F)+P,0);u.value=R-O,d.value=r.vertical&&!r.fill?H+V*2:0,w.value=!0},x=()=>{h?.disconnect();const k=l.value,_=a.value;if(!(!k||!_)&&(p(),!(typeof ResizeObserver>"u"))){if(h=new ResizeObserver(p),h.observe(k),r.vertical)for(const B of _.children)h.observe(B);k.removeEventListener("scroll",v),k.addEventListener("scroll",v,{passive:!0})}},T=e.computed(()=>[r.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":w.value,"wu-carousel--fill":r.fill}]),S=e.computed(()=>r.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),C=e.computed(()=>{if(!(!r.vertical||r.fill||!d.value))return{height:`${d.value}px`}}),$=e.computed(()=>{const k=`${u.value}px`;return{transform:r.vertical?`translate3d(0, ${k}, 0)`:`translate3d(${k}, 0, 0)`}});return e.watch(()=>[r.vertical,r.fill,r.modelValue],async()=>{await e.nextTick(),x()}),e.onMounted(async()=>{await e.nextTick(),x()}),e.onBeforeUnmount(()=>{h?.disconnect(),l.value?.removeEventListener("scroll",v)}),o({next:()=>y(m.value+1),prev:()=>y(m.value-1),goTo:y}),(k,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",T.value]),ref_key:"rootRef",ref:l,"data-testid":"app-carousel",style:e.normalizeStyle(C.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",S.value]),ref_key:"trackRef",ref:a,style:e.normalizeStyle($.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g(),(B,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",f(P)]),key:B.key??P,"aria-hidden":P!==m.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B)))],10,Ho))),128))],6)],6))}}),et=Ee(Do,[["__scopeId","data-v-96f06600"]]),Fo={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},Io={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},Wo={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},jo={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},qo={class:"wu-flex wu-items-center wu-gap-1.5"},tt=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,r=o,{currentStep:i,fieldHost:s,showBack:l,fields:a,form:u,continueStep:d,canContinueAt:w,introFor:h,fieldPlaceholder:m,fieldType:g,fieldMask:f,goBack:y}=Vo(()=>n.rule,r);return(v,c)=>(e.openBlock(),e.createElementBlock("div",Fo,[e.createElementVNode("div",Io,[e.createElementVNode("div",Wo,[e.createElementVNode("div",{class:e.normalizeClass(["wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",{"wu-invisible wu-pointer-events-none":!e.unref(l)}]),onClick:c[0]||(c[0]=(...p)=>e.unref(y)&&e.unref(y)(...p))},[e.createVNode(z,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(A,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",jo,[e.createElementVNode("div",qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(p,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",x<=e.unref(i)?"wu-bg-gray-900 dark:wu-bg-white":"wu-bg-gray-200 dark:wu-bg-neutral-600"]),key:x},null,2))),128))])])]),e.createElementVNode("div",{class:"wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-pb-12",ref_key:"fieldHost",ref:s},[e.createVNode(et,{class:"wu-w-full wu-h-full",modelValue:e.unref(i),"onUpdate:modelValue":c[1]||(c[1]=p=>e.isRef(i)?i.value=p:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(p,x)=>(e.openBlock(),e.createBlock(M,{class:"wu-w-full wu-gap-8",key:p.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode(M,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(h)(x).title?(e.openBlock(),e.createBlock(A,{key:0,class:"wu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)(x).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(h)(x).subtitle?(e.openBlock(),e.createBlock(A,{key:1,class:"wu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)(x).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(A,{class:"wu-opacity-50 wu-absolute -wu-top-2 wu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x+1),1)]),_:2},1024)]),_:2},1024),e.createVNode(M,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(Je,{modelValue:e.unref(u)[p.name],"onUpdate:modelValue":T=>e.unref(u)[p.name]=T,"mask-function":e.unref(f)(p.name),placeholder:e.unref(m)(p),type:e.unref(g)(p.name),onKeyupEnter:e.unref(d),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(D,{fluid:"",disabled:!e.unref(w)(x),onClick:e.unref(d)},{trailing:e.withCtx(()=>[...c[4]||(c[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x>=e.unref(a).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),Go=["disabled"],Zo=["src"],ot=e.defineComponent({__name:"app-widget-anchor",props:{small:Boolean,large:Boolean,logo:{type:String,default:""},label:{type:String,default:""},outline:Boolean,ghost:Boolean,disabled:Boolean,loading:Boolean},emits:["click"],setup(t){const o=t,n=e.computed(()=>!!o.label.trim()),r=e.computed(()=>o.outline?"wu-bg-transparent !wu-border-gray-200 hover:!wu-bg-gray-100 hover:!wu-border-gray-300":o.ghost?"wu-bg-transparent !wu-text-gray-700 hover:!wu-bg-gray-100":"wu-bg-gradient-to-br wu-from-primary-500 wu-to-secondary-500 wu-text-white"),i=e.computed(()=>n.value?o.small?"wu-h-12 wu-w-fit wu-px-3 wu-gap-2":o.large?"wu-h-16 wu-w-fit wu-px-5 wu-gap-3":"wu-h-14 wu-w-fit wu-px-4 wu-gap-2":o.small?"wu-w-12 wu-h-12 wu-p-0":o.large?"wu-w-16 wu-h-16 wu-p-0":"wu-w-14 wu-h-14 wu-p-0"),s=e.computed(()=>o.small?"wu-w-6 wu-h-6":o.large?"wu-w-8 wu-h-8":"wu-w-7 wu-h-7"),l=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(a,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["wu-rounded-full wu-inline-flex wu-items-center wu-justify-center wu-cursor-pointer wu-overflow-hidden wu-transition-all wu-border wu-border-transparent hover:wu-opacity-80 focus:wu-outline-hidden focus:wu-opacity-80 disabled:wu-opacity-50 disabled:wu-pointer-events-none",[i.value,r.value,l.value]]),type:"button","data-testid":"app-anchor",disabled:t.disabled||t.loading,onClick:u[0]||(u[0]=d=>a.$emit("click",d))},[t.loading?(e.openBlock(),e.createBlock(z,{key:0,class:"wu-animate-spin",outlined:"",large:!t.small&&!t.large,"extra-large":t.large},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("progress_activity",-1)])]),_:1},8,["large","extra-large"])):t.logo?(e.openBlock(),e.createElementBlock("img",{key:1,class:e.normalizeClass(["wu-object-contain wu-pointer-events-none wu-select-none wu-shrink-0",s.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,Zo)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(A,{key:2,class:"!wu-text-inherit wu-whitespace-nowrap",small:!t.large,"data-testid":"app-anchor-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["small"])):e.createCommentVNode("",!0)],10,Go))}}),Uo=["top","right","bottom","left"],mt=["start","end"],ht=Uo.reduce((t,o)=>t.concat(o,o+"-"+mt[0],o+"-"+mt[1]),[]),ve=Math.min,re=Math.max,Xo={left:"right",right:"left",bottom:"top",top:"bottom"},Ko={start:"end",end:"start"};function Ze(t,o,n){return re(t,ve(o,n))}function ie(t,o){return typeof t=="function"?t(o):t}function U(t){return t.split("-")[0]}function j(t){return t.split("-")[1]}function Gt(t){return t==="x"?"y":"x"}function nt(t){return t==="y"?"height":"width"}const Yo=new Set(["top","bottom"]);function X(t){return Yo.has(U(t))?"y":"x"}function rt(t){return Gt(X(t))}function Zt(t,o,n){n===void 0&&(n=!1);const r=j(t),i=rt(t),s=nt(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(l=Ne(l)),[l,Ne(l)]}function Qo(t){const o=Ne(t);return[Se(t),o,Se(o)]}function Se(t){return t.replace(/start|end/g,o=>Ko[o])}const wt=["left","right"],gt=["right","left"],Jo=["top","bottom"],en=["bottom","top"];function tn(t,o,n){switch(t){case"top":case"bottom":return n?o?gt:wt:o?wt:gt;case"left":case"right":return o?Jo:en;default:return[]}}function on(t,o,n,r){const i=j(t);let s=tn(U(t),n==="start",r);return i&&(s=s.map(l=>l+"-"+i),o&&(s=s.concat(s.map(Se)))),s}function Ne(t){return t.replace(/left|right|bottom|top/g,o=>Xo[o])}function nn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ut(t){return typeof t!="number"?nn(t):{top:t,right:t,bottom:t,left:t}}function me(t){const{x:o,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:o,right:o+r,bottom:n+i,x:o,y:n}}function vt(t,o,n){let{reference:r,floating:i}=t;const s=X(o),l=rt(o),a=nt(l),u=U(o),d=s==="y",w=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,m=r[a]/2-i[a]/2;let g;switch(u){case"top":g={x:w,y:r.y-i.height};break;case"bottom":g={x:w,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-i.width,y:h};break;default:g={x:r.x,y:r.y}}switch(j(o)){case"start":g[l]-=m*(n&&d?-1:1);break;case"end":g[l]+=m*(n&&d?-1:1);break}return g}const rn=async(t,o,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,a=s.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(o));let d=await l.getElementRects({reference:t,floating:o,strategy:i}),{x:w,y:h}=vt(d,r,u),m=r,g={},f=0;for(let y=0;y<a.length;y++){const{name:v,fn:c}=a[y],{x:p,y:x,data:T,reset:S}=await c({x:w,y:h,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:d,platform:l,elements:{reference:t,floating:o}});w=p??w,h=x??h,g={...g,[v]:{...g[v],...T}},S&&f<=50&&(f++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(d=S.rects===!0?await l.getElementRects({reference:t,floating:o,strategy:i}):S.rects),{x:w,y:h}=vt(d,m,u)),y=-1)}return{x:w,y:h,placement:m,strategy:i,middlewareData:g}};async function ze(t,o){var n;o===void 0&&(o={});const{x:r,y:i,platform:s,rects:l,elements:a,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:w="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=ie(o,t),f=Ut(g),v=a[m?h==="floating"?"reference":"floating":h],c=me(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:d,rootBoundary:w,strategy:u})),p=h==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=me(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:x,strategy:u}):p);return{top:(c.top-S.top+f.top)/T.y,bottom:(S.bottom-c.bottom+f.bottom)/T.y,left:(c.left-S.left+f.left)/T.x,right:(S.right-c.right+f.right)/T.x}}const sn=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:r,placement:i,rects:s,platform:l,elements:a,middlewareData:u}=o,{element:d,padding:w=0}=ie(t,o)||{};if(d==null)return{};const h=Ut(w),m={x:n,y:r},g=rt(i),f=nt(g),y=await l.getDimensions(d),v=g==="y",c=v?"top":"left",p=v?"bottom":"right",x=v?"clientHeight":"clientWidth",T=s.reference[f]+s.reference[g]-m[g]-s.floating[f],S=m[g]-s.reference[g],C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let $=C?C[x]:0;(!$||!await(l.isElement==null?void 0:l.isElement(C)))&&($=a.floating[x]||s.floating[f]);const k=T/2-S/2,_=$/2-y[f]/2-1,B=ve(h[c],_),P=ve(h[p],_),b=B,V=$-y[f]-P,E=$/2-y[f]/2+k,H=Ze(b,E,V),R=!u.arrow&&j(i)!=null&&E!==H&&s.reference[f]/2-(E<b?B:P)-y[f]/2<0,O=R?E<b?E-b:E-V:0;return{[g]:m[g]+O,data:{[g]:H,centerOffset:E-H-O,...R&&{alignmentOffset:O}},reset:R}}});function ln(t,o,n){return(t?[...n.filter(i=>j(i)===t),...n.filter(i=>j(i)!==t)]:n.filter(i=>U(i)===i)).filter(i=>t?j(i)===t||(o?Se(i)!==i:!1):!0)}const an=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,r,i;const{rects:s,middlewareData:l,placement:a,platform:u,elements:d}=o,{crossAxis:w=!1,alignment:h,allowedPlacements:m=ht,autoAlignment:g=!0,...f}=ie(t,o),y=h!==void 0||m===ht?ln(h||null,g,m):m,v=await ze(o,f),c=((n=l.autoPlacement)==null?void 0:n.index)||0,p=y[c];if(p==null)return{};const x=Zt(p,s,await(u.isRTL==null?void 0:u.isRTL(d.floating)));if(a!==p)return{reset:{placement:y[0]}};const T=[v[U(p)],v[x[0]],v[x[1]]],S=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:p,overflows:T}],C=y[c+1];if(C)return{data:{index:c+1,overflows:S},reset:{placement:C}};const $=S.map(B=>{const P=j(B.placement);return[B.placement,P&&w?B.overflows.slice(0,2).reduce((b,V)=>b+V,0):B.overflows[0],B.overflows]}).sort((B,P)=>B[1]-P[1]),_=((i=$.filter(B=>B[2].slice(0,j(B[0])?2:3).every(P=>P<=0))[0])==null?void 0:i[0])||$[0][0];return _!==a?{data:{index:c+1,overflows:S},reset:{placement:_}}:{}}}},un=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:i,middlewareData:s,rects:l,initialPlacement:a,platform:u,elements:d}=o,{mainAxis:w=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:y=!0,...v}=ie(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const c=U(i),p=X(a),x=U(a)===a,T=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=m||(x||!y?[Ne(a)]:Qo(a)),C=f!=="none";!m&&C&&S.push(...on(a,y,f,T));const $=[a,...S],k=await ze(o,v),_=[];let B=((r=s.flip)==null?void 0:r.overflows)||[];if(w&&_.push(k[c]),h){const E=Zt(i,l,T);_.push(k[E[0]],k[E[1]])}if(B=[...B,{placement:i,overflows:_}],!_.every(E=>E<=0)){var P,b;const E=(((P=s.flip)==null?void 0:P.index)||0)+1,H=$[E];if(H&&(!(h==="alignment"?p!==X(H):!1)||B.every(L=>X(L.placement)===p?L.overflows[0]>0:!0)))return{data:{index:E,overflows:B},reset:{placement:H}};let R=(b=B.filter(O=>O.overflows[0]<=0).sort((O,L)=>O.overflows[1]-L.overflows[1])[0])==null?void 0:b.placement;if(!R)switch(g){case"bestFit":{var V;const O=(V=B.filter(L=>{if(C){const F=X(L.placement);return F===p||F==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(F=>F>0).reduce((F,$o)=>F+$o,0)]).sort((L,F)=>L[1]-F[1])[0])==null?void 0:V[0];O&&(R=O);break}case"initialPlacement":R=a;break}if(i!==R)return{reset:{placement:R}}}return{}}}},cn=new Set(["left","top"]);async function dn(t,o){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=U(n),a=j(n),u=X(n)==="y",d=cn.has(l)?-1:1,w=s&&u?-1:1,h=ie(o,t);let{mainAxis:m,crossAxis:g,alignmentAxis:f}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof f=="number"&&(g=a==="end"?f*-1:f),u?{x:g*w,y:m*d}:{x:m*d,y:g*w}}const pn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:i,y:s,placement:l,middlewareData:a}=o,u=await dn(o,t);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:l}}}}},fn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:i}=o,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:v=>{let{x:c,y:p}=v;return{x:c,y:p}}},...u}=ie(t,o),d={x:n,y:r},w=await ze(o,u),h=X(U(i)),m=Gt(h);let g=d[m],f=d[h];if(s){const v=m==="y"?"top":"left",c=m==="y"?"bottom":"right",p=g+w[v],x=g-w[c];g=Ze(p,g,x)}if(l){const v=h==="y"?"top":"left",c=h==="y"?"bottom":"right",p=f+w[v],x=f-w[c];f=Ze(p,f,x)}const y=a.fn({...o,[m]:g,[h]:f});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[m]:s,[h]:l}}}}}},mn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:i,rects:s,platform:l,elements:a}=o,{apply:u=()=>{},...d}=ie(t,o),w=await ze(o,d),h=U(i),m=j(i),g=X(i)==="y",{width:f,height:y}=s.floating;let v,c;h==="top"||h==="bottom"?(v=h,c=m===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(c=h,v=m==="end"?"top":"bottom");const p=y-w.top-w.bottom,x=f-w.left-w.right,T=ve(y-w[v],p),S=ve(f-w[c],x),C=!o.middlewareData.shift;let $=T,k=S;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=o.middlewareData.shift)!=null&&r.enabled.y&&($=p),C&&!m){const B=re(w.left,0),P=re(w.right,0),b=re(w.top,0),V=re(w.bottom,0);g?k=f-2*(B!==0||P!==0?B+P:re(w.left,w.right)):$=y-2*(b!==0||V!==0?b+V:re(w.top,w.bottom))}await u({...o,availableWidth:k,availableHeight:$});const _=await l.getDimensions(a.floating);return f!==_.width||y!==_.height?{reset:{rects:!0}}:{}}}};function I(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function G(t){return I(t).getComputedStyle(t)}const yt=Math.min,he=Math.max,Ae=Math.round;function Xt(t){const o=G(t);let n=parseFloat(o.width),r=parseFloat(o.height);const i=t.offsetWidth,s=t.offsetHeight,l=Ae(n)!==i||Ae(r)!==s;return l&&(n=i,r=s),{width:n,height:r,fallback:l}}function te(t){return Yt(t)?(t.nodeName||"").toLowerCase():""}let Ce;function Kt(){if(Ce)return Ce;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(Ce=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),Ce):navigator.userAgent}function Z(t){return t instanceof I(t).HTMLElement}function J(t){return t instanceof I(t).Element}function Yt(t){return t instanceof I(t).Node}function xt(t){return typeof ShadowRoot>"u"?!1:t instanceof I(t).ShadowRoot||t instanceof ShadowRoot}function Le(t){const{overflow:o,overflowX:n,overflowY:r,display:i}=G(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&!["inline","contents"].includes(i)}function hn(t){return["table","td","th"].includes(te(t))}function Ue(t){const o=/firefox/i.test(Kt()),n=G(t),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||o&&n.willChange==="filter"||o&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((i=>n.willChange.includes(i)))||["paint","layout","strict","content"].some((i=>{const s=n.contain;return s!=null&&s.includes(i)}))}function Qt(){return!/^((?!chrome|android).)*safari/i.test(Kt())}function it(t){return["html","body","#document"].includes(te(t))}function Jt(t){return J(t)?t:t.contextElement}const eo={x:1,y:1};function ce(t){const o=Jt(t);if(!Z(o))return eo;const n=o.getBoundingClientRect(),{width:r,height:i,fallback:s}=Xt(o);let l=(s?Ae(n.width):n.width)/r,a=(s?Ae(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function ye(t,o,n,r){var i,s;o===void 0&&(o=!1),n===void 0&&(n=!1);const l=t.getBoundingClientRect(),a=Jt(t);let u=eo;o&&(r?J(r)&&(u=ce(r)):u=ce(t));const d=a?I(a):window,w=!Qt()&&n;let h=(l.left+(w&&((i=d.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,m=(l.top+(w&&((s=d.visualViewport)==null?void 0:s.offsetTop)||0))/u.y,g=l.width/u.x,f=l.height/u.y;if(a){const y=I(a),v=r&&J(r)?I(r):r;let c=y.frameElement;for(;c&&r&&v!==y;){const p=ce(c),x=c.getBoundingClientRect(),T=getComputedStyle(c);x.x+=(c.clientLeft+parseFloat(T.paddingLeft))*p.x,x.y+=(c.clientTop+parseFloat(T.paddingTop))*p.y,h*=p.x,m*=p.y,g*=p.x,f*=p.y,h+=x.x,m+=x.y,c=I(c).frameElement}}return{width:g,height:f,top:m,right:h+g,bottom:m+f,left:h,x:h,y:m}}function ee(t){return((Yt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Me(t){return J(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function to(t){return ye(ee(t)).left+Me(t).scrollLeft}function xe(t){if(te(t)==="html")return t;const o=t.assignedSlot||t.parentNode||xt(t)&&t.host||ee(t);return xt(o)?o.host:o}function oo(t){const o=xe(t);return it(o)?o.ownerDocument.body:Z(o)&&Le(o)?o:oo(o)}function Te(t,o){var n;o===void 0&&(o=[]);const r=oo(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=I(r);return i?o.concat(s,s.visualViewport||[],Le(r)?r:[]):o.concat(r,Te(r))}function bt(t,o,n){return o==="viewport"?me((function(r,i){const s=I(r),l=ee(r),a=s.visualViewport;let u=l.clientWidth,d=l.clientHeight,w=0,h=0;if(a){u=a.width,d=a.height;const m=Qt();(m||!m&&i==="fixed")&&(w=a.offsetLeft,h=a.offsetTop)}return{width:u,height:d,x:w,y:h}})(t,n)):J(o)?me((function(r,i){const s=ye(r,!0,i==="fixed"),l=s.top+r.clientTop,a=s.left+r.clientLeft,u=Z(r)?ce(r):{x:1,y:1};return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:a*u.x,y:l*u.y}})(o,n)):me((function(r){const i=ee(r),s=Me(r),l=r.ownerDocument.body,a=he(i.scrollWidth,i.clientWidth,l.scrollWidth,l.clientWidth),u=he(i.scrollHeight,i.clientHeight,l.scrollHeight,l.clientHeight);let d=-s.scrollLeft+to(r);const w=-s.scrollTop;return G(l).direction==="rtl"&&(d+=he(i.clientWidth,l.clientWidth)-a),{width:a,height:u,x:d,y:w}})(ee(t)))}function kt(t){return Z(t)&&G(t).position!=="fixed"?t.offsetParent:null}function Ct(t){const o=I(t);let n=kt(t);for(;n&&hn(n)&&G(n).position==="static";)n=kt(n);return n&&(te(n)==="html"||te(n)==="body"&&G(n).position==="static"&&!Ue(n))?o:n||(function(r){let i=xe(r);for(;Z(i)&&!it(i);){if(Ue(i))return i;i=xe(i)}return null})(t)||o}function wn(t,o,n){const r=Z(o),i=ee(o),s=ye(t,!0,n==="fixed",o);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&n!=="fixed")if((te(o)!=="body"||Le(i))&&(l=Me(o)),Z(o)){const u=ye(o,!0);a.x=u.x+o.clientLeft,a.y=u.y+o.clientTop}else i&&(a.x=to(i));return{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}const gn={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:r,strategy:i}=t;const s=n==="clippingAncestors"?(function(d,w){const h=w.get(d);if(h)return h;let m=Te(d).filter((v=>J(v)&&te(v)!=="body")),g=null;const f=G(d).position==="fixed";let y=f?xe(d):d;for(;J(y)&&!it(y);){const v=G(y),c=Ue(y);(f?c||g:c||v.position!=="static"||!g||!["absolute","fixed"].includes(g.position))?g=v:m=m.filter((p=>p!==y)),y=xe(y)}return w.set(d,m),m})(o,this._c):[].concat(n),l=[...s,r],a=l[0],u=l.reduce(((d,w)=>{const h=bt(o,w,i);return d.top=he(h.top,d.top),d.right=yt(h.right,d.right),d.bottom=yt(h.bottom,d.bottom),d.left=he(h.left,d.left),d}),bt(o,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:o,offsetParent:n,strategy:r}=t;const i=Z(n),s=ee(n);if(n===s)return o;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((te(n)!=="body"||Le(s))&&(l=Me(n)),Z(n))){const d=ye(n);a=ce(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-l.scrollLeft*a.x+u.x,y:o.y*a.y-l.scrollTop*a.y+u.y}},isElement:J,getDimensions:function(t){return Z(t)?Xt(t):t.getBoundingClientRect()},getOffsetParent:Ct,getDocumentElement:ee,getScale:ce,async getElementRects(t){let{reference:o,floating:n,strategy:r}=t;const i=this.getOffsetParent||Ct,s=this.getDimensions;return{reference:wn(o,await i(n),r),floating:{x:0,y:0,...await s(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>G(t).direction==="rtl"},vn=(t,o,n)=>{const r=new Map,i={platform:gn,...n},s={...i.platform,_c:r};return rn(t,o,{...i,platform:s})};function no(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?no(t[n],o[n]):t[n]=o[n])}const q={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:t=>[...t,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function be(t,o){let n=q.themes[t]||{},r;do r=n[o],typeof r>"u"?n.$extend?n=q.themes[n.$extend]||{}:(n=null,r=q[o]):n=null;while(n);return r}function yn(t){const o=[t];let n=q.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=q.themes[n.$extend]||{}):n=null;while(n);return o.map(r=>`v-popper--theme-${r}`)}function $t(t){const o=[t];let n=q.themes[t]||{};do n.$extend?(o.push(n.$extend),n=q.themes[n.$extend]||{}):n=null;while(n);return o}let de=!1;if(typeof window<"u"){de=!1;try{const t=Object.defineProperty({},"passive",{get(){de=!0}});window.addEventListener("test",null,t)}catch{}}let ro=!1;typeof window<"u"&&typeof navigator<"u"&&(ro=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const io=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),Bt={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},_t={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function St(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function Fe(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const W=[];let ne=null;const Nt={};function At(t){let o=Nt[t];return o||(o=Nt[t]=[]),o}let Xe=function(){};typeof window<"u"&&(Xe=window.Element);function N(t){return function(o){return be(o.theme,t)}}const Ie="__floating-vue__popper",so=()=>e.defineComponent({name:"VPopper",provide(){return{[Ie]:{parentPopper:this}}},inject:{[Ie]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:N("disabled")},positioningDisabled:{type:Boolean,default:N("positioningDisabled")},placement:{type:String,default:N("placement"),validator:t=>io.includes(t)},delay:{type:[String,Number,Object],default:N("delay")},distance:{type:[Number,String],default:N("distance")},skidding:{type:[Number,String],default:N("skidding")},triggers:{type:Array,default:N("triggers")},showTriggers:{type:[Array,Function],default:N("showTriggers")},hideTriggers:{type:[Array,Function],default:N("hideTriggers")},popperTriggers:{type:Array,default:N("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:N("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:N("popperHideTriggers")},container:{type:[String,Object,Xe,Boolean],default:N("container")},boundary:{type:[String,Xe],default:N("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:N("strategy")},autoHide:{type:[Boolean,Function],default:N("autoHide")},handleResize:{type:Boolean,default:N("handleResize")},instantMove:{type:Boolean,default:N("instantMove")},eagerMount:{type:Boolean,default:N("eagerMount")},popperClass:{type:[String,Array,Object],default:N("popperClass")},computeTransformOrigin:{type:Boolean,default:N("computeTransformOrigin")},autoMinSize:{type:Boolean,default:N("autoMinSize")},autoSize:{type:[Boolean,String],default:N("autoSize")},autoMaxSize:{type:Boolean,default:N("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:N("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:N("preventOverflow")},overflowPadding:{type:[Number,String],default:N("overflowPadding")},arrowPadding:{type:[Number,String],default:N("arrowPadding")},arrowOverflow:{type:Boolean,default:N("arrowOverflow")},flip:{type:Boolean,default:N("flip")},shift:{type:Boolean,default:N("shift")},shiftCrossAxis:{type:Boolean,default:N("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:N("noAutoFocus")},disposeTimeout:{type:Number,default:N("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(t=>t.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var t;return(t=this[Ie])==null?void 0:t.parentPopper},hasPopperShowTriggerHover(){var t,o;return((t=this.popperTriggers)==null?void 0:t.includes("hover"))||((o=this.popperShowTriggers)==null?void 0:o.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(t){t?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((t,o)=>(t[o]="$_computePosition",t),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:t=null,skipDelay:o=!1,force:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(t,o),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:t=null,skipDelay:o=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:o}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(t,o),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var t;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((t=this.referenceNode)==null?void 0:t.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(o=>o.nodeType===o.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(pn({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(an({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(fn({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(un({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(sn({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:i,middlewareData:s})=>{let l;const{centerOffset:a}=s.arrow;return r.startsWith("top")||r.startsWith("bottom")?l=Math.abs(a)>i.reference.width/2:l=Math.abs(a)>i.reference.height/2,{data:{overflow:l}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:i,placement:s,middlewareData:l})=>{var a;if((a=l.autoSize)!=null&&a.skip)return{};let u,d;return s.startsWith("top")||s.startsWith("bottom")?u=i.reference.width:d=i.reference.height,this.$_innerNode.style[r==="min"?"minWidth":r==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[r==="min"?"minHeight":r==="max"?"maxHeight":"height"]=d!=null?`${d}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,t.middleware.push(mn({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:r,availableHeight:i})=>{this.$_innerNode.style.maxWidth=r!=null?`${r}px`:null,this.$_innerNode.style.maxHeight=i!=null?`${i}px`:null}})));const n=await vn(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(t,o=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),ne&&this.instantMove&&ne.instantMove&&ne!==this.parentPopper){ne.$_applyHide(!0),this.$_applyShow(!0);return}o?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(t,o=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(ne=this),o?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(t){const o=this.delay;return parseInt(o&&o[t]||o||0)},async $_applyShow(t=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=t,!this.isShown&&(this.$_ensureTeleport(),await Fe(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Te(this.$_referenceNode),...Te(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const o=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),r=n.parentNode.getBoundingClientRect(),i=o.x+o.width/2-(r.left+n.offsetLeft),s=o.y+o.height/2-(r.top+n.offsetTop);this.result.transformOrigin=`${i}px ${s}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const t=this.showGroup;if(t){let o;for(let n=0;n<W.length;n++)o=W[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}W.push(this),document.body.classList.add("v-popper--some-open");for(const o of $t(this.theme))At(o).push(this),document.body.classList.add(`v-popper--some-open--${o}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Fe(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(t=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=t,St(W,this),W.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of $t(this.theme)){const r=At(n);St(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}ne===this&&(ne=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const o=this.disposeTimeout;o!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},o)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Fe(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let t=this.container;if(typeof t=="string"?t=window.document.querySelector(t):t===!1&&(t=this.$_targetNodes[0].parentNode),!t)throw new Error("No container for popover: "+this.container);t.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const t=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,Bt,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Bt,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,_t,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],_t,this.popperTriggers,this.popperHideTriggers,o)},$_registerEventListeners(t,o,n){this.$_events.push({targetNodes:t,eventType:o,handler:n}),t.forEach(r=>r.addEventListener(o,n,de?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,r,i){let s=n;r!=null&&(s=typeof r=="function"?r(s):r),s.forEach(l=>{const a=o[l];a&&this.$_registerEventListeners(t,a,i)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:r,eventType:i,handler:s}=n;!t||t===i?r.forEach(l=>l.removeEventListener(i,s)):o.push(n)}),this.$_events=o},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(t,o=!1){this.$_showFrameLocked||(this.hide({event:t}),t.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),o&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(t,o){for(const n of this.$_targetNodes){const r=n.getAttribute(t);r&&(n.removeAttribute(t),n.setAttribute(o,r))}},$_applyAttrsToTarget(t){for(const o of this.$_targetNodes)for(const n in t){const r=t[n];r==null?o.removeAttribute(n):o.setAttribute(n,r)}},$_updateParentShownChildren(t){let o=this.parentPopper;for(;o;)t?o.shownChildren.add(this.randomId):(o.shownChildren.delete(this.randomId),o.pendingHide&&o.hide()),o=o.parentPopper},$_isAimingPopper(){const t=this.$_referenceNode.getBoundingClientRect();if(we>=t.left&&we<=t.right&&ge>=t.top&&ge<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=we-Y,r=ge-Q,i=o.left+o.width/2-Y+(o.top+o.height/2)-Q+o.width+o.height,s=Y+n*i,l=Q+r*i;return $e(Y,Q,s,l,o.left,o.top,o.left,o.bottom)||$e(Y,Q,s,l,o.left,o.top,o.right,o.top)||$e(Y,Q,s,l,o.right,o.top,o.right,o.bottom)||$e(Y,Q,s,l,o.left,o.bottom,o.right,o.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(ro){const t=de?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>Tt(o,!0),t),document.addEventListener("touchend",o=>Vt(o,!0),t)}else window.addEventListener("mousedown",t=>Tt(t,!1),!0),window.addEventListener("click",t=>Vt(t,!1),!0);window.addEventListener("resize",bn)}function Tt(t,o){if(q.autoHideOnMousedown)lo(t,o);else for(let n=0;n<W.length;n++){const r=W[n];try{r.mouseDownContains=r.popperNode().contains(t.target)}catch{}}}function Vt(t,o){q.autoHideOnMousedown||lo(t,o)}function lo(t,o){const n={};for(let r=W.length-1;r>=0;r--){const i=W[r];try{const s=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(t.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&Pt(i,s,t)){if(i.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&s){let a=i.parentPopper;for(;a;)n[a.randomId]=!0,a=a.parentPopper;return}let l=i.parentPopper;for(;l&&Pt(l,l.containsGlobalTarget,t);)l.$_handleGlobalClose(t,o),l=l.parentPopper}})}catch{}}}function Pt(t,o,n){return n.closeAllPopover||n.closePopover&&o||xn(t,n)&&!o}function xn(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function bn(){for(let t=0;t<W.length;t++)W[t].$_computePosition()}let Y=0,Q=0,we=0,ge=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{Y=we,Q=ge,we=t.clientX,ge=t.clientY},de?{passive:!0}:void 0);function $e(t,o,n,r,i,s,l,a){const u=((l-i)*(o-s)-(a-s)*(t-i))/((a-s)*(n-t)-(l-i)*(r-o)),d=((n-t)*(o-s)-(r-o)*(t-i))/((a-s)*(n-t)-(l-i)*(r-o));return u>=0&&u<=1&&d>=0&&d<=1}const kn={extends:so()},Re=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n};function Cn(t,o,n,r,i,s){return e.openBlock(),e.createElementBlock("div",{ref:"reference",class:e.normalizeClass(["v-popper",{"v-popper--shown":t.slotData.isShown}])},[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.slotData)))],2)}const $n=Re(kn,[["render",Cn]]);function Bn(){var t=window.navigator.userAgent,o=t.indexOf("MSIE ");if(o>0)return parseInt(t.substring(o+5,t.indexOf(".",o)),10);var n=t.indexOf("Trident/");if(n>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let _e;function Ke(){Ke.init||(Ke.init=!0,_e=Bn()!==-1)}var Oe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ke(),e.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",_e&&this.$el.appendChild(t),t.data="about:blank",_e||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!_e&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const _n=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const Sn={class:"resize-observer",tabindex:"-1"};e.popScopeId();const Nn=_n((t,o,n,r,i,s)=>(e.openBlock(),e.createBlock("div",Sn)));Oe.render=Nn;Oe.__scopeId="data-v-b329ee4c";Oe.__file="src/components/ResizeObserver.vue";const ao=(t="theme")=>({computed:{themeClass(){return yn(this[t])}}}),An=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:Oe},mixins:[ao()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(t){return t!=null&&!isNaN(t)?`${t}px`:null}}}),Tn=["id","aria-hidden","tabindex","data-popper-placement"],Vn={ref:"inner",class:"v-popper__inner"},Pn=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),En=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),zn=[Pn,En];function Ln(t,o,n,r,i,s){const l=e.resolveComponent("ResizeObserver");return e.openBlock(),e.createElementBlock("div",{id:t.popperId,ref:"popover",class:e.normalizeClass(["v-popper__popper",[t.themeClass,t.classes.popperClass,{"v-popper__popper--shown":t.shown,"v-popper__popper--hidden":!t.shown,"v-popper__popper--show-from":t.classes.showFrom,"v-popper__popper--show-to":t.classes.showTo,"v-popper__popper--hide-from":t.classes.hideFrom,"v-popper__popper--hide-to":t.classes.hideTo,"v-popper__popper--skip-transition":t.skipTransition,"v-popper__popper--arrow-overflow":t.result&&t.result.arrow.overflow,"v-popper__popper--no-positioning":!t.result}]]),style:e.normalizeStyle(t.result?{position:t.result.strategy,transform:`translate3d(${Math.round(t.result.x)}px,${Math.round(t.result.y)}px,0)`}:void 0),"aria-hidden":t.shown?"false":"true",tabindex:t.autoHide?0:void 0,"data-popper-placement":t.result?t.result.placement:void 0,onKeyup:o[2]||(o[2]=e.withKeys(a=>t.autoHide&&t.$emit("hide"),["esc"]))},[e.createElementVNode("div",{class:"v-popper__backdrop",onClick:o[0]||(o[0]=a=>t.autoHide&&t.$emit("hide"))}),e.createElementVNode("div",{class:"v-popper__wrapper",style:e.normalizeStyle(t.result?{transformOrigin:t.result.transformOrigin}:void 0)},[e.createElementVNode("div",Vn,[t.mounted?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",null,[e.renderSlot(t.$slots,"default")]),t.handleResize?(e.openBlock(),e.createBlock(l,{key:0,onNotify:o[1]||(o[1]=a=>t.$emit("resize",a))})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],512),e.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:e.normalizeStyle(t.result?{left:t.toPx(t.result.arrow.x),top:t.toPx(t.result.arrow.y)}:void 0)},zn,4)],4)],46,Tn)}const uo=Re(An,[["render",Ln]]),co={methods:{show(...t){return this.$refs.popper.show(...t)},hide(...t){return this.$refs.popper.hide(...t)},dispose(...t){return this.$refs.popper.dispose(...t)},onResize(...t){return this.$refs.popper.onResize(...t)}}};let Ye=function(){};typeof window<"u"&&(Ye=window.Element);const Mn=e.defineComponent({name:"VPopperWrapper",components:{Popper:$n,PopperContent:uo},mixins:[co,ao("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Ye,Boolean],default:void 0},boundary:{type:[String,Ye],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":t=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(t=>t!==this.$refs.popperContent.$el)}}});function Rn(t,o,n,r,i,s){const l=e.resolveComponent("PopperContent"),a=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(a,e.mergeProps({ref:"popper"},t.$props,{theme:t.finalTheme,"target-nodes":t.getTargetNodes,"popper-node":()=>t.$refs.popperContent.$el,class:[t.themeClass],onShow:o[0]||(o[0]=()=>t.$emit("show")),onHide:o[1]||(o[1]=()=>t.$emit("hide")),"onUpdate:shown":o[2]||(o[2]=u=>t.$emit("update:shown",u)),onApplyShow:o[3]||(o[3]=()=>t.$emit("apply-show")),onApplyHide:o[4]||(o[4]=()=>t.$emit("apply-hide")),onCloseGroup:o[5]||(o[5]=()=>t.$emit("close-group")),onCloseDirective:o[6]||(o[6]=()=>t.$emit("close-directive")),onAutoHide:o[7]||(o[7]=()=>t.$emit("auto-hide")),onResize:o[8]||(o[8]=()=>t.$emit("resize"))}),{default:e.withCtx(({popperId:u,isShown:d,shouldMountContent:w,skipTransition:h,autoHide:m,show:g,hide:f,handleResize:y,onResize:v,classes:c,result:p})=>[e.renderSlot(t.$slots,"default",{shown:d,show:g,hide:f}),e.createVNode(l,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:d,mounted:w,"skip-transition":h,"auto-hide":m,"handle-resize":y,classes:c,result:p,onHide:f,onResize:v},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:d,hide:f})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const st=Re(Mn,[["render",Rn]]),po={...st,name:"VDropdown",vPopperTheme:"dropdown"},On={...st,name:"VMenu",vPopperTheme:"menu"},Hn={...st,name:"VTooltip",vPopperTheme:"tooltip"},Dn=e.defineComponent({name:"VTooltipDirective",components:{Popper:so(),PopperContent:uo},mixins:[co],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>be(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>be(t.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(t){if(typeof this.content=="function"&&this.$_isShown&&(t||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const o=++this.$_fetchId,n=this.content(this);n.then?n.then(r=>this.onResult(o,r)):this.onResult(o,n)}},onResult(t,o){t===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=o)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),Fn=["innerHTML"],In=["textContent"];function Wn(t,o,n,r,i,s){const l=e.resolveComponent("PopperContent"),a=e.resolveComponent("Popper");return e.openBlock(),e.createBlock(a,e.mergeProps({ref:"popper"},t.$attrs,{theme:t.theme,"target-nodes":t.targetNodes,"popper-node":()=>t.$refs.popperContent.$el,onApplyShow:t.onShow,onApplyHide:t.onHide}),{default:e.withCtx(({popperId:u,isShown:d,shouldMountContent:w,skipTransition:h,autoHide:m,hide:g,handleResize:f,onResize:y,classes:v,result:c})=>[e.createVNode(l,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:d,mounted:w,"skip-transition":h,"auto-hide":m,"handle-resize":f,classes:v,result:c,onHide:g,onResize:y},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,Fn)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,In))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const jn=Re(Dn,[["render",Wn]]),fo="v-popper--has-tooltip";function qn(t,o){let n=t.placement;if(!n&&o)for(const r of io)o[r]&&(n=r);return n||(n=be(t.theme||"tooltip","placement")),n}function mo(t,o,n){let r;const i=typeof o;return i==="string"?r={content:o}:o&&i==="object"?r=o:r={content:!1},r.placement=qn(r,n),r.targetNodes=()=>[t],r.referenceNode=()=>t,r}let We,ke,Gn=0;function Zn(){if(We)return;ke=e.ref([]),We=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:ke}},render(){return this.directives.map(o=>e.h(jn,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),We.mount(t)}function Un(t,o,n){Zn();const r=e.ref(mo(t,o,n)),i=e.ref(!1),s={id:Gn++,options:r,shown:i};return ke.value.push(s),t.classList&&t.classList.add(fo),t.$_popper={options:r,item:s,show(){i.value=!0},hide(){i.value=!1}}}function ho(t){if(t.$_popper){const o=ke.value.indexOf(t.$_popper.item);o!==-1&&ke.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(fo)}function Et(t,{value:o,modifiers:n}){const r=mo(t,o,n);if(!r.content||be(r.theme||"tooltip","disabled"))ho(t);else{let i;t.$_popper?(i=t.$_popper,i.options.value=r):i=Un(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?i.show():i.hide())}}const Xn={beforeMount:Et,updated:Et,beforeUnmount(t){ho(t)}};function zt(t){t.addEventListener("mousedown",Ve),t.addEventListener("click",Ve),t.addEventListener("touchstart",wo,de?{passive:!0}:!1)}function Lt(t){t.removeEventListener("mousedown",Ve),t.removeEventListener("click",Ve),t.removeEventListener("touchstart",wo),t.removeEventListener("touchend",go),t.removeEventListener("touchcancel",vo)}function Ve(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function wo(t){if(t.changedTouches.length===1){const o=t.currentTarget;o.$_vclosepopover_touch=!0;const n=t.changedTouches[0];o.$_vclosepopover_touchPoint=n,o.addEventListener("touchend",go),o.addEventListener("touchcancel",vo)}}function go(t){const o=t.currentTarget;if(o.$_vclosepopover_touch=!1,t.changedTouches.length===1){const n=t.changedTouches[0],r=o.$_vclosepopover_touchPoint;t.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}}function vo(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const Kn={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&zt(t)},updated(t,{value:o,oldValue:n,modifiers:r}){t.$_closePopoverModifiers=r,o!==n&&(typeof o>"u"||o?zt(t):Lt(t))},beforeUnmount(t){Lt(t)}},Yn=po;function Qn(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,no(q,o),t.directive("tooltip",Xn),t.directive("close-popper",Kn),t.component("VTooltip",Hn),t.component("VDropdown",po),t.component("VMenu",On))}const Jn={version:"5.2.2",install:Qn,options:q},er={key:0,class:"wu-flex wu-shrink-0 wu-items-end","data-testid":"app-message-avatar"},tr={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},Pe=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(d){return!!n.value[d]}const i=e.computed(()=>o.tertiary),s=e.computed(()=>!i.value&&o.secondary),l=e.computed(()=>!i.value&&r("avatar")),a=e.computed(()=>i.value?"wu-justify-center":s.value?"wu-flex-row-reverse":""),u=e.computed(()=>i.value?"wu-items-center wu-flex":s.value?"wu-rounded-br-none wu-bg-primary-100 wu-p-3 dark:wu-bg-primary-900":"wu-rounded-bl-none wu-bg-gray-200 wu-p-3 dark:wu-bg-neutral-700");return(d,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex wu-items-end wu-gap-2 wu-w-full",a.value]),"data-testid":"app-message"},[l.value?(e.openBlock(),e.createElementBlock("div",er,[e.renderSlot(d.$slots,"avatar")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-md wu-relative wu-min-h-8",u.value]),"data-testid":"app-message-bubble"},[e.renderSlot(d.$slots,"default"),r("trailing")?(e.openBlock(),e.createElementBlock("div",tr,[e.renderSlot(d.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),lt=e.defineComponent({__name:"app-skeleton",props:{round:Boolean,fluid:Boolean,block:Boolean},setup(t){const o=t,n=e.computed(()=>o.fluid?"!wu-w-full":""),r=e.computed(()=>o.round?"!wu-rounded-full":o.block?"!wu-rounded-none":"!wu-rounded-lg");return(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-animate-pulse wu-bg-gray-200 dark:wu-bg-neutral-700",[r.value,n.value]])},null,2))}}),at=e.defineComponent({__name:"app-empty",props:{error:{type:Boolean,default:!1}},emits:["refetch"],setup(t,{emit:o}){const n=o,r=e.computed(()=>e.useSlots());function i(s){return!!r.value[s]}return(s,l)=>(e.openBlock(),e.createBlock(M,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(z,{key:0,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):i("icon")?e.renderSlot(s.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(z,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(A,{class:"wu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(D,{key:3,onClick:l[0]||(l[0]=a=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[l[4]||(l[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),or={class:"wu-flex wu-flex-col wu-items-center wu-h-full wu-w-full wu-overflow-hidden","data-testid":"app-chat-service"},nr={key:0,class:"wu-w-full wu-h-12"},rr={key:0,class:"wu-flex wu-items-center wu-justify-center wu-rounded-full wu-bg-gray-100 wu-w-7 wu-h-7 dark:wu-bg-neutral-700"},ir=["src"],sr={key:1,class:"wu-flex wu-w-7 wu-h-7"},lr={key:0,class:"wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-flex-col dark:wu-border-neutral-700"},ar=["onKeydown","disabled"],ur={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},cr={class:"wu-flex wu-bg-white wu-transition-all wu-p-3 wu-gap-2 wu-items-center hover:wu-bg-gray-100"},dr={class:"wu-flex wu-bg-white wu-transition-all wu-p-3 wu-gap-2 wu-items-center hover:wu-bg-gray-100"},pr=e.defineComponent({__name:"app-chat-service",props:{rule:{},edges:{}},emits:["send-message","retry-loading-chat-service"],setup(t,{emit:o}){const n=o,{history:r,chat:i}=pe(),{isErrorLoading:s,isLoading:l,isSendingMessage:a,messages:u,text:d}=i,w=e.computed(()=>r.value.length>0),h=e.ref(null),m=(v=!0)=>{const c=h.value;c&&c.scrollTo({top:c.scrollHeight,behavior:v?"smooth":"auto"})},g=v=>`https://api.dicebear.com/10.x/marbles/svg?backgroundColor=&seed=${v==="operator"?"operator":"user"}`,f=()=>{n("send-message",d.value)};e.watch(()=>u.value.length,async()=>{await e.nextTick(),m()}),e.onMounted(()=>{m(!1)});const y=(v,c,p)=>c[p-1]?c[p-1]?.from===v.from?"wu-mt-1":"wu-mt-4":"wu-mt-0";return(v,c)=>(e.openBlock(),e.createElementBlock("div",or,[e.createElementVNode("div",{class:"wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full wu-px-6 wu-overflow-y-auto",ref_key:"messagesList",ref:h,"data-testid":"app-service-messages"},[w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nr)),e.unref(l)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(p,x)=>e.createVNode(Pe,{key:x,primary:x%2===0,secondary:x%2===1},{default:e.withCtx(()=>[e.createVNode(lt,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(s)?(e.openBlock(),e.createBlock(at,{key:2,class:"wu-h-full",onRefetch:c[0]||(c[0]=p=>n("retry-loading-chat-service")),error:""},{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("Ocorreu um erro ao carregar o atendimento.",-1)])]),_:1})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(e.unref(u),(p,x)=>(e.openBlock(),e.createBlock(Pe,{key:x,primary:p.from==="operator",secondary:p.from==="contact",tertiary:p.from==="system",class:e.normalizeClass([y(p,e.unref(u),x)])},e.createSlots({default:e.withCtx(()=>[p.from=="system"?(e.openBlock(),e.createBlock(A,{key:0,class:"wu-text-center",gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.text),1)]),_:2},1024)):(e.openBlock(),e.createBlock(A,{key:1,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.text),1)]),_:2},1024))]),_:2},[p.from==="operator"?{name:"avatar",fn:e.withCtx(()=>[e.unref(u)[x+1]?.from!==p.from?(e.openBlock(),e.createElementBlock("div",rr,[e.createElementVNode("img",{class:"wu-rounded-full wu-w-full wu-h-full wu-object-contain",src:g(p.from)},null,8,ir)])):(e.openBlock(),e.createElementBlock("div",sr))]),key:"0"}:void 0,p.from!=="system"?{name:"trailing",fn:e.withCtx(()=>[e.createVNode(A,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode("12:58",-1)])]),_:1})]),key:"1"}:void 0]),1032,["primary","secondary","tertiary","class"]))),128)),c[4]||(c[4]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-4"},null,-1))],512),!e.unref(l)&&!e.unref(s)&&t.rule.settings?.features?.sendMessage?(e.openBlock(),e.createElementBlock("div",lr,[e.withDirectives(e.createElementVNode("textarea",{class:"wu-w-full wu-p-6 wu-resize-none wu-font-primary wu-text-xs wu-bg-transparent wu-text-gray-900 placeholder:wu-text-neutral placeholder:wu-text-xs placeholder:wu-font-normal focus:wu-outline-none dark:wu-text-neutral-100 [&:disabled]:wu-opacity-50","onUpdate:modelValue":c[1]||(c[1]=p=>e.isRef(d)?d.value=p:null),onKeydown:e.withKeys(e.withModifiers(f,["exact","prevent"]),["enter"]),placeholder:"Escreva uma mensagem...",disabled:e.unref(a)},null,40,ar),[[e.vModelText,e.unref(d)]]),e.createElementVNode("div",ur,[t.rule.settings?.features?.sendAttachment?(e.openBlock(),e.createBlock(e.unref(Yn),{key:0,placement:"top-end"},{popper:e.withCtx(()=>[e.createVNode(M,{"gap-none":"",col:""},{default:e.withCtx(()=>[e.createElementVNode("button",cr,[e.createVNode(M,{class:"wu-w-7 wu-h-7 wu-bg-gray-200 wu-rounded-full",center:"","padding-base":""},{default:e.withCtx(()=>[e.createVNode(z,{large:"",gray:""},{default:e.withCtx(()=>[...c[6]||(c[6]=[e.createTextVNode("image",-1)])]),_:1})]),_:1}),e.createVNode(M,{class:"wu-w-full wu-items-start",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(A,{semibold:"",small:""},{default:e.withCtx(()=>[...c[7]||(c[7]=[e.createTextVNode("Imagem",-1)])]),_:1}),e.createVNode(A,{"extra-small":"",gray:""},{default:e.withCtx(()=>[...c[8]||(c[8]=[e.createTextVNode("JPG, PNG ou GIF",-1)])]),_:1})]),_:1})]),c[12]||(c[12]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("button",dr,[e.createVNode(M,{class:"wu-w-7 wu-h-7 wu-bg-gray-200 wu-rounded-full",center:"","padding-base":""},{default:e.withCtx(()=>[e.createVNode(z,{large:"",gray:""},{default:e.withCtx(()=>[...c[9]||(c[9]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(M,{class:"wu-w-full wu-items-start",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(A,{semibold:"",small:""},{default:e.withCtx(()=>[...c[10]||(c[10]=[e.createTextVNode("Documento",-1)])]),_:1}),e.createVNode(A,{"extra-small":"",gray:""},{default:e.withCtx(()=>[...c[11]||(c[11]=[e.createTextVNode("PDF, DOC, XLS, PPT, etc.",-1)])]),_:1})]),_:1})])]),_:1})]),default:e.withCtx(()=>[e.createVNode(D,{disabled:e.unref(a),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(z,{class:"wu-rotate-45",large:"",gray:""},{default:e.withCtx(()=>[...c[5]||(c[5]=[e.createTextVNode("attach_file ",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.createCommentVNode("",!0),t.rule.settings?.features?.sendAttachment?(e.openBlock(),e.createBlock(D,{key:1,disabled:e.unref(a),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(z,{large:"",gray:""},{default:e.withCtx(()=>[...c[13]||(c[13]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(D,{onClick:f,loading:e.unref(a),disabled:!e.unref(d),small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(z,{class:"-wu-rotate-45 wu-translate-x-[0.10rem] -wu-translate-y-[0.12rem]",outlined:"",large:""},{default:e.withCtx(()=>[...c[14]||(c[14]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)]))}}),fr={class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-h-full wu-w-full wu-px-6","data-testid":"app-voice-service"},mr={class:"wu-flex wu-items-center wu-justify-center wu-rounded-full wu-bg-gray-100 wu-w-20 wu-h-20 dark:wu-bg-neutral-700"},hr=e.defineComponent({__name:"app-voice-service",props:{rule:{},edges:{}},setup(t){const o=t,n=e.computed(()=>o.rule.name||"Ligação");return(r,i)=>(e.openBlock(),e.createElementBlock("div",fr,[e.createVNode(M,{class:"wu-w-full",col:"",center:"","gap-lg":""},{default:e.withCtx(()=>[e.createVNode(M,{col:"",center:"","gap-base":""},{default:e.withCtx(()=>[e.createElementVNode("div",mr,[e.createVNode(z,{"extra-large":"",gray:""},{default:e.withCtx(()=>[...i[0]||(i[0]=[e.createTextVNode("phone_in_talk",-1)])]),_:1})]),e.createVNode(A,{class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1}),e.createVNode(A,{class:"wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("Aguardando conexão",-1)])]),_:1})]),_:1}),e.createVNode(M,{center:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(D,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(z,{large:"",gray:""},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1}),e.createVNode(D,{alert:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(z,{large:""},{default:e.withCtx(()=>[...i[3]||(i[3]=[e.createTextVNode("call_end",-1)])]),_:1})]),_:1}),e.createVNode(D,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(z,{large:"",gray:""},{default:e.withCtx(()=>[...i[4]||(i[4]=[e.createTextVNode("volume_up",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),ut=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["send-message","retry-loading-chat-service"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>n.rule.settings?.behavior==="voice"?hr:pr);return(s,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{rule:t.rule,edges:t.edges,onSendMessage:l[0]||(l[0]=a=>r("send-message",a)),onRetryLoadingChatService:l[1]||(l[1]=a=>r("retry-loading-chat-service"))},null,40,["rule","edges"]))}}),wr=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},yo=()=>{const t="#6D3595",o=i=>{const s=i.replace("#","").trim(),l=s.length===3&&/^[0-9a-fA-F]{3}$/.test(s)?`${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:s;return l.length!==6||!/^[0-9a-fA-F]{6}$/.test(l)?null:{r:parseInt(l.slice(0,2),16),g:parseInt(l.slice(2,4),16),b:parseInt(l.slice(4,6),16)}};return{isLightHex:i=>{const s=o(i);return s?(s.r*299+s.g*587+s.b*114)/1e3>160:!1},normalizeHex:i=>{const s=o(i)??o(t);return s?wr(s):t.toLowerCase()},parseHex:o}},gr=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,xo=t=>{const{isLightHex:o,normalizeHex:n,parseHex:r}=yo(),i=(h,m)=>h==="dark"?"dark":h==="light"?"light":m?"dark":"light",s=h=>{const m=n(h),g=r(m)??{r:109,g:53,b:149},f=o(m);return{"--wu-primary":m,"--wu-primary-rgb":`${g.r} ${g.g} ${g.b}`,"--wu-primary-fg":f?"#1c1917":"#ffffff","--wu-primary-border":f?"#e5e7eb":"color-mix(in srgb, var(--wu-primary-fg) 22%, transparent)","--wu-primary-50":`color-mix(in srgb, ${m} 8%, white)`,"--wu-primary-100":`color-mix(in srgb, ${m} 22%, white)`,"--wu-primary-200":`color-mix(in srgb, ${m} 38%, white)`,"--wu-primary-300":`color-mix(in srgb, ${m} 55%, white)`,"--wu-primary-400":f?`color-mix(in srgb, ${m} 70%, black)`:`color-mix(in srgb, ${m} 78%, white)`,"--wu-primary-500":m,"--wu-primary-600":`color-mix(in srgb, ${m} 82%, black)`,"--wu-primary-700":`color-mix(in srgb, ${m} 64%, black)`,"--wu-primary-800":`color-mix(in srgb, ${m} 42%, black)`,"--wu-primary-900":`color-mix(in srgb, ${m} 22%, black)`}},l=h=>{const m=e.ref(gr()),g=e.computed(()=>i(e.toValue(h),m.value)),f=e.computed(()=>g.value==="dark"),y=e.computed(()=>f.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const v=window.matchMedia("(prefers-color-scheme: dark)");m.value=v.matches;const c=p=>{m.value=p.matches};v.addEventListener("change",c),e.onBeforeUnmount(()=>v.removeEventListener("change",c))}),{isDark:f,resolvedTheme:g,themeClass:y}},{isDark:a,themeClass:u,resolvedTheme:d}=l(()=>e.toValue(t).theme),w=e.computed(()=>({...s(e.toValue(t).primaryColor),colorScheme:d.value}));return{isDark:a,themeClass:u,resolvedTheme:d,appearanceStyle:w}},vr={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},yr={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},xr=["src"],br={key:1,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},kr=["src"],Cr=["src"],ct=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i}=pe(),s=e.computed(()=>i.value.length>0),l=e.computed(()=>n.edges??[]),a=e.computed(()=>n.rule.settings?.body);return(u,d)=>(e.openBlock(),e.createElementBlock("div",vr,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yr)),e.createVNode(M,{class:"wu-px-6 wu-w-full",col:"",center:"","gap-base":""},{default:e.withCtx(()=>[a.value?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-object-contain",src:a.value.logo,alt:""},null,8,xr)):e.createCommentVNode("",!0),a.value?.eyebrow?(e.openBlock(),e.createBlock(A,{key:1,class:"wu-text-center wu-uppercase wu-tracking-widest wu-leading-none","extra-small":"",gray:"",mono:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.eyebrow),1)]),_:1})):e.createCommentVNode("",!0),a.value?.title?(e.openBlock(),e.createBlock(A,{key:2,class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.title),1)]),_:1})):e.createCommentVNode("",!0),a.value?.subtitle?(e.openBlock(),e.createBlock(A,{key:3,class:"wu-w-64 wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),l.value.length?(e.openBlock(),e.createElementBlock("div",br,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value.slice(0,3),w=>(e.openBlock(),e.createBlock(D,{class:"hover:wu-translate-x-1 wu-max-w-[25rem]",key:w.id,outline:"",fluid:"",onClick:h=>r("edge-click",w)},e.createSlots({trailing:e.withCtx(()=>[d[0]||(d[0]=e.createTextVNode("chevron_right",-1))]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},[w.settings?.header?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"wu-w-4 wu-h-4 wu-object-contain",src:w.settings.header.logo,alt:""},null,8,kr)]),key:"0"}:void 0]),1032,["onClick"]))),128)),e.createElementVNode("div",{class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":l.value.slice(3).length>4,"wu-justify-center":l.value.slice(3).length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value.slice(3),w=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-gap-2",key:w.id},[e.createVNode(D,{outline:"",icon:"",onClick:h=>r("edge-click",w)},e.createSlots({_:2},[w.settings?.header?.logo?{name:"icon",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"wu-w-5 wu-h-5 wu-object-contain",src:w.settings.header.logo,alt:""},null,8,Cr)]),key:"0"}:void 0]),1032,["onClick"]),e.createVNode(A,{class:"wu-w-20 wu-text-center wu-leading-3 wu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},1024)]))),128))],2)])):e.createCommentVNode("",!0)]))}}),$r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAVCAYAAAAnzezqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVtSURBVHgBpVVriFVVFF6Pvc+5c+/MOM2Yo2hq41tDU1EsC50pU9NySqZUDCQiCwWZSKJQGOpHZjhpomOGNkE4pBQUgUIPGAz9Of0oGS0tCpWY0dIf93nO3q1zzzn3Xh+J1oHLPfusvb/v299ea22EO3hmz35RN2XGNyimOrZYr8g0aFZ1RH49k63VbIcogrsI4S6Wb4qhToGRmHwjk5IYypoLiu0hzjrbNn77xiW8FeHS+vdrdQOtR7ZPC8FkhbZOQIDRgIxByU/A5V/GaC2zEMQxLMatxJGL8wwU1wbvEtNk+zGTncc3p7b4+LhhS1SKPhKAdbJwlPwSjGAFFFWJPCQKCYq7sxQQczAHICQ3VkUilGxXYhCtb1Aupm9wYMm9eychwy6FfrMAOEVSARRgGy40AZiNCEMhoQj5FokruWGBKubEDgQiojW/lgTMH3qgpro21y7A7RIcwmWykm2lXcuuigICkBCsTH7NEUFkfXhU5aMxESakVUD+6PiuxcpmdxBioyz+XianZdJ98j+FA9sE/FoBEAriCBgt8o3Hcq2oIqEBSVRLRfFFoWepdWzXWGXsIUDyQJn5Z/Xgyiqb3TCiALOE/G3F5jryEJhjG9HEZ2orRNhYqPyCHCjFCMPNBGMi/Epl2bwpZZNOg7d8qOGWqVj/k9WWLpE9nshnn0ClR8uiuUR2IBLys9j6kOxifAR0kcA/KmBSntDCYB1xpldio8SdExJvkflN8p6Rbz0iplHGj4gDuRzmO3HZhL0DAH6PsXZLyrEXZEIqVihkrxL6fRppTiNU7x5M/F3nopkIKvej67v7RNSElI8LTcIsVWDPofLqFeBWhYMLyW0Yw8ZPkZs/5xrdJyY847KtId+m2cFJhGZE66Ft70hP8V1GHFRUGMaoErGlQfmIkHuUhq/JGhiAS1UJ4DNSt0ll3BccNh0IOMO6djKBeUx8/XPIwIgtucaLrTXpBiw45oi4NC2ZqRruJ7wT5OSvWJ/nogsrRLhHycttQf6RWHFaiKbAVTgvifdLOZHk3BT1SiebGJxllatHir3JwB1AM7lKq8tgC1cdyF9R5B9z0esr3H1xpVidhLqgZ9haweGcylTLZlLaqD0OQX+ygGvBy7/05P796UCAOEB7FHoHsZ6/YJNbRqS3S4LVSLJ+nvTtcd+Fb0RETzVnTuXA3cWE9yvM7/Wsv9BRNAvBP02Mm4DgiuRKL7HfJPkdlR2AZyCoin5A/ztFtMu45ljrJ52b4/JXR05t6F47fedy2fk+1k5nUtFWT9usk4epvvK/lDqdIVb2ZD13dEL5n0nh73ZJr0A0r8lxDWfG88yFNcqolAh/Oej7iJnpijQFx+kmaLpGmCkDR1xa7fxR3V/Z+EqNaN3M9553yWwVu8YU7SdLHOcCweua/F4RclJihkulCRgdmYlqn+JykzuhWO86KlsKy/Lwko+3P1spgOKX7r72g57NLZIS+kAI0kylboYaTZNCfCDIBWmtFDSeiDyub1Jxb6C4xmNxIU4gRHJmx/Wt/6a34eYH3xoHpFdLpm+SnQ2N22h4sQgYhgTXdb+wQVV8q2xg0tQ+XdT97qrbEhA/Hcs7kphxnhMHXhGQCSIg6v8QVkkwrrA7uqyKIsN2W7wJAwHS17w5zd07f7sjASUhHR1UcxIXCFg7sV0sgnTZARNdMCAiDKqKS6d8kZmNzQc799wM+7YExE9bWxu3ZKctEGvbmf1FQuaWGxdAOQHLF5EIPqN0et7DXV1//W8BlU/XUx3Dqtlbr8msF7KRlW6UckaaHLC3qvnDnT/8G85/FhA/h9s6HFKZVulya6SC5Ao30l3xdym7o5C2B5p7dgzeav0/0mtgehRo/YYAAAAASUVORK5CYII=",Br={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},_r={class:"wu-w-full wu-shrink-0 wu-border-b wu-flex wu-items-center wu-px-4 wu-justify-between wu-gap-2 wu-bg-primary wu-h-[4.4rem] wu-text-[var(--wu-primary-fg)] wu-border-[var(--wu-primary-border)]"},Sr={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},Nr=["src"],Ar={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},Tr={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},Vr={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},Pr={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},Er={class:"wu-h-7 wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-items-center wu-justify-center wu-p-2 wu-gap-1 wu-bg-white dark:wu-border-neutral-700 dark:wu-bg-neutral-800"},zr=["src"],Lr=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["retry-loading-chat-service","send-message","edge-click","submit","close","back"],setup(t,{emit:o}){const n=t,r=o,{history:i,currentRule:s,currentHeader:l,edges:a,setWorkflow:u}=pe(),{appearanceStyle:d,themeClass:w}=xo(()=>n.config.configurations.appearance);u(n.workflow),e.watch(()=>n.workflow,c=>u(c));const h=e.computed(()=>i.value.length>0),m=e.computed(()=>h.value&&s.value?.action!=="widget-identification-screen"),g=e.computed(()=>n.config.configurations.general.isClosable),f={"widget-identification-screen":tt,"widget-service-screen":ut,"widget-base-screen":ct},y=e.computed(()=>{const c=s.value?.action;return c&&c in f?f[c]:void 0}),v=e.computed(()=>n.fullscreen?"wu-w-screen wu-h-screen":"wu-w-[24.4rem] wu-h-[38rem] widget-shadow wu-rounded-2xl");return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[v.value,e.unref(w)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(d))},[e.createElementVNode("div",Br,[e.createElementVNode("div",_r,[e.createElementVNode("div",Sr,[e.unref(l)?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-9 wu-h-9 wu-object-contain wu-rounded-lg wu-shrink-0",src:e.unref(l).logo,alt:""},null,8,Nr)):e.createCommentVNode("",!0),e.createElementVNode("div",Ar,[e.unref(l)?.title?(e.openBlock(),e.createBlock(A,{key:0,class:"wu-w-full wu-truncate !wu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(l)?.subtitle?(e.openBlock(),e.createBlock(A,{key:1,class:"wu-w-full wu-truncate !wu-text-inherit wu-opacity-75","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),g.value?(e.openBlock(),e.createBlock(D,{key:0,class:"wu-shrink-0 !wu-bg-transparent hover:!wu-bg-[color-mix(in_srgb,var(--wu-primary-fg)_12%,transparent)]",onClick:p[0]||(p[0]=x=>r("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[...p[7]||(p[7]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Tr,[e.createVNode(e.Transition,{name:"page-transition",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-w-full wu-h-full wu-min-h-0",key:e.unref(s)?.id},[m.value?(e.openBlock(),e.createElementBlock("div",Vr,[e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",onClick:p[1]||(p[1]=x=>r("back"))},[e.createVNode(z,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...p[8]||(p[8]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(A,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",Pr,[y.value&&e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),{key:0,rule:e.unref(s),edges:e.unref(a),onSubmit:p[2]||(p[2]=x=>r("submit",x)),onBack:p[3]||(p[3]=x=>r("back")),onEdgeClick:p[4]||(p[4]=x=>r("edge-click",x)),onSendMessage:p[5]||(p[5]=x=>r("send-message",x)),onRetryLoadingChatService:p[6]||(p[6]=x=>r("retry-loading-chat-service"))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",Er,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref($r),alt:"Opens"},null,8,zr),e.createVNode(A,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),dt=Ee(Lr,[["__scopeId","data-v-ca8ab8b0"]]),Mr={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},Rr={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},Or=["value","type","disabled","maxlength"],Hr={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},bo=e.defineComponent({__name:"app-text-input",props:{modelValue:{default:""},type:{default:"text"},maxLength:{},disabled:{type:Boolean},loading:{type:Boolean},invalid:{type:Boolean},small:{type:Boolean},fluid:{type:Boolean},round:{type:Boolean},valid:{type:Boolean},block:{type:Boolean},maskFunction:{},passwordToggle:{type:Boolean}},emits:["update:modelValue","keyup-enter"],setup(t,{expose:o,emit:n}){const r=t,i=n,s=e.computed(()=>e.useSlots());function l(C){return!!s.value[C]}const a=e.ref(""),u=e.ref(!1),d=e.ref(!1);function w(C){if(!r.maskFunction)return C;try{const $=r.maskFunction(C);return typeof $=="string"?$:C}catch{return C}}e.watch(()=>r.modelValue,C=>{if(C==null){a.value="";return}a.value=r.maskFunction?w(C):C},{immediate:!0});function h(){return!(u.value||a.value)}const{height:m,textSize:g,width:f}=qt(r),y=e.computed(()=>r.invalid?"wu-border-red-500 focus-within:wu-border-red-500":r.valid?"wu-border-green-500 focus-within:wu-border-green-500":"wu-border-gray-200 focus-within:!wu-border-primary/40 hover:wu-border-gray-300"),v=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),c=e.computed(()=>r.small&&h()?"wu-translate-y-[7px]":r.small&&!h()?"wu-translate-y-0":h()?"wu-translate-y-[11px]":"wu-translate-y-0"),p=e.computed(()=>l("icon")||r.loading?"wu-pl-[34px]":"wu-pl-3"),x=e.computed(()=>r.block?"wu-rounded-none":r.round?"wu-rounded-full":"wu-rounded-lg"),T=e.computed(()=>r.disabled||r.loading?"wu-opacity-50 wu-pointer-events-none":"");function S(C){const k=C.target.value;a.value=r.maskFunction?w(k):k,i("update:modelValue",a.value)}return o({focus:u,content:a}),(C,$)=>(e.openBlock(),e.createBlock(M,{class:e.normalizeClass([e.unref(f)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(M,{col:"","gap-sm":""},{default:e.withCtx(()=>[l("label")?(e.openBlock(),e.createBlock(A,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"label")]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("label",{class:e.normalizeClass(["wu-relative wu-flex wu-flex-col wu-justify-center wu-items-start wu-border wu-cursor-text wu-transition-colors wu-w-full wu-bg-transparent",[x.value,T.value,e.unref(m),y.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",Mr,[e.createElementVNode("div",Rr,[!t.loading&&l("icon")?(e.openBlock(),e.createBlock(z,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(z,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(A,{class:e.normalizeClass(["wu-py-1 wu-transition",[c.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default")]),_:3},8,["class"])]),e.createElementVNode("input",{class:e.normalizeClass(["wu-absolute wu-inset-0 wu-w-full wu-h-full wu-outline-none wu-appearance-none wu-bg-transparent wu-pt-3 wu-pr-3 wu-text-gray-700 wu-font-primary wu-z-0",[e.unref(g),p.value,x.value]]),value:a.value,type:t.passwordToggle&&d.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:S,onFocus:$[0]||($[0]=k=>u.value=!0),onBlur:$[1]||($[1]=k=>u.value=!1),onKeyup:$[2]||($[2]=e.withKeys(k=>i("keyup-enter"),["enter"]))},null,42,Or),e.createElementVNode("div",Hr,[t.maxLength?(e.openBlock(),e.createBlock(A,{key:0,small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`${a.value.length} / ${t.maxLength}`),1)]),_:1})):e.createCommentVNode("",!0),t.type==="password"&&t.passwordToggle?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-bg-transparent wu-border-0 wu-p-0 wu-cursor-pointer wu-flex wu-items-center",type:"button",tabindex:"-1",onClick:$[3]||($[3]=k=>d.value=!d.value)},[e.createVNode(z,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"suffix")])],2)]),_:3}),l("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[v.value]])},[e.renderSlot(C.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Dr=()=>{const{isLightHex:t,normalizeHex:o}=yo();return{getOffset:(s,l)=>{const a=`${l.x}px`,u=`${l.y}px`;switch(s){case"bottom-left":return{bottom:u,left:a};case"top-left":return{top:u,left:a};case"top-right":return{top:u,right:a};default:return{bottom:u,right:a}}},getPosition:s=>{switch(s){case"bottom-left":return"bottom left";case"top-left":return"top left";case"top-right":return"top right";default:return"bottom right"}},getTone:s=>{const l=o(s);return{backgroundImage:"none",backgroundColor:l,color:t(l)?"#1c1917":"#ffffff"}}}},Fr=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["retry-loading-chat-service","send-message","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(n.config.configurations.general.defaultBehavior==="active"),s=e.ref(!i.value),{setWorkflow:l}=pe(),{getOffset:a,getPosition:u,getTone:d}=Dr(),{appearanceStyle:w,themeClass:h}=xo(()=>n.config.configurations.appearance),m=e.computed(()=>n.config.configurations.anchor),g=e.computed(()=>n.config.configurations.appearance),f=e.computed(()=>{if(!(i.value&&n.fullscreen))return a(m.value.position,m.value.offset)}),y=e.computed(()=>u(m.value.position)),v=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),c=e.computed(()=>({style:d(g.value.primaryColor),small:m.value.size==="small",large:m.value.size==="large",logo:m.value.logo??"",label:m.value.label??""})),p=async()=>{i.value||(s.value=!1,await e.nextTick(),i.value=!0,r("open"))},x=()=>{i.value&&(i.value=!1,r("close"))},T=()=>{s.value=!0};return l(n.workflow),e.watch(()=>n.workflow,S=>l(S)),e.watch(()=>n.config.configurations.general.defaultBehavior,S=>{S==="active"?p():x()}),(S,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(h),i.value&&t.fullscreen?"wu-inset-0":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":y.value},f.value,e.unref(w)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:T},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(dt,e.mergeProps({key:0},v.value,{onClose:x,onBack:C[0]||(C[0]=$=>r("back")),onSubmit:C[1]||(C[1]=$=>r("submit",$)),onEdgeClick:C[2]||(C[2]=$=>r("edge-click",$)),onSendMessage:C[3]||(C[3]=$=>r("send-message",$)),onRetryLoadingChatService:C[4]||(C[4]=$=>r("retry-loading-chat-service"))}),null,16)):e.createCommentVNode("",!0)]),_:1}),s.value?(e.openBlock(),e.createBlock(ot,{key:0,style:e.normalizeStyle(c.value.style),small:c.value.small,large:c.value.large,logo:c.value.logo,label:c.value.label,onClick:p},null,8,["style","small","large","logo","label"])):e.createCommentVNode("",!0)],6))}}),ko=Ee(Fr,[["__scopeId","data-v-fcbcb50d"]]),Ir="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",Mt="2026-10-13T14:00:00.000Z",Wr="69756c6a-cd47-41ef-a9c3-faa0b1aeb4a1",Be="https://i.allsvgicons.com/lucide",oe={marketplace:"https://svgl.app/library/mercado-libre.svg",support:`${Be}/headphones.svg`,chat:`${Be}/message-circle.svg`,phone:`${Be}/phone.svg`,cancel:`${Be}/x.svg`},se=t=>({logo:t,title:"Mercado Livre",subtitle:"Atendimento online"}),jr=se(oe.marketplace),qr=(t,o,n)=>({logo:n,eyebrow:"MERCADO LIVRE",title:t,subtitle:o}),Gr=[{name:"name",label:"Nome",placeholder:"Seu nome",required:!0},{name:"phone",label:"Telefone",placeholder:"Seu telefone",required:!0},{name:"email",label:"E-mail",placeholder:"Seu e-mail",required:!1}],Zr=[{name:"name",label:"Nome",placeholder:"Seu nome",required:!0},{name:"phone",label:"Telefone",placeholder:"Seu telefone",required:!0},{name:"email",label:"E-mail",placeholder:"Seu e-mail",required:!1},{name:"cpf",label:"CPF",placeholder:"000.000.000-00",required:!0}],le=t=>({id:t.id,companyId:Ir,name:t.name,action:t.action,message:null,automaticMessage:null,callOnQueue:null,uraDescription:null,interactiveMessageId:null,configId:t.configId??null,queueId:null,redirectQueue:null,redirectRuleId:null,questionnaire:null,webhook:null,isRoot:!1,redirectDefault:!1,redirectTimeout:60,delay:null,disableTyping:!1,settings:t.settings??null,archivedAt:null,autoTagEnabled:!1,autoTagIds:[],createdAt:Mt,updatedAt:Mt}),ae=(t,o)=>({id:t,nextRuleId:o}),Rt=le({id:"a1111111-1111-4111-8111-111111111105",name:"Falar com atendente",action:"widget-service-screen",settings:{header:se(oe.chat),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Ot=le({id:"a1111111-1111-4111-8111-111111111107",name:"Ligar",action:"widget-service-screen",settings:{header:se(oe.phone),behavior:"voice"}}),Ht=le({id:"a1111111-1111-4111-8111-111111111101",name:"Consultar meu plano",action:"widget-service-screen",settings:{header:se(oe.support),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),Dt=le({id:"a1111111-1111-4111-8111-111111111106",name:"Cancelar plano",action:"widget-service-screen",settings:{header:se(oe.cancel),features:{sendMessage:!0,sendAttachment:!0},behavior:"chat"}}),je=le({id:"b2222222-2222-4222-8222-222222222201",name:"Consultar meu plano",action:"widget-identification-screen",settings:{header:se(oe.support),form:{fields:[...Gr]}}}),qe=le({id:"b2222222-2222-4222-8222-222222222204",name:"Cancelar plano",action:"widget-identification-screen",settings:{header:se(oe.cancel),form:{fields:[...Zr]}}}),Qe=le({id:"d0000000-0000-4000-8000-000000000001",name:"Mercado Livre",action:"widget-base-screen",configId:"37b0b2d3-6a07-4567-a5ad-7456a820905d",settings:{header:jr,body:qr("Como podemos ajudar?","Escolha uma opção para continuar.",oe.marketplace)}}),Co={id:Wr,rules:[Rt,Ot,je,qe,Ht,Dt,Qe],edges:{[Qe.id]:[ae("aa2db433-f691-4b0e-b2f3-703eb131fcc1",Rt.id),ae("aa2db433-f691-4b0e-b2f3-703eb131fcc2",je.id),ae("aa2db433-f691-4b0e-b2f3-703eb131fcc3",qe.id),ae("aa2db433-f691-4b0e-b2f3-703eb131fcc4",Ot.id)],[je.id]:[ae("cc2db433-f691-4b0e-b2f3-703eb131fcc1",Ht.id)],[qe.id]:[ae("cc2db433-f691-4b0e-b2f3-703eb131fcc2",Dt.id)]}},Ur=Qe,Xr=t=>Co.rules.find(o=>o.id===t),Kr={configurations:{alias:"Mercado Livre",general:{defaultBehavior:"inactive",language:"pt-BR",isClosable:!0},appearance:{theme:"light",primaryColor:"#FFE600"},anchor:{label:"Fale conosco",size:"medium",logo:"https://svgl.app/library/mercado-libre.svg",position:"bottom-right",offset:{x:32,y:36}}}},Yr={install:t=>{t.use(Jn),t.component("AppIdentificationPage",tt),t.component("AppFormTextInput",Je),t.component("AppWidgetAnchor",ot),t.component("AppServicePage",ut),t.component("AppScreenPage",ct),t.component("AppWidgetView",dt),t.component("AppTextInput",bo),t.component("AppCarousel",et),t.component("AppSkeleton",lt),t.component("AppMessage",Pe),t.component("AppWidget",ko),t.component("AppButton",D),t.component("AppEmpty",at),t.component("AppGroup",M),t.component("AppIcon",z),t.component("AppText",A)}};exports.AppButton=D;exports.AppCarousel=et;exports.AppEmpty=at;exports.AppFormTextInput=Je;exports.AppGroup=M;exports.AppIcon=z;exports.AppIdentificationPage=tt;exports.AppMessage=Pe;exports.AppScreenPage=ct;exports.AppServicePage=ut;exports.AppSkeleton=lt;exports.AppText=A;exports.AppTextInput=bo;exports.AppWidget=ko;exports.AppWidgetAnchor=ot;exports.AppWidgetView=dt;exports.default=Yr;exports.demoRootRule=Ur;exports.demoWidgetConfig=Kr;exports.demoWorkflow=Co;exports.findDemoRuleById=Xr;exports.useAppWidget=pe;exports.useServiceChatBehavior=It;exports.useServicePage=Wt;exports.useServiceVoiceBehavior=Ft;
|