@opens/widget-ui 1.6.1 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");function zr(){return{maskPhone:i=>{if(!i)return"";let a=i.replace(/\D/g,"");return a.length<=4?a:(a.startsWith("0")&&!a.startsWith("0800")&&a.length>3&&(a=a.replace(/^0+/,"")),a.startsWith("0800")?a.length>11?a:a.replace(/(0800)(\d{0,3})(\d{0,4})/,(s,l,u,c)=>[l,u,c].filter(Boolean).join(" ")):a.length>11?a:a.length<=8?a.replace(/(\d{4})(\d{0,4})/,"$1-$2").replace(/-$/,""):a.length===9?a.replace(/(\d{5})(\d{0,4})/,"$1-$2"):a.length===10?a.replace(/(\d{2})(\d{0,4})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""):a.replace(/(\d{2})(\d{0,5})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""))},maskCnpj:i=>{const a=i.toUpperCase().replace(/[^0-9A-Z]/g,"");let s="";for(const l of a){if(s.length>=14)break;(s.length<12||/\d/.test(l))&&(s+=l)}return s.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 xi(){return{}}const eo=t=>t.from==="system"||t.from==="operator"||t.from==="contact"?t.from:t.provider?t.provider==="opens"?"operator":"contact":"system",to=t=>{const o=t.attachments?.data;return Array.isArray(o)?o:[]},xe=t=>to(t)[0],bi=t=>typeof t.caption=="string"?t.caption.trim():"",Vr=t=>t.messageBody?.trim()??"",_r=t=>{if(!t)return"";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?"":o.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})},ki=t=>t.type==="document"&&t.filename.toLowerCase().endsWith(".pdf"),$r=(t,o)=>{const n=o.metadata&&typeof o.metadata=="object"?o.metadata:null,r=t.selectedValue||(typeof n?.selectedValue=="string"?n.selectedValue:void 0),i=t.selectedOption||(typeof n?.selectedOption=="string"?n.selectedOption:void 0),a=t.selectedAt||(typeof n?.selectedAt=="string"?n.selectedAt:void 0);return{selectedValue:r,selectedOption:i,selectedAt:a}},bt=t=>{const o=t.messageBody;if(!o)return null;try{const n=typeof o=="string"?JSON.parse(o):o;if(!n||!Array.isArray(n.menu))return null;const{selectedValue:r,selectedOption:i,selectedAt:a}=$r(n,t),l=!!(r||i)||t.canBeInteractedWith===!1;return{description:n.description||"",selectedOption:i,selectedValue:r,selectedAt:a,menu:n.menu.map(u=>{const c=!!(r&&u.value===r||i&&u.label===i);return{...u,selected:c,disabled:l?!0:!!u.disabled}})}}catch{return null}},Or=(t,o)=>{if(!t||!o)return!1;const n=new Date(t),r=new Date(o);return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())?!1:Math.floor(n.getTime()/6e4)===Math.floor(r.getTime()/6e4)},Pr=t=>!!(t&&t.messageType==="image"&&!bi(t)),Rr=(t=[])=>{if(!t.length)return[];const o=[];let n=[];const r=()=>{if(n.length){if(n.length===1)o.push(n[0]);else{const i=n[0];o.push({id:typeof i.id=="number"?i.id:void 0,provider:i.provider,recipientId:i.recipientId,from:i.from,messageType:"_grouped_images",messageBody:"",createdAt:i.createdAt,canBeInteractedWith:!1,messages:[...n]})}n=[]}};for(const i of t){if(!Pr(i)){r(),o.push(i);continue}if(!n.length){n.push(i);continue}const a=n[n.length-1];if(a.from===i.from&&Or(a.createdAt,i.createdAt)){n.push(i);continue}r(),n.push(i)}return r(),o},Hr=t=>t?.data?.length?{data:t.data.map(o=>({...o}))}:null,Fr=t=>t?.map(o=>Do(o)),Do=t=>({...t,from:eo(t),caption:t.caption??null,attachments:Hr(t.attachments),...t.messages?{messages:Fr(t.messages)}:{}});class $e{payload;constructor(o){this.payload=Do(o)}static fromJSON(o){return new $e(o)}static toJSON(o){return Do(o.payload)}toJSON(){return $e.toJSON(this)}get from(){return eo(this.payload)}get isSystemLike(){return this.from==="system"}get attachments(){return to(this.payload)}get primaryAttachment(){return xe(this.payload)}}const Ur=["canBeInteractedWith","recipientId","chatRoomId","companyId","createdAt","provider","metadata","id"],Wr=t=>{const o={};for(const n of Ur)t[n]!==void 0&&(o[n]=t[n]);return o},Ln=(t,o="")=>typeof t=="string"?t:t==null?o:String(t);class Xo{payload={messageType:"text",messageBody:""};constructor(){}static create(){return new Xo}withRaw(o){const n=typeof o.caption=="string"||o.caption===null?o.caption:o.caption===void 0?void 0:null;return this.payload={...this.payload,...Wr(o),messageType:Ln(o.messageType,"text")||"text",messageBody:Ln(o.messageBody),...n!==void 0?{caption:n}:{}},this}withAttachments(o){return this.payload.attachments=o.length?{data:o.map(n=>({...n}))}:null,this}build(){return $e.fromJSON({...this.payload,messageType:this.payload.messageType||"text",messageBody:this.payload.messageBody??"",attachments:this.payload.attachments??null})}}const ho=e.ref([]),wo=e.ref([]),Yr=e.ref(""),Gr=e.shallowRef([]),Qr=e.shallowRef(null),Zr=e.ref(!1),Jr=e.ref(!1),qr=e.ref(!1),Kr=e.ref(!1),Xr=e.ref(!1),pt=t=>$e.fromJSON(t).toJSON();function Mi(){const t=a=>{ho.value.push(pt(a))},o=a=>{ho.value=a.map(pt)};return{unreadMessagesCount:e.computed(()=>wo.value.length),isSendingMessage:Zr,isErrorLoading:Jr,attachments:Gr,isFinished:qr,isLoading:Kr,messages:ho,isTyping:Xr,audio:Qr,text:Yr,setUnreadMessages:a=>{wo.value=a.map(pt)},addUnreadMessage:a=>{wo.value.push(pt(a))},setMessages:o,addMessage:t}}function Ci(){const t=Mi(),o=xi();return{chat:t,voice:o}}const yo=e.ref(!1),Ue=e.ref([]),vo=e.ref(void 0),fe=e.ref(void 0),xo=e.ref(void 0),Bo=e.ref(void 0),Ai=t=>!!(t?.logo?.trim()||t?.title?.trim()||t?.subtitle?.trim()),Sn=t=>{!t||!Ai(t)||(Bo.value={...t})},Le=()=>{const t=g=>{const v=new Set(Object.values(g.edges??{}).flatMap(x=>x.map(M=>M.nextRuleId)));return g.rules.find(x=>!v.has(x.id))??g.rules[0]},o=(g,v)=>{const x=new Map(g.rules.map(M=>[M.id,M]));return(g.edges[v]??[]).flatMap(M=>{const S=x.get(M.nextRuleId);return S?[S]:[]})},n=e.computed(()=>new Map((fe.value?.rules??[]).map(g=>[g.id,g]))),r=e.computed(()=>fe.value?t(fe.value):void 0),i=e.computed(()=>{const g=vo.value;return g&&n.value.get(g)||r.value}),a=e.computed(()=>!fe.value||!i.value?[]:o(fe.value,i.value.id)),s=e.computed(()=>{const g=i.value?.settings?.header;return Ai(g)?g:Bo.value}),l=e.computed(()=>xo.value?.configurations.general.language??"pt-BR"),u=Ci();return{currentRuleId:vo,currentHeader:s,currentRule:i,rootRule:r,workflow:fe,language:l,history:Ue,isOpen:yo,config:xo,edges:a,open:()=>{yo.value=!0},close:()=>{yo.value=!1},setCurrentRuleId:g=>{vo.value=g,Sn(i.value?.settings?.header)},clearHistory:()=>{Ue.value=[]},setWorkflow:g=>{fe.value?.id!==g?.id&&(Bo.value=void 0),fe.value=g,Sn(i.value?.settings?.header)},setConfig:g=>{xo.value=g},pushHistory:g=>{Ue.value.push(g)},setHistory:g=>{Ue.value=[...g]},popHistory:()=>Ue.value.pop(),...u}},ze=t=>t==="name",En=t=>!!t?.trim(),ea=t=>{const o=t.filter(r=>ze(r.name)),n=t.filter(r=>!ze(r.name));return[...o,...n]};function ta(t,o){const{maskPhone:n,maskCpf:r}=zr(),{history:i}=Le(),a=e.ref(0),s=e.ref("forward"),l=e.ref(null),u=e.computed(()=>{const N=e.toValue(t),z=N.settings?.form&&N.settings.form.fields||[];return ea(z)}),c=e.reactive(Object.fromEntries(u.value.map(N=>[N.name,""]))),p=e.computed(()=>u.value[a.value]),d=e.computed(()=>a.value>=u.value.length-1),f=e.computed(()=>i.value.length>0||a.value>0),m=e.computed(()=>s.value==="back"?"step-back":"step-forward");e.watch(a,async()=>{await e.nextTick();const N=l.value;if(!N)return;(N.querySelector(".is-active input")??N.querySelector("input"))?.focus({preventScroll:!0})});const h=e.computed(()=>u.value.every(N=>!N.required||En(c[N.name]))),w=N=>{const z=u.value[N];return z?z.required&&!En(c[z.name])?!1:N>=u.value.length-1?h.value:!0:h.value},y=e.computed(()=>w(a.value)),b=e.computed(()=>{const N=u.value.find(z=>ze(z.name));return N?c[N.name]?.trim().split(/\s+/)[0]??"":""}),g=N=>{const z=u.value[N],P=b.value,H=u.value.length?`Passo ${N+1} de ${u.value.length}`:"",F=e.toValue(t),Y=N>=u.value.length-1;if(!z)return{eyebrow:H,title:F.settings?.body?.title??F.name??"",subtitle:F.settings?.body?.subtitle??""};if(ze(z.name))return{eyebrow:H,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const U=Y?P?`Quase lá, ${P}.`:"Quase lá.":P?`Olá, ${P}.`:"Olá.",G=z.required?`Informe seu ${z.label} para continuar.`:`Gostaria de deixar seu ${z.label}?`;return{eyebrow:H,title:U,subtitle:G}},v=e.computed(()=>g(a.value)),x=N=>N==="email"?"email":N==="phone"?"tel":"text",M=N=>N==="email"?"email":N==="phone"?"call":ze(N)?"person":N==="order"?"receipt":"badge",S=N=>N.required?`${N.label} *`:N.label,D=N=>ze(N.name)?"Seu nome":N.name==="phone"?"Seu telefone":N.name==="email"?"Seu e-mail":N.name==="cpf"?"000.000.000-00":N.placeholder||N.label,I=N=>{if(N==="phone")return n;if(N==="cpf")return r},C=()=>{h.value&&o("submit",{...c})};return{stepTransition:m,currentField:p,canContinue:y,currentStep:a,isLastStep:d,stepIntro:v,fieldHost:l,showBack:f,fields:u,form:c,continueStep:()=>{if(y.value){if(d.value||u.value.length===0)return C();s.value="forward",a.value+=1}},canContinueAt:w,introFor:g,fieldLabel:S,fieldPlaceholder:D,fieldType:x,fieldMask:I,fieldIcon:M,goBack:()=>{if(a.value>0){s.value="back",a.value-=1;return}o("back")}}}function Ni(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 oa(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})),a=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:a}}const na=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:a}=oa("text",o);return(s,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(a)]])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}}),Re=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n},j=Re(na,[["__scopeId","data-v-5fc0fe9d"]]),$=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"),a=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"),s=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-lg":o.roundedTop?"wu-rounded-t-md":o.roundedBottom?"wu-rounded-b-md":""),p=e.computed(()=>o.bgPrimary?"wu-bg-primary":o.bgWhite?"wu-bg-white":""),d=e.computed(()=>o.divisor&&o.col?"wu-divide-y":o.divisor&&o.row?"wu-divide-x":""),f=e.computed(()=>[i.value,a.value,s.value,l.value,r.value,u.value,c.value,p.value,n.value,d.value]);return(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",f.value])},[e.renderSlot(m.$slots,"default")],2))}}),ia={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},ra=["value","type","placeholder","disabled","maxlength","aria-invalid"],en=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,a=e.computed(()=>e.useSlots());function s(y){return!!a.value[y]}const l=e.ref(""),u=e.ref(!1);function c(y){if(!r.maskFunction)return y;try{const b=r.maskFunction(y);return typeof b=="string"?b:y}catch{return y}}e.watch(()=>r.modelValue,y=>{if(y==null){l.value="";return}l.value=r.maskFunction?c(y):y},{immediate:!0});const{width:p}=Ni(r),d=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"),m=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),h=e.computed(()=>r.disabled?"wu-opacity-50 wu-pointer-events-none":"");function w(y){const g=y.target.value;l.value=r.maskFunction?c(g):g,i("update:modelValue",l.value)}return o({focus:u,content:l}),(y,b)=>(e.openBlock(),e.createBlock($,{class:e.normalizeClass([e.unref(p),h.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",ia,[s("default")?(e.openBlock(),e.createBlock(j,{key:0,small:"",gray:"",class:e.normalizeClass([d.value])},{default:e.withCtx(()=>[e.renderSlot(y.$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:w,onFocus:b[0]||(b[0]=g=>u.value=!0),onBlur:b[1]||(b[1]=g=>u.value=!1),onKeyup:b[2]||(b[2]=e.withKeys(g=>i("keyup-enter"),["enter"]))},null,42,ra)]),s("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[m.value]])},[e.renderSlot(y.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function aa(t){const o=e.computed(()=>t.fit?"wu-h-auto wu-min-h-0":t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.fit?"wu-px-3 wu-py-2":t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),i=e.computed(()=>t.fluid?"!wu-w-full":t.fit?"wu-w-fit wu-max-w-full":"wu-w-fit");return{height:o,textSize:n,padding:r,width:i}}const E=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":"wu-material-icons");return(a,s)=>(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(a.$slots,"default")],2))}}),sa=["disabled"],la={class:"wu-flex wu-items-center wu-justify-center wu-gap-2"},R=e.defineComponent({__name:"app-button",props:{small:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,fit: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(h){return!!n.value[h]}const{height:i,textSize:a,padding:s,width:l}=aa(o),u=e.computed(()=>o.soft?"wu-bg-[var(--wu-action-50)] !wu-text-[var(--wu-action)]":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-[var(--wu-action)] !wu-text-[var(--wu-action-fg)]"),c=e.computed(()=>o.block?"wu-rounded-none":o.round?"wu-rounded-full":"wu-rounded-lg"),p=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":s.value),d=e.computed(()=>o.icon?"wu-justify-center":o.fit?"wu-justify-start wu-text-left":"wu-justify-between"),f=e.computed(()=>o.fit?"wu-leading-snug [overflow-wrap:anywhere]":""),m=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(h,w)=>(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(a),u.value,c.value,e.unref(l),e.unref(i),m.value,p.value,d.value,f.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:w[0]||(w[0]=y=>h.$emit("click",y))},[e.createElementVNode("div",la,[t.loading?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...w[1]||(w[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):r("icon")?(e.openBlock(),e.createBlock(E,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&r("default")?(e.openBlock(),e.createBlock(j,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&r("trailing")?(e.openBlock(),e.createBlock(E,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,sa))}}),ua=["aria-hidden"],ca=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,a=e.useSlots(),s=e.ref(null),l=e.ref(null),u=e.ref(0),c=e.ref(0),p=e.ref(!1);let d=null;const f=e.computed(()=>Math.max(r.modelValue,0)),m=()=>(a.default?.()??[]).flatMap(I=>I.type===e.Comment||I.type===e.Text?[]:I.type===e.Fragment?(I.children??[]).filter(C=>!!C&&typeof C=="object"&&C.type!==e.Comment&&C.type!==e.Text):[I]),h=I=>{const C=Math.abs(I-f.value);return C===0?"is-active":C===1?"is-adjacent":"is-far"},w=I=>{const C=l.value?.childElementCount||m().length,L=Math.min(Math.max(I,0),Math.max(C-1,0));L!==r.modelValue&&i("update:modelValue",L)},y=()=>{const I=s.value;I&&(I.scrollLeft&&(I.scrollLeft=0),I.scrollTop&&(I.scrollTop=0))},b=(I,C)=>{const L=getComputedStyle(I)[C].trim(),B=parseFloat(L);if(!Number.isFinite(B)||B<=0)return 0;if(L.endsWith("%")){const N=C==="scrollPaddingTop"?I.clientHeight:I.clientWidth;return B/100*N}return B},g=()=>{const I=s.value,C=l.value;if(!I||!C)return;y();const L=[...C.children],B=parseFloat(getComputedStyle(C).gap)||0,N=r.vertical?"scrollPaddingTop":"scrollPaddingLeft",z=b(I,N),P=U=>r.vertical?U.offsetHeight:U.offsetWidth,H=L[f.value]?P(L[f.value]):0,F=r.vertical&&r.fill?Math.max((I.clientHeight-H)/2,0):z,Y=L.slice(0,f.value).reduce((U,G)=>U+P(G)+B,0);u.value=F-Y,c.value=r.vertical&&!r.fill?H+z*2:0,p.value=!0},v=()=>{d?.disconnect();const I=s.value,C=l.value;if(!(!I||!C)&&(g(),!(typeof ResizeObserver>"u"))){if(d=new ResizeObserver(g),d.observe(I),r.vertical)for(const L of C.children)d.observe(L);I.removeEventListener("scroll",y),I.addEventListener("scroll",y,{passive:!0})}},x=e.computed(()=>[r.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":p.value,"wu-carousel--fill":r.fill}]),M=e.computed(()=>r.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),S=e.computed(()=>{if(!(!r.vertical||r.fill||!c.value))return{height:`${c.value}px`}}),D=e.computed(()=>{const I=`${u.value}px`;return{transform:r.vertical?`translate3d(0, ${I}, 0)`:`translate3d(${I}, 0, 0)`}});return e.watch(()=>[r.vertical,r.fill,r.modelValue],async()=>{await e.nextTick(),v()}),e.onMounted(async()=>{await e.nextTick(),v()}),e.onBeforeUnmount(()=>{d?.disconnect(),s.value?.removeEventListener("scroll",y)}),o({next:()=>w(f.value+1),prev:()=>w(f.value-1),goTo:w}),(I,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",x.value]),ref_key:"rootRef",ref:s,"data-testid":"app-carousel",style:e.normalizeStyle(S.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",M.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(),(L,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",h(B)]),key:L.key??B,"aria-hidden":B!==f.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L)))],10,ua))),128))],6)],6))}}),oo=Re(ca,[["__scopeId","data-v-96f06600"]]),da={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},pa={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},ma={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},ga={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},fa={class:"wu-flex wu-items-center wu-gap-1.5"},tn=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,r=o,{currentStep:i,fieldHost:a,showBack:s,fields:l,form:u,continueStep:c,canContinueAt:p,introFor:d,fieldPlaceholder:f,fieldType:m,fieldMask:h,goBack:w}=ta(()=>n.rule,r);return(y,b)=>(e.openBlock(),e.createElementBlock("div",da,[e.createElementVNode("div",pa,[e.createElementVNode("div",ma,[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(s)}]),onClick:b[0]||(b[0]=(...g)=>e.unref(w)&&e.unref(w)(...g))},[e.createVNode(E,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...b[2]||(b[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(j,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...b[3]||(b[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",ga,[e.createElementVNode("div",fa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(g,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",v<=e.unref(i)?"wu-bg-gray-900 dark:wu-bg-white":"wu-bg-gray-200 dark:wu-bg-neutral-600"]),key:v},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:a},[e.createVNode(oo,{class:"wu-w-full wu-h-full",modelValue:e.unref(i),"onUpdate:modelValue":b[1]||(b[1]=g=>e.isRef(i)?i.value=g:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(g,v)=>(e.openBlock(),e.createBlock($,{class:"wu-w-full wu-gap-8",key:g.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(d)(v).title?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(v).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(d)(v).subtitle?(e.openBlock(),e.createBlock(j,{key:1,class:"wu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(v).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(j,{class:"wu-opacity-50 wu-absolute -wu-top-2 wu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v+1),1)]),_:2},1024)]),_:2},1024),e.createVNode($,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(en,{modelValue:e.unref(u)[g.name],"onUpdate:modelValue":x=>e.unref(u)[g.name]=x,"mask-function":e.unref(h)(g.name),placeholder:e.unref(f)(g),type:e.unref(m)(g.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(R,{fluid:"",disabled:!e.unref(p)(v),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...b[4]||(b[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),ha=["disabled"],wa=["src"],on=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-primary !wu-text-[var(--wu-primary-fg)]"),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"),a=e.computed(()=>o.small?"wu-w-6 wu-h-6":o.large?"wu-w-8 wu-h-8":"wu-w-7 wu-h-7"),s=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,s.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(E,{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",a.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,wa)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(j,{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,ha))}}),ya="widgets",va={"widget-identification-screen":"assignment","widget-base-screen":"desktop_windows","widget-article-screen":"description","widget-service-screen":"chat"},Dn={chat:"chat",voice:"phone_in_talk"},xa=t=>{if(t.action==="widget-service-screen"){const o=t.settings?.behavior;if(o&&o in Dn)return Dn[o]}return va[t.action]??ya},ba={key:0,class:"wu-flex wu-flex-col wu-items-center wu-gap-2","data-testid":"app-edge"},ka=["src"],Ma={key:1,class:"wu-w-full wu-max-w-[25rem]","data-testid":"app-edge"},Ca=["src"],Bn="!wu-text-[var(--wu-action-ink)]",Oe=e.defineComponent({__name:"app-edge",props:{edge:{},icon:{type:Boolean}},emits:["click"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>n.edge.settings?.header?.logo),a=e.computed(()=>xa(n.edge));return(s,l)=>t.icon?(e.openBlock(),e.createElementBlock("div",ba,[e.createVNode(R,{outline:"",icon:"",onClick:l[0]||(l[0]=u=>r("click",t.edge))},{icon:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-5 wu-h-5 wu-object-contain",src:i.value,alt:""},null,8,ka)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(Bn)},e.toDisplayString(a.value),1))]),_:1}),e.createVNode(j,{class:"wu-w-20 wu-text-center wu-leading-3 wu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.edge.name),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",Ma,[e.createVNode(R,{class:"hover:wu-translate-x-1",outline:"",fluid:"",onClick:l[1]||(l[1]=u=>r("click",t.edge))},{icon:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-4 wu-h-4 wu-object-contain",src:i.value,alt:""},null,8,Ca)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(Bn)},e.toDisplayString(a.value),1))]),trailing:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.edge.name),1)]),_:1})]))}}),Aa={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},Na={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},Ta=["innerHTML"],Ia={key:2,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},La=e.defineComponent({__name:"app-article-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i,language:a}=Le(),s=e.computed(()=>i.value.length>0),l=e.computed(()=>n.edges??[]),u=e.computed(()=>l.value.slice(0,3)),c=e.computed(()=>l.value.slice(3)),p=e.computed(()=>n.rule.settings?.body),d=m=>{if(!m)return"";const h=a.value;return m[h]??m["pt-BR"]??Object.values(m).find(Boolean)??""},f=e.computed(()=>d(p.value?.content));return(m,h)=>(e.openBlock(),e.createElementBlock("div",Aa,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Na)),f.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"wu-px-6 wu-w-full wu-article-content wu-font-primary wu-text-neutral wu-overflow-x-auto dark:wu-text-neutral-200","data-testid":"app-article-content",innerHTML:f.value},null,8,Ta)):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",Ia,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,w=>(e.openBlock(),e.createBlock(Oe,{key:w.id,edge:w,onClick:h[0]||(h[0]=y=>r("edge-click",y))},null,8,["edge"]))),128)),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":c.value.length>4,"wu-justify-center":c.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,w=>(e.openBlock(),e.createBlock(Oe,{key:w.id,edge:w,icon:"",onClick:h[1]||(h[1]=y=>r("edge-click",y))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h[2]||(h[2]=e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},null,-1))]))}}),nn=Re(La,[["__scopeId","data-v-54b98051"]]),Sa=120,Ea=()=>typeof MediaRecorder>"u"?"audio/webm":MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"audio/webm",Da=t=>t.includes("mp4")?"m4a":"webm",jn=t=>t.toString().padStart(2,"0");function Ba(){const t=e.ref(!1),o=e.ref(0),n=e.ref(null);let r=null,i=null,a=[],s=null,l="audio/webm",u=!1,c=null;const p=e.computed(()=>{const g=Math.floor(o.value/60),v=o.value%60;return`${jn(g)}:${jn(v)}`}),d=()=>{s&&(clearInterval(s),s=null)},f=()=>{i?.getTracks().forEach(g=>g.stop()),i=null},m=()=>{d(),f(),r=null,a=[],o.value=0,t.value=!1},h=()=>{if(!a.length)return null;const g=l.split(";")[0]||"audio/webm",v=new Blob(a,{type:g});return new File([v],`recording.${Da(g)}`,{type:g})},w=async()=>{if(n.value=null,typeof navigator>"u"||!navigator.mediaDevices?.getUserMedia)return n.value="Gravação de áudio não é suportada neste navegador",!1;try{return i=await navigator.mediaDevices.getUserMedia({audio:!0}),l=Ea(),a=[],r=new MediaRecorder(i,{mimeType:l}),r.ondataavailable=g=>{g.data.size>0&&a.push(g.data)},r.onstop=()=>{const g=u?null:h(),v=c;c=null,u=!1,m(),v?.(g)},r.start(),t.value=!0,o.value=0,s=setInterval(()=>{o.value+=1,o.value>=Sa&&y()},1e3),!0}catch{return m(),n.value="Não foi possível acessar o microfone",!1}},y=()=>!r||r.state==="inactive"?(m(),Promise.resolve(null)):(d(),t.value=!1,new Promise(g=>{c=g,r?.stop(),f()})),b=async()=>{u=!0,a=[],await y()};return e.onUnmounted(()=>{b()}),{formattedDuration:p,durationSeconds:o,isRecording:t,error:n,cancel:b,start:w,stop:y}}const ja=["src","alt"],za=["src"],Va=["src"],_a=["title"],no=e.defineComponent({__name:"app-media-preview",props:{open:{type:Boolean},items:{},index:{}},emits:["close","update:index"],setup(t,{emit:o}){const n=t,r=o,i=e.computed({get:()=>n.index??0,set:f=>r("update:index",f)}),a=e.computed(()=>i.value>0),s=e.computed(()=>i.value<n.items.length-1),l=e.computed(()=>n.items.length>1),u=()=>r("close"),c=()=>{a.value&&(i.value-=1)},p=()=>{s.value&&(i.value+=1)},d=f=>{n.open&&(f.key==="Escape"&&u(),f.key==="ArrowLeft"&&c(),f.key==="ArrowRight"&&p())};return e.watch(()=>n.open,f=>{f?window.addEventListener("keydown",d):window.removeEventListener("keydown",d)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",d)}),(f,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.open&&t.items.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"wu-fixed wu-inset-0 wu-flex wu-items-center wu-justify-center wu-overflow-hidden wu-bg-black wu-bg-opacity-90 wu-z-[100000]","data-testid":"app-media-preview",onClick:u},[e.createElementVNode("button",{class:"wu-absolute wu-top-4 wu-right-4 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-close",onClick:e.withModifiers(u,["stop"])},[e.createVNode(E,{light:""},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode("close",-1)])]),_:1})]),l.value&&a.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"wu-absolute wu-left-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-prev",onClick:e.withModifiers(c,["stop"])},[e.createVNode(E,{light:""},{default:e.withCtx(()=>[...m[3]||(m[3]=[e.createTextVNode("chevron_left",-1)])]),_:1})])):e.createCommentVNode("",!0),l.value&&s.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-absolute wu-right-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-next",onClick:e.withModifiers(p,["stop"])},[e.createVNode(E,{light:""},{default:e.withCtx(()=>[...m[4]||(m[4]=[e.createTextVNode("chevron_right",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",onClick:m[1]||(m[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(oo,{class:"wu-w-full",modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=h=>i.value=h)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-3",key:`${h.src}-${w}`},[h.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:h.src,alt:h.filename||"Imagem"},null,8,ja)):h.type==="video"?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:h.src,controls:""},null,8,za)):h.type==="pdf"?(e.openBlock(),e.createElementBlock("iframe",{key:2,class:"wu-bg-white wu-rounded wu-w-full wu-h-[85vh]",src:h.src,frameborder:"0"},null,8,Va)):e.createCommentVNode("",!0),h.filename?(e.openBlock(),e.createElementBlock("p",{key:3,class:"wu-text-white wu-text-xs wu-opacity-75 wu-truncate wu-max-w-full",title:h.filename},e.toDisplayString(h.filename),9,_a)):e.createCommentVNode("",!0)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0)]))}}),$a=["onClick"],Oa=["src","alt"],Pa={key:1,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},Ra={key:2,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},Ha={class:"wu-text-white wu-text-lg wu-font-semibold"},Fa=e.defineComponent({__name:"app-message-grouped-images",props:{message:{}},setup(t){const o=t,n=e.computed(()=>o.message.messages||[]),r=e.computed(()=>n.value.slice(0,4)),i=e.computed(()=>Math.max(0,n.value.length-4)),a=p=>xe(p)?.link||"",s=e.ref(!1),l=e.ref(0),u=e.computed(()=>{const p=[];for(const d of n.value){const f=xe(d);f?.link&&p.push({src:f.link,type:"image",filename:f.filename})}return p}),c=p=>{u.value.length&&(l.value=Math.min(p,u.value.length-1),s.value=!0)};return(p,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden wu-min-w-[12rem]",r.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"]),"data-testid":"app-message-grouped-images"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:f.id??m,onClick:h=>c(m)},[a(f)?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:a(f),alt:e.unref(xe)(f)?.filename||"Imagem"},null,8,Oa)):(e.openBlock(),e.createElementBlock("div",Pa,[e.createVNode(E,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("image",-1)])]),_:1})])),m===r.value.length-1&&i.value>0?(e.openBlock(),e.createElementBlock("div",Ra,[e.createElementVNode("span",Ha,e.toDisplayString(`+${i.value}`),1)])):e.createCommentVNode("",!0)],8,$a))),128)),e.createVNode(no,{open:s.value,items:u.value,index:l.value,onClose:d[0]||(d[0]=f=>s.value=!1),"onUpdate:index":d[1]||(d[1]=f=>l.value=f)},null,8,["open","items","index"])],2))}}),Ua=["disabled"],ut=e.defineComponent({__name:"app-audio-player",props:{src:{},file:{}},setup(t){const o=t,n=e.ref(null),r=e.ref(!1),i=e.ref(0),a=e.ref(0),s=e.ref(1),l=e.ref(null),u=C=>Math.floor(C).toString().padStart(2,"0"),c=C=>{if(!Number.isFinite(C)||C<0)return"00:00";const L=Math.floor(C/60),B=Math.floor(C%60);return`${u(L)}:${u(B)}`},p=e.computed(()=>!a.value||!Number.isFinite(a.value)?0:Math.min(100,i.value/a.value*100)),d=e.computed(()=>Number.isFinite(a.value)&&a.value>0),f=e.computed(()=>`${c(i.value)} / ${c(a.value)}`),m=()=>{l.value&&(URL.revokeObjectURL(l.value),l.value=null)},h=()=>{if(m(),o.src)return o.src;if(o.file)return l.value=URL.createObjectURL(e.toRaw(o.file)),l.value},w=()=>{a.value=n.value?.duration||0},y=()=>{i.value=n.value?.currentTime||0},b=()=>{r.value=!1,i.value=0,n.value&&(n.value.currentTime=0)},g=()=>{n.value&&(n.value.pause(),n.value.removeEventListener("loadedmetadata",w),n.value.removeEventListener("timeupdate",y),n.value.removeEventListener("ended",b),n.value=null,r.value=!1,i.value=0,a.value=0)},v=()=>{g();const C=h();if(!C)return;const L=new Audio(C);L.addEventListener("loadedmetadata",w),L.addEventListener("timeupdate",y),L.addEventListener("ended",b),L.playbackRate=s.value,n.value=L},x=async()=>{!n.value||!d.value||(await n.value.play(),r.value=!0)},M=()=>{n.value&&(n.value.pause(),r.value=!1)},S=()=>{r.value?M():x()},D=C=>{if(!n.value||!d.value)return;const B=C.currentTarget.getBoundingClientRect(),N=Math.min(1,Math.max(0,(C.clientX-B.left)/B.width));n.value.currentTime=N*a.value,i.value=n.value.currentTime},I=()=>{s.value=Math.max(1,(s.value+.5)%2.5),n.value&&(n.value.playbackRate=s.value)};return e.watch(()=>[o.src,o.file],()=>v(),{immediate:!0}),e.onBeforeUnmount(()=>{g(),m()}),(C,L)=>(e.openBlock(),e.createBlock($,{class:"wu-w-full wu-min-w-0 wu-items-center","data-testid":"app-audio-player","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"app-audio-player-toggle",onClick:S,disabled:!d.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value?"pause":"play_arrow"),1)]),_:1})]),_:1},8,["disabled"]),e.createVNode($,{class:"wu-flex-1 wu-min-w-0",col:"","gap-xs":""},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"wu-relative wu-w-full wu-rounded-full wu-cursor-pointer wu-h-1.5 wu-bg-gray-400 dark:wu-bg-neutral-500 disabled:wu-cursor-default",type:"button","data-testid":"app-audio-player-seek",disabled:!d.value,onClick:D},[e.createElementVNode("div",{class:"wu-absolute wu-left-0 wu-top-0 wu-bottom-0 wu-rounded-full wu-bg-primary wu-transition-all",style:e.normalizeStyle({width:`${p.value}%`})},null,4),e.createElementVNode("div",{class:"wu-absolute wu-w-2 wu-h-2 wu-rounded-full wu-bg-primary wu-shrink-0 wu-transition-all -wu-translate-x-1/2 -wu-translate-y-1/2 wu-top-1/2",style:e.normalizeStyle({left:`${p.value}%`})},null,4)],8,Ua),e.createVNode(j,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})]),_:1}),e.createVNode(R,{"data-testid":"app-audio-player-speed",onClick:I,disabled:!d.value,ghost:"",small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value)+"x",1)]),_:1},8,["disabled"])]),_:1}))}}),Wa={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-attachments"},Ya=["innerHTML"],Ga=["onClick"],Qa=["src","alt"],Za=["src"],Ja={key:2,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},qa={key:3,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},Ka={class:"wu-text-white wu-text-lg wu-font-semibold"},Xa={key:0,class:"wu-flex-1 wu-min-w-0"},es=e.defineComponent({__name:"app-message-attachments",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>to(n.message)),a=e.computed(()=>i.value.filter(v=>v.type==="image"||v.type==="video")),s=e.computed(()=>i.value.filter(v=>v.type!=="image"&&v.type!=="video")),l=e.computed(()=>a.value.slice(0,4)),u=e.computed(()=>Math.max(0,a.value.length-4)),c=e.computed(()=>Vr(n.message)),p=e.computed(()=>bi(n.message)),d=e.computed(()=>!!(l.value.length||s.value.length)),f=e.ref(!1),m=e.ref(0),h=e.ref([]),w=v=>{h.value=a.value.filter(x=>x.link).map(x=>({src:x.link,type:x.type==="video"?"video":"image",filename:x.filename})),h.value.length&&(m.value=Math.min(v,h.value.length-1),f.value=!0)},y=v=>{v.link&&(h.value=[{src:v.link,type:"pdf",filename:v.filename}],m.value=0,f.value=!0)},b=()=>{f.value=!1,h.value=[]},g=v=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:v})};return(v,x)=>(e.openBlock(),e.createElementBlock("div",Wa,[c.value?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-whitespace-pre-wrap","data-testid":"app-message-attachments-body",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:c.value},null,8,Ya)]),_:1})):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden",l.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(M,S)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:M.id,onClick:D=>w(S)},[M.type==="image"&&M.link?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:M.link,alt:M.filename},null,8,Qa)):M.type==="video"&&M.link?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-w-full wu-h-full wu-object-cover",src:M.link,preload:"metadata"},null,8,Za)):(e.openBlock(),e.createElementBlock("div",Ja,[e.createVNode(E,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.type==="video"?"videocam":"image"),1)]),_:2},1024)])),S===l.value.length-1&&u.value>0?(e.openBlock(),e.createElementBlock("div",qa,[e.createElementVNode("span",Ka,e.toDisplayString(`+${u.value}`),1)])):e.createCommentVNode("",!0),e.createVNode(R,{class:"wu-absolute wu-bottom-1 wu-right-1 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(D=>g(M),["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(E,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...x[1]||(x[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])],8,Ga))),128))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,M=>(e.openBlock(),e.createBlock($,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800",key:M.id,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(E,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.type==="audio"?"mic":"file_present"),1)]),_:2},1024)]),_:2},1024),M.type==="audio"&&M.link?(e.openBlock(),e.createElementBlock("div",Xa,[e.createVNode(ut,{src:M.link},null,8,["src"])])):(e.openBlock(),e.createBlock(j,{key:1,class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",title:M.filename,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.filename),1)]),_:2},1032,["title"])),e.unref(ki)(M)?(e.openBlock(),e.createBlock(R,{key:2,onClick:S=>y(M),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...x[2]||(x[2]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(R,{onClick:S=>g(M),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...x[3]||(x[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024))),128)),p.value&&d.value?(e.openBlock(),e.createBlock(j,{key:2,class:"wu-whitespace-pre-wrap","data-testid":"app-message-attachments-caption",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(no,{open:f.value,items:h.value,index:m.value,onClose:b,"onUpdate:index":x[0]||(x[0]=M=>m.value=M)},null,8,["open","items","index"])]))}}),ts={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary"},os=["disabled","onClick"],ns=e.defineComponent({__name:"app-message-interactive",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(bt(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{i.value=bt(n.message)});const a=e.computed(()=>!!(n.message.canBeInteractedWith&&i.value)),s=l=>{a.value&&(l.disabled||l.selected||(r("chat-service-message-action",{action:"select-option",message:n.message,option:l}),i.value&&(i.value={...i.value,selectedOption:l.label,selectedValue:l.value,selectedAt:new Date().toISOString(),menu:i.value.menu.map(u=>({...u,selected:u.value===l.value,disabled:!0}))})))};return(l,u)=>i.value?(e.openBlock(),e.createBlock($,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-interactive"},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[e.createVNode(j,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.description),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.menu,(c,p)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${c.value}-${p}`,type:"button",disabled:!a.value||c.disabled,onClick:d=>s(c)},[e.createVNode($,{class:"wu-items-start wu-flex-1 wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(j,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1024),c.description?(e.openBlock(),e.createBlock(j,{key:0,"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.description),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(E,{class:e.normalizeClass(c.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,os))),128))]),_:1})):e.createCommentVNode("",!0)}}),is={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[14rem]","data-testid":"app-message-document"},rs=e.defineComponent({__name:"app-message-document",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>xe(n.message)),a=e.computed(()=>i.value?.filename||n.message.messageBody||"Documento"),s=e.computed(()=>!!(i.value?.link&&ki(i.value))),l=e.ref(!1),u=e.computed(()=>!s.value||!i.value?.link?[]:[{src:i.value.link,type:"pdf",filename:i.value.filename}]),c=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(p,d)=>(e.openBlock(),e.createElementBlock("div",is,[e.createVNode($,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(E,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(j,{class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",title:a.value,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1},8,["title"]),s.value?(e.openBlock(),e.createBlock(R,{key:0,onClick:d[0]||(d[0]=f=>l.value=!0),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(R,{onClick:c,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}),t.message.caption?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-whitespace-pre-wrap",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(no,{open:l.value,items:u.value,index:0,onClose:d[1]||(d[1]=f=>l.value=!1)},null,8,["open","items"])]))}}),as={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary"},ss=["disabled","onClick"],ls=e.defineComponent({__name:"app-message-survey",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(bt(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{i.value=bt(n.message)});const a=e.computed(()=>!!(n.message.canBeInteractedWith&&i.value)),s=e.computed(()=>!!i.value?.menu.some(u=>u.selected)),l=u=>{a.value&&(u.disabled||u.selected||(r("chat-service-message-action",{action:"select-survey",message:n.message,option:u}),i.value&&(i.value={...i.value,menu:i.value.menu.map(c=>({...c,selected:c.value===u.value,disabled:!0}))})))};return(u,c)=>i.value?(e.openBlock(),e.createBlock($,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-survey"},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(j,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.description),1)]),_:1})]),a.value&&!s.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value.menu,(p,d)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${p.value}-${d}`,type:"button",disabled:p.disabled,onClick:f=>l(p)},[e.createVNode(j,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.label),1)]),_:2},1024),e.createVNode(E,{class:e.normalizeClass(p.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,ss))),128)):(e.openBlock(),e.createBlock($,{key:1,class:"wu-items-center wu-justify-center wu-px-3 wu-py-3 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(j,{small:"",gray:""},{default:e.withCtx(()=>[...c[0]||(c[0]=[e.createTextVNode("Pesquisa de satisfação já respondida",-1)])]),_:1}),e.createVNode(E,{class:"wu-text-green-500"},{default:e.withCtx(()=>[...c[1]||(c[1]=[e.createTextVNode("check_circle",-1)])]),_:1})]),_:1}))]),_:1})):e.createCommentVNode("",!0)}}),jo=e.defineComponent({__name:"app-message-audio",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>xe(n.message)),a=e.computed(()=>i.value?.link||""),s=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(l,u)=>(e.openBlock(),e.createBlock($,{class:"wu-items-center wu-min-w-[14rem]","gap-sm":"","data-testid":"app-message-audio"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createBlock(ut,{key:0,class:"wu-flex-1",src:a.value},null,8,["src"])):(e.openBlock(),e.createBlock($,{key:1,class:"wu-items-center wu-justify-center wu-h-10 wu-flex-1 wu-rounded wu-bg-gray-100 dark:wu-bg-neutral-800"},{default:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1})),e.createVNode(R,{onClick:s,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}))}}),us={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[10rem]","data-testid":"app-message-image"},cs={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-gray-100 dark:wu-bg-neutral-800"},ds=["src","alt"],ps={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},ms=e.defineComponent({__name:"app-message-image",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>xe(n.message)),a=e.computed(()=>i.value?.link||""),s=e.ref(!1),l=e.computed(()=>a.value?[{src:a.value,type:"image",filename:i.value?.filename}]:[]),u=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(c,p)=>(e.openBlock(),e.createElementBlock("div",us,[e.createElementVNode("div",cs,[a.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-max-h-64 wu-object-cover wu-cursor-pointer",src:a.value,alt:i.value?.filename||t.message.caption||"Imagem",onClick:p[0]||(p[0]=d=>s.value=!0)},null,8,ds)):(e.openBlock(),e.createElementBlock("div",ps,[e.createVNode(E,{gray:"",large:""},{default:e.withCtx(()=>[...p[2]||(p[2]=[e.createTextVNode("image",-1)])]),_:1})])),e.createVNode(R,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(u,["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(E,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...p[3]||(p[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(j,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(no,{open:s.value,items:l.value,index:0,onClose:p[1]||(p[1]=d=>s.value=!1)},null,8,["open","items"])]))}}),gs={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-video"},fs={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-black"},hs=["src"],ws={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},ys=e.defineComponent({__name:"app-message-video",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>xe(n.message)),a=e.computed(()=>i.value?.link||""),s=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(l,u)=>(e.openBlock(),e.createElementBlock("div",gs,[e.createElementVNode("div",fs,[a.value?(e.openBlock(),e.createElementBlock("video",{key:0,class:"wu-w-full wu-max-h-64",src:a.value,controls:"",preload:"metadata"},null,8,hs)):(e.openBlock(),e.createElementBlock("div",ws,[e.createVNode(E,{gray:"",large:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("videocam",-1)])]),_:1})])),e.createVNode(R,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:s,ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(E,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(j,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0)]))}}),vs=["href"],xs=["src","alt"],bs={class:"wu-flex wu-min-w-0 wu-flex-1 wu-flex-col wu-items-start wu-overflow-hidden wu-pr-4 wu-gap-0.5"},ks={class:"wu-truncate"},Ms=e.defineComponent({__name:"app-message-link-preview",props:{preview:{}},setup(t){const o=t,n=e.ref(!1),r=e.computed(()=>o.preview.url||"#"),i=e.computed(()=>o.preview.images?.[0]||o.preview.favicons?.[0]||""),a=e.computed(()=>!n.value&&!!o.preview.title);return(s,l)=>a.value?(e.openBlock(),e.createElementBlock("a",{key:0,class:"wu-relative wu-flex wu-items-center wu-gap-2 wu-rounded-lg wu-border wu-border-gray-200 wu-bg-white wu-p-2 wu-no-underline dark:wu-border-neutral-700 dark:wu-bg-neutral-800","data-testid":"app-message-link-preview",href:r.value,target:"_blank",rel:"noopener noreferrer"},[e.createElementVNode("button",{class:"wu-absolute wu-right-1 wu-top-1 wu-border-0 wu-bg-transparent wu-p-0 wu-cursor-pointer",type:"button","aria-label":"Fechar preview",onClick:l[0]||(l[0]=e.withModifiers(u=>n.value=!0,["prevent"]))},[e.createVNode(E,{gray:"",small:""},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode("close",-1)])]),_:1})]),i.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-h-12 wu-w-12 wu-shrink-0 wu-rounded wu-object-cover",src:i.value,alt:t.preview.title||"Link preview"},null,8,xs)):e.createCommentVNode("",!0),e.createElementVNode("div",bs,[e.createVNode(j,{class:"wu-line-clamp-1 wu-leading-3",semibold:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.preview.title),1)]),_:1}),t.preview.description?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-line-clamp-2 wu-leading-3",gray:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.preview.description),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(j,{class:"wu-flex wu-max-w-full wu-items-center wu-gap-1 wu-truncate",gray:"","extra-small":""},{default:e.withCtx(()=>[e.createVNode(E,{gray:"",small:""},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("link",-1)])]),_:1}),e.createElementVNode("span",ks,e.toDisplayString(t.preview.url),1)]),_:1})])],8,vs)):e.createCommentVNode("",!0)}}),Cs="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos6kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12b0cam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",As="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",zo="numeric",Vo="ascii",_o="alpha",Ye="asciinumeric",We="alphanumeric",$o="domain",Ti="emoji",Ns="scheme",Ts="slashscheme",bo="whitespace";function Is(t,o){return t in o||(o[t]=[]),o[t]}function Te(t,o,n){o[zo]&&(o[Ye]=!0,o[We]=!0),o[Vo]&&(o[Ye]=!0,o[_o]=!0),o[Ye]&&(o[We]=!0),o[_o]&&(o[We]=!0),o[We]&&(o[$o]=!0),o[Ti]&&(o[$o]=!0);for(const r in o){const i=Is(r,n);i.indexOf(t)<0&&i.push(t)}}function Ls(t,o){const n={};for(const r in o)o[r].indexOf(t)>=0&&(n[r]=!0);return n}function q(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}q.groups={};q.prototype={accepts(){return!!this.t},go(t){const o=this,n=o.j[t];if(n)return n;for(let r=0;r<o.jr.length;r++){const i=o.jr[r][0],a=o.jr[r][1];if(a&&i.test(t))return a}return o.jd},has(t,o=!1){return o?t in this.j:!!this.go(t)},ta(t,o,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],o,n,r)},tr(t,o,n,r){r=r||q.groups;let i;return o&&o.j?i=o:(i=new q(o),n&&r&&Te(o,n,r)),this.jr.push([t,i]),i},ts(t,o,n,r){let i=this;const a=t.length;if(!a)return i;for(let s=0;s<a-1;s++)i=i.tt(t[s]);return i.tt(t[a-1],o,n,r)},tt(t,o,n,r){r=r||q.groups;const i=this;if(o&&o.j)return i.j[t]=o,o;const a=o;let s,l=i.go(t);if(l?(s=new q,Object.assign(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new q,a){if(r)if(s.t&&typeof s.t=="string"){const u=Object.assign(Ls(s.t,r),n);Te(a,u,r)}else n&&Te(a,n,r);s.t=a}return i.j[t]=s,s}};const _=(t,o,n,r,i)=>t.ta(o,n,r,i),W=(t,o,n,r,i)=>t.tr(o,n,r,i),zn=(t,o,n,r,i)=>t.ts(o,n,r,i),k=(t,o,n,r,i)=>t.tt(o,n,r,i),me="WORD",Oo="UWORD",Ii="ASCIINUMERICAL",Li="ALPHANUMERICAL",ot="LOCALHOST",Po="TLD",Ro="UTLD",yt="SCHEME",Be="SLASH_SCHEME",rn="NUM",Ho="WS",an="NL",Ge="OPENBRACE",Qe="CLOSEBRACE",kt="OPENBRACKET",Mt="CLOSEBRACKET",Ct="OPENPAREN",At="CLOSEPAREN",Nt="OPENANGLEBRACKET",Tt="CLOSEANGLEBRACKET",It="FULLWIDTHLEFTPAREN",Lt="FULLWIDTHRIGHTPAREN",St="LEFTCORNERBRACKET",Et="RIGHTCORNERBRACKET",Dt="LEFTWHITECORNERBRACKET",Bt="RIGHTWHITECORNERBRACKET",jt="FULLWIDTHLESSTHAN",zt="FULLWIDTHGREATERTHAN",Vt="AMPERSAND",_t="APOSTROPHE",$t="ASTERISK",ve="AT",Ot="BACKSLASH",Pt="BACKTICK",Rt="CARET",Ie="COLON",sn="COMMA",Ht="DOLLAR",ae="DOT",Ft="EQUALS",ln="EXCLAMATION",te="HYPHEN",Ze="PERCENT",Ut="PIPE",Wt="PLUS",Ve="POUND",Ne="QUERY",un="QUOTE",Si="FULLWIDTHMIDDLEDOT",cn="SEMI",se="SLASH",Je="TILDE",Yt="UNDERSCORE",Ei="EMOJI",Gt="SYM";var Di=Object.freeze({__proto__:null,ALPHANUMERICAL:Li,AMPERSAND:Vt,APOSTROPHE:_t,ASCIINUMERICAL:Ii,ASTERISK:$t,AT:ve,BACKSLASH:Ot,BACKTICK:Pt,CARET:Rt,CLOSEANGLEBRACKET:Tt,CLOSEBRACE:Qe,CLOSEBRACKET:Mt,CLOSEPAREN:At,COLON:Ie,COMMA:sn,DOLLAR:Ht,DOT:ae,EMOJI:Ei,EQUALS:Ft,EXCLAMATION:ln,FULLWIDTHGREATERTHAN:zt,FULLWIDTHLEFTPAREN:It,FULLWIDTHLESSTHAN:jt,FULLWIDTHMIDDLEDOT:Si,FULLWIDTHRIGHTPAREN:Lt,HYPHEN:te,LEFTCORNERBRACKET:St,LEFTWHITECORNERBRACKET:Dt,LOCALHOST:ot,NL:an,NUM:rn,OPENANGLEBRACKET:Nt,OPENBRACE:Ge,OPENBRACKET:kt,OPENPAREN:Ct,PERCENT:Ze,PIPE:Ut,PLUS:Wt,POUND:Ve,QUERY:Ne,QUOTE:un,RIGHTCORNERBRACKET:Et,RIGHTWHITECORNERBRACKET:Bt,SCHEME:yt,SEMI:cn,SLASH:se,SLASH_SCHEME:Be,SYM:Gt,TILDE:Je,TLD:Po,UNDERSCORE:Yt,UTLD:Ro,UWORD:Oo,WORD:me,WS:Ho});const de=/[a-z]/;let je=/[a-z]/i,vt=/[\u{1F000}-\u{1FAFF}\u{2600}-\u{27BF}]|\u{FE0F}/u;try{je=new RegExp("\\p{L}","u"),vt=new RegExp("\\p{Emoji}","u")}catch{}const pe=/\d/,ko=/\s/,Vn="\r",Mo=`
2
- `,Ss="️",Es="‍",Co="";let mt=null,gt=null;function Ds(t=[]){const o={};q.groups=o;const n=new q;mt==null&&(mt=_n(Cs)),gt==null&&(gt=_n(As)),k(n,"'",_t),k(n,"{",Ge),k(n,"}",Qe),k(n,"[",kt),k(n,"]",Mt),k(n,"(",Ct),k(n,")",At),k(n,"<",Nt),k(n,">",Tt),k(n,"(",It),k(n,")",Lt),k(n,"「",St),k(n,"」",Et),k(n,"『",Dt),k(n,"』",Bt),k(n,"<",jt),k(n,">",zt),k(n,"&",Vt),k(n,"*",$t),k(n,"@",ve),k(n,"`",Pt),k(n,"^",Rt),k(n,":",Ie),k(n,",",sn),k(n,"$",Ht),k(n,".",ae),k(n,"=",Ft),k(n,"!",ln),k(n,"-",te),k(n,"%",Ze),k(n,"|",Ut),k(n,"+",Wt),k(n,"#",Ve),k(n,"?",Ne),k(n,'"',un),k(n,"/",se),k(n,";",cn),k(n,"~",Je),k(n,"_",Yt),k(n,"\\",Ot),k(n,"・",Si);const r=W(n,pe,rn,{[zo]:!0});W(r,pe,r);const i=W(r,de,Ii,{[Ye]:!0}),a=W(r,je,Li,{[We]:!0}),s=W(n,de,me,{[Vo]:!0});W(s,pe,i),W(s,de,s),W(i,pe,i),W(i,de,i);const l=W(n,je,Oo,{[_o]:!0});W(l,de),W(l,pe,a),W(l,je,l),W(a,pe,a),W(a,de),W(a,je,a);const u=k(n,Mo,an,{[bo]:!0}),c=k(n,Vn,Ho,{[bo]:!0}),p=W(n,ko,Ho,{[bo]:!0});k(n,Co,p),k(c,Mo,u),k(c,Co,p),W(c,ko,p),k(p,Vn),k(p,Mo),W(p,ko,p),k(p,Co,p);const d=W(n,vt,Ei,{[Ti]:!0});k(d,"#"),W(d,vt,d),k(d,Ss,d);const f=k(d,Es);k(f,"#"),W(f,vt,d);const m=[[de,s],[pe,i]],h=[[de,null],[je,l],[pe,a]];for(let w=0;w<mt.length;w++)he(n,mt[w],Po,me,m);for(let w=0;w<gt.length;w++)he(n,gt[w],Ro,Oo,h);Te(Po,{tld:!0,ascii:!0},o),Te(Ro,{utld:!0,alpha:!0},o),he(n,"file",yt,me,m),he(n,"mailto",yt,me,m),he(n,"http",Be,me,m),he(n,"https",Be,me,m),he(n,"ftp",Be,me,m),he(n,"ftps",Be,me,m),Te(yt,{scheme:!0,ascii:!0},o),Te(Be,{slashscheme:!0,ascii:!0},o),t=t.sort((w,y)=>w[0]>y[0]?1:-1);for(let w=0;w<t.length;w++){const y=t[w][0],g=t[w][1]?{[Ns]:!0}:{[Ts]:!0};y.indexOf("-")>=0?g[$o]=!0:de.test(y)?pe.test(y)?g[Ye]=!0:g[Vo]=!0:g[zo]=!0,zn(n,y,y,g)}return zn(n,"localhost",ot,{ascii:!0}),n.jd=new q(Gt),{start:n,tokens:Object.assign({groups:o},Di)}}function Bi(t,o){const n=Bs(o.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,i=[];let a=0,s=0;for(;s<r;){let l=t,u=null,c=0,p=null,d=-1,f=-1;for(;s<r&&(u=l.go(n[s]));)l=u,l.accepts()?(d=0,f=0,p=l):d>=0&&(d+=n[s].length,f++),c+=n[s].length,a+=n[s].length,s++;a-=d,s-=f,c-=d,i.push({t:p.t,v:o.slice(a-c,a),s:a-c,e:a})}return i}function Bs(t){const o=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),a,s=i<55296||i>56319||r+1===n||(a=t.charCodeAt(r+1))<56320||a>57343?t[r]:t.slice(r,r+2);o.push(s),r+=s.length}return o}function he(t,o,n,r,i){let a;const s=o.length;for(let l=0;l<s-1;l++){const u=o[l];t.j[u]?a=t.j[u]:(a=new q(r),a.jr=i.slice(),t.j[u]=a),t=a}return a=new q(n),a.jr=i.slice(),t.j[o[s-1]]=a,a}function _n(t){const o=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let a=0;for(;i.indexOf(t[r+a])>=0;)a++;if(a>0){o.push(n.join(""));for(let s=parseInt(t.substring(r,r+a),10);s>0;s--)n.pop();r+=a}else n.push(t[r]),r++}return o}const nt={defaultProtocol:"http",events:null,format:$n,formatHref:$n,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],ignoreClasses:[],render:null};function dn(t,o=null){let n=Object.assign({},nt);t&&(n=Object.assign(n,t instanceof dn?t.o:t));const r=n.ignoreTags,i=[];for(let a=0;a<r.length;a++)i.push(r[a].toUpperCase());this.o=n,o&&(this.defaultRender=o),this.ignoreTags=i,this.ignoreClasses=n.ignoreClasses.slice()}dn.prototype={o:nt,ignoreTags:[],ignoreClasses:[],isIgnoredClass(t){if(typeof t!="string"||this.ignoreClasses.length===0)return!1;const o=t.split(/\s+/);for(let n=0;n<o.length;n++)if(this.ignoreClasses.indexOf(o[n])>=0)return!0;return!1},defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,o,n){const r=o!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:nt[t],typeof i=="function"&&r&&(i=i(o,n))):typeof i=="function"&&r&&(i=i(o,n.t,n)),i)},getObj(t,o,n){let r=this.o[t];return typeof r=="function"&&o!=null&&(r=r(o,n.t,n)),r},render(t){const o=t.render(this);return(this.get("render",null,t)||this.defaultRender)(o,t.t,t)}};function $n(t){return t}function ji(t,o){this.t="token",this.v=t,this.tk=o}ji.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const o=this.toString(),n=t.get("truncate",o,this),r=t.get("format",o,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=nt.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const o=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,o),a=this.toFormattedString(t),s={},l=t.get("className",n,o),u=t.get("target",n,o),c=t.get("rel",n,o),p=t.getObj("attributes",n,o),d=t.getObj("events",n,o);return s.href=r,l&&(s.class=l),u&&(s.target=u),c&&(s.rel=c),p&&Object.assign(s,p),{tagName:i,attributes:s,content:a,eventListeners:d}}};function io(t,o){class n extends ji{constructor(i,a){super(i,a),this.t=t}}for(const r in o)n.prototype[r]=o[r];return n.t=t,n}const js=io("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),On=io("text"),zs=io("nl"),ft=io("url",{isLink:!0,toHref(t=nt.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==ot&&t[1].t===Ie}}),X=t=>new q(t);function Vs({groups:t}){const o=t.domain.concat([Vt,$t,ve,Ot,Pt,Rt,Ht,Ft,te,rn,Ze,Ut,Wt,Ve,se,Gt,Je,Yt]),n=[_t,Ie,sn,ae,ln,Ze,Ne,un,cn,Nt,Tt,Ge,Qe,Mt,kt,Ct,At,It,Lt,St,Et,Dt,Bt,jt,zt],r=[Vt,_t,$t,Ot,Pt,Rt,Ht,Ft,te,Ge,Qe,Ze,Ut,Wt,Ve,Ne,se,Gt,Je,Yt],i=X(),a=k(i,Je);_(a,r,a),_(a,t.domain,a);const s=X(),l=X(),u=X();_(i,t.domain,s),_(i,t.scheme,l),_(i,t.slashscheme,u),_(s,r,a),_(s,t.domain,s);const c=k(s,ve);k(a,ve,c),k(l,ve,c),k(u,ve,c);const p=k(a,ae);_(p,r,a),_(p,t.domain,a);const d=X();_(c,t.domain,d),_(d,t.domain,d);const f=k(d,ae);_(f,t.domain,d);const m=X(js);_(f,t.tld,m),_(f,t.utld,m),k(c,ot,m);const h=k(d,te);k(h,te,h),_(h,t.domain,d),_(m,t.domain,d),k(m,ae,f),k(m,te,h);const w=k(s,te),y=k(s,ae);k(w,te,w),_(w,t.domain,s),_(y,r,a),_(y,t.domain,s);const b=X(ft);_(y,t.tld,b),_(y,t.utld,b),_(b,t.domain,s),_(b,r,a),k(b,ae,y),k(b,te,w),k(b,ve,c);const g=k(b,Ie),v=X(ft);_(g,t.numeric,v);const x=X(ft),M=X();_(x,o,x),_(x,n,M),_(M,o,x),_(M,n,M),k(b,se,x),k(v,se,x),k(b,Ne,M),k(b,Ve,x),k(v,Ne,M),k(v,Ve,x);const S=k(l,Ie),D=k(u,Ie),I=k(D,se),C=k(I,se);_(l,t.domain,s),k(l,ae,y),k(l,te,w),_(u,t.domain,s),k(u,ae,y),k(u,te,w),_(S,t.domain,x),k(S,se,x),k(S,Ne,x),_(C,t.domain,x),_(C,o,x),k(C,se,x);const L=[[Ge,Qe],[kt,Mt],[Ct,At],[Nt,Tt],[It,Lt],[St,Et],[Dt,Bt],[jt,zt]];for(let B=0;B<L.length;B++){const[N,z]=L[B],P=k(x,N);k(M,N,P);const H=X(ft);_(P,o,H);const F=X();_(P,n,F),k(P,z,x),_(H,o,H),_(H,n,F),_(F,o,H),_(F,n,F),k(H,z,x),k(F,z,x)}return k(i,ot,b),k(i,an,zs),{start:i,tokens:Di}}function _s(t,o,n){let r=n.length,i=0,a=[],s=[];const l=[];for(;i<r;){let u=t,c=null,p=null,d=0,f=null,m=-1,h=[];for(;i<r&&!(c=u.go(n[i].t));)s.push(n[i++]);for(;i<r&&(p=c||u.go(n[i].t));)if(c=null,u=p,i++,d++,u.accepts())m=0,f=u,h=[];else if(m>=0&&m++,h.push(u),l[i]&&l[i].has(u))break;for(let w=0,y=i-h.length+1;w<h.length;w++,y++)(l[y]||(l[y]=new Set)).add(h[w]);if(m<0)i-=d,i<r&&(s.push(n[i]),i++);else{s.length>0&&(a.push(Ao(On,o,s)),s=[]),i-=m,d-=m;const w=f.t,y=n.slice(i-d,i);a.push(Ao(w,o,y))}}return s.length>0&&a.push(Ao(On,o,s)),a}function Ao(t,o,n){const r=n[0].s,i=n[n.length-1].e,a=o.slice(r,i);return new t(a,n)}const J={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function $s(){J.scanner=Ds(J.customSchemes);for(let t=0;t<J.tokenQueue.length;t++)J.tokenQueue[t][1]({scanner:J.scanner});J.parser=Vs(J.scanner.tokens);for(let t=0;t<J.pluginQueue.length;t++)J.pluginQueue[t][1]({scanner:J.scanner,parser:J.parser});return J.initialized=!0,J}function zi(t){return J.initialized||$s(),_s(J.parser.start,t,Bi(J.scanner.start,t))}zi.scan=Bi;var Os={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"'},Ps=/^#[xX]([A-Fa-f0-9]+)$/,Rs=/^#([0-9]+)$/,Hs=/^([A-Za-z0-9]+)$/,Fs=(function(){function t(o){this.named=o}return t.prototype.parse=function(o){if(o){var n=o.match(Ps);if(n)return String.fromCharCode(parseInt(n[1],16));if(n=o.match(Rs),n)return String.fromCharCode(parseInt(n[1],10));if(n=o.match(Hs),n)return this.named[n[1]]||"&"+n[1]+";"}},t})(),Us=/[\t\n\f ]/,Ws=/[A-Za-z]/,Ys=/\r\n?/g;function Z(t){return Us.test(t)}function Pn(t){return Ws.test(t)}function Gs(t){return t.replace(Ys,`
3
- `)}var Qs=(function(){function t(o,n,r){r===void 0&&(r="precompile"),this.delegate=o,this.entityParser=n,this.mode=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var i=this.peek();if(i==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&i===`
4
- `){var a=this.tagNameBuffer.toLowerCase();(a==="pre"||a==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var i=this.peek(),a=this.tagNameBuffer;i==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):i==="&"&&a!=="script"&&a!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(i))},tagOpen:function(){var i=this.consume();i==="!"?this.transitionTo("markupDeclarationOpen"):i==="/"?this.transitionTo("endTagOpen"):(i==="@"||i===":"||Pn(i))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(i))},markupDeclarationOpen:function(){var i=this.consume();if(i==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var a=i.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();a==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var i=this.consume();Z(i)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var i=this.consume();Z(i)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(i.toLowerCase()))},doctypeName:function(){var i=this.consume();Z(i)?this.transitionTo("afterDoctypeName"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(i.toLowerCase())},afterDoctypeName:function(){var i=this.consume();if(!Z(i))if(i===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var a=i.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),s=a.toUpperCase()==="PUBLIC",l=a.toUpperCase()==="SYSTEM";(s||l)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),s?this.transitionTo("afterDoctypePublicKeyword"):l&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var i=this.peek();Z(i)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):i==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):i==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):i===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var i=this.consume();i==='"'?this.transitionTo("afterDoctypePublicIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(i)},doctypePublicIdentifierSingleQuoted:function(){var i=this.consume();i==="'"?this.transitionTo("afterDoctypePublicIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(i)},afterDoctypePublicIdentifier:function(){var i=this.consume();Z(i)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):i==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):i==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var i=this.consume();Z(i)||(i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):i==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):i==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var i=this.consume();i==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(i)},doctypeSystemIdentifierSingleQuoted:function(){var i=this.consume();i==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(i)},afterDoctypeSystemIdentifier:function(){var i=this.consume();Z(i)||i===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var i=this.consume();i==="-"&&this.peek()==="-"?this.transitionTo("commentStartDash"):i===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(i),this.transitionTo("comment"))},commentStartDash:function(){var i=this.consume();i==="-"?this.transitionTo("commentEnd"):i===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var i=this.consume();i==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(i)},commentEndDash:function(){var i=this.consume();i==="-"&&this.peek()==="-"?this.delegate.appendToCommentData(i):i==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+i),this.transitionTo("comment"))},commentEnd:function(){var i=this.consume();i===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+i),this.transitionTo("comment"))},tagName:function(){var i=this.consume();Z(i)?this.transitionTo("beforeAttributeName"):i==="/"?this.transitionTo("selfClosingStartTag"):i===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(i)},endTagName:function(){var i=this.consume();Z(i)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):i==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):i===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(i)},beforeAttributeName:function(){var i=this.peek();if(Z(i)){this.consume();return}else i==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):i===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):i==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(i)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var i=this.peek();Z(i)?(this.transitionTo("afterAttributeName"),this.consume()):i==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):i==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):i===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):i==='"'||i==="'"||i==="<"?(this.delegate.reportSyntaxError(i+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(i)):(this.consume(),this.delegate.appendToAttributeName(i))},afterAttributeName:function(){var i=this.peek();if(Z(i)){this.consume();return}else i==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):i==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):i===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(i))},beforeAttributeValue:function(){var i=this.peek();Z(i)?this.consume():i==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):i==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):i===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(i))},attributeValueDoubleQuoted:function(){var i=this.consume();i==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):i==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(i)},attributeValueSingleQuoted:function(){var i=this.consume();i==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):i==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(i)},attributeValueUnquoted:function(){var i=this.peek();Z(i)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):i==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):i==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):i===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(i))},afterAttributeValueQuoted:function(){var i=this.peek();Z(i)?(this.consume(),this.transitionTo("beforeAttributeName")):i==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):i===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var i=this.peek();i===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var i=this.consume();(i==="@"||i===":"||Pn(i))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(i))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(o){this.state=o},t.prototype.tokenize=function(o){this.reset(),this.tokenizePart(o),this.tokenizeEOF()},t.prototype.tokenizePart=function(o){for(this.input+=Gs(o);this.index<this.input.length;){var n=this.states[this.state];if(n!==void 0)n.call(this);else throw new Error("unhandled state "+this.state)}},t.prototype.tokenizeEOF=function(){this.flushData()},t.prototype.flushData=function(){this.state==="data"&&(this.delegate.finishData(),this.transitionTo("beforeData"))},t.prototype.peek=function(){return this.input.charAt(this.index)},t.prototype.consume=function(){var o=this.peek();return this.index++,o===`
5
- `?(this.line++,this.column=0):this.column++,o},t.prototype.consumeCharRef=function(){var o=this.input.indexOf(";",this.index);if(o!==-1){var n=this.input.slice(this.index,o),r=this.entityParser.parse(n);if(r){for(var i=n.length;i;)this.consume(),i--;return this.consume(),r}}},t.prototype.markTagStart=function(){this.delegate.tagOpen()},t.prototype.appendToTagName=function(o){this.tagNameBuffer+=o,this.delegate.appendToTagName(o)},t.prototype.isIgnoredEndTag=function(){var o=this.tagNameBuffer;return o==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||o==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||o==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},t})(),Zs=(function(){function t(o,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Qs(this,o,n.mode),this._currentAttribute=void 0}return t.prototype.tokenize=function(o){return this.tokens=[],this.tokenizer.tokenize(o),this.tokens},t.prototype.tokenizePart=function(o){return this.tokens=[],this.tokenizer.tokenizePart(o),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},t.prototype.current=function(){var o=this.token;if(o===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return o;for(var n=0;n<arguments.length;n++)if(o.type===arguments[n])return o;throw new Error("token type was unexpectedly "+o.type)},t.prototype.push=function(o){this.token=o,this.tokens.push(o)},t.prototype.currentAttribute=function(){return this._currentAttribute},t.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},t.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},t.prototype.appendToDoctypeName=function(o){this.current("Doctype").name+=o},t.prototype.appendToDoctypePublicIdentifier=function(o){var n=this.current("Doctype");n.publicIdentifier===void 0?n.publicIdentifier=o:n.publicIdentifier+=o},t.prototype.appendToDoctypeSystemIdentifier=function(o){var n=this.current("Doctype");n.systemIdentifier===void 0?n.systemIdentifier=o:n.systemIdentifier+=o},t.prototype.endDoctype=function(){this.addLocInfo()},t.prototype.beginData=function(){this.push({type:"Chars",chars:""})},t.prototype.appendToData=function(o){this.current("Chars").chars+=o},t.prototype.finishData=function(){this.addLocInfo()},t.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},t.prototype.appendToCommentData=function(o){this.current("Comment").chars+=o},t.prototype.finishComment=function(){this.addLocInfo()},t.prototype.tagOpen=function(){},t.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},t.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},t.prototype.finishTag=function(){this.addLocInfo()},t.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},t.prototype.appendToTagName=function(o){this.current("StartTag","EndTag").tagName+=o},t.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},t.prototype.appendToAttributeName=function(o){this.currentAttribute()[0]+=o},t.prototype.beginAttributeValue=function(o){this.currentAttribute()[2]=o},t.prototype.appendToAttributeValue=function(o){this.currentAttribute()[1]+=o},t.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},t.prototype.reportSyntaxError=function(o){this.current().syntaxError=o},t})();function Js(t,o){var n=new Zs(new Fs(Os),o);return n.tokenize(t)}const Vi="LinkifyResult",Qt="StartTag",_i="EndTag",Fo="Chars",qs="Comment",Ks="Doctype";function Xs(t,o={}){const n=Js(t),r=[],i=[],a=new dn(o,ol);for(let s=0;s<n.length;s++){const l=n[s];if(l.type===Qt){r.push(l);const u=l.tagName.toUpperCase();if(!(u==="A"||a.ignoreTags.indexOf(u)>=0||a.isIgnoredClass(rl(l.attributes,"class")))||l.selfClosing)continue;let p=r.length;tl(u,n,++s,r),s+=r.length-p-1}else if(l.type!==Fo)r.push(l);else{const u=el(l.chars,a);r.push.apply(r,u)}}for(let s=0;s<r.length;s++){const l=r[s];switch(l.type){case Vi:i.push(l.rendered);break;case Qt:{let u="<"+l.tagName;l.attributes.length>0&&(u+=" "+il(l.attributes).join(" ")),l.selfClosing&&(u+=" /"),u+=">",i.push(u);break}case _i:i.push(`</${l.tagName}>`);break;case Fo:i.push(Uo(l.chars));break;case qs:i.push(`<!--${Uo(l.chars)}-->`);break;case Ks:{let u=`<!DOCTYPE ${l.name}`;l.publicIdentifier&&(u+=` PUBLIC "${l.publicIdentifier}"`),l.systemIdentifier&&(u+=` "${l.systemIdentifier}"`),u+=">",i.push(u);break}}}return i.join("")}function el(t,o){const n=zi(t),r=[];for(let i=0;i<n.length;i++){const a=n[i];a.t==="nl"&&o.get("nl2br")?r.push({type:Qt,tagName:"br",attributes:[],selfClosing:!0}):!a.isLink||!o.check(a)?r.push({type:Fo,chars:a.toString()}):r.push({type:Vi,rendered:o.render(a)})}return r}function tl(t,o,n,r){let i=1;for(;n<o.length&&i>0;){let a=o[n];a.type===Qt&&a.tagName.toUpperCase()===t?i++:a.type===_i&&a.tagName.toUpperCase()===t&&i--,r.push(a),n++}return r}function ol({tagName:t,attributes:o,content:n}){return`<${t} ${nl(o)}>${Uo(n)}</${t}>`}function Uo(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function $i(t){return t.replace(/"/g,"&quot;")}function nl(t){const o=[];for(const n in t){const r=t[n]+"";o.push(`${n}="${$i(r)}"`)}return o.join(" ")}function il(t){const o=[];for(let n=0;n<t.length;n++){const r=t[n][0],i=t[n][1]+"";o.push(`${r}="${$i(i)}"`)}return o}function rl(t,o){for(let n=0;n<t.length;n++)if(t[n][0].toLowerCase()===o)return t[n][1];return null}const al={class:"wu-flex wu-flex-col wu-gap-2","data-testid":"app-message-text"},sl=["innerHTML"],Wo=e.defineComponent({__name:"app-message-text",props:{message:{}},setup(t){const o=t,n=e.computed(()=>{const i=o.message.metadata?.linkPreview;return!i?.title||eo(o.message)==="contact"?null:i}),r=e.computed(()=>{const i=o.message.messageBody||"";return/<a\s/i.test(i)?i:Xs(i,{defaultProtocol:"https",target:"_blank",rel:"noopener noreferrer",className:"wu-underline"})});return(i,a)=>(e.openBlock(),e.createElementBlock("div",al,[n.value?(e.openBlock(),e.createBlock(Ms,{key:0,preview:n.value},null,8,["preview"])):e.createCommentVNode("",!0),e.createVNode(j,{class:"wu-whitespace-pre-wrap",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:r.value},null,8,sl)]),_:1})]))}}),ll={_grouped_images:Fa,interactive:ns,document:rs,automatic:Wo,survey:ls,audio:jo,video:ys,voice:jo,image:ms,text:Wo},ul=t=>{const o=t.messageType;return o==="audio"||o==="voice"?jo:to(t).length>0?es:ll[o]??Wo},cl={"image/jpeg":5,"image/png":5,"image/gif":5,"image/webp":5,"application/pdf":64,"audio/mpeg":16,"audio/mp3":16,"video/mp4":16},dl=25,pl=t=>cl[t.type]??dl,Rn=t=>{const o=[],n=[];for(const r of t){const i=pl(r);if(r.size/1024/1024>i){n.push(`O arquivo ${r.name} é maior que o limite de ${i}MB e não foi adicionado.`);continue}o.push(r)}return{validFiles:o,errors:n}},ml={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},qe=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(u){return!!n.value[u]}const i=e.computed(()=>o.tertiary),a=e.computed(()=>!i.value&&o.secondary),s=e.computed(()=>i.value?"wu-justify-center":a.value?"wu-flex-row-reverse":""),l=e.computed(()=>i.value?"wu-items-center wu-flex":a.value?["wu-rounded-br-none wu-p-3","wu-bg-[var(--wu-message-outgoing-bg)] dark:wu-bg-[var(--wu-message-outgoing-bg-dark)]"].join(" "):"wu-rounded-bl-none wu-bg-gray-200 wu-p-3 dark:wu-bg-neutral-700");return(u,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex wu-items-end wu-gap-2 wu-w-full",s.value]),"data-testid":"app-message"},[e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-lg wu-relative wu-min-h-8 [overflow-wrap:anywhere]",l.value]),"data-testid":"app-message-bubble"},[e.renderSlot(u.$slots,"default"),r("trailing")?(e.openBlock(),e.createElementBlock("div",ml,[e.renderSlot(u.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),pn=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,a)=>(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))}}),gl={class:"wu-typing__dots","aria-hidden":"true"},fl=e.defineComponent({__name:"app-typing",props:{small:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"wu-gap-1.5 wu-min-h-4":"wu-gap-2 wu-min-h-5"),r=e.computed(()=>o.small?"wu-typing__dot--small":"wu-typing__dot");return(i,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-text-gray-500",[n.value,"dark:wu-text-neutral-300"]]),role:"status","aria-live":"polite","aria-label":"Digitando","data-testid":"app-typing"},[e.createElementVNode("div",gl,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,s=>e.createElementVNode("span",{key:s,class:e.normalizeClass(r.value),style:e.normalizeStyle({"--i":s}),"data-testid":"app-typing-dot"},null,6)),64))])],2))}}),mn=Re(fl,[["__scopeId","data-v-b0aad068"]]),gn=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(a){return!!r.value[a]}return(a,s)=>(e.openBlock(),e.createBlock($,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(E,{key:0,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):i("icon")?e.renderSlot(a.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(E,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(j,{class:"wu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(R,{key:3,onClick:s[0]||(s[0]=l=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...s[3]||(s[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[s[4]||(s[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),hl={key:0,class:"wu-absolute wu-inset-0 wu-z-10 wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-2 wu-border-2 wu-border-dashed wu-border-primary wu-bg-white wu-bg-opacity-90 dark:wu-bg-neutral-900 dark:wu-bg-opacity-90","data-testid":"app-chat-drag-overlay"},wl={class:"wu-relative wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full"},yl={key:0,class:"wu-w-full wu-min-h-4","data-testid":"app-chat-top-spacer"},vl={key:2,class:"wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-flex-col dark:wu-border-neutral-700"},xl={class:"wu-relative wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-rounded-full wu-bg-red-500 wu-bg-opacity-10"},bl={key:0,class:"wu-absolute wu-inset-0 wu-rounded-full wu-bg-red-500 wu-bg-opacity-20 wu-animate-ping"},kl=["src","alt"],Ml=["onKeydown","disabled"],Cl={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},Al=100,Nl=e.defineComponent({__name:"app-chat-service",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,{history:i,chat:a,language:s}=Le(),{isSendingMessage:l,isErrorLoading:u,attachments:c,isFinished:p,isLoading:d,messages:f,isTyping:m,audio:h,text:w}=a,{isRecording:y,formattedDuration:b,start:g,stop:v,cancel:x}=Ba(),M=e.computed(()=>i.value.length>0),S=e.ref(null),D=e.ref(null),I=e.ref(!1),C=e.ref(!1),L=e.computed(()=>Rr(f.value)),B=e.ref(null),N=e.computed(()=>!!(c.value.length||h.value)),z=e.computed(()=>!!(N.value||w.value.trim())),P=e.computed(()=>!!n.rule.settings?.features?.sendAttachment),H=e.computed(()=>l.value||!!h.value||C.value),F=e.computed(()=>l.value||N.value||C.value),Y=e.computed(()=>P.value&&!H.value),U=e.ref(!1),G=e.ref([]);let Ee=null;const kn=e.computed(()=>(n.rule.settings?.features?.quickReplies??[]).map(A=>A[s.value]??A["pt-BR"]??Object.values(A)[0]??"").filter(Boolean)),gr=e.computed(()=>kn.value.length>0&&f.value.length===0&&!p.value),Mn=e.computed(()=>l.value||N.value||C.value),fr=()=>{const T=S.value;if(!T)return;const A=T.scrollHeight-T.scrollTop-T.clientHeight;I.value=A>Al},He=(T=!0)=>{const A=S.value;A&&(A.scrollTo({top:A.scrollHeight,behavior:T?"smooth":"auto"}),I.value=!1)},ct=(T=!0)=>{I.value||He(T)},hr=()=>{H.value||B.value?.click()},co=T=>{T&&URL.revokeObjectURL(T)},wr=()=>{c.value.forEach(T=>co(T.previewUrl)),c.value=[]},po=()=>{co(h.value?.previewUrl),h.value=null},yr=T=>T.type.startsWith("image/")?"image":"document",mo=T=>{if(!T.length)return;const{validFiles:A,errors:V}=Rn(T);G.value=V,A.length&&(po(),c.value=[...c.value,...A.map(Q=>{const dt=yr(Q);return{file:Q,type:dt,previewUrl:dt==="image"?URL.createObjectURL(Q):void 0}})])},vr=T=>{const{validFiles:A,errors:V}=Rn([T]);G.value=V,A.length&&(wr(),po(),w.value="",h.value={file:A[0],previewUrl:URL.createObjectURL(A[0])})},xr=T=>{const A=T.target,V=Array.from(A.files??[]);mo(V),A.value=""},br=T=>{if(!T)return[];const A=Array.from(T.items??[]).filter(V=>V.kind==="file").map(V=>V.getAsFile()).filter(V=>!!V);return A.length?A:Array.from(T.files??[])},go=T=>{const A=T.dataTransfer?.types;return A?Array.from(A).includes("Files"):!1},fo=()=>{Ee&&(clearTimeout(Ee),Ee=null)},Cn=()=>{fo(),Ee=setTimeout(()=>{U.value=!1},300)},kr=T=>{if(!Y.value)return;const A=br(T.clipboardData);A.length&&(T.preventDefault(),mo(A))},Mr=T=>{!Y.value||!go(T)||(T.preventDefault(),T.dataTransfer&&(T.dataTransfer.dropEffect="copy"),U.value=!0,Cn())},Cr=T=>{!Y.value||!go(T)||Cn()},Ar=T=>{if(!Y.value||!go(T))return;T.preventDefault(),fo(),U.value=!1;const A=Array.from(T.dataTransfer?.files??[]);A.length&&mo(A)},Nr=T=>{co(c.value[T]?.previewUrl),c.value=c.value.filter((A,V)=>V!==T)},Tr=()=>{po()},Ir=async()=>{F.value||!await g()||(w.value="",C.value=!0)},Lr=async()=>{await x(),C.value=!1},Sr=async()=>{const T=await v();C.value=!1,T&&vr(T)},Fe=T=>r("chat-service-action",T),An=e.computed(()=>z.value&&!C.value&&!l.value),Nn=()=>{An.value&&(G.value=[],He(),Fe({action:"send-message"}))},Er=T=>{Mn.value||!T.trim()||(w.value=T,He(),Fe({action:"send-message"}))};e.watch(()=>L.value.length,async()=>{await e.nextTick(),ct()}),e.watch(m,T=>{T&&ct()});let De=null;const Tn=()=>{De?.disconnect(),De=null;const T=D.value;!T||typeof ResizeObserver>"u"||(De=new ResizeObserver(()=>{ct(!1)}),De.observe(T))};e.watch(d,async T=>{T||(await e.nextTick(),Tn(),ct(!1))}),e.onMounted(async()=>{He(!1),await e.nextTick(),Tn()}),e.onBeforeUnmount(()=>{fo(),De?.disconnect(),De=null});const In=T=>T.from==="contact"?"contact":"operator",Dr=(T,A,V)=>A[V-1]?In(A[V-1])===In(T)?"wu-mt-1":"wu-mt-4":"wu-mt-0",Br=T=>_r(T.createdAt)||"12:58",jr=T=>r("chat-service-message-action",T);return(T,A)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-flex wu-flex-col wu-items-center wu-h-full wu-w-full wu-overflow-hidden","data-testid":"app-chat-service",onDragover:Mr,onDragleave:Cr,onDrop:Ar},[U.value?(e.openBlock(),e.createElementBlock("div",hl,[e.createVNode(E,{class:"wu-text-primary",large:""},{default:e.withCtx(()=>[...A[5]||(A[5]=[e.createTextVNode("upload",-1)])]),_:1}),e.createVNode(j,{semibold:"",gray:""},{default:e.withCtx(()=>[...A[6]||(A[6]=[e.createTextVNode("Solte os arquivos para anexar",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",wl,[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:S,"data-testid":"app-service-messages",onScroll:fr},[e.createElementVNode("div",{class:"wu-w-full wu-flex wu-flex-col",ref_key:"messagesContent",ref:D},[M.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yl)),e.unref(d)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(V,Q)=>e.createVNode(qe,{key:Q,primary:Q%2===0,secondary:Q%2===1},{default:e.withCtx(()=>[e.createVNode(pn,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(u)?(e.openBlock(),e.createBlock(gn,{key:2,class:"wu-h-full",onRefetch:A[0]||(A[0]=V=>Fe({action:"retry-loading"})),error:""},{default:e.withCtx(()=>[...A[7]||(A[7]=[e.createTextVNode("Ocorreu um erro ao carregar o atendimento.",-1)])]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(V,Q)=>(e.openBlock(),e.createBlock(qe,{key:V.id??Q,primary:V.from!=="contact",secondary:V.from==="contact",class:e.normalizeClass([Dr(V,L.value,Q)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ul)(V)),{message:V,onChatServiceMessageAction:jr},null,40,["message"]))]),trailing:e.withCtx(()=>[e.createVNode(j,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Br(V)),1)]),_:2},1024)]),_:2},1032,["primary","secondary","class"]))),128)),e.unref(m)?(e.openBlock(),e.createBlock(qe,{key:0,class:"wu-mt-1",primary:""},{default:e.withCtx(()=>[e.createVNode(mn,{small:""})]),_:1})):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock($,{key:1,class:"wu-mt-4","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"app-chat-start-new-service",onClick:A[1]||(A[1]=V=>Fe({action:"start-new-service"})),small:""},{icon:e.withCtx(()=>[e.createVNode(E,{small:""},{default:e.withCtx(()=>[...A[8]||(A[8]=[e.createTextVNode("chat",-1)])]),_:1})]),default:e.withCtx(()=>[A[9]||(A[9]=e.createTextVNode("Iniciar novo atendimento",-1))]),_:1}),e.createVNode(R,{"data-testid":"app-chat-back",onClick:A[2]||(A[2]=V=>Fe({action:"back"})),small:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(E,{small:""},{default:e.withCtx(()=>[...A[10]||(A[10]=[e.createTextVNode("arrow_back",-1)])]),_:1})]),default:e.withCtx(()=>[A[11]||(A[11]=e.createTextVNode("Voltar",-1))]),_:1})]),_:1})):e.createCommentVNode("",!0)],64)),A[12]||(A[12]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-4"},null,-1))],512)],544),I.value?(e.openBlock(),e.createBlock(R,{key:0,class:"wu-absolute wu-right-9 wu-bottom-3 wu-z-10 wu-shadow-md !wu-bg-white dark:!wu-bg-neutral-800","data-testid":"app-chat-scroll-to-bottom",onClick:A[3]||(A[3]=V=>He()),round:"",small:"",icon:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(E,{small:"",gray:""},{default:e.withCtx(()=>[...A[13]||(A[13]=[e.createTextVNode("keyboard_double_arrow_down",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),!e.unref(d)&&!e.unref(u)&&gr.value?(e.openBlock(),e.createBlock($,{key:1,class:"wu-items-end wu-w-full","data-testid":"app-chat-quick-replies","padding-md":"","gap-sm":"",col:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kn.value,(V,Q)=>(e.openBlock(),e.createBlock(R,{key:Q,onClick:dt=>Er(V),disabled:Mn.value,outline:"",round:"",fit:""},{trailing:e.withCtx(()=>[...A[14]||(A[14]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1032,["onClick","disabled"]))),128))]),_:1})):e.createCommentVNode("",!0),!e.unref(d)&&!e.unref(u)&&t.rule.settings?.features?.sendMessage?(e.openBlock(),e.createElementBlock("div",vl,[C.value?(e.openBlock(),e.createBlock($,{key:0,"data-testid":"app-chat-audio-recording","padding-md":"","center-between":""},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"app-chat-audio-cancel",onClick:Lr,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...A[15]||(A[15]=[e.createTextVNode("close",-1)])]),_:1})]),_:1}),e.createVNode($,{class:"wu-items-center","gap-sm":""},{default:e.withCtx(()=>[e.createElementVNode("div",xl,[e.unref(y)?(e.openBlock(),e.createElementBlock("div",bl)):e.createCommentVNode("",!0),e.createVNode(E,{class:"wu-text-red-500",large:""},{default:e.withCtx(()=>[...A[16]||(A[16]=[e.createTextVNode("mic",-1)])]),_:1})]),e.createVNode(j,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)),1)]),_:1})]),_:1}),e.createVNode(R,{"data-testid":"app-chat-audio-stop",onClick:Sr,disabled:!e.unref(y),small:"",icon:"",success:""},{icon:e.withCtx(()=>[e.createVNode(E,{light:""},{default:e.withCtx(()=>[...A[17]||(A[17]=[e.createTextVNode("check",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.unref(h)?(e.openBlock(),e.createBlock($,{key:1,"data-testid":"app-chat-audio-preview","padding-md":""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-full wu-items-center","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(ut,{class:"wu-flex-1",src:e.unref(h).previewUrl},null,8,["src"]),e.createVNode(R,{"data-testid":"app-chat-audio-discard",onClick:Tr,disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...A[18]||(A[18]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(c).length?(e.openBlock(),e.createBlock($,{key:0,class:"wu-px-6 wu-pt-6 wu-overflow-x-auto invisible-scrollbar","data-testid":"app-chat-attachment-preview"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(V,Q)=>(e.openBlock(),e.createBlock($,{class:"wu-items-center",key:Q,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[V.type==="image"&&V.previewUrl?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-rounded wu-object-cover",src:V.previewUrl,alt:V.file.name},null,8,kl)):(e.openBlock(),e.createBlock($,{key:1,class:"wu-w-7 wu-h-7 wu-bg-gray-200",center:"","padding-base":"",rounded:""},{default:e.withCtx(()=>[e.createVNode(E,{large:"",gray:""},{default:e.withCtx(()=>[...A[19]||(A[19]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1})),e.createVNode($,{class:"wu-flex-1 wu-items-start wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(j,{class:"[overflow-wrap:anywhere]",semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.file.name),1)]),_:2},1024),e.createVNode(j,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.file.type),1)]),_:2},1024)]),_:2},1024),e.createVNode(R,{"data-testid":"app-chat-attachment-discard",onClick:dt=>Nr(Q),disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{gray:""},{default:e.withCtx(()=>[...A[20]||(A[20]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["onClick","disabled"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0),G.value.length?(e.openBlock(),e.createBlock($,{key:1,class:"wu-px-6 wu-pt-2 wu-flex-col wu-items-start wu-gap-1","data-testid":"app-chat-attachment-errors"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(V,Q)=>(e.openBlock(),e.createBlock(j,{class:"!wu-text-red-500",key:Q,"extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0),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":A[4]||(A[4]=V=>e.isRef(w)?w.value=V:null),onKeydown:e.withKeys(e.withModifiers(Nn,["exact","prevent"]),["enter"]),onPaste:kr,placeholder:"Escreva uma mensagem...",disabled:e.unref(l)},null,40,Ml),[[e.vModelText,e.unref(w)]])],64)),e.withDirectives(e.createElementVNode("input",{ref_key:"fileInput",ref:B,type:"file",multiple:"","data-testid":"app-chat-file-input",onChange:xr},null,544),[[e.vShow,!1]]),e.createElementVNode("div",Cl,[P.value?(e.openBlock(),e.createBlock(R,{key:0,"data-testid":"app-chat-attach-file",onClick:hr,disabled:H.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{class:"wu-rotate-45",large:"",gray:""},{default:e.withCtx(()=>[...A[21]||(A[21]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(R,{key:1,"data-testid":"app-chat-record-audio",onClick:Ir,disabled:F.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{large:"",gray:""},{default:e.withCtx(()=>[...A[22]||(A[22]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(R,{onClick:Nn,loading:e.unref(l),disabled:!An.value,small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(E,{class:"-wu-rotate-45 wu-translate-x-[0.10rem] -wu-translate-y-[0.12rem]",outlined:"",large:""},{default:e.withCtx(()=>[...A[23]||(A[23]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)],32))}}),Tl={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"},Il={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"},Ll=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",Tl,[e.createVNode($,{class:"wu-w-full",col:"",center:"","gap-lg":""},{default:e.withCtx(()=>[e.createVNode($,{col:"",center:"","gap-base":""},{default:e.withCtx(()=>[e.createElementVNode("div",Il,[e.createVNode(E,{"extra-large":"",gray:""},{default:e.withCtx(()=>[...i[0]||(i[0]=[e.createTextVNode("phone_in_talk",-1)])]),_:1})]),e.createVNode(j,{class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1}),e.createVNode(j,{class:"wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("Aguardando conexão",-1)])]),_:1})]),_:1}),e.createVNode($,{center:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(R,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(E,{large:"",gray:""},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1}),e.createVNode(R,{alert:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(E,{large:""},{default:e.withCtx(()=>[...i[3]||(i[3]=[e.createTextVNode("call_end",-1)])]),_:1})]),_:1}),e.createVNode(R,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(E,{large:"",gray:""},{default:e.withCtx(()=>[...i[4]||(i[4]=[e.createTextVNode("volume_up",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),fn=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>n.rule.settings?.behavior==="voice"?Ll:Nl);return(a,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{rule:t.rule,edges:t.edges,onChatServiceAction:s[0]||(s[0]=l=>r("chat-service-action",l)),onChatServiceMessageAction:s[1]||(s[1]=l=>r("chat-service-message-action",l))},null,40,["rule","edges"]))}}),Hn=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},Sl=()=>{const t="#6D3595",o=u=>{const c=u.replace("#","").trim(),p=c.length===3&&/^[0-9a-fA-F]{3}$/.test(c)?`${c[0]}${c[0]}${c[1]}${c[1]}${c[2]}${c[2]}`:c;return p.length!==6||!/^[0-9a-fA-F]{6}$/.test(p)?null:{r:parseInt(p.slice(0,2),16),g:parseInt(p.slice(2,4),16),b:parseInt(p.slice(4,6),16)}},n=u=>{const c=o(u)??o(t);return c?Hn(c):t.toLowerCase()},r=u=>{const c=o(u);return c?(c.r*299+c.g*587+c.b*114)/1e3:null};return{getLuminance:r,isLightHex:u=>{const c=r(u);return c!==null&&c>160},isNearWhiteHex:u=>{const c=o(u);return c?c.r>=245&&c.g>=245&&c.b>=245:!1},isTooDarkForDarkCanvas:u=>{const c=r(u);return c!==null&&c<55},mixWithWhite:(u,c)=>{const p=o(u);if(!p)return n(u);const d=Math.min(1,Math.max(0,c));return Hn({r:Math.round(p.r+(255-p.r)*d),g:Math.round(p.g+(255-p.g)*d),b:Math.round(p.b+(255-p.b)*d)})},normalizeHex:n,parseHex:o}},El=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,Oi=t=>{const{isLightHex:o,isNearWhiteHex:n,isTooDarkForDarkCanvas:r,mixWithWhite:i,normalizeHex:a,parseHex:s}=Sl(),l="#374151",u=.45,c=.72,p=(x,M)=>x==="dark"?"dark":x==="light"?"light":M?"dark":"light",d=(x,M)=>n(x)?M==="light"?l:x:M==="dark"&&r(x)?i(x,u):x,f=(x,M,S)=>S==="dark"&&r(x)?i(x,c):M,m=x=>{const M=s(x)??{r:109,g:53,b:149},S=o(x),D=`color-mix(in srgb, ${x} 22%, white)`,I=`color-mix(in srgb, ${x} 22%, black)`;return{hex:x,rgb:M,light:S,tone50:`color-mix(in srgb, ${x} 8%, white)`,tone100:D,tone200:`color-mix(in srgb, ${x} 38%, white)`,tone300:`color-mix(in srgb, ${x} 55%, white)`,tone400:S?`color-mix(in srgb, ${x} 70%, black)`:`color-mix(in srgb, ${x} 78%, white)`,tone600:`color-mix(in srgb, ${x} 82%, black)`,tone700:`color-mix(in srgb, ${x} 64%, black)`,tone800:`color-mix(in srgb, ${x} 42%, black)`,tone900:I,fg:S?"#1c1917":"#ffffff",border:S?"#e5e7eb":"color-mix(in srgb, var(--wu-primary-fg) 22%, transparent)"}},h=(x,M)=>{const S=a(x),D=d(S,M),I=f(S,D,M),C=m(S),L=m(D),B=m(I);return{"--wu-primary":C.hex,"--wu-primary-rgb":`${C.rgb.r} ${C.rgb.g} ${C.rgb.b}`,"--wu-primary-fg":C.fg,"--wu-primary-border":C.border,"--wu-primary-50":C.tone50,"--wu-primary-100":C.tone100,"--wu-primary-200":C.tone200,"--wu-primary-300":C.tone300,"--wu-primary-400":C.tone400,"--wu-primary-500":C.hex,"--wu-primary-600":C.tone600,"--wu-primary-700":C.tone700,"--wu-primary-800":C.tone800,"--wu-primary-900":C.tone900,"--wu-action":L.hex,"--wu-action-rgb":`${L.rgb.r} ${L.rgb.g} ${L.rgb.b}`,"--wu-action-fg":L.fg,"--wu-action-50":L.tone50,"--wu-action-ink":B.hex,"--wu-message-outgoing-bg":L.tone100,"--wu-message-outgoing-bg-dark":L.tone900}},w=x=>{const M=e.ref(El()),S=e.computed(()=>p(e.toValue(x),M.value)),D=e.computed(()=>S.value==="dark"),I=e.computed(()=>D.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const C=window.matchMedia("(prefers-color-scheme: dark)");M.value=C.matches;const L=B=>{M.value=B.matches};C.addEventListener("change",L),e.onBeforeUnmount(()=>C.removeEventListener("change",L))}),{isDark:D,resolvedTheme:S,themeClass:I}},{isDark:y,themeClass:b,resolvedTheme:g}=w(()=>e.toValue(t).theme),v=e.computed(()=>({...h(e.toValue(t).primaryColor,g.value),colorScheme:g.value}));return{isDark:y,themeClass:b,resolvedTheme:g,appearanceStyle:v}},Dl={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},Bl={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},jl=["src"],zl={key:1,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},hn=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i}=Le(),a=e.computed(()=>i.value.length>0),s=e.computed(()=>n.edges??[]),l=e.computed(()=>n.rule.settings?.body),u=e.computed(()=>s.value.slice(0,3)),c=e.computed(()=>s.value.slice(3));return(p,d)=>(e.openBlock(),e.createElementBlock("div",Dl,[a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Bl)),e.createVNode($,{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,jl)):e.createCommentVNode("",!0),l.value?.eyebrow?(e.openBlock(),e.createBlock(j,{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(j,{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(j,{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),e.unref(i).length>0?(e.openBlock(),e.createBlock($,{key:4,class:"wu-rounded-full wu-px-2 wu-h-6 wu-bg-[var(--wu-action)]","padding-sm":"","gap-sm":"",center:""},{default:e.withCtx(()=>[e.createVNode(E,{class:"!wu-text-[var(--wu-action-fg)]",small:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("check",-1)])]),_:1}),e.createVNode(j,{class:"!wu-text-[var(--wu-action-fg)]",semibold:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.rule?.name),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1}),s.value.length?(e.openBlock(),e.createElementBlock("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,f=>(e.openBlock(),e.createBlock(Oe,{key:f.id,edge:f,onClick:d[0]||(d[0]=m=>r("edge-click",m))},null,8,["edge"]))),128)),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":c.value.length>4,"wu-justify-center":c.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,f=>(e.openBlock(),e.createBlock(Oe,{key:f.id,edge:f,icon:"",onClick:d[1]||(d[1]=m=>r("edge-click",m))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),Vl="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=",_l={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},$l={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)]"},Ol={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},Pl=["src"],Rl={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},Hl={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},Fl={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},Ul={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},Wl={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"},Yl=["src"],Gl=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-action","edge-click","chat-service-message-action","submit","close","back"],setup(t,{emit:o}){const n=t,r=o,{history:i,currentRule:a,currentHeader:s,edges:l,setWorkflow:u,setConfig:c}=Le(),{appearanceStyle:p,themeClass:d}=Oi(()=>n.config.configurations.appearance);u(n.workflow),c(n.config),e.watch(()=>n.workflow,g=>u(g)),e.watch(()=>n.config,g=>c(g));const f=e.computed(()=>i.value.length>0),m=e.computed(()=>f.value&&a.value?.action!=="widget-identification-screen"),h=e.computed(()=>n.config.configurations.general.isClosable),w={"widget-identification-screen":tn,"widget-article-screen":nn,"widget-service-screen":fn,"widget-base-screen":hn},y=e.computed(()=>{const g=a.value?.action;return g&&g in w?w[g]:void 0}),b=e.computed(()=>n.fullscreen?"wu-w-full wu-h-[100dvh] wu-max-h-full":"wu-w-[24.5rem] wu-h-[43rem] wu-max-h-[calc(100dvh-2*var(--widget-offset-y,1rem))] widget-shadow wu-rounded-2xl");return(g,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[b.value,e.unref(d)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(p))},[e.createElementVNode("div",_l,[e.createElementVNode("div",$l,[e.createElementVNode("div",Ol,[e.unref(s)?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-9 wu-h-9 wu-object-contain wu-shrink-0",src:e.unref(s).logo,alt:""},null,8,Pl)):e.createCommentVNode("",!0),e.createElementVNode("div",Rl,[e.unref(s)?.title?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-w-full wu-truncate !wu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).title),1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)?.subtitle?(e.openBlock(),e.createBlock(j,{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).subtitle),1)]),_:1})):e.createCommentVNode("",!0)])]),h.value?(e.openBlock(),e.createBlock(R,{key:0,class:"wu-shrink-0 !wu-bg-transparent hover:!wu-bg-[color-mix(in_srgb,var(--wu-primary-fg)_12%,transparent)]",onClick:v[0]||(v[0]=x=>r("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[...v[7]||(v[7]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Hl,[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(a)?.id},[m.value?(e.openBlock(),e.createElementBlock("div",Fl,[e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",onClick:v[1]||(v[1]=x=>r("back"))},[e.createVNode(E,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...v[8]||(v[8]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(j,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...v[9]||(v[9]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ul,[y.value&&e.unref(a)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),{key:0,rule:e.unref(a),edges:e.unref(l),onSubmit:v[2]||(v[2]=x=>r("submit",x)),onBack:v[3]||(v[3]=x=>r("back")),onEdgeClick:v[4]||(v[4]=x=>r("edge-click",x)),onChatServiceAction:v[5]||(v[5]=x=>r("chat-service-action",x)),onChatServiceMessageAction:v[6]||(v[6]=x=>r("chat-service-message-action",x))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",Wl,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref(Vl),alt:"Opens"},null,8,Yl),e.createVNode(j,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...v[10]||(v[10]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),wn=Re(Gl,[["__scopeId","data-v-7ef2dcd4"]]),Ql={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},Zl={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},Jl=["value","type","disabled","maxlength"],ql={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},Pi=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,a=e.computed(()=>e.useSlots());function s(S){return!!a.value[S]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function p(S){if(!r.maskFunction)return S;try{const D=r.maskFunction(S);return typeof D=="string"?D:S}catch{return S}}e.watch(()=>r.modelValue,S=>{if(S==null){l.value="";return}l.value=r.maskFunction?p(S):S},{immediate:!0});function d(){return!(u.value||l.value)}const{height:f,textSize:m,width:h}=Ni(r),w=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"),y=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),b=e.computed(()=>r.small&&d()?"wu-translate-y-[7px]":r.small&&!d()?"wu-translate-y-0":d()?"wu-translate-y-[11px]":"wu-translate-y-0"),g=e.computed(()=>s("icon")||r.loading?"wu-pl-[34px]":"wu-pl-3"),v=e.computed(()=>r.block?"wu-rounded-none":r.round?"wu-rounded-full":"wu-rounded-lg"),x=e.computed(()=>r.disabled||r.loading?"wu-opacity-50 wu-pointer-events-none":"");function M(S){const I=S.target.value;l.value=r.maskFunction?p(I):I,i("update:modelValue",l.value)}return o({focus:u,content:l}),(S,D)=>(e.openBlock(),e.createBlock($,{class:e.normalizeClass([e.unref(h)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode($,{col:"","gap-sm":""},{default:e.withCtx(()=>[s("label")?(e.openBlock(),e.createBlock(j,{key:0,small:"",medium:""},{default:e.withCtx(()=>[e.renderSlot(S.$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",[v.value,x.value,e.unref(f),w.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",Ql,[e.createElementVNode("div",Zl,[!t.loading&&s("icon")?(e.openBlock(),e.createBlock(E,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(E,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...D[4]||(D[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(j,{class:e.normalizeClass(["wu-py-1 wu-transition",[b.value]]),small:"",medium:"",gray:""},{default:e.withCtx(()=>[e.renderSlot(S.$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(m),g.value,v.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:M,onFocus:D[0]||(D[0]=I=>u.value=!0),onBlur:D[1]||(D[1]=I=>u.value=!1),onKeyup:D[2]||(D[2]=e.withKeys(I=>i("keyup-enter"),["enter"]))},null,42,Jl),e.createElementVNode("div",ql,[t.maxLength?(e.openBlock(),e.createBlock(j,{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:D[3]||(D[3]=I=>c.value=!c.value)},[e.createVNode(E,{small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value?"visibility_off":"visibility"),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(S.$slots,"suffix")])],2)]),_:3}),s("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[y.value]])},[e.renderSlot(S.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Kl=()=>({getOffset:(r,i)=>{const a=`${i.x}px`,s=`${i.y}px`;switch(r){case"bottom-left":return{bottom:s,left:a};case"top-left":return{top:s,left:a};case"top-right":return{top:s,right:a};default:return{bottom:s,right:a}}},getPosition:r=>{switch(r){case"bottom-left":return"bottom left";case"top-left":return"top left";case"top-right":return"top right";default:return"bottom right"}},getTone:r=>({backgroundImage:"none",backgroundColor:"var(--wu-primary)",color:"var(--wu-primary-fg)"})}),Xl={key:0,class:"wu-flex wu-relative"},eu=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-message-action","chat-service-action","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,r=o,{isOpen:i,config:a,chat:s,open:l,close:u,setWorkflow:c,setConfig:p}=Le(),{getOffset:d,getPosition:f}=Kl(),{appearanceStyle:m,themeClass:h}=Oi(()=>n.config.configurations.appearance),w=e.computed(()=>n.config.configurations.notifications?.enabled??!0),y=e.computed(()=>w.value&&s.unreadMessagesCount.value>0),b=n.config.configurations.general.defaultBehavior==="active",g=e.ref(!b);b?l():u();const v=e.computed(()=>n.config.configurations.anchor),x=e.computed(()=>{if(!(i.value&&n.fullscreen))return{...d(v.value.position,v.value.offset),"--widget-offset-y":`${v.value.offset.y}px`}}),M=e.computed(()=>f(v.value.position)),S=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),D=e.computed(()=>({small:v.value.size==="small",large:v.value.size==="large",logo:v.value.logo??"",label:v.value.label??""})),I=async()=>{i.value||(g.value=!1,await e.nextTick(),l(),r("open"))},C=()=>{i.value&&(u(),r("close"))},L=()=>{g.value=!0};return c(n.workflow),p(n.config),e.watch(()=>n.workflow,B=>c(B)),e.watch(()=>n.config,B=>p(B)),e.watch(()=>a.value?.configurations.general.defaultBehavior,B=>{B==="active"?I():C()},{immediate:!0}),e.watch(i,B=>{B&&(g.value=!1)}),(B,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(h),e.unref(i)&&t.fullscreen?"wu-inset-0 wu-overflow-hidden":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":M.value},x.value,e.unref(m)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:L},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createBlock(wn,e.mergeProps({key:0},S.value,{onClose:C,onBack:N[0]||(N[0]=z=>r("back")),onSubmit:N[1]||(N[1]=z=>r("submit",z)),onEdgeClick:N[2]||(N[2]=z=>r("edge-click",z)),onChatServiceAction:N[3]||(N[3]=z=>r("chat-service-action",z)),onChatServiceMessageAction:N[4]||(N[4]=z=>r("chat-service-message-action",z))}),null,16)):e.createCommentVNode("",!0)]),_:1}),g.value?(e.openBlock(),e.createElementBlock("div",Xl,[e.createVNode(on,{small:D.value.small,large:D.value.large,logo:D.value.logo,label:D.value.label,onClick:I},null,8,["small","large","logo","label"]),y.value?(e.openBlock(),e.createBlock($,{key:0,class:"wu-rounded-full wu-absolute -wu-top-2 -wu-right-1 wu-h-5 wu-w-5 wu-bg-red-600","data-testid":"app-widget-unread-badge",center:""},{default:e.withCtx(()=>[e.createVNode(j,{small:"",bold:"",white:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).unreadMessagesCount>9?"9+":e.unref(s).unreadMessagesCount),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))}}),Ri=Re(eu,[["__scopeId","data-v-98ee11c8"]]),tu=["top","right","bottom","left"],Fn=["start","end"],Un=tu.reduce((t,o)=>t.concat(o,o+"-"+Fn[0],o+"-"+Fn[1]),[]),it=Math.min,Ae=Math.max,ou={left:"right",right:"left",bottom:"top",top:"bottom"},nu={start:"end",end:"start"};function Yo(t,o,n){return Ae(t,it(o,n))}function Se(t,o){return typeof t=="function"?t(o):t}function ce(t){return t.split("-")[0]}function ie(t){return t.split("-")[1]}function Hi(t){return t==="x"?"y":"x"}function yn(t){return t==="y"?"height":"width"}const iu=new Set(["top","bottom"]);function ge(t){return iu.has(ce(t))?"y":"x"}function vn(t){return Hi(ge(t))}function Fi(t,o,n){n===void 0&&(n=!1);const r=ie(t),i=vn(t),a=yn(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(s=Jt(s)),[s,Jt(s)]}function ru(t){const o=Jt(t);return[Zt(t),o,Zt(o)]}function Zt(t){return t.replace(/start|end/g,o=>nu[o])}const Wn=["left","right"],Yn=["right","left"],au=["top","bottom"],su=["bottom","top"];function lu(t,o,n){switch(t){case"top":case"bottom":return n?o?Yn:Wn:o?Wn:Yn;case"left":case"right":return o?au:su;default:return[]}}function uu(t,o,n,r){const i=ie(t);let a=lu(ce(t),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),o&&(a=a.concat(a.map(Zt)))),a}function Jt(t){return t.replace(/left|right|bottom|top/g,o=>ou[o])}function cu(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ui(t){return typeof t!="number"?cu(t):{top:t,right:t,bottom:t,left:t}}function Ke(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 Gn(t,o,n){let{reference:r,floating:i}=t;const a=ge(o),s=vn(o),l=yn(s),u=ce(o),c=a==="y",p=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[l]/2-i[l]/2;let m;switch(u){case"top":m={x:p,y:r.y-i.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(ie(o)){case"start":m[s]-=f*(n&&c?-1:1);break;case"end":m[s]+=f*(n&&c?-1:1);break}return m}const du=async(t,o,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(o));let c=await s.getElementRects({reference:t,floating:o,strategy:i}),{x:p,y:d}=Gn(c,r,u),f=r,m={},h=0;for(let w=0;w<l.length;w++){const{name:y,fn:b}=l[w],{x:g,y:v,data:x,reset:M}=await b({x:p,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:c,platform:s,elements:{reference:t,floating:o}});p=g??p,d=v??d,m={...m,[y]:{...m[y],...x}},M&&h<=50&&(h++,typeof M=="object"&&(M.placement&&(f=M.placement),M.rects&&(c=M.rects===!0?await s.getElementRects({reference:t,floating:o,strategy:i}):M.rects),{x:p,y:d}=Gn(c,f,u)),w=-1)}return{x:p,y:d,placement:f,strategy:i,middlewareData:m}};async function ro(t,o){var n;o===void 0&&(o={});const{x:r,y:i,platform:a,rects:s,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=Se(o,t),h=Ui(m),y=l[f?d==="floating"?"reference":"floating":d],b=Ke(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:p,strategy:u})),g=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),x=await(a.isElement==null?void 0:a.isElement(v))?await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1}:{x:1,y:1},M=Ke(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:v,strategy:u}):g);return{top:(b.top-M.top+h.top)/x.y,bottom:(M.bottom-b.bottom+h.bottom)/x.y,left:(b.left-M.left+h.left)/x.x,right:(M.right-b.right+h.right)/x.x}}const pu=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:r,placement:i,rects:a,platform:s,elements:l,middlewareData:u}=o,{element:c,padding:p=0}=Se(t,o)||{};if(c==null)return{};const d=Ui(p),f={x:n,y:r},m=vn(i),h=yn(m),w=await s.getDimensions(c),y=m==="y",b=y?"top":"left",g=y?"bottom":"right",v=y?"clientHeight":"clientWidth",x=a.reference[h]+a.reference[m]-f[m]-a.floating[h],M=f[m]-a.reference[m],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let D=S?S[v]:0;(!D||!await(s.isElement==null?void 0:s.isElement(S)))&&(D=l.floating[v]||a.floating[h]);const I=x/2-M/2,C=D/2-w[h]/2-1,L=it(d[b],C),B=it(d[g],C),N=L,z=D-w[h]-B,P=D/2-w[h]/2+I,H=Yo(N,P,z),F=!u.arrow&&ie(i)!=null&&P!==H&&a.reference[h]/2-(P<N?L:B)-w[h]/2<0,Y=F?P<N?P-N:P-z:0;return{[m]:f[m]+Y,data:{[m]:H,centerOffset:P-H-Y,...F&&{alignmentOffset:Y}},reset:F}}});function mu(t,o,n){return(t?[...n.filter(i=>ie(i)===t),...n.filter(i=>ie(i)!==t)]:n.filter(i=>ce(i)===i)).filter(i=>t?ie(i)===t||(o?Zt(i)!==i:!1):!0)}const gu=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,r,i;const{rects:a,middlewareData:s,placement:l,platform:u,elements:c}=o,{crossAxis:p=!1,alignment:d,allowedPlacements:f=Un,autoAlignment:m=!0,...h}=Se(t,o),w=d!==void 0||f===Un?mu(d||null,m,f):f,y=await ro(o,h),b=((n=s.autoPlacement)==null?void 0:n.index)||0,g=w[b];if(g==null)return{};const v=Fi(g,a,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==g)return{reset:{placement:w[0]}};const x=[y[ce(g)],y[v[0]],y[v[1]]],M=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:g,overflows:x}],S=w[b+1];if(S)return{data:{index:b+1,overflows:M},reset:{placement:S}};const D=M.map(L=>{const B=ie(L.placement);return[L.placement,B&&p?L.overflows.slice(0,2).reduce((N,z)=>N+z,0):L.overflows[0],L.overflows]}).sort((L,B)=>L[1]-B[1]),C=((i=D.filter(L=>L[2].slice(0,ie(L[0])?2:3).every(B=>B<=0))[0])==null?void 0:i[0])||D[0][0];return C!==l?{data:{index:b+1,overflows:M},reset:{placement:C}}:{}}}},fu=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:c}=o,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:w=!0,...y}=Se(t,o);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=ce(i),g=ge(l),v=ce(l)===l,x=await(u.isRTL==null?void 0:u.isRTL(c.floating)),M=f||(v||!w?[Jt(l)]:ru(l)),S=h!=="none";!f&&S&&M.push(...uu(l,w,h,x));const D=[l,...M],I=await ro(o,y),C=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&C.push(I[b]),d){const P=Fi(i,s,x);C.push(I[P[0]],I[P[1]])}if(L=[...L,{placement:i,overflows:C}],!C.every(P=>P<=0)){var B,N;const P=(((B=a.flip)==null?void 0:B.index)||0)+1,H=D[P];if(H&&(!(d==="alignment"?g!==ge(H):!1)||L.every(U=>ge(U.placement)===g?U.overflows[0]>0:!0)))return{data:{index:P,overflows:L},reset:{placement:H}};let F=(N=L.filter(Y=>Y.overflows[0]<=0).sort((Y,U)=>Y.overflows[1]-U.overflows[1])[0])==null?void 0:N.placement;if(!F)switch(m){case"bestFit":{var z;const Y=(z=L.filter(U=>{if(S){const G=ge(U.placement);return G===g||G==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(G=>G>0).reduce((G,Ee)=>G+Ee,0)]).sort((U,G)=>U[1]-G[1])[0])==null?void 0:z[0];Y&&(F=Y);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}},hu=new Set(["left","top"]);async function wu(t,o){const{placement:n,platform:r,elements:i}=t,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=ce(n),l=ie(n),u=ge(n)==="y",c=hu.has(s)?-1:1,p=a&&u?-1:1,d=Se(o,t);let{mainAxis:f,crossAxis:m,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),u?{x:m*p,y:f*c}:{x:f*c,y:m*p}}const yu=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:i,y:a,placement:s,middlewareData:l}=o,u=await wu(o,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},vu=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:i}=o,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:b,y:g}=y;return{x:b,y:g}}},...u}=Se(t,o),c={x:n,y:r},p=await ro(o,u),d=ge(ce(i)),f=Hi(d);let m=c[f],h=c[d];if(a){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",g=m+p[y],v=m-p[b];m=Yo(g,m,v)}if(s){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",g=h+p[y],v=h-p[b];h=Yo(g,h,v)}const w=l.fn({...o,[f]:m,[d]:h});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[f]:a,[d]:s}}}}}},xu=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:i,rects:a,platform:s,elements:l}=o,{apply:u=()=>{},...c}=Se(t,o),p=await ro(o,c),d=ce(i),f=ie(i),m=ge(i)==="y",{width:h,height:w}=a.floating;let y,b;d==="top"||d==="bottom"?(y=d,b=f===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=d,y=f==="end"?"top":"bottom");const g=w-p.top-p.bottom,v=h-p.left-p.right,x=it(w-p[y],g),M=it(h-p[b],v),S=!o.middlewareData.shift;let D=x,I=M;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(I=v),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(D=g),S&&!f){const L=Ae(p.left,0),B=Ae(p.right,0),N=Ae(p.top,0),z=Ae(p.bottom,0);m?I=h-2*(L!==0||B!==0?L+B:Ae(p.left,p.right)):D=w-2*(N!==0||z!==0?N+z:Ae(p.top,p.bottom))}await u({...o,availableWidth:I,availableHeight:D});const C=await s.getDimensions(l.floating);return h!==C.width||w!==C.height?{reset:{rects:!0}}:{}}}};function oe(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function le(t){return oe(t).getComputedStyle(t)}const Qn=Math.min,Xe=Math.max,qt=Math.round;function Wi(t){const o=le(t);let n=parseFloat(o.width),r=parseFloat(o.height);const i=t.offsetWidth,a=t.offsetHeight,s=qt(n)!==i||qt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,fallback:s}}function Me(t){return Gi(t)?(t.nodeName||"").toLowerCase():""}let ht;function Yi(){if(ht)return ht;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(ht=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),ht):navigator.userAgent}function ue(t){return t instanceof oe(t).HTMLElement}function be(t){return t instanceof oe(t).Element}function Gi(t){return t instanceof oe(t).Node}function Zn(t){return typeof ShadowRoot>"u"?!1:t instanceof oe(t).ShadowRoot||t instanceof ShadowRoot}function ao(t){const{overflow:o,overflowX:n,overflowY:r,display:i}=le(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&!["inline","contents"].includes(i)}function bu(t){return["table","td","th"].includes(Me(t))}function Go(t){const o=/firefox/i.test(Yi()),n=le(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 a=n.contain;return a!=null&&a.includes(i)}))}function Qi(){return!/^((?!chrome|android).)*safari/i.test(Yi())}function xn(t){return["html","body","#document"].includes(Me(t))}function Zi(t){return be(t)?t:t.contextElement}const Ji={x:1,y:1};function _e(t){const o=Zi(t);if(!ue(o))return Ji;const n=o.getBoundingClientRect(),{width:r,height:i,fallback:a}=Wi(o);let s=(a?qt(n.width):n.width)/r,l=(a?qt(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}function rt(t,o,n,r){var i,a;o===void 0&&(o=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),l=Zi(t);let u=Ji;o&&(r?be(r)&&(u=_e(r)):u=_e(t));const c=l?oe(l):window,p=!Qi()&&n;let d=(s.left+(p&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,f=(s.top+(p&&((a=c.visualViewport)==null?void 0:a.offsetTop)||0))/u.y,m=s.width/u.x,h=s.height/u.y;if(l){const w=oe(l),y=r&&be(r)?oe(r):r;let b=w.frameElement;for(;b&&r&&y!==w;){const g=_e(b),v=b.getBoundingClientRect(),x=getComputedStyle(b);v.x+=(b.clientLeft+parseFloat(x.paddingLeft))*g.x,v.y+=(b.clientTop+parseFloat(x.paddingTop))*g.y,d*=g.x,f*=g.y,m*=g.x,h*=g.y,d+=v.x,f+=v.y,b=oe(b).frameElement}}return{width:m,height:h,top:f,right:d+m,bottom:f+h,left:d,x:d,y:f}}function ke(t){return((Gi(t)?t.ownerDocument:t.document)||window.document).documentElement}function so(t){return be(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function qi(t){return rt(ke(t)).left+so(t).scrollLeft}function at(t){if(Me(t)==="html")return t;const o=t.assignedSlot||t.parentNode||Zn(t)&&t.host||ke(t);return Zn(o)?o.host:o}function Ki(t){const o=at(t);return xn(o)?o.ownerDocument.body:ue(o)&&ao(o)?o:Ki(o)}function Kt(t,o){var n;o===void 0&&(o=[]);const r=Ki(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),a=oe(r);return i?o.concat(a,a.visualViewport||[],ao(r)?r:[]):o.concat(r,Kt(r))}function Jn(t,o,n){return o==="viewport"?Ke((function(r,i){const a=oe(r),s=ke(r),l=a.visualViewport;let u=s.clientWidth,c=s.clientHeight,p=0,d=0;if(l){u=l.width,c=l.height;const f=Qi();(f||!f&&i==="fixed")&&(p=l.offsetLeft,d=l.offsetTop)}return{width:u,height:c,x:p,y:d}})(t,n)):be(o)?Ke((function(r,i){const a=rt(r,!0,i==="fixed"),s=a.top+r.clientTop,l=a.left+r.clientLeft,u=ue(r)?_e(r):{x:1,y:1};return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:l*u.x,y:s*u.y}})(o,n)):Ke((function(r){const i=ke(r),a=so(r),s=r.ownerDocument.body,l=Xe(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=Xe(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let c=-a.scrollLeft+qi(r);const p=-a.scrollTop;return le(s).direction==="rtl"&&(c+=Xe(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:c,y:p}})(ke(t)))}function qn(t){return ue(t)&&le(t).position!=="fixed"?t.offsetParent:null}function Kn(t){const o=oe(t);let n=qn(t);for(;n&&bu(n)&&le(n).position==="static";)n=qn(n);return n&&(Me(n)==="html"||Me(n)==="body"&&le(n).position==="static"&&!Go(n))?o:n||(function(r){let i=at(r);for(;ue(i)&&!xn(i);){if(Go(i))return i;i=at(i)}return null})(t)||o}function ku(t,o,n){const r=ue(o),i=ke(o),a=rt(t,!0,n==="fixed",o);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&n!=="fixed")if((Me(o)!=="body"||ao(i))&&(s=so(o)),ue(o)){const u=rt(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else i&&(l.x=qi(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const Mu={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:r,strategy:i}=t;const a=n==="clippingAncestors"?(function(c,p){const d=p.get(c);if(d)return d;let f=Kt(c).filter((y=>be(y)&&Me(y)!=="body")),m=null;const h=le(c).position==="fixed";let w=h?at(c):c;for(;be(w)&&!xn(w);){const y=le(w),b=Go(w);(h?b||m:b||y.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=y:f=f.filter((g=>g!==w)),w=at(w)}return p.set(c,f),f})(o,this._c):[].concat(n),s=[...a,r],l=s[0],u=s.reduce(((c,p)=>{const d=Jn(o,p,i);return c.top=Xe(d.top,c.top),c.right=Qn(d.right,c.right),c.bottom=Qn(d.bottom,c.bottom),c.left=Xe(d.left,c.left),c}),Jn(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=ue(n),a=ke(n);if(n===a)return o;let s={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((Me(n)!=="body"||ao(a))&&(s=so(n)),ue(n))){const c=rt(n);l=_e(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-s.scrollLeft*l.x+u.x,y:o.y*l.y-s.scrollTop*l.y+u.y}},isElement:be,getDimensions:function(t){return ue(t)?Wi(t):t.getBoundingClientRect()},getOffsetParent:Kn,getDocumentElement:ke,getScale:_e,async getElementRects(t){let{reference:o,floating:n,strategy:r}=t;const i=this.getOffsetParent||Kn,a=this.getDimensions;return{reference:ku(o,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>le(t).direction==="rtl"},Cu=(t,o,n)=>{const r=new Map,i={platform:Mu,...n},a={...i.platform,_c:r};return du(t,o,{...i,platform:a})};function Xi(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?Xi(t[n],o[n]):t[n]=o[n])}const re={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 st(t,o){let n=re.themes[t]||{},r;do r=n[o],typeof r>"u"?n.$extend?n=re.themes[n.$extend]||{}:(n=null,r=re[o]):n=null;while(n);return r}function Au(t){const o=[t];let n=re.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=re.themes[n.$extend]||{}):n=null;while(n);return o.map(r=>`v-popper--theme-${r}`)}function Xn(t){const o=[t];let n=re.themes[t]||{};do n.$extend?(o.push(n.$extend),n=re.themes[n.$extend]||{}):n=null;while(n);return o}let Pe=!1;if(typeof window<"u"){Pe=!1;try{const t=Object.defineProperty({},"passive",{get(){Pe=!0}});window.addEventListener("test",null,t)}catch{}}let er=!1;typeof window<"u"&&typeof navigator<"u"&&(er=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const tr=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),ei={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},ti={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function oi(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function No(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const ne=[];let Ce=null;const ni={};function ii(t){let o=ni[t];return o||(o=ni[t]=[]),o}let Qo=function(){};typeof window<"u"&&(Qo=window.Element);function O(t){return function(o){return st(o.theme,t)}}const To="__floating-vue__popper",or=()=>e.defineComponent({name:"VPopper",provide(){return{[To]:{parentPopper:this}}},inject:{[To]:{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:O("disabled")},positioningDisabled:{type:Boolean,default:O("positioningDisabled")},placement:{type:String,default:O("placement"),validator:t=>tr.includes(t)},delay:{type:[String,Number,Object],default:O("delay")},distance:{type:[Number,String],default:O("distance")},skidding:{type:[Number,String],default:O("skidding")},triggers:{type:Array,default:O("triggers")},showTriggers:{type:[Array,Function],default:O("showTriggers")},hideTriggers:{type:[Array,Function],default:O("hideTriggers")},popperTriggers:{type:Array,default:O("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:O("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:O("popperHideTriggers")},container:{type:[String,Object,Qo,Boolean],default:O("container")},boundary:{type:[String,Qo],default:O("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:O("strategy")},autoHide:{type:[Boolean,Function],default:O("autoHide")},handleResize:{type:Boolean,default:O("handleResize")},instantMove:{type:Boolean,default:O("instantMove")},eagerMount:{type:Boolean,default:O("eagerMount")},popperClass:{type:[String,Array,Object],default:O("popperClass")},computeTransformOrigin:{type:Boolean,default:O("computeTransformOrigin")},autoMinSize:{type:Boolean,default:O("autoMinSize")},autoSize:{type:[Boolean,String],default:O("autoSize")},autoMaxSize:{type:Boolean,default:O("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:O("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:O("preventOverflow")},overflowPadding:{type:[Number,String],default:O("overflowPadding")},arrowPadding:{type:[Number,String],default:O("arrowPadding")},arrowOverflow:{type:Boolean,default:O("arrowOverflow")},flip:{type:Boolean,default:O("flip")},shift:{type:Boolean,default:O("shift")},shiftCrossAxis:{type:Boolean,default:O("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:O("noAutoFocus")},disposeTimeout:{type:Number,default:O("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[To])==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(yu({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(gu({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(vu({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(fu({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(pu({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:i,middlewareData:a})=>{let s;const{centerOffset:l}=a.arrow;return r.startsWith("top")||r.startsWith("bottom")?s=Math.abs(l)>i.reference.width/2:s=Math.abs(l)>i.reference.height/2,{data:{overflow:s}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:i,placement:a,middlewareData:s})=>{var l;if((l=s.autoSize)!=null&&l.skip)return{};let u,c;return a.startsWith("top")||a.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(xu({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 Cu(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),Ce&&this.instantMove&&Ce.instantMove&&Ce!==this.parentPopper){Ce.$_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&&(Ce=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 No(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Kt(this.$_referenceNode),...Kt(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),a=o.y+o.height/2-(r.top+n.offsetTop);this.result.transformOrigin=`${i}px ${a}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<ne.length;n++)o=ne[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}ne.push(this),document.body.classList.add("v-popper--some-open");for(const o of Xn(this.theme))ii(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 No(),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,oi(ne,this),ne.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Xn(this.theme)){const r=ii(n);oi(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}Ce===this&&(Ce=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 No(),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,ei,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],ei,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,ti,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],ti,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,Pe?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,r,i){let a=n;r!=null&&(a=typeof r=="function"?r(a):r),a.forEach(s=>{const l=o[s];l&&this.$_registerEventListeners(t,l,i)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:r,eventType:i,handler:a}=n;!t||t===i?r.forEach(s=>s.removeEventListener(i,a)):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(et>=t.left&&et<=t.right&&tt>=t.top&&tt<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=et-we,r=tt-ye,i=o.left+o.width/2-we+(o.top+o.height/2)-ye+o.width+o.height,a=we+n*i,s=ye+r*i;return wt(we,ye,a,s,o.left,o.top,o.left,o.bottom)||wt(we,ye,a,s,o.left,o.top,o.right,o.top)||wt(we,ye,a,s,o.right,o.top,o.right,o.bottom)||wt(we,ye,a,s,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(er){const t=Pe?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>ri(o,!0),t),document.addEventListener("touchend",o=>ai(o,!0),t)}else window.addEventListener("mousedown",t=>ri(t,!1),!0),window.addEventListener("click",t=>ai(t,!1),!0);window.addEventListener("resize",Tu)}function ri(t,o){if(re.autoHideOnMousedown)nr(t,o);else for(let n=0;n<ne.length;n++){const r=ne[n];try{r.mouseDownContains=r.popperNode().contains(t.target)}catch{}}}function ai(t,o){re.autoHideOnMousedown||nr(t,o)}function nr(t,o){const n={};for(let r=ne.length-1;r>=0;r--){const i=ne[r];try{const a=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(t.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&si(i,a,t)){if(i.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&a){let l=i.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let s=i.parentPopper;for(;s&&si(s,s.containsGlobalTarget,t);)s.$_handleGlobalClose(t,o),s=s.parentPopper}})}catch{}}}function si(t,o,n){return n.closeAllPopover||n.closePopover&&o||Nu(t,n)&&!o}function Nu(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function Tu(){for(let t=0;t<ne.length;t++)ne[t].$_computePosition()}let we=0,ye=0,et=0,tt=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{we=et,ye=tt,et=t.clientX,tt=t.clientY},Pe?{passive:!0}:void 0);function wt(t,o,n,r,i,a,s,l){const u=((s-i)*(o-a)-(l-a)*(t-i))/((l-a)*(n-t)-(s-i)*(r-o)),c=((n-t)*(o-a)-(r-o)*(t-i))/((l-a)*(n-t)-(s-i)*(r-o));return u>=0&&u<=1&&c>=0&&c<=1}const Iu={extends:or()},lo=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n};function Lu(t,o,n,r,i,a){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 Su=lo(Iu,[["render",Lu]]);function Eu(){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 xt;function Zo(){Zo.init||(Zo.init=!0,xt=Eu()!==-1)}var uo={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Zo(),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",xt&&this.$el.appendChild(t),t.data="about:blank",xt||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&&(!xt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Du=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const Bu={class:"resize-observer",tabindex:"-1"};e.popScopeId();const ju=Du((t,o,n,r,i,a)=>(e.openBlock(),e.createBlock("div",Bu)));uo.render=ju;uo.__scopeId="data-v-b329ee4c";uo.__file="src/components/ResizeObserver.vue";const ir=(t="theme")=>({computed:{themeClass(){return Au(this[t])}}}),zu=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:uo},mixins:[ir()],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}}}),Vu=["id","aria-hidden","tabindex","data-popper-placement"],_u={ref:"inner",class:"v-popper__inner"},$u=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),Ou=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),Pu=[$u,Ou];function Ru(t,o,n,r,i,a){const s=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",_u,[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(s,{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)},Pu,4)],4)],46,Vu)}const rr=lo(zu,[["render",Ru]]),ar={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 Jo=function(){};typeof window<"u"&&(Jo=window.Element);const Hu=e.defineComponent({name:"VPopperWrapper",components:{Popper:Su,PopperContent:rr},mixins:[ar,ir("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,Jo,Boolean],default:void 0},boundary:{type:[String,Jo],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 Fu(t,o,n,r,i,a){const s=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:p,skipTransition:d,autoHide:f,show:m,hide:h,handleResize:w,onResize:y,classes:b,result:g})=>[e.renderSlot(t.$slots,"default",{shown:c,show:m,hide:h}),e.createVNode(s,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:p,"skip-transition":d,"auto-hide":f,"handle-resize":w,classes:b,result:g,onHide:h,onResize:y},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:c,hide:h})]),_: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 bn=lo(Hu,[["render",Fu]]),Uu={...bn,name:"VDropdown",vPopperTheme:"dropdown"},Wu={...bn,name:"VMenu",vPopperTheme:"menu"},Yu={...bn,name:"VTooltip",vPopperTheme:"tooltip"},Gu=e.defineComponent({name:"VTooltipDirective",components:{Popper:or(),PopperContent:rr},mixins:[ar],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>st(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>st(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}}}),Qu=["innerHTML"],Zu=["textContent"];function Ju(t,o,n,r,i,a){const s=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:p,skipTransition:d,autoHide:f,hide:m,handleResize:h,onResize:w,classes:y,result:b})=>[e.createVNode(s,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:c,mounted:p,"skip-transition":d,"auto-hide":f,"handle-resize":h,classes:y,result:b,onHide:m,onResize:w},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,Qu)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,Zu))]),_: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 qu=lo(Gu,[["render",Ju]]),sr="v-popper--has-tooltip";function Ku(t,o){let n=t.placement;if(!n&&o)for(const r of tr)o[r]&&(n=r);return n||(n=st(t.theme||"tooltip","placement")),n}function lr(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=Ku(r,n),r.targetNodes=()=>[t],r.referenceNode=()=>t,r}let Io,lt,Xu=0;function ec(){if(Io)return;lt=e.ref([]),Io=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:lt}},render(){return this.directives.map(o=>e.h(qu,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),Io.mount(t)}function tc(t,o,n){ec();const r=e.ref(lr(t,o,n)),i=e.ref(!1),a={id:Xu++,options:r,shown:i};return lt.value.push(a),t.classList&&t.classList.add(sr),t.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function ur(t){if(t.$_popper){const o=lt.value.indexOf(t.$_popper.item);o!==-1&&lt.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(sr)}function li(t,{value:o,modifiers:n}){const r=lr(t,o,n);if(!r.content||st(r.theme||"tooltip","disabled"))ur(t);else{let i;t.$_popper?(i=t.$_popper,i.options.value=r):i=tc(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?i.show():i.hide())}}const oc={beforeMount:li,updated:li,beforeUnmount(t){ur(t)}};function ui(t){t.addEventListener("mousedown",Xt),t.addEventListener("click",Xt),t.addEventListener("touchstart",cr,Pe?{passive:!0}:!1)}function ci(t){t.removeEventListener("mousedown",Xt),t.removeEventListener("click",Xt),t.removeEventListener("touchstart",cr),t.removeEventListener("touchend",dr),t.removeEventListener("touchcancel",pr)}function Xt(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function cr(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",dr),o.addEventListener("touchcancel",pr)}}function dr(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 pr(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const nc={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&ui(t)},updated(t,{value:o,oldValue:n,modifiers:r}){t.$_closePopoverModifiers=r,o!==n&&(typeof o>"u"||o?ui(t):ci(t))},beforeUnmount(t){ci(t)}};function ic(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,Xi(re,o),t.directive("tooltip",oc),t.directive("close-popper",nc),t.component("VTooltip",Yu),t.component("VDropdown",Uu),t.component("VMenu",Wu))}const rc={version:"5.2.2",install:ic,options:re},ac="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",di="2026-11-13T12:25:32.993Z",sc="c5ac1602-351c-449e-8e95-7e413c31817a",lc="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0zLjA0IDEzLjE0YzAtMSAuOTMtMS43NiAxLjkyLTEuNTVjLjQ0LjEuOSAwIDEuMjYtLjI2bC41MS0uMzdhNSA1IDAgMCAxIDEuMDctLjY2YTIgMiAwIDAgMSAxLjEzLS4wNGMuMy4wNy41Ny4yNCAxLjEyLjU3bC4yMi4xNGMuNy40MiAxLjA0LjYzIDEuNDIuN2EyIDIgMCAwIDAgLjYzIDBjLjM4LS4wNi43My0uMjYgMS40My0uNjZsLjQyLS4yNWMuNTEtLjMuNzctLjQ0IDEuMDMtLjUxYTIgMiAwIDAgMSAxLjIxLjA3Yy4yNi4xLjUuMjcuOTcuNjJsLjU1LjRjLjM0LjI1Ljc3LjM0IDEuMi4yNWMuOS0uMiAxLjc4LjQ5IDEuNzggMS40M3Y1LjY3YzAgLjczIDAgMS4wOS0uMDkgMS4zOGEyIDIgMCAwIDEtMS4zIDEuM2MtLjMuMS0uNjYuMS0xLjM4LjFjLS43MyAwLTEuMDkgMC0xLjM4LS4xYTIgMiAwIDAgMS0xLjMtMS4zYy0uMS0uMy0uMS0uNjUtLjEtMS4zOHYtLjJjMC0uOTMgMC0xLjQtLjE1LTEuNzVhMiAyIDAgMCAwLTEuMS0xLjFhNSA1IDAgMCAwLTEuNzQtLjE0aC0uODFjLS45MiAwLTEuMzggMC0xLjc0LjE0YTIgMiAwIDAgMC0xLjEgMS4xYy0uMTUuMzYtLjE1LjgyLS4xNSAxLjc0di4yM2MwIC43IDAgMS4wNi0uMDkgMS4zNWEyIDIgMCAwIDEtMS4zMiAxLjMyYy0uMjguMS0uNjQuMS0xLjM1LjFzLTEuMDcgMC0xLjM2LS4xYTIgMiAwIDAgMS0xLjMyLTEuMzJjLS4wOS0uMjktLjA5LS42NC0uMDktMS4zNXoiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEuODYgOS42MmMwIDEuMi41NCAyLjIyIDIuNzEgMi4yMmMyLjE4IDAgMy42Ni0yLjIyIDMuNjYtMi4yMnMxLjU1IDIuMjIgMy43MiAyLjIyYzIuMTggMCAzLjg1LTIuMjMgMy44NS0yLjIzczEuMzQgMi4yMyAzLjY1IDIuMjNjMS44IDAgMi42OS0xLjIgMi42OS0yLjJxMC0uMy0uMTUtLjk2Yy0uNTUtMi43LS44My00LjA1LTEuOTMtNC45NXMtMi42LS45LTUuNjItLjlIOS41Yy0yLjk3IDAtNC40NSAwLTUuNTYuOXMtMS4zNyAyLjItMS45MSA0LjgzcS0uMTYuNzEtLjE2IDEuMDZtMTkuMDQgMi4zMnYxLjUzYzAgMy43NyAwIDUuNjYtMS4xNyA2Ljgzcy0zLjA2IDEuMTctNi44MyAxLjE3aC0xLjg3Yy0zLjc3IDAtNS42NSAwLTYuODMtMS4xN3MtMS4xNy0zLjA2LTEuMTctNi44M3YtMS41MyIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0xNS40NCAyMS4yMnYtMi4zYzAtMS4zNiAwLTIuMDQtLjMyLTIuNTRhMiAyIDAgMCAwLS42LS42Yy0uNDktLjMxLTEuMTctLjMxLTIuNTQtLjMxcy0yLjA1IDAtMi41NS4zMmEyIDIgMCAwIDAtLjYuNmMtLjMxLjQ5LS4zMSAxLjE3LS4zMSAyLjU0djIuMjkiIC8+Cgk8L2c+Cjwvc3ZnPgo=",K=t=>({id:t.id,companyId:ac,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:di,updatedAt:di}),ee=(t,o)=>({id:t,nextRuleId:o}),Lo=K({id:"69b262ed-2f08-4f61-90d9-8099f6f56509",name:"Explorar Produtos",action:"widget-base-screen",settings:{body:{logo:"",title:"",eyebrow:"",subtitle:"Preparado para dar um upgrade? 🚀 Escolha uma categoria e descubra nossas novidades!"},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiPgoJCTxwYXRoIGQ9Ik0zLjk3NyA5Ljg0QTIgMiAwIDAgMSA1Ljk3MSA4aDEyLjA1OGEyIDIgMCAwIDEgMS45OTQgMS44NGwuODAzIDEwQTIgMiAwIDAgMSAxOC44MzMgMjJINS4xNjdhMiAyIDAgMCAxLTEuOTkzLTIuMTZ6IiAvPgoJCTxwYXRoIGQ9Ik0xNiAxMVY2YTQgNCAwIDAgMC00LTR2MGE0IDQgMCAwIDAtNCA0djUiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:"OpensTec Store",subtitle:"Tecnologia para sua vida"}}}),So=K({id:"fcecfd31-fc37-4a7f-926c-5180be2e3df3",name:"Acompanhar Pedido",action:"widget-base-screen",settings:{body:{logo:"",title:"",eyebrow:"",subtitle:"Vamos descobrir onde está seu pedido? 📦 Escolha uma opção para continuar."},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0yMS40IDguMzF2Ny42MmEuNS41IDAgMCAxLS43OS40bC0yLjE1LTEuNWEuNS41IDAgMCAwLS41OS4wMWwtMi40NSAxLjg1YS41LjUgMCAwIDAtLjE4LjUzbC42NyAyLjRhLjUuNSAwIDAgMS0uMjQuNTdsLTMuNzggMi4wMmEuNS41IDAgMCAxLS4yMi0uNDRsLjcxLTkuMzVhLjUuNSAwIDAgMSAuMjctLjRsOC4wMi00LjE1YS41LjUgMCAwIDEgLjczLjQ0IiBvcGFjaXR5PSIuMiIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0yMS40MiAxMi4zMnYtMi4xNWMwLTEuNyAwLTIuNTQtLjQtMy4yNHMtMS4xNC0xLjEyLTIuNi0xLjk2TDE1IDIuOTljLTEuNDYtLjg0LTIuMi0xLjI2LTMtMS4yNnMtMS41NC40Mi0zIDEuMjZMNS41OCA0Ljk3Yy0xLjQ2Ljg0LTIuMiAxLjI3LTIuNiAxLjk2Yy0uNC43LS40IDEuNTQtLjQgMy4yNHY0LjRjMCAuOTcgMCAxLjQ1LjEzIDEuODhhMyAzIDAgMCAwIC42NyAxLjE2Yy4zLjMzLjcyLjU3IDEuNTYgMS4wNWw1LjQ4IDMuMTZjLjcuNDEgMS41OC0uMSAxLjU4LS45MU0zLjEyIDcuNTNMMTIgMTIuNDJtMCAwdjguNTVNNy4zIDkuNTd2NC42MW0xMy41OC02LjY1TDEyIDEyLjQyTTcuMyA5LjU3bDkuMTQtNS40Mm00LjA2IDE2LjQ3bDEuODcgMS44NyIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0yMS40IDE4LjEzYTMuMiAzLjIgMCAwIDEtMy4yIDMuMmEzLjIgMy4yIDAgMSAxIDMuMi0zLjIiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:"OpensTec Store",subtitle:"Tecnologia para sua vida"}}}),pi=K({id:"91a443ca-0f26-4249-863b-0bfcb2a376a8",name:"Trocas e devoluções",action:"widget-base-screen",settings:{body:{logo:"",title:"",eyebrow:"",subtitle:"Precisou trocar ou devolver um produto? Sem problemas! Vamos ajudar você."},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9IiMwNTE3NzkiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIj4KCQk8cGF0aCBkPSJNNi42NCA5Ljc4OGEuNzUuNzUgMCAwIDEgLjUzLjkxOGE1IDUgMCAwIDAgNy4zMyA1LjYyNGEuNzUuNzUgMCAxIDEgLjc1IDEuM2E2LjUwMSA2LjUwMSAwIDAgMS05LjUyOS03LjMxMmEuNzUuNzUgMCAwIDEgLjkxOS0uNTNNOC43NSA2LjM3YTYuNSA2LjUgMCAwIDEgOS41MjkgNy4zMTJhLjc1Ljc1IDAgMSAxLTEuNDUtLjM4OEE1LjAwMSA1LjAwMSAwIDAgMCA5LjUgNy42N2EuNzUuNzUgMCAxIDEtLjc1LTEuMyIgLz4KCQk8cGF0aCBkPSJNNS43MiA5LjQ3YS43NS43NSAwIDAgMSAxLjA2IDBsMi41IDIuNWEuNzUuNzUgMCAxIDEtMS4wNiAxLjA2bC0xLjk3LTEuOTdsLTEuOTcgMS45N2EuNzUuNzUgMCAwIDEtMS4wNi0xLjA2em05IDEuNWEuNzUuNzUgMCAwIDEgMS4wNiAwbDEuOTcgMS45N2wxLjk3LTEuOTdhLjc1Ljc1IDAgMSAxIDEuMDYgMS4wNmwtMi41IDIuNWEuNzUuNzUgMCAwIDEtMS4wNiAwbC0yLjUtMi41YS43NS43NSAwIDAgMSAwLTEuMDYiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:"OpensTec Store",subtitle:"Tecnologia para sua vida"}}}),Eo=K({id:"1d846621-3e82-4fad-a3f2-cee80503177a",name:"Suporte",action:"widget-identification-screen",settings:{form:{fields:[]},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xMiAyQzYuNDg2IDIgMiA2LjQ4NiAyIDEydjQuMTQzQzIgMTcuMTY3IDIuODk3IDE4IDQgMThoMWExIDEgMCAwIDAgMS0xdi01LjE0M2ExIDEgMCAwIDAtMS0xaC0uOTA4QzQuNjQ4IDYuOTg3IDcuOTc4IDQgMTIgNHM3LjM1MiAyLjk4NyA3LjkwOCA2Ljg1N0gxOWExIDEgMCAwIDAtMSAxVjE4YzAgMS4xMDMtLjg5NyAyLTIgMmgtMnYtMWgtNHYzaDZjMi4yMDYgMCA0LTEuNzk0IDQtNGMxLjEwMyAwIDItLjgzMyAyLTEuODU3VjEyYzAtNS41MTQtNC40ODYtMTAtMTAtMTAiIC8+Cjwvc3ZnPgo=",title:"OpensTec Stora",subtitle:"Tecnologia para sua vida"}}}),mi=K({id:"f666871a-6cc7-44f8-8e63-e9363d8e85ff",name:"Entregas",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),X=(t,o)=>t==null?"":typeof t=="string"?t:t[o]??t["pt-BR"]??Object.values(t).find(n=>!!n)??"";function Or(){return{maskPhone:i=>{if(!i)return"";let a=i.replace(/\D/g,"");return a.length<=4?a:(a.startsWith("0")&&!a.startsWith("0800")&&a.length>3&&(a=a.replace(/^0+/,"")),a.startsWith("0800")?a.length>11?a:a.replace(/(0800)(\d{0,3})(\d{0,4})/,(s,l,u,c)=>[l,u,c].filter(Boolean).join(" ")):a.length>11?a:a.length<=8?a.replace(/(\d{4})(\d{0,4})/,"$1-$2").replace(/-$/,""):a.length===9?a.replace(/(\d{5})(\d{0,4})/,"$1-$2"):a.length===10?a.replace(/(\d{2})(\d{0,4})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""):a.replace(/(\d{2})(\d{0,5})(\d{0,4})/,"($1) $2-$3").replace(/-$/,""))},maskCnpj:i=>{const a=i.toUpperCase().replace(/[^0-9A-Z]/g,"");let s="";for(const l of a){if(s.length>=14)break;(s.length<12||/\d/.test(l))&&(s+=l)}return s.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")}}const ki=["en-US","es-ES","pt-BR"],Mi=(t,o)=>{const n=t.toLowerCase(),r=o.find(a=>a.toLowerCase()===n);if(r)return r;const i=n.split("-")[0];return o.find(a=>{const s=a.toLowerCase();return s===i||s.startsWith(`${i}-`)})},Pr=t=>{if(!t?.length)return["pt-BR"];const o=t.map(n=>Mi(n,ki)).filter(n=>!!n);return o.length?[...new Set(o)]:["pt-BR"]},Rr=t=>typeof navigator<"u"&&navigator.language?navigator.language:"pt-BR",Hr=(t,o)=>{const n=Pr(t);if(n.length===1)return n[0];const r=Mi(Rr(),n);if(r)return r;for(const i of ki)if(n.includes(i))return i;return n[0]??"pt-BR"};function Ci(){return{}}const no=t=>t.from==="system"||t.from==="operator"||t.from==="contact"?t.from:t.provider?t.provider==="opens"?"operator":"contact":"system",io=t=>{const o=t.attachments?.data;return Array.isArray(o)?o:[]},Me=t=>io(t)[0],Ai=t=>typeof t.caption=="string"?t.caption.trim():"",Fr=t=>t.messageBody?.trim()??"",Ur=t=>{if(!t)return"";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?"":o.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})},Ni=t=>t.type==="document"&&t.filename.toLowerCase().endsWith(".pdf"),Wr=(t,o)=>{const n=o.metadata&&typeof o.metadata=="object"?o.metadata:null,r=t.selectedValue||(typeof n?.selectedValue=="string"?n.selectedValue:void 0),i=t.selectedOption||(typeof n?.selectedOption=="string"?n.selectedOption:void 0),a=t.selectedAt||(typeof n?.selectedAt=="string"?n.selectedAt:void 0);return{selectedValue:r,selectedOption:i,selectedAt:a}},Ct=t=>{const o=t.messageBody;if(!o)return null;try{const n=typeof o=="string"?JSON.parse(o):o;if(!n||!Array.isArray(n.menu))return null;const{selectedValue:r,selectedOption:i,selectedAt:a}=Wr(n,t),l=!!(r||i)||t.canBeInteractedWith===!1;return{description:n.description||"",selectedOption:i,selectedValue:r,selectedAt:a,menu:n.menu.map(u=>{const c=!!(r&&u.value===r||i&&u.label===i);return{...u,selected:c,disabled:l?!0:!!u.disabled}})}}catch{return null}},Yr=(t,o)=>{if(!t||!o)return!1;const n=new Date(t),r=new Date(o);return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())?!1:Math.floor(n.getTime()/6e4)===Math.floor(r.getTime()/6e4)},Gr=t=>!!(t&&t.messageType==="image"&&!Ai(t)),Qr=(t=[])=>{if(!t.length)return[];const o=[];let n=[];const r=()=>{if(n.length){if(n.length===1)o.push(n[0]);else{const i=n[0];o.push({id:typeof i.id=="number"?i.id:void 0,provider:i.provider,recipientId:i.recipientId,from:i.from,messageType:"_grouped_images",messageBody:"",createdAt:i.createdAt,canBeInteractedWith:!1,messages:[...n]})}n=[]}};for(const i of t){if(!Gr(i)){r(),o.push(i);continue}if(!n.length){n.push(i);continue}const a=n[n.length-1];if(a.from===i.from&&Yr(a.createdAt,i.createdAt)){n.push(i);continue}r(),n.push(i)}return r(),o},Zr=t=>t?.data?.length?{data:t.data.map(o=>({...o}))}:null,Jr=t=>t?.map(o=>zo(o)),zo=t=>({...t,from:no(t),caption:t.caption??null,attachments:Zr(t.attachments),...t.messages?{messages:Jr(t.messages)}:{}});class Pe{payload;constructor(o){this.payload=zo(o)}static fromJSON(o){return new Pe(o)}static toJSON(o){return zo(o.payload)}toJSON(){return Pe.toJSON(this)}get from(){return no(this.payload)}get isSystemLike(){return this.from==="system"}get attachments(){return io(this.payload)}get primaryAttachment(){return Me(this.payload)}}const qr=["canBeInteractedWith","recipientId","chatRoomId","companyId","createdAt","provider","metadata","id"],Kr=t=>{const o={};for(const n of qr)t[n]!==void 0&&(o[n]=t[n]);return o},En=(t,o="")=>typeof t=="string"?t:t==null?o:String(t);class on{payload={messageType:"text",messageBody:""};constructor(){}static create(){return new on}withRaw(o){const n=typeof o.caption=="string"||o.caption===null?o.caption:o.caption===void 0?void 0:null;return this.payload={...this.payload,...Kr(o),messageType:En(o.messageType,"text")||"text",messageBody:En(o.messageBody),...n!==void 0?{caption:n}:{}},this}withAttachments(o){return this.payload.attachments=o.length?{data:o.map(n=>({...n}))}:null,this}build(){return Pe.fromJSON({...this.payload,messageType:this.payload.messageType||"text",messageBody:this.payload.messageBody??"",attachments:this.payload.attachments??null})}}const vo=e.ref([]),xo=e.ref([]),Xr=e.ref(""),ea=e.shallowRef([]),ta=e.shallowRef(null),oa=e.ref(!1),na=e.ref(!1),ia=e.ref(!1),ra=e.ref(!1),aa=e.ref(!1),ft=t=>Pe.fromJSON(t).toJSON();function Ti(){const t=a=>{vo.value.push(ft(a))},o=a=>{vo.value=a.map(ft)};return{unreadMessagesCount:e.computed(()=>xo.value.length),isSendingMessage:oa,isErrorLoading:na,attachments:ea,isFinished:ia,isLoading:ra,messages:vo,isTyping:aa,audio:ta,text:Xr,setUnreadMessages:a=>{xo.value=a.map(ft)},addUnreadMessage:a=>{xo.value.push(ft(a))},setMessages:o,addMessage:t}}function Ii(){const t=Ti(),o=Ci();return{chat:t,voice:o}}const bo=e.ref(!1),Ge=e.ref([]),ko=e.ref(void 0),ye=e.ref(void 0),Mo=e.ref(void 0),Vo=e.ref(void 0),Si=t=>!!(t?.logo?.trim()||X(t?.title,"pt-BR").trim()||X(t?.subtitle,"pt-BR").trim()),Dn=t=>{!t||!Si(t)||(Vo.value={...t})},Te=()=>{const t=h=>{const x=new Set(Object.values(h.edges??{}).flatMap(k=>k.map(C=>C.nextRuleId)));return h.rules.find(k=>!x.has(k.id))??h.rules[0]},o=(h,x)=>{const k=new Map(h.rules.map(C=>[C.id,C]));return(h.edges[x]??[]).flatMap(C=>{const E=k.get(C.nextRuleId);return E?[E]:[]})},n=e.computed(()=>new Map((ye.value?.rules??[]).map(h=>[h.id,h]))),r=e.computed(()=>ye.value?t(ye.value):void 0),i=e.computed(()=>{const h=ko.value;return h&&n.value.get(h)||r.value}),a=e.computed(()=>!ye.value||!i.value?[]:o(ye.value,i.value.id)),s=e.computed(()=>{const h=i.value?.settings?.header;return Si(h)?h:Vo.value}),l=e.computed(()=>{const h=Mo.value?.configurations.general;return Array.isArray(h?.languages)&&h.languages.length>0?[...h.languages]:h?.language?[h.language]:["pt-BR"]}),u=e.computed(()=>Hr(l.value)),c=Ii();return{currentRuleId:ko,currentHeader:s,currentRule:i,rootRule:r,workflow:ye,languages:l,language:u,history:Ge,isOpen:bo,config:Mo,edges:a,open:()=>{bo.value=!0},close:()=>{bo.value=!1},setCurrentRuleId:h=>{ko.value=h,Dn(i.value?.settings?.header)},clearHistory:()=>{Ge.value=[]},setWorkflow:h=>{ye.value?.id!==h?.id&&(Vo.value=void 0),ye.value=h,Dn(i.value?.settings?.header)},setConfig:h=>{Mo.value=h},pushHistory:h=>{Ge.value.push(h)},setHistory:h=>{Ge.value=[...h]},popHistory:()=>Ge.value.pop(),...c}},_e=t=>t==="name",Bn=t=>!!t?.trim(),sa=t=>{const o=t.filter(r=>_e(r.name)),n=t.filter(r=>!_e(r.name));return[...o,...n]};function la(t,o){const{maskPhone:n,maskCpf:r}=Or(),{history:i,language:a}=Te(),s=e.ref(0),l=e.ref("forward"),u=e.ref(null),c=e.computed(()=>{const T=e.toValue(t),B=T.settings?.form&&T.settings.form.fields||[];return sa(B)}),p=e.reactive(Object.fromEntries(c.value.map(T=>[T.name,""]))),d=e.computed(()=>c.value[s.value]),g=e.computed(()=>s.value>=c.value.length-1),m=e.computed(()=>i.value.length>0||s.value>0),f=e.computed(()=>l.value==="back"?"step-back":"step-forward");e.watch(s,async()=>{await e.nextTick();const T=u.value;if(!T)return;(T.querySelector(".is-active input")??T.querySelector("input"))?.focus({preventScroll:!0})});const w=e.computed(()=>c.value.every(T=>!T.required||Bn(p[T.name]))),y=T=>{const B=c.value[T];return B?B.required&&!Bn(p[B.name])?!1:T>=c.value.length-1?w.value:!0:w.value},b=e.computed(()=>y(s.value)),v=e.computed(()=>{const T=c.value.find(B=>_e(B.name));return T?p[T.name]?.trim().split(/\s+/)[0]??"":""}),h=T=>{const B=c.value[T],F=v.value,U=c.value.length?`Passo ${T+1} de ${c.value.length}`:"",Y=e.toValue(t),W=T>=c.value.length-1;if(!B){const Ue=a.value;return{eyebrow:U,title:X(Y.settings?.body?.title,Ue)||Y.name||"",subtitle:X(Y.settings?.body?.subtitle,Ue)}}if(_e(B.name))return{eyebrow:U,title:"Como podemos te chamar?",subtitle:"Primeiro, nos diga o seu nome."};const Q=W?F?`Quase lá, ${F}.`:"Quase lá.":F?`Olá, ${F}.`:"Olá.",we=B.required?`Informe seu ${B.label} para continuar.`:`Gostaria de deixar seu ${B.label}?`;return{eyebrow:U,title:Q,subtitle:we}},x=e.computed(()=>h(s.value)),k=T=>T==="email"?"email":T==="phone"?"tel":"text",C=T=>T==="email"?"email":T==="phone"?"call":_e(T)?"person":T==="order"?"receipt":"badge",E=T=>T.required?`${T.label} *`:T.label,I=T=>_e(T.name)?"Seu nome":T.name==="phone"?"Seu telefone":T.name==="email"?"Seu e-mail":T.name==="cpf"?"000.000.000-00":T.placeholder||T.label,A=T=>{if(T==="phone")return n;if(T==="cpf")return r},S=()=>{w.value&&o("submit",{...p})};return{stepTransition:f,currentField:d,canContinue:b,currentStep:s,isLastStep:g,stepIntro:x,fieldHost:u,showBack:m,fields:c,form:p,continueStep:()=>{if(b.value){if(g.value||c.value.length===0)return S();l.value="forward",s.value+=1}},canContinueAt:y,introFor:h,fieldLabel:E,fieldPlaceholder:I,fieldType:k,fieldMask:A,fieldIcon:C,goBack:()=>{if(s.value>0){l.value="back",s.value-=1;return}o("back")}}}function Li(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 ua(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})),a=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:a}}const ca=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:a}=ua("text",o);return(s,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(a)]])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}}),Fe=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n},j=Fe(ca,[["__scopeId","data-v-5fc0fe9d"]]),$=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"),a=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"),s=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-lg":o.roundedTop?"wu-rounded-t-md":o.roundedBottom?"wu-rounded-b-md":""),p=e.computed(()=>o.bgPrimary?"wu-bg-primary":o.bgWhite?"wu-bg-white":""),d=e.computed(()=>o.divisor&&o.col?"wu-divide-y":o.divisor&&o.row?"wu-divide-x":""),g=e.computed(()=>[i.value,a.value,s.value,l.value,r.value,u.value,c.value,p.value,n.value,d.value]);return(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex",g.value])},[e.renderSlot(m.$slots,"default")],2))}}),da={class:"wu-flex wu-flex-col wu-items-stretch wu-w-full wu-cursor-text wu-gap-1","data-testid":"app-form-text-input"},pa=["value","type","placeholder","disabled","maxlength","aria-invalid"],nn=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,a=e.computed(()=>e.useSlots());function s(y){return!!a.value[y]}const l=e.ref(""),u=e.ref(!1);function c(y){if(!r.maskFunction)return y;try{const b=r.maskFunction(y);return typeof b=="string"?b:y}catch{return y}}e.watch(()=>r.modelValue,y=>{if(y==null){l.value="";return}l.value=r.maskFunction?c(y):y},{immediate:!0});const{width:p}=Li(r),d=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":""),g=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"),m=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 w(y){const v=y.target.value;l.value=r.maskFunction?c(v):v,i("update:modelValue",l.value)}return o({focus:u,content:l}),(y,b)=>(e.openBlock(),e.createBlock($,{class:e.normalizeClass([e.unref(p),f.value]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createElementVNode("label",da,[s("default")?(e.openBlock(),e.createBlock(j,{key:0,small:"",gray:"",class:e.normalizeClass([d.value])},{default:e.withCtx(()=>[e.renderSlot(y.$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",[g.value]]),value:l.value,type:t.type,placeholder:t.placeholder,disabled:t.disabled,maxlength:t.maxLength,"aria-invalid":t.invalid?!0:void 0,onInput:w,onFocus:b[0]||(b[0]=v=>u.value=!0),onBlur:b[1]||(b[1]=v=>u.value=!1),onKeyup:b[2]||(b[2]=e.withKeys(v=>i("keyup-enter"),["enter"]))},null,42,pa)]),s("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[m.value]])},[e.renderSlot(y.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});function ma(t){const o=e.computed(()=>t.fit?"wu-h-auto wu-min-h-0":t.small?"!wu-h-8 !wu-min-h-[2rem]":""),n=e.computed(()=>"!wu-text-xs"),r=e.computed(()=>t.fit?"wu-px-3 wu-py-2":t.small?"wu-px-[0.625rem]":"wu-p-[0.9rem]"),i=e.computed(()=>t.fluid?"!wu-w-full":t.fit?"wu-w-fit wu-max-w-full":"wu-w-fit");return{height:o,textSize:n,padding:r,width:i}}const D=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":"wu-material-icons");return(a,s)=>(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(a.$slots,"default")],2))}}),ga=["disabled"],fa={class:"wu-flex wu-items-center wu-justify-center wu-gap-2"},H=e.defineComponent({__name:"app-button",props:{small:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,fit: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(f){return!!n.value[f]}const{height:i,textSize:a,padding:s,width:l}=ma(o),u=e.computed(()=>o.soft?"wu-bg-[var(--wu-action-50)] !wu-text-[var(--wu-action)]":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-[var(--wu-action)] !wu-text-[var(--wu-action-fg)]"),c=e.computed(()=>o.block?"wu-rounded-none":o.round?"wu-rounded-full":"wu-rounded-lg"),p=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":s.value),d=e.computed(()=>o.icon?"wu-justify-center":o.fit?"wu-justify-start wu-text-left":"wu-justify-between"),g=e.computed(()=>o.fit?"wu-leading-snug [overflow-wrap:anywhere]":""),m=e.computed(()=>o.disabled||o.loading?"wu-opacity-50 wu-pointer-events-none":"");return(f,w)=>(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(a),u.value,c.value,e.unref(l),e.unref(i),m.value,p.value,d.value,g.value]]),type:"button",disabled:t.disabled||t.loading,"data-testid":"app-button",onClick:w[0]||(w[0]=y=>f.$emit("click",y))},[e.createElementVNode("div",fa,[t.loading?(e.openBlock(),e.createBlock(D,{key:0,class:"wu-animate-spin wu-flex wu-items-center wu-justify-center",small:"",outlined:""},{default:e.withCtx(()=>[...w[1]||(w[1]=[e.createTextVNode("progress_activity",-1)])]),_:1})):r("icon")?(e.openBlock(),e.createBlock(D,{key:1,small:""},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),!t.loading&&r("default")?(e.openBlock(),e.createBlock(j,{key:2,class:"!wu-text-inherit",small:""},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default")]),_:3})):e.createCommentVNode("",!0)]),!t.loading&&r("trailing")?(e.openBlock(),e.createBlock(D,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"trailing")]),_:3})):e.createCommentVNode("",!0)],10,ga))}}),ha=["aria-hidden"],wa=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,a=e.useSlots(),s=e.ref(null),l=e.ref(null),u=e.ref(0),c=e.ref(0),p=e.ref(!1);let d=null;const g=e.computed(()=>Math.max(r.modelValue,0)),m=()=>(a.default?.()??[]).flatMap(I=>I.type===e.Comment||I.type===e.Text?[]:I.type===e.Fragment?(I.children??[]).filter(A=>!!A&&typeof A=="object"&&A.type!==e.Comment&&A.type!==e.Text):[I]),f=I=>{const A=Math.abs(I-g.value);return A===0?"is-active":A===1?"is-adjacent":"is-far"},w=I=>{const A=l.value?.childElementCount||m().length,S=Math.min(Math.max(I,0),Math.max(A-1,0));S!==r.modelValue&&i("update:modelValue",S)},y=()=>{const I=s.value;I&&(I.scrollLeft&&(I.scrollLeft=0),I.scrollTop&&(I.scrollTop=0))},b=(I,A)=>{const S=getComputedStyle(I)[A].trim(),V=parseFloat(S);if(!Number.isFinite(V)||V<=0)return 0;if(S.endsWith("%")){const P=A==="scrollPaddingTop"?I.clientHeight:I.clientWidth;return V/100*P}return V},v=()=>{const I=s.value,A=l.value;if(!I||!A)return;y();const S=[...A.children],V=parseFloat(getComputedStyle(A).gap)||0,P=r.vertical?"scrollPaddingTop":"scrollPaddingLeft",T=b(I,P),B=W=>r.vertical?W.offsetHeight:W.offsetWidth,F=S[g.value]?B(S[g.value]):0,U=r.vertical&&r.fill?Math.max((I.clientHeight-F)/2,0):T,Y=S.slice(0,g.value).reduce((W,Q)=>W+B(Q)+V,0);u.value=U-Y,c.value=r.vertical&&!r.fill?F+T*2:0,p.value=!0},h=()=>{d?.disconnect();const I=s.value,A=l.value;if(!(!I||!A)&&(v(),!(typeof ResizeObserver>"u"))){if(d=new ResizeObserver(v),d.observe(I),r.vertical)for(const S of A.children)d.observe(S);I.removeEventListener("scroll",y),I.addEventListener("scroll",y,{passive:!0})}},x=e.computed(()=>[r.vertical?"wu-carousel--vertical":"wu-carousel--horizontal",{"is-ready":p.value,"wu-carousel--fill":r.fill}]),k=e.computed(()=>r.vertical?"wu-flex-col wu-items-stretch":"wu-flex-row wu-items-center"),C=e.computed(()=>{if(!(!r.vertical||r.fill||!c.value))return{height:`${c.value}px`}}),E=e.computed(()=>{const I=`${u.value}px`;return{transform:r.vertical?`translate3d(0, ${I}, 0)`:`translate3d(${I}, 0, 0)`}});return e.watch(()=>[r.vertical,r.fill,r.modelValue],async()=>{await e.nextTick(),h()}),e.onMounted(async()=>{await e.nextTick(),h()}),e.onBeforeUnmount(()=>{d?.disconnect(),s.value?.removeEventListener("scroll",y)}),o({next:()=>w(g.value+1),prev:()=>w(g.value-1),goTo:w}),(I,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-relative wu-w-full wu-overflow-hidden",x.value]),ref_key:"rootRef",ref:s,"data-testid":"app-carousel",style:e.normalizeStyle(C.value)},[e.createElementVNode("div",{class:e.normalizeClass(["wu-carousel-track wu-flex",k.value]),ref_key:"trackRef",ref:l,style:e.normalizeStyle(E.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(),(S,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-carousel-slide",f(V)]),key:S.key??V,"aria-hidden":V!==g.value,"data-testid":"app-carousel-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S)))],10,ha))),128))],6)],6))}}),ro=Fe(wa,[["__scopeId","data-v-96f06600"]]),ya={class:"wu-flex wu-flex-col wu-w-full wu-h-full"},va={class:"wu-relative wu-flex wu-items-center wu-w-full wu-shrink-0"},xa={class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},ba={class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-pointer-events-none"},ka={class:"wu-flex wu-items-center wu-gap-1.5"},rn=e.defineComponent({__name:"app-identification-page",props:{rule:{},edges:{}},emits:["submit","back"],setup(t,{emit:o}){const n=t,r=o,{currentStep:i,fieldHost:a,showBack:s,fields:l,form:u,continueStep:c,canContinueAt:p,introFor:d,fieldPlaceholder:g,fieldType:m,fieldMask:f,goBack:w}=la(()=>n.rule,r);return(y,b)=>(e.openBlock(),e.createElementBlock("div",ya,[e.createElementVNode("div",va,[e.createElementVNode("div",xa,[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(s)}]),onClick:b[0]||(b[0]=(...v)=>e.unref(w)&&e.unref(w)(...v))},[e.createVNode(D,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...b[2]||(b[2]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(j,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200","extra-small":"",medium:"",gray:""},{default:e.withCtx(()=>[...b[3]||(b[3]=[e.createTextVNode("Voltar",-1)])]),_:1})],2)]),e.createElementVNode("div",ba,[e.createElementVNode("div",ka,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(v,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-h-1 wu-w-6 wu-rounded-full wu-transition-colors",h<=e.unref(i)?"wu-bg-gray-900 dark:wu-bg-white":"wu-bg-gray-200 dark:wu-bg-neutral-600"]),key:h},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:a},[e.createVNode(ro,{class:"wu-w-full wu-h-full",modelValue:e.unref(i),"onUpdate:modelValue":b[1]||(b[1]=v=>e.isRef(i)?i.value=v:null),vertical:"",fill:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(v,h)=>(e.openBlock(),e.createBlock($,{class:"wu-w-full wu-gap-8",key:v.name,col:"",center:""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-full wu-relative wu-pr-6",col:"","gap-sm":""},{default:e.withCtx(()=>[e.unref(d)(h).title?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-text-left","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(h).title),1)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(d)(h).subtitle?(e.openBlock(),e.createBlock(j,{key:1,class:"wu-text-left",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)(h).subtitle),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(j,{class:"wu-opacity-50 wu-absolute -wu-top-2 wu-right-0",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h+1),1)]),_:2},1024)]),_:2},1024),e.createVNode($,{class:"wu-w-full wu-items-center",col:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(nn,{modelValue:e.unref(u)[v.name],"onUpdate:modelValue":x=>e.unref(u)[v.name]=x,"mask-function":e.unref(f)(v.name),placeholder:e.unref(g)(v),type:e.unref(m)(v.name),onKeyupEnter:e.unref(c),fluid:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","mask-function","placeholder","type","onKeyupEnter"]),e.createVNode(H,{fluid:"",disabled:!e.unref(p)(h),onClick:e.unref(c)},{trailing:e.withCtx(()=>[...b[4]||(b[4]=[e.createTextVNode("arrow_forward",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h>=e.unref(l).length-1?"Finalizar":"Continuar"),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])],512)]))}}),Ma=["disabled"],Ca=["src"],an=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-primary !wu-text-[var(--wu-primary-fg)]"),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"),a=e.computed(()=>o.small?"wu-w-6 wu-h-6":o.large?"wu-w-8 wu-h-8":"wu-w-7 wu-h-7"),s=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,s.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(D,{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",a.value]),src:t.logo,alt:"","data-testid":"app-anchor-logo"},null,10,Ca)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(j,{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,Ma))}}),Aa="widgets",Na={"widget-identification-screen":"assignment","widget-base-screen":"desktop_windows","widget-article-screen":"description","widget-service-screen":"chat"},jn={chat:"chat",voice:"phone_in_talk"},Ta=t=>{if(t.action==="widget-service-screen"){const o=t.settings?.behavior;if(o&&o in jn)return jn[o]}return Na[t.action]??Aa},Ia={key:0,class:"wu-flex wu-flex-col wu-items-center wu-gap-2","data-testid":"app-edge"},Sa=["src"],La={key:1,class:"wu-w-full wu-max-w-[25rem]","data-testid":"app-edge"},Ea=["src"],zn="!wu-text-[var(--wu-action-ink)]",Re=e.defineComponent({__name:"app-edge",props:{edge:{},icon:{type:Boolean}},emits:["click"],setup(t,{emit:o}){const n=t,r=o,{language:i}=Te(),a=e.computed(()=>n.edge.settings?.header?.logo),s=e.computed(()=>Ta(n.edge)),l=e.computed(()=>X(n.edge.settings?.label,i.value).trim());return(u,c)=>t.icon?(e.openBlock(),e.createElementBlock("div",Ia,[e.createVNode(H,{outline:"",icon:"",onClick:c[0]||(c[0]=p=>r("click",t.edge))},{icon:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-5 wu-h-5 wu-object-contain",src:a.value,alt:""},null,8,Sa)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(zn)},e.toDisplayString(s.value),1))]),_:1}),e.createVNode(j,{class:"wu-w-20 wu-text-center wu-leading-3 wu-line-clamp-2","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",La,[e.createVNode(H,{class:"hover:wu-translate-x-1",outline:"",fluid:"",onClick:c[1]||(c[1]=p=>r("click",t.edge))},{icon:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-4 wu-h-4 wu-object-contain",src:a.value,alt:""},null,8,Ea)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(zn)},e.toDisplayString(s.value),1))]),trailing:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})]))}}),Da={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},Ba={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},ja=["innerHTML"],za={key:2,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},Va=e.defineComponent({__name:"app-article-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i,language:a}=Te(),s=e.computed(()=>i.value.length>0),l=e.computed(()=>n.edges??[]),u=e.computed(()=>l.value.slice(0,3)),c=e.computed(()=>l.value.slice(3)),p=e.computed(()=>n.rule.settings?.body),d=e.computed(()=>X(p.value?.content,a.value));return(g,m)=>(e.openBlock(),e.createElementBlock("div",Da,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ba)),d.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"wu-px-6 wu-w-full wu-article-content wu-font-primary wu-text-neutral wu-overflow-x-auto dark:wu-text-neutral-200","data-testid":"app-article-content",innerHTML:d.value},null,8,ja)):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,f=>(e.openBlock(),e.createBlock(Re,{key:f.id,edge:f,onClick:m[0]||(m[0]=w=>r("edge-click",w))},null,8,["edge"]))),128)),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":c.value.length>4,"wu-justify-center":c.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,f=>(e.openBlock(),e.createBlock(Re,{key:f.id,edge:f,icon:"",onClick:m[1]||(m[1]=w=>r("edge-click",w))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),m[2]||(m[2]=e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},null,-1))]))}}),sn=Fe(Va,[["__scopeId","data-v-e558a3fb"]]),_a=120,$a=()=>typeof MediaRecorder>"u"?"audio/webm":MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"audio/webm",Oa=t=>t.includes("mp4")?"m4a":"webm",Vn=t=>t.toString().padStart(2,"0");function Pa(){const t=e.ref(!1),o=e.ref(0),n=e.ref(null);let r=null,i=null,a=[],s=null,l="audio/webm",u=!1,c=null;const p=e.computed(()=>{const v=Math.floor(o.value/60),h=o.value%60;return`${Vn(v)}:${Vn(h)}`}),d=()=>{s&&(clearInterval(s),s=null)},g=()=>{i?.getTracks().forEach(v=>v.stop()),i=null},m=()=>{d(),g(),r=null,a=[],o.value=0,t.value=!1},f=()=>{if(!a.length)return null;const v=l.split(";")[0]||"audio/webm",h=new Blob(a,{type:v});return new File([h],`recording.${Oa(v)}`,{type:v})},w=async()=>{if(n.value=null,typeof navigator>"u"||!navigator.mediaDevices?.getUserMedia)return n.value="Gravação de áudio não é suportada neste navegador",!1;try{return i=await navigator.mediaDevices.getUserMedia({audio:!0}),l=$a(),a=[],r=new MediaRecorder(i,{mimeType:l}),r.ondataavailable=v=>{v.data.size>0&&a.push(v.data)},r.onstop=()=>{const v=u?null:f(),h=c;c=null,u=!1,m(),h?.(v)},r.start(),t.value=!0,o.value=0,s=setInterval(()=>{o.value+=1,o.value>=_a&&y()},1e3),!0}catch{return m(),n.value="Não foi possível acessar o microfone",!1}},y=()=>!r||r.state==="inactive"?(m(),Promise.resolve(null)):(d(),t.value=!1,new Promise(v=>{c=v,r?.stop(),g()})),b=async()=>{u=!0,a=[],await y()};return e.onUnmounted(()=>{b()}),{formattedDuration:p,durationSeconds:o,isRecording:t,error:n,cancel:b,start:w,stop:y}}const Ra=["src","alt"],Ha=["src"],Fa=["src"],Ua=["title"],ao=e.defineComponent({__name:"app-media-preview",props:{open:{type:Boolean},items:{},index:{}},emits:["close","update:index"],setup(t,{emit:o}){const n=t,r=o,i=e.computed({get:()=>n.index??0,set:g=>r("update:index",g)}),a=e.computed(()=>i.value>0),s=e.computed(()=>i.value<n.items.length-1),l=e.computed(()=>n.items.length>1),u=()=>r("close"),c=()=>{a.value&&(i.value-=1)},p=()=>{s.value&&(i.value+=1)},d=g=>{n.open&&(g.key==="Escape"&&u(),g.key==="ArrowLeft"&&c(),g.key==="ArrowRight"&&p())};return e.watch(()=>n.open,g=>{g?window.addEventListener("keydown",d):window.removeEventListener("keydown",d)}),e.onBeforeUnmount(()=>{window.removeEventListener("keydown",d)}),(g,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.open&&t.items.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"wu-fixed wu-inset-0 wu-flex wu-items-center wu-justify-center wu-overflow-hidden wu-bg-black wu-bg-opacity-90 wu-z-[100000]","data-testid":"app-media-preview",onClick:u},[e.createElementVNode("button",{class:"wu-absolute wu-top-4 wu-right-4 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-close",onClick:e.withModifiers(u,["stop"])},[e.createVNode(D,{light:""},{default:e.withCtx(()=>[...m[2]||(m[2]=[e.createTextVNode("close",-1)])]),_:1})]),l.value&&a.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"wu-absolute wu-left-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-prev",onClick:e.withModifiers(c,["stop"])},[e.createVNode(D,{light:""},{default:e.withCtx(()=>[...m[3]||(m[3]=[e.createTextVNode("chevron_left",-1)])]),_:1})])):e.createCommentVNode("",!0),l.value&&s.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:"wu-absolute wu-right-4 wu-z-10 wu-flex wu-items-center wu-justify-center wu-w-10 wu-h-10 wu-rounded-full wu-bg-black wu-bg-opacity-50 wu-border-0 wu-cursor-pointer",type:"button","data-testid":"app-media-preview-next",onClick:e.withModifiers(p,["stop"])},[e.createVNode(D,{light:""},{default:e.withCtx(()=>[...m[4]||(m[4]=[e.createTextVNode("chevron_right",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",onClick:m[1]||(m[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(ro,{class:"wu-w-full",modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=f=>i.value=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-3",key:`${f.src}-${w}`},[f.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:f.src,alt:f.filename||"Imagem"},null,8,Ra)):f.type==="video"?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-rounded wu-object-contain wu-w-full wu-max-h-[80vh]",src:f.src,controls:""},null,8,Ha)):f.type==="pdf"?(e.openBlock(),e.createElementBlock("iframe",{key:2,class:"wu-bg-white wu-rounded wu-w-full wu-h-[85vh]",src:f.src,frameborder:"0"},null,8,Fa)):e.createCommentVNode("",!0),f.filename?(e.openBlock(),e.createElementBlock("p",{key:3,class:"wu-text-white wu-text-xs wu-opacity-75 wu-truncate wu-max-w-full",title:f.filename},e.toDisplayString(f.filename),9,Ua)):e.createCommentVNode("",!0)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0)]))}}),Wa=["onClick"],Ya=["src","alt"],Ga={key:1,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},Qa={key:2,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},Za={class:"wu-text-white wu-text-lg wu-font-semibold"},Ja=e.defineComponent({__name:"app-message-grouped-images",props:{message:{}},setup(t){const o=t,n=e.computed(()=>o.message.messages||[]),r=e.computed(()=>n.value.slice(0,4)),i=e.computed(()=>Math.max(0,n.value.length-4)),a=p=>Me(p)?.link||"",s=e.ref(!1),l=e.ref(0),u=e.computed(()=>{const p=[];for(const d of n.value){const g=Me(d);g?.link&&p.push({src:g.link,type:"image",filename:g.filename})}return p}),c=p=>{u.value.length&&(l.value=Math.min(p,u.value.length-1),s.value=!0)};return(p,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden wu-min-w-[12rem]",r.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"]),"data-testid":"app-message-grouped-images"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(g,m)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:g.id??m,onClick:f=>c(m)},[a(g)?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:a(g),alt:e.unref(Me)(g)?.filename||"Imagem"},null,8,Ya)):(e.openBlock(),e.createElementBlock("div",Ga,[e.createVNode(D,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("image",-1)])]),_:1})])),m===r.value.length-1&&i.value>0?(e.openBlock(),e.createElementBlock("div",Qa,[e.createElementVNode("span",Za,e.toDisplayString(`+${i.value}`),1)])):e.createCommentVNode("",!0)],8,Wa))),128)),e.createVNode(ao,{open:s.value,items:u.value,index:l.value,onClose:d[0]||(d[0]=g=>s.value=!1),"onUpdate:index":d[1]||(d[1]=g=>l.value=g)},null,8,["open","items","index"])],2))}}),qa=["disabled"],pt=e.defineComponent({__name:"app-audio-player",props:{src:{},file:{}},setup(t){const o=t,n=e.ref(null),r=e.ref(!1),i=e.ref(0),a=e.ref(0),s=e.ref(1),l=e.ref(null),u=A=>Math.floor(A).toString().padStart(2,"0"),c=A=>{if(!Number.isFinite(A)||A<0)return"00:00";const S=Math.floor(A/60),V=Math.floor(A%60);return`${u(S)}:${u(V)}`},p=e.computed(()=>!a.value||!Number.isFinite(a.value)?0:Math.min(100,i.value/a.value*100)),d=e.computed(()=>Number.isFinite(a.value)&&a.value>0),g=e.computed(()=>`${c(i.value)} / ${c(a.value)}`),m=()=>{l.value&&(URL.revokeObjectURL(l.value),l.value=null)},f=()=>{if(m(),o.src)return o.src;if(o.file)return l.value=URL.createObjectURL(e.toRaw(o.file)),l.value},w=()=>{a.value=n.value?.duration||0},y=()=>{i.value=n.value?.currentTime||0},b=()=>{r.value=!1,i.value=0,n.value&&(n.value.currentTime=0)},v=()=>{n.value&&(n.value.pause(),n.value.removeEventListener("loadedmetadata",w),n.value.removeEventListener("timeupdate",y),n.value.removeEventListener("ended",b),n.value=null,r.value=!1,i.value=0,a.value=0)},h=()=>{v();const A=f();if(!A)return;const S=new Audio(A);S.addEventListener("loadedmetadata",w),S.addEventListener("timeupdate",y),S.addEventListener("ended",b),S.playbackRate=s.value,n.value=S},x=async()=>{!n.value||!d.value||(await n.value.play(),r.value=!0)},k=()=>{n.value&&(n.value.pause(),r.value=!1)},C=()=>{r.value?k():x()},E=A=>{if(!n.value||!d.value)return;const V=A.currentTarget.getBoundingClientRect(),P=Math.min(1,Math.max(0,(A.clientX-V.left)/V.width));n.value.currentTime=P*a.value,i.value=n.value.currentTime},I=()=>{s.value=Math.max(1,(s.value+.5)%2.5),n.value&&(n.value.playbackRate=s.value)};return e.watch(()=>[o.src,o.file],()=>h(),{immediate:!0}),e.onBeforeUnmount(()=>{v(),m()}),(A,S)=>(e.openBlock(),e.createBlock($,{class:"wu-w-full wu-min-w-0 wu-items-center","data-testid":"app-audio-player","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(H,{"data-testid":"app-audio-player-toggle",onClick:C,disabled:!d.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value?"pause":"play_arrow"),1)]),_:1})]),_:1},8,["disabled"]),e.createVNode($,{class:"wu-flex-1 wu-min-w-0",col:"","gap-xs":""},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"wu-relative wu-w-full wu-rounded-full wu-cursor-pointer wu-h-1.5 wu-bg-gray-400 dark:wu-bg-neutral-500 disabled:wu-cursor-default",type:"button","data-testid":"app-audio-player-seek",disabled:!d.value,onClick:E},[e.createElementVNode("div",{class:"wu-absolute wu-left-0 wu-top-0 wu-bottom-0 wu-rounded-full wu-bg-primary wu-transition-all",style:e.normalizeStyle({width:`${p.value}%`})},null,4),e.createElementVNode("div",{class:"wu-absolute wu-w-2 wu-h-2 wu-rounded-full wu-bg-primary wu-shrink-0 wu-transition-all -wu-translate-x-1/2 -wu-translate-y-1/2 wu-top-1/2",style:e.normalizeStyle({left:`${p.value}%`})},null,4)],8,qa),e.createVNode(j,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value),1)]),_:1})]),_:1}),e.createVNode(H,{"data-testid":"app-audio-player-speed",onClick:I,disabled:!d.value,ghost:"",small:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value)+"x",1)]),_:1},8,["disabled"])]),_:1}))}}),Ka={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-attachments"},Xa=["innerHTML"],es=["onClick"],ts=["src","alt"],os=["src"],ns={key:2,class:"wu-flex wu-items-center wu-justify-center wu-w-full wu-h-full"},is={key:3,class:"wu-absolute wu-inset-0 wu-flex wu-items-center wu-justify-center wu-bg-black wu-bg-opacity-50"},rs={class:"wu-text-white wu-text-lg wu-font-semibold"},as={key:0,class:"wu-flex-1 wu-min-w-0"},ss=e.defineComponent({__name:"app-message-attachments",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>io(n.message)),a=e.computed(()=>i.value.filter(h=>h.type==="image"||h.type==="video")),s=e.computed(()=>i.value.filter(h=>h.type!=="image"&&h.type!=="video")),l=e.computed(()=>a.value.slice(0,4)),u=e.computed(()=>Math.max(0,a.value.length-4)),c=e.computed(()=>Fr(n.message)),p=e.computed(()=>Ai(n.message)),d=e.computed(()=>!!(l.value.length||s.value.length)),g=e.ref(!1),m=e.ref(0),f=e.ref([]),w=h=>{f.value=a.value.filter(x=>x.link).map(x=>({src:x.link,type:x.type==="video"?"video":"image",filename:x.filename})),f.value.length&&(m.value=Math.min(h,f.value.length-1),g.value=!0)},y=h=>{h.link&&(f.value=[{src:h.link,type:"pdf",filename:h.filename}],m.value=0,g.value=!0)},b=()=>{g.value=!1,f.value=[]},v=h=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:h})};return(h,x)=>(e.openBlock(),e.createElementBlock("div",Ka,[c.value?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-whitespace-pre-wrap","data-testid":"app-message-attachments-body",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:c.value},null,8,Xa)]),_:1})):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["wu-grid wu-gap-1 wu-rounded wu-overflow-hidden",l.value.length===1?"wu-grid-cols-1":"wu-grid-cols-2"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(k,C)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-aspect-square wu-bg-gray-100 wu-cursor-pointer dark:wu-bg-neutral-800",key:k.id,onClick:E=>w(C)},[k.type==="image"&&k.link?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-h-full wu-object-cover",src:k.link,alt:k.filename},null,8,ts)):k.type==="video"&&k.link?(e.openBlock(),e.createElementBlock("video",{key:1,class:"wu-w-full wu-h-full wu-object-cover",src:k.link,preload:"metadata"},null,8,os)):(e.openBlock(),e.createElementBlock("div",ns,[e.createVNode(D,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.type==="video"?"videocam":"image"),1)]),_:2},1024)])),C===l.value.length-1&&u.value>0?(e.openBlock(),e.createElementBlock("div",is,[e.createElementVNode("span",rs,e.toDisplayString(`+${u.value}`),1)])):e.createCommentVNode("",!0),e.createVNode(H,{class:"wu-absolute wu-bottom-1 wu-right-1 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(E=>v(k),["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(D,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...x[1]||(x[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])],8,es))),128))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,k=>(e.openBlock(),e.createBlock($,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800",key:k.id,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(D,{gray:"",large:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.type==="audio"?"mic":"file_present"),1)]),_:2},1024)]),_:2},1024),k.type==="audio"&&k.link?(e.openBlock(),e.createElementBlock("div",as,[e.createVNode(pt,{src:k.link},null,8,["src"])])):(e.openBlock(),e.createBlock(j,{key:1,class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",title:k.filename,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.filename),1)]),_:2},1032,["title"])),e.unref(Ni)(k)?(e.openBlock(),e.createBlock(H,{key:2,onClick:C=>y(k),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...x[2]||(x[2]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(H,{onClick:C=>v(k),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...x[3]||(x[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024))),128)),p.value&&d.value?(e.openBlock(),e.createBlock(j,{key:2,class:"wu-whitespace-pre-wrap","data-testid":"app-message-attachments-caption",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(ao,{open:g.value,items:f.value,index:m.value,onClose:b,"onUpdate:index":x[0]||(x[0]=k=>m.value=k)},null,8,["open","items","index"])]))}}),ls={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary"},us=["disabled","onClick"],cs=e.defineComponent({__name:"app-message-interactive",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(Ct(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{i.value=Ct(n.message)});const a=e.computed(()=>!!(n.message.canBeInteractedWith&&i.value)),s=l=>{a.value&&(l.disabled||l.selected||(r("chat-service-message-action",{action:"select-option",message:n.message,option:l}),i.value&&(i.value={...i.value,selectedOption:l.label,selectedValue:l.value,selectedAt:new Date().toISOString(),menu:i.value.menu.map(u=>({...u,selected:u.value===l.value,disabled:!0}))})))};return(l,u)=>i.value?(e.openBlock(),e.createBlock($,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-interactive"},{default:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createVNode(j,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.description),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.menu,(c,p)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${c.value}-${p}`,type:"button",disabled:!a.value||c.disabled,onClick:d=>s(c)},[e.createVNode($,{class:"wu-items-start wu-flex-1 wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(j,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1024),c.description?(e.openBlock(),e.createBlock(j,{key:0,"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.description),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(D,{class:e.normalizeClass(c.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,us))),128))]),_:1})):e.createCommentVNode("",!0)}}),ds={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[14rem]","data-testid":"app-message-document"},ps=e.defineComponent({__name:"app-message-document",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>Me(n.message)),a=e.computed(()=>i.value?.filename||n.message.messageBody||"Documento"),s=e.computed(()=>!!(i.value?.link&&Ni(i.value))),l=e.ref(!1),u=e.computed(()=>!s.value||!i.value?.link?[]:[{src:i.value.link,type:"pdf",filename:i.value.filename}]),c=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(p,d)=>(e.openBlock(),e.createElementBlock("div",ds,[e.createVNode($,{class:"wu-items-center wu-bg-white dark:wu-bg-neutral-800","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-8 wu-h-8 wu-bg-gray-200 wu-shrink-0 dark:wu-bg-neutral-700",center:"",rounded:""},{default:e.withCtx(()=>[e.createVNode(D,{gray:"",large:""},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1}),e.createVNode(j,{class:"wu-flex-1 wu-min-w-0 [overflow-wrap:anywhere]",title:a.value,semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1},8,["title"]),s.value?(e.openBlock(),e.createBlock(H,{key:0,onClick:d[0]||(d[0]=g=>l.value=!0),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("visibility",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(H,{onClick:c,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}),t.message.caption?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-whitespace-pre-wrap",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(ao,{open:l.value,items:u.value,index:0,onClose:d[1]||(d[1]=g=>l.value=!1)},null,8,["open","items"])]))}}),ms={class:"wu-w-full wu-px-3 wu-py-2 wu-bg-primary"},gs=["disabled","onClick"],fs=e.defineComponent({__name:"app-message-survey",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.ref(Ct(n.message));e.watch(()=>[n.message.messageBody,n.message.metadata,n.message.canBeInteractedWith],()=>{i.value=Ct(n.message)});const a=e.computed(()=>!!(n.message.canBeInteractedWith&&i.value)),s=e.computed(()=>!!i.value?.menu.some(u=>u.selected)),l=u=>{a.value&&(u.disabled||u.selected||(r("chat-service-message-action",{action:"select-survey",message:n.message,option:u}),i.value&&(i.value={...i.value,menu:i.value.menu.map(c=>({...c,selected:c.value===u.value,disabled:!0}))})))};return(u,c)=>i.value?(e.openBlock(),e.createBlock($,{key:0,class:"wu-w-full wu-overflow-hidden wu-bg-white wu-min-w-[14rem] dark:wu-bg-neutral-800",col:"","gap-none":"",rounded:"",border:"","data-testid":"app-message-survey"},{default:e.withCtx(()=>[e.createElementVNode("div",ms,[e.createVNode(j,{class:"!wu-text-[var(--wu-primary-fg)]",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.description),1)]),_:1})]),a.value&&!s.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value.menu,(p,d)=>(e.openBlock(),e.createElementBlock("button",{class:"wu-flex wu-w-full wu-items-center wu-justify-between wu-gap-2 wu-px-3 wu-py-3 wu-text-left wu-bg-transparent wu-border-0 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700 disabled:wu-opacity-50",key:`${p.value}-${d}`,type:"button",disabled:p.disabled,onClick:g=>l(p)},[e.createVNode(j,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.label),1)]),_:2},1024),e.createVNode(D,{class:e.normalizeClass(p.selected?"wu-text-green-500":""),gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.selected?"check_circle":"radio_button_unchecked"),1)]),_:2},1032,["class"])],8,gs))),128)):(e.openBlock(),e.createBlock($,{key:1,class:"wu-items-center wu-justify-center wu-px-3 wu-py-3 wu-border-t wu-border-gray-100 dark:wu-border-neutral-700","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(j,{small:"",gray:""},{default:e.withCtx(()=>[...c[0]||(c[0]=[e.createTextVNode("Pesquisa de satisfação já respondida",-1)])]),_:1}),e.createVNode(D,{class:"wu-text-green-500"},{default:e.withCtx(()=>[...c[1]||(c[1]=[e.createTextVNode("check_circle",-1)])]),_:1})]),_:1}))]),_:1})):e.createCommentVNode("",!0)}}),_o=e.defineComponent({__name:"app-message-audio",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>Me(n.message)),a=e.computed(()=>i.value?.link||""),s=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(l,u)=>(e.openBlock(),e.createBlock($,{class:"wu-items-center wu-min-w-[14rem]","gap-sm":"","data-testid":"app-message-audio"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createBlock(pt,{key:0,class:"wu-flex-1",src:a.value},null,8,["src"])):(e.openBlock(),e.createBlock($,{key:1,class:"wu-items-center wu-justify-center wu-h-10 wu-flex-1 wu-rounded wu-bg-gray-100 dark:wu-bg-neutral-800"},{default:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1})),e.createVNode(H,{onClick:s,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),_:1}))}}),hs={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[10rem]","data-testid":"app-message-image"},ws={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-gray-100 dark:wu-bg-neutral-800"},ys=["src","alt"],vs={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},xs=e.defineComponent({__name:"app-message-image",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>Me(n.message)),a=e.computed(()=>i.value?.link||""),s=e.ref(!1),l=e.computed(()=>a.value?[{src:a.value,type:"image",filename:i.value?.filename}]:[]),u=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(c,p)=>(e.openBlock(),e.createElementBlock("div",hs,[e.createElementVNode("div",ws,[a.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-full wu-max-h-64 wu-object-cover wu-cursor-pointer",src:a.value,alt:i.value?.filename||t.message.caption||"Imagem",onClick:p[0]||(p[0]=d=>s.value=!0)},null,8,ys)):(e.openBlock(),e.createElementBlock("div",vs,[e.createVNode(D,{gray:"",large:""},{default:e.withCtx(()=>[...p[2]||(p[2]=[e.createTextVNode("image",-1)])]),_:1})])),e.createVNode(H,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:e.withModifiers(u,["stop"]),ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(D,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...p[3]||(p[3]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(j,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(ao,{open:s.value,items:l.value,index:0,onClose:p[1]||(p[1]=d=>s.value=!1)},null,8,["open","items"])]))}}),bs={class:"wu-flex wu-flex-col wu-gap-2 wu-min-w-[12rem]","data-testid":"app-message-video"},ks={class:"wu-relative wu-rounded wu-overflow-hidden wu-bg-black"},Ms=["src"],Cs={key:1,class:"wu-flex wu-items-center wu-justify-center wu-h-32"},As=e.defineComponent({__name:"app-message-video",props:{message:{}},emits:["chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>Me(n.message)),a=e.computed(()=>i.value?.link||""),s=()=>{r("chat-service-message-action",{action:"download",message:n.message,attachment:i.value})};return(l,u)=>(e.openBlock(),e.createElementBlock("div",bs,[e.createElementVNode("div",ks,[a.value?(e.openBlock(),e.createElementBlock("video",{key:0,class:"wu-w-full wu-max-h-64",src:a.value,controls:"",preload:"metadata"},null,8,Ms)):(e.openBlock(),e.createElementBlock("div",Cs,[e.createVNode(D,{gray:"",large:""},{default:e.withCtx(()=>[...u[0]||(u[0]=[e.createTextVNode("videocam",-1)])]),_:1})])),e.createVNode(H,{class:"wu-absolute wu-bottom-2 wu-right-2 !wu-bg-black/55 hover:!wu-bg-black/75 !wu-text-white !wu-border-0",onClick:s,ghost:"",small:"",icon:"",round:""},{icon:e.withCtx(()=>[e.createVNode(D,{class:"!wu-text-white dark:!wu-text-white"},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("download",-1)])]),_:1})]),_:1})]),t.message.caption?(e.openBlock(),e.createBlock(j,{key:0,gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.message.caption),1)]),_:1})):e.createCommentVNode("",!0)]))}}),Ns=["href"],Ts=["src","alt"],Is={class:"wu-flex wu-min-w-0 wu-flex-1 wu-flex-col wu-items-start wu-overflow-hidden wu-pr-4 wu-gap-0.5"},Ss={class:"wu-truncate"},Ls=e.defineComponent({__name:"app-message-link-preview",props:{preview:{}},setup(t){const o=t,n=e.ref(!1),r=e.computed(()=>o.preview.url||"#"),i=e.computed(()=>o.preview.images?.[0]||o.preview.favicons?.[0]||""),a=e.computed(()=>!n.value&&!!o.preview.title);return(s,l)=>a.value?(e.openBlock(),e.createElementBlock("a",{key:0,class:"wu-relative wu-flex wu-items-center wu-gap-2 wu-rounded-lg wu-border wu-border-gray-200 wu-bg-white wu-p-2 wu-no-underline dark:wu-border-neutral-700 dark:wu-bg-neutral-800","data-testid":"app-message-link-preview",href:r.value,target:"_blank",rel:"noopener noreferrer"},[e.createElementVNode("button",{class:"wu-absolute wu-right-1 wu-top-1 wu-border-0 wu-bg-transparent wu-p-0 wu-cursor-pointer",type:"button","aria-label":"Fechar preview",onClick:l[0]||(l[0]=e.withModifiers(u=>n.value=!0,["prevent"]))},[e.createVNode(D,{gray:"",small:""},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode("close",-1)])]),_:1})]),i.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-h-12 wu-w-12 wu-shrink-0 wu-rounded wu-object-cover",src:i.value,alt:t.preview.title||"Link preview"},null,8,Ts)):e.createCommentVNode("",!0),e.createElementVNode("div",Is,[e.createVNode(j,{class:"wu-line-clamp-1 wu-leading-3",semibold:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.preview.title),1)]),_:1}),t.preview.description?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-line-clamp-2 wu-leading-3",gray:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.preview.description),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(j,{class:"wu-flex wu-max-w-full wu-items-center wu-gap-1 wu-truncate",gray:"","extra-small":""},{default:e.withCtx(()=>[e.createVNode(D,{gray:"",small:""},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("link",-1)])]),_:1}),e.createElementVNode("span",Ss,e.toDisplayString(t.preview.url),1)]),_:1})])],8,Ns)):e.createCommentVNode("",!0)}}),Es="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos6kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12b0cam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Ds="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",$o="numeric",Oo="ascii",Po="alpha",Ze="asciinumeric",Qe="alphanumeric",Ro="domain",Ei="emoji",Bs="scheme",js="slashscheme",Co="whitespace";function zs(t,o){return t in o||(o[t]=[]),o[t]}function Ee(t,o,n){o[$o]&&(o[Ze]=!0,o[Qe]=!0),o[Oo]&&(o[Ze]=!0,o[Po]=!0),o[Ze]&&(o[Qe]=!0),o[Po]&&(o[Qe]=!0),o[Qe]&&(o[Ro]=!0),o[Ei]&&(o[Ro]=!0);for(const r in o){const i=zs(r,n);i.indexOf(t)<0&&i.push(t)}}function Vs(t,o){const n={};for(const r in o)o[r].indexOf(t)>=0&&(n[r]=!0);return n}function K(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}K.groups={};K.prototype={accepts(){return!!this.t},go(t){const o=this,n=o.j[t];if(n)return n;for(let r=0;r<o.jr.length;r++){const i=o.jr[r][0],a=o.jr[r][1];if(a&&i.test(t))return a}return o.jd},has(t,o=!1){return o?t in this.j:!!this.go(t)},ta(t,o,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],o,n,r)},tr(t,o,n,r){r=r||K.groups;let i;return o&&o.j?i=o:(i=new K(o),n&&r&&Ee(o,n,r)),this.jr.push([t,i]),i},ts(t,o,n,r){let i=this;const a=t.length;if(!a)return i;for(let s=0;s<a-1;s++)i=i.tt(t[s]);return i.tt(t[a-1],o,n,r)},tt(t,o,n,r){r=r||K.groups;const i=this;if(o&&o.j)return i.j[t]=o,o;const a=o;let s,l=i.go(t);if(l?(s=new K,Object.assign(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new K,a){if(r)if(s.t&&typeof s.t=="string"){const u=Object.assign(Vs(s.t,r),n);Ee(a,u,r)}else n&&Ee(a,n,r);s.t=a}return i.j[t]=s,s}};const _=(t,o,n,r,i)=>t.ta(o,n,r,i),G=(t,o,n,r,i)=>t.tr(o,n,r,i),_n=(t,o,n,r,i)=>t.ts(o,n,r,i),M=(t,o,n,r,i)=>t.tt(o,n,r,i),fe="WORD",Ho="UWORD",Di="ASCIINUMERICAL",Bi="ALPHANUMERICAL",rt="LOCALHOST",Fo="TLD",Uo="UTLD",bt="SCHEME",ze="SLASH_SCHEME",ln="NUM",Wo="WS",un="NL",Je="OPENBRACE",qe="CLOSEBRACE",At="OPENBRACKET",Nt="CLOSEBRACKET",Tt="OPENPAREN",It="CLOSEPAREN",St="OPENANGLEBRACKET",Lt="CLOSEANGLEBRACKET",Et="FULLWIDTHLEFTPAREN",Dt="FULLWIDTHRIGHTPAREN",Bt="LEFTCORNERBRACKET",jt="RIGHTCORNERBRACKET",zt="LEFTWHITECORNERBRACKET",Vt="RIGHTWHITECORNERBRACKET",_t="FULLWIDTHLESSTHAN",$t="FULLWIDTHGREATERTHAN",Ot="AMPERSAND",Pt="APOSTROPHE",Rt="ASTERISK",ke="AT",Ht="BACKSLASH",Ft="BACKTICK",Ut="CARET",De="COLON",cn="COMMA",Wt="DOLLAR",le="DOT",Yt="EQUALS",dn="EXCLAMATION",ne="HYPHEN",Ke="PERCENT",Gt="PIPE",Qt="PLUS",$e="POUND",Le="QUERY",pn="QUOTE",ji="FULLWIDTHMIDDLEDOT",mn="SEMI",ue="SLASH",Xe="TILDE",Zt="UNDERSCORE",zi="EMOJI",Jt="SYM";var Vi=Object.freeze({__proto__:null,ALPHANUMERICAL:Bi,AMPERSAND:Ot,APOSTROPHE:Pt,ASCIINUMERICAL:Di,ASTERISK:Rt,AT:ke,BACKSLASH:Ht,BACKTICK:Ft,CARET:Ut,CLOSEANGLEBRACKET:Lt,CLOSEBRACE:qe,CLOSEBRACKET:Nt,CLOSEPAREN:It,COLON:De,COMMA:cn,DOLLAR:Wt,DOT:le,EMOJI:zi,EQUALS:Yt,EXCLAMATION:dn,FULLWIDTHGREATERTHAN:$t,FULLWIDTHLEFTPAREN:Et,FULLWIDTHLESSTHAN:_t,FULLWIDTHMIDDLEDOT:ji,FULLWIDTHRIGHTPAREN:Dt,HYPHEN:ne,LEFTCORNERBRACKET:Bt,LEFTWHITECORNERBRACKET:zt,LOCALHOST:rt,NL:un,NUM:ln,OPENANGLEBRACKET:St,OPENBRACE:Je,OPENBRACKET:At,OPENPAREN:Tt,PERCENT:Ke,PIPE:Gt,PLUS:Qt,POUND:$e,QUERY:Le,QUOTE:pn,RIGHTCORNERBRACKET:jt,RIGHTWHITECORNERBRACKET:Vt,SCHEME:bt,SEMI:mn,SLASH:ue,SLASH_SCHEME:ze,SYM:Jt,TILDE:Xe,TLD:Fo,UNDERSCORE:Zt,UTLD:Uo,UWORD:Ho,WORD:fe,WS:Wo});const me=/[a-z]/;let Ve=/[a-z]/i,kt=/[\u{1F000}-\u{1FAFF}\u{2600}-\u{27BF}]|\u{FE0F}/u;try{Ve=new RegExp("\\p{L}","u"),kt=new RegExp("\\p{Emoji}","u")}catch{}const ge=/\d/,Ao=/\s/,$n="\r",No=`
2
+ `,_s="️",$s="‍",To="";let ht=null,wt=null;function Os(t=[]){const o={};K.groups=o;const n=new K;ht==null&&(ht=On(Es)),wt==null&&(wt=On(Ds)),M(n,"'",Pt),M(n,"{",Je),M(n,"}",qe),M(n,"[",At),M(n,"]",Nt),M(n,"(",Tt),M(n,")",It),M(n,"<",St),M(n,">",Lt),M(n,"(",Et),M(n,")",Dt),M(n,"「",Bt),M(n,"」",jt),M(n,"『",zt),M(n,"』",Vt),M(n,"<",_t),M(n,">",$t),M(n,"&",Ot),M(n,"*",Rt),M(n,"@",ke),M(n,"`",Ft),M(n,"^",Ut),M(n,":",De),M(n,",",cn),M(n,"$",Wt),M(n,".",le),M(n,"=",Yt),M(n,"!",dn),M(n,"-",ne),M(n,"%",Ke),M(n,"|",Gt),M(n,"+",Qt),M(n,"#",$e),M(n,"?",Le),M(n,'"',pn),M(n,"/",ue),M(n,";",mn),M(n,"~",Xe),M(n,"_",Zt),M(n,"\\",Ht),M(n,"・",ji);const r=G(n,ge,ln,{[$o]:!0});G(r,ge,r);const i=G(r,me,Di,{[Ze]:!0}),a=G(r,Ve,Bi,{[Qe]:!0}),s=G(n,me,fe,{[Oo]:!0});G(s,ge,i),G(s,me,s),G(i,ge,i),G(i,me,i);const l=G(n,Ve,Ho,{[Po]:!0});G(l,me),G(l,ge,a),G(l,Ve,l),G(a,ge,a),G(a,me),G(a,Ve,a);const u=M(n,No,un,{[Co]:!0}),c=M(n,$n,Wo,{[Co]:!0}),p=G(n,Ao,Wo,{[Co]:!0});M(n,To,p),M(c,No,u),M(c,To,p),G(c,Ao,p),M(p,$n),M(p,No),G(p,Ao,p),M(p,To,p);const d=G(n,kt,zi,{[Ei]:!0});M(d,"#"),G(d,kt,d),M(d,_s,d);const g=M(d,$s);M(g,"#"),G(g,kt,d);const m=[[me,s],[ge,i]],f=[[me,null],[Ve,l],[ge,a]];for(let w=0;w<ht.length;w++)ve(n,ht[w],Fo,fe,m);for(let w=0;w<wt.length;w++)ve(n,wt[w],Uo,Ho,f);Ee(Fo,{tld:!0,ascii:!0},o),Ee(Uo,{utld:!0,alpha:!0},o),ve(n,"file",bt,fe,m),ve(n,"mailto",bt,fe,m),ve(n,"http",ze,fe,m),ve(n,"https",ze,fe,m),ve(n,"ftp",ze,fe,m),ve(n,"ftps",ze,fe,m),Ee(bt,{scheme:!0,ascii:!0},o),Ee(ze,{slashscheme:!0,ascii:!0},o),t=t.sort((w,y)=>w[0]>y[0]?1:-1);for(let w=0;w<t.length;w++){const y=t[w][0],v=t[w][1]?{[Bs]:!0}:{[js]:!0};y.indexOf("-")>=0?v[Ro]=!0:me.test(y)?ge.test(y)?v[Ze]=!0:v[Oo]=!0:v[$o]=!0,_n(n,y,y,v)}return _n(n,"localhost",rt,{ascii:!0}),n.jd=new K(Jt),{start:n,tokens:Object.assign({groups:o},Vi)}}function _i(t,o){const n=Ps(o.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,i=[];let a=0,s=0;for(;s<r;){let l=t,u=null,c=0,p=null,d=-1,g=-1;for(;s<r&&(u=l.go(n[s]));)l=u,l.accepts()?(d=0,g=0,p=l):d>=0&&(d+=n[s].length,g++),c+=n[s].length,a+=n[s].length,s++;a-=d,s-=g,c-=d,i.push({t:p.t,v:o.slice(a-c,a),s:a-c,e:a})}return i}function Ps(t){const o=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),a,s=i<55296||i>56319||r+1===n||(a=t.charCodeAt(r+1))<56320||a>57343?t[r]:t.slice(r,r+2);o.push(s),r+=s.length}return o}function ve(t,o,n,r,i){let a;const s=o.length;for(let l=0;l<s-1;l++){const u=o[l];t.j[u]?a=t.j[u]:(a=new K(r),a.jr=i.slice(),t.j[u]=a),t=a}return a=new K(n),a.jr=i.slice(),t.j[o[s-1]]=a,a}function On(t){const o=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let a=0;for(;i.indexOf(t[r+a])>=0;)a++;if(a>0){o.push(n.join(""));for(let s=parseInt(t.substring(r,r+a),10);s>0;s--)n.pop();r+=a}else n.push(t[r]),r++}return o}const at={defaultProtocol:"http",events:null,format:Pn,formatHref:Pn,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],ignoreClasses:[],render:null};function gn(t,o=null){let n=Object.assign({},at);t&&(n=Object.assign(n,t instanceof gn?t.o:t));const r=n.ignoreTags,i=[];for(let a=0;a<r.length;a++)i.push(r[a].toUpperCase());this.o=n,o&&(this.defaultRender=o),this.ignoreTags=i,this.ignoreClasses=n.ignoreClasses.slice()}gn.prototype={o:at,ignoreTags:[],ignoreClasses:[],isIgnoredClass(t){if(typeof t!="string"||this.ignoreClasses.length===0)return!1;const o=t.split(/\s+/);for(let n=0;n<o.length;n++)if(this.ignoreClasses.indexOf(o[n])>=0)return!0;return!1},defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,o,n){const r=o!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:at[t],typeof i=="function"&&r&&(i=i(o,n))):typeof i=="function"&&r&&(i=i(o,n.t,n)),i)},getObj(t,o,n){let r=this.o[t];return typeof r=="function"&&o!=null&&(r=r(o,n.t,n)),r},render(t){const o=t.render(this);return(this.get("render",null,t)||this.defaultRender)(o,t.t,t)}};function Pn(t){return t}function $i(t,o){this.t="token",this.v=t,this.tk=o}$i.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const o=this.toString(),n=t.get("truncate",o,this),r=t.get("format",o,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=at.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const o=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,o),a=this.toFormattedString(t),s={},l=t.get("className",n,o),u=t.get("target",n,o),c=t.get("rel",n,o),p=t.getObj("attributes",n,o),d=t.getObj("events",n,o);return s.href=r,l&&(s.class=l),u&&(s.target=u),c&&(s.rel=c),p&&Object.assign(s,p),{tagName:i,attributes:s,content:a,eventListeners:d}}};function so(t,o){class n extends $i{constructor(i,a){super(i,a),this.t=t}}for(const r in o)n.prototype[r]=o[r];return n.t=t,n}const Rs=so("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Rn=so("text"),Hs=so("nl"),yt=so("url",{isLink:!0,toHref(t=at.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==rt&&t[1].t===De}}),te=t=>new K(t);function Fs({groups:t}){const o=t.domain.concat([Ot,Rt,ke,Ht,Ft,Ut,Wt,Yt,ne,ln,Ke,Gt,Qt,$e,ue,Jt,Xe,Zt]),n=[Pt,De,cn,le,dn,Ke,Le,pn,mn,St,Lt,Je,qe,Nt,At,Tt,It,Et,Dt,Bt,jt,zt,Vt,_t,$t],r=[Ot,Pt,Rt,Ht,Ft,Ut,Wt,Yt,ne,Je,qe,Ke,Gt,Qt,$e,Le,ue,Jt,Xe,Zt],i=te(),a=M(i,Xe);_(a,r,a),_(a,t.domain,a);const s=te(),l=te(),u=te();_(i,t.domain,s),_(i,t.scheme,l),_(i,t.slashscheme,u),_(s,r,a),_(s,t.domain,s);const c=M(s,ke);M(a,ke,c),M(l,ke,c),M(u,ke,c);const p=M(a,le);_(p,r,a),_(p,t.domain,a);const d=te();_(c,t.domain,d),_(d,t.domain,d);const g=M(d,le);_(g,t.domain,d);const m=te(Rs);_(g,t.tld,m),_(g,t.utld,m),M(c,rt,m);const f=M(d,ne);M(f,ne,f),_(f,t.domain,d),_(m,t.domain,d),M(m,le,g),M(m,ne,f);const w=M(s,ne),y=M(s,le);M(w,ne,w),_(w,t.domain,s),_(y,r,a),_(y,t.domain,s);const b=te(yt);_(y,t.tld,b),_(y,t.utld,b),_(b,t.domain,s),_(b,r,a),M(b,le,y),M(b,ne,w),M(b,ke,c);const v=M(b,De),h=te(yt);_(v,t.numeric,h);const x=te(yt),k=te();_(x,o,x),_(x,n,k),_(k,o,x),_(k,n,k),M(b,ue,x),M(h,ue,x),M(b,Le,k),M(b,$e,x),M(h,Le,k),M(h,$e,x);const C=M(l,De),E=M(u,De),I=M(E,ue),A=M(I,ue);_(l,t.domain,s),M(l,le,y),M(l,ne,w),_(u,t.domain,s),M(u,le,y),M(u,ne,w),_(C,t.domain,x),M(C,ue,x),M(C,Le,x),_(A,t.domain,x),_(A,o,x),M(A,ue,x);const S=[[Je,qe],[At,Nt],[Tt,It],[St,Lt],[Et,Dt],[Bt,jt],[zt,Vt],[_t,$t]];for(let V=0;V<S.length;V++){const[P,T]=S[V],B=M(x,P);M(k,P,B);const F=te(yt);_(B,o,F);const U=te();_(B,n,U),M(B,T,x),_(F,o,F),_(F,n,U),_(U,o,F),_(U,n,U),M(F,T,x),M(U,T,x)}return M(i,rt,b),M(i,un,Hs),{start:i,tokens:Vi}}function Us(t,o,n){let r=n.length,i=0,a=[],s=[];const l=[];for(;i<r;){let u=t,c=null,p=null,d=0,g=null,m=-1,f=[];for(;i<r&&!(c=u.go(n[i].t));)s.push(n[i++]);for(;i<r&&(p=c||u.go(n[i].t));)if(c=null,u=p,i++,d++,u.accepts())m=0,g=u,f=[];else if(m>=0&&m++,f.push(u),l[i]&&l[i].has(u))break;for(let w=0,y=i-f.length+1;w<f.length;w++,y++)(l[y]||(l[y]=new Set)).add(f[w]);if(m<0)i-=d,i<r&&(s.push(n[i]),i++);else{s.length>0&&(a.push(Io(Rn,o,s)),s=[]),i-=m,d-=m;const w=g.t,y=n.slice(i-d,i);a.push(Io(w,o,y))}}return s.length>0&&a.push(Io(Rn,o,s)),a}function Io(t,o,n){const r=n[0].s,i=n[n.length-1].e,a=o.slice(r,i);return new t(a,n)}const q={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Ws(){q.scanner=Os(q.customSchemes);for(let t=0;t<q.tokenQueue.length;t++)q.tokenQueue[t][1]({scanner:q.scanner});q.parser=Fs(q.scanner.tokens);for(let t=0;t<q.pluginQueue.length;t++)q.pluginQueue[t][1]({scanner:q.scanner,parser:q.parser});return q.initialized=!0,q}function Oi(t){return q.initialized||Ws(),Us(q.parser.start,t,_i(q.scanner.start,t))}Oi.scan=_i;var Ys={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"'},Gs=/^#[xX]([A-Fa-f0-9]+)$/,Qs=/^#([0-9]+)$/,Zs=/^([A-Za-z0-9]+)$/,Js=(function(){function t(o){this.named=o}return t.prototype.parse=function(o){if(o){var n=o.match(Gs);if(n)return String.fromCharCode(parseInt(n[1],16));if(n=o.match(Qs),n)return String.fromCharCode(parseInt(n[1],10));if(n=o.match(Zs),n)return this.named[n[1]]||"&"+n[1]+";"}},t})(),qs=/[\t\n\f ]/,Ks=/[A-Za-z]/,Xs=/\r\n?/g;function J(t){return qs.test(t)}function Hn(t){return Ks.test(t)}function el(t){return t.replace(Xs,`
3
+ `)}var tl=(function(){function t(o,n,r){r===void 0&&(r="precompile"),this.delegate=o,this.entityParser=n,this.mode=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var i=this.peek();if(i==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&i===`
4
+ `){var a=this.tagNameBuffer.toLowerCase();(a==="pre"||a==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var i=this.peek(),a=this.tagNameBuffer;i==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):i==="&"&&a!=="script"&&a!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(i))},tagOpen:function(){var i=this.consume();i==="!"?this.transitionTo("markupDeclarationOpen"):i==="/"?this.transitionTo("endTagOpen"):(i==="@"||i===":"||Hn(i))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(i))},markupDeclarationOpen:function(){var i=this.consume();if(i==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var a=i.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();a==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var i=this.consume();J(i)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var i=this.consume();J(i)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(i.toLowerCase()))},doctypeName:function(){var i=this.consume();J(i)?this.transitionTo("afterDoctypeName"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(i.toLowerCase())},afterDoctypeName:function(){var i=this.consume();if(!J(i))if(i===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var a=i.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),s=a.toUpperCase()==="PUBLIC",l=a.toUpperCase()==="SYSTEM";(s||l)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),s?this.transitionTo("afterDoctypePublicKeyword"):l&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var i=this.peek();J(i)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):i==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):i==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):i===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var i=this.consume();i==='"'?this.transitionTo("afterDoctypePublicIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(i)},doctypePublicIdentifierSingleQuoted:function(){var i=this.consume();i==="'"?this.transitionTo("afterDoctypePublicIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(i)},afterDoctypePublicIdentifier:function(){var i=this.consume();J(i)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):i==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):i==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var i=this.consume();J(i)||(i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):i==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):i==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var i=this.consume();i==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(i)},doctypeSystemIdentifierSingleQuoted:function(){var i=this.consume();i==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):i===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(i)},afterDoctypeSystemIdentifier:function(){var i=this.consume();J(i)||i===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var i=this.consume();i==="-"&&this.peek()==="-"?this.transitionTo("commentStartDash"):i===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(i),this.transitionTo("comment"))},commentStartDash:function(){var i=this.consume();i==="-"?this.transitionTo("commentEnd"):i===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var i=this.consume();i==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(i)},commentEndDash:function(){var i=this.consume();i==="-"&&this.peek()==="-"?this.delegate.appendToCommentData(i):i==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+i),this.transitionTo("comment"))},commentEnd:function(){var i=this.consume();i===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+i),this.transitionTo("comment"))},tagName:function(){var i=this.consume();J(i)?this.transitionTo("beforeAttributeName"):i==="/"?this.transitionTo("selfClosingStartTag"):i===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(i)},endTagName:function(){var i=this.consume();J(i)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):i==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):i===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(i)},beforeAttributeName:function(){var i=this.peek();if(J(i)){this.consume();return}else i==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):i===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):i==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(i)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var i=this.peek();J(i)?(this.transitionTo("afterAttributeName"),this.consume()):i==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):i==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):i===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):i==='"'||i==="'"||i==="<"?(this.delegate.reportSyntaxError(i+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(i)):(this.consume(),this.delegate.appendToAttributeName(i))},afterAttributeName:function(){var i=this.peek();if(J(i)){this.consume();return}else i==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):i==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):i===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(i))},beforeAttributeValue:function(){var i=this.peek();J(i)?this.consume():i==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):i==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):i===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(i))},attributeValueDoubleQuoted:function(){var i=this.consume();i==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):i==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(i)},attributeValueSingleQuoted:function(){var i=this.consume();i==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):i==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(i)},attributeValueUnquoted:function(){var i=this.peek();J(i)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):i==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):i==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):i===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(i))},afterAttributeValueQuoted:function(){var i=this.peek();J(i)?(this.consume(),this.transitionTo("beforeAttributeName")):i==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):i===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var i=this.peek();i===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var i=this.consume();(i==="@"||i===":"||Hn(i))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(i))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(o){this.state=o},t.prototype.tokenize=function(o){this.reset(),this.tokenizePart(o),this.tokenizeEOF()},t.prototype.tokenizePart=function(o){for(this.input+=el(o);this.index<this.input.length;){var n=this.states[this.state];if(n!==void 0)n.call(this);else throw new Error("unhandled state "+this.state)}},t.prototype.tokenizeEOF=function(){this.flushData()},t.prototype.flushData=function(){this.state==="data"&&(this.delegate.finishData(),this.transitionTo("beforeData"))},t.prototype.peek=function(){return this.input.charAt(this.index)},t.prototype.consume=function(){var o=this.peek();return this.index++,o===`
5
+ `?(this.line++,this.column=0):this.column++,o},t.prototype.consumeCharRef=function(){var o=this.input.indexOf(";",this.index);if(o!==-1){var n=this.input.slice(this.index,o),r=this.entityParser.parse(n);if(r){for(var i=n.length;i;)this.consume(),i--;return this.consume(),r}}},t.prototype.markTagStart=function(){this.delegate.tagOpen()},t.prototype.appendToTagName=function(o){this.tagNameBuffer+=o,this.delegate.appendToTagName(o)},t.prototype.isIgnoredEndTag=function(){var o=this.tagNameBuffer;return o==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||o==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||o==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},t})(),ol=(function(){function t(o,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new tl(this,o,n.mode),this._currentAttribute=void 0}return t.prototype.tokenize=function(o){return this.tokens=[],this.tokenizer.tokenize(o),this.tokens},t.prototype.tokenizePart=function(o){return this.tokens=[],this.tokenizer.tokenizePart(o),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},t.prototype.current=function(){var o=this.token;if(o===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return o;for(var n=0;n<arguments.length;n++)if(o.type===arguments[n])return o;throw new Error("token type was unexpectedly "+o.type)},t.prototype.push=function(o){this.token=o,this.tokens.push(o)},t.prototype.currentAttribute=function(){return this._currentAttribute},t.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},t.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},t.prototype.appendToDoctypeName=function(o){this.current("Doctype").name+=o},t.prototype.appendToDoctypePublicIdentifier=function(o){var n=this.current("Doctype");n.publicIdentifier===void 0?n.publicIdentifier=o:n.publicIdentifier+=o},t.prototype.appendToDoctypeSystemIdentifier=function(o){var n=this.current("Doctype");n.systemIdentifier===void 0?n.systemIdentifier=o:n.systemIdentifier+=o},t.prototype.endDoctype=function(){this.addLocInfo()},t.prototype.beginData=function(){this.push({type:"Chars",chars:""})},t.prototype.appendToData=function(o){this.current("Chars").chars+=o},t.prototype.finishData=function(){this.addLocInfo()},t.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},t.prototype.appendToCommentData=function(o){this.current("Comment").chars+=o},t.prototype.finishComment=function(){this.addLocInfo()},t.prototype.tagOpen=function(){},t.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},t.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},t.prototype.finishTag=function(){this.addLocInfo()},t.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},t.prototype.appendToTagName=function(o){this.current("StartTag","EndTag").tagName+=o},t.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},t.prototype.appendToAttributeName=function(o){this.currentAttribute()[0]+=o},t.prototype.beginAttributeValue=function(o){this.currentAttribute()[2]=o},t.prototype.appendToAttributeValue=function(o){this.currentAttribute()[1]+=o},t.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},t.prototype.reportSyntaxError=function(o){this.current().syntaxError=o},t})();function nl(t,o){var n=new ol(new Js(Ys),o);return n.tokenize(t)}const Pi="LinkifyResult",qt="StartTag",Ri="EndTag",Yo="Chars",il="Comment",rl="Doctype";function al(t,o={}){const n=nl(t),r=[],i=[],a=new gn(o,ul);for(let s=0;s<n.length;s++){const l=n[s];if(l.type===qt){r.push(l);const u=l.tagName.toUpperCase();if(!(u==="A"||a.ignoreTags.indexOf(u)>=0||a.isIgnoredClass(pl(l.attributes,"class")))||l.selfClosing)continue;let p=r.length;ll(u,n,++s,r),s+=r.length-p-1}else if(l.type!==Yo)r.push(l);else{const u=sl(l.chars,a);r.push.apply(r,u)}}for(let s=0;s<r.length;s++){const l=r[s];switch(l.type){case Pi:i.push(l.rendered);break;case qt:{let u="<"+l.tagName;l.attributes.length>0&&(u+=" "+dl(l.attributes).join(" ")),l.selfClosing&&(u+=" /"),u+=">",i.push(u);break}case Ri:i.push(`</${l.tagName}>`);break;case Yo:i.push(Go(l.chars));break;case il:i.push(`<!--${Go(l.chars)}-->`);break;case rl:{let u=`<!DOCTYPE ${l.name}`;l.publicIdentifier&&(u+=` PUBLIC "${l.publicIdentifier}"`),l.systemIdentifier&&(u+=` "${l.systemIdentifier}"`),u+=">",i.push(u);break}}}return i.join("")}function sl(t,o){const n=Oi(t),r=[];for(let i=0;i<n.length;i++){const a=n[i];a.t==="nl"&&o.get("nl2br")?r.push({type:qt,tagName:"br",attributes:[],selfClosing:!0}):!a.isLink||!o.check(a)?r.push({type:Yo,chars:a.toString()}):r.push({type:Pi,rendered:o.render(a)})}return r}function ll(t,o,n,r){let i=1;for(;n<o.length&&i>0;){let a=o[n];a.type===qt&&a.tagName.toUpperCase()===t?i++:a.type===Ri&&a.tagName.toUpperCase()===t&&i--,r.push(a),n++}return r}function ul({tagName:t,attributes:o,content:n}){return`<${t} ${cl(o)}>${Go(n)}</${t}>`}function Go(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Hi(t){return t.replace(/"/g,"&quot;")}function cl(t){const o=[];for(const n in t){const r=t[n]+"";o.push(`${n}="${Hi(r)}"`)}return o.join(" ")}function dl(t){const o=[];for(let n=0;n<t.length;n++){const r=t[n][0],i=t[n][1]+"";o.push(`${r}="${Hi(i)}"`)}return o}function pl(t,o){for(let n=0;n<t.length;n++)if(t[n][0].toLowerCase()===o)return t[n][1];return null}const ml={class:"wu-flex wu-flex-col wu-gap-2","data-testid":"app-message-text"},gl=["innerHTML"],Qo=e.defineComponent({__name:"app-message-text",props:{message:{}},setup(t){const o=t,n=e.computed(()=>{const i=o.message.metadata?.linkPreview;return!i?.title||no(o.message)==="contact"?null:i}),r=e.computed(()=>{const i=o.message.messageBody||"";return/<a\s/i.test(i)?i:al(i,{defaultProtocol:"https",target:"_blank",rel:"noopener noreferrer",className:"wu-underline"})});return(i,a)=>(e.openBlock(),e.createElementBlock("div",ml,[n.value?(e.openBlock(),e.createBlock(Ls,{key:0,preview:n.value},null,8,["preview"])):e.createCommentVNode("",!0),e.createVNode(j,{class:"wu-whitespace-pre-wrap",gray:"",small:"",medium:""},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:r.value},null,8,gl)]),_:1})]))}}),fl={_grouped_images:Ja,interactive:cs,document:ps,automatic:Qo,survey:fs,audio:_o,video:As,voice:_o,image:xs,text:Qo},hl=t=>{const o=t.messageType;return o==="audio"||o==="voice"?_o:io(t).length>0?ss:fl[o]??Qo},wl={"image/jpeg":5,"image/png":5,"image/gif":5,"image/webp":5,"application/pdf":64,"audio/mpeg":16,"audio/mp3":16,"video/mp4":16},yl=25,vl=t=>wl[t.type]??yl,Fn=t=>{const o=[],n=[];for(const r of t){const i=vl(r);if(r.size/1024/1024>i){n.push(`O arquivo ${r.name} é maior que o limite de ${i}MB e não foi adicionado.`);continue}o.push(r)}return{validFiles:o,errors:n}},xl={key:0,class:"wu-w-full wu-flex wu-justify-end wu-h-2","data-testid":"app-message-trailing"},et=e.defineComponent({__name:"app-message",props:{primary:Boolean,secondary:Boolean,tertiary:Boolean},setup(t){const o=t,n=e.computed(()=>e.useSlots());function r(u){return!!n.value[u]}const i=e.computed(()=>o.tertiary),a=e.computed(()=>!i.value&&o.secondary),s=e.computed(()=>i.value?"wu-justify-center":a.value?"wu-flex-row-reverse":""),l=e.computed(()=>i.value?"wu-items-center wu-flex":a.value?["wu-rounded-br-none wu-p-3","wu-bg-[var(--wu-message-outgoing-bg)] dark:wu-bg-[var(--wu-message-outgoing-bg-dark)]"].join(" "):"wu-rounded-bl-none wu-bg-gray-200 wu-p-3 dark:wu-bg-neutral-700");return(u,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-flex wu-items-end wu-gap-2 wu-w-full",s.value]),"data-testid":"app-message"},[e.createElementVNode("div",{class:e.normalizeClass(["wu-rounded-lg wu-relative wu-min-h-8 [overflow-wrap:anywhere]",l.value]),"data-testid":"app-message-bubble"},[e.renderSlot(u.$slots,"default"),r("trailing")?(e.openBlock(),e.createElementBlock("div",xl,[e.renderSlot(u.$slots,"trailing")])):e.createCommentVNode("",!0)],2)],2))}}),fn=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,a)=>(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))}}),bl={class:"wu-typing__dots","aria-hidden":"true"},kl=e.defineComponent({__name:"app-typing",props:{small:Boolean},setup(t){const o=t,n=e.computed(()=>o.small?"wu-gap-1.5 wu-min-h-4":"wu-gap-2 wu-min-h-5"),r=e.computed(()=>o.small?"wu-typing__dot--small":"wu-typing__dot");return(i,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-inline-flex wu-items-center wu-text-gray-500",[n.value,"dark:wu-text-neutral-300"]]),role:"status","aria-live":"polite","aria-label":"Digitando","data-testid":"app-typing"},[e.createElementVNode("div",bl,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,s=>e.createElementVNode("span",{key:s,class:e.normalizeClass(r.value),style:e.normalizeStyle({"--i":s}),"data-testid":"app-typing-dot"},null,6)),64))])],2))}}),hn=Fe(kl,[["__scopeId","data-v-b0aad068"]]),wn=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(a){return!!r.value[a]}return(a,s)=>(e.openBlock(),e.createBlock($,{"gap-sm":"",center:"",col:""},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(D,{key:0,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode("error_outline",-1)])]),_:1})):i("icon")?e.renderSlot(a.$slots,"icon",{key:1}):(e.openBlock(),e.createBlock(D,{key:2,class:"wu-text-gray-500",large:""},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("list",-1)])]),_:1})),e.createVNode(j,{class:"wu-text-center",gray:""},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}),t.error?(e.openBlock(),e.createBlock(H,{key:3,onClick:s[0]||(s[0]=l=>n("refetch")),outline:"",small:"","data-testid":"refetch-button"},{icon:e.withCtx(()=>[...s[3]||(s[3]=[e.createTextVNode("refresh",-1)])]),default:e.withCtx(()=>[s[4]||(s[4]=e.createTextVNode("Tentar novamente",-1))]),_:1})):e.createCommentVNode("",!0)]),_:3}))}}),Ml={key:0,class:"wu-absolute wu-inset-0 wu-z-10 wu-flex wu-flex-col wu-items-center wu-justify-center wu-gap-2 wu-border-2 wu-border-dashed wu-border-primary wu-bg-white wu-bg-opacity-90 dark:wu-bg-neutral-900 dark:wu-bg-opacity-90","data-testid":"app-chat-drag-overlay"},Cl={class:"wu-relative wu-flex wu-flex-col wu-flex-1 wu-min-h-0 wu-w-full"},Al={key:0,class:"wu-w-full wu-min-h-4","data-testid":"app-chat-top-spacer"},Nl={key:2,class:"wu-w-full wu-shrink-0 wu-border-t wu-border-gray-200 wu-flex wu-flex-col dark:wu-border-neutral-700"},Tl={class:"wu-relative wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-rounded-full wu-bg-red-500 wu-bg-opacity-10"},Il={key:0,class:"wu-absolute wu-inset-0 wu-rounded-full wu-bg-red-500 wu-bg-opacity-20 wu-animate-ping"},Sl=["src","alt"],Ll=["onKeydown","disabled"],El={class:"wu-flex wu-items-center wu-gap-2 wu-w-full wu-justify-end wu-px-6 wu-py-2"},Dl=100,Bl=e.defineComponent({__name:"app-chat-service",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,{history:i,chat:a,language:s}=Te(),{isSendingMessage:l,isErrorLoading:u,attachments:c,isFinished:p,isLoading:d,messages:g,isTyping:m,audio:f,text:w}=a,{isRecording:y,formattedDuration:b,start:v,stop:h,cancel:x}=Pa(),k=e.computed(()=>i.value.length>0),C=e.ref(null),E=e.ref(null),I=e.ref(!1),A=e.ref(!1),S=e.computed(()=>Qr(g.value)),V=e.ref(null),P=e.computed(()=>!!(c.value.length||f.value)),T=e.computed(()=>!!(P.value||w.value.trim())),B=e.computed(()=>!!n.rule.settings?.features?.sendAttachment),F=e.computed(()=>l.value||!!f.value||A.value),U=e.computed(()=>l.value||P.value||A.value),Y=e.computed(()=>B.value&&!F.value),W=e.ref(!1),Q=e.ref([]);let we=null;const Ue=e.computed(()=>{const L=n.rule.settings?.features?.quickReplies??[],N=s.value;return L.map(z=>X(z,N)).filter(Boolean)}),yr=e.computed(()=>Ue.value.length>0&&g.value.length===0&&!p.value),An=e.computed(()=>l.value||P.value||A.value),vr=()=>{const L=C.value;if(!L)return;const N=L.scrollHeight-L.scrollTop-L.clientHeight;I.value=N>Dl},We=(L=!0)=>{const N=C.value;N&&(N.scrollTo({top:N.scrollHeight,behavior:L?"smooth":"auto"}),I.value=!1)},mt=(L=!0)=>{I.value||We(L)},xr=()=>{F.value||V.value?.click()},go=L=>{L&&URL.revokeObjectURL(L)},br=()=>{c.value.forEach(L=>go(L.previewUrl)),c.value=[]},fo=()=>{go(f.value?.previewUrl),f.value=null},kr=L=>L.type.startsWith("image/")?"image":"document",ho=L=>{if(!L.length)return;const{validFiles:N,errors:z}=Fn(L);Q.value=z,N.length&&(fo(),c.value=[...c.value,...N.map(Z=>{const gt=kr(Z);return{file:Z,type:gt,previewUrl:gt==="image"?URL.createObjectURL(Z):void 0}})])},Mr=L=>{const{validFiles:N,errors:z}=Fn([L]);Q.value=z,N.length&&(br(),fo(),w.value="",f.value={file:N[0],previewUrl:URL.createObjectURL(N[0])})},Cr=L=>{const N=L.target,z=Array.from(N.files??[]);ho(z),N.value=""},Ar=L=>{if(!L)return[];const N=Array.from(L.items??[]).filter(z=>z.kind==="file").map(z=>z.getAsFile()).filter(z=>!!z);return N.length?N:Array.from(L.files??[])},wo=L=>{const N=L.dataTransfer?.types;return N?Array.from(N).includes("Files"):!1},yo=()=>{we&&(clearTimeout(we),we=null)},Nn=()=>{yo(),we=setTimeout(()=>{W.value=!1},300)},Nr=L=>{if(!Y.value)return;const N=Ar(L.clipboardData);N.length&&(L.preventDefault(),ho(N))},Tr=L=>{!Y.value||!wo(L)||(L.preventDefault(),L.dataTransfer&&(L.dataTransfer.dropEffect="copy"),W.value=!0,Nn())},Ir=L=>{!Y.value||!wo(L)||Nn()},Sr=L=>{if(!Y.value||!wo(L))return;L.preventDefault(),yo(),W.value=!1;const N=Array.from(L.dataTransfer?.files??[]);N.length&&ho(N)},Lr=L=>{go(c.value[L]?.previewUrl),c.value=c.value.filter((N,z)=>z!==L)},Er=()=>{fo()},Dr=async()=>{U.value||!await v()||(w.value="",A.value=!0)},Br=async()=>{await x(),A.value=!1},jr=async()=>{const L=await h();A.value=!1,L&&Mr(L)},Ye=L=>r("chat-service-action",L),Tn=e.computed(()=>T.value&&!A.value&&!l.value),In=()=>{Tn.value&&(Q.value=[],We(),Ye({action:"send-message"}))},zr=L=>{An.value||!L.trim()||(w.value=L,We(),Ye({action:"send-message"}))};e.watch(()=>S.value.length,async()=>{await e.nextTick(),mt()}),e.watch(m,L=>{L&&mt()});let je=null;const Sn=()=>{je?.disconnect(),je=null;const L=E.value;!L||typeof ResizeObserver>"u"||(je=new ResizeObserver(()=>{mt(!1)}),je.observe(L))};e.watch(d,async L=>{L||(await e.nextTick(),Sn(),mt(!1))}),e.onMounted(async()=>{We(!1),await e.nextTick(),Sn()}),e.onBeforeUnmount(()=>{yo(),je?.disconnect(),je=null});const Ln=L=>L.from==="contact"?"contact":"operator",Vr=(L,N,z)=>N[z-1]?Ln(N[z-1])===Ln(L)?"wu-mt-1":"wu-mt-4":"wu-mt-0",_r=L=>Ur(L.createdAt)||"12:58",$r=L=>r("chat-service-message-action",L);return(L,N)=>(e.openBlock(),e.createElementBlock("div",{class:"wu-relative wu-flex wu-flex-col wu-items-center wu-h-full wu-w-full wu-overflow-hidden","data-testid":"app-chat-service",onDragover:Tr,onDragleave:Ir,onDrop:Sr},[W.value?(e.openBlock(),e.createElementBlock("div",Ml,[e.createVNode(D,{class:"wu-text-primary",large:""},{default:e.withCtx(()=>[...N[5]||(N[5]=[e.createTextVNode("upload",-1)])]),_:1}),e.createVNode(j,{semibold:"",gray:""},{default:e.withCtx(()=>[...N[6]||(N[6]=[e.createTextVNode("Solte os arquivos para anexar",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",Cl,[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:C,"data-testid":"app-service-messages",onScroll:vr},[e.createElementVNode("div",{class:"wu-w-full wu-flex wu-flex-col",ref_key:"messagesContent",ref:E},[k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Al)),e.unref(d)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(10,(z,Z)=>e.createVNode(et,{key:Z,primary:Z%2===0,secondary:Z%2===1},{default:e.withCtx(()=>[e.createVNode(fn,{class:"wu-h-4 wu-w-32",block:""})]),_:1},8,["primary","secondary"])),64)):e.unref(u)?(e.openBlock(),e.createBlock(wn,{key:2,class:"wu-h-full",onRefetch:N[0]||(N[0]=z=>Ye({action:"retry-loading"})),error:""},{default:e.withCtx(()=>[...N[7]||(N[7]=[e.createTextVNode("Ocorreu um erro ao carregar o atendimento.",-1)])]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(z,Z)=>(e.openBlock(),e.createBlock(et,{key:z.id??Z,primary:z.from!=="contact",secondary:z.from==="contact",class:e.normalizeClass([Vr(z,S.value,Z)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(hl)(z)),{message:z,onChatServiceMessageAction:$r},null,40,["message"]))]),trailing:e.withCtx(()=>[e.createVNode(j,{gray:"","extra-small":"",medium:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_r(z)),1)]),_:2},1024)]),_:2},1032,["primary","secondary","class"]))),128)),e.unref(m)?(e.openBlock(),e.createBlock(et,{key:0,class:"wu-mt-1",primary:""},{default:e.withCtx(()=>[e.createVNode(hn,{small:""})]),_:1})):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock($,{key:1,class:"wu-mt-4","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(H,{"data-testid":"app-chat-start-new-service",onClick:N[1]||(N[1]=z=>Ye({action:"start-new-service"})),small:""},{icon:e.withCtx(()=>[e.createVNode(D,{small:""},{default:e.withCtx(()=>[...N[8]||(N[8]=[e.createTextVNode("chat",-1)])]),_:1})]),default:e.withCtx(()=>[N[9]||(N[9]=e.createTextVNode("Iniciar novo atendimento",-1))]),_:1}),e.createVNode(H,{"data-testid":"app-chat-back",onClick:N[2]||(N[2]=z=>Ye({action:"back"})),small:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(D,{small:""},{default:e.withCtx(()=>[...N[10]||(N[10]=[e.createTextVNode("arrow_back",-1)])]),_:1})]),default:e.withCtx(()=>[N[11]||(N[11]=e.createTextVNode("Voltar",-1))]),_:1})]),_:1})):e.createCommentVNode("",!0)],64)),N[12]||(N[12]=e.createElementVNode("div",{class:"wu-w-full wu-min-h-4"},null,-1))],512)],544),I.value?(e.openBlock(),e.createBlock(H,{key:0,class:"wu-absolute wu-right-9 wu-bottom-3 wu-z-10 wu-shadow-md !wu-bg-white dark:!wu-bg-neutral-800","data-testid":"app-chat-scroll-to-bottom",onClick:N[3]||(N[3]=z=>We()),round:"",small:"",icon:"",outline:""},{icon:e.withCtx(()=>[e.createVNode(D,{small:"",gray:""},{default:e.withCtx(()=>[...N[13]||(N[13]=[e.createTextVNode("keyboard_double_arrow_down",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),!e.unref(d)&&!e.unref(u)&&yr.value?(e.openBlock(),e.createBlock($,{key:1,class:"wu-items-end wu-w-full","data-testid":"app-chat-quick-replies","padding-md":"","gap-sm":"",col:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,(z,Z)=>(e.openBlock(),e.createBlock(H,{key:Z,onClick:gt=>zr(z),disabled:An.value,outline:"",round:"",fit:""},{trailing:e.withCtx(()=>[...N[14]||(N[14]=[e.createTextVNode("chevron_right",-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(z),1)]),_:2},1032,["onClick","disabled"]))),128))]),_:1})):e.createCommentVNode("",!0),!e.unref(d)&&!e.unref(u)&&t.rule.settings?.features?.sendMessage?(e.openBlock(),e.createElementBlock("div",Nl,[A.value?(e.openBlock(),e.createBlock($,{key:0,"data-testid":"app-chat-audio-recording","padding-md":"","center-between":""},{default:e.withCtx(()=>[e.createVNode(H,{"data-testid":"app-chat-audio-cancel",onClick:Br,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...N[15]||(N[15]=[e.createTextVNode("close",-1)])]),_:1})]),_:1}),e.createVNode($,{class:"wu-items-center","gap-sm":""},{default:e.withCtx(()=>[e.createElementVNode("div",Tl,[e.unref(y)?(e.openBlock(),e.createElementBlock("div",Il)):e.createCommentVNode("",!0),e.createVNode(D,{class:"wu-text-red-500",large:""},{default:e.withCtx(()=>[...N[16]||(N[16]=[e.createTextVNode("mic",-1)])]),_:1})]),e.createVNode(j,{semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)),1)]),_:1})]),_:1}),e.createVNode(H,{"data-testid":"app-chat-audio-stop",onClick:jr,disabled:!e.unref(y),small:"",icon:"",success:""},{icon:e.withCtx(()=>[e.createVNode(D,{light:""},{default:e.withCtx(()=>[...N[17]||(N[17]=[e.createTextVNode("check",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})):e.unref(f)?(e.openBlock(),e.createBlock($,{key:1,"data-testid":"app-chat-audio-preview","padding-md":""},{default:e.withCtx(()=>[e.createVNode($,{class:"wu-w-full wu-items-center","padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[e.createVNode(pt,{class:"wu-flex-1",src:e.unref(f).previewUrl},null,8,["src"]),e.createVNode(H,{"data-testid":"app-chat-audio-discard",onClick:Er,disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...N[18]||(N[18]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["disabled"])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(c).length?(e.openBlock(),e.createBlock($,{key:0,class:"wu-px-6 wu-pt-6 wu-overflow-x-auto invisible-scrollbar","data-testid":"app-chat-attachment-preview"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(z,Z)=>(e.openBlock(),e.createBlock($,{class:"wu-items-center",key:Z,"padding-sm":"",rounded:"",border:"","gap-sm":""},{default:e.withCtx(()=>[z.type==="image"&&z.previewUrl?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-rounded wu-object-cover",src:z.previewUrl,alt:z.file.name},null,8,Sl)):(e.openBlock(),e.createBlock($,{key:1,class:"wu-w-7 wu-h-7 wu-bg-gray-200",center:"","padding-base":"",rounded:""},{default:e.withCtx(()=>[e.createVNode(D,{large:"",gray:""},{default:e.withCtx(()=>[...N[19]||(N[19]=[e.createTextVNode("file_present",-1)])]),_:1})]),_:1})),e.createVNode($,{class:"wu-flex-1 wu-items-start wu-min-w-0",col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode(j,{class:"[overflow-wrap:anywhere]",semibold:"",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(z.file.name),1)]),_:2},1024),e.createVNode(j,{"extra-small":"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(z.file.type),1)]),_:2},1024)]),_:2},1024),e.createVNode(H,{"data-testid":"app-chat-attachment-discard",onClick:gt=>Lr(Z),disabled:e.unref(l),ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{gray:""},{default:e.withCtx(()=>[...N[20]||(N[20]=[e.createTextVNode("close",-1)])]),_:1})]),_:1},8,["onClick","disabled"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0),Q.value.length?(e.openBlock(),e.createBlock($,{key:1,class:"wu-px-6 wu-pt-2 wu-flex-col wu-items-start wu-gap-1","data-testid":"app-chat-attachment-errors"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(z,Z)=>(e.openBlock(),e.createBlock(j,{class:"!wu-text-red-500",key:Z,"extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(z),1)]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0),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":N[4]||(N[4]=z=>e.isRef(w)?w.value=z:null),onKeydown:e.withKeys(e.withModifiers(In,["exact","prevent"]),["enter"]),onPaste:Nr,placeholder:"Escreva uma mensagem...",disabled:e.unref(l)},null,40,Ll),[[e.vModelText,e.unref(w)]])],64)),e.withDirectives(e.createElementVNode("input",{ref_key:"fileInput",ref:V,type:"file",multiple:"","data-testid":"app-chat-file-input",onChange:Cr},null,544),[[e.vShow,!1]]),e.createElementVNode("div",El,[B.value?(e.openBlock(),e.createBlock(H,{key:0,"data-testid":"app-chat-attach-file",onClick:xr,disabled:F.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{class:"wu-rotate-45",large:"",gray:""},{default:e.withCtx(()=>[...N[21]||(N[21]=[e.createTextVNode("attach_file",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createBlock(H,{key:1,"data-testid":"app-chat-record-audio",onClick:Dr,disabled:U.value,ghost:"",small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{large:"",gray:""},{default:e.withCtx(()=>[...N[22]||(N[22]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(H,{onClick:In,loading:e.unref(l),disabled:!Tn.value,small:"",icon:""},{icon:e.withCtx(()=>[e.createVNode(D,{class:"-wu-rotate-45 wu-translate-x-[0.10rem] -wu-translate-y-[0.12rem]",outlined:"",large:""},{default:e.withCtx(()=>[...N[23]||(N[23]=[e.createTextVNode("send",-1)])]),_:1})]),_:1},8,["loading","disabled"])])])):e.createCommentVNode("",!0)],32))}}),jl={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"},zl={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"},Vl=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",jl,[e.createVNode($,{class:"wu-w-full",col:"",center:"","gap-lg":""},{default:e.withCtx(()=>[e.createVNode($,{col:"",center:"","gap-base":""},{default:e.withCtx(()=>[e.createElementVNode("div",zl,[e.createVNode(D,{"extra-large":"",gray:""},{default:e.withCtx(()=>[...i[0]||(i[0]=[e.createTextVNode("phone_in_talk",-1)])]),_:1})]),e.createVNode(j,{class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1}),e.createVNode(j,{class:"wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("Aguardando conexão",-1)])]),_:1})]),_:1}),e.createVNode($,{center:"","gap-md":""},{default:e.withCtx(()=>[e.createVNode(H,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(D,{large:"",gray:""},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("mic",-1)])]),_:1})]),_:1}),e.createVNode(H,{alert:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(D,{large:""},{default:e.withCtx(()=>[...i[3]||(i[3]=[e.createTextVNode("call_end",-1)])]),_:1})]),_:1}),e.createVNode(H,{ghost:"",icon:"",round:"",disabled:""},{icon:e.withCtx(()=>[e.createVNode(D,{large:"",gray:""},{default:e.withCtx(()=>[...i[4]||(i[4]=[e.createTextVNode("volume_up",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),yn=e.defineComponent({__name:"app-service-page",props:{rule:{},edges:{}},emits:["chat-service-action","chat-service-message-action"],setup(t,{emit:o}){const n=t,r=o,i=e.computed(()=>n.rule.settings?.behavior==="voice"?Vl:Bl);return(a,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{rule:t.rule,edges:t.edges,onChatServiceAction:s[0]||(s[0]=l=>r("chat-service-action",l)),onChatServiceMessageAction:s[1]||(s[1]=l=>r("chat-service-message-action",l))},null,40,["rule","edges"]))}}),Un=t=>{const o=n=>n.toString(16).padStart(2,"0");return`#${o(t.r)}${o(t.g)}${o(t.b)}`},_l=()=>{const t="#6D3595",o=u=>{const c=u.replace("#","").trim(),p=c.length===3&&/^[0-9a-fA-F]{3}$/.test(c)?`${c[0]}${c[0]}${c[1]}${c[1]}${c[2]}${c[2]}`:c;return p.length!==6||!/^[0-9a-fA-F]{6}$/.test(p)?null:{r:parseInt(p.slice(0,2),16),g:parseInt(p.slice(2,4),16),b:parseInt(p.slice(4,6),16)}},n=u=>{const c=o(u)??o(t);return c?Un(c):t.toLowerCase()},r=u=>{const c=o(u);return c?(c.r*299+c.g*587+c.b*114)/1e3:null};return{getLuminance:r,isLightHex:u=>{const c=r(u);return c!==null&&c>160},isNearWhiteHex:u=>{const c=o(u);return c?c.r>=245&&c.g>=245&&c.b>=245:!1},isTooDarkForDarkCanvas:u=>{const c=r(u);return c!==null&&c<55},mixWithWhite:(u,c)=>{const p=o(u);if(!p)return n(u);const d=Math.min(1,Math.max(0,c));return Un({r:Math.round(p.r+(255-p.r)*d),g:Math.round(p.g+(255-p.g)*d),b:Math.round(p.b+(255-p.b)*d)})},normalizeHex:n,parseHex:o}},$l=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,Fi=t=>{const{isLightHex:o,isNearWhiteHex:n,isTooDarkForDarkCanvas:r,mixWithWhite:i,normalizeHex:a,parseHex:s}=_l(),l="#374151",u=.45,c=.72,p=(x,k)=>x==="dark"?"dark":x==="light"?"light":k?"dark":"light",d=(x,k)=>n(x)?k==="light"?l:x:k==="dark"&&r(x)?i(x,u):x,g=(x,k,C)=>C==="dark"&&r(x)?i(x,c):k,m=x=>{const k=s(x)??{r:109,g:53,b:149},C=o(x),E=`color-mix(in srgb, ${x} 22%, white)`,I=`color-mix(in srgb, ${x} 22%, black)`;return{hex:x,rgb:k,light:C,tone50:`color-mix(in srgb, ${x} 8%, white)`,tone100:E,tone200:`color-mix(in srgb, ${x} 38%, white)`,tone300:`color-mix(in srgb, ${x} 55%, white)`,tone400:C?`color-mix(in srgb, ${x} 70%, black)`:`color-mix(in srgb, ${x} 78%, white)`,tone600:`color-mix(in srgb, ${x} 82%, black)`,tone700:`color-mix(in srgb, ${x} 64%, black)`,tone800:`color-mix(in srgb, ${x} 42%, black)`,tone900:I,fg:C?"#1c1917":"#ffffff",border:C?"#e5e7eb":"color-mix(in srgb, var(--wu-primary-fg) 22%, transparent)"}},f=(x,k)=>{const C=a(x),E=d(C,k),I=g(C,E,k),A=m(C),S=m(E),V=m(I);return{"--wu-primary":A.hex,"--wu-primary-rgb":`${A.rgb.r} ${A.rgb.g} ${A.rgb.b}`,"--wu-primary-fg":A.fg,"--wu-primary-border":A.border,"--wu-primary-50":A.tone50,"--wu-primary-100":A.tone100,"--wu-primary-200":A.tone200,"--wu-primary-300":A.tone300,"--wu-primary-400":A.tone400,"--wu-primary-500":A.hex,"--wu-primary-600":A.tone600,"--wu-primary-700":A.tone700,"--wu-primary-800":A.tone800,"--wu-primary-900":A.tone900,"--wu-action":S.hex,"--wu-action-rgb":`${S.rgb.r} ${S.rgb.g} ${S.rgb.b}`,"--wu-action-fg":S.fg,"--wu-action-50":S.tone50,"--wu-action-ink":V.hex,"--wu-message-outgoing-bg":S.tone100,"--wu-message-outgoing-bg-dark":S.tone900}},w=x=>{const k=e.ref($l()),C=e.computed(()=>p(e.toValue(x),k.value)),E=e.computed(()=>C.value==="dark"),I=e.computed(()=>E.value?"wu-dark":"");return e.onMounted(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const A=window.matchMedia("(prefers-color-scheme: dark)");k.value=A.matches;const S=V=>{k.value=V.matches};A.addEventListener("change",S),e.onBeforeUnmount(()=>A.removeEventListener("change",S))}),{isDark:E,resolvedTheme:C,themeClass:I}},{isDark:y,themeClass:b,resolvedTheme:v}=w(()=>e.toValue(t).theme),h=e.computed(()=>({...f(e.toValue(t).primaryColor,v.value),colorScheme:v.value}));return{isDark:y,themeClass:b,resolvedTheme:v,appearanceStyle:h}},Ol={class:"wu-flex wu-flex-col wu-w-full wu-gap-8"},Pl={key:0,class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-h-0"},Rl=["src"],Hl={key:1,class:"wu-flex wu-flex-col wu-items-center wu-justify-start wu-gap-2 wu-px-6 wu-w-full"},vn=e.defineComponent({__name:"app-screen-page",props:{rule:{},edges:{}},emits:["edge-click"],setup(t,{emit:o}){const n=t,r=o,{history:i,language:a}=Te(),s=e.computed(()=>i.value.length>0),l=e.computed(()=>n.edges??[]),u=e.computed(()=>n.rule.settings?.body),c=e.computed(()=>l.value.slice(0,3)),p=e.computed(()=>l.value.slice(3)),d=e.computed(()=>a.value),g=e.computed(()=>X(u.value?.eyebrow,d.value)),m=e.computed(()=>X(u.value?.title,d.value)),f=e.computed(()=>X(u.value?.subtitle,d.value));return(w,y)=>(e.openBlock(),e.createElementBlock("div",Ol,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Pl)),e.createVNode($,{class:"wu-px-6 wu-w-full",col:"",center:"","gap-base":""},{default:e.withCtx(()=>[u.value?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-10 wu-h-10 wu-object-contain",src:u.value.logo,alt:""},null,8,Rl)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(j,{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(g.value),1)]),_:1})):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(j,{key:2,class:"wu-text-center","extra-large":"",semibold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1})):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createBlock(j,{key:3,class:"wu-w-64 wu-text-center",small:"",gray:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})):e.createCommentVNode("",!0),e.unref(i).length>0?(e.openBlock(),e.createBlock($,{key:4,class:"wu-rounded-full wu-px-2 wu-h-6 wu-bg-[var(--wu-action)]","padding-sm":"","gap-sm":"",center:""},{default:e.withCtx(()=>[e.createVNode(D,{class:"!wu-text-[var(--wu-action-fg)]",small:""},{default:e.withCtx(()=>[...y[2]||(y[2]=[e.createTextVNode("check",-1)])]),_:1}),e.createVNode(j,{class:"!wu-text-[var(--wu-action-fg)]",semibold:"","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.rule?.name),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1}),l.value.length?(e.openBlock(),e.createElementBlock("div",Hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,b=>(e.openBlock(),e.createBlock(Re,{key:b.id,edge:b,onClick:y[0]||(y[0]=v=>r("edge-click",v))},null,8,["edge"]))),128)),p.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-flex wu-items-start wu-overflow-x-auto wu-w-full invisible-scrollbar wu-pt-6",{"wu-justify-start":p.value.length>4,"wu-justify-center":p.value.length<=4}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,b=>(e.openBlock(),e.createBlock(Re,{key:b.id,edge:b,icon:"",onClick:y[1]||(y[1]=v=>r("edge-click",v))},null,8,["edge"]))),128))],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),Fl="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=",Ul={class:"wu-flex wu-flex-col wu-h-full wu-w-full wu-bg-white wu-overflow-hidden dark:wu-bg-neutral-800"},Wl={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)]"},Yl={class:"wu-flex wu-items-center wu-gap-3 wu-min-w-0 wu-flex-1"},Gl=["src"],Ql={class:"wu-flex wu-flex-col wu-justify-center wu-min-w-0 wu-overflow-hidden"},Zl={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0"},Jl={key:0,class:"wu-flex wu-shrink-0 wu-items-center wu-w-fit wu-justify-center wu-px-6 wu-py-4"},ql={class:"wu-flex wu-flex-col wu-w-full wu-flex-1 wu-min-h-0 wu-overflow-y-auto wu-gap-8"},Kl={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"},Xl=["src"],eu=e.defineComponent({inheritAttrs:!1,__name:"app-widget-view",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-action","edge-click","chat-service-message-action","submit","close","back"],setup(t,{emit:o}){const n=t,r=o,{history:i,currentRule:a,currentHeader:s,edges:l,language:u,setWorkflow:c,setConfig:p}=Te(),{appearanceStyle:d,themeClass:g}=Fi(()=>n.config.configurations.appearance);c(n.workflow),p(n.config),e.watch(()=>n.workflow,k=>c(k)),e.watch(()=>n.config,k=>p(k));const m=e.computed(()=>i.value.length>0),f=e.computed(()=>m.value&&a.value?.action!=="widget-identification-screen"),w=e.computed(()=>n.config.configurations.general.isClosable),y=e.computed(()=>X(s.value?.title,u.value)),b=e.computed(()=>X(s.value?.subtitle,u.value)),v={"widget-identification-screen":rn,"widget-article-screen":sn,"widget-service-screen":yn,"widget-base-screen":vn},h=e.computed(()=>{const k=a.value?.action;return k&&k in v?v[k]:void 0}),x=e.computed(()=>n.fullscreen?"wu-w-full wu-h-[100dvh] wu-max-h-full":"wu-w-[24.5rem] wu-h-[43rem] wu-max-h-[calc(100dvh-2*var(--widget-offset-y,1rem))] widget-shadow wu-rounded-2xl");return(k,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yunique wu-overflow-hidden wu-relative",[x.value,e.unref(g)]]),"data-testid":"app-widget-view",style:e.normalizeStyle(e.unref(d))},[e.createElementVNode("div",Ul,[e.createElementVNode("div",Wl,[e.createElementVNode("div",Yl,[e.unref(s)?.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"wu-w-9 wu-h-9 wu-object-contain wu-shrink-0",src:e.unref(s).logo,alt:""},null,8,Gl)):e.createCommentVNode("",!0),e.createElementVNode("div",Ql,[y.value?(e.openBlock(),e.createBlock(j,{key:0,class:"wu-w-full wu-truncate !wu-text-inherit",bold:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1})):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(j,{key:1,class:"wu-w-full wu-truncate !wu-text-inherit wu-opacity-75","extra-small":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.value),1)]),_:1})):e.createCommentVNode("",!0)])]),w.value?(e.openBlock(),e.createBlock(H,{key:0,class:"wu-shrink-0 !wu-bg-transparent hover:!wu-bg-[color-mix(in_srgb,var(--wu-primary-fg)_12%,transparent)]",onClick:C[0]||(C[0]=E=>r("close")),"data-testid":"app-widget-close",small:"",icon:""},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[...C[7]||(C[7]=[e.createTextVNode("close",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Zl,[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(a)?.id},[f.value?(e.openBlock(),e.createElementBlock("div",Jl,[e.createElementVNode("div",{class:"wu-flex wu-items-center wu-w-fit wu-justify-center wu-cursor-pointer wu-group",onClick:C[1]||(C[1]=E=>r("back"))},[e.createVNode(D,{class:"wu-transition-colors group-hover:!wu-text-gray-700 dark:group-hover:!wu-text-neutral-200",small:"",gray:""},{default:e.withCtx(()=>[...C[8]||(C[8]=[e.createTextVNode("chevron_left",-1)])]),_:1}),e.createVNode(j,{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[9]||(C[9]=[e.createTextVNode("Voltar",-1)])]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("div",ql,[h.value&&e.unref(a)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),{key:0,rule:e.unref(a),edges:e.unref(l),onSubmit:C[2]||(C[2]=E=>r("submit",E)),onBack:C[3]||(C[3]=E=>r("back")),onEdgeClick:C[4]||(C[4]=E=>r("edge-click",E)),onChatServiceAction:C[5]||(C[5]=E=>r("chat-service-action",E)),onChatServiceMessageAction:C[6]||(C[6]=E=>r("chat-service-message-action",E))},null,40,["rule","edges"])):e.createCommentVNode("",!0)])]))]),_:1})]),e.createElementVNode("div",Kl,[e.createElementVNode("img",{class:"wu-w-3 wu-h-2",src:e.unref(Fl),alt:"Opens"},null,8,Xl),e.createVNode(j,{class:"!wu-text-xxs",gray:""},{default:e.withCtx(()=>[...C[10]||(C[10]=[e.createTextVNode("Powered By",-1),e.createElementVNode("b",{class:"wu-ml-1"},"Opens",-1)])]),_:1})])])],6))}}),xn=Fe(eu,[["__scopeId","data-v-19999fa9"]]),tu={class:"wu-flex wu-h-full wu-pl-3 wu-gap-2 wu-z-10 wu-pointer-events-none"},ou={class:"wu-h-full wu-flex wu-items-center wu-justify-center"},nu=["value","type","disabled","maxlength"],iu={class:"wu-absolute wu-right-2 wu-z-10 wu-flex wu-items-center wu-gap-1 wu-text-gray-500"},Ui=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,a=e.computed(()=>e.useSlots());function s(C){return!!a.value[C]}const l=e.ref(""),u=e.ref(!1),c=e.ref(!1);function p(C){if(!r.maskFunction)return C;try{const E=r.maskFunction(C);return typeof E=="string"?E:C}catch{return C}}e.watch(()=>r.modelValue,C=>{if(C==null){l.value="";return}l.value=r.maskFunction?p(C):C},{immediate:!0});function d(){return!(u.value||l.value)}const{height:g,textSize:m,width:f}=Li(r),w=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"),y=e.computed(()=>r.invalid?"wu-text-red-500":r.valid?"wu-text-green-500":"wu-text-gray-500"),b=e.computed(()=>r.small&&d()?"wu-translate-y-[7px]":r.small&&!d()?"wu-translate-y-0":d()?"wu-translate-y-[11px]":"wu-translate-y-0"),v=e.computed(()=>s("icon")||r.loading?"wu-pl-[34px]":"wu-pl-3"),h=e.computed(()=>r.block?"wu-rounded-none":r.round?"wu-rounded-full":"wu-rounded-lg"),x=e.computed(()=>r.disabled||r.loading?"wu-opacity-50 wu-pointer-events-none":"");function k(C){const I=C.target.value;l.value=r.maskFunction?p(I):I,i("update:modelValue",l.value)}return o({focus:u,content:l}),(C,E)=>(e.openBlock(),e.createBlock($,{class:e.normalizeClass([e.unref(f)]),col:"","gap-none":""},{default:e.withCtx(()=>[e.createVNode($,{col:"","gap-sm":""},{default:e.withCtx(()=>[s("label")?(e.openBlock(),e.createBlock(j,{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",[h.value,x.value,e.unref(g),w.value]]),"data-testid":"app-text-input"},[e.createElementVNode("div",tu,[e.createElementVNode("div",ou,[!t.loading&&s("icon")?(e.openBlock(),e.createBlock(D,{key:0,small:""},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"icon")]),_:3})):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createBlock(D,{key:1,class:"wu-animate-spin",small:"",outlined:""},{default:e.withCtx(()=>[...E[4]||(E[4]=[e.createTextVNode("progress_activity",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(j,{class:e.normalizeClass(["wu-py-1 wu-transition",[b.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(m),v.value,h.value]]),value:l.value,type:t.passwordToggle&&c.value?"text":t.type,disabled:t.disabled||t.loading,maxlength:t.maxLength,onInput:k,onFocus:E[0]||(E[0]=I=>u.value=!0),onBlur:E[1]||(E[1]=I=>u.value=!1),onKeyup:E[2]||(E[2]=e.withKeys(I=>i("keyup-enter"),["enter"]))},null,42,nu),e.createElementVNode("div",iu,[t.maxLength?(e.openBlock(),e.createBlock(j,{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:E[3]||(E[3]=I=>c.value=!c.value)},[e.createVNode(D,{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}),s("feedback")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["wu-mt-1",[y.value]])},[e.renderSlot(C.$slots,"feedback")],2)):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),ru=()=>({getOffset:(r,i)=>{const a=`${i.x}px`,s=`${i.y}px`;switch(r){case"bottom-left":return{bottom:s,left:a};case"top-left":return{top:s,left:a};case"top-right":return{top:s,right:a};default:return{bottom:s,right:a}}},getPosition:r=>{switch(r){case"bottom-left":return"bottom left";case"top-left":return"top left";case"top-right":return"top right";default:return"bottom right"}},getTone:r=>({backgroundImage:"none",backgroundColor:"var(--wu-primary)",color:"var(--wu-primary-fg)"})}),au={key:0,class:"wu-flex wu-relative"},su=e.defineComponent({__name:"app-widget",props:{workflow:{},config:{},fullscreen:{type:Boolean}},emits:["chat-service-message-action","chat-service-action","edge-click","submit","close","back","open"],setup(t,{emit:o}){const n=t,r=o,{isOpen:i,config:a,chat:s,language:l,open:u,close:c,setWorkflow:p,setConfig:d}=Te(),{getOffset:g,getPosition:m}=ru(),{appearanceStyle:f,themeClass:w}=Fi(()=>n.config.configurations.appearance),y=e.computed(()=>n.config.configurations.notifications?.enabled??!0),b=e.computed(()=>y.value&&s.unreadMessagesCount.value>0),v=n.config.configurations.general.defaultBehavior==="active",h=e.ref(!v);v?u():c();const x=e.computed(()=>n.config.configurations.anchor),k=e.computed(()=>{if(!(i.value&&n.fullscreen))return{...g(x.value.position,x.value.offset),"--widget-offset-y":`${x.value.offset.y}px`}}),C=e.computed(()=>m(x.value.position)),E=e.computed(()=>({workflow:n.workflow,config:n.config,fullscreen:n.fullscreen})),I=e.computed(()=>({small:x.value.size==="small",large:x.value.size==="large",logo:x.value.logo??"",label:X(x.value.label,l.value)})),A=async()=>{i.value||(h.value=!1,await e.nextTick(),u(),r("open"))},S=()=>{i.value&&(c(),r("close"))},V=()=>{h.value=!0};return p(n.workflow),d(n.config),e.watch(()=>n.workflow,P=>p(P)),e.watch(()=>n.config,P=>d(P)),e.watch(()=>a.value?.configurations.general.defaultBehavior,P=>{P==="active"?A():S()},{immediate:!0}),e.watch(i,P=>{P&&(h.value=!1)}),(P,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wu-fixed yunique wu-z-[99999]",[e.unref(w),e.unref(i)&&t.fullscreen?"wu-inset-0 wu-overflow-hidden":""]]),"data-testid":"app-widget",style:e.normalizeStyle([{"--widget-origin":C.value},k.value,e.unref(f)])},[e.createVNode(e.Transition,{name:"widget",onAfterLeave:V},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createBlock(xn,e.mergeProps({key:0},E.value,{onClose:S,onBack:T[0]||(T[0]=B=>r("back")),onSubmit:T[1]||(T[1]=B=>r("submit",B)),onEdgeClick:T[2]||(T[2]=B=>r("edge-click",B)),onChatServiceAction:T[3]||(T[3]=B=>r("chat-service-action",B)),onChatServiceMessageAction:T[4]||(T[4]=B=>r("chat-service-message-action",B))}),null,16)):e.createCommentVNode("",!0)]),_:1}),h.value?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(an,{small:I.value.small,large:I.value.large,logo:I.value.logo,label:I.value.label,onClick:A},null,8,["small","large","logo","label"]),b.value?(e.openBlock(),e.createBlock($,{key:0,class:"wu-rounded-full wu-absolute -wu-top-2 -wu-right-1 wu-h-5 wu-w-5 wu-bg-red-600","data-testid":"app-widget-unread-badge",center:""},{default:e.withCtx(()=>[e.createVNode(j,{small:"",bold:"",white:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).unreadMessagesCount>9?"9+":e.unref(s).unreadMessagesCount),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))}}),Wi=Fe(su,[["__scopeId","data-v-186731ce"]]),lu=["top","right","bottom","left"],Wn=["start","end"],Yn=lu.reduce((t,o)=>t.concat(o,o+"-"+Wn[0],o+"-"+Wn[1]),[]),st=Math.min,Se=Math.max,uu={left:"right",right:"left",bottom:"top",top:"bottom"},cu={start:"end",end:"start"};function Zo(t,o,n){return Se(t,st(o,n))}function Be(t,o){return typeof t=="function"?t(o):t}function pe(t){return t.split("-")[0]}function ae(t){return t.split("-")[1]}function Yi(t){return t==="x"?"y":"x"}function bn(t){return t==="y"?"height":"width"}const du=new Set(["top","bottom"]);function he(t){return du.has(pe(t))?"y":"x"}function kn(t){return Yi(he(t))}function Gi(t,o,n){n===void 0&&(n=!1);const r=ae(t),i=kn(t),a=bn(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(s=Xt(s)),[s,Xt(s)]}function pu(t){const o=Xt(t);return[Kt(t),o,Kt(o)]}function Kt(t){return t.replace(/start|end/g,o=>cu[o])}const Gn=["left","right"],Qn=["right","left"],mu=["top","bottom"],gu=["bottom","top"];function fu(t,o,n){switch(t){case"top":case"bottom":return n?o?Qn:Gn:o?Gn:Qn;case"left":case"right":return o?mu:gu;default:return[]}}function hu(t,o,n,r){const i=ae(t);let a=fu(pe(t),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),o&&(a=a.concat(a.map(Kt)))),a}function Xt(t){return t.replace(/left|right|bottom|top/g,o=>uu[o])}function wu(t){return{top:0,right:0,bottom:0,left:0,...t}}function Qi(t){return typeof t!="number"?wu(t):{top:t,right:t,bottom:t,left:t}}function tt(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 Zn(t,o,n){let{reference:r,floating:i}=t;const a=he(o),s=kn(o),l=bn(s),u=pe(o),c=a==="y",p=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,g=r[l]/2-i[l]/2;let m;switch(u){case"top":m={x:p,y:r.y-i.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(ae(o)){case"start":m[s]-=g*(n&&c?-1:1);break;case"end":m[s]+=g*(n&&c?-1:1);break}return m}const yu=async(t,o,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(o));let c=await s.getElementRects({reference:t,floating:o,strategy:i}),{x:p,y:d}=Zn(c,r,u),g=r,m={},f=0;for(let w=0;w<l.length;w++){const{name:y,fn:b}=l[w],{x:v,y:h,data:x,reset:k}=await b({x:p,y:d,initialPlacement:r,placement:g,strategy:i,middlewareData:m,rects:c,platform:s,elements:{reference:t,floating:o}});p=v??p,d=h??d,m={...m,[y]:{...m[y],...x}},k&&f<=50&&(f++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:t,floating:o,strategy:i}):k.rects),{x:p,y:d}=Zn(c,g,u)),w=-1)}return{x:p,y:d,placement:g,strategy:i,middlewareData:m}};async function lo(t,o){var n;o===void 0&&(o={});const{x:r,y:i,platform:a,rects:s,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:g=!1,padding:m=0}=Be(o,t),f=Qi(m),y=l[g?d==="floating"?"reference":"floating":d],b=tt(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:p,strategy:u})),v=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,h=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),x=await(a.isElement==null?void 0:a.isElement(h))?await(a.getScale==null?void 0:a.getScale(h))||{x:1,y:1}:{x:1,y:1},k=tt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:h,strategy:u}):v);return{top:(b.top-k.top+f.top)/x.y,bottom:(k.bottom-b.bottom+f.bottom)/x.y,left:(b.left-k.left+f.left)/x.x,right:(k.right-b.right+f.right)/x.x}}const vu=t=>({name:"arrow",options:t,async fn(o){const{x:n,y:r,placement:i,rects:a,platform:s,elements:l,middlewareData:u}=o,{element:c,padding:p=0}=Be(t,o)||{};if(c==null)return{};const d=Qi(p),g={x:n,y:r},m=kn(i),f=bn(m),w=await s.getDimensions(c),y=m==="y",b=y?"top":"left",v=y?"bottom":"right",h=y?"clientHeight":"clientWidth",x=a.reference[f]+a.reference[m]-g[m]-a.floating[f],k=g[m]-a.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=C?C[h]:0;(!E||!await(s.isElement==null?void 0:s.isElement(C)))&&(E=l.floating[h]||a.floating[f]);const I=x/2-k/2,A=E/2-w[f]/2-1,S=st(d[b],A),V=st(d[v],A),P=S,T=E-w[f]-V,B=E/2-w[f]/2+I,F=Zo(P,B,T),U=!u.arrow&&ae(i)!=null&&B!==F&&a.reference[f]/2-(B<P?S:V)-w[f]/2<0,Y=U?B<P?B-P:B-T:0;return{[m]:g[m]+Y,data:{[m]:F,centerOffset:B-F-Y,...U&&{alignmentOffset:Y}},reset:U}}});function xu(t,o,n){return(t?[...n.filter(i=>ae(i)===t),...n.filter(i=>ae(i)!==t)]:n.filter(i=>pe(i)===i)).filter(i=>t?ae(i)===t||(o?Kt(i)!==i:!1):!0)}const bu=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(o){var n,r,i;const{rects:a,middlewareData:s,placement:l,platform:u,elements:c}=o,{crossAxis:p=!1,alignment:d,allowedPlacements:g=Yn,autoAlignment:m=!0,...f}=Be(t,o),w=d!==void 0||g===Yn?xu(d||null,m,g):g,y=await lo(o,f),b=((n=s.autoPlacement)==null?void 0:n.index)||0,v=w[b];if(v==null)return{};const h=Gi(v,a,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==v)return{reset:{placement:w[0]}};const x=[y[pe(v)],y[h[0]],y[h[1]]],k=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:v,overflows:x}],C=w[b+1];if(C)return{data:{index:b+1,overflows:k},reset:{placement:C}};const E=k.map(S=>{const V=ae(S.placement);return[S.placement,V&&p?S.overflows.slice(0,2).reduce((P,T)=>P+T,0):S.overflows[0],S.overflows]}).sort((S,V)=>S[1]-V[1]),A=((i=E.filter(S=>S[2].slice(0,ae(S[0])?2:3).every(V=>V<=0))[0])==null?void 0:i[0])||E[0][0];return A!==l?{data:{index:b+1,overflows:k},reset:{placement:A}}:{}}}},ku=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:c}=o,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:w=!0,...y}=Be(t,o);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=pe(i),v=he(l),h=pe(l)===l,x=await(u.isRTL==null?void 0:u.isRTL(c.floating)),k=g||(h||!w?[Xt(l)]:pu(l)),C=f!=="none";!g&&C&&k.push(...hu(l,w,f,x));const E=[l,...k],I=await lo(o,y),A=[];let S=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&A.push(I[b]),d){const B=Gi(i,s,x);A.push(I[B[0]],I[B[1]])}if(S=[...S,{placement:i,overflows:A}],!A.every(B=>B<=0)){var V,P;const B=(((V=a.flip)==null?void 0:V.index)||0)+1,F=E[B];if(F&&(!(d==="alignment"?v!==he(F):!1)||S.every(W=>he(W.placement)===v?W.overflows[0]>0:!0)))return{data:{index:B,overflows:S},reset:{placement:F}};let U=(P=S.filter(Y=>Y.overflows[0]<=0).sort((Y,W)=>Y.overflows[1]-W.overflows[1])[0])==null?void 0:P.placement;if(!U)switch(m){case"bestFit":{var T;const Y=(T=S.filter(W=>{if(C){const Q=he(W.placement);return Q===v||Q==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,we)=>Q+we,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:T[0];Y&&(U=Y);break}case"initialPlacement":U=l;break}if(i!==U)return{reset:{placement:U}}}return{}}}},Mu=new Set(["left","top"]);async function Cu(t,o){const{placement:n,platform:r,elements:i}=t,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=pe(n),l=ae(n),u=he(n)==="y",c=Mu.has(s)?-1:1,p=a&&u?-1:1,d=Be(o,t);let{mainAxis:g,crossAxis:m,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof f=="number"&&(m=l==="end"?f*-1:f),u?{x:m*p,y:g*c}:{x:g*c,y:m*p}}const Au=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:i,y:a,placement:s,middlewareData:l}=o,u=await Cu(o,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},Nu=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:i}=o,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:b,y:v}=y;return{x:b,y:v}}},...u}=Be(t,o),c={x:n,y:r},p=await lo(o,u),d=he(pe(i)),g=Yi(d);let m=c[g],f=c[d];if(a){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",v=m+p[y],h=m-p[b];m=Zo(v,m,h)}if(s){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",v=f+p[y],h=f-p[b];f=Zo(v,f,h)}const w=l.fn({...o,[g]:m,[d]:f});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:a,[d]:s}}}}}},Tu=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:i,rects:a,platform:s,elements:l}=o,{apply:u=()=>{},...c}=Be(t,o),p=await lo(o,c),d=pe(i),g=ae(i),m=he(i)==="y",{width:f,height:w}=a.floating;let y,b;d==="top"||d==="bottom"?(y=d,b=g===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=d,y=g==="end"?"top":"bottom");const v=w-p.top-p.bottom,h=f-p.left-p.right,x=st(w-p[y],v),k=st(f-p[b],h),C=!o.middlewareData.shift;let E=x,I=k;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(I=h),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(E=v),C&&!g){const S=Se(p.left,0),V=Se(p.right,0),P=Se(p.top,0),T=Se(p.bottom,0);m?I=f-2*(S!==0||V!==0?S+V:Se(p.left,p.right)):E=w-2*(P!==0||T!==0?P+T:Se(p.top,p.bottom))}await u({...o,availableWidth:I,availableHeight:E});const A=await s.getDimensions(l.floating);return f!==A.width||w!==A.height?{reset:{rects:!0}}:{}}}};function ie(t){var o;return((o=t.ownerDocument)==null?void 0:o.defaultView)||window}function ce(t){return ie(t).getComputedStyle(t)}const Jn=Math.min,ot=Math.max,eo=Math.round;function Zi(t){const o=ce(t);let n=parseFloat(o.width),r=parseFloat(o.height);const i=t.offsetWidth,a=t.offsetHeight,s=eo(n)!==i||eo(r)!==a;return s&&(n=i,r=a),{width:n,height:r,fallback:s}}function Ne(t){return qi(t)?(t.nodeName||"").toLowerCase():""}let vt;function Ji(){if(vt)return vt;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(vt=t.brands.map((o=>o.brand+"/"+o.version)).join(" "),vt):navigator.userAgent}function de(t){return t instanceof ie(t).HTMLElement}function Ce(t){return t instanceof ie(t).Element}function qi(t){return t instanceof ie(t).Node}function qn(t){return typeof ShadowRoot>"u"?!1:t instanceof ie(t).ShadowRoot||t instanceof ShadowRoot}function uo(t){const{overflow:o,overflowX:n,overflowY:r,display:i}=ce(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&!["inline","contents"].includes(i)}function Iu(t){return["table","td","th"].includes(Ne(t))}function Jo(t){const o=/firefox/i.test(Ji()),n=ce(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 a=n.contain;return a!=null&&a.includes(i)}))}function Ki(){return!/^((?!chrome|android).)*safari/i.test(Ji())}function Mn(t){return["html","body","#document"].includes(Ne(t))}function Xi(t){return Ce(t)?t:t.contextElement}const er={x:1,y:1};function Oe(t){const o=Xi(t);if(!de(o))return er;const n=o.getBoundingClientRect(),{width:r,height:i,fallback:a}=Zi(o);let s=(a?eo(n.width):n.width)/r,l=(a?eo(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}function lt(t,o,n,r){var i,a;o===void 0&&(o=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),l=Xi(t);let u=er;o&&(r?Ce(r)&&(u=Oe(r)):u=Oe(t));const c=l?ie(l):window,p=!Ki()&&n;let d=(s.left+(p&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,g=(s.top+(p&&((a=c.visualViewport)==null?void 0:a.offsetTop)||0))/u.y,m=s.width/u.x,f=s.height/u.y;if(l){const w=ie(l),y=r&&Ce(r)?ie(r):r;let b=w.frameElement;for(;b&&r&&y!==w;){const v=Oe(b),h=b.getBoundingClientRect(),x=getComputedStyle(b);h.x+=(b.clientLeft+parseFloat(x.paddingLeft))*v.x,h.y+=(b.clientTop+parseFloat(x.paddingTop))*v.y,d*=v.x,g*=v.y,m*=v.x,f*=v.y,d+=h.x,g+=h.y,b=ie(b).frameElement}}return{width:m,height:f,top:g,right:d+m,bottom:g+f,left:d,x:d,y:g}}function Ae(t){return((qi(t)?t.ownerDocument:t.document)||window.document).documentElement}function co(t){return Ce(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function tr(t){return lt(Ae(t)).left+co(t).scrollLeft}function ut(t){if(Ne(t)==="html")return t;const o=t.assignedSlot||t.parentNode||qn(t)&&t.host||Ae(t);return qn(o)?o.host:o}function or(t){const o=ut(t);return Mn(o)?o.ownerDocument.body:de(o)&&uo(o)?o:or(o)}function to(t,o){var n;o===void 0&&(o=[]);const r=or(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),a=ie(r);return i?o.concat(a,a.visualViewport||[],uo(r)?r:[]):o.concat(r,to(r))}function Kn(t,o,n){return o==="viewport"?tt((function(r,i){const a=ie(r),s=Ae(r),l=a.visualViewport;let u=s.clientWidth,c=s.clientHeight,p=0,d=0;if(l){u=l.width,c=l.height;const g=Ki();(g||!g&&i==="fixed")&&(p=l.offsetLeft,d=l.offsetTop)}return{width:u,height:c,x:p,y:d}})(t,n)):Ce(o)?tt((function(r,i){const a=lt(r,!0,i==="fixed"),s=a.top+r.clientTop,l=a.left+r.clientLeft,u=de(r)?Oe(r):{x:1,y:1};return{width:r.clientWidth*u.x,height:r.clientHeight*u.y,x:l*u.x,y:s*u.y}})(o,n)):tt((function(r){const i=Ae(r),a=co(r),s=r.ownerDocument.body,l=ot(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=ot(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let c=-a.scrollLeft+tr(r);const p=-a.scrollTop;return ce(s).direction==="rtl"&&(c+=ot(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:c,y:p}})(Ae(t)))}function Xn(t){return de(t)&&ce(t).position!=="fixed"?t.offsetParent:null}function ei(t){const o=ie(t);let n=Xn(t);for(;n&&Iu(n)&&ce(n).position==="static";)n=Xn(n);return n&&(Ne(n)==="html"||Ne(n)==="body"&&ce(n).position==="static"&&!Jo(n))?o:n||(function(r){let i=ut(r);for(;de(i)&&!Mn(i);){if(Jo(i))return i;i=ut(i)}return null})(t)||o}function Su(t,o,n){const r=de(o),i=Ae(o),a=lt(t,!0,n==="fixed",o);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&n!=="fixed")if((Ne(o)!=="body"||uo(i))&&(s=co(o)),de(o)){const u=lt(o,!0);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else i&&(l.x=tr(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const Lu={getClippingRect:function(t){let{element:o,boundary:n,rootBoundary:r,strategy:i}=t;const a=n==="clippingAncestors"?(function(c,p){const d=p.get(c);if(d)return d;let g=to(c).filter((y=>Ce(y)&&Ne(y)!=="body")),m=null;const f=ce(c).position==="fixed";let w=f?ut(c):c;for(;Ce(w)&&!Mn(w);){const y=ce(w),b=Jo(w);(f?b||m:b||y.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=y:g=g.filter((v=>v!==w)),w=ut(w)}return p.set(c,g),g})(o,this._c):[].concat(n),s=[...a,r],l=s[0],u=s.reduce(((c,p)=>{const d=Kn(o,p,i);return c.top=ot(d.top,c.top),c.right=Jn(d.right,c.right),c.bottom=Jn(d.bottom,c.bottom),c.left=ot(d.left,c.left),c}),Kn(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=de(n),a=Ae(n);if(n===a)return o;let s={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((i||!i&&r!=="fixed")&&((Ne(n)!=="body"||uo(a))&&(s=co(n)),de(n))){const c=lt(n);l=Oe(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-s.scrollLeft*l.x+u.x,y:o.y*l.y-s.scrollTop*l.y+u.y}},isElement:Ce,getDimensions:function(t){return de(t)?Zi(t):t.getBoundingClientRect()},getOffsetParent:ei,getDocumentElement:Ae,getScale:Oe,async getElementRects(t){let{reference:o,floating:n,strategy:r}=t;const i=this.getOffsetParent||ei,a=this.getDimensions;return{reference:Su(o,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>ce(t).direction==="rtl"},Eu=(t,o,n)=>{const r=new Map,i={platform:Lu,...n},a={...i.platform,_c:r};return yu(t,o,{...i,platform:a})};function nr(t,o){for(const n in o)Object.prototype.hasOwnProperty.call(o,n)&&(typeof o[n]=="object"&&t[n]?nr(t[n],o[n]):t[n]=o[n])}const se={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 ct(t,o){let n=se.themes[t]||{},r;do r=n[o],typeof r>"u"?n.$extend?n=se.themes[n.$extend]||{}:(n=null,r=se[o]):n=null;while(n);return r}function Du(t){const o=[t];let n=se.themes[t]||{};do n.$extend&&!n.$resetCss?(o.push(n.$extend),n=se.themes[n.$extend]||{}):n=null;while(n);return o.map(r=>`v-popper--theme-${r}`)}function ti(t){const o=[t];let n=se.themes[t]||{};do n.$extend?(o.push(n.$extend),n=se.themes[n.$extend]||{}):n=null;while(n);return o}let He=!1;if(typeof window<"u"){He=!1;try{const t=Object.defineProperty({},"passive",{get(){He=!0}});window.addEventListener("test",null,t)}catch{}}let ir=!1;typeof window<"u"&&typeof navigator<"u"&&(ir=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const rr=["auto","top","bottom","left","right"].reduce((t,o)=>t.concat([o,`${o}-start`,`${o}-end`]),[]),oi={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},ni={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function ii(t,o){const n=t.indexOf(o);n!==-1&&t.splice(n,1)}function So(){return new Promise(t=>requestAnimationFrame(()=>{requestAnimationFrame(t)}))}const re=[];let Ie=null;const ri={};function ai(t){let o=ri[t];return o||(o=ri[t]=[]),o}let qo=function(){};typeof window<"u"&&(qo=window.Element);function R(t){return function(o){return ct(o.theme,t)}}const Lo="__floating-vue__popper",ar=()=>e.defineComponent({name:"VPopper",provide(){return{[Lo]:{parentPopper:this}}},inject:{[Lo]:{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:R("disabled")},positioningDisabled:{type:Boolean,default:R("positioningDisabled")},placement:{type:String,default:R("placement"),validator:t=>rr.includes(t)},delay:{type:[String,Number,Object],default:R("delay")},distance:{type:[Number,String],default:R("distance")},skidding:{type:[Number,String],default:R("skidding")},triggers:{type:Array,default:R("triggers")},showTriggers:{type:[Array,Function],default:R("showTriggers")},hideTriggers:{type:[Array,Function],default:R("hideTriggers")},popperTriggers:{type:Array,default:R("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:R("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:R("popperHideTriggers")},container:{type:[String,Object,qo,Boolean],default:R("container")},boundary:{type:[String,qo],default:R("boundary")},strategy:{type:String,validator:t=>["absolute","fixed"].includes(t),default:R("strategy")},autoHide:{type:[Boolean,Function],default:R("autoHide")},handleResize:{type:Boolean,default:R("handleResize")},instantMove:{type:Boolean,default:R("instantMove")},eagerMount:{type:Boolean,default:R("eagerMount")},popperClass:{type:[String,Array,Object],default:R("popperClass")},computeTransformOrigin:{type:Boolean,default:R("computeTransformOrigin")},autoMinSize:{type:Boolean,default:R("autoMinSize")},autoSize:{type:[Boolean,String],default:R("autoSize")},autoMaxSize:{type:Boolean,default:R("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:R("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:R("preventOverflow")},overflowPadding:{type:[Number,String],default:R("overflowPadding")},arrowPadding:{type:[Number,String],default:R("arrowPadding")},arrowOverflow:{type:Boolean,default:R("arrowOverflow")},flip:{type:Boolean,default:R("flip")},shift:{type:Boolean,default:R("shift")},shiftCrossAxis:{type:Boolean,default:R("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:R("noAutoFocus")},disposeTimeout:{type:Number,default:R("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[Lo])==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(Au({mainAxis:this.distance,crossAxis:this.skidding}));const o=this.placement.startsWith("auto");if(o?t.middleware.push(bu({alignment:this.placement.split("-")[1]??""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(Nu({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!o&&this.flip&&t.middleware.push(ku({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(vu({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:i,middlewareData:a})=>{let s;const{centerOffset:l}=a.arrow;return r.startsWith("top")||r.startsWith("bottom")?s=Math.abs(l)>i.reference.width/2:s=Math.abs(l)>i.reference.height/2,{data:{overflow:s}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:i,placement:a,middlewareData:s})=>{var l;if((l=s.autoSize)!=null&&l.skip)return{};let u,c;return a.startsWith("top")||a.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(Tu({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 Eu(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),Ie&&this.instantMove&&Ie.instantMove&&Ie!==this.parentPopper){Ie.$_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&&(Ie=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 So(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...to(this.$_referenceNode),...to(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),a=o.y+o.height/2-(r.top+n.offsetTop);this.result.transformOrigin=`${i}px ${a}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<re.length;n++)o=re[n],o.showGroup!==t&&(o.hide(),o.$emit("close-group"))}re.push(this),document.body.classList.add("v-popper--some-open");for(const o of ti(this.theme))ai(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 So(),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,ii(re,this),re.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of ti(this.theme)){const r=ai(n);ii(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}Ie===this&&(Ie=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 So(),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,oi,this.triggers,this.showTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],oi,this.popperTriggers,this.popperShowTriggers,t);const o=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,ni,this.triggers,this.hideTriggers,o),this.$_registerTriggerListeners([this.$_popperNode],ni,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,He?{passive:!0}:void 0))},$_registerTriggerListeners(t,o,n,r,i){let a=n;r!=null&&(a=typeof r=="function"?r(a):r),a.forEach(s=>{const l=o[s];l&&this.$_registerEventListeners(t,l,i)})},$_removeEventListeners(t){const o=[];this.$_events.forEach(n=>{const{targetNodes:r,eventType:i,handler:a}=n;!t||t===i?r.forEach(s=>s.removeEventListener(i,a)):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(nt>=t.left&&nt<=t.right&&it>=t.top&&it<=t.bottom){const o=this.$_popperNode.getBoundingClientRect(),n=nt-xe,r=it-be,i=o.left+o.width/2-xe+(o.top+o.height/2)-be+o.width+o.height,a=xe+n*i,s=be+r*i;return xt(xe,be,a,s,o.left,o.top,o.left,o.bottom)||xt(xe,be,a,s,o.left,o.top,o.right,o.top)||xt(xe,be,a,s,o.right,o.top,o.right,o.bottom)||xt(xe,be,a,s,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(ir){const t=He?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",o=>si(o,!0),t),document.addEventListener("touchend",o=>li(o,!0),t)}else window.addEventListener("mousedown",t=>si(t,!1),!0),window.addEventListener("click",t=>li(t,!1),!0);window.addEventListener("resize",ju)}function si(t,o){if(se.autoHideOnMousedown)sr(t,o);else for(let n=0;n<re.length;n++){const r=re[n];try{r.mouseDownContains=r.popperNode().contains(t.target)}catch{}}}function li(t,o){se.autoHideOnMousedown||sr(t,o)}function sr(t,o){const n={};for(let r=re.length-1;r>=0;r--){const i=re[r];try{const a=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(t.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&ui(i,a,t)){if(i.$_handleGlobalClose(t,o),!t.closeAllPopover&&t.closePopover&&a){let l=i.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let s=i.parentPopper;for(;s&&ui(s,s.containsGlobalTarget,t);)s.$_handleGlobalClose(t,o),s=s.parentPopper}})}catch{}}}function ui(t,o,n){return n.closeAllPopover||n.closePopover&&o||Bu(t,n)&&!o}function Bu(t,o){if(typeof t.autoHide=="function"){const n=t.autoHide(o);return t.lastAutoHide=n,n}return t.autoHide}function ju(){for(let t=0;t<re.length;t++)re[t].$_computePosition()}let xe=0,be=0,nt=0,it=0;typeof window<"u"&&window.addEventListener("mousemove",t=>{xe=nt,be=it,nt=t.clientX,it=t.clientY},He?{passive:!0}:void 0);function xt(t,o,n,r,i,a,s,l){const u=((s-i)*(o-a)-(l-a)*(t-i))/((l-a)*(n-t)-(s-i)*(r-o)),c=((n-t)*(o-a)-(r-o)*(t-i))/((l-a)*(n-t)-(s-i)*(r-o));return u>=0&&u<=1&&c>=0&&c<=1}const zu={extends:ar()},po=(t,o)=>{const n=t.__vccOpts||t;for(const[r,i]of o)n[r]=i;return n};function Vu(t,o,n,r,i,a){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 _u=po(zu,[["render",Vu]]);function $u(){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 Mt;function Ko(){Ko.init||(Ko.init=!0,Mt=$u()!==-1)}var mo={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ko(),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",Mt&&this.$el.appendChild(t),t.data="about:blank",Mt||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&&(!Mt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Ou=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const Pu={class:"resize-observer",tabindex:"-1"};e.popScopeId();const Ru=Ou((t,o,n,r,i,a)=>(e.openBlock(),e.createBlock("div",Pu)));mo.render=Ru;mo.__scopeId="data-v-b329ee4c";mo.__file="src/components/ResizeObserver.vue";const lr=(t="theme")=>({computed:{themeClass(){return Du(this[t])}}}),Hu=e.defineComponent({name:"VPopperContent",components:{ResizeObserver:mo},mixins:[lr()],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}}}),Fu=["id","aria-hidden","tabindex","data-popper-placement"],Uu={ref:"inner",class:"v-popper__inner"},Wu=e.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),Yu=e.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),Gu=[Wu,Yu];function Qu(t,o,n,r,i,a){const s=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",Uu,[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(s,{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)},Gu,4)],4)],46,Fu)}const ur=po(Hu,[["render",Qu]]),cr={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 Xo=function(){};typeof window<"u"&&(Xo=window.Element);const Zu=e.defineComponent({name:"VPopperWrapper",components:{Popper:_u,PopperContent:ur},mixins:[cr,lr("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,Xo,Boolean],default:void 0},boundary:{type:[String,Xo],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 Ju(t,o,n,r,i,a){const s=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:p,skipTransition:d,autoHide:g,show:m,hide:f,handleResize:w,onResize:y,classes:b,result:v})=>[e.renderSlot(t.$slots,"default",{shown:c,show:m,hide:f}),e.createVNode(s,{ref:"popperContent","popper-id":u,theme:t.finalTheme,shown:c,mounted:p,"skip-transition":d,"auto-hide":g,"handle-resize":w,classes:b,result:v,onHide:f,onResize:y},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"popper",{shown:c,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 Cn=po(Zu,[["render",Ju]]),qu={...Cn,name:"VDropdown",vPopperTheme:"dropdown"},Ku={...Cn,name:"VMenu",vPopperTheme:"menu"},Xu={...Cn,name:"VTooltip",vPopperTheme:"tooltip"},ec=e.defineComponent({name:"VTooltipDirective",components:{Popper:ar(),PopperContent:ur},mixins:[cr],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:t=>ct(t.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:t=>ct(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}}}),tc=["innerHTML"],oc=["textContent"];function nc(t,o,n,r,i,a){const s=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:p,skipTransition:d,autoHide:g,hide:m,handleResize:f,onResize:w,classes:y,result:b})=>[e.createVNode(s,{ref:"popperContent",class:e.normalizeClass({"v-popper--tooltip-loading":t.loading}),"popper-id":u,theme:t.theme,shown:c,mounted:p,"skip-transition":d,"auto-hide":g,"handle-resize":f,classes:y,result:b,onHide:m,onResize:w},{default:e.withCtx(()=>[t.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.finalContent},null,8,tc)):(e.openBlock(),e.createElementBlock("div",{key:1,textContent:e.toDisplayString(t.finalContent)},null,8,oc))]),_: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 ic=po(ec,[["render",nc]]),dr="v-popper--has-tooltip";function rc(t,o){let n=t.placement;if(!n&&o)for(const r of rr)o[r]&&(n=r);return n||(n=ct(t.theme||"tooltip","placement")),n}function pr(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=rc(r,n),r.targetNodes=()=>[t],r.referenceNode=()=>t,r}let Eo,dt,ac=0;function sc(){if(Eo)return;dt=e.ref([]),Eo=e.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:dt}},render(){return this.directives.map(o=>e.h(ic,{...o.options,shown:o.shown||o.options.shown,key:o.id}))},devtools:{hide:!0}});const t=document.createElement("div");document.body.appendChild(t),Eo.mount(t)}function lc(t,o,n){sc();const r=e.ref(pr(t,o,n)),i=e.ref(!1),a={id:ac++,options:r,shown:i};return dt.value.push(a),t.classList&&t.classList.add(dr),t.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function mr(t){if(t.$_popper){const o=dt.value.indexOf(t.$_popper.item);o!==-1&&dt.value.splice(o,1),delete t.$_popper,delete t.$_popperOldShown,delete t.$_popperMountTarget}t.classList&&t.classList.remove(dr)}function ci(t,{value:o,modifiers:n}){const r=pr(t,o,n);if(!r.content||ct(r.theme||"tooltip","disabled"))mr(t);else{let i;t.$_popper?(i=t.$_popper,i.options.value=r):i=lc(t,o,n),typeof o.shown<"u"&&o.shown!==t.$_popperOldShown&&(t.$_popperOldShown=o.shown,o.shown?i.show():i.hide())}}const uc={beforeMount:ci,updated:ci,beforeUnmount(t){mr(t)}};function di(t){t.addEventListener("mousedown",oo),t.addEventListener("click",oo),t.addEventListener("touchstart",gr,He?{passive:!0}:!1)}function pi(t){t.removeEventListener("mousedown",oo),t.removeEventListener("click",oo),t.removeEventListener("touchstart",gr),t.removeEventListener("touchend",fr),t.removeEventListener("touchcancel",hr)}function oo(t){const o=t.currentTarget;t.closePopover=!o.$_vclosepopover_touch,t.closeAllPopover=o.$_closePopoverModifiers&&!!o.$_closePopoverModifiers.all}function gr(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",fr),o.addEventListener("touchcancel",hr)}}function fr(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 hr(t){const o=t.currentTarget;o.$_vclosepopover_touch=!1}const cc={beforeMount(t,{value:o,modifiers:n}){t.$_closePopoverModifiers=n,(typeof o>"u"||o)&&di(t)},updated(t,{value:o,oldValue:n,modifiers:r}){t.$_closePopoverModifiers=r,o!==n&&(typeof o>"u"||o?di(t):pi(t))},beforeUnmount(t){pi(t)}};function dc(t,o={}){t.$_vTooltipInstalled||(t.$_vTooltipInstalled=!0,nr(se,o),t.directive("tooltip",uc),t.directive("close-popper",cc),t.component("VTooltip",Xu),t.component("VDropdown",qu),t.component("VMenu",Ku))}const pc={version:"5.2.2",install:dc,options:se},mc="c3fd21c9-c91a-4c66-baa5-c3e050c2cc74",mi="2026-11-13T12:25:32.993Z",gc="c5ac1602-351c-449e-8e95-7e413c31817a",fc="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0zLjA0IDEzLjE0YzAtMSAuOTMtMS43NiAxLjkyLTEuNTVjLjQ0LjEuOSAwIDEuMjYtLjI2bC41MS0uMzdhNSA1IDAgMCAxIDEuMDctLjY2YTIgMiAwIDAgMSAxLjEzLS4wNGMuMy4wNy41Ny4yNCAxLjEyLjU3bC4yMi4xNGMuNy40MiAxLjA0LjYzIDEuNDIuN2EyIDIgMCAwIDAgLjYzIDBjLjM4LS4wNi43My0uMjYgMS40My0uNjZsLjQyLS4yNWMuNTEtLjMuNzctLjQ0IDEuMDMtLjUxYTIgMiAwIDAgMSAxLjIxLjA3Yy4yNi4xLjUuMjcuOTcuNjJsLjU1LjRjLjM0LjI1Ljc3LjM0IDEuMi4yNWMuOS0uMiAxLjc4LjQ5IDEuNzggMS40M3Y1LjY3YzAgLjczIDAgMS4wOS0uMDkgMS4zOGEyIDIgMCAwIDEtMS4zIDEuM2MtLjMuMS0uNjYuMS0xLjM4LjFjLS43MyAwLTEuMDkgMC0xLjM4LS4xYTIgMiAwIDAgMS0xLjMtMS4zYy0uMS0uMy0uMS0uNjUtLjEtMS4zOHYtLjJjMC0uOTMgMC0xLjQtLjE1LTEuNzVhMiAyIDAgMCAwLTEuMS0xLjFhNSA1IDAgMCAwLTEuNzQtLjE0aC0uODFjLS45MiAwLTEuMzggMC0xLjc0LjE0YTIgMiAwIDAgMC0xLjEgMS4xYy0uMTUuMzYtLjE1LjgyLS4xNSAxLjc0di4yM2MwIC43IDAgMS4wNi0uMDkgMS4zNWEyIDIgMCAwIDEtMS4zMiAxLjMyYy0uMjguMS0uNjQuMS0xLjM1LjFzLTEuMDcgMC0xLjM2LS4xYTIgMiAwIDAgMS0xLjMyLTEuMzJjLS4wOS0uMjktLjA5LS42NC0uMDktMS4zNXoiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEuODYgOS42MmMwIDEuMi41NCAyLjIyIDIuNzEgMi4yMmMyLjE4IDAgMy42Ni0yLjIyIDMuNjYtMi4yMnMxLjU1IDIuMjIgMy43MiAyLjIyYzIuMTggMCAzLjg1LTIuMjMgMy44NS0yLjIzczEuMzQgMi4yMyAzLjY1IDIuMjNjMS44IDAgMi42OS0xLjIgMi42OS0yLjJxMC0uMy0uMTUtLjk2Yy0uNTUtMi43LS44My00LjA1LTEuOTMtNC45NXMtMi42LS45LTUuNjItLjlIOS41Yy0yLjk3IDAtNC40NSAwLTUuNTYuOXMtMS4zNyAyLjItMS45MSA0LjgzcS0uMTYuNzEtLjE2IDEuMDZtMTkuMDQgMi4zMnYxLjUzYzAgMy43NyAwIDUuNjYtMS4xNyA2Ljgzcy0zLjA2IDEuMTctNi44MyAxLjE3aC0xLjg3Yy0zLjc3IDAtNS42NSAwLTYuODMtMS4xN3MtMS4xNy0zLjA2LTEuMTctNi44M3YtMS41MyIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0xNS40NCAyMS4yMnYtMi4zYzAtMS4zNiAwLTIuMDQtLjMyLTIuNTRhMiAyIDAgMCAwLS42LS42Yy0uNDktLjMxLTEuMTctLjMxLTIuNTQtLjMxcy0yLjA1IDAtMi41NS4zMmEyIDIgMCAwIDAtLjYuNmMtLjMxLjQ5LS4zMSAxLjE3LS4zMSAyLjU0djIuMjkiIC8+Cgk8L2c+Cjwvc3ZnPgo=",O=(t="")=>({"pt-BR":t,"en-US":t,"es-ES":t}),hc=(t,o)=>o==null?{label:O(t)}:o.label?o:{...o,label:O(t)},ee=t=>({id:t.id,companyId:mc,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:hc(t.name,t.settings),archivedAt:null,autoTagEnabled:!1,autoTagIds:[],createdAt:mi,updatedAt:mi}),oe=(t,o)=>({id:t,nextRuleId:o}),Do=ee({id:"69b262ed-2f08-4f61-90d9-8099f6f56509",name:"Explorar Produtos",action:"widget-base-screen",settings:{body:{logo:"",title:O(""),eyebrow:O(""),subtitle:O("Preparado para dar um upgrade? 🚀 Escolha uma categoria e descubra nossas novidades!")},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiPgoJCTxwYXRoIGQ9Ik0zLjk3NyA5Ljg0QTIgMiAwIDAgMSA1Ljk3MSA4aDEyLjA1OGEyIDIgMCAwIDEgMS45OTQgMS44NGwuODAzIDEwQTIgMiAwIDAgMSAxOC44MzMgMjJINS4xNjdhMiAyIDAgMCAxLTEuOTkzLTIuMTZ6IiAvPgoJCTxwYXRoIGQ9Ik0xNiAxMVY2YTQgNCAwIDAgMC00LTR2MGE0IDQgMCAwIDAtNCA0djUiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:O("OpensTec Store"),subtitle:O("Tecnologia para sua vida")}}}),Bo=ee({id:"fcecfd31-fc37-4a7f-926c-5180be2e3df3",name:"Acompanhar Pedido",action:"widget-base-screen",settings:{body:{logo:"",title:O(""),eyebrow:O(""),subtitle:O("Vamos descobrir onde está seu pedido? 📦 Escolha uma opção para continuar.")},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0yMS40IDguMzF2Ny42MmEuNS41IDAgMCAxLS43OS40bC0yLjE1LTEuNWEuNS41IDAgMCAwLS41OS4wMWwtMi40NSAxLjg1YS41LjUgMCAwIDAtLjE4LjUzbC42NyAyLjRhLjUuNSAwIDAgMS0uMjQuNTdsLTMuNzggMi4wMmEuNS41IDAgMCAxLS4yMi0uNDRsLjcxLTkuMzVhLjUuNSAwIDAgMSAuMjctLjRsOC4wMi00LjE1YS41LjUgMCAwIDEgLjczLjQ0IiBvcGFjaXR5PSIuMiIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0yMS40MiAxMi4zMnYtMi4xNWMwLTEuNyAwLTIuNTQtLjQtMy4yNHMtMS4xNC0xLjEyLTIuNi0xLjk2TDE1IDIuOTljLTEuNDYtLjg0LTIuMi0xLjI2LTMtMS4yNnMtMS41NC40Mi0zIDEuMjZMNS41OCA0Ljk3Yy0xLjQ2Ljg0LTIuMiAxLjI3LTIuNiAxLjk2Yy0uNC43LS40IDEuNTQtLjQgMy4yNHY0LjRjMCAuOTcgMCAxLjQ1LjEzIDEuODhhMyAzIDAgMCAwIC42NyAxLjE2Yy4zLjMzLjcyLjU3IDEuNTYgMS4wNWw1LjQ4IDMuMTZjLjcuNDEgMS41OC0uMSAxLjU4LS45MU0zLjEyIDcuNTNMMTIgMTIuNDJtMCAwdjguNTVNNy4zIDkuNTd2NC42MW0xMy41OC02LjY1TDEyIDEyLjQyTTcuMyA5LjU3bDkuMTQtNS40Mm00LjA2IDE2LjQ3bDEuODcgMS44NyIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0yMS40IDE4LjEzYTMuMiAzLjIgMCAwIDEtMy4yIDMuMmEzLjIgMy4yIDAgMSAxIDMuMi0zLjIiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:O("OpensTec Store"),subtitle:O("Tecnologia para sua vida")}}}),gi=ee({id:"91a443ca-0f26-4249-863b-0bfcb2a376a8",name:"Trocas e devoluções",action:"widget-base-screen",settings:{body:{logo:"",title:O(""),eyebrow:O(""),subtitle:O("Precisou trocar ou devolver um produto? Sem problemas! Vamos ajudar você.")},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9IiMwNTE3NzkiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIj4KCQk8cGF0aCBkPSJNNi42NCA5Ljc4OGEuNzUuNzUgMCAwIDEgLjUzLjkxOGE1IDUgMCAwIDAgNy4zMyA1LjYyNGEuNzUuNzUgMCAxIDEgLjc1IDEuM2E2LjUwMSA2LjUwMSAwIDAgMS05LjUyOS03LjMxMmEuNzUuNzUgMCAwIDEgLjkxOS0uNTNNOC43NSA2LjM3YTYuNSA2LjUgMCAwIDEgOS41MjkgNy4zMTJhLjc1Ljc1IDAgMSAxLTEuNDUtLjM4OEE1LjAwMSA1LjAwMSAwIDAgMCA5LjUgNy42N2EuNzUuNzUgMCAxIDEtLjc1LTEuMyIgLz4KCQk8cGF0aCBkPSJNNS43MiA5LjQ3YS43NS43NSAwIDAgMSAxLjA2IDBsMi41IDIuNWEuNzUuNzUgMCAxIDEtMS4wNiAxLjA2bC0xLjk3LTEuOTdsLTEuOTcgMS45N2EuNzUuNzUgMCAwIDEtMS4wNi0xLjA2em05IDEuNWEuNzUuNzUgMCAwIDEgMS4wNiAwbDEuOTcgMS45N2wxLjk3LTEuOTdhLjc1Ljc1IDAgMSAxIDEuMDYgMS4wNmwtMi41IDIuNWEuNzUuNzUgMCAwIDEtMS4wNiAwbC0yLjUtMi41YS43NS43NSAwIDAgMSAwLTEuMDYiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:O("OpensTec Store"),subtitle:O("Tecnologia para sua vida")}}}),jo=ee({id:"1d846621-3e82-4fad-a3f2-cee80503177a",name:"Suporte",action:"widget-identification-screen",settings:{form:{fields:[]},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xMiAyQzYuNDg2IDIgMiA2LjQ4NiAyIDEydjQuMTQzQzIgMTcuMTY3IDIuODk3IDE4IDQgMThoMWExIDEgMCAwIDAgMS0xdi01LjE0M2ExIDEgMCAwIDAtMS0xaC0uOTA4QzQuNjQ4IDYuOTg3IDcuOTc4IDQgMTIgNHM3LjM1MiAyLjk4NyA3LjkwOCA2Ljg1N0gxOWExIDEgMCAwIDAtMSAxVjE4YzAgMS4xMDMtLjg5NyAyLTIgMmgtMnYtMWgtNHYzaDZjMi4yMDYgMCA0LTEuNzk0IDQtNGMxLjEwMyAwIDItLjgzMyAyLTEuODU3VjEyYzAtNS41MTQtNC40ODYtMTAtMTAtMTAiIC8+Cjwvc3ZnPgo=",title:O("OpensTec Stora"),subtitle:O("Tecnologia para sua vida")}}}),fi=ee({id:"f666871a-6cc7-44f8-8e63-e9363d8e85ff",name:"Entregas",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
6
6
  <div style="font-family:Arial,sans-serif;color:#1E293B;line-height:1.6;width:100%;box-sizing:border-box;">
7
7
 
8
8
  <div style="background:#EFF6FF;padding:18px;border-radius:12px;text-align:center;">
@@ -68,7 +68,7 @@
68
68
  </div>
69
69
 
70
70
  </div>
71
- `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xNi45IDkuODhjMC0yLjgzIDAtNC4yNC0uODgtNS4xMnMtMi4zLS44OC01LjEyLS44OEg3LjczYy0yLjgyIDAtNC4yNCAwLTUuMTIuODhzLS44OCAyLjMtLjg4IDUuMTJ2NS41NmExLjM1IDEuMzUgMCAwIDAgMi4zLjk2bC4zLS4zYTIuNCAyLjQgMCAwIDEgMy4yNi0uMDZsLjEuMWMuNDcuNDEgMS4wOC42NSAxLjcuNjVoMi4zOGwuNTItLjAxYTMgMyAwIDAgMCAxLjQ0LS41MmwuNDEtLjMyQTMgMyAwIDAgMSAxNiAxNS4xaC45MXoiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTE2LjkgMTUuMDJWOS44OGMwLTIuODMgMC00LjI0LS44OC01LjEycy0yLjMtLjg4LTUuMTItLjg4SDcuNzNjLTIuODIgMC00LjI0IDAtNS4xMi44OHMtLjg4IDIuMy0uODggNS4xMnY1LjFjMCAxIC44MSAxLjggMS44IDEuOG0xMy40MS05LjcyaDEuMTNjLjczIDAgMS4xIDAgMS40My4xMmEyIDIgMCAwIDEgLjQxLjJjLjMuMi41Mi41Ljk2IDEuMDlhOCA4IDAgMCAxIDEuMDggMS42M3EuMTIuMy4yLjZjLjEyLjQ4LjEyLjk3LjEyIDEuOTZ2LjM2YzAgMS42NiAwIDIuNS0uNDcgMy4wNWwtLjI1LjI1Yy0uNTYuNDctMS40LjQ3LTMuMDYuNDciIC8+CgkJPGNpcmNsZSBjeD0iNi4wNyIgY3k9IjE3LjUyIiByPSIyLjYiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNi4wNyAxNy41MikiIC8+CgkJPGNpcmNsZSBjeD0iMTUuOTMiIGN5PSIxNy41MiIgcj0iMi42IiBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHRyYW5zZm9ybT0icm90YXRlKDkwIDE1LjkzIDE3LjUyKSIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik04LjY3IDE2Ljc5aDQuNjYiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:"OpensTec Store",subtitle:"Tecnologia para sua vida"}}}),qo=K({id:"fe4e5728-9714-4c75-a540-1356e30b14a7",name:"FAQ",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
71
+ `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xNi45IDkuODhjMC0yLjgzIDAtNC4yNC0uODgtNS4xMnMtMi4zLS44OC01LjEyLS44OEg3LjczYy0yLjgyIDAtNC4yNCAwLTUuMTIuODhzLS44OCAyLjMtLjg4IDUuMTJ2NS41NmExLjM1IDEuMzUgMCAwIDAgMi4zLjk2bC4zLS4zYTIuNCAyLjQgMCAwIDEgMy4yNi0uMDZsLjEuMWMuNDcuNDEgMS4wOC42NSAxLjcuNjVoMi4zOGwuNTItLjAxYTMgMyAwIDAgMCAxLjQ0LS41MmwuNDEtLjMyQTMgMyAwIDAgMSAxNiAxNS4xaC45MXoiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTE2LjkgMTUuMDJWOS44OGMwLTIuODMgMC00LjI0LS44OC01LjEycy0yLjMtLjg4LTUuMTItLjg4SDcuNzNjLTIuODIgMC00LjI0IDAtNS4xMi44OHMtLjg4IDIuMy0uODggNS4xMnY1LjFjMCAxIC44MSAxLjggMS44IDEuOG0xMy40MS05LjcyaDEuMTNjLjczIDAgMS4xIDAgMS40My4xMmEyIDIgMCAwIDEgLjQxLjJjLjMuMi41Mi41Ljk2IDEuMDlhOCA4IDAgMCAxIDEuMDggMS42M3EuMTIuMy4yLjZjLjEyLjQ4LjEyLjk3LjEyIDEuOTZ2LjM2YzAgMS42NiAwIDIuNS0uNDcgMy4wNWwtLjI1LjI1Yy0uNTYuNDctMS40LjQ3LTMuMDYuNDciIC8+CgkJPGNpcmNsZSBjeD0iNi4wNyIgY3k9IjE3LjUyIiByPSIyLjYiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNi4wNyAxNy41MikiIC8+CgkJPGNpcmNsZSBjeD0iMTUuOTMiIGN5PSIxNy41MiIgcj0iMi42IiBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHRyYW5zZm9ybT0icm90YXRlKDkwIDE1LjkzIDE3LjUyKSIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik04LjY3IDE2Ljc5aDQuNjYiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:O("OpensTec Store"),subtitle:O("Tecnologia para sua vida")}}}),en=ee({id:"fe4e5728-9714-4c75-a540-1356e30b14a7",name:"FAQ",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
72
72
  <div style="font-family:Arial,sans-serif;color:#1E293B;line-height:1.5;width:100%;box-sizing:border-box;">
73
73
 
74
74
  <div style="background:#EFF6FF;padding:18px;border-radius:12px;text-align:center;margin-bottom:20px;">
@@ -161,7 +161,7 @@
161
161
  </div>
162
162
 
163
163
  </div>
164
- `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xMiA2YTMuOTQgMy45NCAwIDAgMC0zLjkzNCAzLjkzNGgyQzEwLjA2NiA4Ljg2NyAxMC45MzQgOCAxMiA4czEuOTM0Ljg2NyAxLjkzNCAxLjkzNGMwIC41OTgtLjQ4MSAxLjAzMi0xLjIxNiAxLjYyNmE5IDkgMCAwIDAtLjY5MS41OTljLS45OTguOTk3LTEuMDI3IDIuMDU2LTEuMDI3IDIuMTc0VjE1aDJsLS4wMDEtLjYzM2MuMDAxLS4wMTYuMDMzLS4zODYuNDQxLS43OTNjLjE1LS4xNS4zMzktLjMuNTM1LS40NThjLjc3OS0uNjMxIDEuOTU4LTEuNTg0IDEuOTU4LTMuMTgyQTMuOTM3IDMuOTM3IDAgMCAwIDEyIDZtLTEgMTBoMnYyaC0yeiIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xMiAyQzYuNDg2IDIgMiA2LjQ4NiAyIDEyczQuNDg2IDEwIDEwIDEwczEwLTQuNDg2IDEwLTEwUzE3LjUxNCAyIDEyIDJtMCAxOGMtNC40MTEgMC04LTMuNTg5LTgtOHMzLjU4OS04IDgtOHM4IDMuNTg5IDggOHMtMy41ODkgOC04IDgiIC8+Cjwvc3ZnPgo=",title:"OpensTec Store",subtitle:"Tecnologia para sua vida"}}}),gi=K({id:"b1049d64-1c15-4700-89ed-cd62859689c4",name:"Notebooks",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
164
+ `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xMiA2YTMuOTQgMy45NCAwIDAgMC0zLjkzNCAzLjkzNGgyQzEwLjA2NiA4Ljg2NyAxMC45MzQgOCAxMiA4czEuOTM0Ljg2NyAxLjkzNCAxLjkzNGMwIC41OTgtLjQ4MSAxLjAzMi0xLjIxNiAxLjYyNmE5IDkgMCAwIDAtLjY5MS41OTljLS45OTguOTk3LTEuMDI3IDIuMDU2LTEuMDI3IDIuMTc0VjE1aDJsLS4wMDEtLjYzM2MuMDAxLS4wMTYuMDMzLS4zODYuNDQxLS43OTNjLjE1LS4xNS4zMzktLjMuNTM1LS40NThjLjc3OS0uNjMxIDEuOTU4LTEuNTg0IDEuOTU4LTMuMTgyQTMuOTM3IDMuOTM3IDAgMCAwIDEyIDZtLTEgMTBoMnYyaC0yeiIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xMiAyQzYuNDg2IDIgMiA2LjQ4NiAyIDEyczQuNDg2IDEwIDEwIDEwczEwLTQuNDg2IDEwLTEwUzE3LjUxNCAyIDEyIDJtMCAxOGMtNC40MTEgMC04LTMuNTg5LTgtOHMzLjU4OS04IDgtOHM4IDMuNTg5IDggOHMtMy41ODkgOC04IDgiIC8+Cjwvc3ZnPgo=",title:O("OpensTec Store"),subtitle:O("Tecnologia para sua vida")}}}),hi=ee({id:"b1049d64-1c15-4700-89ed-cd62859689c4",name:"Notebooks",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
165
165
  <div style="font-family:Arial,sans-serif;color:#1E293B;line-height:1.5;width:100%;box-sizing:border-box;">
166
166
 
167
167
  <div style="background:#EFF6FF;padding:18px;border-radius:12px;text-align:center;margin-bottom:18px;">
@@ -221,7 +221,7 @@
221
221
  </div>
222
222
 
223
223
  </div>
224
- `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0zLjM1IDE1LjQxYy4xNS0uMjMuMjMtLjM0LjMzLS40M2ExIDEgMCAwIDEgLjQtLjIxYy4xMi0uMDQuMjYtLjA0LjU0LS4wNGgxNC43Yy4yNyAwIC40IDAgLjUzLjA0YTEgMSAwIDAgMSAuNC4yYy4xLjEuMTguMi4zMy40M2MuOTggMS40MyAxLjQ3IDIuMTQgMS40OSAyLjc0YTIgMiAwIDAgMS0uOTIgMS43M2MtLjUuMzItMS4zNi4zMi0zLjEuMzJINS45Yy0xLjczIDAtMi42IDAtMy4wOS0uMzNhMiAyIDAgMCAxLS45LTEuN2MwLS42LjQ4LTEuMzEgMS40NS0yLjc1IiBvcGFjaXR5PSIuMiIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0yMCAxNC43M3YtMy45MmMwLTMuMyAwLTQuOTUtMS4wMy01Ljk4QzE3Ljk1IDMuODEgMTYuMyAzLjgxIDEzIDMuODFoLTJjLTMuMyAwLTQuOTUgMC01Ljk3IDEuMDJDNCA1Ljg2IDQgNy41MSA0IDEwLjgxdjMuOTJtLS4wNiAwYy0xLjU0IDEuOTItMi4zMSAyLjg4LTIuMjMgMy42OWEyIDIgMCAwIDAgLjU5IDEuMjRjLjU4LjU3IDEuODEuNTcgNC4yNy41N2gxMC44N2MyLjQ2IDAgMy42OCAwIDQuMjYtLjU1YTIgMiAwIDAgMCAuNjItMS4zM2MuMDUtLjgtLjc0LTEuNzQtMi4zMy0zLjYybS4wMSAwSDQiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:"Notebooks",subtitle:"Performance para trabalho e diversão."}}}),fi=K({id:"1ab3797c-05ac-4f6a-91c2-c1c146980266",name:"Smartphones",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
224
+ `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0zLjM1IDE1LjQxYy4xNS0uMjMuMjMtLjM0LjMzLS40M2ExIDEgMCAwIDEgLjQtLjIxYy4xMi0uMDQuMjYtLjA0LjU0LS4wNGgxNC43Yy4yNyAwIC40IDAgLjUzLjA0YTEgMSAwIDAgMSAuNC4yYy4xLjEuMTguMi4zMy40M2MuOTggMS40MyAxLjQ3IDIuMTQgMS40OSAyLjc0YTIgMiAwIDAgMS0uOTIgMS43M2MtLjUuMzItMS4zNi4zMi0zLjEuMzJINS45Yy0xLjczIDAtMi42IDAtMy4wOS0uMzNhMiAyIDAgMCAxLS45LTEuN2MwLS42LjQ4LTEuMzEgMS40NS0yLjc1IiBvcGFjaXR5PSIuMiIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0yMCAxNC43M3YtMy45MmMwLTMuMyAwLTQuOTUtMS4wMy01Ljk4QzE3Ljk1IDMuODEgMTYuMyAzLjgxIDEzIDMuODFoLTJjLTMuMyAwLTQuOTUgMC01Ljk3IDEuMDJDNCA1Ljg2IDQgNy41MSA0IDEwLjgxdjMuOTJtLS4wNiAwYy0xLjU0IDEuOTItMi4zMSAyLjg4LTIuMjMgMy42OWEyIDIgMCAwIDAgLjU5IDEuMjRjLjU4LjU3IDEuODEuNTcgNC4yNy41N2gxMC44N2MyLjQ2IDAgMy42OCAwIDQuMjYtLjU1YTIgMiAwIDAgMCAuNjItMS4zM2MuMDUtLjgtLjc0LTEuNzQtMi4zMy0zLjYybS4wMSAwSDQiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:O("Notebooks"),subtitle:O("Performance para trabalho e diversão.")}}}),wi=ee({id:"1ab3797c-05ac-4f6a-91c2-c1c146980266",name:"Smartphones",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
225
225
  <div style="font-family:Arial,sans-serif;color:#1E293B;line-height:1.5;width:100%;box-sizing:border-box;">
226
226
 
227
227
  <div style="background:#EFF6FF;padding:18px;border-radius:12px;text-align:center;margin-bottom:18px;">
@@ -281,7 +281,7 @@
281
281
  </div>
282
282
 
283
283
  </div>
284
- `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+Cgk8cGF0aCBkPSJNMCAwaDUxMnY1MTJIMHoiIGZpbGw9Im5vbmUiIC8+Cgk8cGF0aCBmaWxsPSIjMDUxNzc5IiBkPSJNMTA0IDQ4djQxNmEzMi4wMzYgMzIuMDM2IDAgMCAwIDMyIDMyaDI0OGEzMi4wMzYgMzIuMDM2IDAgMCAwIDMyLTMyVjQ4YTMyLjAzNiAzMi4wMzYgMCAwIDAtMzItMzJIMTM2YTMyLjAzNiAzMi4wMzYgMCAwIDAtMzIgMzJtMjgwLjAyMSA0MTZIMTM2VjQ4aDI0OFoiIC8+Cgk8cGF0aCBmaWxsPSIjMDUxNzc5IiBkPSJNMjE2IDgwaDk2djMyaC05MnptMzIgMzEyaDMydjMyaC0zMnoiIC8+Cjwvc3ZnPgo=",title:"Smartphones",subtitle:"Tecnologia na palma da mão"}}}),hi=K({id:"c7faf40f-8208-4722-be69-c6fe10c97c54",name:"Acessórios",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
284
+ `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+Cgk8cGF0aCBkPSJNMCAwaDUxMnY1MTJIMHoiIGZpbGw9Im5vbmUiIC8+Cgk8cGF0aCBmaWxsPSIjMDUxNzc5IiBkPSJNMTA0IDQ4djQxNmEzMi4wMzYgMzIuMDM2IDAgMCAwIDMyIDMyaDI0OGEzMi4wMzYgMzIuMDM2IDAgMCAwIDMyLTMyVjQ4YTMyLjAzNiAzMi4wMzYgMCAwIDAtMzItMzJIMTM2YTMyLjAzNiAzMi4wMzYgMCAwIDAtMzIgMzJtMjgwLjAyMSA0MTZIMTM2VjQ4aDI0OFoiIC8+Cgk8cGF0aCBmaWxsPSIjMDUxNzc5IiBkPSJNMjE2IDgwaDk2djMyaC05MnptMzIgMzEyaDMydjMyaC0zMnoiIC8+Cjwvc3ZnPgo=",title:O("Smartphones"),subtitle:O("Tecnologia na palma da mão")}}}),yi=ee({id:"c7faf40f-8208-4722-be69-c6fe10c97c54",name:"Acessórios",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
285
285
  <div style="font-family:Arial,sans-serif;color:#1E293B;line-height:1.5;width:100%;box-sizing:border-box;">
286
286
 
287
287
  <div style="background:#EFF6FF;padding:18px;border-radius:12px;text-align:center;margin-bottom:18px;">
@@ -328,7 +328,7 @@
328
328
  </div>
329
329
 
330
330
  </div>
331
- `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xOC40NSAxMy4xMWMtLjI1LS4xMi0uNTQtLjE0LS44LS4wNHMtLjQ3LjMtLjU3LjU2bC0yIDVjLS4xOS40OC4wMiAxLjAzLjQ4IDEuMjdsMiAxYTEgMSAwIDAgMCAuNzkuMDVjLjI2LS4wOS40Ny0uMjkuNTgtLjU1bDEuNjgtMy45MmE5Ljg2IDkuODYgMCAwIDAtLjYzLTguOTZjLTEuNTctMi42MS00LjE4LTQuMjQtNy4xNS00LjQ4Yy0uNTQtLjA1LTEuMS0uMDUtMS42NCAwYy0yLjk3LjI0LTUuNTggMS44OC03LjE1IDQuNDhhOS44NiA5Ljg2IDAgMCAwLS42MyA4Ljk2bDEuNjggMy45MmMuMTEuMjUuMzIuNDUuNTguNTVjLjI2LjA5LjU0LjA4Ljc5LS4wNGwyLTFhMSAxIDAgMCAwIC40OC0xLjI3bC0yLTVhLjk4Ljk4IDAgMCAwLS41Ny0uNTZjLS4yNi0uMS0uNTUtLjA4LS44LjA0bC0uODguNDRjLS4yLTEuNzIuMTYtMy40OCAxLjA4LTVjMS4yNC0yLjA1IDMuMjgtMy4zMyA1LjYtMy41MmMuNDMtLjA0Ljg3LS4wNCAxLjMxIDBjMi4zMi4xOSA0LjM2IDEuNDcgNS42IDMuNTJhNy45NSA3Ljk1IDAgMCAxIDEuMDggNWwtLjg4LS40NFoiIC8+Cjwvc3ZnPgo=",title:"Acessórios",subtitle:"Complete seu setup"}}}),wi=K({id:"b09a42fd-6ca6-447f-b42d-9f2694d04262",name:"Fluxo Suporte",action:"widget-service-screen",settings:{service:{},features:{sendMessage:!1,sendAttachment:!1}}}),yi=K({id:"a183d7bb-0356-4dc8-b9ed-fdbd573b435c",name:"Consultar status",action:"widget-identification-screen",settings:{form:{fields:[{name:"cpf",label:"CPF",required:!0,placeholder:"Digite seu CPF"}]},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiPgoJCTxwYXRoIGQ9Ik0zIDZhMiAyIDAgMCAxIDIgLTJoMTRhMiAyIDAgMCAxIDIgMnYxNGEyIDIgMCAwIDEgLTIgMkg1YTIgMiAwIDAgMSAtMiAtMloiIC8+CgkJPHBhdGggZD0iTTQgOGgxNiIgLz4KCQk8cGF0aCBkPSJNMTIgNHY0IiAvPgoJCTxwYXRoIGQ9Im05IDE1IDIgMiA0IC00IiAvPgoJPC9nPgo8L3N2Zz4K",title:"Consultar status",subtitle:"Veja em qual etapa está seu pedido"}}}),vi=K({id:"93d410f8-d557-41c9-9bc8-9a28da4b9543",name:"Rastrear entrega",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
331
+ `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xOC40NSAxMy4xMWMtLjI1LS4xMi0uNTQtLjE0LS44LS4wNHMtLjQ3LjMtLjU3LjU2bC0yIDVjLS4xOS40OC4wMiAxLjAzLjQ4IDEuMjdsMiAxYTEgMSAwIDAgMCAuNzkuMDVjLjI2LS4wOS40Ny0uMjkuNTgtLjU1bDEuNjgtMy45MmE5Ljg2IDkuODYgMCAwIDAtLjYzLTguOTZjLTEuNTctMi42MS00LjE4LTQuMjQtNy4xNS00LjQ4Yy0uNTQtLjA1LTEuMS0uMDUtMS42NCAwYy0yLjk3LjI0LTUuNTggMS44OC03LjE1IDQuNDhhOS44NiA5Ljg2IDAgMCAwLS42MyA4Ljk2bDEuNjggMy45MmMuMTEuMjUuMzIuNDUuNTguNTVjLjI2LjA5LjU0LjA4Ljc5LS4wNGwyLTFhMSAxIDAgMCAwIC40OC0xLjI3bC0yLTVhLjk4Ljk4IDAgMCAwLS41Ny0uNTZjLS4yNi0uMS0uNTUtLjA4LS44LjA0bC0uODguNDRjLS4yLTEuNzIuMTYtMy40OCAxLjA4LTVjMS4yNC0yLjA1IDMuMjgtMy4zMyA1LjYtMy41MmMuNDMtLjA0Ljg3LS4wNCAxLjMxIDBjMi4zMi4xOSA0LjM2IDEuNDcgNS42IDMuNTJhNy45NSA3Ljk1IDAgMCAxIDEuMDggNWwtLjg4LS40NFoiIC8+Cjwvc3ZnPgo=",title:O("Acessórios"),subtitle:O("Complete seu setup")}}}),vi=ee({id:"b09a42fd-6ca6-447f-b42d-9f2694d04262",name:"Fluxo Suporte",action:"widget-service-screen",settings:{service:{},features:{sendMessage:!1,sendAttachment:!1}}}),xi=ee({id:"a183d7bb-0356-4dc8-b9ed-fdbd573b435c",name:"Consultar status",action:"widget-identification-screen",settings:{form:{fields:[{name:"cpf",label:"CPF",required:!0,placeholder:"Digite seu CPF"}]},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiPgoJCTxwYXRoIGQ9Ik0zIDZhMiAyIDAgMCAxIDIgLTJoMTRhMiAyIDAgMCAxIDIgMnYxNGEyIDIgMCAwIDEgLTIgMkg1YTIgMiAwIDAgMSAtMiAtMloiIC8+CgkJPHBhdGggZD0iTTQgOGgxNiIgLz4KCQk8cGF0aCBkPSJNMTIgNHY0IiAvPgoJCTxwYXRoIGQ9Im05IDE1IDIgMiA0IC00IiAvPgoJPC9nPgo8L3N2Zz4K",title:O("Consultar status"),subtitle:O("Veja em qual etapa está seu pedido")}}}),bi=ee({id:"93d410f8-d557-41c9-9bc8-9a28da4b9543",name:"Rastrear entrega",action:"widget-article-screen",settings:{body:{content:{"en-US":"","es-ES":"","pt-BR":`
332
332
  <div style="font-family:Arial,sans-serif;color:#1E293B;line-height:1.5;width:100%;box-sizing:border-box;">
333
333
 
334
334
  <div style="background:#EFF6FF;padding:18px;border-radius:12px;text-align:center;margin-bottom:18px;">
@@ -406,4 +406,4 @@
406
406
  </p>
407
407
 
408
408
  </div>
409
- `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xNi45IDkuODhjMC0yLjgzIDAtNC4yNC0uODgtNS4xMnMtMi4zLS44OC01LjEyLS44OEg3LjczYy0yLjgyIDAtNC4yNCAwLTUuMTIuODhzLS44OCAyLjMtLjg4IDUuMTJ2NS41OGExLjMzIDEuMzMgMCAwIDAgMi4zLjkybC4yOS0uM0EyLjMzIDIuMzMgMCAwIDEgNy42IDE2bC4xLjFhMi41IDIuNSAwIDAgMCAxLjcxLjY4aDIuNjVhMyAzIDAgMCAwIDEuODItLjdsLjE3LS4xNWwuMTYtLjE1YTMgMyAwIDAgMSAxLjgyLS43aC44N3oiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTE2LjkgMTUuMDJWOS41YzAtMi40NSAwLTMuNjgtLjY3LTQuNWEzIDMgMCAwIDAtLjQ0LS40NGMtLjgzLS42Ny0yLjA1LS42Ny00LjUtLjY3bS05LjU2IDcuNzN2My4zNmMwIDEgLjgxIDEuOCAxLjggMS44bTEzLjQxLTkuNzJoMS4xM2MuNzMgMCAxLjEgMCAxLjQzLjEyYTIgMiAwIDAgMSAuNDEuMmMuMy4yLjUyLjUuOTYgMS4wOWE4IDggMCAwIDEgMS4wOCAxLjYzcS4xMi4zLjIuNmMuMTIuNDguMTIuOTcuMTIgMS45NnYuMzZjMCAxLjY2IDAgMi41LS40NyAzLjA1bC0uMjUuMjVjLS41Ni40Ny0xLjQuNDctMy4wNi40NyIgLz4KCQk8Y2lyY2xlIGN4PSI2LjA3IiBjeT0iMTcuNTIiIHI9IjIuNiIgc3Ryb2tlPSIjMDUxNzc5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2LjA3IDE3LjUyKSIgLz4KCQk8Y2lyY2xlIGN4PSIxNS45MyIgY3k9IjE3LjUyIiByPSIyLjYiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgMTUuOTMgMTcuNTIpIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik04LjY3IDE2Ljc5aDQuNk03LjY2IDUuNTVIMS43M204LjYgMy4xNUg0LjQiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:"Rastrear entrega",subtitle:"Resolva imprevistos com nossa equipe"}}}),Ko=K({id:"c0900849-4dee-4101-87d1-94063a7d0270",name:"Tela Inicial",action:"widget-base-screen",settings:{body:{logo:"",title:"Olá! 👋",eyebrow:"",subtitle:"O que você gostaria de fazer hoje?"},header:{logo:lc,title:"OpensTec Store",subtitle:"Tecnologia para sua vida"}}}),mr={id:sc,rules:[Lo,So,pi,Eo,mi,qo,gi,fi,hi,wi,yi,vi,Ko],edges:{[Ko.id]:[ee("9cf6f5ac-2c3e-4562-ab88-c67b05f7233c",Lo.id),ee("fc93460c-5fcd-4428-a250-92d139feba1f",So.id),ee("a429340f-5886-4c29-859d-2a342efd418b",pi.id),ee("d77eb0d5-98a0-41d0-a735-26871de389bb",Eo.id),ee("7d7f4c2f-bd81-44b6-ac29-4261e59fa876",mi.id),ee("cee6fe92-c5ea-433e-afd5-b810191cf267",qo.id)],[Lo.id]:[ee("46bed5b0-01af-493c-be5b-1974e0cce4fa",gi.id),ee("d61de3f9-9f2c-484f-9d7a-387ccc56db32",fi.id),ee("c7bc6aaf-efde-4e43-b565-352ea71b9f7b",hi.id)],[Eo.id]:[ee("2a883f9b-3422-4d05-b4c8-03095c2b1e59",wi.id)],[So.id]:[ee("94629ede-a015-4d9d-a265-33cc6229a1e2",yi.id),ee("9bf3284e-89b7-40b0-9ccf-30b939001da0",vi.id)]}},uc=qo,cc=Ko,dc=t=>mr.rules.find(o=>o.id===t),pc="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0zLjA0IDEzLjE0YzAtMSAuOTMtMS43NiAxLjkyLTEuNTVjLjQ0LjEuOSAwIDEuMjYtLjI2bC41MS0uMzdhNSA1IDAgMCAxIDEuMDctLjY2YTIgMiAwIDAgMSAxLjEzLS4wNGMuMy4wNy41Ny4yNCAxLjEyLjU3bC4yMi4xNGMuNy40MiAxLjA0LjYzIDEuNDIuN2EyIDIgMCAwIDAgLjYzIDBjLjM4LS4wNi43My0uMjYgMS40My0uNjZsLjQyLS4yNWMuNTEtLjMuNzctLjQ0IDEuMDMtLjUxYTIgMiAwIDAgMSAxLjIxLjA3Yy4yNi4xLjUuMjcuOTcuNjJsLjU1LjRjLjM0LjI1Ljc3LjM0IDEuMi4yNWMuOS0uMiAxLjc4LjQ5IDEuNzggMS40M3Y1LjY3YzAgLjczIDAgMS4wOS0uMDkgMS4zOGEyIDIgMCAwIDEtMS4zIDEuM2MtLjMuMS0uNjYuMS0xLjM4LjFjLS43MyAwLTEuMDkgMC0xLjM4LS4xYTIgMiAwIDAgMS0xLjMtMS4zYy0uMS0uMy0uMS0uNjUtLjEtMS4zOHYtLjJjMC0uOTMgMC0xLjQtLjE1LTEuNzVhMiAyIDAgMCAwLTEuMS0xLjFhNSA1IDAgMCAwLTEuNzQtLjE0aC0uODFjLS45MiAwLTEuMzggMC0xLjc0LjE0YTIgMiAwIDAgMC0xLjEgMS4xYy0uMTUuMzYtLjE1LjgyLS4xNSAxLjc0di4yM2MwIC43IDAgMS4wNi0uMDkgMS4zNWEyIDIgMCAwIDEtMS4zMiAxLjMyYy0uMjguMS0uNjQuMS0xLjM1LjFzLTEuMDcgMC0xLjM2LS4xYTIgMiAwIDAgMS0xLjMyLTEuMzJjLS4wOS0uMjktLjA5LS42NC0uMDktMS4zNXoiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEuODYgOS42MmMwIDEuMi41NCAyLjIyIDIuNzEgMi4yMmMyLjE4IDAgMy42Ni0yLjIyIDMuNjYtMi4yMnMxLjU1IDIuMjIgMy43MiAyLjIyYzIuMTggMCAzLjg1LTIuMjMgMy44NS0yLjIzczEuMzQgMi4yMyAzLjY1IDIuMjNjMS44IDAgMi42OS0xLjIgMi42OS0yLjJxMC0uMy0uMTUtLjk2Yy0uNTUtMi43LS44My00LjA1LTEuOTMtNC45NXMtMi42LS45LTUuNjItLjlIOS41Yy0yLjk3IDAtNC40NSAwLTUuNTYuOXMtMS4zNyAyLjItMS45MSA0LjgzcS0uMTYuNzEtLjE2IDEuMDZtMTkuMDQgMi4zMnYxLjUzYzAgMy43NyAwIDUuNjYtMS4xNyA2Ljgzcy0zLjA2IDEuMTctNi44MyAxLjE3aC0xLjg3Yy0zLjc3IDAtNS42NSAwLTYuODMtMS4xN3MtMS4xNy0zLjA2LTEuMTctNi44M3YtMS41MyIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0xNS40NCAyMS4yMnYtMi4zYzAtMS4zNiAwLTIuMDQtLjMyLTIuNTRhMiAyIDAgMCAwLS42LS42Yy0uNDktLjMxLTEuMTctLjMxLTIuNTQtLjMxcy0yLjA1IDAtMi41NS4zMmEyIDIgMCAwIDAtLjYuNmMtLjMxLjQ5LS4zMSAxLjE3LS4zMSAyLjU0djIuMjkiIC8+Cgk8L2c+Cjwvc3ZnPgo=",mc={configurations:{alias:"OpensTec Store",general:{defaultBehavior:"active",language:"pt-BR",isClosable:!0},appearance:{theme:"light",primaryColor:"#fff"},anchor:{label:"Fale conosco",size:"medium",position:"bottom-right",offset:{x:16,y:16},logo:pc},voiceRemoteAddress:"snep1.test.opens.com.br",voiceCode:"7nSlDoMNwXHqV7Vq",voiceDevice:"cc342bf9-8e1a-4ddc-84e6-dc6f628ca5d8"}},gc={install:t=>{t.use(rc),t.component("AppIdentificationPage",tn),t.component("AppFormTextInput",en),t.component("AppWidgetAnchor",on),t.component("AppArticlePage",nn),t.component("AppServicePage",fn),t.component("AppScreenPage",hn),t.component("AppWidgetView",wn),t.component("AppTextInput",Pi),t.component("AppCarousel",oo),t.component("AppAudioPlayer",ut),t.component("AppSkeleton",pn),t.component("AppTyping",mn),t.component("AppMessage",qe),t.component("AppWidget",Ri),t.component("AppButton",R),t.component("AppEmpty",gn),t.component("AppGroup",$),t.component("AppEdge",Oe),t.component("AppIcon",E),t.component("AppText",j)}};exports.AppArticlePage=nn;exports.AppAudioPlayer=ut;exports.AppButton=R;exports.AppCarousel=oo;exports.AppEdge=Oe;exports.AppEmpty=gn;exports.AppFormTextInput=en;exports.AppGroup=$;exports.AppIcon=E;exports.AppIdentificationPage=tn;exports.AppMessage=qe;exports.AppScreenPage=hn;exports.AppServicePage=fn;exports.AppSkeleton=pn;exports.AppText=j;exports.AppTextInput=Pi;exports.AppTyping=mn;exports.AppWidget=Ri;exports.AppWidgetAnchor=on;exports.AppWidgetView=wn;exports.ServiceChatMessageBuilder=Xo;exports.ServiceChatMessageVO=$e;exports.default=gc;exports.demoArticleRule=uc;exports.demoRootRule=cc;exports.demoWidgetConfig=mc;exports.demoWorkflow=mr;exports.findDemoRuleById=dc;exports.resolveMessageFrom=eo;exports.useAppWidget=Le;exports.useChatService=Mi;exports.useServicePage=Ci;exports.useVoiceService=xi;
409
+ `}},header:{logo:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0xNi45IDkuODhjMC0yLjgzIDAtNC4yNC0uODgtNS4xMnMtMi4zLS44OC01LjEyLS44OEg3LjczYy0yLjgyIDAtNC4yNCAwLTUuMTIuODhzLS44OCAyLjMtLjg4IDUuMTJ2NS41OGExLjMzIDEuMzMgMCAwIDAgMi4zLjkybC4yOS0uM0EyLjMzIDIuMzMgMCAwIDEgNy42IDE2bC4xLjFhMi41IDIuNSAwIDAgMCAxLjcxLjY4aDIuNjVhMyAzIDAgMCAwIDEuODItLjdsLjE3LS4xNWwuMTYtLjE1YTMgMyAwIDAgMSAxLjgyLS43aC44N3oiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTE2LjkgMTUuMDJWOS41YzAtMi40NSAwLTMuNjgtLjY3LTQuNWEzIDMgMCAwIDAtLjQ0LS40NGMtLjgzLS42Ny0yLjA1LS42Ny00LjUtLjY3bS05LjU2IDcuNzN2My4zNmMwIDEgLjgxIDEuOCAxLjggMS44bTEzLjQxLTkuNzJoMS4xM2MuNzMgMCAxLjEgMCAxLjQzLjEyYTIgMiAwIDAgMSAuNDEuMmMuMy4yLjUyLjUuOTYgMS4wOWE4IDggMCAwIDEgMS4wOCAxLjYzcS4xMi4zLjIuNmMuMTIuNDguMTIuOTcuMTIgMS45NnYuMzZjMCAxLjY2IDAgMi41LS40NyAzLjA1bC0uMjUuMjVjLS41Ni40Ny0xLjQuNDctMy4wNi40NyIgLz4KCQk8Y2lyY2xlIGN4PSI2LjA3IiBjeT0iMTcuNTIiIHI9IjIuNiIgc3Ryb2tlPSIjMDUxNzc5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2LjA3IDE3LjUyKSIgLz4KCQk8Y2lyY2xlIGN4PSIxNS45MyIgY3k9IjE3LjUyIiByPSIyLjYiIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgMTUuOTMgMTcuNTIpIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik04LjY3IDE2Ljc5aDQuNk03LjY2IDUuNTVIMS43M204LjYgMy4xNUg0LjQiIC8+Cgk8L2c+Cjwvc3ZnPgo=",title:O("Rastrear entrega"),subtitle:O("Resolva imprevistos com nossa equipe")}}}),tn=ee({id:"c0900849-4dee-4101-87d1-94063a7d0270",name:"Tela Inicial",action:"widget-base-screen",settings:{body:{logo:"",title:O("Olá! 👋"),eyebrow:O(""),subtitle:O("O que você gostaria de fazer hoje?")},header:{logo:fc,title:O("OpensTec Store"),subtitle:O("Tecnologia para sua vida")}}}),wr={id:gc,rules:[Do,Bo,gi,jo,fi,en,hi,wi,yi,vi,xi,bi,tn],edges:{[tn.id]:[oe("9cf6f5ac-2c3e-4562-ab88-c67b05f7233c",Do.id),oe("fc93460c-5fcd-4428-a250-92d139feba1f",Bo.id),oe("a429340f-5886-4c29-859d-2a342efd418b",gi.id),oe("d77eb0d5-98a0-41d0-a735-26871de389bb",jo.id),oe("7d7f4c2f-bd81-44b6-ac29-4261e59fa876",fi.id),oe("cee6fe92-c5ea-433e-afd5-b810191cf267",en.id)],[Do.id]:[oe("46bed5b0-01af-493c-be5b-1974e0cce4fa",hi.id),oe("d61de3f9-9f2c-484f-9d7a-387ccc56db32",wi.id),oe("c7bc6aaf-efde-4e43-b565-352ea71b9f7b",yi.id)],[jo.id]:[oe("2a883f9b-3422-4d05-b4c8-03095c2b1e59",vi.id)],[Bo.id]:[oe("94629ede-a015-4d9d-a265-33cc6229a1e2",xi.id),oe("9bf3284e-89b7-40b0-9ccf-30b939001da0",bi.id)]}},wc=en,yc=tn,vc=t=>wr.rules.find(o=>o.id===t),xc="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxnIGZpbGw9Im5vbmUiPgoJCTxwYXRoIGZpbGw9IiMwNTE3NzkiIGQ9Ik0zLjA0IDEzLjE0YzAtMSAuOTMtMS43NiAxLjkyLTEuNTVjLjQ0LjEuOSAwIDEuMjYtLjI2bC41MS0uMzdhNSA1IDAgMCAxIDEuMDctLjY2YTIgMiAwIDAgMSAxLjEzLS4wNGMuMy4wNy41Ny4yNCAxLjEyLjU3bC4yMi4xNGMuNy40MiAxLjA0LjYzIDEuNDIuN2EyIDIgMCAwIDAgLjYzIDBjLjM4LS4wNi43My0uMjYgMS40My0uNjZsLjQyLS4yNWMuOS0uMiAxLjc4LjQ5IDEuNzggMS40M3Y1LjY3YzAgLjczIDAgMS4wOS0uMDkgMS4zOGEyIDIgMCAwIDEtMS4zIDEuM2MtLjMuMS0uNjYuMS0xLjM4LjFjLS43MyAwLTEuMDkgMC0xLjM4LS4xYTIgMiAwIDAgMS0xLjMtMS4zYy0uMS0uMy0uMS0uNjUtLjEtMS4zOHYtLjJjMC0uOTMgMC0xLjQtLjE1LTEuNzVhMiAyIDAgMCAwLTEuMS0xLjFhNSA1IDAgMCAwLTEuNzQtLjE0aC0uODFjLS45MiAwLTEuMzggMC0xLjc0LjE0YTIgMiAwIDAgMC0xLjEgMS4xYy0uMTUuMzYtLjE1LjgyLS4xNSAxLjc0di4yM2MwIC43IDAgMS4wNi0uMDkgMS4zNWEyIDIgMCAwIDEtMS4zMiAxLjMyYy0uMjguMS0uNjQuMS0xLjM1LjFzLTEuMDcgMC0xLjM2LS4xYTIgMiAwIDAgMS0xLjMyLTEuMzJjLS4wOS0uMjktLjA5LS42NC0uMDktMS4zNXoiIG9wYWNpdHk9Ii4yIiAvPgoJCTxwYXRoIHN0cm9rZT0iIzA1MTc3OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEuODYgOS42MmMwIDEuMi41NCAyLjIyIDIuNzEgMi4yMmMyLjE4IDAgMy42Ni0yLjIyIDMuNjYtMi4yMnMxLjU1IDIuMjIgMy43MiAyLjIyYzIuMTggMCAzLjg1LTIuMjMgMy44NS0yLjIzczEuMzQgMi4yMyAzLjY1IDIuMjNjMS44IDAgMi42OS0xLjIgMi42OS0yLjJxMC0uMy0uMTUtLjk2Yy0uNTUtMi43LS44My00LjA1LTEuOTMtNC45NXMtMi42LS45LTUuNjItLjlIOS41Yy0yLjk3IDAtNC40NSAwLTUuNTYuOXMtMS4zNyAyLjItMS45MSA0LjgzcS0uMTYuNzEtLjE2IDEuMDZtMTkuMDQgMi4zMnYxLjUzYzAgMy43NyAwIDUuNjYtMS4xNyA2Ljgzcy0zLjA2IDEuMTctNi44MyAxLjE3aC0xLjg3Yy0zLjc3IDAtNS42NSAwLTYuODMtMS4xN3MtMS4xNy0zLjA2LTEuMTctNi44M3YtMS41MyIgLz4KCQk8cGF0aCBzdHJva2U9IiMwNTE3NzkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0xNS40NCAyMS4yMnYtMi4zYzAtMS4zNiAwLTIuMDQtLjMyLTIuNTRhMiAyIDAgMCAwLS42LS42Yy0uNDktLjMxLTEuMTctLjMxLTIuNTQtLjMxcy0yLjA1IDAtMi41NS4zMmEyIDIgMCAwIDAtLjYuNmMtLjMxLjQ5LS4zMSAxLjE3LS4zMSAyLjU0djIuMjkiIC8+Cgk8L2c+Cjwvc3ZnPgo=",bc={configurations:{alias:"OpensTec Store",general:{defaultBehavior:"active",languages:["pt-BR"],isClosable:!0},appearance:{theme:"light",primaryColor:"#fff"},anchor:{label:{"pt-BR":"Fale conosco","en-US":"Fale conosco","es-ES":"Fale conosco"},size:"medium",position:"bottom-right",offset:{x:16,y:16},logo:xc},voiceRemoteAddress:"snep1.test.opens.com.br",voiceCode:"7nSlDoMNwXHqV7Vq",voiceDevice:"cc342bf9-8e1a-4ddc-84e6-dc6f628ca5d8"}},kc={install:t=>{t.use(pc),t.component("AppIdentificationPage",rn),t.component("AppFormTextInput",nn),t.component("AppWidgetAnchor",an),t.component("AppArticlePage",sn),t.component("AppServicePage",yn),t.component("AppScreenPage",vn),t.component("AppWidgetView",xn),t.component("AppTextInput",Ui),t.component("AppCarousel",ro),t.component("AppAudioPlayer",pt),t.component("AppSkeleton",fn),t.component("AppTyping",hn),t.component("AppMessage",et),t.component("AppWidget",Wi),t.component("AppButton",H),t.component("AppEmpty",wn),t.component("AppGroup",$),t.component("AppEdge",Re),t.component("AppIcon",D),t.component("AppText",j)}};exports.AppArticlePage=sn;exports.AppAudioPlayer=pt;exports.AppButton=H;exports.AppCarousel=ro;exports.AppEdge=Re;exports.AppEmpty=wn;exports.AppFormTextInput=nn;exports.AppGroup=$;exports.AppIcon=D;exports.AppIdentificationPage=rn;exports.AppMessage=et;exports.AppScreenPage=vn;exports.AppServicePage=yn;exports.AppSkeleton=fn;exports.AppText=j;exports.AppTextInput=Ui;exports.AppTyping=hn;exports.AppWidget=Wi;exports.AppWidgetAnchor=an;exports.AppWidgetView=xn;exports.ServiceChatMessageBuilder=on;exports.ServiceChatMessageVO=Pe;exports.default=kc;exports.demoArticleRule=wc;exports.demoRootRule=yc;exports.demoWidgetConfig=bc;exports.demoWorkflow=wr;exports.findDemoRuleById=vc;exports.resolveMessageFrom=no;exports.useAppWidget=Te;exports.useChatService=Ti;exports.useServicePage=Ii;exports.useVoiceService=Ci;