sm-click-library-ui 0.0.611-dev.48 → 0.0.611-dev.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-B90slAXK.js → index-B2r6vU1v.js} +30 -29
- package/dist/sm-click-library-ui.es.js +1 -1
- package/dist/sm-click-library-ui.umd.js +3 -3
- package/dist/style.css +1 -1
- package/dist/{vue3-lottie.es-xXcOM-AD.js → vue3-lottie.es-C9MEQeSQ.js} +1 -1
- package/dist/{web-C2CluelH.js → web-C3UuJbXP.js} +2 -2
- package/dist/{web-YPRF2l8s.js → web-CyWroFn6.js} +2 -2
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<path d="M8.95 19.7c.7.8 1.7 1.3 2.8 1.3 1.6 0 2.9-1.1 3.3-2.5l-6.1 1.2Z" />
|
|
12
12
|
</svg>`},authentication:{label:"Autenticação",colorClass:"bg-amber-500/20 border border-amber-500/50 hover:border-amber-400 text-amber-400",icon:`<svg class="size-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
|
13
13
|
<path fill-rule="evenodd" d="M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z" clip-rule="evenodd"/>
|
|
14
|
-
</svg>`}};return re[ne.value]||re.marketing});return(re,oe)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["gap-2 font-semibold flex justify-center items-center min-w-19 lg:min-w-32 w-0 p-1.5 rounded-lg transition-colors",ae.value.colorClass])},[ee.showIcon?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:"flex-shrink-0 hidden lg:block",innerHTML:ae.value.icon},null,8,_hoisted_1$2y)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_2$2f,e$b.toDisplayString(ae.value.label),1)],2))}},_sfc_main$2L={__name:"DepartmentIcon",props:{color:{type:String,default:""}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createElementBlock("svg",{style:e$b.normalizeStyle(ee.color?{color:ee.color}:void 0),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[...ne[0]||(ne[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 4a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2v14a1 1 0 1 1 0 2H5a1 1 0 1 1 0-2V5a1 1 0 0 1-1-1Zm5 2a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H9Zm5 0a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-1Zm-5 4a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1H9Zm5 0a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1h-1Zm-3 4a2 2 0 0 0-2 2v3h2v-3h2v3h2v-3a2 2 0 0 0-2-2h-2Z","clip-rule":"evenodd"},null,-1)])],4))}},useDepartmentStore=pinia.defineStore("department",{state:()=>({departments:[],count:null,loaded:!1}),actions:{async fetchDepartments(ee=""){try{let te=`${departmentUrl}`;const ne=await api.get(te);this.departments=ne.data,this.count=this.departments.length,this.loaded=!0}catch(te){console.log("Erro ao buscar departamentos:",te)}},removeDepartments(ee){this.departments=this.departments.filter(te=>te.id!==ee)},addDepartments(ee){const te=this.departments.findIndex(ne=>ne.id===ee.id);te!==-1?this.departments[te]=ee:this.departments.push(ee)}}}),_hoisted_1$2x=["title"],_hoisted_2$2e={class:"whitespace-nowrap text-sm font-medium"},_hoisted_3$1_={class:"flex justify-center"},_hoisted_4$1O={class:"flex justify-center"},_hoisted_5$1E={class:"flex-shrink-0 hidden lg:block"},_hoisted_6$1v={key:0,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},_hoisted_7$1n={key:1,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},_hoisted_8$1e={key:2,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},_hoisted_9$18={key:3,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},_hoisted_10$11={class:"text-xs"},_hoisted_11$V={class:"mx-auto flex justify-center"},_hoisted_12$Q={class:"w-72 rounded-lg p-2"},_hoisted_13$J={key:0,class:"space-y-2"},_hoisted_14$H={class:"font-medium text-slate-100 text-sm"},_hoisted_15$C={key:1,class:"text-xs text-slate-400 text-center py-2"},_hoisted_16$y={class:"flex items-center gap-2 px-3 py-1.5 bg-gradient-to-r from-blue-500/10 to-blue-400/10 border border-blue-500/30 rounded-lg cursor-pointer hover:border-blue-300/50 transition-all"},_hoisted_17$r={class:"text-sm font-semibold text-blue-500"},_hoisted_18$r={class:"z-50 flex items-center justify-center gap-2"},_hoisted_19$m={class:"border border-base-200 rounded-md overflow-hidden"},_hoisted_20$l={class:"flex justify-between items-center p-2 sticky top-0 bg-base-200 z-10"},_hoisted_21$i={class:"font-semibold text-sm"},_hoisted_22$g=["disabled","onClick"],_hoisted_23$c=["onClick"],_hoisted_24$a=["onClick"],_hoisted_25$8=["onClick"],_sfc_main$2K={__name:"templateTable",props:{instanceId:{type:[String,Number],required:!0},departmentId:{type:[String,Number],default:null},extraParams:{type:Object,default:()=>({})},mode:{type:String,default:"manage",validator:ee=>["manage","send"].includes(ee)},showLang:{type:Boolean,default:!1},showDepartments:{type:Boolean,default:!1},itemsPerPage:{type:Number,default:15}},emits:["send","edit","delete","copy-id"],setup(ee,{expose:te,emit:ne}){const ae=ee,re=e$b.ref([]),oe=e$b.ref(!1),ie=e$b.ref(1),le=e$b.ref(0),ce=e$b.ref({}),de=useDepartmentStore(),ue=e$b.computed(()=>{const pe=[{key:"name",label:"Nome",width:"w-64",headerAlign:"left",filter:{type:"text",placeholder:"Buscar nome..."}}];return ae.showLang&&pe.push({key:"lang",label:"Idioma",width:"w-20",headerAlign:"left",filter:{type:"select",key:"language",options:[{value:"pt_BR",label:"Português"},{value:"en",label:"Inglês"}]}}),pe.push({key:"category",label:"Categoria",width:"w-32",filter:{type:"select",options:[{value:"MARKETING",label:"Marketing"},{value:"UTILITY",label:"Utilidade"},{value:"AUTHENTICATION",label:"Autenticação"}]}},{key:"status",label:"Status",width:"w-32",filter:{type:"select",options:[{value:"PENDING",label:"Pendente"},{value:"APPROVED",label:"Aprovado"},{value:"REJECTED",label:"Reprovado"},{value:"PENDING_DELETION",label:"Ag. deleção"}]}}),ae.showDepartments&&pe.push({key:"department",label:"Departamento(s)",width:"w-28",headerAlign:"center",filter:{type:"multiselect",key:"departments",options:de.departments.map(_e=>({value:String(_e.id),label:_e.name}))}}),pe.push({key:"actions",label:"Ações",width:"w-44",cellClass:"whitespace-nowrap"}),pe});async function ve(){oe.value=!0;try{const pe=new URLSearchParams;pe.set("page",ie.value),pe.set("instance",ae.instanceId),ae.departmentId&&pe.set("department",ae.departmentId);for(const[ge,ke]of Object.entries(ce.value))Array.isArray(ke)?ke.length&&pe.set(ge,ke.join(",")):ke!=null&&ke!==""&&pe.append(ge,ke);if(ae.extraParams)for(const[ge,ke]of Object.entries(ae.extraParams))Array.isArray(ke)?ke.forEach($e=>pe.append(ge,$e)):ke!=null&&ke!==""&&pe.append(ge,ke);const{data:_e}=await api.get(`${templateUrl}?${pe.toString()}`);re.value=_e.results,le.value=_e.count}catch{re.value=[],le.value=0}finally{oe.value=!1}}function me(pe){ce.value=pe,ie.value=1,ve()}function be(pe){ie.value=pe,ve()}e$b.watch(()=>[ae.instanceId,ae.departmentId,ae.extraParams],()=>{ie.value=1,ve()},{deep:!0}),e$b.onMounted(()=>{ve(),ae.showDepartments&&!de.loaded&&de.fetchDepartments()});function fe(pe){switch(pe==null?void 0:pe.toLowerCase()){case"pending":return"Pendente";case"approved":return"Aprovado";case"rejected":return"Reprovado";case"pending_deletion":return"Aguardando deleção";default:return pe??""}}return te({refresh:ve}),(pe,_e)=>{const ge=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createBlock(baseTable,{columns:ue.value,rows:re.value,loading:oe.value,"total-items":le.value,"items-per-page":ee.itemsPerPage,"current-page":ie.value,filters:ce.value,"empty-text":"Nenhum modelo de mensagem disponível","onUpdate:currentPage":be,"onUpdate:filters":me},e$b.createSlots({"empty-action":e$b.withCtx(()=>[e$b.renderSlot(pe.$slots,"empty-action",{},void 0,!0)]),"cell-name":e$b.withCtx(({row:ke})=>[e$b.createElementVNode("span",{title:ke.name,class:"block truncate text-left max-w-64 whitespace-nowrap font-medium text-sm"},e$b.toDisplayString(ke.name),9,_hoisted_1$2x)]),"cell-category":e$b.withCtx(({row:ke})=>[e$b.createElementVNode("div",_hoisted_3$1_,[e$b.createVNode(_sfc_main$2M,{category:ke.category},null,8,["category"])])]),"cell-status":e$b.withCtx(({row:ke})=>{var $e,ye,Ee,Se,Le,Me,De,Oe;return[e$b.createElementVNode("div",_hoisted_4$1O,[e$b.createElementVNode("div",{class:e$b.normalizeClass([{"bg-orange-500/20 border border-orange-500 text-orange-300 dark:text-orange-500 hover:text-orange-200 hover:border-orange-200":(($e=ke.status)==null?void 0:$e.toLowerCase())==="pending","bg-green-600/20 border border-green-600 dark:text-green-500 text-green-300 hover:text-green-200 hover:border-green-200":((ye=ke.status)==null?void 0:ye.toLowerCase())==="approved","bg-red-500/20 border border-red-500 text-red-300 dark:text-red-500 hover:text-red-200 hover:border-red-200":((Ee=ke.status)==null?void 0:Ee.toLowerCase())==="rejected"||((Se=ke.status)==null?void 0:Se.toLowerCase())==="pending_deletion"},"p-1.5 rounded-lg font-semibold text-xs flex items-center justify-center gap-2 min-w-19 lg:min-w-28 w-0 transition-colors"])},[e$b.createElementVNode("div",_hoisted_5$1E,[((Le=ke.status)==null?void 0:Le.toLowerCase())==="pending"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_6$1v,[..._e[0]||(_e[0]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3M3.22302 14C4.13247 18.008 7.71683 21 12 21c4.9706 0 9-4.0294 9-9 0-4.97056-4.0294-9-9-9-3.72916 0-6.92858 2.26806-8.29409 5.5M7 9H3V5"},null,-1)])])):((Me=ke.status)==null?void 0:Me.toLowerCase())==="rejected"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$1n,[..._e[1]||(_e[1]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"m6 6 12 12m3-6a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"},null,-1)])])):((De=ke.status)==null?void 0:De.toLowerCase())==="approved"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1e,[..._e[2]||(_e[2]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8.032 12 1.984 1.984 4.96-4.96m4.55 5.272.893-.893a1.984 1.984 0 0 0 0-2.806l-.893-.893a1.984 1.984 0 0 1-.581-1.403V7.04a1.984 1.984 0 0 0-1.984-1.984h-1.262a1.983 1.983 0 0 1-1.403-.581l-.893-.893a1.984 1.984 0 0 0-2.806 0l-.893.893a1.984 1.984 0 0 1-1.403.581H7.04A1.984 1.984 0 0 0 5.055 7.04v1.262c0 .527-.209 1.031-.581 1.403l-.893.893a1.984 1.984 0 0 0 0 2.806l.893.893c.372.372.581.876.581 1.403v1.262a1.984 1.984 0 0 0 1.984 1.984h1.262c.527 0 1.031.209 1.403.581l.893.893a1.984 1.984 0 0 0 2.806 0l.893-.893a1.985 1.985 0 0 1 1.403-.581h1.262a1.984 1.984 0 0 0 1.984-1.984V15.7c0-.527.209-1.031.581-1.403Z"},null,-1)])])):((Oe=ke.status)==null?void 0:Oe.toLowerCase())==="pending_deletion"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_9$18,[..._e[3]||(_e[3]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 7h14m-9 3v8m4-8v8M10 3h4a1 1 0 0 1 1 1v3H9V4a1 1 0 0 1 1-1ZM6 7h12v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7Z"},null,-1)])])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("span",_hoisted_10$11,e$b.toDisplayString(fe(ke.status)),1)],2)])]}),"cell-actions":e$b.withCtx(({row:ke})=>{var $e,ye;return[e$b.createElementVNode("main",_hoisted_18$r,[e$b.createVNode(ge,{placement:"left",class:"preview-popper"},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_19$m,[e$b.createElementVNode("div",_hoisted_20$l,[e$b.createElementVNode("p",_hoisted_21$i,e$b.toDisplayString(ke.name),1)]),e$b.renderSlot(pe.$slots,"preview",{template:ke},()=>[_e[5]||(_e[5]=e$b.createElementVNode("span",{class:"block p-4 text-xs text-gray-400 text-center"}," Sem pré-visualização disponível ",-1))],!0)])]),default:e$b.withCtx(()=>[_e[6]||(_e[6]=e$b.createElementVNode("button",{class:"group action-btn action-btn-info"},[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-0 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Pré-visualizar")],-1))]),_:2},1024),ee.mode==="send"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,disabled:(($e=ke.status)==null?void 0:$e.toLowerCase())!=="approved",class:e$b.normalizeClass(["action-btn group",((ye=ke.status)==null?void 0:ye.toLowerCase())==="approved"?"action-btn-success":"action-btn-danger"]),onClick:Ee=>pe.$emit("send",ke)},[..._e[7]||(_e[7]=[e$b.createElementVNode("svg",{class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 14 16"},[e$b.createElementVNode("path",{d:"M0 .984v14.032a1 1 0 0 0 1.506.845l12.006-7.016a.974.974 0 0 0 0-1.69L1.506.139A1 1 0 0 0 0 .984Z"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-0 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Enviar modelo",-1)])],10,_hoisted_22$g)):e$b.createCommentVNode("",!0),ee.mode==="manage"?(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"group action-btn action-btn-success",onClick:Ee=>pe.$emit("edit",ke)},[..._e[8]||(_e[8]=[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-0 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Editar Template",-1)])],8,_hoisted_23$c)):e$b.createCommentVNode("",!0),ee.mode==="manage"?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,class:"group action-btn action-btn-danger",onClick:Ee=>pe.$emit("delete",ke)},[..._e[9]||(_e[9]=[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M0 0h24v24H0V0z",fill:"none"}),e$b.createElementVNode("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4z"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-10 -top-3 z-50 m-2 mx-auto rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Excluir",-1)])],8,_hoisted_24$a)):e$b.createCommentVNode("",!0),ee.mode==="manage"?(e$b.openBlock(),e$b.createElementBlock("button",{key:3,class:"group action-btn action-btn-info",onClick:Ee=>pe.$emit("copy-id",ke)},[..._e[10]||(_e[10]=[e$b.createElementVNode("svg",{class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M7 9v6a4 4 0 0 0 4 4h4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1v2Z","clip-rule":"evenodd"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 3.054V7H9.2a2 2 0 0 1 .281-.432l2.46-2.87A2 2 0 0 1 13 3.054ZM15 3v4a2 2 0 0 1-2 2H9v6a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-3Z","clip-rule":"evenodd"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-2 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Copiar ID",-1)])],8,_hoisted_25$8)):e$b.createCommentVNode("",!0)]),e$b.renderSlot(pe.$slots,"extra-actions",{template:ke},void 0,!0)]}),_:2},[ee.showLang?{name:"cell-lang",fn:e$b.withCtx(({row:ke})=>[e$b.createElementVNode("span",_hoisted_2$2e,e$b.toDisplayString(ke.lang),1)]),key:"0"}:void 0,ee.showDepartments?{name:"cell-department",fn:e$b.withCtx(({row:ke})=>[e$b.createElementVNode("div",_hoisted_11$V,[e$b.createVNode(ge,{placement:"top",arrow:!1,class:"tip-popper"},{content:e$b.withCtx(()=>{var $e;return[e$b.createElementVNode("section",_hoisted_12$Q,[_e[4]||(_e[4]=e$b.createElementVNode("div",{class:"text-sm font-semibold text-slate-100 pb-2"}," Departamentos ",-1)),(($e=ke.department)==null?void 0:$e.length)>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$J,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ke.department,ye=>(e$b.openBlock(),e$b.createElementBlock("div",{key:ye.id,class:"bg-slate-800/80 rounded-lg p-2 border border-slate-700/50 hover:border-blue-500/30 transition-all"},[e$b.createElementVNode("span",_hoisted_14$H,e$b.toDisplayString(ye.name),1)]))),128))])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$C," Sem departamentos vinculados "))])]}),default:e$b.withCtx(()=>{var $e;return[e$b.createElementVNode("div",_hoisted_16$y,[e$b.createVNode(_sfc_main$2L,{class:"size-5 text-blue-400"}),e$b.createElementVNode("span",_hoisted_17$r,e$b.toDisplayString(($e=ke.department)==null?void 0:$e.length),1)])]}),_:2},1024)])]),key:"1"}:void 0]),1032,["columns","rows","loading","total-items","items-per-page","current-page","filters"])}}},templateTable=_export_sfc$1(_sfc_main$2K,[["__scopeId","data-v-07b01775"]]);function tryOnScopeDispose(ee){return e$b.getCurrentScope()?(e$b.onScopeDispose(ee),!0):!1}function toValue(ee){return typeof ee=="function"?ee():e$b.unref(ee)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString$2=Object.prototype.toString,isObject=ee=>toString$2.call(ee)==="[object Object]",noop=()=>{},isIOS=getIsIOS();function getIsIOS(){var ee,te;return isClient&&((ee=window==null?void 0:window.navigator)==null?void 0:ee.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((te=window==null?void 0:window.navigator)==null?void 0:te.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function unrefElement(ee){var te;const ne=toValue(ee);return(te=ne==null?void 0:ne.$el)!=null?te:ne}const defaultWindow=isClient?window:void 0;function useEventListener$1(...ee){let te,ne,ae,re;if(typeof ee[0]=="string"||Array.isArray(ee[0])?([ne,ae,re]=ee,te=defaultWindow):[te,ne,ae,re]=ee,!te)return noop;Array.isArray(ne)||(ne=[ne]),Array.isArray(ae)||(ae=[ae]);const oe=[],ie=()=>{oe.forEach(ue=>ue()),oe.length=0},le=(ue,ve,me,be)=>(ue.addEventListener(ve,me,be),()=>ue.removeEventListener(ve,me,be)),ce=e$b.watch(()=>[unrefElement(te),toValue(re)],([ue,ve])=>{if(ie(),!ue)return;const me=isObject(ve)?{...ve}:ve;oe.push(...ne.flatMap(be=>ae.map(fe=>le(ue,be,fe,me))))},{immediate:!0,flush:"post"}),de=()=>{ce(),ie()};return tryOnScopeDispose(de),de}let _iOSWorkaround=!1;function onClickOutside(ee,te,ne={}){const{window:ae=defaultWindow,ignore:re=[],capture:oe=!0,detectIframe:ie=!1}=ne;if(!ae)return noop;isIOS&&!_iOSWorkaround&&(_iOSWorkaround=!0,Array.from(ae.document.body.children).forEach(me=>me.addEventListener("click",noop)),ae.document.documentElement.addEventListener("click",noop));let le=!0;const ce=me=>re.some(be=>{if(typeof be=="string")return Array.from(ae.document.querySelectorAll(be)).some(fe=>fe===me.target||me.composedPath().includes(fe));{const fe=unrefElement(be);return fe&&(me.target===fe||me.composedPath().includes(fe))}}),ue=[useEventListener$1(ae,"click",me=>{const be=unrefElement(ee);if(!(!be||be===me.target||me.composedPath().includes(be))){if(me.detail===0&&(le=!ce(me)),!le){le=!0;return}te(me)}},{passive:!0,capture:oe}),useEventListener$1(ae,"pointerdown",me=>{const be=unrefElement(ee);le=!ce(me)&&!!(be&&!me.composedPath().includes(be))},{passive:!0}),ie&&useEventListener$1(ae,"blur",me=>{setTimeout(()=>{var be;const fe=unrefElement(ee);((be=ae.document.activeElement)==null?void 0:be.tagName)==="IFRAME"&&!(fe!=null&&fe.contains(ae.document.activeElement))&&te(me)},0)})].filter(Boolean);return()=>ue.forEach(me=>me())}const _hoisted_1$2w={class:"line-clamp-2 uppercase text-xs truncate text-white"},_hoisted_2$2d={key:0,class:"select_widget_lib"},_sfc_main$2J={__name:"primary_select",props:{config:{type:Object,default:{title:"select_primary"}}},emits:["closeSelect"],setup(ee,{emit:te}){const ne=ee,ae=e$b.ref(!1),re=e$b.ref(null);e$b.computed(()=>ne.selectConfig.some(le=>le.freeSlot));const oe=()=>{ae.value=!ae.value};return onClickOutside(re,()=>{ae.value&&(ae.value=!1)}),(le,ce)=>(e$b.openBlock(),e$b.createElementBlock("div",{ref_key:"target",ref:re,class:"relative w-full"},[e$b.createElementVNode("button",{onClick:oe,class:"bg-base-100 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-base-300"},[e$b.createElementVNode("div",null,[e$b.createElementVNode("p",_hoisted_1$2w,e$b.toDisplayString(ee.config.title),1)]),e$b.createElementVNode("div",null,[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass([ae.value?"rotate-180 transition-transform ease-in-out":"","w-3 h-3 text-white"]),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[...ce[0]||(ce[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M18.4 10.3A2 2 0 0 0 17 7H7a2 2 0 0 0-1.5 3.3l4.9 5.9a2 2 0 0 0 3 0l5-6Z","clip-rule":"evenodd"},null,-1)])],2))])]),ae.value?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_2$2d,[e$b.createElementVNode("div",null,[e$b.renderSlot(le.$slots,"free-slot",{},void 0,!0)])])):e$b.createCommentVNode("",!0)],512))}},primarySelect=_export_sfc$1(_sfc_main$2J,[["__scopeId","data-v-265f04f1"]]),_hoisted_1$2v={key:0,class:"modal_head"},_hoisted_2$2c={class:"modal_responsive"},_hoisted_3$1Z={class:"flex min-h-full items-center justify-center text-center sm:p-0"},_hoisted_4$1N={class:"modal_tittle text-current bg-base-300 border-base-100"},_hoisted_5$1D={class:"flex items-center w-full"},_hoisted_6$1u=["innerHTML"],_hoisted_7$1m={class:"text-xl ml-1 font-semibold flex items-center gap-2"},_hoisted_8$1d={class:"bg-base-200"},_hoisted_9$17={class:"text-center"},_hoisted_10$10={class:"modal_end_button border-base-100 bg-base-300"},_sfc_main$2I={__name:"simple_modal",props:{isOpen:{type:Boolean,default:!1},header:{type:Object,default:{title:"title",svg:"<svg class='w-5 mr-2 text-primary inline-block' aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'> <path d='M18 3h-5.7a2 2 0 0 0-1.4.6L3.6 11a2 2 0 0 0 0 2.8l6.6 6.6a2 2 0 0 0 2.8 0l7.4-7.5a2 2 0 0 0 .6-1.4V6a3 3 0 0 0-3-3Zm-2.4 6.4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z' /> </svg>"}},size:{type:String,default:"md:w-1/2 xl:w-1/3"}},emits:["update:isOpen","close"],setup(ee,{emit:te}){e$b.useSlots();const ne=ee,ae=te,re=()=>{ae("update:isOpen",!ne.isOpen),ne.isOpen&&ae("close")};return(oe,ie)=>(e$b.openBlock(),e$b.createBlock(e$b.Transition,{"leave-active-class":"transition-opacity duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0","enter-active-class":"transition-opacity duration-200 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100"},{default:e$b.withCtx(()=>{var le,ce;return[ee.isOpen?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$2v,[ie[2]||(ie[2]=e$b.createElementVNode("div",{class:"modal-overlay absolute h-full w-full bg-gray-600 opacity-50"},null,-1)),e$b.createElementVNode("div",_hoisted_2$2c,[e$b.createElementVNode("div",_hoisted_3$1Z,[e$b.createElementVNode("div",{class:e$b.normalizeClass([ee.size,"z-50 w-full shadow-card rounded-2xl"])},[e$b.createElementVNode("div",_hoisted_4$1N,[e$b.createElementVNode("section",_hoisted_5$1D,[oe.$slots.header?e$b.renderSlot(oe.$slots,"header",{key:1},void 0,!0):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[e$b.createElementVNode("span",{innerHTML:(le=ee.header)==null?void 0:le.svg},null,8,_hoisted_6$1u),e$b.createElementVNode("h3",_hoisted_7$1m,e$b.toDisplayString((ce=ee.header)==null?void 0:ce.title),1)],64))]),e$b.createElementVNode("button",{onClick:ie[0]||(ie[0]=de=>re()),class:"modal_close_button bg-base-200/40"},[...ie[1]||(ie[1]=[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)])])]),e$b.createElementVNode("div",_hoisted_8$1d,[e$b.createElementVNode("div",_hoisted_9$17,[e$b.renderSlot(oe.$slots,"body",{},void 0,!0)])]),e$b.createElementVNode("div",_hoisted_10$10,[e$b.renderSlot(oe.$slots,"footer",{},void 0,!0)])],2)])])])):e$b.createCommentVNode("",!0)]}),_:3}))}},simpleModal=_export_sfc$1(_sfc_main$2I,[["__scopeId","data-v-171e94f2"]]),_hoisted_1$2u={class:"simple_card_header"},_hoisted_2$2b={key:0,class:"simple_card_icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"none"},_hoisted_3$1Y={key:1,class:"simple_card_icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"none"},_hoisted_4$1M={key:2,class:"simple_card_icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"none"},_hoisted_5$1C={key:3,class:"simple_card_icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 23 23"},_hoisted_6$1t={class:"simple_card_title"},_hoisted_7$1l={class:"simple_card_descripiton"},_sfc_main$2H={__name:"simple_card",props:{content:{type:Object,default:{title:"Title",description:"Coloque aqui a descrição"}},typeCard:{type:String,default:"default"}},setup(ee){const te=ee,ne=e$b.computed(()=>({simple_card_success:te.typeCard==="success",simple_card_info:te.typeCard==="info",simple_card_alert:te.typeCard==="alert",simple_card_error:te.typeCard==="error"}));return(ae,re)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass([ne.value,"simple_card"])},[e$b.createElementVNode("div",_hoisted_1$2u,[ee.typeCard==="success"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_2$2b,[...re[0]||(re[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.25 10C0.25 4.61522 4.61522 0.25 10 0.25C15.3848 0.25 19.75 4.61522 19.75 10C19.75 15.3848 15.3848 19.75 10 19.75C4.61522 19.75 0.25 15.3848 0.25 10ZM13.6103 8.18593C13.8511 7.84887 13.773 7.38046 13.4359 7.1397C13.0989 6.89894 12.6305 6.97701 12.3897 7.31407L9.1543 11.8436L7.53033 10.2197C7.23744 9.92678 6.76256 9.92678 6.46967 10.2197C6.17678 10.5126 6.17678 10.9874 6.46967 11.2803L8.71967 13.5303C8.87556 13.6862 9.09215 13.7656 9.31186 13.7474C9.53157 13.7293 9.73216 13.6153 9.8603 13.4359L13.6103 8.18593Z",fill:"currentColor"},null,-1)])])):e$b.createCommentVNode("",!0),ee.typeCard==="info"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_3$1Y,[...re[1]||(re[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.25 10C0.25 4.61522 4.61522 0.25 10 0.25C15.3848 0.25 19.75 4.61522 19.75 10C19.75 15.3848 15.3848 19.75 10 19.75C4.61522 19.75 0.25 15.3848 0.25 10ZM10 6.25C10.4142 6.25 10.75 6.58579 10.75 7V10.75C10.75 11.1642 10.4142 11.5 10 11.5C9.58579 11.5 9.25 11.1642 9.25 10.75V7C9.25 6.58579 9.58579 6.25 10 6.25ZM10 14.5C10.4142 14.5 10.75 14.1642 10.75 13.75C10.75 13.3358 10.4142 13 10 13C9.58579 13 9.25 13.3358 9.25 13.75C9.25 14.1642 9.58579 14.5 10 14.5Z",fill:"currentColor"},null,-1)])])):e$b.createCommentVNode("",!0),ee.typeCard==="alert"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_4$1M,[...re[2]||(re[2]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.40123 2.0034C9.55572 0.0022862 12.4439 0.0022856 13.5983 2.0034L20.9527 14.7509C22.1065 16.7509 20.6631 19.2501 18.3541 19.2501H3.64546C1.33649 19.2501 -0.106939 16.7509 1.04691 14.7509L8.40123 2.0034ZM11 7.25C11.4142 7.25 11.75 7.58579 11.75 8V11.75C11.75 12.1642 11.4142 12.5 11 12.5C10.5858 12.5 10.25 12.1642 10.25 11.75V8C10.25 7.58579 10.5858 7.25 11 7.25ZM11 15.5C11.4142 15.5 11.75 15.1642 11.75 14.75C11.75 14.3358 11.4142 14 11 14C10.5858 14 10.25 14.3358 10.25 14.75C10.25 15.1642 10.5858 15.5 11 15.5Z",fill:"currentColor"},null,-1)])])):e$b.createCommentVNode("",!0),ee.typeCard==="error"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_5$1C,[...re[3]||(re[3]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm7.707-3.707a1 1 0 0 0-1.414 1.414L10.586 12l-2.293 2.293a1 1 0 1 0 1.414 1.414L12 13.414l2.293 2.293a1 1 0 0 0 1.414-1.414L13.414 12l2.293-2.293a1 1 0 0 0-1.414-1.414L12 10.586 9.707 8.293Z","clip-rule":"evenodd"},null,-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_6$1t,e$b.toDisplayString(ee.content.title),1)]),e$b.createElementVNode("section",_hoisted_7$1l,[e$b.createElementVNode("p",null,e$b.toDisplayString(ee.content.description),1)])],2))}},FRAME_LAYER_OPTIONS=Object.freeze({ring:[{key:"gradient",label:"Gradiente"},{key:"rainbow",label:"Arco-íris"},{key:"neon",label:"Neon"},{key:"double",label:"Aro duplo"},{key:"solid",label:"Cor sólida"},{key:"arc",label:"Aro de assinatura",locked:!0}],ornament:[{key:"none",label:"Sem ornamento"},{key:"wings",label:"Asas"},{key:"crown",label:"Coroa"},{key:"holly",label:"Azevinho"},{key:"bow",label:"Laço"},{key:"flowers",label:"Flores"},{key:"cat",label:"Gatinho"},{key:"runes",label:"Runas",locked:!0},{key:"bolt",label:"Raio",locked:!0},{key:"heart",label:"Coração",locked:!0},{key:"bars",label:"Barras",locked:!0},{key:"blade",label:"Lâmina",locked:!0},{key:"claw",label:"Garra",locked:!0},{key:"crest",label:"Emblema",locked:!0},{key:"orb",label:"Orbe",locked:!0}],effect:[{key:"none",label:"Sem efeito"},{key:"aura",label:"Aura"},{key:"flame",label:"Fogo"},{key:"frost",label:"Geada"},{key:"lightning",label:"Raios"}],particles:[{key:"none",label:"Sem partículas"},{key:"sparks",label:"Faíscas"},{key:"stars",label:"Estrelas"},{key:"snow",label:"Neve"},{key:"confetti",label:"Confetes"},{key:"hearts",label:"Corações"},{key:"petals",label:"Pétalas"},{key:"paws",label:"Patinhas"},{key:"whales",label:"Baleias",locked:!0}]}),RING_FINE=Object.freeze({gradient:{width:3,glow:.45,intensity:.65},rainbow:{width:5,glow:.78,intensity:.9},neon:{width:5,glow:.9,intensity:.92},double:{width:4,glow:.6,intensity:.8},solid:{width:3,glow:.3,intensity:.6},arc:{width:4,glow:.95,intensity:.95}}),ORNAMENT_FINE=Object.freeze({none:{intensity:.7,scale:1,offset_y:0,placement:"front"},wings:{intensity:.9,scale:1.08,offset_y:2,placement:"behind"},crown:{intensity:.95,scale:1,offset_y:0,placement:"front"},holly:{intensity:.8,scale:1,offset_y:0,placement:"front"},bow:{intensity:.9,scale:1,offset_y:0,placement:"front"},flowers:{intensity:.88,scale:1,offset_y:0,placement:"behind"},cat:{intensity:.95,scale:1,offset_y:0,placement:"behind"},runes:{intensity:1,scale:1,offset_y:0,placement:"front"},bolt:{intensity:1,scale:1,offset_y:0,placement:"front"},heart:{intensity:1,scale:.96,offset_y:0,placement:"front"},bars:{intensity:1,scale:.94,offset_y:0,placement:"front"},blade:{intensity:1,scale:1,offset_y:0,placement:"front"},claw:{intensity:1,scale:1,offset_y:0,placement:"front"},crest:{intensity:1,scale:1,offset_y:0,placement:"front"},orb:{intensity:1,scale:.98,offset_y:0,placement:"front"}}),EFFECT_FINE=Object.freeze({none:{intensity:.65,spread:1},aura:{intensity:.55,spread:1},flame:{intensity:.92,spread:.85},frost:{intensity:.75,spread:1},lightning:{intensity:.9,spread:1.1}}),PARTICLES_FINE=Object.freeze({none:{intensity:.65,density:7,size:1,orbit:1},sparks:{intensity:.9,density:10,size:.8,orbit:1.15},stars:{intensity:.7,density:8,size:1,orbit:1},snow:{intensity:.8,density:9,size:1,orbit:1},confetti:{intensity:.8,density:10,size:1,orbit:1},hearts:{intensity:.82,density:8,size:1,orbit:1.04},petals:{intensity:.78,density:9,size:1,orbit:1.08},paws:{intensity:.86,density:7,size:1,orbit:1.06},whales:{intensity:.9,density:3,size:1.15,orbit:1.08}}),MOTION_FINE=Object.freeze({none:{speed:.9,pulse:!0,flicker:!1},aura:{speed:.8,pulse:!0,flicker:!1},flame:{speed:1.35,pulse:!1,flicker:!0},frost:{speed:.65,pulse:!0,flicker:!1},lightning:{speed:1.5,pulse:!1,flicker:!0}}),DEFAULT_COLORS=["#7C3AED","#22D3EE","#F8FAFC"],HEX_COLOR=/^#[0-9a-f]{6}$/i;function clone(ee){return JSON.parse(JSON.stringify(ee))}function color(ee,te){return HEX_COLOR.test(String(ee||""))?String(ee).toUpperCase():te}function optionEntry(ee,te){return FRAME_LAYER_OPTIONS[ee].find(ne=>ne.key===te)}function optionExists(ee,te){return!!optionEntry(ee,te)}function frameVariantLocked(ee,te){var ne;return!!((ne=optionEntry(ee,te))!=null&&ne.locked)}const LAYERS=["ring","ornament","effect","particles"];function isSignatureFrameVisual(ee){const te=normalizeFrameVisual(ee);return LAYERS.some(ne=>frameVariantLocked(ne,te[ne].variant))}function defaultVariant(ee){return FRAME_LAYER_OPTIONS[ee][0].key}function normalizeLayer(ee,te,ne){var oe,ie,le;const ae=te&&typeof te=="object"?te:{},re=optionExists(ee,ae.variant)?ae.variant:defaultVariant(ee);return{enabled:ae.enabled!==!1&&re!=="none",variant:re,colors:[color((oe=ae.colors)==null?void 0:oe[0],ne[0]),color((ie=ae.colors)==null?void 0:ie[1],ne[1]),color((le=ae.colors)==null?void 0:le[2],ne[2])]}}function ringBackground(ee,te){const[ne,ae,re]=te;return ee==="solid"?ne:ee==="rainbow"?`conic-gradient(from var(--sm-frame-angle, 0deg), ${ne}, #F97316, ${ae}, #22C55E, #06B6D4, ${re}, #8B5CF6, #EC4899, ${ne})`:ee==="neon"?`conic-gradient(from var(--sm-frame-angle, 0deg), ${ne}, ${ae}, ${re}, ${ne})`:ee==="double"?`linear-gradient(135deg, ${ne}, ${ae})`:`linear-gradient(135deg, ${ne}, ${ae} 50%, ${re})`}function normalizeFrameVisual(ee={}){var de,ue,ve,me,be,fe,pe;const te=ee&&typeof ee=="object"?ee:{},ne=[color((ue=(de=te.ring)==null?void 0:de.colors)==null?void 0:ue[0],DEFAULT_COLORS[0]),color((me=(ve=te.ring)==null?void 0:ve.colors)==null?void 0:me[1],DEFAULT_COLORS[1]),color((fe=(be=te.ring)==null?void 0:be.colors)==null?void 0:fe[2],DEFAULT_COLORS[2])],ae={...normalizeLayer("ring",te.ring,ne)};Object.assign(ae,RING_FINE[ae.variant]||RING_FINE.gradient);const re={...normalizeLayer("ornament",te.ornament,ne)};Object.assign(re,ORNAMENT_FINE[re.variant]||ORNAMENT_FINE.none);const oe={...normalizeLayer("effect",te.effect,ne)};Object.assign(oe,EFFECT_FINE[oe.variant]||EFFECT_FINE.none);const ie={...normalizeLayer("particles",te.particles,ne)};Object.assign(ie,PARTICLES_FINE[ie.variant]||PARTICLES_FINE.none);const le=MOTION_FINE[oe.variant]||MOTION_FINE.none,ce={enabled:((pe=te.motion)==null?void 0:pe.enabled)!==!1,speed:le.speed,rotation:!0,direction:"clockwise",pulse:le.pulse,flicker:le.flicker};return{ring:ae,ornament:re,effect:oe,particles:ie,motion:ce,css:ringBackground(ae.variant,ae.colors),animated:ce.enabled}}function frameRingBackground(ee){const te=normalizeFrameVisual(ee);return ringBackground(te.ring.variant,te.ring.colors)}function resolveFrameVisual(ee){return ee!=null&&ee.visual?normalizeFrameVisual(ee.visual):null}function preset(ee,te,ne,ae=""){return{id:ee,name:te,description:ae,visual:normalizeFrameVisual(ne)}}const FRAME_STUDIO_PRESETS=Object.freeze([preset("slate","Grafite",{ring:{variant:"solid",colors:["#94A3B8","#64748B","#CBD5E1"]},motion:{enabled:!1}}),preset("sunrise","Alvorada",{ring:{variant:"gradient",colors:["#FBBF24","#FB7185","#FDE68A"]},motion:{enabled:!1}}),preset("tide","Maré",{ring:{variant:"double",colors:["#38BDF8","#0EA5E9","#E0F2FE"]},motion:{enabled:!1}}),preset("pulse","Pulso",{ring:{variant:"neon",colors:["#8B5CF6","#22D3EE","#F8FAFC"]},motion:{enabled:!0}}),preset("halo","Halo",{ring:{variant:"gradient",colors:["#A78BFA","#F0ABFC","#F8FAFC"]},effect:{variant:"aura",colors:["#A78BFA","#F0ABFC","#FFFFFF"]},motion:{enabled:!0}}),preset("aurora","Aurora",{ring:{variant:"neon",colors:["#34D399","#38BDF8","#F472B6"]},effect:{variant:"aura",colors:["#34D399","#38BDF8","#F472B6"]},particles:{variant:"stars",colors:["#F8FAFC","#38BDF8","#F472B6"]},motion:{enabled:!0}}),preset("celestial-wings","Asas Celestiais",{ring:{variant:"double",colors:["#E0E7FF","#818CF8","#C4B5FD"]},ornament:{variant:"wings",colors:["#F8FAFC","#A5B4FC","#C4B5FD"]},effect:{variant:"aura",colors:["#A5B4FC","#C4B5FD","#FFFFFF"]},particles:{variant:"stars",colors:["#FFFFFF","#C4B5FD","#A5B4FC"]},motion:{enabled:!0}}),preset("inferno","Inferno",{ring:{variant:"neon",colors:["#EF4444","#F97316","#FDE047"]},effect:{variant:"flame",colors:["#EF4444","#F97316","#FDE047"]},particles:{variant:"sparks",colors:["#FDE047","#FB923C","#EF4444"]},motion:{enabled:!0}}),preset("winter","Inverno Encantado",{ring:{variant:"double",colors:["#E0F2FE","#38BDF8","#A5F3FC"]},ornament:{variant:"holly",colors:["#166534","#22C55E","#DC2626"]},effect:{variant:"frost",colors:["#E0F2FE","#7DD3FC","#FFFFFF"]},particles:{variant:"snow",colors:["#FFFFFF","#E0F2FE","#BAE6FD"]},motion:{enabled:!0}}),preset("champion","Campeão",{ring:{variant:"double",colors:["#F59E0B","#FDE68A","#D97706"]},ornament:{variant:"crown",colors:["#FDE68A","#F59E0B","#FFFFFF"]},effect:{variant:"aura",colors:["#F59E0B","#FDE68A","#FFFFFF"]},particles:{variant:"confetti",colors:["#F59E0B","#22D3EE","#F472B6"]},motion:{enabled:!0}}),preset("neon-storm","Tempestade Neon",{ring:{variant:"neon",colors:["#22D3EE","#6366F1","#D946EF"]},effect:{variant:"lightning",colors:["#67E8F9","#818CF8","#FFFFFF"]},particles:{variant:"sparks",colors:["#67E8F9","#C4B5FD","#FFFFFF"]},motion:{enabled:!0}}),preset("spectrum","Espectro",{ring:{variant:"rainbow",colors:["#FB7185","#FACC15","#60A5FA"]},motion:{enabled:!0}},"Cores espectrais em um aro contínuo."),preset("pastel","Pastel",{ring:{variant:"double",colors:["#5BCEFA","#F5A9B8","#FFFFFF"]},effect:{variant:"aura",colors:["#5BCEFA","#F5A9B8","#FFFFFF"]},particles:{variant:"stars",colors:["#FFFFFF","#5BCEFA","#F5A9B8"]},motion:{enabled:!0}},"Tons suaves e pontos de luz."),preset("charm","Encanto",{ring:{variant:"double",colors:["#F472B6","#C084FC","#FDF2F8"]},ornament:{variant:"bow",colors:["#F472B6","#C084FC","#FFFFFF"]},effect:{variant:"aura",colors:["#F9A8D4","#C4B5FD","#FFFFFF"]},particles:{variant:"hearts",colors:["#FB7185","#F472B6","#C084FC"]},motion:{enabled:!0}},"Formas delicadas e brilho sutil."),preset("garden","Jardim",{ring:{variant:"gradient",colors:["#FB7185","#D946EF","#FEF3C7"]},ornament:{variant:"flowers",colors:["#F9A8D4","#FDE68A","#FFFFFF"]},effect:{variant:"aura",colors:["#F9A8D4","#E879F9","#FFFFFF"]},particles:{variant:"petals",colors:["#FDA4AF","#F9A8D4","#FDE68A"]},motion:{enabled:!0}},"Elementos orgânicos em movimento."),preset("playful","Travessura",{ring:{variant:"neon",colors:["#A855F7","#EC4899","#67E8F9"]},ornament:{variant:"cat",colors:["#C084FC","#F9A8D4","#FDE68A"]},effect:{variant:"aura",colors:["#A855F7","#EC4899","#67E8F9"]},particles:{variant:"paws",colors:["#F9A8D4","#C084FC","#67E8F9"]},motion:{enabled:!0}},"Linhas expressivas e detalhes lúdicos.")]),FRAME_SIGNATURE_MODELS=Object.freeze([preset("signature-runes","Aro Ancestral",{ring:{variant:"arc",colors:["#FBBF24","#F59E0B","#FEF3C7"]},ornament:{variant:"runes",colors:["#FCD34D","#F59E0B","#FFFBEB"]},particles:{variant:"sparks",colors:["#FDE68A","#FBBF24","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-bolt","Faísca Arcana",{ring:{variant:"arc",colors:["#FCD34D","#F59E0B","#FEF9C3"]},ornament:{variant:"bolt",colors:["#FDE047","#F59E0B","#FFFBEB"]},particles:{variant:"stars",colors:["#FEF9C3","#FDE047","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-heart","Doce Encanto",{ring:{variant:"arc",colors:["#F472B6","#EC4899","#FFFFFF"]},ornament:{variant:"heart",colors:["#F9A8D4","#EC4899","#FFFFFF"]},particles:{variant:"hearts",colors:["#F9A8D4","#FB7185","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-bars","Pulso Púrpura",{ring:{variant:"arc",colors:["#A78BFA","#8B5CF6","#DDD6FE"]},ornament:{variant:"bars",colors:["#C4B5FD","#8B5CF6","#F5F3FF"]},particles:{variant:"whales",colors:["#C4B5FD","#8B5CF6","#F5F3FF"]},motion:{enabled:!0}}),preset("signature-blade","Lâmina de Luz",{ring:{variant:"arc",colors:["#60A5FA","#3B82F6","#DBEAFE"]},ornament:{variant:"blade",colors:["#38BDF8","#64748B","#FFFFFF"]},particles:{variant:"sparks",colors:["#DBEAFE","#60A5FA","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-claw","Rastro Ancestral",{ring:{variant:"arc",colors:["#4ADE80","#22C55E","#DCFCE7"]},ornament:{variant:"claw",colors:["#86EFAC","#16A34A","#F0FDF4"]},particles:{variant:"sparks",colors:["#DCFCE7","#4ADE80","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-crest","Emblema Heroico",{ring:{variant:"arc",colors:["#EF4444","#B91C1C","#FFF1F2"]},ornament:{variant:"crest",colors:["#F87171","#B91C1C","#FFFFFF"]},particles:{variant:"sparks",colors:["#FFF1F2","#EF4444","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-orb","Orbe Selvagem",{ring:{variant:"arc",colors:["#FDE047","#FACC15","#FEF9C3"]},ornament:{variant:"orb",colors:["#FACC15","#EF4444","#FFFFFF"]},particles:{variant:"sparks",colors:["#FEF9C3","#FDE047","#FFFFFF"]},motion:{enabled:!0}})]);function findFramePreset(ee){return FRAME_STUDIO_PRESETS.find(te=>te.id===ee)||FRAME_SIGNATURE_MODELS.find(te=>te.id===ee)||null}const DECORATIVE_LAYERS=["effect","particles","ornament"],FRAME_TIERS=Object.freeze([{layers:1,name:"Simples",hint:"nível 1–10"},{layers:2,name:"Composta",hint:"nível 10–20"},{layers:3,name:"Elaborada",hint:"nível 20–40"},{layers:4,name:"Lendária",hint:"nível 40+"}]);function activeDecorativeLayers(ee){return DECORATIVE_LAYERS.filter(te=>ee[te].enabled&&ee[te].variant!=="none")}function frameLayerCount(ee){return 1+activeDecorativeLayers(normalizeFrameVisual(ee)).length}function frameTier(ee){const te=frameLayerCount(ee);return FRAME_TIERS.find(ne=>ne.layers===te)||FRAME_TIERS[FRAME_TIERS.length-1]}const LADDER_STEP_LEVELS=Object.freeze({1:[10],2:[10,25],3:[5,15,30],4:[5,15,25,40]}),LADDER_STEP_SUFFIX=["I","II","III","IV"];function deriveFrameLadder(ee){const te=normalizeFrameVisual(ee==null?void 0:ee.visual),ne=activeDecorativeLayers(te),ae=ne.length+1,re=LADDER_STEP_LEVELS[ae]||LADDER_STEP_LEVELS[4],oe=String((ee==null?void 0:ee.name)||"Moldura").trim();return Array.from({length:ae},(ie,le)=>{const ce=ne.slice(0,le),de=DECORATIVE_LAYERS.reduce((ue,ve)=>{const me={variant:"none",enabled:!1};return{...ue,[ve]:ce.includes(ve)?clone(te[ve]):{...me,colors:clone(te[ve].colors)}}},{});return{type:"frame",name:`${oe} ${LADDER_STEP_SUFFIX[le]||le+1}`,status:!0,season_id:null,visual:normalizeFrameVisual({ring:clone(te.ring),...de,motion:{enabled:te.motion.enabled&&ce.length>0}}),availability:{kind:"level",level:re[le]}}})}function createFrameDraft(ee="aurora"){const te=findFramePreset(ee)||FRAME_STUDIO_PRESETS[0];return{id:null,type:"frame",name:te.name,status:!0,season_id:null,availability:{kind:"public"},visual:clone(te.visual)}}function validateFrameDraft(ee){var ne;const te={};return String((ee==null?void 0:ee.name)||"").trim()||(te.name="Dê um nome para a moldura."),String((ee==null?void 0:ee.name)||"").trim().length>48&&(te.name="Use no máximo 48 caracteres."),((ne=ee==null?void 0:ee.availability)==null?void 0:ne.kind)==="season_rank"&&!ee.availability.season_id&&!(ee!=null&&ee.season_id)&&(te.season_id="Escolha a temporada desta regra de obtenção."),te}function validateFrameRewardDraft(ee){const te={};return String((ee==null?void 0:ee.name)||"").trim()||(te.name="Dê um nome para a moldura."),String((ee==null?void 0:ee.name)||"").trim().length>48&&(te.name="Use no máximo 48 caracteres."),te}function framePayloadBase(ee){const te=normalizeFrameVisual(ee.visual),ne={ring:layerPayload(te.ring),ornament:layerPayload(te.ornament),effect:layerPayload(te.effect),particles:layerPayload(te.particles),motion:{enabled:te.motion.enabled}};return{type:"frame",name:String(ee.name).trim(),status:ee.status!==!1,visual:ne}}function layerPayload(ee){return{enabled:ee.enabled,variant:ee.variant,colors:[...ee.colors]}}function createFrameRewardApiPayload(ee){const te=validateFrameRewardDraft(ee);if(Object.keys(te).length){const ne=new Error("A recompensa de moldura possui campos inválidos.");throw ne.fields=te,ne}return{...framePayloadBase(ee)}}function createFrameApiPayload(ee){const te=validateFrameDraft(ee);if(Object.keys(te).length){const oe=new Error("A moldura possui campos inválidos.");throw oe.fields=te,oe}const ne=typeof ee.availability=="string"?{kind:ee.availability}:ee.availability||{kind:"public"},{season_id:ae,...re}=ne;return{...framePayloadBase(ee),season_id:ae??ee.season_id??null,availability:re}}const whaleSvgUrl="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%20512%20512'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--fxemoji'%20preserveAspectRatio='xMidYMid%20meet'%3e%3cpath%20fill='%2394DEF7'%20d='M508.36%20241.99c-.123-.424-.26-.795-.405-1.142c5.304%20107.375-138.325%20176.779-239.848%20176.779c-54.532%200-67.454-46.877-87.643-95.976a301.342%20301.342%200%200%200-1.632-5.615c-21.07-69.795-137.899-101.8-169.134-72.73C4.803%20247.599%202%20253.601%202%20261.516c0%201.012.018%202.017.049%203.018C4.113%20394.814%20139.282%20499.93%20269.945%20499.93c131.673%200%20238.414-106.742%20238.414-238.414c.001-4.659.673-17.2.001-19.526z'%3e%3c/path%3e%3cpath%20fill='%2300B1FF'%20d='M507.965%20241.215c-.006-.123-.004-.244-.01-.367c.143.342.279.708.4%201.126a161.121%20161.121%200%200%200-1.056-9.011c-.032-.278-.055-.554-.09-.833l-.031-.018c-8.724-58.79-48.079-97.941-77.889-113.876a132.97%20132.97%200%200%200-3.237-4.838c-.02-.079-.036-.152-.055-.234l-.549-2.538l-.585-2.947c-.36-2.108-.741-4.43-1.015-6.874c-.277-2.439-.456-4.996-.447-7.456c-.01-2.462.258-4.803.696-6.683a11.487%2011.487%200%200%201%201.611-3.982c.081-.089.16-.173.222-.266l.089-.14a.702.702%200%200%200%20.12-.109c.072-.077.123-.165.181-.25c.087-.066.163-.137.229-.216c.107-.171.334-.293.447-.489c.111-.074.213-.156.307-.246c.081-.097.17-.202.313-.289c.124-.094.243-.196.356-.307c.107-.114.309-.193.446-.31c.156-.111.279-.24.452-.356c.192-.108.38-.221.566-.341l.277-.184l.069-.047l.034-.024c-.514.261.717-.367.608-.313l.042-.025l.333-.198l1.329-.79l.663-.394l1.071-.669l2.165-1.446c.764-.505%201.293-.942%201.892-1.403c.59-.453%201.158-.931%201.73-1.397c1.104-.982%202.203-1.955%203.22-2.99c2.022-2.081%203.867-4.254%205.436-6.51a50.883%2050.883%200%200%200%206.825-13.662a51.363%2051.363%200%200%200%202.352-12.61a49.822%2049.822%200%200%200-.47-10.397c-.215-1.514-.544-2.927-.824-4.207a59.17%2059.17%200%200%200-1.018-3.503c-.719-2.096-1.418-3.699-1.976-4.794c-.542-1.093-.925-1.68-.913-1.734a3.677%203.677%200%201%200-7.354%200c.011-.054-.371.397-1.015%201.246l-2.719%203.598c-.566.756-1.18%201.579-1.86%202.449c-.64.878-1.393%201.793-2.129%202.753a140.065%20140.065%200%200%201-4.97%205.968c-1.784%202.016-3.684%204.002-5.631%205.805a51.29%2051.29%200%200%201-5.935%204.721c-.971.691-1.984%201.262-2.949%201.843c-.511.255-.988.537-1.477.802c-.254.118-.515.225-.755.359c-.235.121-.519.3-.64.307c-.156.047-.305.1-.448.162l-.243.131l-.699.327l-1.4.656l-.351.164l-.044.021c-.138.069%201.065-.543.523-.267l-.136.068l-.272.136l-1.086.55l-2.165%201.13c-.722.403-1.448.87-2.167%201.314c-.719.465-1.427.893-2.133%201.425l-2.097%201.607c-5.574%204.353-10.324%2010.744-13.017%2017.447a45.584%2045.584%200%200%200-2.618%209.686c-3.718-2.178-7.716-4.218-12.143-5.924c-5.35-2.082-11.365-3.729-18.329-4.023c-3.461-.156-7.197.17-10.933%201.044c-3.743.906-7.489%202.417-10.773%204.478l-1.213.787l-.3.2c-.105.069.617-.399.294-.188l-.039.029l-.079.057l-.314.228l-1.249.908l-.73.523c-.219.147-.326.283-.63.457c-1.047.756-2.107%201.382-3.138%201.994a38.17%2038.17%200%200%201-6.192%202.876c-1.033.359-2.068.709-3.092.949c-1.028.313-2.036.465-3.025.68c-1.967.338-3.827.559-5.39.655c-1.587.153-2.832.12-3.685.186c-.83.021-1.217.084-1.048.184a7.926%207.926%200%201%200-8.402%2013.442c.172.095.553%201.025%201.368%202.479a31.423%2031.423%200%200%200%204.07%205.575c1.984%202.124%204.66%204.542%208.256%206.574a39.084%2039.084%200%200%200%2013.332%204.725c5.245.91%2011.233.794%2017.244-.526c3.005-.653%205.986-1.638%208.894-2.852l.55-.237l.62-.298l1.242-.61l1.244-.628l.992-.526l.04-.021c.268.033.74.083%201.404.223c.805.193%201.855.443%203.02.848c2.357.761%205.185%201.989%208.117%203.41c1.452.739%202.981%201.462%204.476%202.283c1.505.807%202.979%201.696%204.503%202.526c1.509.85%202.988%201.743%204.443%202.643a129.62%20129.62%200%200%201%204.333%202.649l4.141%202.608l3.893%202.507l10.771%207.08c.101.136.196.268.299.406c21.579%2017.085%2036.028%2042.773%2038.141%2071.892c-.998-.854-1.982-1.651-2.872-2.397c-2.216-1.767-4.078-3.186-5.433-4.158l-2.201-1.569c-2.067-1.467-4.924-1.564-7.116-.024a6.16%206.16%200%200%200-1.498%208.581l.319.454l1.271%201.809c.84%201.192%202.011%202.966%203.359%205.101c.648%201.092%201.385%202.239%202.089%203.499c.714%201.253%201.468%202.563%202.174%203.95c.744%201.366%201.435%202.805%202.122%204.258c.728%201.437%201.291%202.949%201.939%204.41c.598%201.478%201.103%202.963%201.636%204.395c.413%201.451.884%202.854%201.219%204.198c.019.095.041.188.06.282a100.474%20100.474%200%200%201-2.494%208.182a55.331%2055.331%200%200%200-1.985%203.467c-45.484%2087.138-130.687%2078.792-180.854%203.023c-17.245-26.045-48.063-43.714-80.768-53.436c-18.699-7.551-41.129-10.855-64.603-10.855c-53.511%200-92.27%206.326-95.012%2048.874c30.674-21.373%20118.321.252%20153.936%2050.866c5.14%209.819%209.563%2019.925%2013.682%2029.94l.016.055c3.365%208.183%206.529%2016.287%209.717%2024.139c.393.969.788%201.934%201.182%202.895c.276.672.55%201.357.827%202.025l.006-.007c13.068%2031.496%2027.327%2057.82%2058.081%2064.988l.139.032a66.858%2066.858%200%200%200%204.419.868l.463.075c.624.098%201.255.188%201.892.271l.591.077c.601.074%201.208.139%201.82.199c.234.023.465.048.701.07c.591.053%201.19.097%201.791.138c.256.017.509.038.768.053c.617.036%201.243.062%201.871.085c.244.009.484.023.73.03a92.24%2092.24%200%200%200%202.646.039c1.609%200%203.228-.018%204.857-.053c.547-.012%201.102-.036%201.652-.052c1.087-.031%202.172-.059%203.267-.105c.652-.027%201.311-.068%201.966-.101c1.001-.05%202-.096%203.007-.159c.697-.043%201.4-.1%202.1-.149c.975-.069%201.947-.133%202.927-.214c.721-.059%201.448-.131%202.171-.196c.965-.087%201.928-.17%202.897-.268c.744-.075%201.493-.162%202.239-.244c.956-.104%201.911-.206%202.871-.321c.758-.091%201.52-.193%202.28-.291c.955-.122%201.908-.242%202.866-.375c.774-.107%201.551-.225%202.328-.339c.947-.139%201.893-.276%202.842-.425c.184-.029.367-.053.552-.082l.785%201.47l1.362%202.542l1.511%202.616l1.588%202.736l1.774%202.819l1.883%202.926c.629%201.001%201.32%201.96%202.048%202.98l2.184%203.048c.771%201.04%201.541%202.091%202.369%203.109c.793%201.021%201.705%202.08%202.562%203.124c.86%201.046%201.748%202.099%202.698%203.164c.971%201.041%201.898%202.072%202.93%203.111l3.091%203.108c2.144%202.086%204.409%204.038%206.827%205.976c2.336%201.948%204.899%203.813%207.508%205.514l4.009%202.49a60.862%2060.862%200%200%200%204.157%202.26c.706.351%201.39.715%202.106%201.043l2.158.954c1.449.605%202.821%201.288%204.3%201.783l4.373%201.444c1.443.459%202.922.799%204.352%201.181c2.876.749%205.788%201.081%208.545%201.524c1.383.2%202.787.209%204.138.307c1.359.052%202.683.189%203.991.143c1.301.005%202.595-.082%203.848-.136l1.86-.097l1.811-.196c1.189-.118%202.363-.321%203.496-.485l1.678-.264l1.622-.346c1.065-.219%202.106-.511%203.11-.758c1.003-.269%201.981-.481%202.91-.802a209.75%20209.75%200%200%200%205.216-1.868a79.912%2079.912%200%200%200%208.02-3.919c2.132-1.272%203.744-2.443%204.835-3.184c.546-.366.956-.697%201.233-.907l.418-.322a4.174%204.174%200%200%200%20.263-6.392l-.911-.83l-.458-.417c-.301-.272-.748-.7-1.316-1.176l-.946-.821l-1.116-.918c-.8-.688-1.701-1.367-2.69-2.158l-3.167-2.597c-1.117-.924-2.321-1.74-3.524-2.817l-3.72-3.034c-.645-.463-1.251-1.075-1.882-1.593c-.628-.522-1.254-1.091-1.888-1.598c-2.511-2.143-4.94-4.378-7.212-6.533c-.599-.478-1.092-1.15-1.652-1.649l-1.611-1.589c-.513-.543-1.007-1.115-1.521-1.612c-.53-.47-.994-1.05-1.474-1.576c-1.959-2.032-3.744-4.085-5.652-6.054c-1.905-1.947-3.878-4.015-6.065-6.197a682.294%20682.294%200%200%201-7.103-7.078c-2.505-2.473-5.193-5.031-8.038-7.729a315.84%20315.84%200%200%200%203.962-1.505c.444-.172.885-.348%201.328-.521a350.725%20350.725%200%200%200%204.768-1.91a313.805%20313.805%200%200%200%204.781-2.005a329.54%20329.54%200%200%200%203.989-1.747c.476-.212.951-.427%201.427-.641a305.31%20305.31%200%200%200%203.339-1.532c.376-.175.753-.348%201.128-.524a320.563%20320.563%200%200%200%204.26-2.046c.377-.185.751-.373%201.127-.559a294.32%20294.32%200%200%200%203.322-1.67c.423-.216.846-.431%201.268-.649a288.878%20288.878%200%200%200%204.238-2.228l.284-.155c1.329-.716%202.65-1.444%203.965-2.179c.394-.22.786-.442%201.178-.663c1.153-.652%202.3-1.31%203.44-1.976c.266-.156.535-.309.801-.465a285.739%20285.739%200%200%200%204.119-2.473c.295-.181.587-.364.881-.545c1.118-.69%202.228-1.388%203.332-2.092c.329-.21.659-.419.987-.631c1.359-.876%202.71-1.76%204.047-2.657l.121-.082a249.4%20249.4%200%200%200%204.754-3.28a238.369%20238.369%200%200%200%203.466-2.491c.147-.108.296-.214.442-.321a230.552%20230.552%200%200%200%203.864-2.908c.221-.17.439-.341.659-.512a218.993%20218.993%200%200%200%203.218-2.538c.235-.189.472-.377.706-.567a217.815%20217.815%200%200%200%203.734-3.089l.004-.004a212.063%20212.063%200%200%200%204.234-3.692a206.713%20206.713%200%200%200%203.333-3.043l.136-.125c1.175-1.1%202.33-2.213%203.471-3.335c.159-.156.315-.314.474-.471c.995-.985%201.975-1.979%202.943-2.981c.158-.164.318-.326.475-.491a177.773%20177.773%200%200%200%206.316-6.948l.49-.571a164.21%20164.21%200%200%200%205.848-7.245c.113-.148.223-.297.335-.446a158.277%20158.277%200%200%200%202.496-3.4l.293-.409a147.489%20147.489%200%200%200%205.086-7.678l.336-.546a136.36%20136.36%200%200%200%204.502-7.931l.234-.453a130.998%20130.998%200%200%200%201.881-3.77l.167-.346a125.44%20125.44%200%200%200%203.6-8.347l.214-.552a119.768%20119.768%200%200%200%202.918-8.553c.049-.164.096-.329.144-.493c.399-1.354.775-2.716%201.124-4.086l.081-.309a113.712%20113.712%200%200%200%201.063-4.606c.301-1.441.57-2.892.816-4.35l.098-.583c.491-3.002.865-6.04%201.115-9.112l.043-.569c.11-1.442.196-2.89.251-4.347c.004-.1.01-.2.013-.301c.057-1.592.081-3.193.071-4.803l-.003-.202c-.01-1.499-.055-2.997-.124-4.502zM356.242%20108.389a1.689%201.689%200%200%201-.207.161c-.525.374-1.155.726-1.641.873l.863-.465l.342-.184l.086-.046l.043-.023c-.469.306.692-.446.563-.361l-.049.045z'%3e%3c/path%3e%3cpath%20fill='%23EDEDE2'%20d='M176.205%20308.716a16.311%2016.311%200%200%200-.31-1.818c-12.97-55.324-43.201-75.19-75.053-86.142c-29.651-10.195-76.99-16.091-75.57%2014.413c41.872-11.739%20127.743%2017.345%20150.933%2073.547z'%3e%3c/path%3e%3cpath%20fill='%23D6D3C5'%20d='M85.928%20216.421l-6.395%2020.515l-.314-.078c-.744-.181-1.486-.356-2.227-.526l-.736-.167c-.332-.075-.662-.144-.994-.217l6.388-20.494c1.436.305%202.864.627%204.278.967zm-20.656-3.485l-6.344%2020.352c.304.032.607.061.913.096c.273.031.547.062.822.095c.68.08%201.362.164%202.048.255l.63.087l6.361-20.406a120.92%20120.92%200%200%200-4.43-.479zm35.57%207.82c-1.16-.399-2.35-.79-3.561-1.174l-6.407%2020.555c.79.252%201.581.512%202.371.776l.546.182c.41.139.82.284%201.23.426l6.408-20.558c-.196-.068-.391-.14-.587-.207zm-52.369-7.783l-6.142%2019.704c.136-.006.271-.012.407-.016c.584-.021%201.172-.036%201.764-.047c.27-.005.542-.007.813-.009c.537-.005%201.076-.007%201.618-.004l6.233-19.997c-1.605.07-3.173.191-4.693.369zm116.922%2063.139l-3.041%209.756c.297.362.599.721.89%201.087l.047.061c.8%201.007%201.571%202.031%202.329%203.063l2.458-7.887a129.759%20129.759%200%200%200-2.683-6.08zm-8.388-14.817a100.83%20100.83%200%200%200-3.195-4.439l-4.766%2015.288a125.806%20125.806%200%200%201%203.56%203.267l4.401-14.116zm-13.148-15.651a95.275%2095.275%200%200%200-3.552-3.257l-5.891%2018.561c1.268.849%202.525%201.71%203.762%202.594l5.681-17.898zm-115.01-23.571l-3.604%2011.563a27.64%2027.64%200%200%200%20.028%201.54c.354-.098.707-.195%201.066-.288c.229-.06.457-.12.689-.177a61.822%2061.822%200%200%201%202.213-.501c.142-.03.287-.056.43-.085l5.386-17.28c-2.495%201.365-4.595%203.094-6.208%205.228zm101.376%2012.692a102.81%20102.81%200%200%200-3.822-2.404l-6.369%2020.012c1.312.694%202.613%201.409%203.906%202.138l6.285-19.746zm-14.108-7.87a131.68%20131.68%200%200%200-4.013-1.805l-6.499%2020.478c1.349.564%202.693%201.145%204.032%201.744l6.48-20.417z'%3e%3c/path%3e%3cpath%20fill='%232B3B47'%20d='M243.055%20335.671c6.275%200%2011.371%205.085%2011.371%2011.381v13.973c0%206.285-5.096%2011.382-11.371%2011.382c-6.285%200-11.381-5.097-11.381-11.382v-13.973c0-6.296%205.095-11.381%2011.381-11.381z'%3e%3c/path%3e%3c/svg%3e",harrysWandUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAA11UlEQVR42uzav6ue9QGG8U9MSMAYJIgoKg4SXPxBpxBwEbQ6dBCtILSCIAi1IELbyUmnujlI61BwEATBJaDVtlAiGQPBRZSASJAQCZE2sSSpiTnfToFDCbE5533f50l6feD6G+7lliRJrnk34zf4O07iAo7jb/g1dkqSJNeVX+KfGFfoOH4uSZJc87bhDxj/Y2v4nSRJcs3ahT9jXGVreEqSJLnm3IHDGBvseJ+AJEmuLT/BMYxN9itJkmT+8DP8C2MB/UWSJJm9F3ABY0EdkyRJZusGvIGx4P4tSZLM0k7sx1hCJyRJktm5HYcwltRfJUmSWbkfRzGW2MuSJMls/BSnMJbYP7BLkiSZhedxHmPJ/UKSJJncFvweYwX9UZIkmdwOvIuxgj7GNkmSZFK34CDGCvoMN0uSJJPagyMYK+g47pYkSSb1EE5irKAz2CtJkkzqGZzDWEE/4AlJkmQyW/Aq1jBW1EuSJMlktuMdjBX2hiRJMpndOICxwj7EVkmSZBL34AuMFXYYOyVJkknswwmMFXYMd0mSJJN4GmcxVth3eFCSJJnEy7iIscIu4DFJkmTltuEtjAl6UZIkWbld+Ahjgl6XJElW7k58ijFB7+MGSZJkpfbiG4wJOoQbJUmSlXoSZzAm6CvcJkmSrHddPv0vdQr3S5IkK7MVb2JM1Hk8IkmSrMxN+ABjotbwnCRJsjJ34DDGhL0mSZKszAP4GmPC3sMWSZJkJR7HaYwJO4gdkiTJSryACxgT9iVulSRJlm4LXsWYuG9xryRJsnQ7sR9j4r7Hw5IkydLdjkMYE7eGZyVJkqW7D0cxTN8rkiTJ0j2KUxim721JkmTpnsd5DNP3CbZLkiTX/dP/Up9jtyRJsjQ78C7GTDqJPZIkydLcgoMYM+ks9kmSJEuzB0cwZtJFPCVJkizNQziJMaN+K0mSLM0zOIcxo/4kSZIs9em/hjGjPsY2SZJk4bbjHYyZ9RluliRJFm43DmDMrOO4W5IkWbh78AXGzDqDvZIkycLtwwmMmfUDnpAkSRbuaZzFmGEvSZIkC/cyLs50/N+QJEkWahvemunwD3yIrZIkycLswkczHf6Bw9gpSZIszJ34dKbDP3AMd0mSJAuzF9/MdPgHvsODkiTJwjyJMzMd/oELeEySJPm/ePpf6kVJkmQhtuLNmQ7++l6XJEkW4iZ8MNPBX9/7uEGSJNm0O3B4poO/vkO4UZIk2bQH8PVMB399X+E2SZJk0x7H6ZkO/vpO435JkmTTXsCFmQ7++s7jEUmSZFO24NWZjv1/t4bnJEmSTdmJ/TMd+8v1miRJsim349BMh/5yvYctkiTJht2HozMd+st1EDskSZINexSnZjr0l+tL3CpJkmzY8zg/06G/XN/iXkmS5Lp/+l/qezwsSZJsyA68O9ORv3ys4VlJkmRDbsHBmY78lXpFkiTZkD04MtOBv1JvS5IkG/IQTs504K/UJ9guSZJctWdwbqYDf6U+x25JkmRDT/+1mQ78lTqJPZIkyVXZjndmOu4/1lnskyRJrspuHJjpuP9YF/GUJElyVe7hP+zdS2zWdb7H8ffTK/RCqaU3WlpKS+kdCr1B5Y7AqCMDo8OMMjExcTEnMSbHnSvduXPhwoUnLkxMTNyYaHSpcXaHEDdGY2KMx8wZYzAnYgJGEH4H/+c8JDgdbMvzfeZ5+rxfyWf9//1Xn16+3/+PT0u03JeTZ5AkSSuyAHxTosW+nLyCJElakYeBKyVa7MvJe0ANkiRp2Z4GrpdosS8nHwMtSJKkZakF/gNI0cnlcgmIyH8DvUiSpGVpBt4tRvFvbGxIQEQuA3NIkqRl6QE+ii7/muqqtK2rI1XF/Pb/E3AKSZK0LHPA19Hlv76uLu3e1p9qq6ujnvEUkiRpWU4Dl6PLv6WxIe0fG04N9XVRz3gRSZJUOpP+nRtb0rGp8cj/+78DVCNJku6oGngJSNHp79iUTk5Ppu7WjVHPuAA0IkmS7qgJeLsYk/5jW3rSb3ZPpYHO9qjn/M11P0mSft1m4EJ0+VdXVaWZwa1Z+U/290Y953tgCkmSdEeTwFfR5V9fW5sWR7Zn5T87NBD1sZ9rwHEkSdIdnQAuRZd/8/p16fDE6M/ln03818St+/0FSZJ0R08C16LLf9OG5nTfzvGs/I9Mjqb1dbVRz3oBSZL0T+WA54AUnS2b7vl50j8r/+O7JlJL3Lrfm0AVkiRpSY3AW8WY9N/R0/1z8Wc5eTOdLRuinnceaECSJC2pC/jPYkz67/m/Sf98sp1/ICJfAJ1IkqQljQNfFmPSf9//T/rnM9q7Oep5l4AJJEnSko4B3xVj0v/QxMht5T8zGLbudxU4iiRJWtITwNX4Sf+m/KR/PtnOf3VVVcTzbgCPI0mS/nWT/r1ttyb9b+Xw5GhaVxu27vc8kiTpH9QDrwMpOkPdnfnSv5X7dk5k/w4AIvIGkEOSJN2mDfgwuvircrm0a6Dvl+Wf/SWgI27d70OgHkmSdJsh4LPo8q+tqU4Lw4NZ4f8yfe1tUc/9HGhHkiTdZhG4GF3+DfV16cD4jqXKP/vwDxCRb4FhJEnSbc4CP0SXf2tTYzo6NbZk+U9v60+5mOf+CBxGkiT9w6T/jejy72lrTSemJ5cs/32x637nkCRJ5NUBrxVx0n+pZB/+qa+tiXr2s0iSJPJagfeLMem/c+uWf1b+2Yd/Atf9XkWSJJG3Dfi0GJP+80tP+t9a92trbop6/gdAHZIkKbMAfFOUSf+x/KT/ksnu+Qci8gnQiiRJyjwMXIku/42NDflJ/3+a7d2dUc+/CAwhSZIyTwPXo8u/a2NLOr5r4k7ln339D4jIFWABSZJEDfAykKLT37EpncwX/dLJvv5XFXO173XgDJIkiWbg3eDiz+7qn+jryQr+Tjk4PpLqasLW/Z5BkiTRA3wUXf411VVpZmjgV8v/2NR4aqyvjzrHK0iSJOaAr6PLf31dXdo/Nvyr5X8idt3vPaAGSZIq3GngcnT5tzQ2pCOT2aT/r2bzPa1R5/gYaEGSpApXlEn/zmVM+ucz2NURdY6/A31IklTBqoGXSmXSP5+p/i1R57gMzCFJUgVrAt4uxqT/2JZs0n9ZmY9b9/sJOIUkSRVsM3AhuPyza3pnBrcuu/z3j+1ItdXVUed5CkmSKtgk8FV0+dfX1qbFke3LLv+jU2PZPQBARF5EkqQKdgK4FFz+2TW9hydGl1v+2WDgxsaGqPO8A1QjSVKFehK4Fl3+mzY0Z3f1Z+W+zHS3bow6zwWgEUmSKlAOeA5Iwcmu6T05Pbmi8h/obI86z9+AXiRJqkCNwFvFmPTf0dOdFfpKMtnfG3Wm74EpJEmqQF3A+WJM+u/OT/qvILNDAykXs+53DTiOJEkVaBz4shiT/vvyk/7LT3YPQOC631+QJKkCHQO+K8ak/6GJkRWX/5HJ0bS+rjbqXC8gSVIFegK4Gj/p37TiSf/8ul9L3Lrfm0AVkiRVkKJN+ve2rXjSP8vJm+ls2RB1rvNAA5IkVZB64HUgRWeouzMr81UkuwwIiMgXQCeSJFWQNuDD4OLPLufZNdC36vKf6OuJOtslYAJJkirIEPBZdPnX1lSnheHBVZf/zGDYut9V4CiSJFWQReBicPlnl/McGN+x2vLPLgOqrqqKONsN4HEkSaogZ4Efosu/takxu6FvleWfrfutqw1b93seSZIqRH7S/0Z0+fe0taYT+Un/VeS+nRPZdwKAiLwB5JAkqQLUAa+V+qT/zWQrgh1x635/BeqRJKkCtALvF2PSf+fWLVmJ30362tuizvg50I4kSRVgG/BpMSb95/OT/neRkZ7uqDN+CwwjSVIFWAC+Kcqk/9iOuy7/6W39KRdzxh+Bw0iSVAEeBq5El//Gxob8pP9dZV/sut85JEmqAE8D16PLv2tjS3Y5z12Wf3YjYH1tTdQ5n0WSpDWuBngZSMHJvst/8q6KP7/uNx657vcqkiStcc3Au9HFn8vlsu/y5wv8btf92pqbos76AVCHJElrWA/wUXT511RXpZmhgay8C5Etm8LW/T4BWpEkaQ2bA76OLv/1dXVp/9hwwcp/e3dn1FkvAkNIkrSGnQYuR5d/S2NDOjI5Vqjyz64FBiJyBdiLJElrWFEm/TsLM+mfT3YtcFVVLuKs14EzSJK0RlUDL5XTpH8+B8dHUl1N2LrfM0iStEY1AW8XY9J/bEs26V+wHJsaT4319VFnfgVJktaozcCFokz6D24taPmfiF33ew+oQZKkNWgS+Cp+0r82LY5sz0q7kOm5pzXqzB8DLUiStAadAC4V45v+RybGCl7+g10dUWf+O9CHJElr0JPAtejy725tSSemJwpe/lP9W6LOfBmYQ5KkNSYHPAek6Ax1d6QH9uwsePnP/7zulwtb9zuFJElrTCPwVjEm/Xdv60sPze0qePkfGNuRaquro87+FJIkrTFdwPliTPofmtiRfjc/XfDyPzo1lhrq66LO/iKSJK0x48CXxZj0v3/PZPr93j0FL//juyayYUIgIu8A1UiStIYcA74rxqT/mYXp9IfF2aywC53u1o1RZ78ANCJJ0hryBHC1GJP+f7x3Nsv9AUN/A53tUWf/G9CLJElrRFEn/R87OJ/+dGAupPwn+3ujzv49MIUkSWtEPfA6kKIztbU3/fnQQjp3cCE9OFP4if/ZoYGUi1n3+wl4EEmS1og24MPo4q+uqkr7x4ZSVv6H5tNv5wo/8b9/bDhy3e8vSJK0RgwBn0WXf31tTToxPf5z+Wf53fzugpf/kcnRbKMAiMgLSJK0RiwCF6PLv3n9upuFv+tW+Z8JWvdriVv3exOoQpKkNeAs8EN0+Xe0NKc/LM7cKv9H9s0UvPxP3kznxg1R73AeaECSpDKXn/S/EV3+g13t6bED87fK/4/759Jv9hR+17+/Y1PUO3wBdCJJUpmrA14r5qR/Po/unw9Z95voC1v3uwRMIElSmWsF3i/GpP/i6NBt5f/YwYX0wEzhy39mMGzd7ypwFEmSytw24NNiTPof3zWWL/5b+e1s4Xf9F0e2Zz9sAIXODeBxJEkqcwvAN8WY9H9obuft5X9wIZ2ai1n3W1cbtu73PJIklbmHgSvR5d++oTk9srjnH37zP71Q+PK/b+dE9sMGEJE3gBySJJWxp4Hr0eXf335PevTAXL70Y9f9pidTR0vYut9fgXokSSpTNcDLQIrOSG9X9j3/X5b/2Xtjrvbta2+LepfPgXYkSSpTzcC7wcWfTd7PDw9kZf+LhN3uN9LTHfU+3wLDSJJUpnqAj4LLP7to5+jUyFLln33058GA8p/e1p9yMe/zI3AYSZLK1BzwdXT5N62rTw/N7lyi/LPb/ULW/fbFrvudQ5KkMnUauBxd/ps2NKVH9mWT/kvmVMDVvocmRrJvCwAReRZJksrUvxdj0r9pfX06PLEjHds5umQWR7enue3bCprZoYHUtC5s3e9VJEkqQ9XAS0AyK84HQB2SJJWZJuDtEi3XUs8nQCuSJJWZzcCFEi3XUs9FYAhJksrMJPBViZZrqecKsBdJksrMCeBSiZZrqec6cAZJksrMk8C1Ei3XcsgzSJJURnLAcyVaquWSV5AkqYw0Am+VaKmWS94DapAkqUx0AedLtFTLJR8DLUiSVCbGgS9LtFTLJX8H+pAkqUwcA74r0VItl1wG5pAkqUw8AVwt0VItl1wHTiFJUhlw0r9weQpJkspAPfB6iZZpueVFJEkqA23AhyVapuWWd4BqJEkqcUPAZyVapuWWC0AjkiSVuEPA/0QX4/q62tTW3Lii3NPUmFoa1hc8Vblc1Hv+F9CNJEkl7izwQ3T5d7VuSGfvnUl/PrSw7PzpwFy6f8/O9JvdUwXNRF9v1Ht+D0whSVIJy0/634gu/8Gu9vTYgfkVlf+5gwvpwZldBS//2aGBlIv57f8n4EEkSSphdcBrQIrO1NberNBXknOH5tNDs9MFL//9Y8Oppro66l3/DUmSSlgr8H508VdXVaXF0aGs0Fea383vLnj5H5kczWYQgIi8gCRJJWwb8Gl0+dfX1qTju8ZWVf5n9u4pePkf3zWRWhobot73TaAKSZJK1ALwTXT5N69fl07N7VxV+T+yb6bg5X/yZjpbNkS973mgAUmSStTDwJXo8m/f0JweWdyzqvI/e+9sVtiFTn/7pqj3/QLoRJKkEvU0cD26/Pvb29KjB+ZWVf6P7p8PWfcb7d0c9b6XgAkkSSpBNcDLQIrOSG9Xtra3mvJ/7OBCeiBg3W9mMGzd7ypwFEmSSlAz8G5w8WcFOz88kBX5avPb2cKX/+LI9mwLASh0bgCPI0lSCeoBPoou/7qamnTfKif9sxxcSKfmCr/ud3hyNK2rDVv3ex5JkkrQHPB1dPk3ratPD+Un/VeZ0wuFL//7dk5kWwhARN4AckiSVGJOA5ejy3/Thqb0yL5VTPpHr/tNT6aOuHW/vwL1SJK0Mmtj0r+v/Z70p/2rmfSPX/fra2+Leu/PgXYkSSoh1cBLpT7pH327346e7qj3/hYYRpKkEtIEvF2MSf+57VuzAr+LZLcBPjBT+PKf3tafcjHv/iNwGEmSSshm4EJw+Wc35x2ZHLnL8s9u9wtZ99sXu+53DkmSSsgk8FV0+a+vr0sPzExmBX63OTVX+Kt9D02MZJcOARF5FkmSSsgJ4FJ0+bc2NaQze3fnC7wE1/3GI9f9XkWSpBLyJHAtuvw337Mx/fHe2YKU/+/37QlZ92trbop6/w+AOiRJKgE54DkgRWf75o507uB8vsBLct2vp6016v0/AVqRJKkENAJvFWPSf3Yom/QvRLJvBdy/p/Dlv727MwERuQgMIUlSCegCzsdP+lelwxM7Clb+jx6Iudp310BfAiJyBdiLJEklYBz4MnzSv672ZllPFqr8sw8FPRhwte/C8GCqirna9zpwBkmSSsAx4Lvo8t/Y2JDOLEwXrvyD1v0Ojo9kNw8CEXkGSZJKwBPA1ejy725tyU/6FyxnAtb9jk2Np8b6+gRE5BUkSfoVa2bSf6i7Iz2Wn/QvUH6/t/Drfidi1/3eA2qQJP0ve3cWI9lZnnH8X73v+7739L5Ud9d0dVXP9DabZ8zsnq1n6eBIIY5CgrgggRByAYhEoEQCK0oQJEIROIAgEkRmu0AK4BihGAcQi0NYQoLjgLAQGI/J2J55M31CCbDA7vF8X51TdZ6f9Ghu5+756vT3fq+EqBL4e8B8Z26oLyhsl9lc8TPu19PibdzvK0AjIiIiIWoFPuO5+IP38temx5yX/8Xtcb/d7m/8j3R1GOAjjwEDiIiIhGgU+Lrn8g/eyz+SmnlueUd2u9/cYL8BPnIVyCAiIhKiFeAHnss/eC//dHbBfflvZO34kvvyz/od9zuFiIhIiDaBn/ou/67mBttcTQeF7TQby3bSw2rftekJKy8tNcBHXoGIiEhIcjf9b/gu/5Gu9uATfVDYjnM6637W/+DctNVUVhjgI29FREQkJBXAuwv1pn8uZz3M+h9emA0eJQJ85CNAKSIiIiFoBv4pHzf9V6ZGvZX/hZW0l3G/7uYmA3zkYaAWERGREOwCHsnHTf/DC9O+yj94NdDHgp/hznYDfORRoA8REZEQLAPfz8dN/1OZeW/lf2k946X8k4N9BvjIE8A8IiIiITgHPOW7/Nsb6u38yuJzSzvy2/2WRoct4Wfc71ngOCIiIiF4JXDdd/kPtrfa5fVMUNS+cnIp5WHcb9zK/I37vRwREZE8KwPeDpjvTPZ1Bb/OfZb/6az7G/8HklNWXVFugI+8GRERkTyrBz7mufiDz+bZ8eFcSXsc91v0Mu7X6G/c74NACSIiInnUC3zBd/lXlJXZHfPT3sv//F7343533kxnY4MBPvIQUIOIiEgeZYD/8V3+dVWVdjIz7738N1f9rPYdbG8zwEe+DXQiIiKSR3cBV32Xf1tDnZ3fu+i9/C+vZb2M+0319RjgIz8GZhEREYGc4rjpP9DeYpfWMt7L/8rGsh3zMO6XHvE27vc0cBAREZE8KQX+slhu+udywsN2v5XJseB5YsB1bgB3IyIikid1wP35uOmfGRvyXvq51b6nMu7H/fYnp6yq3Nu43xsQERHJkx7gYc/lHzyQcyA5mSto7znjYbvfHfOzwfPEgI+8H0ggIiKCf0ngv3yXf3VlhR1LJ3PlXJjjfqmkdfgb93sAqERERAT/jgA/9l3+zXU1dmbP7lw5F+y430B7qwE+8k2gHREREfz7beAZ3+Xf09IUrNt9TkkX3Ha/id5uA3zkcWAcERERzxLA6wHznbGeDtvayOat/K+sZ+1Y2n35p3YNWgIM97kG7EdERMSzWuDD+bjpvzQa3PTPW7b2Zb2M++31O+63hYiIiGddwEP+b/qX2P7ZiaCU85lTGferfffNTlpleZkBPvI6REREPJsBvuO5/INVuEcXk7lSLvBxvxmf437vQkRE5DlKgTngHuCvgPcCHwc+BzwIfBh4B/BG4CTQzPO7A/iR7/Jvqs3vTf9czu51v9r3SCpprfV1BvjIJ4FyREREgErgAvAx4Ce3WCjXgS8CfwEs8MteBjxdbDf9c9lc8TPu19vabICPfBVoQkREYq8XeBvwuMOS+RfgHPDmYrzpn8ulte1xP/flP9bTZYCPfA8YQkREYq0aeA3wBGCFmrmhvqCM853L635W+y4MDxjgI08BexARkVg7DPxnVEt9BwnG4tZnxsMo/2CD4HEPq32Xx0esxM9q3+vAGUREJNbuAZ6JarHvIMFY3JHUTDjl72ncb2Nm0irKvI37vQoREYmtauC9US31naaxptruWk7lCrkoxv0Ozc1YbWWlAT7ydkREJLZKgQ9FtdR3mo7Geruwkg6t/M/uKbhxv08AZYiISCwlgHdFtdR3mpGu9u139nNlXDTjfj0t3sb9vgI0IiIisfXnUS31qN/0z+Xi9rjfbvc3/ke6OgzwkceAAUREJLZ+P6qlvtOb/itTo6GWf7Ddz8O439xgvwE+chXIICIisXUZuB7Vct/JTf/DC9Phlv9G1o4vuS//rN9xv1OIiEhsHQKuRbXcXyDBApxTmfmghEPLxrKd9LDad216wspLSw3wkVcgIiKxlQWejGq57+Sz/9ncQp8Qczrrftb/4Ny0VVdUGOAjb0NERGJrDPh+VMt9p+lsagje2Q9t1t/DuN/hhdlgWyHgIx8BShERkVjqBb4T1VIvlEPA+ZW0l3G/7uYmA3zkYaAWERGJpUbgi1Et80I5BFxcXfKy4Ge4s90AH3kU6ENERGKpCvhnXyVcXVFuU33dtjY9Zofmp4J/p/u7ra6q0gDv6W5utMvrGf+rfdczXsp/dqDXAB/5MZBERERiKQHc56t8Z/p7nu8XeDCm19nUUPCHAF/b/dKjw5bwM+73DHAEERGJrdf5Kt09E7t2XKD7kxPbXwoK9hBwcsn9jf/VqXEr8zfudw8iIhJb54AbPgomtav/Vks0WNLT19pccIeA01n32/0OJKesyt+B6C2IiEhspXzN+o/3dN7Gp/SsTfR2Fcwh4Oyyn3G/Rn/jfh8EShARkVjqBr7ro2D621qCEr/dYl0aHbJExA8B5/e6H/e782Y6G73diXgIqEFERGKpBvi8j4Lpampw+nl97+RIZA8Bm6t+VvsOdrQZ4CPfAjoQEZFYSgDv81AuwQt1m6tp15frgpHBRCIRqUPApbWsl3G/qb4en+N+s4iISGy9yUfB1FZW2Jmfv71f1IeAKxvLdszHuN+It3G/p4GDiIhIbF0AbvhYuXvy51v3iv4Q4GO738rkWLDACHCdG8DdiIhIbKWBp3xs3bszNfNCpVkcdwI2lu1UxtO4X7m3cb83ICIisdUPfM9xsQS/xg8kJ3MFWfSHgDPL7sv/jvkZq6+uMsBH7gMSiIhILFUAn/P8yl/RHwLO+Rj3SyWtraHeAB/5DFCJiIjE1l/7KJjp/u5cORb9IcDXuN9Ae6sBPvJNoB0REYmtyz4KpqelKffQT9EfArqaG+1IKum8/Cd6uw3wkceBcUREJLaSwFXXBdNYU7297z5XwLE4BLQ11AVP87oq/9SuQV//32vAfkREJLbqgUd8jPudzi7kileHgBeRvX7H/bYQEZHYSgD/4LpgShKJYG//zbKNbKJ+CNg3OxkcogAfeR0iIhJrf+SjYJbHd0W2+AvhEOB53O9diIhIrO0HninGG/+FfAjYHvdrra8zwEc+BVQgIiKx1QU8Vsw3/gv1ENDf5m3c72tAMyIiElvlwANxuPFfaIeAse5OA3zkB8AoIiISa/c6Lpfgbfq7llORLfdCOAQsDA8Y4CNPARlERCTWXuJ6w18C7ODcVGRLvRAOAcvjI1ZS4mVz4XXgDCIiEmudPpb8pIb7I1vmhXAI2JiZtIoyb+N+f4CIiMRaAvio64Lpa222rY1olnghHAL2J6estrLSAB/5G0REJPZe5bpg6qorbXM1HdkCL4RDgJ9X/oJ8HChDRERiLQVcc11cRxeTkS3uQjoEeMhXgEZERCTWaoBHimm3vw4Bz5vHgAFERCT23um6ZEa7OyJb1DE/BFzVuJ+IiACcdl0yzXU1dnk9E9mSjvEh4DpwChERib1e4HGHBROMqt2VLfzHfor0EPAKREQk9kqAT7oumX2z45Et5ZgfAt6KiIgI8GrXJTM70BvZMg4r6dGhKBwC/hEoRUREYm8JuOb4wZqC3PDnO3ct77bkYF+Yh4DPA7WIiEjsNQLfclkyZaWldiqzENkSDjPH0wvBU74hHQIeBfoQEREB3uu6aFamRiNbwGHm0nomt8gnjEPAE8A8IiIiwO+5LprB9pbIFnDYObO8GBR/CIeAZ4HjiIiIAHPAUy6Lprayoujf+X+xubKRtaOL80Hph3AIeDkiIiJAHfBvrvf7H16YjmwBR+DyX67w830IeDMiIiIQeL/ropkb6ots+Yadi2uZXNHn+xDwIaAEERER4Hdcl397Q71G/n5Nrqxn7Vju0//ODgF67EdERJybBZ5yPfJ3OquRv1+VrY1lO7EUlP8tZaSrwwAX+SIiIhJ7wd/9NfKXn1xez+bK/5Zz58001ta4WvZTjYiIxNp9rst/uLMtsgUcZjZXM3YsHZT/i056ZNgAF0khIiKx9Vuuy7++usouri1FtoTD+eT/fLf9b/0rQHlZqQG3m/OIiEgszQJXXZZ/aUmJHUsnI1vEYd30P5775O8oHY0NBtxufhcREYmdWuBrgLlMZmwoskWc5wTTD2dyv/odp7+txYDbzR8jIiKx83euy39AT/1aLhdWluzYYlDWXjLQ1mrA7ea1iIhIrNztuvzrqir11O/PPvefXAq2+nlNa32dAbebP0RERGJjGnjSZfmXlCRultJsZEs5P6N9GTudCT73e8/hhdngjQXgdvNSREQkFmqALwPmMunRwcgWc17+zr9nMbfMx0O8vgi4hoiIxMLfui7/vtbmyJazz2zty9q5Pel8Fn+QQ3MzVlleboCLdCMiIkVvCzDXK34vrMTr7/7bv/jP703v4DEfL5/+Hf3tP8h/ICIiRW8C+InTFb+JhB1JzUS2qH085HNub/5/8eeyMTNpTbkngN3k3YiISFGrBr4EmMukdg1Etqxdf+o/u/2LP6TivzOVtPGeruCBJcBlLiMiIkXtna7Lv6elybY2olnY7n7xh1r8QfZMjAbPKgOu8xOgFhERKVrO5/2rKyvs/N7FyBa3gx39wet9R3eHV/x3zM/YQHurJcCAXPT5X0REdmTO9Tv/CbBD81ORLe/byeW1rN2V3W0vCV7vCy+LI0NWVVFugM/sRkREilIT8A3XxTE/1BfZAr+Nl/tyD/iEmtWpcWtrqDfAd+5HRESKUgL4sOvi6GpqsK2NbGSL/JaysWybK0t2IpMKvfgPJKe3F/sEUxWA7zwNJBERkaL0WselEXySPrdndzTL/FZn+FfSdjy9EHrxH0klbaqvJ/ekb77yFkREpCgdAJ51Pe9/eGE6sqW+wxl+B4/3uMvC8IBVV1QYkM98TTf/RUSKUy/wfdfFsbuA5/3//0b/Tt/p95+l0eGdPObja+xvGhERKTrlwIOui6O/rTDf+b+0fbEvm7Kju+fiXvwGPAucRUREitK9zt/5r6osuHf+L64u2ancxb4IZHl8xFpyb/eHkxvAyxARkaK06bg0gmdnj6WTkS36XzXKdzJCxZ8O9xd/Lk8Dv4mIiBSlKcdLfoLsmdgV2bL/pVG+1SU7sRT+jf7cm/3zQwPWWFNtQNh5HNiHiIgUpSbg667LY6SrPZqF/7Ns3cyFvZEY5cvt5w+W9VTldvSHn08AQ4iISFEqAe53XBzBZ+tLa5loFv9G1s4FxR+NG/3rMxM22NGW29IXhfwQuAdIICIiRevPXBdIeVmpncosRPYXf1Rm+NOjw7kne6OU9wDtiIhIUTsD3HBdIusz45H7G/+F1WgU/+GFWZsd6LO6qqqoFf+jwGlERKTozQFPui6S6f7uCJV/dC73bcxM2q7O9uDrCBClXAfeAdQjIiJFrxX4tusyaW+stysbWRX/LyQztss6GhssAUb08lkgjYiIxEIp8AkfS37O7tkdjTn+kIv/yELS5ob6rb66yohm8X8XeKku+YmIxMvbAHO95OfQ/FS4T/auh7+L/+DctO3q6rDy0tKoFv+TwJ8A1YiISKz8ho9iWRjuD29Jz8b2kp7wi3+0u9PKolv8N4APAAOIiEjsLAE/dV0uPS2NtrURTvmf27NoR3eHd7N/f3IqN78f1eI34AH9nV9EJL46ge8CVgwrfjdXl0J9xGffbEEU/5eA8/o7v4hIfFUBnwWs0A8Al9czwQNDYY7y9be1WEkiEdXSN+Bh4ISKX0Qk3hLA+wAr5APA9p8Yzm5/7l+cD+kX/6T1tjZbItrF/6/AKRW/iIgAvAmwQj4AbK5mQnvB79D8TPB4T0lJpIv/y/rULyIiv+huwAr1AHBlYzm0sb4jqaRN9nVbeVlkb/Ub8Gn94hcRkedaA/63UA8AwcKekD73L44MWU1lRVRL/2ngA8AyIiIizzEC/ACwQjsAXF7LhvaK356JUWuuq41q8f8IuBfoR0RE5FdoBf4dsEI7AJzfm7aji+Hs4u9qboxq8X8DeCVQi4iIyK9RCTwAWCEdAK6sZ+1kJpX34r9jfsaGOtqierP/08Ax/X1fREReSAJ4D2CFdAA4F/zqnw/j7/zB8qIIruW9H9iLiIjIDr0RsEI5AGy/338qkwpjnj9YWQxEKdeAdwPTiIiI3IKLwI1COQBsri7lfa7/zlTSpvp6ovZ07xPAvUAfIiIit2gfcA2wqB8AtvYFr/nl/Vd/dnzE6qoitZf/MeA1QCMiIiIvwizwQ8CifgDYHu87sbSQ71f8goU9iegU/7eAV2oXv4iI3I4h4L8Bi/oBYHNlKe/jfXOD/VF6xe8h4CxQgoiIyG1oBR4BLOoHgDN5/uR/cG7aOpsaolL8X9Ab/SIi4koN8CBgUT4AXNnI/2x/emTYKssjMdr3IHACERERR8qAjwIW5QPAxbWMHVvM79/6e1uaDQg7nwIOICIi4lBJ7qGfKB8ALqyk7SV5LP/M2K4oPOjzWWAfIiIiHrw1iuUPBAeAfP+9//DCbLCnP+Qb/l/V3/hFRMSnP/VUYE7W3qZ29Qev+uVza19tZWXY43xbutUvIiI+vdpXkc0N9tpYT4cBt5Wpvu78vOZ3M2PdnWEu73kMeDlQjoiIiEf3+Hrid6SrPfhs7+IAMNHbnZfxvraGurCK/yrweqAGERERz64A130UWk9L0/aYXsEcAJbHR6wqnPG+G8B9QD8i8n/t3WtsnuddgPHL5zi248RxncSxHcexc/D57Jwcp7QhUZKmIeeTpqFOnRAwvq0ggVQhgUYlKhASgwkqAWNIgOADElonIYo2DpqgfNgmpIlRUDsqytqFQ0eSpXnI+5RJ1aumrPF9P4fX10+6JX/1++X6P6f7lpSBC8B3Y0Stq6Mtubq8UIl/KQaAygE+9fnc8v8ycAhJkjJyDrgTI2rt61qSCwfnKuEv/ABwbGos2bqpM4/wvwY87Qt+kqQsnY0V/5amxuTM4lQl+oUfAA7tHUm/TsjhTP6f9Tm/JClrJ4BbEcKWnoF/fGasEvzCDwCTg/15nNn/RWAMSZIydjJS/NNP5lbGdldiX+gB4Pj0RB7b+b4JfMyNfCRJeTgL3I4VucWRwUroCz0A/MDEaLKxbX3W8f8s0IMkSTm4BNyJFbmpwb5K5As9ABzetztpbW7Oehe/40iSlJOPAHdjhW5soLcS+EIPAHO7BpPGhvosv+n/ZaAVSZJy8rFYm/yQBnlrJe6FHgD29fVmuaXv68BJJEnK0SeAe7FiN7ytpxL2wg4AJ2Ymkv7urgTIav0usBFJknL0TMzY7XikK7mxslTYAeDxqbFkc0dm+/l/G7iBJEk5agA+HTN4/d1V8S/YALAytjdpW5fZEb5fAPqQJClHLcAfxAze9srhPkfS+BdxAEjP729qbMhqN78f97t+SVLe2oEXY0avp7Mjubq8mMb8YdZgT3fUAWBxZCirN/1fBQ4gSVLOtgF/FzN6j6TxX3jo+J/bP5s+Oog1AMwM7cjqJL/PA91IkpSzceCfY1/5Xzn88PE/f2AujXScASDd0z+Lz/zuAZ8CGpAkKWfHgJsxw7dl44ZVXflfOjSfRjrWADDa15sAsde3gBNIklQATwF3or7wt3ljcu3Iwz/zv3x4MY10pAEg/RuIvf4W2IkkSTmrB54Dksjf+T/k2/7pSl8WPDk3GWUAODE7mQx0b84i/i8ALUiSlLM24I8iRy99W//GysPH/9ryUlX8ww0AI71bk22bNmbxvP9ZJEkqgAHg72PHf2Rbz/3473/Y+KeDw6n5qTT4MQaAhvron/n9D3AJSZIK4FHg9djx3927ZTXxT9eTizNp7D9gACjy+hawjCRJOasDnqk6yjf2kb6r+da/EvqyDgBfB0aQJClnI8CXsojf9M7+Vcf/4ruf+5V1APgzT/GTJOWtHvgE8Hbk6KWb5xzYM7Tq+F9J3/ifKusA8JtAE5Ik5WgG+KsMopfumf/oxJ5Vx//akaXk1LvxL+MA8CkP85Ek5ekR4FeBu1mEb11zU3JybjwN+GrXEwvTlbiXbQC4B3wSSZJy0gY8A9zMKn7trS3Jk4vTQeJ/dil9479sA8Bd4GkkScrBJuCngTeyjF/3hvbk4qG5IPG/eDB96a9sA8B3gctIkpSxXcAvAv+Zdfz6Nm/63ln+AZ77p9v8lm0AuAOcR5KkjDQD54AXgXfyiN9Ib0/V1r6r2+nvifnKc/9SDQC3gbNIkhRZPfAo8BngTSDJa01VfeMf6Ll/mQaAW8ATSJIUSR2wH/gl4F/ziH31nvmH9w0Hjf+Fg3OVkJdpALgDnEGSpAg6gJ8EXgGSIqzW5qb7wR0PGv/0eN/ZyTINAHeBi0iSFFgn8DMBbvEHXZs72pPzB2ZDxj89IOh05bl/eQaAd4CPIElSQPXAjwLfBpIirb19W5PrR5aqAx7qkJ+yDAD3gI8jSVJAo8BfFi38zY2NydHx3WmsQ68rhxcq8S7TAOAOf5KkYOqAnwJuFy3+2zZ1Juf2z0SJ//WVdJ//Mg0AzyNJUiDtwB8WLPzpYT6zQwPJjZU01lHWk4vpJ39lGQA+B9QjSVIAu4CvFC3+27s2Vl31h18X3t3qtywDwItAM5IkBTAN/HuRwt++riU5Or4nYvirt/oNt46M7UkaGxpi/C4vA+1IkhTAPPBmkW73Tw72pWFOIx1zrexPzixMB43/8emJZMP61hi/zWvAdiRJCmCuKPGvr6+r7OOf7sAXOfzVp/wFXQPdm2P8Pm8DC0iSFMBe4K0ihH94W0/1c/4Mbv0vBb/1P71zINYuf6eRJCmAbuAf8wx/U2NDMtbf+xA7+YV66386wnP/+hi/1U8gSVIA64Av5RT+9Pn43K4d6aY7aYxzWJcOzQd/7t/Rui7G7/UCkiQF8pk8TuvbuaU7+cHp0RyCX73hz/7kZLgNf9I12NMd43f7G6AFSZICOJdV9Ovq6pKezo5kYXgwveIOEO9At/5ng8Z/YXgoxu/3OtCHJEkB9ANvRo5+ul3vgT1DyeXDafQLtS4fWgga/8cmR5OWpqbQv+Nt4CCSJAVQB/x5xFv86el8AV7oi7ZuHF1KTs2HvfW/pXND8N/S0/0kSSF9NFb8+7u7Ch3+qmN+g63xgb4Yv+fvIElSIJuAN8Lv2NeQLI8OFzb4713XlpeSk2E/+UvvegAh11eBNiRJCuTToeO/vqU5OTU3UdjgV62g2/2euL82tbeFjv9/AaNIkhTIOPBOyFh1rm+tbNdb2NjH/uZ/7/ZtCRB6XUWSpID+eC3HP/SLf8uje9Kti4GQ69eQJCmgeeBeqFC1NDUmZ5emCxv793/xby7crf+ZiaSzbX3o+H8NWI8kSQF9IdiBPXV1yfGZscKG/gHn/Ae99b+7d2vo+N8CppAkKaCZkLGaHRoobOgfvOPfTMBb/7srQ5CH/EiSCu+3AkUq3dnvxkoxI/+gdfnwQti3/sPf+v9ToA5JkgLaBtwKtcPfDy3NFDb0D1qn58N99jfWvz10/P8N6EGSpMCeDRWrmaH+wkb+QevCwXCf/T06sS/d8AgIuc4hSVJgdcA3QoSqtbmp8iJdYUP/fuvGylJyKuBRv1s2Bt/r/7eRJCmCo6FitTgyWNjQP2idPxDus7/ZoR2h4/9NoAtJkiJ4IUSs2ta1lO7q//qRpeTkXJj4H5saC33M7z3gBJIkRdAM/EeIYO3fM1TY0D9onQ142t9gT3foq/9fR5KkSI6FevZ/fWWpsKF/v3V1OdymP4f37U7qwn7z/yqwAUmSIvmVEMEaG+gtbOiz2PSnq6M99NX/WSRJiuifQgTrzOJUYUMf++p/crA/dPx/H0mSIhoOEayezo7Chv4Drv6L+uLfTWA7kiRF9MMhonWgZC//XVleLPKLf08hSVLRP/+rg+TiofKc9V9ZZxbCbPl7ZHRP6Bf/XnKvf0lSFr6+2mht7mgrbOhjH/jT0xl0x787wCiSJEXWDtxbbbgmdmwvbOxjXv0vjgwlQMj1C0iSlIGlEOE6PjNW2NjHuvo/MTORdLSuC/3NfzuSJGXgqQDH/pZq859QV//jA32hr/7PI0lSRp5bbbi6SvT8/9KhhUCf/Y0nLU2NIeP/eSRJytDnVhuvoa2PFDb41ev0fJir/+FtW0LG/zYwgiRJGfriagM2t2tHYYP/3nXh4HyQ+D82OZo0NtSHHACeQ5KkjH1jtQGbHy7+AHBjZX9yan4qyACw45HNIeP/BtCJJEkZe2OVAUs3wVkeHS5s/CvrXKDjfo+O703qw27683EkScrBfwNJLQ8BVwJu+tPbtTFk/L8GNCJJUg7uBopZemW8Mra7WLf+jy6lt/6DnfUPCeHWMSRJyslbQFKrQ8DZxdmibvn7J0iSlKOXgaQWh4ALB+eCxf/g3pGQv9FdYAxJknL0c9WBqoV3Aq4sLyQnZyeLevX/G0iSlLNdwB0gqZU7AVeXF+/Hf6qoV//fAfqRJKkAngeSWhgCrh/5v5f+inv176Y/kqTCaAJeKvsQcO1+/E+/G/+iXv2/BWxCkqQC2QD8dVmHgPfEv8hX/59EkqQPxSEg8/jv370r5P//TaAVSZIKqmoIiPF1wEjh419ZXR3tIf/3H0OSpIIrxZ2AmPGf3jkQ8n9+FViHJEklUOg7AdeOLCanIsX/8cmxpKWpMeT/+yNIklQiWdwJCHXlX9QDf/4FaEaSpJLJ8E5A/vEfH9ge+n98GkmSSiqnOwHxb/tXf/NfXx/0rP9XgCYkSSqxHIeA+Ff+K2N7k5amptD/10eRJKkG5DAExI//Y5OjSVtLS+j/5ytAA5Ik1Yjs3gmIf9s/jX9H67oY/8spJEmqMZncCUiv/MsZ/79AkqQaFf1OwOzQjjLG/zYwjiRJNSz2EFDZka9M8U+AZ5EkaQ0o1RAQOf7/ALQgSdIaUYrHAZHjfxtYQJKkNabQdwIeEH9P+5MkqVaHgAzi/3tIkrTGZfs4IP/4fxVoR5IkZXQnIP/4vwbsQJIkZXonIM/43wSmkCRJuQwBecT/beAgkiQp1yEgy/h/B3gcSZJUiCHA+EuS9KHUyBCwvqXZ+EuS9KHUwBBg/CVJKq6yDQHGX5KkNTYEGH9JktbYEGD8JUlaY0OA8ZckaY0NAcZfkiTW1hBg/CVJ4nvWxhBg/CVJolptDwHGX5KkB6rNIeAWcApJkvQBamsIMP6SJH3famMIMP6SJBVUOgQYf0mS1p50CDD+kiStPekQYPwlSVp70iHA+EuStPakQ4DxlyRp7dkAvPQh4n/TTX4kSaoNTcDzwJ3/J/5fBvYhSZJqyjDw88DLwFvALeAV4LPAGaAOSZJUjf8Fo6HAhMXYfJkAAAAASUVORK5CYII=";function signature({particleCap:ee,ornament:te}){return Object.freeze({particleCap:ee,ornament:Object.freeze(te)})}const FRAME_SIGNATURE_CONFIG=Object.freeze({runes:signature({particleCap:3,ornament:{top:"-12%",left:"-12%",width:"124%",height:"124%"}}),bolt:signature({particleCap:4,ornament:{top:"10%",left:"20%",width:"106%",height:"106%"}}),heart:signature({particleCap:5,ornament:{top:"10%",left:"86%",width:"27%",height:"27%"}}),bars:signature({particleCap:3,ornament:{top:"9%",left:"87%",width:"28%",height:"34%"}}),blade:signature({particleCap:4,ornament:{top:"10%",left:"20%",width:"106%",height:"106%"}}),claw:signature({particleCap:4,ornament:{top:"86%",left:"83%",width:"31%",height:"31%"}}),crest:signature({particleCap:3,ornament:{top:"85%",left:"84%",width:"31%",height:"31%"}}),orb:signature({particleCap:3,ornament:{top:"-6%",left:"-6%",width:"112%",height:"112%"}})});function frameSignatureConfig(ee){return FRAME_SIGNATURE_CONFIG[ee]||null}const RUNE_GLYPHS=Object.freeze(["M0 -3v6","M0 -3v6M-2.2 -1h4.4","M-2 -3 0 3 2 -3","M0 -3v6M2.2 -2.4 0 0","M-2.2 -3h4.4M0 -3v6","M-2 3 0 -3 2 3M-1.4 .8h2.8"]),SIGNATURE_RUNE_MARKS=Object.freeze(Array.from({length:14},(ee,te)=>{const ne=te<7?0:1,ae=te-ne*7;return Object.freeze({d:RUNE_GLYPHS[te%RUNE_GLYPHS.length],transform:`translate(50 50) rotate(${(ne?63:243)+ae*9}) translate(0 -47)`})})),_hoisted_1$2t=["d","transform"],_hoisted_2$2a=["href"],_sfc_main$2G={__name:"SignatureFrameOrnament",props:{variant:{type:String,required:!0},motion:{type:Boolean,default:!1},clearance:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>frameSignatureConfig(te.variant)),ae=e$b.computed(()=>{var ie;const oe=(ie=ne.value)==null?void 0:ie.ornament;return oe?{"--sm-signature-top":oe.top,"--sm-signature-left":oe.left,"--sm-signature-width":oe.width,"--sm-signature-height":oe.height}:{}}),re=e$b.computed(()=>["sm-frame-ornament","sm-frame-signature",["bolt","heart","bars","claw","crest"].includes(te.variant)?"sm-frame-ornament--badge":`sm-frame-ornament--${te.variant}`,`sm-frame-signature--${te.variant}`,te.clearance?"sm-frame-ornament--clearance":"sm-frame-ornament--art",te.motion?"sm-frame-signature--motion":""]);return(oe,ie)=>ee.variant==="runes"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:0,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 100 100",fill:"none"},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(SIGNATURE_RUNE_MARKS),(le,ce)=>(e$b.openBlock(),e$b.createElementBlock("path",{key:ce,d:le.d,transform:le.transform},null,8,_hoisted_1$2t))),128))],6)):ee.variant==="blade"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:1,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 120 120",fill:"none"},[...ie[0]||(ie[0]=[e$b.createStaticVNode('<line class="sm-blade-halo" x1="60" y1="89" x2="101" y2="42" data-v-f94f9f66></line><line class="sm-blade-color" x1="60" y1="89" x2="101" y2="42" data-v-f94f9f66></line><line class="sm-blade-core" x1="60" y1="89" x2="101" y2="42" data-v-f94f9f66></line><g class="sm-blade-hilt" transform="rotate(-49 57 93)" data-v-f94f9f66><rect x="47" y="89" width="19" height="7" rx="2" data-v-f94f9f66></rect><path d="M49 89v7m5-7v7m7-7v7" data-v-f94f9f66></path><rect x="64" y="87" width="4" height="11" rx="1" data-v-f94f9f66></rect></g>',4)])],6)):ee.variant==="bolt"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:2,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 120 120",fill:"none"},[ee.clearance?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("image",{key:0,class:"sm-harry-wand",href:e$b.unref(harrysWandUrl),x:"58",y:"40",width:"50",height:"50",preserveAspectRatio:"xMidYMid meet"},null,8,_hoisted_2$2a)),ie[1]||(ie[1]=e$b.createElementVNode("path",{class:"sm-arcane-bolt",d:"M13.9 1.6 5.2 13.9h4.9L8.9 22.4 18.8 9.3h-5.2l.3-7.7Z",transform:"translate(-24 2) scale(1.08)",fill:"currentColor",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"1.1","stroke-linejoin":"round"},null,-1))],6)):ee.variant==="heart"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:3,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 32 32"},[...ie[2]||(ie[2]=[e$b.createElementVNode("path",{class:"sm-career-case",d:"M5.1 11.2h21.8c1.5 0 2.7 1.2 2.7 2.7v11.2c0 1.5-1.2 2.7-2.7 2.7H5.1c-1.5 0-2.7-1.2-2.7-2.7V13.9c0-1.5 1.2-2.7 2.7-2.7Z",fill:"var(--sm-frame-ornament-secondary)",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{d:"M11.1 11.2V8.8c0-1.6 1.3-2.9 2.9-2.9h4c1.6 0 2.9 1.3 2.9 2.9v2.4",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-career-monogram",d:"M12.4 15.1v8.7m0-8.7H16c3.1 0 3.1 3.9 0 3.9h-3.6m3.7 0c3.7 0 3.7 4.8 0 4.8h-3.7",fill:"none",stroke:"var(--sm-frame-ornament-accent)","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-career-sparkle",d:"m25.8 3.1.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8.8-2.2Z",fill:"var(--sm-frame-ornament-accent)"},null,-1)])],6)):ee.variant==="bars"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:4,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 24 24"},[...ie[3]||(ie[3]=[e$b.createElementVNode("path",{d:"M3.2 2.2 10.7 7v14.8l-7.5-4.7V2.2Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"m20.8 2.2-7.5 4.7v14.9l7.5-4.7V2.2Z",fill:"var(--sm-frame-ornament-secondary)"},null,-1)])],6)):ee.variant==="claw"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:5,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 512 512"},[...ie[4]||(ie[4]=[e$b.createElementVNode("path",{d:"M511.517 370.284c-5.971-20.294-92.954-22.906-113.159-18.866-20.216 4.041-76.79 2.68-88.913-9.443-12.124-12.124 4.041-32.329 16.175-44.451 12.124-12.124 38.389-50.524 46.472-58.606 8.082-8.082 50.166-50.378 65.325-74.758 30.988-49.843 41.437-98.68 25.262-114.845-16.164-16.164-65.003-5.727-114.834 25.262-24.38 15.17-66.688 57.244-74.769 65.325-8.083 8.083-46.472 34.36-58.606 46.483-12.122 12.124-32.328 28.287-44.451 16.164-12.122-12.124-13.474-68.698-9.433-88.902 4.041-20.205 1.419-107.187-18.866-113.16C121.438-5.483 83.798 44.94 68.984 87.37 60.299 112.241-13.868 228.816 2.296 313.689c16.175 84.872 31 127.982 49.507 146.503 18.519 18.519 61.642 33.343 146.503 49.507 84.872 16.164 201.448-57.991 226.319-66.676 42.431-14.825 92.853-52.466 86.892-72.739Z",fill:"currentColor"},null,-1)])],6)):ee.variant==="crest"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:6,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 190.764 222.769"},[...ie[5]||(ie[5]=[e$b.createElementVNode("path",{d:"M91.256 43.595c-42.332 2.172-75.995 37.577-75.995 80.931 0 14.627 3.832 28.349 10.535 40.195l-8.118 15.765C6.548 164.704 0 145.388 0 124.526 0 71.248 42.704 28.053 95.382 28.053c.753 0 1.504.009 2.252.026L111.412 0h29.434v39.696c29.733 16.337 49.918 48.2 49.918 84.829 0 53.279-42.704 96.473-95.382 96.473-16.079 0-31.229-4.024-44.519-11.132l6.712-13.875c11.262 6.107 24.134 9.571 37.807 9.571 44.249 0 80.121-36.282 80.121-81.037 0-27.971-14.013-52.633-35.325-67.197v76.695l-26.897-25.442V50.453l-33.218 78.891h33.218V116.68l31.141 29.274-32.179 24.705V157.58H68.437l-28.855 65.189-35.708-.699L91.256 43.595Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"m112.21 179.637 27.915-23.914v23.914Z",fill:"currentColor"},null,-1)])],6)):ee.variant==="orb"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:7,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 100 100"},[...ie[6]||(ie[6]=[e$b.createStaticVNode('<path class="sm-orb-bolt" d="m82 0-12 18h7l-4 13 14-20h-7l2-11Z" fill="currentColor" stroke="var(--sm-frame-ornament-secondary)" stroke-width="1.1" stroke-linejoin="round" data-v-f94f9f66></path><g class="sm-orb-mark" data-v-f94f9f66><path d="M72 84a12 12 0 0 1 24 0H72Z" fill="var(--sm-frame-ornament-secondary)" data-v-f94f9f66></path><path d="M96 84a12 12 0 0 1-24 0h24Z" fill="var(--sm-frame-ornament-accent)" data-v-f94f9f66></path><circle cx="84" cy="84" r="12" fill="none" stroke="#30343b" stroke-width="2.4" data-v-f94f9f66></circle><path d="M72 84h24" stroke="#30343b" stroke-width="2.4" data-v-f94f9f66></path><circle cx="84" cy="84" r="4.2" fill="#f8fafc" stroke="#30343b" stroke-width="2" data-v-f94f9f66></circle><circle cx="84" cy="84" r="1.7" fill="#30343b" data-v-f94f9f66></circle><circle cx="83.5" cy="83.5" r=".55" fill="#ffffff" opacity=".9" data-v-f94f9f66></circle></g>',2)])],6)):e$b.createCommentVNode("",!0)}},SignatureFrameOrnament=_export_sfc$1(_sfc_main$2G,[["__scopeId","data-v-f94f9f66"]]),states=new WeakMap;let observer=null;function ensureObserver(){return observer||typeof IntersectionObserver>"u"||(observer=new IntersectionObserver(ee=>{for(const te of ee){const ne=states.get(te.target);ne&&(ne.value=!te.isIntersecting)}},{rootMargin:"150px"})),observer}function useOffscreenPause(ee=!0){const te=e$b.shallowRef(null),ne=e$b.ref(!1),ae=e$b.computed(()=>!!(typeof ee=="function"?ee():e$b.unref(ee))),re=()=>{var le;return((le=te.value)==null?void 0:le.$el)||te.value};function oe(){const le=re();if(!(le!=null&&le.nodeType))return;const ce=ensureObserver();ce&&(states.set(le,ne),ce.observe(le))}function ie(){const le=re();!(le!=null&&le.nodeType)||!observer||(observer.unobserve(le),states.delete(le),ne.value=!1)}return e$b.onMounted(()=>{ae.value&&oe(),e$b.watch(ae,le=>le?oe():ie())}),e$b.onBeforeUnmount(ie),{offscreenRef:te,paused:ne}}const _hoisted_1$2s={key:0,class:"sm-frame-effect sm-frame-effect--lightning",viewBox:"0 0 100 100",fill:"none"},_hoisted_2$29={key:1,class:"sm-frame-effect sm-frame-effect--flame"},_hoisted_3$1X={class:"sm-frame-flower sm-frame-flower--large",transform:"translate(23 101)"},_hoisted_4$1L=["transform"],_hoisted_5$1B={class:"sm-frame-flower sm-frame-flower--medium",transform:"translate(112 32)"},_hoisted_6$1s=["transform"],_hoisted_7$1k={class:"sm-frame-flower sm-frame-flower--small",transform:"translate(123 65)"},_hoisted_8$1c=["transform"],_hoisted_9$16={key:0,class:"sm-frame-snowflake",viewBox:"0 0 16 16",fill:"none"},_hoisted_10$$={key:1,class:"sm-frame-star",viewBox:"0 0 16 16"},_hoisted_11$U={key:2,class:"sm-frame-spark",viewBox:"0 0 16 16"},_hoisted_12$P={key:3,class:"sm-frame-heart",viewBox:"0 0 16 16"},_hoisted_13$I={key:4,class:"sm-frame-petal",viewBox:"0 0 16 16"},_hoisted_14$G={key:5,class:"sm-frame-paw",viewBox:"0 0 18 18"},_hoisted_15$B=["src"],_sfc_main$2F={__name:"FrameEffects",props:{visual:{type:Object,required:!0},visualNormalized:{type:Boolean,default:!1},effectLevel:{type:String,default:"full",validator:ee=>["full","compact","border"].includes(ee)},pauseOffscreen:{type:Boolean,default:!0}},setup(ee){const te=ee,ne=e$b.computed(()=>te.visualNormalized?te.visual:normalizeFrameVisual(te.visual)),ae=e$b.computed(()=>ne.value.ornament),re=e$b.computed(()=>ne.value.effect),oe=e$b.computed(()=>ne.value.particles),ie=e$b.computed(()=>te.effectLevel==="border"),le=e$b.computed(()=>ae.value.enabled&&frameVariantLocked("ornament",ae.value.variant)),ce=e$b.computed(()=>le.value?ae.value.variant:""),de=e$b.computed(()=>frameSignatureConfig(ce.value)),ue=e$b.computed(()=>ae.value.enabled&&(!ie.value||le.value)),ve=e$b.computed(()=>ae.value.placement==="behind"?[!1]:[!0,!1]);function me($e,ye){return["sm-frame-ornament",`sm-frame-ornament--${$e}`,ye?"sm-frame-ornament--clearance":"sm-frame-ornament--art",ae.value.placement==="behind"?"sm-frame-ornament--behind":"sm-frame-ornament--front"]}const be=e$b.computed(()=>!ie.value&&re.value.enabled&&re.value.variant!=="none"),fe=e$b.computed(()=>{var Ee;const $e=te.effectLevel==="compact"?4:oe.value.density,ye=((Ee=de.value)==null?void 0:Ee.particleCap)??oe.value.density;return Math.min(oe.value.density,$e,ye)}),pe=e$b.computed(()=>{const $e=ne.value.ring.colors;return{"--sm-frame-primary":$e[0],"--sm-frame-secondary":$e[1],"--sm-frame-accent":$e[2],"--sm-frame-ornament-primary":ae.value.colors[0],"--sm-frame-ornament-secondary":ae.value.colors[1],"--sm-frame-ornament-accent":ae.value.colors[2],"--sm-frame-ornament-opacity":.35+ae.value.intensity*.65,"--sm-frame-ornament-scale":ae.value.scale,"--sm-frame-ornament-offset-y":`${ae.value.offset_y}%`,"--sm-frame-ornament-clearance":"rgb(var(--bg-base-300))","--sm-frame-effect-primary":re.value.colors[0],"--sm-frame-effect-secondary":re.value.colors[1],"--sm-frame-effect-accent":re.value.colors[2],"--sm-frame-effect-spread":re.value.spread,"--sm-frame-effect-inset":`${15*re.value.spread}%`,"--sm-frame-effect-inset-tight":`${7*re.value.spread}%`,"--sm-frame-effect-inset-wide":`${17*re.value.spread}%`,"--sm-frame-particle-primary":oe.value.colors[0],"--sm-frame-particle-secondary":oe.value.colors[1],"--sm-frame-particle-accent":oe.value.colors[2],"--sm-frame-particle-size":`${oe.value.size*5}%`,"--sm-frame-particle-orbit":oe.value.orbit,"--sm-frame-particle-opacity":.4+oe.value.intensity*.6,"--sm-frame-intensity":re.value.intensity,"--sm-frame-effect-opacity":.5+re.value.intensity*.5,"--sm-frame-speed":`${6/ne.value.motion.speed}s`,"--sm-frame-effect-speed":`${4.2/ne.value.motion.speed}s`,"--sm-frame-ornament-speed":`${3.6/ne.value.motion.speed}s`,"--sm-frame-particle-speed":`${3.2/ne.value.motion.speed}s`,"--sm-frame-whale-speed":`${5.4/ne.value.motion.speed}s`,"--sm-frame-fast":`${1.8/ne.value.motion.speed}s`,"--sm-frame-flash":`${2.7/ne.value.motion.speed}s`}}),{offscreenRef:_e,paused:ge}=useOffscreenPause(()=>te.pauseOffscreen),ke=e$b.computed(()=>ne.value.motion.enabled?["sm-frame-effects--motion",ne.value.motion.pulse?"sm-frame-effects--pulse":"",ne.value.motion.flicker?"sm-frame-effects--flicker":"",ge.value?"sm-frame-effects--paused":""]:["sm-frame-effects--static"]);return($e,ye)=>ee.effectLevel!=="border"||le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,ref_key:"offscreenRef",ref:_e,class:e$b.normalizeClass(["sm-frame-effects",[`sm-frame-effects--${ee.effectLevel}`,le.value?"sm-frame-effects--signature":"",ce.value?`sm-frame-effects--signature-${ce.value}`:"",ke.value]]),style:e$b.normalizeStyle(pe.value),"aria-hidden":"true"},[be.value&&re.value.variant==="lightning"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_1$2s,[...ye[0]||(ye[0]=[e$b.createStaticVNode('<circle class="sm-lightning-orbit-halo" cx="50" cy="50" r="39" data-v-6b52c80e></circle><circle class="sm-lightning-orbit-core" cx="50" cy="50" r="39" data-v-6b52c80e></circle><g class="sm-lightning-discharge sm-lightning-discharge--north-west" data-v-6b52c80e><path class="sm-lightning-halo" d="m20 34 7-4-2-5 8-2-1-6 8 2" data-v-6b52c80e></path><path class="sm-lightning-core" d="m20 34 7-4-2-5 8-2-1-6 8 2" data-v-6b52c80e></path><path class="sm-lightning-branch" d="m27 30-5-1m10-6 4-4" data-v-6b52c80e></path></g><g class="sm-lightning-discharge sm-lightning-discharge--east" data-v-6b52c80e><path class="sm-lightning-halo" d="m80 33-3 7 5 2-3 7 6 3-4 7" data-v-6b52c80e></path><path class="sm-lightning-core" d="m80 33-3 7 5 2-3 7 6 3-4 7" data-v-6b52c80e></path><path class="sm-lightning-branch" d="m82 42 5-3m-8 10-5 3" data-v-6b52c80e></path></g><g class="sm-lightning-discharge sm-lightning-discharge--south-west" data-v-6b52c80e><path class="sm-lightning-halo" d="m39 82-7-3-3 5-6-6-5 3-3-7" data-v-6b52c80e></path><path class="sm-lightning-core" d="m39 82-7-3-3 5-6-6-5 3-3-7" data-v-6b52c80e></path><path class="sm-lightning-branch" d="m29 79 1-5m-7 4-4-4" data-v-6b52c80e></path></g>',5)])])):be.value&&re.value.variant==="flame"?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$29,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(8,Ee=>e$b.createElementVNode("i",{key:Ee,style:e$b.normalizeStyle({"--sm-flame-index":Ee-1})},null,4)),64))])):be.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:2,class:e$b.normalizeClass(["sm-frame-effect",`sm-frame-effect--${re.value.variant}`])},null,2)):e$b.createCommentVNode("",!0),(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ve.value,Ee=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:Ee?"clearance":"art"},[ue.value&&ae.value.variant==="wings"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:0,class:e$b.normalizeClass(me("wings",Ee)),viewBox:"0 0 220 132",fill:"none"},[...ye[1]||(ye[1]=[e$b.createStaticVNode('<g class="sm-frame-wing sm-frame-wing--left" data-v-6b52c80e><path class="sm-frame-wing-silhouette" d="M100 57C80 54 69 40 56 20 46 5 28 1 8 5c13 7 22 17 27 30-11-7-22-10-34-10 9 10 17 20 28 27-9-2-18-1-27 2 12 12 25 21 41 25-8 1-16 4-23 9 18 9 38 10 55 3 11-4 20-12 28-24Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--primary" d="M92 59C73 55 61 41 49 22 42 12 31 7 19 7c14 8 23 21 26 36 15 4 31 10 47 16Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--secondary" d="M89 66C65 65 45 55 20 33c9 18 23 30 42 37-13 0-27-4-42-10 15 17 35 25 57 23 5-5 9-11 12-17Z" data-v-6b52c80e></path><path class="sm-frame-wing-detail" d="M92 59C69 54 53 43 40 28M88 68C62 68 42 59 24 45M79 82C57 85 39 80 24 70" data-v-6b52c80e></path></g><g class="sm-frame-wing sm-frame-wing--right" transform="translate(220 0) scale(-1 1)" data-v-6b52c80e><path class="sm-frame-wing-silhouette" d="M100 57C80 54 69 40 56 20 46 5 28 1 8 5c13 7 22 17 27 30-11-7-22-10-34-10 9 10 17 20 28 27-9-2-18-1-27 2 12 12 25 21 41 25-8 1-16 4-23 9 18 9 38 10 55 3 11-4 20-12 28-24Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--primary" d="M92 59C73 55 61 41 49 22 42 12 31 7 19 7c14 8 23 21 26 36 15 4 31 10 47 16Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--secondary" d="M89 66C65 65 45 55 20 33c9 18 23 30 42 37-13 0-27-4-42-10 15 17 35 25 57 23 5-5 9-11 12-17Z" data-v-6b52c80e></path><path class="sm-frame-wing-detail" d="M92 59C69 54 53 43 40 28M88 68C62 68 42 59 24 45M79 82C57 85 39 80 24 70" data-v-6b52c80e></path></g>',2)])],2)):ue.value&&ae.value.variant==="crown"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:1,class:e$b.normalizeClass(me("crown",Ee)),viewBox:"0 0 96 58",fill:"none"},[...ye[2]||(ye[2]=[e$b.createElementVNode("path",{class:"sm-frame-crown-body",d:"m12 42-4-28 22 16L48 7l18 23 22-16-4 28H12Z",fill:"color-mix(in srgb, currentColor 76%, transparent)",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"2.5","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-frame-crown-band",d:"M13 41h70l-3 11H16l-3-11Z",fill:"var(--sm-frame-ornament-secondary)",stroke:"currentColor","stroke-width":"2","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{d:"M21 45h54",stroke:"var(--sm-frame-ornament-accent)","stroke-width":"2","stroke-linecap":"round"},null,-1)])],2)):ue.value&&ae.value.variant==="holly"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:2,class:e$b.normalizeClass(me("holly",Ee)),viewBox:"0 0 120 100",fill:"none"},[...ye[3]||(ye[3]=[e$b.createStaticVNode('<path d="M58 52C45 38 28 30 8 28l13 12-17 2 18 8-13 8 20 1-8 13 18-11c3 15 12 25 24 32-2-17-7-29-15-38 13 0 25-5 35-16-16 3-28 7-36 15Z" fill="var(--sm-frame-ornament-primary)" stroke="var(--sm-frame-ornament-secondary)" stroke-linejoin="round" stroke-width="3" data-v-6b52c80e></path><path d="M53 48c17-12 35-15 57-9l-14 10 17 4-19 6 12 11-20-3 5 15-17-15c-5 14-16 23-30 28 5-16 11-27 22-35-13-3-24-9-33-20Z" fill="var(--sm-frame-ornament-primary)" stroke="var(--sm-frame-ornament-secondary)" stroke-linejoin="round" stroke-width="3" data-v-6b52c80e></path><path d="M38 59C28 47 14 42 2 43l11 9-13 4 16 6-9 10 17-2 3 15 9-18" fill="var(--sm-frame-ornament-secondary)" opacity=".68" data-v-6b52c80e></path><circle cx="51" cy="62" r="10" fill="var(--sm-frame-ornament-accent)" data-v-6b52c80e></circle><circle cx="68" cy="64" r="10" fill="var(--sm-frame-ornament-accent)" data-v-6b52c80e></circle><circle cx="59" cy="78" r="10" fill="var(--sm-frame-ornament-accent)" data-v-6b52c80e></circle><circle cx="48" cy="58" r="2.7" fill="white" opacity=".42" data-v-6b52c80e></circle><circle cx="65" cy="60" r="2.7" fill="white" opacity=".42" data-v-6b52c80e></circle><circle cx="56" cy="74" r="2.7" fill="white" opacity=".42" data-v-6b52c80e></circle>',9)])],2)):ue.value&&ae.value.variant==="bow"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:3,class:e$b.normalizeClass(me("bow",Ee)),viewBox:"0 0 96 68",fill:"none"},[...ye[4]||(ye[4]=[e$b.createStaticVNode('<path d="M43 30C31 9 10 6 7 20 4 34 25 41 43 35Z" fill="currentColor" stroke="var(--sm-frame-ornament-secondary)" stroke-width="3" data-v-6b52c80e></path><path d="M53 30C65 9 86 6 89 20c3 14-18 21-36 15Z" fill="currentColor" stroke="var(--sm-frame-ornament-secondary)" stroke-width="3" data-v-6b52c80e></path><path d="m42 39-16 24 22-10 22 10-16-24Z" fill="var(--sm-frame-ornament-secondary)" stroke="currentColor" stroke-width="3" stroke-linejoin="round" data-v-6b52c80e></path><rect x="38" y="25" width="20" height="20" rx="8" fill="var(--sm-frame-ornament-accent)" stroke="var(--sm-frame-ornament-secondary)" stroke-width="3" data-v-6b52c80e></rect><path d="M16 20c7-4 14-2 20 7M80 20c-7-4-14-2-20 7" stroke="white" stroke-width="3" opacity=".5" data-v-6b52c80e></path>',5)])],2)):ue.value&&ae.value.variant==="flowers"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:4,class:e$b.normalizeClass(me("flowers",Ee)),viewBox:"0 0 140 140",fill:"none"},[e$b.createElementVNode("g",_hoisted_3$1X,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,Se=>e$b.createElementVNode("ellipse",{key:`large-${Se}`,ry:"18",rx:"8","transform-origin":"0 0",transform:`rotate(${(Se-1)*72}) translate(0 -15)`,fill:"currentColor"},null,8,_hoisted_4$1L)),64)),ye[5]||(ye[5]=e$b.createElementVNode("circle",{r:"8",fill:"var(--sm-frame-ornament-accent)"},null,-1))]),e$b.createElementVNode("g",_hoisted_5$1B,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,Se=>e$b.createElementVNode("ellipse",{key:`medium-${Se}`,ry:"15",rx:"7","transform-origin":"0 0",transform:`rotate(${(Se-1)*72}) translate(0 -12)`,fill:"var(--sm-frame-ornament-secondary)"},null,8,_hoisted_6$1s)),64)),ye[6]||(ye[6]=e$b.createElementVNode("circle",{r:"6.5",fill:"var(--sm-frame-ornament-accent)"},null,-1))]),e$b.createElementVNode("g",_hoisted_7$1k,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,Se=>e$b.createElementVNode("ellipse",{key:`small-${Se}`,ry:"10",rx:"5","transform-origin":"0 0",transform:`rotate(${(Se-1)*72}) translate(0 -8)`,fill:"currentColor"},null,8,_hoisted_8$1c)),64)),ye[7]||(ye[7]=e$b.createElementVNode("circle",{r:"4",fill:"var(--sm-frame-ornament-accent)"},null,-1))]),ye[8]||(ye[8]=e$b.createElementVNode("path",{d:"M29 111c11 6 19 12 23 21M106 41c-10 3-18 8-24 16",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"4","stroke-linecap":"round"},null,-1))],2)):ue.value&&ae.value.variant==="cat"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:5,class:e$b.normalizeClass(me("cat",Ee)),viewBox:"0 0 140 128",fill:"none"},[...ye[9]||(ye[9]=[e$b.createElementVNode("path",{class:"sm-cat-ear sm-cat-ear--left",d:"M37 47C34 39 31 27 33 18C44 22 53 30 58 39C50 39 43 42 37 47Z",fill:"currentColor",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-cat-ear sm-cat-ear--right",d:"M103 47C106 39 109 27 107 18C96 22 87 30 82 39C90 39 97 42 103 47Z",fill:"currentColor",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-cat-inner-ear",d:"M38 38C36 33 35 27 36 23C43 26 49 31 52 37C47 36 42 37 38 38ZM102 38C104 33 105 27 104 23C97 26 91 31 88 37C93 36 98 37 102 38Z",fill:"var(--sm-frame-ornament-accent)",opacity:".9"},null,-1),e$b.createElementVNode("path",{class:"sm-cat-whiskers",d:"M29 76C19 72 11 68 2 62M26 89C16 88 8 88 0 89M30 101C20 105 12 109 4 115M111 76c10-4 18-8 27-14M114 89c10-1 18-1 26 0M110 101c10 4 18 8 26 14",stroke:"currentColor","stroke-width":"3.5","stroke-linecap":"round"},null,-1)])],2)):ue.value&&le.value?(e$b.openBlock(),e$b.createBlock(SignatureFrameOrnament,{key:`${Ee?"clearance":"art"}-${ce.value}`,variant:ce.value,motion:ne.value.motion.enabled,clearance:Ee},null,8,["variant","motion","clearance"])):e$b.createCommentVNode("",!0)],64))),128)),!ie.value&&oe.value.enabled&&oe.value.variant!=="none"?(e$b.openBlock(),e$b.createElementBlock("span",{key:3,class:e$b.normalizeClass(["sm-frame-particles",`sm-frame-particles--${oe.value.variant}`])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(fe.value,Ee=>(e$b.openBlock(),e$b.createElementBlock("i",{key:Ee},[oe.value.variant==="snow"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_9$16,[...ye[10]||(ye[10]=[e$b.createElementVNode("line",{x1:"8",y1:"1",x2:"8",y2:"15"},null,-1),e$b.createElementVNode("line",{x1:"2",y1:"4.5",x2:"14",y2:"11.5"},null,-1),e$b.createElementVNode("line",{x1:"2",y1:"11.5",x2:"14",y2:"4.5"},null,-1)])])):oe.value.variant==="stars"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_10$$,[...ye[11]||(ye[11]=[e$b.createElementVNode("polygon",{points:"8,0.8 10.15,5.45 15.25,6.05 11.5,9.5 12.5,14.55 8,11.95 3.5,14.55 4.5,9.5 0.75,6.05 5.85,5.45"},null,-1)])])):oe.value.variant==="sparks"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_11$U,[...ye[12]||(ye[12]=[e$b.createElementVNode("polygon",{points:"8,0 9.55,6.35 16,8 9.55,9.65 8,16 6.45,9.65 0,8 6.45,6.35"},null,-1)])])):oe.value.variant==="hearts"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$P,[...ye[13]||(ye[13]=[e$b.createElementVNode("path",{d:"M8 14.2C6.8 12.6 1.2 9.5 1.2 5.4A3.6 3.6 0 0 1 8 3.7a3.6 3.6 0 0 1 6.8 1.7c0 4.1-5.6 7.2-6.8 8.8Z"},null,-1)])])):oe.value.variant==="petals"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$I,[...ye[14]||(ye[14]=[e$b.createElementVNode("path",{d:"M2 13.5C1.7 7.9 4.5 2.8 13.8 1.4 14.7 9.1 10.6 14.3 2 13.5Z"},null,-1),e$b.createElementVNode("path",{d:"M3 12.5c3.6-2.2 6.3-4.8 9.2-8.4",fill:"none"},null,-1)])])):oe.value.variant==="paws"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_14$G,[...ye[15]||(ye[15]=[e$b.createStaticVNode('<ellipse cx="9" cy="12" rx="5.2" ry="4.2" data-v-6b52c80e></ellipse><circle cx="3.4" cy="7.1" r="2.1" data-v-6b52c80e></circle><circle cx="7.2" cy="3.9" r="2.2" data-v-6b52c80e></circle><circle cx="11.4" cy="3.9" r="2.2" data-v-6b52c80e></circle><circle cx="15" cy="7.3" r="2" data-v-6b52c80e></circle>',5)])])):oe.value.variant==="whales"?(e$b.openBlock(),e$b.createElementBlock("img",{key:6,class:"sm-frame-whale",src:e$b.unref(whaleSvgUrl),alt:"","aria-hidden":"true"},null,8,_hoisted_15$B)):e$b.createCommentVNode("",!0)]))),128))],2)):e$b.createCommentVNode("",!0)],6)):e$b.createCommentVNode("",!0)}},FrameEffects=_export_sfc$1(_sfc_main$2F,[["__scopeId","data-v-6b52c80e"]]),CHANNELS=["whatsapp","instagram","telegram","webchat","sms"],ALIASES={"whatsapp-qrcode":"whatsapp","whatsapp-api-official":"whatsapp","whatsapp-api":"whatsapp",whatsapp:"whatsapp",instagram:"instagram",telegram:"telegram",webchat:"webchat","web-chat":"webchat",widget:"webchat",sms:"sms"},LABELS={whatsapp:"WhatsApp",instagram:"Instagram",telegram:"Telegram",webchat:"Webchat",sms:"SMS"};function normalizeChannel(ee){return ee?ALIASES[String(ee).trim().toLowerCase()]??null:null}function channelLabel(ee){return LABELS[normalizeChannel(ee)]??""}function isOfficialChannel(ee){return String(ee||"").toLowerCase().includes("official")}const _hoisted_1$2r=["aria-label"],_hoisted_2$28={class:"channel-icon-glyph",viewBox:"0 0 16 16",fill:"currentColor"},_hoisted_3$1W={key:0,d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},_hoisted_4$1K={key:1,d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},_hoisted_5$1A={key:2,d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.287 5.906c-.778.324-2.334.994-4.666 2.01-.378.15-.577.298-.595.442-.03.243.275.339.69.47.057.018.116.037.176.057.415.144.973.31 1.262.317.263.006.556-.102.88-.325 2.14-1.443 3.245-2.173 3.315-2.19.05-.011.118-.026.164.015.045.041.041.12.036.141-.03.125-1.204 1.216-1.812 1.78-.19.176-.324.3-.352.33a8.404 8.404 0 0 1-.198.196c-.38.366-.664.64.015 1.088.327.216.589.394.85.572.284.194.568.387.936.629.093.06.183.125.27.187.331.236.63.448.997.414.214-.02.435-.22.547-.82.265-1.417.786-4.486.906-5.751a1.426 1.426 0 0 0-.013-.315.337.337 0 0 0-.114-.217.526.526 0 0 0-.31-.093c-.3.005-.763.166-2.984 1.09z"},_hoisted_6$1r={key:3,d:"M1.6 7.6C1.6 8.96 2.083 10.215 2.897 11.223L1.677 13.457C1.627 13.55 1.6 13.655 1.6 13.762C1.6 14.115 1.885 14.4 2.237 14.4C2.337 14.4 2.433 14.385 2.525 14.348L5.435 13.1C6.22 13.422 7.088 13.6 8 13.6C11.535 13.6 14.4 10.912 14.4 7.6C14.4 4.287 11.535 1.6 8 1.6C4.465 1.6 1.6 4.287 1.6 7.6zM3.95 11.797C4.183 11.37 4.135 10.845 3.83 10.467C3.177 9.66 2.8 8.67 2.8 7.6C2.8 5.02 5.055 2.8 8 2.8C10.945 2.8 13.2 5.02 13.2 7.6C13.2 10.18 10.945 12.4 8 12.4C7.245 12.4 6.533 12.253 5.893 11.99C5.595 11.867 5.26 11.87 4.965 11.997L3.5 12.622L3.95 11.797zM5.2 8.4C5.643 8.4 6 8.043 6 7.6C6 7.158 5.643 6.8 5.2 6.8C4.758 6.8 4.4 7.158 4.4 7.6C4.4 8.043 4.758 8.4 5.2 8.4zM8.8 7.6C8.8 7.158 8.442 6.8 8 6.8C7.558 6.8 7.2 7.158 7.2 7.6C7.2 8.043 7.558 8.4 8 8.4C8.442 8.4 8.8 8.043 8.8 7.6zM10.8 8.4C11.242 8.4 11.6 8.043 11.6 7.6C11.6 7.158 11.242 6.8 10.8 6.8C10.357 6.8 10 7.158 10 7.6C10 8.043 10.357 8.4 10.8 8.4z"},_hoisted_7$1j={key:4,d:"M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H8.9l-2.4 2.2c-.5.45-1.3.1-1.3-.57V11H3a1 1 0 0 1-1-1V3zm2.5 2.25a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7zm0 2.5a.75.75 0 0 0 0 1.5h4a.75.75 0 0 0 0-1.5h-4z"},_hoisted_8$1b={key:0,class:"channel-icon-official",viewBox:"0 0 16 16",fill:"#0081fb","aria-hidden":"true"},_sfc_main$2E={__name:"ChannelIcon",props:{channel:{type:String,default:null},tone:{type:String,default:"mono",validator:ee=>["mono","brand"].includes(ee)},official:{type:Boolean,default:!1}},setup(ee){const te=ee,ne={whatsapp:"#25d366",instagram:"#d6249f",telegram:"#229ed9",webchat:"#ffffff"},ae=e$b.computed(()=>normalizeChannel(te.channel)),re=e$b.computed(()=>channelLabel(te.channel)),oe=e$b.computed(()=>te.tone==="brand"?ne[ae.value]??null:null),ie=e$b.computed(()=>te.official&&ae.value==="whatsapp");return(le,ce)=>ae.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"channel-icon",style:e$b.normalizeStyle(oe.value?{color:oe.value}:null),role:"img","aria-label":re.value},[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_2$28,[ae.value==="whatsapp"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_3$1W)):ae.value==="instagram"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_4$1K)):ae.value==="telegram"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_5$1A)):ae.value==="webchat"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_6$1r)):(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_7$1j))])),ie.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1b,[...ce[0]||(ce[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)])])):e$b.createCommentVNode("",!0)],12,_hoisted_1$2r)):e$b.createCommentVNode("",!0)}},ChannelIcon=_export_sfc$1(_sfc_main$2E,[["__scopeId","data-v-06c1e53c"]]),MAX_ENTRIES=300;try{window.localStorage.removeItem("sm-click:media-size")}catch{}const sizes=new Map;function isDataSource(ee){return typeof ee=="string"&&ee.startsWith("data:")}function mediaKey(ee){return typeof ee!="string"||!ee||ee.startsWith("undefined")||isDataSource(ee)?"":ee.split("?")[0]}function sameMediaSource(ee,te){if(isDataSource(ee)||isDataSource(te))return ee===te;const ne=mediaKey(ee);return!!ne&&ne===mediaKey(te)}function rememberMediaSize(ee,te,ne){const ae=mediaKey(ee);if(!ae||!(te>0)||!(ne>0))return;const re=sizes.get(ae);re&&re.w===te&&re.h===ne||(sizes.delete(ae),sizes.set(ae,{w:te,h:ne}),sizes.size>MAX_ENTRIES&&sizes.delete(sizes.keys().next().value))}function readMediaSize(ee){const te=mediaKey(ee);return te&&sizes.get(te)||null}function positivePair(ee,te){const ne=Number(ee),ae=Number(te);return ne>0&&ae>0?{w:ne,h:ae}:null}function mediaSizeFromContent(ee,te){var ae,re;const ne=ee||{};return positivePair(ne.width,ne.height)||positivePair(ne.media_width,ne.media_height)||positivePair((ae=ne.dimensions)==null?void 0:ae.width,(re=ne.dimensions)==null?void 0:re.height)||readMediaSize(te||ne.url||"")}const preloadedImageSources=new Set;function validImageSource(ee){return typeof ee=="string"&&ee.length>0&&!ee.startsWith("undefined")}function isImageSourcePreloaded(ee){return validImageSource(ee)&&preloadedImageSources.has(ee)}function preloadImageSource(ee){return new Promise(te=>{if(preloadedImageSources.has(ee)){te();return}const ne=new Image,ae=async re=>{var oe;if(ne.onload=null,ne.onerror=null,re){try{await((oe=ne.decode)==null?void 0:oe.call(ne))}catch{}preloadedImageSources.add(ee),rememberMediaSize(ee,ne.naturalWidth,ne.naturalHeight)}te()};ne.onload=()=>void ae(!0),ne.onerror=()=>void ae(!1),ne.src=ee})}async function warmImageSources(ee,te){const ne=[...new Set(ee.filter(validImageSource))];if(ne.length===0)return;const ae=Promise.allSettled(ne.map(preloadImageSource));await new Promise(re=>{const oe=window.setTimeout(re,te);ae.then(()=>{window.clearTimeout(oe),re()})})}function senderHue(ee){const te=String(ee||"").trim().toLowerCase();if(!te)return 210;let ne=5381;for(let ae=0;ae<te.length;ae+=1)ne=(ne<<5)+ne+te.charCodeAt(ae)>>>0;return ne%12*30}function senderColorStyle(ee){return{"--sender-hue":senderHue(ee)}}const LETTER=new RegExp("\\p{L}|\\p{N}","u");function avatarInitials(ee,te=""){const ne=String(ee||te||"").trim();if(!ne||!LETTER.test(ne))return"";const ae=ne.split(/\s+/).filter(oe=>LETTER.test(oe));return ae.length?(ae.length>1?ae[0].charAt(0)+ae[ae.length-1].charAt(0):ae[0].slice(0,2)).toUpperCase():""}function avatarHue(ee){return senderHue(ee)}const RARITIES={common:{key:"common",label:"Comum",order:0,accentRgb:null,glow:0,badge:"bg-slate-400/20 text-slate-100",chip:"bg-slate-400/10 text-slate-300 dark:bg-slate-500/15 dark:text-slate-600",text:"text-slate-300 dark:text-slate-600",bar:"from-slate-400/70 to-slate-300"},rare:{key:"rare",label:"Raro",order:1,accentRgb:"56 189 248",glow:.16,badge:"bg-sky-500/25 text-sky-100",chip:"bg-sky-500/10 text-sky-300 dark:bg-sky-500/15 dark:text-sky-700",text:"text-sky-300 dark:text-sky-700",bar:"from-sky-500/80 to-sky-300"},epic:{key:"epic",label:"Épico",order:2,accentRgb:"167 139 250",glow:.22,badge:"bg-violet-500/25 text-violet-100",chip:"bg-violet-500/10 text-violet-300 dark:bg-violet-500/15 dark:text-violet-700",text:"text-violet-300 dark:text-violet-700",bar:"from-violet-500/80 to-violet-300"},legendary:{key:"legendary",label:"Lendário",order:3,accentRgb:"251 191 36",glow:.28,badge:"bg-amber-400/25 text-amber-100",chip:"bg-amber-400/10 text-amber-300 dark:bg-amber-400/15 dark:text-amber-700",text:"text-amber-300 dark:text-amber-700",bar:"from-amber-500/80 to-amber-300"},secret:{key:"secret",label:"Secreta",order:4,accentRgb:"232 121 249",glow:.26,badge:"bg-fuchsia-500/25 text-fuchsia-100",chip:"bg-fuchsia-500/10 text-fuchsia-300 dark:bg-fuchsia-500/15 dark:text-fuchsia-700",text:"text-fuchsia-300 dark:text-fuchsia-700",bar:"from-fuchsia-500/80 to-fuchsia-300"}},MIN_GRADE_PARAM={key:"min_grade",label:"Nota mínima",unit:"de 10",min:1,max:10,default:9},MAX_MINUTES_PARAM={key:"max_minutes",label:"Tempo máximo",unit:"min",min:1,max:600,default:5},MAX_QUEUE_MINUTES_PARAM={...MAX_MINUTES_PARAM,label:"Espera máxima",default:1},ACHIEVEMENT_METRICS=[{key:"chat_finished",label:"Atendimentos concluídos",unit:"atendimentos",params:[]},{key:"chat_grade",label:"Avaliação (nota)",unit:"avaliações",params:[MIN_GRADE_PARAM]},{key:"chat_attending_time",label:"Tempo de atendimento",unit:"atendimentos",params:[MAX_MINUTES_PARAM]},{key:"chat_waiting_time",label:"Tempo de espera na fila",unit:"atendimentos",params:[MAX_QUEUE_MINUTES_PARAM]},{key:"chat_flow",label:"Atendimento proativo",unit:"atendimentos",params:[]},{key:"level",label:"Nível alcançado",unit:"nível",params:[]},{key:"season_points",label:"Pontos na temporada",unit:"pts",params:[]},{key:"season_rank",label:"Posição na temporada",unit:"posição",params:[]},{key:"season_wins",label:"Temporadas vencidas",unit:"temporadas",params:[]}],ACHIEVEMENT_SCOPES=[{key:"general",label:"Geral (permanente)"},{key:"season",label:"Temporada atual"}];function achievementMetric(ee){return ACHIEVEMENT_METRICS.find(te=>te.key===ee)||null}function metricParams(ee){var te;return((te=achievementMetric(ee))==null?void 0:te.params)||[]}function defaultMetricParams(ee){return Object.fromEntries(metricParams(ee).map(te=>[te.key,te.default]))}function normalizeParams(ee,te={}){const ne=metricParams(ee).map(ae=>[ae.key,Number(te==null?void 0:te[ae.key])]).filter(([,ae])=>Number.isFinite(ae));return Object.fromEntries(ne)}function createAchievementRequirement(ee={}){const te=ACHIEVEMENT_SCOPES.some(ne=>ne.key===ee.scope)?ee.scope:"general";return{metric:ee.metric,target:Number(ee.target),params:normalizeParams(ee.metric,ee.params),scope:te,season_id:te==="season"?ee.season_id??null:null}}function isInvalidPositiveNumber(ee){const te=Number(ee);return ee===""||ee===null||ee===void 0||!Number.isFinite(te)||te<1}function validateAchievementDraft(ee){const te={};return ee&&(String(ee.name||"").trim()||(te.name="Dê um nome para a conquista."),String(ee.description||"").trim()||(te.description="Descreva como desbloquear."),achievementMetric(ee.metric)||(te.metric="Escolha uma métrica."),ee.scope&&!ACHIEVEMENT_SCOPES.some(ne=>ne.key===ee.scope)&&(te.scope="Escolha um escopo."),ee.scope==="season"&&!ee.season_id&&(te.season_id="Selecione a temporada."),isInvalidPositiveNumber(ee.target)&&(te.target="Informe uma meta igual ou maior que 1."),isInvalidPositiveNumber(ee.xp)&&(te.xp="Informe uma recompensa igual ou maior que 1."),metricParams(ee.metric).forEach(ne=>{var re;const ae=Number((re=ee.params)==null?void 0:re[ne.key]);(!Number.isFinite(ae)||ae<ne.min||ae>ne.max)&&(te[ne.key]=`Informe ${ne.label.toLowerCase()} entre ${ne.min} e ${ne.max}.`)}),ee.rarity==="secret"&&!String(ee.hint||"").trim()&&(te.hint="Conquistas secretas precisam de uma dica.")),te}function createCustomAchievement(ee){const te=RARITIES[ee.rarity]?ee.rarity:"common";return{id:`custom-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,name:String(ee.name).trim(),description:String(ee.description).trim(),icon:ee.icon||"🏅",rarity:te,hint:te==="secret"?String(ee.hint).trim():"",requirement:createAchievementRequirement(ee),xp:Number(ee.xp),status:!0}}function createCustomAchievementApiPayload(ee){const{id:te,...ne}=createCustomAchievement(ee);return ne}const REQUIREMENT_SENTENCE={chat_finished:(ee,te)=>`Conclua ${ee} ${te===1?"atendimento":"atendimentos"}`,chat_grade:(ee,te,ne)=>{const ae=`${ee} ${te===1?"avaliação":"avaliações"}`;return ne.min_grade?`Receba ${ae} com nota ${ne.min_grade}${ne.min_grade>=10?"":" ou mais"}`:`Receba ${ae}`},chat_attending_time:(ee,te,ne)=>{const ae=`${ee} ${te===1?"atendimento":"atendimentos"}`;if(!ne.max_minutes)return`Resolva ${ae} rapidamente`;const re=`em menos de ${minutesLabel(ne.max_minutes)}`;return te===1?`Resolva ${ae} ${re}`:`Resolva ${ae}, cada um ${re}`},chat_waiting_time:(ee,te,ne)=>{const ae=`${ee} ${te===1?"atendimento":"atendimentos"}`;if(!ne.max_minutes)return`Capture ${ae} sem deixar na fila`;const re=`com menos de ${minutesLabel(ne.max_minutes)} de fila`;return te===1?`Capture ${ae} ${re}`:`Capture ${ae}, cada um ${re}`},chat_flow:(ee,te)=>te===1?"Inicie 1 atendimento proativo":`Inicie ${ee} atendimentos proativos`,level:ee=>`Alcance o nível ${ee}`,season_points:ee=>`Acumule ${ee} pontos`,season_rank:(ee,te)=>te===1?"Termine uma temporada em 1º lugar":`Termine uma temporada no top ${ee}`,season_wins:(ee,te)=>`Vença ${ee} ${te===1?"temporada":"temporadas"}`};function minutesLabel(ee){return`${formatTarget(ee)} ${Number(ee)===1?"minuto":"minutos"}`}function formatTarget(ee){return Number(ee).toLocaleString("pt-BR")}function describeAchievementRequirement(ee){var de;const te=ee==null?void 0:ee.requirement,ne=achievementMetric(te==null?void 0:te.metric),ae=Number(te==null?void 0:te.target);if(!ne||!Number.isFinite(ae)||ae<1)return null;const re=normalizeParams(ne.key,te.params),oe=te.scope==="season"?"season":"general",ie=ee.progress??((de=ee.unlocked)==null?void 0:de.progress),le=Number(ie),ce=ie!=null&&Number.isFinite(le);return{metric:ne.key,metricLabel:ne.label,unit:ne.unit,target:ae,params:re,scope:oe,scopeLabel:oe==="season"?"Por temporada":"Conta desde sempre",text:REQUIREMENT_SENTENCE[ne.key](formatTarget(ae),ae,re),progress:ce?{current:Math.max(0,Math.min(le,ae)),target:ae,remaining:Math.max(0,ae-le),pct:Math.max(0,Math.min(100,Math.round(le/ae*100)))}:null}}const RAW_BASE_ACHIEVEMENTS=[{id:"primeiro-contato",name:"Primeiro Contato",description:"Conclua 1 atendimento.",icon:"👋",rarity:"common",metric:"chat_finished",target:1,xp:25},{id:"pegando-o-jeito",name:"Pegando o Jeito",description:"Conclua 25 atendimentos.",icon:"🔥",rarity:"common",metric:"chat_finished",target:25,xp:50},{id:"primeira-estrela",name:"Primeira Estrela",description:"Receba 1 avaliação com nota 9 ou mais.",icon:"⭐",rarity:"common",metric:"chat_grade",params:{min_grade:9},target:1,xp:25},{id:"mao-na-massa",name:"Mão na Massa",description:"Inicie 1 atendimento proativo.",icon:"💪",rarity:"common",metric:"chat_flow",target:1,xp:25},{id:"sem-enrolar",name:"Sem Enrolar",description:"Resolva 10 atendimentos, cada um em menos de 5 minutos.",icon:"⚡",rarity:"common",metric:"chat_attending_time",params:{max_minutes:5},target:10,xp:50},{id:"porta-aberta",name:"Porta Aberta",description:"Capture 10 atendimentos, cada um com menos de 1 minuto de fila.",icon:"🚪",rarity:"common",metric:"chat_waiting_time",params:{max_minutes:1},target:10,xp:50},{id:"centuriao",name:"Centurião",description:"Conclua 100 atendimentos.",icon:"💯",rarity:"rare",metric:"chat_finished",target:100,xp:120},{id:"modo-turbo",name:"Modo Turbo",description:"Resolva 50 atendimentos, cada um em menos de 5 minutos.",icon:"🚀",rarity:"rare",metric:"chat_attending_time",params:{max_minutes:5},target:50,xp:120},{id:"ima-de-elogios",name:"Ímã de Elogios",description:"Receba 25 avaliações com nota 9 ou mais.",icon:"🧲",rarity:"rare",metric:"chat_grade",params:{min_grade:9},target:25,xp:130},{id:"ninja-da-fila",name:"Ninja da Fila",description:"Capture 50 atendimentos, cada um com menos de 1 minuto de fila.",icon:"🥷",rarity:"rare",metric:"chat_waiting_time",params:{max_minutes:1},target:50,xp:140},{id:"cacador-de-clientes",name:"Caçador de Clientes",description:"Inicie 25 atendimentos proativos.",icon:"🎯",rarity:"rare",metric:"chat_flow",target:25,xp:140},{id:"veterano",name:"Veterano",description:"Alcance o nível 15.",icon:"🎖️",rarity:"rare",metric:"level",target:15,xp:160},{id:"pontuador",name:"Pontuador",description:"Acumule 500 pontos na temporada.",icon:"📊",rarity:"rare",metric:"season_points",scope:"season",target:500,xp:150},{id:"maratonista",name:"Maratonista",description:"Conclua 1.000 atendimentos.",icon:"🏃",rarity:"epic",metric:"chat_finished",target:1e3,xp:350},{id:"colecionador-de-dez",name:"Colecionador de Dez",description:"Receba 100 avaliações com nota 10.",icon:"💎",rarity:"epic",metric:"chat_grade",params:{min_grade:10},target:100,xp:400},{id:"velocidade-de-cruzeiro",name:"Velocidade de Cruzeiro",description:"Resolva 250 atendimentos, cada um em menos de 5 minutos.",icon:"🛫",rarity:"epic",metric:"chat_attending_time",params:{max_minutes:5},target:250,xp:380},{id:"especialista",name:"Especialista",description:"Alcance o nível 30.",icon:"⚔️",rarity:"epic",metric:"level",target:30,xp:500},{id:"lugar-ao-sol",name:"Lugar ao Sol",description:"Termine uma temporada no top 3.",icon:"🥉",rarity:"epic",metric:"season_rank",target:3,xp:400},{id:"lenda-viva",name:"Lenda Viva",description:"Conclua 10.000 atendimentos.",icon:"👑",rarity:"legendary",metric:"chat_finished",target:1e4,xp:1e3},{id:"imortal",name:"Imortal",description:"Alcance o nível 50.",icon:"♾️",rarity:"legendary",metric:"level",target:50,xp:1200},{id:"topo-do-mundo",name:"Topo do Mundo",description:"Termine uma temporada em 1º lugar.",icon:"🌟",rarity:"legendary",metric:"season_rank",target:1,xp:1200},{id:"dinastia",name:"Dinastia",description:"Vença 3 temporadas.",icon:"🏆",rarity:"legendary",metric:"season_wins",target:3,xp:1500},{id:"speedrun",name:"Speedrun Any%",description:"Resolva 10 atendimentos, cada um em menos de 2 minutos.",icon:"🏁",rarity:"secret",hint:"Rápido demais para ser visto.",metric:"chat_attending_time",params:{max_minutes:2},target:10,xp:1800},{id:"na-mosca",name:"Na Mosca",description:"Receba 10 avaliações com nota 10.",icon:"🔟",rarity:"secret",hint:"Perfeição tem sequência.",metric:"chat_grade",params:{min_grade:10},target:10,xp:2e3},{id:"movido-a-cafe",name:"Movido a Café",description:"Conclua 500 atendimentos.",icon:"☕",rarity:"secret",hint:"☕ ☕ ☕",metric:"chat_finished",target:500,xp:2200},{id:"elite",name:"Elite",description:"Acumule 1.337 pontos na temporada.",icon:"😎",rarity:"secret",hint:"Um número muito específico.",metric:"season_points",scope:"season",target:1337,xp:2337},{id:"a-virada",name:"A Virada",description:"Termine uma temporada no top 5.",icon:"📈",rarity:"secret",hint:"Ninguém viu essa chegando.",metric:"season_rank",target:5,xp:2100}],BASE_ACHIEVEMENTS=RAW_BASE_ACHIEVEMENTS.map(({metric:ee,target:te,params:ne,scope:ae,season_id:re,...oe})=>({hint:"",status:!0,...oe,requirement:createAchievementRequirement({metric:ee,target:te,params:ne,scope:ae,season_id:re})})),SM_PLAY_MOCK_ENABLED=!1,XP_CURVE_BASE=100,XP_CURVE_EXPONENT=1.5;function xpStep(ee){const te=Number(ee)>=1?Number(ee):1;return Math.round(XP_CURVE_BASE*te**XP_CURVE_EXPONENT)}function xpFloorForLevel(ee){const te=Number(ee)>=1?Math.trunc(Number(ee)):1;let ne=0;for(let ae=1;ae<te;ae+=1)ne+=xpStep(ae);return ne}function resolveLevel(ee){const te=Math.max(0,Math.trunc(Number(ee)||0));let ne=1,ae=0;for(;te-ae>=xpStep(ne);)ae+=xpStep(ne),ne+=1;const re=te-ae,oe=xpStep(ne);return{level:ne,xp_into_level:re,xp_for_next:oe,progress_pct:Math.min(100,Math.round(re/oe*100))}}function buildBalanceImpact({points:ee=0,totalXp:te=0,level:ne=0,delta:ae=0}={}){const re=ve=>Number(ve).toLocaleString("pt-BR"),oe=ae!==0,ie=Math.max(0,Number(ee)+ae),le=Math.max(0,Number(te)+ae),ce=resolveLevel(le).level,de=ce-Number(ne),ue=Math.abs(de);return[{key:"points",label:"Pontos da temporada",from:re(ee),to:re(ie),changed:oe},{key:"xp",label:"XP total",from:re(te),to:re(le),changed:oe},{key:"level",label:"Nível",from:String(ne),to:String(ce),changed:oe&&ue>0,note:ue?`${de>0?"+":"−"}${ue} ${ue===1?"nível":"níveis"}`:""}]}const activeCatalog=e$b.shallowRef({frames:[],titles:[],achievements:[]});let catalogIndex={frame:new Map,title:new Map,achievement:new Map};function indexById(ee){const te=new Map;for(const ne of ee)ne!=null&&ne.id&&te.set(ne.id,ne);return te}function setCosmeticsCatalog(ee){activeCatalog.value={frames:(ee==null?void 0:ee.frames)??[],titles:(ee==null?void 0:ee.titles)??[],achievements:(ee==null?void 0:ee.achievements)??[]},catalogIndex={frame:indexById(activeCatalog.value.frames),title:indexById(activeCatalog.value.titles),achievement:indexById(activeCatalog.value.achievements)}}const activeAchievements=e$b.shallowRef([]);let achievementIndex=new Map;function setAchievementsCatalog(ee){activeAchievements.value=Array.isArray(ee)?ee:[],achievementIndex=indexById(activeAchievements.value)}function findAchievement(ee){return ee?(activeAchievements.value,achievementIndex.get(ee)||null):null}function findCosmetic(ee,te){var ne;return te?(activeCatalog.value,((ne=catalogIndex[ee])==null?void 0:ne.get(te))||null):null}function isRequirementMet(ee,te){var ne;return!ee||ee.kind==="public"?!0:ee.kind==="level"?te.level>=ee.level:ee.kind==="achievement"?te.unlockedAchievementIds.has(ee.id):ee.kind==="season_rank"?te.bestSeasonRank<=ee.rank:["manual","grant","season"].includes(ee.kind)?((ne=te.ownedCosmeticIds)==null?void 0:ne.has(ee.cosmetic_id))??!1:!1}function isSecretToViewer(ee,te){var ne;return(ee==null?void 0:ee.rarity)==="secret"&&!(te!=null&&te.revealSecrets)&&!((ne=te==null?void 0:te.unlockedAchievementIds)!=null&&ne.has(ee.id))}function requirementLabel(ee,te){if(!ee||ee.kind==="public")return"Disponível para todos";if(ee.kind==="level")return`Nível ${ee.level}`;if(ee.kind==="season_rank")return`Top ${ee.rank} na temporada`;if(ee.kind==="season")return"Coleção de temporada";if(["manual","grant"].includes(ee.kind))return"Concedido pela gestão";const ne=findAchievement(ee.id);return ne?isSecretToViewer(ne,te)?"Conquista secreta":`Conquista: ${ne.name}`:"Conquista"}function describeCosmeticRequirement(ee,te=null){const ne={...baselineMeritContext(),...te||{}},ae=(ee==null?void 0:ee.kind)??"public",re=requirementLabel(ee,ne);if(!ee||ae==="public")return{kind:"public",label:re,text:"Já está disponível — sem requisito."};if(ae==="level"){const oe=Number(ee.level)||0,ie=Number(ne.level)||0;return{kind:ae,label:re,text:`Chegue ao nível ${oe}. O XP que sobe o nível não zera entre temporadas.`,unit:"níveis",progress:oe>0?{current:Math.max(0,Math.min(ie,oe)),target:oe,remaining:Math.max(0,oe-ie),pct:Math.max(0,Math.min(100,Math.round(ie/oe*100)))}:null}}if(ae==="season_rank"){const oe=Number(ee.rank)||0,ie=Number(ne.bestSeasonRank),le=Number.isFinite(ie);return{kind:ae,label:re,text:`Feche uma temporada entre os ${oe} primeiros do seu departamento.`,note:le?`Sua melhor posição até agora: ${ie}º`:"Você ainda não fechou uma temporada com posição registrada."}}if(ae==="achievement"){const oe=findAchievement(ee.id),ie=isSecretToViewer(oe,ne);return oe?{kind:ae,label:re,text:ie?"Desbloqueie uma conquista secreta — ela se revela quando você chegar lá.":`Desbloqueie a conquista "${oe.name}".`,note:ie?null:oe.description||null}:{kind:ae,label:re,text:"Desbloqueie a conquista ligada a este item."}}return ae==="season"?{kind:ae,label:re,text:"Item de coleção de temporada: sai com o ciclo em que é oferecido."}:["manual","grant"].includes(ae)?{kind:ae,label:re,text:"Só a gestão concede este item — não há como desbloquear atendendo."}:{kind:ae,label:re,text:re}}function resolveCosmeticRequirement(ee){const te=ee.availability||ee.requirement;return te?{...typeof te=="string"?{kind:te}:{...te},cosmetic_id:ee.id}:null}function baselineMeritContext(){return{level:1,unlockedAchievementIds:new Set,bestSeasonRank:1/0,ownedCosmeticIds:new Set,revealSecrets:!1}}function buildCosmetics(ee=baselineMeritContext()){const te=re=>{var ce;const oe=resolveCosmeticRequirement(re),ie=isRequirementMet(oe,ee),le={...re,unlocked:ie,availability:oe,requirementLabel:requirementLabel(oe,ee)};return re.type!=="achievement"?le:re.achievementId?{...le,requirementLabel:((ce=RARITIES[re.rarity])==null?void 0:ce.label)||"Desbloqueada"}:{...le,requirementLabel:"Sem destaque"}},ne=activeCatalog.value,ae=ne.achievements.filter(re=>!re.achievementId||isRequirementMet(resolveCosmeticRequirement(re),ee));return[{slot:"frame",label:"Molduras",items:ne.frames.map(te)},{slot:"title",label:"Títulos",items:ne.titles.map(te)},{slot:"achievement",label:"Destaque",items:ae.map(te)}]}function slotId(ee){return ee?typeof ee=="object"?ee.id??null:ee:null}function resolveSmPlayEnabled(ee,te=SM_PLAY_MOCK_ENABLED){var ne;return!ee||typeof ee!="object"?!1:!!(((ne=ee.gamification)==null?void 0:ne.enabled)??ee.gamification_enabled??te)}function resolveAttendantGamification(ee){var ue;const te=(ee==null?void 0:ee.gamification)??(ee==null?void 0:ee.game_profile)??{},ne=te.cosmetics??(ee==null?void 0:ee.cosmetics)??{},ae=ne.equipped??te.equipped??((ue=ee==null?void 0:ee.cosmetics)==null?void 0:ue.equipped)??ne,re=slotId(ae.frame)??null,oe=slotId(ae.title)??null,ie=slotId(ae.achievement)??null,le=(ve,me,be)=>{const fe=ve==="achievement"?findAchievement(be):findCosmetic(ve,be);return fe?typeof me!="object"?fe:{...fe,...me,...me.rarity==null&&fe.rarity?{rarity:fe.rarity}:{}}:typeof me=="object"?me:null},ce=te.level??(ee==null?void 0:ee.gamification_level)??(ee==null?void 0:ee.level)??null,de=ce===null||ce===""?null:Number(ce);return{level:Number.isFinite(de)?de:null,equipped:{frame:re,title:oe,achievement:ie},frame:le("frame",ae.frame,re),title:le("title",ae.title,oe),achievement:le("achievement",ae.achievement,ie)}}const useAttendantStore=pinia.defineStore("attendant",{state:()=>({attendants:[],count:null,loaded:!1}),getters:{logged_attendant:ee=>()=>ee.attendants.find(te=>te.is_me),attendantsById:ee=>{const te=new Map;for(const ne of ee.attendants)(ne==null?void 0:ne.id)!=null&&te.set(String(ne.id),ne);return te}},actions:{async fetchAttendants(){try{let ee=`${attendantUrl}`;const te=await api.get(ee);this.attendants=te.data,this.count=this.attendants.length}catch(ee){console.log("Erro ao buscar atendentes:",ee)}},removeAttendants(ee){this.attendants=this.attendants.filter(te=>te.id!==ee)},addAttendants(ee){const te=this.attendants.findIndex(ne=>ne.id===ee.id);te!==-1?this.attendants[te]=ee:this.attendants.push(ee)}}}),useMessageUiStore=pinia.defineStore("smClickMessageUi",{state:()=>({deviceType:"web",smPlayEnabled:!1,currentChat:null,attendant:null,themeMode:!0,forwardMode:{active:!1,selectedMessages:[]},actionsMenu:{messageId:null,message:null,x:0,y:0},quote:null,editMessage:{id:null,text:"",editing:!1},list:{modal:!1,message:null}}),getters:{isWebDevice:ee=>ee.deviceType==="web",chatActive:ee=>{var te;return((te=ee.currentChat)==null?void 0:te.status)==="active"},chatInstanceId:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.instance)==null?void 0:ne.id)??null},instancePhone:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.instance)==null?void 0:ne.telephone)??""},isGroupChat:ee=>{var te;return!!((te=ee.currentChat)!=null&&te.group)},contactPhoto:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.contact)==null?void 0:ne.photo)??""},contactName:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.contact)==null?void 0:ne.name)??""},isMessageSelected:ee=>te=>ee.forwardMode.selectedMessages.includes(te),isActionsTarget:ee=>te=>ee.actionsMenu.messageId!==null&&ee.actionsMenu.messageId===te,loggedAttendant:ee=>ee.attendant||useAttendantStore().logged_attendant()||null},actions:{setContext({deviceType:ee,smPlayEnabled:te,currentChat:ne,themeMode:ae,attendant:re}={}){ee!==void 0&&(this.deviceType=ee||"web"),te!==void 0&&(this.smPlayEnabled=!!te),ne!==void 0&&(this.currentChat=ne),ae!==void 0&&(this.themeMode=!!ae),re!==void 0&&(this.attendant=re)},openActions(ee,te){ee!=null&&ee.id&&(this.actionsMenu={messageId:ee.id,message:ee,x:(te==null?void 0:te.clientX)??0,y:(te==null?void 0:te.clientY)??0})},closeActions(){this.actionsMenu={messageId:null,message:null,x:0,y:0}},startForward(ee){this.forwardMode.active=!0;const te=Array.isArray(ee==null?void 0:ee.items)?ee.items.map(ne=>ne==null?void 0:ne.id).filter(ne=>ne!=null&&ne!==""):[];this.forwardMode.selectedMessages=te.length?te:[ee==null?void 0:ee.id].filter(Boolean)},toggleMessageSelection(ee){if(!ee)return;this.forwardMode.active=!0;const te=this.forwardMode.selectedMessages.indexOf(ee);te>-1?this.forwardMode.selectedMessages.splice(te,1):this.forwardMode.selectedMessages.push(ee),this.forwardMode.selectedMessages.length||(this.forwardMode.active=!1)},togglePackageSelection(ee=[]){const te=ee.filter(ae=>ae!=null&&ae!=="");if(!te.length)return;this.forwardMode.active=!0;const ne=te.filter(ae=>this.forwardMode.selectedMessages.includes(ae));ne.length>te.length-ne.length?this.forwardMode.selectedMessages=this.forwardMode.selectedMessages.filter(ae=>!te.includes(ae)):te.forEach(ae=>{this.forwardMode.selectedMessages.includes(ae)||this.forwardMode.selectedMessages.push(ae)}),this.forwardMode.selectedMessages.length||(this.forwardMode.active=!1)},clearForward(){this.forwardMode.active=!1,this.forwardMode.selectedMessages=[]},setQuote(ee,te,ne){if(!ee){this.quote=null;return}this.quote={...ee,id:ne,...te?{sent_by:te}:{}}},clearQuote(){this.quote=null},startEdit(ee){var te;this.editMessage={id:(ee==null?void 0:ee.id)??null,editing:!0,text:((te=ee==null?void 0:ee.content)==null?void 0:te.text)??""},this.quote=null},clearEdit(){this.editMessage={id:null,text:"",editing:!1}},openList(ee){this.list.modal=!0,this.list.message=ee},closeList(){this.list.modal=!1,this.list.message=null}}}),_hoisted_1$2q={key:0,class:"sm-avatar-arc",viewBox:"0 0 100 100",fill:"none","aria-hidden":"true"},_hoisted_2$27={key:0,class:"sm-avatar-core sm-avatar-core--empty","aria-hidden":"true"},_hoisted_3$1V={key:1,class:"sm-avatar-core"},_hoisted_4$1J=["alt"],_hoisted_5$1z=["src","alt"],_hoisted_6$1q={key:2,class:"sm-avatar-core sm-avatar-core--initials"},_hoisted_7$1i={key:0,class:"size-[62%]",viewBox:"0 0 24 24",fill:"currentColor"},_hoisted_8$1a={key:1,class:"size-[58%]",viewBox:"0 0 24 24",fill:"currentColor"},_hoisted_9$15={class:"sm-avatar-level"},_hoisted_10$_=["title"],_hoisted_11$T={key:3,class:"sm-avatar-outcome","aria-hidden":"true"},_hoisted_12$O={key:0,class:"sm-avatar-outcome-icon sm-avatar-outcome-icon--won",viewBox:"0 0 20 20",fill:"none"},_hoisted_13$H={key:1,class:"sm-avatar-outcome-icon sm-avatar-outcome-icon--lost",viewBox:"0 0 20 17",fill:"none"},_hoisted_14$F={key:4,class:"sm-avatar-blocked","aria-hidden":"true"},FRAME_REFERENCE_SIZE=72,_sfc_main$2D={__name:"Avatar",props:{photo:{type:String,default:""},name:{type:String,default:""},size:{type:String,default:"md",validator:ee=>["xs","sm","md","lg","xl","preview","fill"].includes(ee)},scale:{type:String,default:"identity",validator:ee=>["identity","app"].includes(ee)},fallback:{type:String,default:"initials",validator:ee=>["initials","icon","group"].includes(ee)},attendant:{type:Object,default:null},smPlay:{type:Boolean,default:void 0},frame:{type:Object,default:void 0},frameOnly:{type:Boolean,default:!1},level:{type:Number,default:null},showLevel:{type:Boolean,default:!0},effectLevel:{type:String,default:"border",validator:ee=>["full","compact","border"].includes(ee)},clickable:{type:Boolean,default:!1},blocked:{type:Boolean,default:!1},channel:{type:String,default:null},outcome:{type:String,default:null,validator:ee=>[null,"","won","lost"].includes(ee)}},emits:["view"],setup(ee,{emit:te}){const ne=ee,ae=te,re={identity:{xs:22.4,sm:38.4,md:44,lg:60,preview:66,xl:112},app:{xs:26,sm:40,md:56,lg:80,xl:112}},oe=!!pinia.getActivePinia(),ie=oe?useAttendantStore():null,le=oe?useMessageUiStore():null,ce=e$b.inject("smPlayEnabled",null),de=e$b.computed(()=>{var Ue;return ne.name||((Ue=ne.attendant)==null?void 0:Ue.name)||""}),ue=e$b.computed(()=>{var Ue;return ne.photo||((Ue=ne.attendant)==null?void 0:Ue.photo)||""}),ve=e$b.computed(()=>{var at;const Ue=(at=ne.attendant)==null?void 0:at.id;return!Ue||!ie?null:ie.attendantsById.get(String(Ue))||null}),me=e$b.computed(()=>{if(!ne.attendant)return null;const Ue=resolveAttendantGamification(ne.attendant);return Ue.frame||Ue.title||Ue.achievement||!ve.value?Ue:resolveAttendantGamification(ve.value)}),be=e$b.computed(()=>{if(ne.smPlay!==void 0)return ne.smPlay;const Ue=e$b.unref(ce);return Ue!=null?!!Ue:!!(le!=null&&le.smPlayEnabled)}),fe=e$b.computed(()=>!!ne.attendant&&be.value&&resolveSmPlayEnabled(ve.value||ne.attendant)),pe=e$b.computed(()=>{var Ue;return ne.frame!==void 0?ne.frame:fe.value?(Ue=me.value)==null?void 0:Ue.frame:null}),_e=e$b.computed(()=>{var Ue;return ne.level!==null?ne.level:fe.value?(Ue=me.value)==null?void 0:Ue.level:null}),ge=e$b.computed(()=>avatarInitials(de.value)),ke=e$b.computed(()=>ne.fallback==="initials"&&!!ge.value),$e=e$b.computed(()=>avatarHue(de.value||ue.value)),ye=e$b.computed(()=>!isImageSourcePreloaded(ue.value)),Ee=e$b.computed(()=>resolveFrameVisual(pe.value)),Se=e$b.computed(()=>{var Ue;return((Ue=Ee.value)==null?void 0:Ue.css)??null}),Le=e$b.computed(()=>!!Se.value),Me=e$b.computed(()=>{var Ue;return((Ue=Ee.value)==null?void 0:Ue.ring.variant)==="arc"}),De=e$b.computed(()=>{var Ue;return((Ue=Ee.value)==null?void 0:Ue.ring.variant)==="double"}),Oe=e$b.computed(()=>{var Ue,at;return Me.value&&((at=(Ue=Ee.value)==null?void 0:Ue.ornament)==null?void 0:at.variant)||""}),Re=e$b.computed(()=>{var Ue;return!!((Ue=Ee.value)!=null&&Ue.ornament.enabled)&&frameVariantLocked("ornament",Ee.value.ornament.variant)}),ze=e$b.computed(()=>{var Ue,at;return((Ue=Ee.value)==null?void 0:Ue.motion.enabled)&&((at=Ee.value)==null?void 0:at.motion.rotation)&&ne.effectLevel!=="border"}),Ve=e$b.computed(()=>{var Ue;return ze.value&&["rainbow","neon"].includes((Ue=Ee.value)==null?void 0:Ue.ring.variant)}),Ne=e$b.computed(()=>{var at;if(ne.size==="fill")return 1;const Ue=((at=re[ne.scale])==null?void 0:at[ne.size])??FRAME_REFERENCE_SIZE;return Math.min(2.4,Ue/FRAME_REFERENCE_SIZE)}),Pe=Ue=>`calc(var(--sm-frame-width, 2px) * ${Math.round(Ue*100)/100})`,Be=e$b.computed(()=>{if(!Ee.value)return"";const Ue=Ee.value.ring;if(Ue.variant==="arc")return"none";const at=Ue.glow*Ue.intensity,Je=Ue.colors[0],lt=Ue.colors[1];if(Ue.variant==="double")return`0 0 ${Pe(1.6+at*1.8)} color-mix(in srgb, ${Je} ${Math.round(28+at*45)}%, transparent)`;if(Ue.variant==="neon")return`0 0 ${Pe(1.4+at*1.4)} color-mix(in srgb, ${Je} ${Math.round(45+at*45)}%, transparent), 0 0 ${Pe(2.6+at*2.6)} color-mix(in srgb, ${lt} ${Math.round(25+at*45)}%, transparent)`;if(Ue.variant==="rainbow"){const it=Ue.colors[2];return`0 0 ${Pe(1.3+at*1.3)} color-mix(in srgb, ${Je} ${Math.round(35+at*40)}%, transparent), 0 0 ${Pe(2.2+at*2.2)} color-mix(in srgb, ${lt} ${Math.round(25+at*35)}%, transparent), 0 0 ${Pe(3.1+at*3.1)} color-mix(in srgb, ${it} ${Math.round(18+at*32)}%, transparent)`}return`0 0 ${Pe(1.2+at*2)} color-mix(in srgb, ${Je} ${Math.round(18+at*42)}%, transparent)`}),Ae=e$b.computed(()=>{var lt;if(ne.size==="fill"&&!Le.value)return"0px";const Ue=Me.value?.72:De.value?1.4:1,at=Me.value?1.5:De.value?3:2,Je=(((lt=Ee.value)==null?void 0:lt.ring.width)||2)*Ue/FRAME_REFERENCE_SIZE;return ne.size==="fill"?`max(${at}px, ${Math.round(Je*1e4)/100}cqw)`:`${Math.max(at,Je*FRAME_REFERENCE_SIZE*Ne.value)}px`}),xe=e$b.computed(()=>{var Ue,at,Je,lt,it,gt,Et,mt;return Le.value?{"--sm-frame-bg":Me.value?"transparent":Se.value,boxShadow:Be.value,"--sm-frame-width":Ae.value,"--sm-frame-band-gap":"max(1px, calc(var(--sm-frame-width) * 0.16))","--sm-frame-band-inner":"calc(max(1px, calc(var(--sm-frame-width) * 0.16)) + max(1px, calc(var(--sm-frame-width) * 0.3)))","--sm-frame-primary":((at=(Ue=Ee.value)==null?void 0:Ue.ring.colors)==null?void 0:at[0])||"rgb(var(--primary-rgb))","--sm-frame-secondary":((lt=(Je=Ee.value)==null?void 0:Je.ring.colors)==null?void 0:lt[1])||"rgb(var(--primary-rgb))","--sm-frame-accent":((gt=(it=Ee.value)==null?void 0:it.ring.colors)==null?void 0:gt[2])||"rgb(var(--primary-rgb))","--sm-frame-ring-speed":`${6/(((Et=Ee.value)==null?void 0:Et.motion.speed)||1)}s`,"--sm-frame-ring-direction":((mt=Ee.value)==null?void 0:mt.motion.direction)==="counterclockwise"?"reverse":"normal","--avatar-hue":$e.value}:{"--sm-frame-width":Ae.value,"--avatar-hue":$e.value}}),Ce=e$b.computed(()=>({background:Se.value||"rgb(var(--primary-rgb))"})),Fe=e$b.computed(()=>ne.size==="fill"?"sm-avatar--fill":`sm-avatar--${ne.scale}-${ne.size}`),Ie=e$b.computed(()=>{const Ue=normalizeChannel(ne.channel);return Ue==="whatsapp"?null:Ue}),qe=e$b.computed(()=>{var Ue;return!!((Ue=Ee.value)!=null&&Ue.motion.enabled)&&(ne.effectLevel!=="border"||Re.value)}),{offscreenRef:Ge,paused:Ze}=useOffscreenPause(qe);function Xe(){ne.clickable&&ue.value&&ae("view",ue.value)}return(Ue,at)=>{const Je=e$b.resolveDirective("lazy");return e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(ee.clickable?"button":"div"),{ref_key:"offscreenRef",ref:Ge,class:e$b.normalizeClass(["sm-avatar",[Fe.value,ee.clickable?"sm-avatar--clickable":"",e$b.unref(Ze)?"sm-avatar--offscreen":""]]),type:ee.clickable?"button":void 0,onClick:Xe},{default:e$b.withCtx(()=>{var lt;return[Ee.value&&(ee.effectLevel!=="border"||Re.value)?(e$b.openBlock(),e$b.createBlock(FrameEffects,{key:0,visual:Ee.value,"visual-normalized":"","effect-level":ee.effectLevel,"pause-offscreen":!1},null,8,["visual","effect-level"])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",{class:e$b.normalizeClass(["sm-avatar-frame",[ze.value?"sm-avatar-frame--animated":"",Ve.value?"sm-avatar-frame--spins":"",(lt=Ee.value)!=null&<.ring.variant?`sm-avatar-frame--${Ee.value.ring.variant}`:"",Oe.value?`sm-avatar-frame--signature-${Oe.value}`:"",Le.value?"sm-avatar-frame--painted":"",ee.frameOnly&&!Le.value?"sm-avatar-frame--empty":""]]),style:e$b.normalizeStyle(xe.value)},[Me.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_1$2q,[...at[0]||(at[0]=[e$b.createElementVNode("circle",{class:"sm-avatar-arc-halo",cx:"50",cy:"50",r:"48.5"},null,-1),e$b.createElementVNode("circle",{class:"sm-avatar-arc-core",cx:"50",cy:"50",r:"48.5"},null,-1),e$b.createElementVNode("circle",{class:"sm-avatar-arc-highlight",cx:"50",cy:"50",r:"48.5"},null,-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",{class:e$b.normalizeClass(["sm-avatar-gap",Le.value&&ee.scale==="app"?"sm-avatar-gap--app":""])},[ee.frameOnly?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_2$27)):ue.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_3$1V,[ye.value?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("img",{key:0,alt:de.value,class:"sm-avatar-image"},null,8,_hoisted_4$1J)),[[Je,ue.value]]):(e$b.openBlock(),e$b.createElementBlock("img",{key:1,src:ue.value,alt:de.value,class:"sm-avatar-image"},null,8,_hoisted_5$1z))])):ke.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$1q,e$b.toDisplayString(ge.value),1)):(e$b.openBlock(),e$b.createElementBlock("div",{key:3,class:e$b.normalizeClass(["sm-avatar-core",ee.fallback==="group"?"sm-avatar-core--initials sm-avatar-core--group":"sm-avatar-core--icon"]),"aria-hidden":"true"},[ee.fallback==="group"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$1i,[...at[1]||(at[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 6a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm-1.5 8a4 4 0 0 0-4 4 2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-3Zm6.82-3.096a5.51 5.51 0 0 0-2.797-6.293 3.5 3.5 0 1 1 2.796 6.292ZM19.5 18h.5a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-1.1a5.503 5.503 0 0 1-.471.762A5.998 5.998 0 0 1 19.5 18ZM4 7.5a3.5 3.5 0 0 1 5.477-2.889 5.5 5.5 0 0 0-2.796 6.293A3.501 3.501 0 0 1 4 7.5ZM7.1 12H6a4 4 0 0 0-4 4 2 2 0 0 0 2 2h.5a5.998 5.998 0 0 1 3.071-5.238A5.505 5.505 0 0 1 7.1 12Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1a,[...at[2]||(at[2]=[e$b.createElementVNode("path",{d:"M12 12.4a4.2 4.2 0 1 0 0-8.4 4.2 4.2 0 0 0 0 8.4Zm0 1.7c-3.98 0-7.2 2.28-7.2 5.09 0 .45.37.81.83.81h12.74c.46 0 .83-.36.83-.81 0-2.81-3.22-5.09-7.2-5.09Z"},null,-1)])]))],2))],2)],6),!ee.frameOnly&&ee.showLevel&&_e.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"sm-avatar-level-frame",style:e$b.normalizeStyle(Ce.value)},[e$b.createElementVNode("span",_hoisted_9$15,e$b.toDisplayString(_e.value),1)],4)):e$b.createCommentVNode("",!0),Ie.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:2,class:e$b.normalizeClass(["sm-avatar-channel",`sm-avatar-channel--${Ie.value}`]),title:e$b.unref(channelLabel)(ee.channel)},[e$b.createVNode(ChannelIcon,{channel:Ie.value},null,8,["channel"])],10,_hoisted_10$_)):e$b.createCommentVNode("",!0),ee.outcome?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_11$T,[ee.outcome==="won"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$O,[...at[3]||(at[3]=[e$b.createElementVNode("path",{d:"M3.16666 6.37502C3.74962 6.37502 4.2222 6.85073 4.22222 7.43752V15.9375C4.22222 16.5243 3.74963 17 3.16666 17H1.05555C0.472588 17 0 16.5243 0 15.9375V7.43752C1.50967e-05 6.85073 0.472597 6.37502 1.05555 6.37502H3.16666Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.48143 1.4454C9.79496 -0.637173 11.5194 0.143216 11.5194 0.143216C13.863 1.75728 13.005 4.80783 12.2832 6.13118H17.4424C19.5307 6.65187 19.0768 8.34354 18.5887 9.12465C19.5056 10.7905 18.4191 11.7716 17.7609 12.0538C18.1175 13.7717 17.0601 14.4178 16.4869 14.5264C16.8944 16.4004 15.5533 16.9564 14.8314 17H10.436C8.49997 16.9999 6.19055 16.1753 5.27777 15.7632V7.368C9.03523 5.6108 9.09933 3.98356 9.48143 1.4454Z",fill:"currentColor"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$H,[...at[4]||(at[4]=[e$b.createElementVNode("path",{d:"M15.8333 10.625C15.2504 10.625 14.7778 10.1493 14.7778 9.56249L14.7778 1.0625C14.7778 0.475698 15.2504 1.57955e-06 15.8333 1.63051e-06L17.9444 1.81507e-06C18.5274 1.86603e-06 19 0.475698 19 1.0625L19 9.56249C19 10.1493 18.5274 10.625 17.9444 10.625L15.8333 10.625Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.51857 15.5546C9.20504 17.6372 7.48065 16.8568 7.48065 16.8568C5.13698 15.2427 5.99503 12.1922 6.71681 10.8688L1.55759 10.8688C-0.530671 10.3481 -0.0768444 8.65646 0.411319 7.87535C-0.50562 6.20951 0.580926 5.22844 1.23906 4.94622C0.882549 3.22832 1.93994 2.5822 2.51315 2.47363C2.10564 0.59965 3.44673 0.0436064 4.16864 6.1075e-07L8.56403 9.95007e-07C10.5 0.000138493 12.8095 0.824657 13.7222 1.23682L13.7222 9.632C9.96477 11.3892 9.90067 13.0164 9.51857 15.5546Z",fill:"currentColor"},null,-1)])]))])):e$b.createCommentVNode("",!0),ee.blocked?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_14$F,[...at[5]||(at[5]=[e$b.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"})],-1)])])):e$b.createCommentVNode("",!0),e$b.renderSlot(Ue.$slots,"badge",{},void 0,!0)]}),_:3},8,["class","type"])}}},Avatar=_export_sfc$1(_sfc_main$2D,[["__scopeId","data-v-a254c3bf"]]),_hoisted_1$2p={class:"vcard"},_hoisted_2$26={class:"vcard__stack"},_hoisted_3$1U={class:"vcard__info"},_hoisted_4$1I={class:"vcard__name"},_hoisted_5$1y={key:0,class:"vcard__subtitle"},_hoisted_6$1p={key:0,class:"vcard__chevron","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},_hoisted_7$1h={key:0,class:"vcard-modal vcard-people"},_hoisted_8$19={class:"vcard-person__info"},_hoisted_9$14={class:"vcard-person__name"},_hoisted_10$Z={key:0,class:"vcard-person__phone"},_hoisted_11$S=["onClick"],_hoisted_12$N={key:1,class:"vcard-modal"},_hoisted_13$G={class:"vcard-hero"},_hoisted_14$E={class:"vcard-hero__info"},_hoisted_15$A={class:"vcard-hero__name"},_hoisted_16$x={key:0,class:"vcard-hero__role"},_hoisted_17$q={key:0,class:"vcard-rows"},_hoisted_18$q={class:"vcard-row__icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_19$l=["d"],_hoisted_20$k={class:"vcard-row__text"},_hoisted_21$h={class:"vcard-row__label"},_hoisted_22$f={class:"vcard-row__value"},_hoisted_23$b={key:0,class:"vcard-row__copied"},_sfc_main$2C=Object.assign({name:"ContactMessageCard"},{__name:"contactMessageCard",props:{contact:{type:Object,default:()=>({})},contacts:{type:Array,default:null},showStartChat:{type:Boolean,default:!1}},emits:["start-chat"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.ref("");let ie=null;function le(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function ce(Re){const ze=(Re??"").toString().replace(/\D/g,"");return ze.length===13&&ze.startsWith("55")?`+55 (${ze.slice(2,4)}) ${ze.slice(4,9)}-${ze.slice(9)}`:ze.length===12&&ze.startsWith("55")?`+55 (${ze.slice(2,4)}) ${ze.slice(4,8)}-${ze.slice(8)}`:ze.length===11?`(${ze.slice(0,2)}) ${ze.slice(2,7)}-${ze.slice(7)}`:ze.length===10?`(${ze.slice(0,2)}) ${ze.slice(2,6)}-${ze.slice(6)}`:Re}function de(Re){return typeof Re=="string"?Re:[Re.street,Re.city,Re.state,Re.zip,Re.country].filter(Boolean).join(", ")}function ue(Re){const ze=/^(\d{4})-(\d{2})-(\d{2})/.exec(Re||"");return ze?`${ze[3]}/${ze[2]}/${ze[1]}`:Re}function ve(Re){const ze=Re||{};return{name:ze.name||"Contato",title:ze.title||"",org:ze.org||ze.organization||"",photo:ze.photo||null,birthday:ze.birthday||"",phones:le(ze.telephones??ze.phones??ze.phone??ze.telephone).filter(Boolean),emails:le(ze.emails??ze.email).map(Ve=>typeof Ve=="string"?{email:Ve,type:""}:Ve).filter(Ve=>Ve&&Ve.email),urls:le(ze.urls??ze.url).map(Ve=>typeof Ve=="string"?{url:Ve,type:""}:Ve).filter(Ve=>Ve&&Ve.url),addresses:le(ze.addresses??ze.address).filter(Boolean)}}const me=e$b.computed(()=>{const Re=le(ne.contacts);return(Re.length?Re:[ne.contact]).map(ve)}),be=e$b.computed(()=>me.value.length>1),fe=e$b.computed(()=>me.value[0]),pe=e$b.computed(()=>me.value.slice(0,3)),_e=e$b.computed(()=>{if(!be.value)return fe.value.name;const Re=me.value.length-1;return Re===1?`${fe.value.name} e 1 outro contato`:`${fe.value.name} e ${Re} outros contatos`}),ge=e$b.computed(()=>{if(be.value)return`${me.value.length} contatos`;const Re=fe.value;return Re.phones.length?ce(Re.phones[0]):Re.org||Re.title||""}),ke=e$b.computed(()=>{const Re=fe.value;return Re.phones.length>1||Re.emails.length>0||Re.urls.length>0||Re.addresses.length>0||!!Re.birthday||!!Re.title||!!Re.org}),$e=e$b.computed(()=>be.value||ke.value),ye=e$b.computed(()=>({title:be.value?`${me.value.length} contatos`:fe.value.name,svg:be.value?'<svg class="size-5 text-primary" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H7Zm9.5-8a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm-.5 9a5.97 5.97 0 0 1 1.5 3.96V19a2 2 0 0 1-.28 1H20a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-2Z" clip-rule="evenodd"/></svg>':'<svg class="size-5 text-primary" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-4Z" clip-rule="evenodd"/></svg>'})),Ee={phone:"M7.4 3.6a2 2 0 0 0-2.8 0l-1 1a4 4 0 0 0-.5 4.9 33 33 0 0 0 11.4 11.4 4 4 0 0 0 4.9-.5l1-1a2 2 0 0 0 0-2.8l-2.3-2.3a2 2 0 0 0-2.8 0l-.8.8a24 24 0 0 1-5.5-5.5l.8-.8a2 2 0 0 0 0-2.8L7.4 3.6Z",email:"M2.04 6.6 12 12.7l9.96-6.1A2 2 0 0 0 20 5H4a2 2 0 0 0-1.96 1.6ZM2 8.9V17a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8.9l-9.48 5.8a1 1 0 0 1-1.04 0L2 8.9Z",addr:"M12 2a7 7 0 0 0-7 7c0 5 6.1 12.2 6.3 12.5a1 1 0 0 0 1.4 0C13 21.2 19 14 19 9a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z",url:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20ZM4.2 13h3.3c.1 2 .5 3.8 1.1 5.2A8 8 0 0 1 4.2 13Zm3.3-2H4.2A8 8 0 0 1 8.6 5.8C8 7.2 7.6 9 7.5 11ZM12 4.2c.9.9 1.8 3.1 2 6.8h-4c.2-3.7 1.1-5.9 2-6.8Zm0 15.6c-.9-.9-1.8-3.1-2-6.8h4c-.2 3.7-1.1 5.9-2 6.8Zm3.4-1.6c.6-1.4 1-3.2 1.1-5.2h3.3a8 8 0 0 1-4.4 5.2ZM16.5 11c-.1-2-.5-3.8-1.1-5.2A8 8 0 0 1 19.8 11h-3.3Z",birthday:"M12 2a1 1 0 0 1 1 1v1h1a3 3 0 0 1 3 3v1h1a2 2 0 0 1 2 2v3.2a3 3 0 0 1-2 .3 3 3 0 0 1-4 0 3 3 0 0 1-4 0 3 3 0 0 1-4 0 3 3 0 0 1-2-.3V10a2 2 0 0 1 2-2h1V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm-8 14a5 5 0 0 0 4-.6 5 5 0 0 0 4 0 5 5 0 0 0 4 0 5 5 0 0 0 4 .6V19a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3Z"},Se=e$b.computed(()=>{const Re=fe.value,ze=[],Ve=(Ne,Pe,Be,Ae={})=>{Be&&ze.push({id:`${Ne}-${ze.length}`,icon:Ee[Ne],label:Pe,value:Be,...Ae})};return Re.phones.forEach(Ne=>Ve("phone","Telefone",ce(Ne))),Re.emails.forEach(Ne=>Ve("email",Ne.type||"E-mail",Ne.email)),Re.addresses.forEach(Ne=>Ve("addr","Endereço",de(Ne))),Re.urls.forEach(Ne=>Ve("url",Ne.type||"Site",Ne.url,{link:Ne.url})),Ve("birthday","Aniversário",Re.birthday&&ue(Re.birthday)),ze}),Le=e$b.computed(()=>[fe.value.title,fe.value.org].filter(Boolean).join(" · "));function Me(){$e.value&&(re.value=!0)}function De(Re){re.value=!1,ae("start-chat",Re)}async function Oe(Re,ze){if(Re)try{await navigator.clipboard.writeText(Re),oe.value=ze,ie&&clearTimeout(ie),ie=setTimeout(()=>{oe.value=""},1500)}catch(Ve){console.error("Falha ao copiar:",Ve)}}return(Re,ze)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("article",_hoisted_1$2p,[(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent($e.value?"button":"div"),{class:"vcard__head",title:$e.value?"Ver detalhes":null,onClick:e$b.withModifiers(Me,["stop"])},{default:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_2$26,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(pe.value,(Ve,Ne)=>(e$b.openBlock(),e$b.createBlock(Avatar,{key:`avatar-${Ne}`,class:"vcard__avatar",style:e$b.normalizeStyle({zIndex:pe.value.length-Ne}),photo:Ve.photo||"",name:Ve.name,size:"sm",scale:"app",frame:null,"show-level":!1},null,8,["style","photo","name"]))),128))]),e$b.createElementVNode("div",_hoisted_3$1U,[e$b.createElementVNode("span",_hoisted_4$1I,e$b.toDisplayString(_e.value),1),ge.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$1y,e$b.toDisplayString(ge.value),1)):e$b.createCommentVNode("",!0)]),$e.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_6$1p,[...ze[4]||(ze[4]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 5 7 7-7 7"},null,-1)])])):e$b.createCommentVNode("",!0)]),_:1},8,["title"])),be.value?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"vcard__action",type:"button",onClick:ze[0]||(ze[0]=e$b.withModifiers(Ve=>re.value=!0,["stop"]))},"Ver todos")):ee.showStartChat?(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"vcard__action",type:"button",onClick:ze[1]||(ze[1]=e$b.withModifiers(Ve=>ae("start-chat",fe.value),["stop"]))},[...ze[5]||(ze[5]=[e$b.createElementVNode("svg",{class:"vcard__action-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H7Zm8-1a1 1 0 0 1 1-1h1v-1a1 1 0 1 1 2 0v1h1a1 1 0 1 1 0 2h-1v1a1 1 0 1 1-2 0v-1h-1a1 1 0 0 1-1-1Z","clip-rule":"evenodd"})],-1),e$b.createElementVNode("span",null,"Iniciar conversa",-1)])])):e$b.createCommentVNode("",!0)]),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(simpleModal,{"is-open":re.value,size:"sm:w-[26rem] md:w-[27rem]",header:ye.value,onClose:ze[3]||(ze[3]=Ve=>re.value=!1)},e$b.createSlots({body:e$b.withCtx(()=>[be.value?(e$b.openBlock(),e$b.createElementBlock("ul",_hoisted_7$1h,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(me.value,(Ve,Ne)=>(e$b.openBlock(),e$b.createElementBlock("li",{key:`contact-${Ne}`,class:"vcard-person"},[e$b.createVNode(Avatar,{photo:Ve.photo||"",name:Ve.name,size:"sm",scale:"app",frame:null,"show-level":!1},null,8,["photo","name"]),e$b.createElementVNode("div",_hoisted_8$19,[e$b.createElementVNode("span",_hoisted_9$14,e$b.toDisplayString(Ve.name),1),Ve.phones.length?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_10$Z,e$b.toDisplayString(ce(Ve.phones[0])),1)):e$b.createCommentVNode("",!0)]),ee.showStartChat?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"vcard-person__chat",type:"button",title:"Iniciar conversa",onClick:e$b.withModifiers(Pe=>De(Ve),["stop"])},[...ze[6]||(ze[6]=[e$b.createElementVNode("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h1v3a1 1 0 0 0 1.6.8L11.3 17H20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4Zm3 5h10a1 1 0 1 1 0 2H7a1 1 0 1 1 0-2Zm0 4h6a1 1 0 1 1 0 2H7a1 1 0 1 1 0-2Z","clip-rule":"evenodd"})],-1)])],8,_hoisted_11$S)):e$b.createCommentVNode("",!0)]))),128))])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$N,[e$b.createElementVNode("header",_hoisted_13$G,[e$b.createVNode(Avatar,{photo:fe.value.photo||"",name:fe.value.name,size:"md",scale:"app",frame:null,"show-level":!1},null,8,["photo","name"]),e$b.createElementVNode("div",_hoisted_14$E,[e$b.createElementVNode("span",_hoisted_15$A,e$b.toDisplayString(fe.value.name),1),Le.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$x,e$b.toDisplayString(Le.value),1)):e$b.createCommentVNode("",!0)])]),Se.value.length?(e$b.openBlock(),e$b.createElementBlock("ul",_hoisted_17$q,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Se.value,Ve=>(e$b.openBlock(),e$b.createElementBlock("li",{key:Ve.id},[(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(Ve.link?"a":"button"),{class:e$b.normalizeClass(["vcard-row",{"vcard-row--link":Ve.link}]),href:Ve.link||null,target:Ve.link?"_blank":null,rel:Ve.link?"noopener noreferrer":null,type:Ve.link?null:"button",title:Ve.link?"Abrir":oe.value===Ve.id?"Copiado!":"Clique para copiar",onClick:e$b.withModifiers(Ne=>Ve.link?null:Oe(Ve.value,Ve.id),["stop"])},{default:e$b.withCtx(()=>[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_18$q,[e$b.createElementVNode("path",{d:Ve.icon},null,8,_hoisted_19$l)])),e$b.createElementVNode("span",_hoisted_20$k,[e$b.createElementVNode("span",_hoisted_21$h,e$b.toDisplayString(Ve.label),1),e$b.createElementVNode("span",_hoisted_22$f,e$b.toDisplayString(Ve.value),1)]),oe.value===Ve.id?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_23$b,"Copiado")):e$b.createCommentVNode("",!0)]),_:2},1032,["class","href","target","rel","type","title","onClick"]))]))),128))])):e$b.createCommentVNode("",!0)]))]),_:2},[ee.showStartChat&&!be.value?{name:"footer",fn:e$b.withCtx(()=>[e$b.createElementVNode("button",{class:"vcard-modal__action",type:"button",onClick:ze[2]||(ze[2]=e$b.withModifiers(Ve=>De(fe.value),["stop"]))}," Iniciar conversa ")]),key:"0"}:void 0]),1032,["is-open","header"])]))],64))}}),ContactMessageCard=_export_sfc$1(_sfc_main$2C,[["__scopeId","data-v-baeb9a8d"]]);/*! License details at fancyapps.com/license */const t$9=ee=>typeof ee=="string";/*! License details at fancyapps.com/license */const n$b=ee=>ee&&ee!==null&&ee instanceof Element&&"nodeType"in ee;/*! License details at fancyapps.com/license */const e$a=function(ee){if(!(ee&&ee instanceof Element&&ee.offsetParent))return!1;const te=ee.scrollHeight>ee.clientHeight,ne=window.getComputedStyle(ee).overflowY,ae=ne.indexOf("hidden")!==-1,re=ne.indexOf("visible")!==-1;return te&&!ae&&!re},n$a=function(ee,te=void 0){return!ee||ee===document.body||te&&ee===te?null:e$a(ee)?ee:n$a(ee.parentElement,te)};/*! License details at fancyapps.com/license */const e$9=function(ee){var te=new DOMParser().parseFromString(ee,"text/html").body;if(te.childElementCount>1){for(var ne=document.createElement("div");te.firstChild;)ne.appendChild(te.firstChild);return ne}let ae=te.firstChild;return!ae||ae instanceof HTMLElement?ae:((ne=document.createElement("div")).appendChild(ae),ne)};/*! License details at fancyapps.com/license */const t$8=function(ee=0,te=0,ne=0){return Math.max(Math.min(te,ne),ee)};/*! License details at fancyapps.com/license */const t$7=ee=>typeof ee=="object"&&ee!==null&&ee.constructor===Object&&Object.prototype.toString.call(ee)==="[object Object]";/*! License details at fancyapps.com/license */function e$8(ee){return t$7(ee)||Array.isArray(ee)}function n$9(ee,te){const ne=Object.keys(ee),ae=Object.keys(te);return ne.length===ae.length&&ne.every(re=>{const oe=ee[re],ie=te[re];return typeof oe=="function"?`${oe}`==`${ie}`:e$8(oe)&&e$8(ie)?n$9(oe,ie):oe===ie})}/*! License details at fancyapps.com/license */const e$7=function(ee){for(const te of s$c)te.getState()===i$a.Running&&te.tick(a$9?ee-a$9:0);a$9=ee,u$7=window.requestAnimationFrame(e$7)};var i$a,o$9,r$7;(function(ee){ee[ee.Initializing=0]="Initializing",ee[ee.Running=1]="Running",ee[ee.Paused=2]="Paused",ee[ee.Completed=3]="Completed",ee[ee.Destroyed=4]="Destroyed"})(i$a||(i$a={})),function(ee){ee[ee.Spring=0]="Spring",ee[ee.Ease=1]="Ease"}(o$9||(o$9={})),function(ee){ee[ee.Loop=0]="Loop",ee[ee.Reverse=1]="Reverse"}(r$7||(r$7={}));const s$c=new Set;let u$7=null,a$9=0;function c$5(){let ee=i$a.Initializing,te=o$9.Ease,ne=0,ae=0,re=c$5.Easings.Linear,oe=500,ie=0,le=0,ce=0,de=0,ue=1/0,ve=.01,me=.01,be=!1,fe={},pe=null,_e={},ge={},ke={},$e=0,ye=0,Ee=r$7.Loop,Se=c$5.Easings.Linear;const Le=new Map;function Me(Ve,...Ne){for(const Pe of Le.get(Ve)||[])Pe(...Ne)}function De(Ve){return ae=0,Ve?pe=setTimeout(()=>{Oe()},Ve):Oe(),ze}function Oe(){ee=i$a.Running,Me("start",_e,ge)}function Re(){if(ee=i$a.Completed,ke={},Me("end",_e),ee===i$a.Completed)if(ne<$e){if(ne++,Ee===r$7.Reverse){const Ve=Object.assign({},fe);fe=Object.assign({},ge),ge=Ve}De(ye)}else ne=0;return ze}const ze={getState:function(){return ee},easing:function(Ve){return re=Ve,te=o$9.Ease,ke={},ze},duration:function(Ve){return oe=Ve,ze},spring:function(Ve={}){te=o$9.Spring;const Ne={velocity:0,mass:1,tension:170,friction:26,restDelta:.1,restSpeed:.1,maxSpeed:1/0,clamp:!0},{velocity:Pe,mass:Be,tension:Ae,friction:xe,restDelta:Ce,restSpeed:Fe,maxSpeed:Ie,clamp:qe}=Object.assign(Object.assign({},Ne),Ve);return ie=Pe,le=Be,ce=Ae,de=xe,me=Ce,ve=Fe,ue=Ie,be=qe,ke={},ze},isRunning:function(){return ee===i$a.Running},isSpring:function(){return te===o$9.Spring},from:function(Ve){return _e=Object.assign({},Ve),ze},to:function(Ve){return ge=Ve,ze},repeat:function(Ve,Ne=0,Pe=r$7.Loop,Be){return $e=Ve,ye=Ne,Ee=Pe,Se=Be||re,ze},on:function(Ve,Ne){var Pe,Be;return Pe=Ve,Be=Ne,Le.set(Pe,[...Le.get(Pe)||[],Be]),ze},off:function(Ve,Ne){var Pe,Be;return Pe=Ve,Be=Ne,Le.has(Pe)&&Le.set(Pe,Le.get(Pe).filter(Ae=>Ae!==Be)),ze},start:function(Ve){return n$9(_e,ge)||(ee=i$a.Initializing,fe=Object.assign({},_e),s$c.add(this),u$7||(u$7=window.requestAnimationFrame(e$7)),De(Ve)),ze},pause:function(){return pe&&(clearTimeout(pe),pe=null),ee===i$a.Running&&(ee=i$a.Paused,Me("pause",_e)),ze},end:Re,tick:function(Ve){Ve>50&&(Ve=50),ae+=Ve;let Ne=0,Pe=!1;if(ee!==i$a.Running)return ze;if(te===o$9.Ease){Ne=t$8(0,ae/oe,1),Pe=Ne===1;const Ae=Ee===r$7.Reverse?Se:re;for(const xe in _e)_e[xe]=fe[xe]+(ge[xe]-fe[xe])*Ae(Ne)}if(te===o$9.Spring){const Ae=.001*Ve;let xe=0;for(const Ce in _e){const Fe=ge[Ce];let Ie=_e[Ce];if(typeof Fe!="number"||isNaN(Fe)||typeof Ie!="number"||isNaN(Ie))continue;if(Math.abs(Fe-Ie)<=me){_e[Ce]=Fe,ke[Ce]=0;continue}ke[Ce]||(typeof ie=="object"&&typeof ie[Ce]=="number"?ke[Ce]=ie[Ce]:ke[Ce]=typeof ie=="number"?ie:0);let qe=ke[Ce];qe=t$8(-1*Math.abs(ue),qe,Math.abs(ue));const Ge=qe*le*de;qe+=((Ie>Fe?-1:1)*(Math.abs(Fe-Ie)*ce)-Ge)/le*Ae,Ie+=qe*Ae;const Ze=_e[Ce]>Fe?Ie<Fe:Ie>Fe;let Xe=Math.abs(qe)<ve&&Math.abs(Fe-Ie)<=me;be&&Ze&&(Xe=!0),Xe?(Ie=Fe,qe=0):xe++,_e[Ce]=Ie,ke[Ce]=qe}Pe=!xe}const Be=Object.assign({},ge);return Me("step",_e,fe,ge,Ne),Pe&&ee===i$a.Running&&n$9(ge,Be)&&(ee=i$a.Completed,Re()),ze},getStartValues:function(){return fe},getCurrentValues:function(){return _e},getCurrentVelocities:function(){return ke},getEndValues:function(){return ge},destroy:function(){ee=i$a.Destroyed,pe&&(clearTimeout(pe),pe=null),fe=_e=ge={},s$c.delete(this)}};return ze}c$5.destroy=()=>{for(const ee of s$c)ee.destroy();u$7&&(cancelAnimationFrame(u$7),u$7=null)},c$5.Easings={Linear:function(ee){return ee},EaseIn:function(ee){return ee===0?0:Math.pow(2,10*ee-10)},EaseOut:function(ee){return ee===1?1:1-Math.pow(2,-10*ee)},EaseInOut:function(ee){return ee===0?0:ee===1?1:ee<.5?Math.pow(2,20*ee-10)/2:(2-Math.pow(2,-20*ee+10))/2}};/*! License details at fancyapps.com/license */function e$6(ee){return typeof TouchEvent<"u"&&ee instanceof TouchEvent}function t$6(ee,te){const ne=[],ae=e$6(ee)?ee[te]:ee instanceof MouseEvent&&(te==="changedTouches"||ee.type!=="mouseup")?[ee]:[];for(const re of ae)ne.push({x:re.clientX,y:re.clientY,ts:Date.now()});return ne}function n$8(ee){return t$6(ee,"touches")}function o$8(ee){return t$6(ee,"targetTouches")}function s$b(ee){return t$6(ee,"changedTouches")}function i$9(ee){const te=ee[0],ne=ee[1]||te;return{x:(te.x+ne.x)/2,y:(te.y+ne.y)/2,ts:ne.ts}}function c$4(ee){const te=ee[0],ne=ee[1]||ee[0];return te&&ne?-1*Math.sqrt((ne.x-te.x)*(ne.x-te.x)+(ne.y-te.y)*(ne.y-te.y)):0}const r$6=ee=>{ee.cancelable&&ee.preventDefault()},a$8={passive:!1},u$6={panThreshold:5,swipeThreshold:3,ignore:["textarea","input","select","[contenteditable]","[data-selectable]","[data-draggable]"]};let l$8=!1,d$4=!0;const f$4=(ee,te)=>{let ne,ae,re,oe=Object.assign(Object.assign({},u$6),te),ie=[],le=[],ce=[],de=!1,ue=!1,ve=!1,me=!1,be=0,fe=0,pe=0,_e=0,ge=0,ke=0,$e=0,ye=0,Ee=0,Se=[],Le=0,Me=0;const De=new Map;function Oe(Ce){const Fe=c$4(le),Ie=c$4(ce),qe=Fe&&Ie?Fe/Ie:0,Ge=Math.abs($e)>Math.abs(ye)?$e:ye,Ze={srcEvent:ne,isPanRecognized:de,isSwipeRecognized:ue,firstTouch:ie,previousTouch:ce,currentTouch:le,deltaX:pe,deltaY:_e,offsetX:ge,offsetY:ke,velocityX:$e,velocityY:ye,velocity:Ge,angle:Ee,axis:re,scale:qe,center:ae};for(const Xe of De.get(Ce)||[])Xe(Ze)}function Re(Ce){const Fe=Date.now();if(Se=Se.filter(Ie=>!Ie.ts||Ie.ts>Fe-100),Ce&&Se.push(Ce),$e=0,ye=0,Se.length>3){const Ie=Se[0],qe=Se[Se.length-1];if(Ie&&qe){const Ge=qe.x-Ie.x,Ze=qe.y-Ie.y,Xe=Ie.ts&&qe.ts?qe.ts-Ie.ts:0;Xe>0&&($e=Math.abs(Ge)>3?Ge/(Xe/30):0,ye=Math.abs(Ze)>3?Ze/(Xe/30):0)}}}function ze(Ce){if(typeof MouseEvent<"u"&&Ce instanceof MouseEvent){if(l$8)return}else l$8=!0;const Fe=Ce.composedPath()[0],Ie=oe.ignore.join(",");if(Fe.matches(Ie)||Fe.closest(Ie))return;if(typeof MouseEvent<"u"&&Ce instanceof MouseEvent){if(!Ce.buttons||Ce.button!==0)return;r$6(Ce)}Ce instanceof MouseEvent&&(window.addEventListener("mousemove",Ve),window.addEventListener("mouseup",Ne)),window.addEventListener("blur",Pe),ne=Ce,le=o$8(Ce),ie=[...le],ce=[],fe=le.length,ae=i$9(le),fe===1&&(de=!1,ue=!1,ve=!1),fe&&Re(i$9(le));const qe=Date.now(),Ge=qe-(be||qe);me=Ge>0&&Ge<=250&&fe===1,be=qe,clearTimeout(Le),Oe("start")}function Ve(Ce){var Fe;if(!ie.length||Ce.defaultPrevented)return;ne=Ce,ce=[...le],le=n$8(Ce);const Ie=i$9(ce),qe=i$9(n$8(Ce));if(Re(qe),fe=le.length,ae=qe,ce.length===le.length?(pe=qe.x-Ie.x,_e=qe.y-Ie.y):(pe=0,_e=0),ie.length){const Ge=i$9(ie);ge=qe.x-Ge.x,ke=qe.y-Ge.y}if(le.length>1){const Ge=c$4(le),Ze=c$4(ce);Math.abs(Ge-Ze)>=.1&&(ve=!0,Oe("pinch"))}de||(de=Math.abs(ge)>oe.panThreshold||Math.abs(ke)>oe.panThreshold,de&&(d$4=!1,clearTimeout(Me),Me=0,Ee=Math.abs(180*Math.atan2(ke,ge)/Math.PI),re=Ee>45&&Ee<135?"y":"x",ie=[...le],ce=[...le],ge=0,ke=0,pe=0,_e=0,(Fe=window.getSelection())===null||Fe===void 0||Fe.removeAllRanges(),Oe("panstart"))),de&&(pe||_e)&&Oe("pan"),Oe("move")}function Ne(Ce){if(ne=Ce,!ie.length)return;const Fe=o$8(Ce),Ie=s$b(Ce);if(fe=Fe.length,ae=i$9(Ie),Ie.length&&Re(i$9(Ie)),ce=[...le],le=[...Fe],ie=[...Fe],fe>0)Oe("end"),de=!1,ue=!1,Se=[];else{const qe=oe.swipeThreshold;(Math.abs($e)>qe||Math.abs(ye)>qe)&&(ue=!0),de&&Oe("panend"),ue&&Oe("swipe"),de||ue||ve||(Oe("tap"),me?Oe("doubleTap"):Le=setTimeout(function(){Oe("singleTap")},250)),Oe("end"),Be()}}function Pe(){clearTimeout(Le),Be(),de&&Oe("panend"),Oe("end")}function Be(){l$8=!1,de=!1,ue=!1,me=!1,fe=0,Se=[],le=[],ce=[],ie=[],pe=0,_e=0,ge=0,ke=0,$e=0,ye=0,Ee=0,re=void 0,window.removeEventListener("mousemove",Ve),window.removeEventListener("mouseup",Ne),window.removeEventListener("blur",Pe),d$4||Me||(Me=setTimeout(()=>{d$4=!0,Me=0},100))}function Ae(Ce){const Fe=Ce.target;l$8=!1,Fe&&!Ce.defaultPrevented&&(d$4||(r$6(Ce),Ce.stopPropagation()))}const xe={init:function(){return ee&&(ee.addEventListener("click",Ae,a$8),ee.addEventListener("mousedown",ze,a$8),ee.addEventListener("touchstart",ze,a$8),ee.addEventListener("touchmove",Ve,a$8),ee.addEventListener("touchend",Ne),ee.addEventListener("touchcancel",Ne)),xe},on:function(Ce,Fe){return function(Ie,qe){De.set(Ie,[...De.get(Ie)||[],qe])}(Ce,Fe),xe},off:function(Ce,Fe){return De.has(Ce)&&De.set(Ce,De.get(Ce).filter(Ie=>Ie!==Fe)),xe},isPointerDown:()=>fe>0,destroy:function(){clearTimeout(Le),clearTimeout(Me),Me=0,ee&&(ee.removeEventListener("click",Ae,a$8),ee.removeEventListener("mousedown",ze,a$8),ee.removeEventListener("touchstart",ze,a$8),ee.removeEventListener("touchmove",Ve,a$8),ee.removeEventListener("touchend",Ne),ee.removeEventListener("touchcancel",Ne)),ee=null,Be()}};return xe};f$4.isClickAllowed=()=>d$4;/*! License details at fancyapps.com/license */const e$5={IMAGE_ERROR:"This image couldn't be loaded. <br /> Please try again later.",MOVE_UP:"Move up",MOVE_DOWN:"Move down",MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",TOGGLE_FULL:"Toggle zoom level",TOGGLE_1TO1:"Toggle zoom level",ITERATE_ZOOM:"Toggle zoom level",ROTATE_CCW:"Rotate counterclockwise",ROTATE_CW:"Rotate clockwise",FLIP_X:"Flip horizontally",FLIP_Y:"Flip vertically",RESET:"Reset",TOGGLE_FS:"Toggle fullscreen"};/*! License details at fancyapps.com/license */const s$a=(ee,te="")=>{ee&&ee.classList&&te.split(" ").forEach(ne=>{ne&&ee.classList.add(ne)})};/*! License details at fancyapps.com/license */const s$9=(ee,te="")=>{ee&&ee.classList&&te.split(" ").forEach(ne=>{ne&&ee.classList.remove(ne)})};/*! License details at fancyapps.com/license */const s$8=(ee,te="",ne)=>{ee&&ee.classList&&te.split(" ").forEach(ae=>{ae&&ee.classList.toggle(ae,ne||!1)})};/*! License details at fancyapps.com/license */const h$6=ee=>{ee.cancelable&&ee.preventDefault()},m$4=(ee,te=1e4)=>(ee=parseFloat(ee+"")||0,Math.round((ee+Number.EPSILON)*te)/te),p$3=ee=>ee instanceof HTMLImageElement;var v$6,b$4;(function(ee){ee.Reset="reset",ee.Zoom="zoom",ee.ZoomIn="zoomIn",ee.ZoomOut="zoomOut",ee.ZoomTo="zoomTo",ee.ToggleCover="toggleCover",ee.ToggleFull="toggleFull",ee.ToggleMax="toggleMax",ee.IterateZoom="iterateZoom",ee.Pan="pan",ee.Swipe="swipe",ee.Move="move",ee.MoveLeft="moveLeft",ee.MoveRight="moveRight",ee.MoveUp="moveUp",ee.MoveDown="moveDown",ee.RotateCCW="rotateCCW",ee.RotateCW="rotateCW",ee.FlipX="flipX",ee.FlipY="flipY",ee.ToggleFS="toggleFS"})(v$6||(v$6={})),function(ee){ee.Cover="cover",ee.Full="full",ee.Max="max"}(b$4||(b$4={}));const y$5={x:0,y:0,scale:1,angle:0,flipX:1,flipY:1},x$2={bounds:!0,classes:{container:"f-panzoom",wrapper:"f-panzoom__wrapper",content:"f-panzoom__content",viewport:"f-panzoom__viewport"},clickAction:v$6.ToggleFull,dblClickAction:!1,gestures:{},height:"auto",l10n:e$5,maxScale:4,minScale:1,mouseMoveFactor:1,panMode:"drag",protected:!1,singleClickAction:!1,spinnerTpl:'<div class="f-spinner"></div>',wheelAction:v$6.Zoom,width:"auto"};let w$6,M$2=0,k$4=0,j$3=0;const E$4=(ee,te={},ne={})=>{let ae,re,oe,ie,le,ce,de,ue,ve=0,me=Object.assign(Object.assign({},x$2),te),be={},fe=Object.assign({},y$5),pe=Object.assign({},y$5);const _e=[];function ge(We){let Ke=me[We];return Ke&&typeof Ke=="function"?Ke(tt):Ke}function ke(){return ee&&ee.parentElement&&ae&&ve===3}const $e=new Map;function ye(We,...Ke){const nt=[...$e.get(We)||[]];me.on&&nt.push(me.on[We]);for(const ht of nt)ht&&ht instanceof Function&&ht(tt,...Ke);We!=="*"&&ye("*",We,...Ke)}function Ee(We){if(!ke())return;const Ke=We.target;if(n$a(Ke))return;const nt=Date.now(),ht=[-We.deltaX||0,-We.deltaY||0,-We.detail||0].reduce(function(Tt,Dt){return Math.abs(Dt)>Math.abs(Tt)?Dt:Tt}),st=t$8(-1,ht,1);ye("wheel",We,st);const ft=ge("wheelAction");if(!ft||We.defaultPrevented)return;const yt=pe.scale;let wt=yt*(st>0?1.5:.5);if(ft===v$6.Zoom){const Tt=Math.abs(We.deltaY)<100&&Math.abs(We.deltaX)<100;if(nt-k$4<(Tt?200:45))return void h$6(We);k$4=nt;const Dt=Ae(),Lt=Ie();if(m$4(wt)<m$4(Dt)&&m$4(yt)<=m$4(Dt)?(j$3+=Math.abs(st),wt=Dt):m$4(wt)>m$4(Lt)&&m$4(yt)>=m$4(Lt)?(j$3+=Math.abs(st),wt=Lt):(j$3=0,wt=t$8(Dt,wt,Lt)),j$3>7)return}switch(h$6(We),ft){case v$6.Pan:Xe(ft,{srcEvent:We,deltaX:2*-We.deltaX,deltaY:2*-We.deltaY});break;case v$6.Zoom:Xe(v$6.ZoomTo,{srcEvent:We,scale:wt,center:{x:We.clientX,y:We.clientY}});break;default:Xe(ft,{srcEvent:We})}}function Se(We){var Ke,nt;const ht=We.composedPath()[0];if(!f$4.isClickAllowed()||!n$b(ht)||We.defaultPrevented||!(ee!=null&&ee.contains(ht))||ht.hasAttribute("disabled")||ht.hasAttribute("aria-disabled"))return;const st=ht.closest("[data-panzoom-action]"),ft=(Ke=st==null?void 0:st.dataset)===null||Ke===void 0?void 0:Ke.panzoomAction,yt=((nt=st==null?void 0:st.dataset)===null||nt===void 0?void 0:nt.panzoomValue)||"";if(ft){switch(h$6(We),ft){case v$6.ZoomTo:case v$6.ZoomIn:case v$6.ZoomOut:Xe(ft,{scale:parseFloat(yt||"")||void 0});break;case v$6.MoveLeft:case v$6.MoveRight:Xe(ft,{deltaX:parseFloat(yt||"")||void 0});break;case v$6.MoveUp:case v$6.MoveDown:Xe(ft,{deltaY:parseFloat(yt||"")||void 0});break;case v$6.ToggleFS:dt();break;default:Xe(ft)}return}if(!(ae!=null&&ae.contains(ht)))return;const wt={srcEvent:We};if(Xe(ge("clickAction"),wt),ge("dblClickAction")){const Tt=Date.now(),Dt=Tt-(M$2||Tt);M$2=Tt,Dt>0&&Dt<=250?(w$6&&(clearTimeout(w$6),w$6=void 0),Xe(ge("dblClickAction"),wt)):w$6=setTimeout(()=>{Xe(ge("singleClickAction"),wt)},250)}}function Le(We){if(ue=We,!ke()||!Ne()||fe.scale<=1||pe.scale<=1||((ae==null?void 0:ae.dataset.animationName)||"").indexOf("zoom")>-1)return;const Ke=Pe(pe.scale);if(!Ke)return;const{x:nt,y:ht}=Ke;Xe(v$6.Pan,{deltaX:nt-pe.x,deltaY:ht-pe.y})}function Me(){var We;ee&&(s$9(ee,"is-loading"),(We=ee.querySelector(".f-spinner"))===null||We===void 0||We.remove())}function De(){if(!ee||!re)return;if(Me(),p$3(re)&&(!re.complete||!re.naturalWidth))return ve=2,ae==null||ae.classList.add("has-error"),void ye("error");ye("loaded");const{width:We,height:Ke}=ze();p$3(re)&&(re.setAttribute("width",We+""),re.setAttribute("height",Ke+"")),ae&&(s$9(ae,"has-error"),p$3(re)&&(ae.setAttribute("width",We+""),ae.setAttribute("height",Ke+""),ae.style.aspectRatio=`${We/Ke||""}`)),ce=c$5().on("start",(ht,st)=>{st.angle!==void 0&&(st.angle=90*Math.round(st.angle/90)),st.flipX!==void 0&&(st.flipX=st.flipX>0?1:-1),st.flipY!==void 0&&(st.flipY=st.flipY>0?1:-1),pe=Object.assign(Object.assign({},y$5),st),Ze(),ye("animationStart")}).on("pause",ht=>{pe=Object.assign(Object.assign({},y$5),ht)}).on("step",ht=>{if(!ke())return void(ce==null||ce.end());if(fe=Object.assign(Object.assign({},y$5),ht),Ne()||!ge("bounds")||je()||pe.scale>fe.scale||pe.scale<xe())return void Ue();const st=qe(pe.scale);let ft=!1,yt=!1,wt=!1,Tt=!1;fe.x<st.x[0]&&(ft=!0),fe.x>st.x[1]&&(yt=!0),fe.y<st.y[0]&&(Tt=!0),fe.y>st.y[1]&&(wt=!0);let Dt=!1,Lt=!1,Gt=!1,Rt=!1;pe.x<st.x[0]&&(Dt=!0),pe.x>st.x[1]&&(Lt=!0),pe.y<st.y[0]&&(Rt=!0),pe.y>st.y[1]&&(Gt=!0);let Xt=!1;(yt&&Lt||ft&&Dt)&&(pe.x=t$8(st.x[0],pe.x,st.x[1]),Xt=!0),(wt&&Gt||Tt&&Rt)&&(pe.y=t$8(st.y[0],pe.y,st.y[1]),Xt=!0),Xt&&ce&&ce.spring({tension:94,friction:17,maxSpeed:555*pe.scale,restDelta:.1,restSpeed:.1,velocity:ce.getCurrentVelocities()}).from(fe).to(pe).start(),Ue()}).on("end",()=>{le!=null&&le.isPointerDown()||Ge(),ce!=null&&ce.isRunning()||(Ze(),ye("animationEnd"))}),function(){const ht=ge("gestures");if(!ht||!ie||!re)return;let st=!1;le=f$4(ie,ht).on("start",ft=>{if(!ge("gestures")||!ce||!ke()||Ne())return;const yt=ft.srcEvent;(fe.scale>1||ft.currentTouch.length>1)&&(yt==null||yt.stopPropagation(),ce.pause(),st=!0),ft.currentTouch.length===1&&ye("touchStart")}).on("move",ft=>{var yt;st&&(pe.scale!==1||ft.currentTouch.length>1)&&(h$6(ft.srcEvent),(yt=ft.srcEvent)===null||yt===void 0||yt.stopPropagation())}).on("pan",ft=>{if(!st)return;const yt=ft.srcEvent;(pe.scale!==1||ft.currentTouch.length>1)&&(h$6(yt),Xe(v$6.Pan,ft))}).on("swipe",ft=>{st&&pe.scale>1&&Xe(v$6.Swipe,ft)}).on("tap",ft=>{ye("click",ft)}).on("singleTap",ft=>{ye("singleClick",ft)}).on("doubleTap",ft=>{ye("dblClick",ft)}).on("pinch",ft=>{st&&(ft.scale>xe()?Xe(v$6.ZoomIn,ft):ft.scale<xe()?Xe(v$6.ZoomOut,ft):Xe(v$6.Pan,ft))}).on("end",ft=>{st&&(ft.currentTouch.length?(ft.srcEvent.stopPropagation(),h$6(ft.srcEvent),ce==null||ce.end()):(st=!1,Ze(),Ge(),ye("touchEnd")))}).init()}(),ie&&(ie.addEventListener("wheel",Ee,{passive:!1}),_e.push(()=>{ie==null||ie.removeEventListener("wheel",Ee,{passive:!1})})),ee==null||ee.addEventListener("click",Se),document==null||document.addEventListener("mousemove",Le),_e.push(()=>{ee==null||ee.removeEventListener("click",Se),document==null||document.removeEventListener("mousemove",Le)});const nt=Oe();fe=Object.assign({},nt),pe=Object.assign({},nt),ve=3,Ue(),Ze(),ye("ready"),requestAnimationFrame(()=>{Me(),ie&&(ie.style.visibility="")})}function Oe(){const We=Object.assign({},ge("startPos")||{});let Ke=We.scale,nt=1;nt=typeof Ke=="string"?Be(Ke):typeof Ke=="number"?Ke:xe();const ht=Object.assign(Object.assign(Object.assign({},y$5),We),{scale:nt}),st=Ne()?Pe(nt):void 0;if(st){const{x:ft,y:yt}=st;ht.x=ft,ht.y=yt}return ht}function Re(){const We={top:0,left:0,width:0,height:0};if(ae){const Ke=ae.getBoundingClientRect();pe.angle%180==90?(We.top=Ke.top+.5*Ke.height-.5*Ke.width,We.left=Ke.left+.5*Ke.width-.5*Ke.height,We.width=Ke.height,We.height=Ke.width):(We.top=Ke.top,We.left=Ke.left,We.width=Ke.width,We.height=Ke.height)}return We}function ze(){let We=ge("width"),Ke=ge("height");if(re&&We==="auto"){const nt=re.getAttribute("width");We=nt?parseFloat(nt+""):re.dataset.width!==void 0?parseFloat(re.dataset.width+""):p$3(ie)?ie.naturalWidth:p$3(re)?re.naturalWidth:(ae==null?void 0:ae.getBoundingClientRect().width)||0}else We=t$9(We)?parseFloat(We):We;if(re&&Ke==="auto"){const nt=re.getAttribute("height");Ke=nt?parseFloat(nt+""):re.dataset.height!==void 0?parseFloat(re.dataset.height+""):p$3(ie)?ie.naturalHeight:p$3(re)?re.naturalHeight:(ae==null?void 0:ae.getBoundingClientRect().height)||0}else Ke=t$9(Ke)?parseFloat(Ke):Ke;return{width:We,height:Ke}}function Ve(){const We=Re();return{width:We.width,height:We.height}}function Ne(){return ge("panMode")==="mousemove"&&matchMedia("(hover: hover)").matches}function Pe(We){const Ke=ue||ge("event"),nt=ae==null?void 0:ae.getBoundingClientRect();if(!Ke||!nt||We<=1)return{x:0,y:0};const ht=(Ke.clientX||0)-nt.left,st=(Ke.clientY||0)-nt.top,{width:ft,height:yt}=Ve(),wt=qe(We);if(We>1){const Rt=ge("mouseMoveFactor");Rt>1&&(We*=Rt)}let Tt=ft*We,Dt=yt*We,Lt=.5*(Tt-ft)-ht/ft*100/100*(Tt-ft),Gt=.5*(Dt-yt)-st/yt*100/100*(Dt-yt);return Lt=t$8(wt.x[0],Lt,wt.x[1]),Gt=t$8(wt.y[0],Gt,wt.y[1]),{x:Lt,y:Gt}}function Be(We="base"){if(!ee)return 1;const Ke=ee.getBoundingClientRect(),nt=Re(),{width:ht,height:st}=ze(),ft=Lt=>{if(typeof Lt=="number")return Lt;switch(Lt){case"min":case"base":return 1;case"cover":return Math.max(Ke.height/nt.height,Ke.width/nt.width)||1;case"full":case"max":{const Gt=pe.angle%180==90?st:ht;return Gt&&nt.width?Gt/nt.width:1}}},yt=ge("minScale"),wt=ge("maxScale"),Tt=Math.min(ft("full"),ft(yt)),Dt=typeof wt=="number"?ft("full")*wt:Math.min(ft("full"),ft(wt));switch(We){case"min":return Tt;case"base":return t$8(Tt,1,Dt);case"cover":return ft("cover");case"full":return Math.min(Dt,ft("full"));case"max":return Dt}}function Ae(){return Be("min")}function xe(){return Be("base")}function Ce(){return Be("cover")}function Fe(){return Be("full")}function Ie(){return Be("max")}function qe(We){const Ke={x:[0,0],y:[0,0]},nt=ee==null?void 0:ee.getBoundingClientRect();if(!nt)return Ke;const ht=Re(),st=nt.width,ft=nt.height;let yt=ht.width,wt=ht.height,Tt=We=We===void 0?pe.scale:We,Dt=We;if(Ne()&&We>1){const Lt=ge("mouseMoveFactor");Lt>1&&(yt*We>st+.01&&(Tt*=Lt),wt*We>ft+.01&&(Dt*=Lt))}return yt*=Tt,wt*=Dt,We>1&&(yt>st&&(Ke.x[0]=.5*(st-yt),Ke.x[1]=.5*(yt-st)),Ke.x[0]-=.5*(ht.left-nt.left),Ke.x[1]-=.5*(ht.left-nt.left),Ke.x[0]-=.5*(ht.left+ht.width-nt.right),Ke.x[1]-=.5*(ht.left+ht.width-nt.right),wt>ft&&(Ke.y[0]=.5*(ft-wt),Ke.y[1]=.5*(wt-ft)),Ke.y[0]-=.5*(ht.top-nt.top),Ke.y[1]-=.5*(ht.top-nt.top),Ke.y[0]-=.5*(ht.top+ht.height-nt.bottom),Ke.y[1]-=.5*(ht.top+ht.height-nt.bottom)),Ke}function Ge(){if(!ke()||!ge("bounds")||!ce)return;const We=Ae(),Ke=Ie(),nt=t$8(We,pe.scale,Ke);if(pe.scale<We-.01||pe.scale>Ke+.01)return void Xe(v$6.ZoomTo,{scale:nt});if(ce.isRunning()||je())return;const ht=qe(nt);pe.x<ht.x[0]||pe.x>ht.x[1]||pe.y<ht.y[0]||pe.y>ht.y[1]?(pe.x=t$8(ht.x[0],pe.x,ht.x[1]),pe.y=t$8(ht.y[0],pe.y,ht.y[1]),ce.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:ce.getCurrentVelocities()}),ce.from(fe).to(pe).start()):Ue()}function Ze(We){var Ke;if(!ke())return;const nt=mt(),ht=je(),st=Qe(),ft=ut(),yt=Je(),wt=lt();s$8(ae,"is-fullsize",ft),s$8(ae,"is-expanded",st),s$8(ae,"is-dragging",ht),s$8(ae,"can-drag",nt),s$8(ae,"will-zoom-in",yt),s$8(ae,"will-zoom-out",wt);const Tt=gt(),Dt=Et(),Lt=it(),Gt=!ke();for(const Rt of((Ke=We||ee)===null||Ke===void 0?void 0:Ke.querySelectorAll("[data-panzoom-action]"))||[]){const Xt=Rt.dataset.panzoomAction;let It=!1;if(Gt)It=!0;else switch(Xt){case v$6.ZoomIn:Tt||(It=!0);break;case v$6.ZoomOut:Lt||(It=!0);break;case v$6.ToggleFull:{Dt||Lt||(It=!0);const et=Rt.querySelector("g");et&&(et.style.display=ft&&!It?"none":"");break}case v$6.IterateZoom:{Tt||Lt||(It=!0);const et=Rt.querySelector("g");et&&(et.style.display=Tt||It?"":"none");break}case v$6.ToggleCover:case v$6.ToggleMax:Tt||Lt||(It=!0)}It?(Rt.setAttribute("aria-disabled",""),Rt.setAttribute("tabindex","-1")):(Rt.removeAttribute("aria-disabled"),Rt.removeAttribute("tabindex"))}}function Xe(We,Ke){var nt;if(!(We&&ee&&re&&ce&&ke())||We===v$6.Swipe&&Math.abs(ce.getCurrentVelocities().scale)>.01)return;const ht=Object.assign({},pe);let st=Object.assign({},pe),ft=qe(Ne()?ht.scale:fe.scale);const yt=ce.getCurrentVelocities(),wt=Re(),Tt=(((nt=(Ke=Ke||{}).currentTouch)===null||nt===void 0?void 0:nt.length)||0)>1,Dt=Ke.velocityX||0,Lt=Ke.velocityY||0;let Gt=Ke.center;Ke.srcEvent&&(Gt=i$9(s$b(Ke.srcEvent)));let Rt=Ke.deltaX||0,Xt=Ke.deltaY||0;switch(We){case v$6.MoveRight:Rt=Ke.deltaX||100;break;case v$6.MoveLeft:Rt=Ke.deltaX||-100;break;case v$6.MoveUp:Xt=Ke.deltaY||-100;break;case v$6.MoveDown:Xt=Ke.deltaY||100}let It=[];switch(We){case v$6.Reset:st=Object.assign({},y$5),st.scale=xe();break;case v$6.Pan:case v$6.Move:case v$6.MoveLeft:case v$6.MoveRight:case v$6.MoveUp:case v$6.MoveDown:if(je()){let bt=1,_t=1;st.x<=ft.x[0]&&Dt<=0&&(bt=Math.max(.01,1-Math.abs(1/wt.width*Math.abs(st.x-ft.x[0]))),bt*=.2),st.x>=ft.x[1]&&Dt>=0&&(bt=Math.max(.01,1-Math.abs(1/wt.width*Math.abs(st.x-ft.x[1]))),bt*=.2),st.y<=ft.y[0]&&Lt<=0&&(_t=Math.max(.01,1-Math.abs(1/wt.height*Math.abs(st.y-ft.y[0]))),_t*=.2),st.y>=ft.y[1]&&Lt>=0&&(_t=Math.max(.01,1-Math.abs(1/wt.height*Math.abs(st.y-ft.y[1]))),_t*=.2),st.x+=Rt*bt,st.y+=Xt*_t}else st.x=t$8(ft.x[0],st.x+Rt,ft.x[1]),st.y=t$8(ft.y[0],st.y+Xt,ft.y[1]);break;case v$6.Swipe:const et=(bt=0)=>Math.sign(bt)*Math.pow(Math.abs(bt),1.5);st.x+=t$8(-1e3,et(Dt),1e3),st.y+=t$8(-1e3,et(Lt),1e3),Lt&&!Dt&&(st.x=t$8(ft.x[0],st.x,ft.x[1])),!Lt&&Dt&&(st.y=t$8(ft.y[0],st.y,ft.y[1])),yt.x=Dt,yt.y=Lt;break;case v$6.ZoomTo:st.scale=Ke.scale||1;break;case v$6.ZoomIn:st.scale=st.scale*(Ke.scale||2),Tt||(st.scale=Math.min(st.scale,Ie()));break;case v$6.ZoomOut:st.scale=st.scale*(Ke.scale||.5),Tt||(st.scale=Math.max(st.scale,Ae()));break;case v$6.ToggleCover:It=[xe(),Ce()];break;case v$6.ToggleFull:It=[xe(),Fe()];break;case v$6.ToggleMax:It=[xe(),Ie()];break;case v$6.IterateZoom:It=[xe(),Fe(),Ie()];break;case v$6.Zoom:const ct=Fe();st.scale>=ct-.05?st.scale=xe():st.scale=Math.min(ct,st.scale*(Ke.scale||2));break;case v$6.RotateCW:st.angle+=90;break;case v$6.RotateCCW:st.angle-=90;break;case v$6.FlipX:st.flipX*=-1;break;case v$6.FlipY:st.flipY*=-1}if(fe.angle!==void 0&&Math.abs(fe.angle)>=360&&(st.angle-=360*Math.floor(fe.angle/360),fe.angle-=360*Math.floor(fe.angle/360)),It.length){const et=It.findIndex(ct=>ct>st.scale+1e-4);st.scale=It[et]||It[0]}if(Tt&&(st.scale=t$8(Ae()*(Tt?.8:1),st.scale,Ie()*(Tt?1.6:1))),Ne()){const et=Pe(st.scale);if(et){const{x:ct,y:bt}=et;st.x=ct,st.y=bt}}else if(Math.abs(st.scale-ht.scale)>1e-4){let et=0,ct=0;if(Gt)et=Gt.x,ct=Gt.y;else{const Nt=ee.getBoundingClientRect();et=Nt.x+.5*Nt.width,ct=Nt.y+.5*Nt.height}let bt=et-wt.left,_t=ct-wt.top;bt-=.5*wt.width,_t-=.5*wt.height;const St=(bt-ht.x)/ht.scale,Ct=(_t-ht.y)/ht.scale;st.x=bt-St*st.scale,st.y=_t-Ct*st.scale,!Tt&&ge("bounds")&&(ft=qe(st.scale),st.x=t$8(ft.x[0],st.x,ft.x[1]),st.y=t$8(ft.y[0],st.y,ft.y[1]))}if(We===v$6.Swipe){let et=94,ct=17,bt=500*st.scale,_t=yt;ce.spring({tension:et,friction:ct,maxSpeed:bt,restDelta:.1,restSpeed:.1,velocity:_t})}else We===v$6.Pan||Tt?ce.spring({tension:900,friction:17,restDelta:.01,restSpeed:.01,maxSpeed:1}):ce.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:yt});if(Ke.velocity===0||n$9(fe,st))fe=Object.assign({},st),pe=Object.assign({},st),ce.end(),Ue(),Ze();else{if(n$9(pe,st))return;ce.from(fe).to(st).start()}ye("action",We)}function Ue(){if(!re||!ae||!ie)return;const{width:We,height:Ke}=ze();Object.assign(ae.style,{maxWidth:`min(${We}px, 100%)`,maxHeight:`min(${Ke}px, 100%)`});const nt=function(){const{width:Rt,height:Xt}=ze(),{width:It,height:et}=Ve();if(!ee)return{x:0,y:0,width:0,height:0,scale:0,flipX:0,flipY:0,angle:0,fitWidth:It,fitHeight:et,fullWidth:Rt,fullHeight:Xt};let{x:ct,y:bt,scale:_t,angle:St,flipX:Ct,flipY:Nt}=fe,rt=1/Fe(),kt=Rt,$t=Xt,Pt=fe.scale*rt,Ft=pe.scale*rt;const Ot=Math.max(It,et),Ht=Math.min(It,et);Rt>Xt?(kt=Ot,$t=Ht):(kt=Ht,$t=Ot),Pt=Rt>Xt?Ot*_t/Rt||1:Ot*_t/Xt||1;let Zt=kt?Rt*Ft:0,an=$t?Xt*Ft:0,rn=kt&&$t?Rt*Pt/Zt:0;return ct=ct+.5*kt-.5*Zt,bt=bt+.5*$t-.5*an,{x:ct,y:bt,width:Zt,height:an,scale:rn,flipX:Ct,flipY:Nt,angle:St,fitWidth:It,fitHeight:et,fullWidth:Rt,fullHeight:Xt}}(),{x:ht,y:st,width:ft,height:yt,scale:wt,angle:Tt,flipX:Dt,flipY:Lt}=nt;let Gt=`translate(${m$4(ht)}px, ${m$4(st)}px)`;Gt+=Dt!==1||Lt!==1?` scaleX(${m$4(wt*Dt)}) scaleY(${m$4(wt*Lt)})`:` scale(${m$4(wt)})`,Tt!==0&&(Gt+=` rotate(${Tt}deg)`),ie.style.width=`${m$4(ft)}px`,ie.style.height=`${m$4(yt)}px`,ie.style.transform=`${Gt}`,ye("render")}function at(){let We=pe.scale;const Ke=ge("clickAction");let nt=xe();if(Ke){let ht=[];switch(Ke){case v$6.ZoomIn:nt=2*We;break;case v$6.ZoomOut:nt=.5*We;break;case v$6.ToggleCover:ht=[xe(),Ce()];break;case v$6.ToggleFull:ht=[xe(),Fe()];break;case v$6.ToggleMax:ht=[xe(),Ie()];break;case v$6.IterateZoom:ht=[xe(),Fe(),Ie()];break;case v$6.Zoom:const st=Fe();nt=We>=st-.05?xe():Math.min(st,2*We)}if(ht.length){const st=ht.findIndex(ft=>ft>We+1e-4);nt=ht[st]||xe()}}return nt=t$8(Ae(),nt,Ie()),nt}function Je(){return!!(ke()&&at()>pe.scale)}function lt(){return!!(ke()&&at()<pe.scale)}function it(){return!!(ke()&&pe.scale>Ae())}function gt(){return!!(ke()&&pe.scale<Ie())}function Et(){return!!(ke()&&pe.scale<Fe())}function mt(){return!(!(ke()&&Qe()&&le)||Ne())}function je(){return!(!ke()||!(le!=null&&le.isPointerDown())||Ne())}function Qe(){return!!(ke()&&pe.scale>xe())}function ut(){return!!(ke()&&pe.scale>=Fe())}function dt(){const We="in-fullscreen",Ke="with-panzoom-in-fullscreen";ee==null||ee.classList.toggle(We);const nt=ee==null?void 0:ee.classList.contains(We);nt?(document.documentElement.classList.add(Ke),document.addEventListener("keydown",pt,!0)):(document.documentElement.classList.remove(Ke),document.removeEventListener("keydown",pt,!0)),Ue(),ye(nt?"enterFS":"exitFS")}function pt(We){We.key!=="Escape"||We.defaultPrevented||dt()}const tt={canDrag:mt,canZoomIn:gt,canZoomOut:it,canZoomToFull:Et,destroy:function(){ye("destroy");for(const We of Object.values(be))We==null||We.destroy(tt);for(const We of _e)We();return ae&&(ae.style.aspectRatio="",ae.style.maxWidth="",ae.style.maxHeight=""),ie&&(ie.style.width="",ie.style.height="",ie.style.transform=""),ae=void 0,re=void 0,ie=void 0,fe=Object.assign({},y$5),pe=Object.assign({},y$5),ce==null||ce.destroy(),ce=void 0,le==null||le.destroy(),le=void 0,ve=4,tt},emit:ye,execute:Xe,getBoundaries:qe,getContainer:function(){return ee},getContent:function(){return re},getFullDim:ze,getGestures:function(){return le},getMousemovePos:Pe,getOptions:function(){return me},getPlugins:function(){return be},getScale:Be,getStartPosition:Oe,getState:function(){return ve},getTransform:function(We){return We===!0?pe:fe},getTween:function(){return ce},getViewport:function(){return ie},getWrapper:function(){return ae},init:function(){return ve=0,ye("init"),function(){for(const[We,Ke]of Object.entries(Object.assign(Object.assign({},ne),me.plugins||{})))if(We&&!be[We]&&Ke instanceof Function){const nt=Ke();nt.init(tt),be[We]=nt}ye("initPlugins")}(),function(){const We=Object.assign(Object.assign({},x$2.classes),ge("classes"));if(ee&&(s$a(ee,We.container),re=ee.querySelector("."+We.content),!!re)){if(re.setAttribute("draggable","false"),ae=ee.querySelector("."+We.wrapper),ae||(ae=document.createElement("div"),s$a(ae,We.wrapper),re.insertAdjacentElement("beforebegin",ae),ae.insertAdjacentElement("afterbegin",re)),ie=ee.querySelector("."+We.viewport),ie||(ie=document.createElement("div"),s$a(ie,We.viewport),ie.insertAdjacentElement("afterbegin",re),ae.insertAdjacentElement("beforeend",ie)),oe=re.cloneNode(!0),oe.removeAttribute("id"),ae.insertAdjacentElement("afterbegin",oe),re instanceof HTMLPictureElement&&(re=re.querySelector("img")),oe instanceof HTMLPictureElement&&(oe=oe.querySelector("img")),ie instanceof HTMLPictureElement&&(ie=ie.querySelector("img")),ie&&(ie.style.visibility="hidden",ge("protected"))){ie.addEventListener("contextmenu",nt=>{h$6(nt)});const Ke=document.createElement("div");s$a(Ke,"f-panzoom__protected"),ie.appendChild(Ke)}ye("initLayout")}}(),function(){if(ee&&ae&&!de){let We=null;de=new ResizeObserver(()=>{ke()&&(We=We||requestAnimationFrame(()=>{ke()&&(Ze(),Ge(),ye("refresh")),We=null}))}),de.observe(ae),_e.push(()=>{de==null||de.disconnect(),de=void 0,We&&(cancelAnimationFrame(We),We=null)})}}(),function(){if(!ee||!re)return;if(!p$3(re)||!p$3(oe))return void De();const We=()=>{re&&p$3(re)&&re.decode().then(()=>{De()}).catch(()=>{De()})};if(ve=1,ee.classList.add("is-loading"),ye("loading"),oe.src&&oe.complete)return void We();(function(){if(!ee||ee!=null&&ee.querySelector(".f-spinner"))return;const Ke=ge("spinnerTpl"),nt=e$9(Ke);nt&&(nt.classList.add("f-spinner"),ee.classList.add("is-loading"),ae==null||ae.insertAdjacentElement("afterbegin",nt))})(),oe.addEventListener("load",We,!1),oe.addEventListener("error",We,!1),_e.push(()=>{oe==null||oe.removeEventListener("load",We,!1),oe==null||oe.removeEventListener("error",We,!1)})}(),tt},isDragging:je,isExpanded:Qe,isFullsize:ut,isMousemoveMode:Ne,localize:function(We,Ke=[]){const nt=ge("l10n")||{};We=String(We).replace(/\{\{(\w+)\}\}/g,(ht,st)=>nt[st]||ht);for(let ht=0;ht<Ke.length;ht++)We=We.split(Ke[ht][0]).join(Ke[ht][1]);return We=We.replace(/\{\{(.*?)\}\}/g,(ht,st)=>st)},off:function(We,Ke){for(const nt of We instanceof Array?We:[We])$e.has(nt)&&$e.set(nt,$e.get(nt).filter(ht=>ht!==Ke));return tt},on:function(We,Ke){for(const nt of We instanceof Array?We:[We])$e.set(nt,[...$e.get(nt)||[],Ke]);return tt},toggleFS:dt,updateControls:Ze,version:"6.1.3",willZoomIn:Je,willZoomOut:lt};return tt};E$4.l10n={en_EN:e$5},E$4.getDefaults=()=>x$2;/*! License details at fancyapps.com/license */const e$4=(ee,te)=>{let ne=[];return ee.childNodes.forEach(ae=>{ae.nodeType!==Node.ELEMENT_NODE||te&&!ae.matches(te)||ne.push(ae)}),ne};/*! License details at fancyapps.com/license */const r$5=(ee,...te)=>{const ne=te.length;for(let ae=0;ae<ne;ae++){const re=te[ae]||{};Object.entries(re).forEach(([oe,ie])=>{const le=Array.isArray(ie)?[]:{};ee[oe]||Object.assign(ee,{[oe]:le}),t$7(ie)?Object.assign(ee[oe],r$5(ee[oe],ie)):Array.isArray(ie)?Object.assign(ee,{[oe]:[...ie]}):Object.assign(ee,{[oe]:ie})})}return ee};/*! License details at fancyapps.com/license */const t$5=function(ee=0,te=0,ne=0,ae=0,re=0,oe=!1){const ie=(ee-te)/(ne-te)*(re-ae)+ae;return oe?ae<re?t$8(ae,ie,re):t$8(re,ie,ae):ie};/*! License details at fancyapps.com/license */const o$7=Object.assign(Object.assign({},e$5),{ERROR:"Something went wrong. <br /> Please try again later.",NEXT:"Next page",PREV:"Previous page",GOTO:"Go to page #%d",DOWNLOAD:"Download",TOGGLE_FULLSCREEN:"Toggle full-screen mode",TOGGLE_EXPAND:"Toggle full-size mode",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_AUTOPLAY:"Toggle slideshow"});/*! License details at fancyapps.com/license */const m$3=ee=>{ee.cancelable&&ee.preventDefault()},h$5={adaptiveHeight:!1,center:!0,classes:{container:"f-carousel",isEnabled:"is-enabled",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",hasAdaptiveHeight:"has-adaptive-height",viewport:"f-carousel__viewport",slide:"f-carousel__slide",isSelected:"is-selected"},dragFree:!1,enabled:!0,errorTpl:'<div class="f-html">{{ERROR}}</div>',fill:!1,infinite:!0,initialPage:0,l10n:o$7,rtl:!1,slides:[],slidesPerPage:"auto",spinnerTpl:'<div class="f-spinner"></div>',transition:"fade",tween:{clamp:!0,mass:1,tension:160,friction:25,restDelta:1,restSpeed:1,velocity:0},vertical:!1};let b$3,y$4=0;const E$3=(ee,te={},ne={})=>{y$4++;let ae,re,oe,ie,le,ce=0,de=Object.assign({},h$5),ue=Object.assign({},h$5),ve={},me=null,be=null,fe=!1,pe=!1,_e=!1,ge=!1,ke="height",$e=0,ye=!0,Ee=0,Se=0,Le=0,Me=0,De="*",Oe=[],Re=[];const ze=new Set;let Ve=[],Ne=[],Pe=0,Be=0,Ae=0;function xe(et,...ct){let bt=ue[et];return bt&&bt instanceof Function?bt(It,...ct):bt}function Ce(et,ct=[]){const bt=xe("l10n")||{};et=String(et).replace(/\{\{(\w+)\}\}/g,(_t,St)=>bt[St]||_t);for(let _t=0;_t<ct.length;_t++)et=et.split(ct[_t][0]).join(ct[_t][1]);return et=et.replace(/\{\{(.*?)\}\}/g,(_t,St)=>St)}const Fe=new Map;function Ie(et,...ct){const bt=[...Fe.get(et)||[]];ue.on&&bt.push(ue.on[et]);for(const _t of bt)_t&&_t instanceof Function&&_t(It,...ct);et!=="*"&&Ie("*",et,...ct)}function qe(){var et,ct;const bt=r$5({},h$5,de);r$5(bt,h$5,de);let _t="";const St=de.breakpoints||{};if(St)for(const[Ct,Nt]of Object.entries(St))window.matchMedia(Ct).matches&&(_t+=Ct,r$5(bt,Nt));if(le===void 0||_t!==le){if(le=_t,ce!==0){let Ct=(ct=(et=Ne[Ee])===null||et===void 0?void 0:et.slides[0])===null||ct===void 0?void 0:ct.index;Ct===void 0&&(Ct=ue.initialSlide),bt.initialSlide=Ct,bt.slides=[];for(const Nt of Oe)Nt.isVirtual&&bt.slides.push(Nt)}Gt(),ue=bt,xe("enabled")!==!1&&(ce=0,Ie("init"),function(){for(const[Ct,Nt]of Object.entries(Object.assign(Object.assign({},ne),ue.plugins||{})))if(Ct&&!ve[Ct]&&Nt instanceof Function){const rt=Nt();rt.init(It,E$3),ve[Ct]=rt}Ie("initPlugins")}(),function(){if(!me)return;const Ct=xe("classes")||{};s$a(me,Ct.container);const Nt=xe("style");if(Nt&&t$7(Nt))for(const[rt,kt]of Object.entries(Nt))me.style.setProperty(rt,kt);be=me.querySelector(`.${Ct.viewport}`),be||(be=document.createElement("div"),s$a(be,Ct.viewport),be.append(...e$4(me,`.${Ct.slide}`)),me.insertAdjacentElement("afterbegin",be)),me.carousel=It,Ie("initLayout")}(),function(){if(!be)return;const Ct=xe("classes")||{};Oe=[],[...e$4(be,`.${Ct.slide}`)].forEach(Nt=>{if(Nt.parentElement){const rt=Qe(Object.assign({el:Nt,isVirtual:!1},Nt.dataset||{}));Ie("createSlide",rt),Oe.push(rt)}}),tt();for(const Nt of Oe)Ie("addSlide",Nt);je(xe("slides"));for(const Nt of Oe){const rt=Nt.el;(rt==null?void 0:rt.parentElement)===be&&(s$a(rt,ue.classes.slide),s$a(rt,Nt.class),wt(Nt),Ie("attachSlideEl",Nt))}Ie("initSlides")}(),We(),ce=1,s$a(me,(xe("classes")||{}).isEnabled||""),Lt(),at(),re=c$5().on("start",()=>{ae&&ae.isPointerDown()||(Ue(),Lt())}).on("step",Ct=>{const Nt=$e;$e=Ct.pos,$e!==Nt&&(ye=!1,Lt())}).on("end",Ct=>{ae!=null&&ae.isPointerDown()||($e=Ct.pos,re&&!pe&&($e<Le||$e>Me)?re.spring({clamp:!0,mass:1,tension:200,friction:25,velocity:0,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:t$8(Le,$e,Me)}).start():ye||(ye=!0,Ie("settle")))}),Ze(),function(){if(!me||!be)return;me.addEventListener("click",st,{passive:!1}),document.addEventListener("mousemove",Ge);const Ct=be.getBoundingClientRect();if(Pe=Ct.height,Be=Ct.width,!oe){let Nt=null;oe=new ResizeObserver(()=>{Nt||(Nt=requestAnimationFrame(()=>{(function(){if(ce!==1||!be)return;const rt=Ne.length,kt=be.getBoundingClientRect(),$t=kt.height,Pt=kt.width;rt>1&&(ge&&Math.abs($t-Pe)<.5||!ge&&Math.abs(Pt-Be)<.5)||(We(),Ze(),Pe=$t,Be=Pt,ge&&!$t||!ge&&!Pt||me&&be&&(rt===Ne.length&&(ae!=null&&ae.isPointerDown())||(xe("dragFree")&&(pe||$e>Le&&$e<Me)?(Ue(),Lt()):Tt(Ee,{transition:!1}))))})(),Nt=null}))}),oe.observe(be)}}(),Ie("ready"))}}function Ge(et){b$3=et}function Ze(){xe("gestures")===!1?ae&&(ae.destroy(),ae=void 0):ae||function(){const et=xe("gestures");!ae&&et!==!1&&be&&(ae=f$4(be,et).on("start",ct=>{var bt,_t;if(!re)return;const{srcEvent:St}=ct;ge&&e$6(St)&&!n$a(St.target)&&m$3(St),re.pause(),re.getCurrentVelocities().pos=0;const Ct=(bt=Ne[Ee])===null||bt===void 0?void 0:bt.slides[0];Ct&&ze.has(Ct.index)&&Ct.el&&($e=Ct.offset||0,$e+=(function(Nt){const rt=window.getComputedStyle(Nt),kt=new DOMMatrixReadOnly(rt.transform);return{width:kt.m41||0,height:kt.m42||0}}(Ct.el)[ke]||0)*(_e&&!ge?1:-1)),nt(),pe||($e<Le||$e>Me)&&re.spring({clamp:!0,mass:1,tension:500,friction:25,velocity:((_t=re.getCurrentVelocities())===null||_t===void 0?void 0:_t.pos)||0,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:t$8(Le,$e,Me)}).start()}).on("move",ct=>{var bt,_t;const{srcEvent:St,axis:Ct}=ct,Nt=St.target;if(Ct||(m$3(St),St.stopPropagation(),St.stopImmediatePropagation()),(Ct==="y"&&ge||Ct==="x"&&!ge)&&(m$3(St),St.stopPropagation()),!Ct)return;const{deltaX:rt,deltaY:kt}=ct;if(!re||e$6(St)&&((bt=St.touches)===null||bt===void 0?void 0:bt.length)>1||Ct==="y"&&!ge||Ct==="x"&&ge||Nt&&n$a(Nt)&&(Ct!=="x"||ge))return;const $t=_e&&!ge?1:-1;let Pt=ge?kt:rt,Ft=re!=null&&re.isRunning()?re.getEndValues().pos:$e,Ot=1;pe||(Ft<=Le&&Pt*$t<0?(Ot=Math.max(.01,1-(Math.abs(1/gt()*Math.abs(Ft-Le))||0)),Ot*=.2):Ft>=Me&&Pt*$t>0&&(Ot=Math.max(.01,1-(Math.abs(1/gt()*Math.abs(Ft-Me))||0)),Ot*=.2)),Ft+=Pt*Ot*$t,re.spring({clamp:!0,mass:1,tension:700,friction:25,velocity:((_t=re.getCurrentVelocities())===null||_t===void 0?void 0:_t.pos)||0,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:Ft}).start()}).on("panstart",ct=>{(ct==null?void 0:ct.axis)===(ge?"y":"x")&&s$a(be,"is-dragging")}).on("panend",()=>{s$9(be,"is-dragging")}).on("end",ct=>{var bt,_t;const{srcEvent:St,axis:Ct,velocityX:Nt,velocityY:rt,currentTouch:kt}=ct;if(kt.length>0||!re)return;const $t=St.target,Pt=$t&&n$a($t)&&!(Ct==="x"&&!ge);ge&&e$6(St)&&!ct.axis&&st(St);const Ft=Ne.length,Ot=xe("dragFree");if(!Ft)return;const Ht=xe("vertical")?rt:Nt;let Zt=re!=null&&re.isRunning()?re.getEndValues().pos:$e;const an=_e&&!ge?1:-1;if(Pt||(Zt+=Ht*(Ot?5:1)*an),!pe&&(Ht*an<=0&&Zt<Le||Ht*an>=0&&Zt>Me)){let on=0;return Math.abs(Ht)>0&&(on=2*Math.abs(Ht),on=Math.min(.3*gt(),on)),Zt=t$8(Le+-1*on,Zt,Me+on),void re.spring({clamp:!0,mass:1,tension:380,friction:25,velocity:-1*Ht,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:Zt}).start()}if(Ot||!((bt=ve.Autoscroll)===null||bt===void 0)&&bt.isEnabled())return void(Math.abs(Ht)>10?re.spring({clamp:!0,mass:1,tension:150,friction:25,velocity:-1*Ht,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:Zt}).start():re.isRunning()||ye||(ye=!0,Ie("settle")));if(!Ot&&!(!((_t=ve.Autoscroll)===null||_t===void 0)&&_t.isEnabled())&&(!ct.offsetX&&!ct.offsetY||Ct==="y"&&!ge||Ct==="x"&&ge))return void Tt(Ee,{transition:"tween"});let rn=lt(Zt);Math.abs(Ht)>10&&rn===Ee&&(rn+=Ht>0?_e&&!ge?1:-1:_e&&!ge?-1:1),Tt(rn,{transition:"tween",tween:{velocity:-1*Ht}})}).init())}(),s$8(be,"is-draggable",!!ae&&Ne.length>0)}function Xe(et="*"){var ct;const bt=[];for(const _t of Oe)(et==="*"||_t.class&&_t.class.includes(et)||_t.el&&(!((ct=_t.el)===null||ct===void 0)&&ct.classList.contains(et)))&&bt.push(_t);ie=void 0,De=et,Re=[...bt]}function Ue(){if(!re)return;const et=lt(re!=null&&re.isRunning()?re.getEndValues().pos:$e);et!==Ee&&(ie=Ee,Ee=et,wt(),at(),Je(),Ie("change",Ee,ie))}function at(){var et,ct;if(!me)return;for(const St of me.querySelectorAll("[data-carousel-index]"))St.innerHTML=Ee+"";for(const St of me.querySelectorAll("[data-carousel-page]"))St.innerHTML=Ee+1+"";for(const St of me.querySelectorAll("[data-carousel-pages]"))St.innerHTML=Ne.length+"";for(const St of me.querySelectorAll("[data-carousel-go-to]"))parseInt(((et=St.dataset)===null||et===void 0?void 0:et.carouselGoTo)||"-1",10)===Ee?St.setAttribute("aria-current","true"):St.removeAttribute("aria-current");for(const St of me.querySelectorAll("[data-carousel-go-prev]"))St.toggleAttribute("aria-disabled",!Rt()),Rt()?St.removeAttribute("tabindex"):St.setAttribute("tabindex","-1");for(const St of me.querySelectorAll("[data-carousel-go-next]"))St.toggleAttribute("aria-disabled",!Xt()),Xt()?St.removeAttribute("tabindex"):St.setAttribute("tabindex","-1");let bt=!1;const _t=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0];_t&&(_t.downloadSrc||_t.type==="image"&&_t.src)&&(bt=!0);for(const St of me.querySelectorAll("[data-carousel-download]"))St.toggleAttribute("aria-disabled",!bt)}function Je(et){var ct;et||(et=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0]);const bt=et==null?void 0:et.el;if(bt)for(const _t of bt.querySelectorAll("[data-slide-index]"))_t.innerHTML=et.index+1+""}function lt(et){var ct,bt,_t;if(!Ne.length)return 0;const St=Et();let Ct=et;pe?Ct-=Math.floor((et-((ct=Ne[0])===null||ct===void 0?void 0:ct.pos))/St)*St||0:Ct=t$8((bt=Ne[0])===null||bt===void 0?void 0:bt.pos,et,(_t=Ne[Ne.length-1])===null||_t===void 0?void 0:_t.pos);const Nt=new Map;let rt=0;for(const $t of Ne){const Pt=Math.abs($t.pos-Ct),Ft=Math.abs($t.pos-Ct-St),Ot=Math.abs($t.pos-Ct+St),Ht=Math.min(Pt,Ft,Ot);Nt.set(rt,Ht),rt++}const kt=Nt.size>0?[...Nt.entries()].reduce(($t,Pt)=>Pt[1]<$t[1]?Pt:$t):[Ee,0];return parseInt(kt[0])}function it(){return Ae}function gt(){let et=0;return be&&(be.childElementCount||(be.style.display="grid"),et=be.getBoundingClientRect()[ke]||0,be.style.display=""),et}function Et(et=!0){return Re.length?Re.reduce((ct,bt)=>ct+bt.dim,0)+(Re.length-(pe&&et?0:1))*Ae:0}function mt(et){const ct=Et(),bt=gt();if(!ct||!be||!bt)return[];const _t=[];et=et===void 0?$e:et,pe&&(et-=Math.floor(et/ct)*ct||0);let St=0,Ct=0;if(fe){const rt=be.getBoundingClientRect();St=Math.abs(rt[ge?"top":"left"]),Ct=Math.abs(window[ge?"innerHeight":"innerWidth"]-rt[ge?"bottom":"right"])}let Nt=0;for(let rt of Re){const kt=($t=0)=>{_t.indexOf(rt)>-1||(rt.pos=Nt-et+$t||0,rt.offset+$t>et-rt.dim-St+.51&&rt.offset+$t<et+bt+Ct-.51&&_t.push(rt))};rt.offset=Nt,pe&&(kt(ct),kt(-1*ct)),kt(),Nt+=rt.dim+Ae}return _t}function je(et,ct){const bt=[];for(const _t of Array.isArray(et)?et:[et]){const St=Qe(Object.assign(Object.assign({},_t),{isVirtual:!0}));St.el||(St.el=document.createElement("div")),Ie("createSlide",St),bt.push(St)}Oe.splice(ct===void 0?Oe.length:ct,0,...bt),tt();for(const _t of bt)Ie("addSlide",_t),ut(_t);return Xe(De),bt}function Qe(et){return(t$9(et)||et instanceof HTMLElement)&&(et={html:et}),Object.assign({index:-1,el:void 0,class:"",isVirtual:!0,dim:0,pos:0,offset:0,html:"",src:""},et)}function ut(et){let ct=et.el;if(!et||!ct)return;const bt=et.html?et.html instanceof HTMLElement?et.html:e$9(et.html):void 0;bt&&(s$a(bt,"f-html"),et.htmlEl=bt,s$a(ct,"has-html"),ct.append(bt),Ie("contentReady",et))}function dt(et){if(!be||!et)return;let ct=et.el;if(ct){if(ct.setAttribute("index",et.index+""),ct.parentElement!==be){let bt;s$a(ct,ue.classes.slide),s$a(ct,et.class),wt(et);for(const _t of Oe)if(_t.index>et.index){bt=_t.el;break}be.insertBefore(ct,bt&&be.contains(bt)?bt:null),Ie("attachSlideEl",et)}return Je(et),ct}}function pt(et){const ct=et==null?void 0:et.el;ct&&(ct.remove(),Ke(ct),Ie("detachSlideEl",et))}function tt(){for(let et=0;et<Oe.length;et++){const ct=Oe[et],bt=ct.el;bt&&(ct.index!==et&&Ke(bt),bt.setAttribute("index",`${et}`)),ct.index=et}}function We(){var et,ct,bt,_t,St;if(!me||!be)return;_e=xe("rtl"),ge=xe("vertical"),ke=ge?"height":"width";const Ct=xe("classes");if(s$8(me,Ct.isLTR,!_e),s$8(me,Ct.isRTL,_e),s$8(me,Ct.isHorizontal,!ge),s$8(me,Ct.isVertical,ge),s$8(me,Ct.hasAdaptiveHeight,xe("adaptiveHeight")),!gt())return;const Nt=window.getComputedStyle(be);fe=Nt.getPropertyValue("overflow-"+(ge?"y":"x"))==="visible",Ae=be&&parseFloat(Nt.getPropertyValue("--f-carousel-gap"))||0;const rt=function(){let kt=0;if(be){let $t=document.createElement("div");$t.style.display="block",s$a($t,ue.classes.slide),be.appendChild($t),kt=$t.getBoundingClientRect()[ke],$t.remove(),$t=void 0}return kt}();for(const kt of Re){const $t=kt.el;let Pt=0;if(!kt.isVirtual&&$t&&n$b($t)){let Ft=!1;$t.parentElement&&$t.parentElement===be||(be.appendChild($t),Ft=!0),Pt=$t.getBoundingClientRect()[ke],Ft&&((et=$t.parentElement)===null||et===void 0||et.removeChild($t))}else Pt=rt;kt.dim=Pt}if(pe=!1,xe("infinite")){pe=!0;const kt=Et();let $t=gt();if(fe){const Pt=be.getBoundingClientRect();$t+=Pt.left,$t+=Pt.right-Pt.width}for(let Pt=0;Pt<Re.length;Pt++){const Ft=((ct=Re[Pt])===null||ct===void 0?void 0:ct.dim)+Ae;if(kt-Ft<$t&&kt-Ft-$t<Ft){pe=!1;break}}}(function(){var kt;if(!me)return;const $t=gt(),Pt=Et(!1);let Ft=xe("slidesPerPage");Ft=Ft==="auto"?1/0:parseFloat(Ft+""),Ne=[];let Ot=0,Ht=0;for(const Bt of Re)(!Ne.length||Ot+Bt.dim-$t>.05||Ht>=Ft)&&(Ne.push({index:Ne.length,slides:[],dim:0,offset:0,pos:0}),Ot=0,Ht=0),(kt=Ne[Ne.length-1])===null||kt===void 0||kt.slides.push(Bt),Ot+=Bt.dim+Ae,Ht++;const Zt=xe("center"),an=xe("fill");let rn=0;for(const Bt of Ne){Bt.dim=(Bt.slides.length-1)*Ae;for(const Mt of Bt.slides)Bt.dim+=Mt.dim;Bt.offset=rn,Bt.pos=rn,Zt!==!1&&(Bt.pos-=.5*($t-Bt.dim)),an&&!pe&&Pt>$t&&(Bt.pos=t$8(0,Bt.pos,Pt-$t)),rn+=Bt.dim+Ae}const on=[];let Vt;for(const Bt of Ne){const Mt=Object.assign({},Bt);Vt&&Math.abs(Mt.pos-Vt.pos)<.1?(Vt.dim+=Mt.dim,Vt.slides=[...Vt.slides,...Mt.slides]):(Vt=Mt,Mt.index=on.length,on.push(Mt))}Ne=on,Ee=t$8(0,Ee,Ne.length-1)})(),Le=((bt=Ne[0])===null||bt===void 0?void 0:bt.pos)||0,Me=((_t=Ne[Ne.length-1])===null||_t===void 0?void 0:_t.pos)||0,ce===0?function(){var kt;ie=void 0,Ee=xe("initialPage");const $t=xe("initialSlide")||void 0;$t!==void 0&&(Ee=It.getPageIndex($t)||0),Ee=t$8(0,Ee,Ne.length-1),$e=((kt=Ne[Ee])===null||kt===void 0?void 0:kt.pos)||0,Se=$e}():Se=((St=Ne[Ee||0])===null||St===void 0?void 0:St.pos)||0,Ie("refresh"),at()}function Ke(et){if(!et||!n$b(et))return;const ct=parseInt(et.getAttribute("index")||"-1");let bt="";for(const St of Array.from(et.classList)){const Ct=St.match(/^f-(\w+)(Out|In)$/);Ct&&Ct[1]&&(bt=Ct[1]+"")}if(!et||!bt)return;const _t=[`f-${bt}Out`,`f-${bt}In`,"to-prev","to-next","from-prev","from-next"];et.removeEventListener("animationend",ht),s$9(et,_t.join(" ")),ze.delete(ct)}function nt(){if(!be)return;const et=ze.size>0;for(const ct of Re)Ke(ct.el);ze.clear(),et&&Lt()}function ht(et){var ct;((ct=et.animationName)===null||ct===void 0?void 0:ct.substring(0,2))==="f-"&&(Ke(et.target),ze.size||(s$9(me,"in-transition"),!ye&&Math.abs(It.getPosition(!0)-Se)<.5&&(ye=!0,Ie("settle"))),Lt())}function st(et){var ct;if(et.defaultPrevented)return;const bt=et.composedPath()[0];if(bt.closest("[data-carousel-go-prev]"))return m$3(et),void It.prev();if(bt.closest("[data-carousel-go-next]"))return m$3(et),void It.next();const _t=bt.closest("[data-carousel-go-to]");if(_t)return m$3(et),void It.goTo(parseFloat(_t.dataset.carouselGoTo||"")||0);if(bt.closest("[data-carousel-download]")){m$3(et);const St=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0];if(St&&(St.downloadSrc||St.type==="image"&&St.src)){const Ct=St.downloadFilename,Nt=document.createElement("a"),rt=St.downloadSrc||St.src||"";Nt.href=rt,Nt.target="_blank",Nt.download=Ct||rt,Nt.click()}}else Ie("click",et)}function ft(et){var ct;const bt=et.el;bt&&((ct=bt.querySelector(".f-spinner"))===null||ct===void 0||ct.remove())}function yt(et){var ct;const bt=et.el;bt&&((ct=bt.querySelector(".f-html.is-error"))===null||ct===void 0||ct.remove(),s$9(bt,"has-error"))}function wt(et){var ct;et||(et=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0]);const bt=et==null?void 0:et.el;if(!bt)return;let _t=xe("formatCaption",et);_t===void 0&&(_t=et.caption),_t=_t||"";const St=xe("captionEl");if(St&&St instanceof HTMLElement){if(et.index!==Ee)return;if(t$9(_t)&&(St.innerHTML=Ce(_t+"")),_t instanceof HTMLElement){if(_t.parentElement===St)return;St.innerHTML="",_t.parentElement&&(_t=_t.cloneNode(!0)),St.append(_t)}return}if(!_t)return;let Ct=et.captionEl||bt.querySelector(".f-caption");!Ct&&_t instanceof HTMLElement&&_t.classList.contains("f-caption")&&(Ct=_t),Ct||(Ct=document.createElement("div"),s$a(Ct,"f-caption"),t$9(_t)?Ct.innerHTML=Ce(_t+""):_t instanceof HTMLElement&&(_t.parentElement&&(_t=_t.cloneNode(!0)),Ct.append(_t)));const Nt=`f-caption-${y$4}_${et.index}`;Ct.setAttribute("id",Nt),Ct.dataset.selectable="true",s$a(bt,"has-caption"),bt.setAttribute("aria-labelledby",Nt),et.captionEl=Ct,bt.insertAdjacentElement("beforeend",Ct)}function Tt(et,ct={}){var bt,_t;let{transition:St,tween:Ct}=Object.assign({transition:ue.transition,tween:ue.tween},ct||{});if(!me||!re)return;const Nt=Ne.length;if(!Nt||function($t,Pt){var Ft,Ot,Ht,Zt;if(!(me&&re&&Pt&&t$9(Pt)&&Pt!=="tween")||((Ft=Ne[Ee])===null||Ft===void 0?void 0:Ft.slides.length)>1)return!1;const an=Ne.length;let rn=$t>Ee?1:-1;$t=pe?($t%an+an)%an:t$8(0,$t,an-1),_e&&(rn*=-1);const on=(Ot=Ne[Ee])===null||Ot===void 0?void 0:Ot.slides[0],Vt=on==null?void 0:on.index,Bt=(Ht=Ne[$t])===null||Ht===void 0?void 0:Ht.slides[0],Mt=Bt==null?void 0:Bt.index,Jt=(Zt=Ne[$t])===null||Zt===void 0?void 0:Zt.pos;if(Mt===void 0||Vt===void 0||Vt===Mt||$e===Jt||Math.abs(gt()-((Bt==null?void 0:Bt.dim)||0))>1)return!1;ye=!1,re.pause(),nt(),s$a(me,"in-transition"),$e=Se=Jt;const Yt=dt(on),sn=dt(Bt);return Ue(),Yt&&(ze.add(Vt),Yt.style.transform="",Yt.addEventListener("animationend",ht),s$9(Yt,ue.classes.isSelected),Yt.inert=!1,s$a(Yt,`f-${Pt}Out to-${rn>0?"next":"prev"}`)),sn&&(ze.add(Mt),sn.style.transform="",sn.addEventListener("animationend",ht),s$a(sn,ue.classes.isSelected),sn.inert=!1,s$a(sn,`f-${Pt}In from-${rn>0?"prev":"next"}`)),Lt(),!0}(et,St))return;et=pe?(et%Nt+Nt)%Nt:t$8(0,et,Nt-1),Se=((bt=Ne[et||0])===null||bt===void 0?void 0:bt.pos)||0;const kt=re.isRunning()?re.getEndValues().pos:$e;if(Math.abs(Se-kt)<1)return $e=Se,Ee!==et&&(wt(),ie=Ee,Ee=et,at(),Je(),Ie("change",Ee,ie)),Lt(),void(ye||(ye=!0,Ie("settle")));if(re.pause(),nt(),pe){const $t=Et(),Pt=Math.floor((kt-((_t=Ne[0])===null||_t===void 0?void 0:_t.pos))/$t)||0,Ft=Se+Pt*$t;Se=[Ft+$t,Ft,Ft-$t].reduce(function(Ot,Ht){return Math.abs(Ht-kt)<Math.abs(Ot-kt)?Ht:Ot})}St!==!1&&t$7(Ct)?re.spring(r$5({},ue.tween,Ct)).from({pos:$e}).to({pos:Se}).start():($e=Se,Ue(),Lt(),ye||(ye=!0,Ie("settle")))}function Dt(et){var ct;let bt=$e;if(pe&&et!==!0){const _t=Et();bt-=(Math.floor(($e-((ct=Ne[0])===null||ct===void 0?void 0:ct.pos)||0)/_t)||0)*_t}return bt}function Lt(){var et;if(!me||!be)return;Ve=mt();const ct=new Set,bt=[],_t=Ne[Ee],St=ue.setTransform;let Ct;for(const Nt of Re){const rt=ze.has(Nt.index),kt=Ve.indexOf(Nt)>-1,$t=((et=_t==null?void 0:_t.slides)===null||et===void 0?void 0:et.indexOf(Nt))>-1;if(Nt.isVirtual&&!rt&&!kt)continue;let Pt=dt(Nt);if(Pt&&(bt.push(Nt),$t&&ct.add(Pt),xe("adaptiveHeight")&&$t)){const Ft=(Pt.firstElementChild||Pt).getBoundingClientRect().height;Ct=Ct==null?Ft:Math.max(Ct,Ft)}}be&&Ct&&(be.style.height=`${Ct}px`),[...e$4(be,`.${ue.classes.slide}`)].forEach(Nt=>{s$8(Nt,ue.classes.isSelected,ct.has(Nt));const rt=Oe[parseInt(Nt.getAttribute("index")||"-1")];if(!rt)return Nt.remove(),void Ke(Nt);const kt=ze.has(rt.index),$t=Ve.indexOf(rt)>-1;if(rt.isVirtual&&!kt&&!$t)return void pt(rt);if(Nt.inert=!$t,St===!1)return;let Pt=rt.pos?Math.round(1e4*rt.pos)/1e4:0,Ft=0,Ot=0,Ht=0,Zt=0;kt||(Ft=ge?0:_e?-1*Pt:Pt,Ot=ge?Pt:0,Ht=t$5(Ft,0,rt.dim,0,100),Zt=t$5(Ot,0,rt.dim,0,100)),St instanceof Function&&!kt?St(It,rt,{x:Ft,y:Ot,xPercent:Ht,yPercent:Zt}):Nt.style.transform=Ft||Ot?`translate3d(${Ht}%, ${Zt}%,0)`:""}),Ie("render",bt)}function Gt(){me==null||me.removeEventListener("click",st),document.removeEventListener("mousemove",Ge),ze.clear(),oe==null||oe.disconnect(),oe=void 0;for(const et of Oe){let ct=et.el;ct&&n$b(ct)&&(et.state=void 0,ft(et),yt(et),et.isVirtual?(pt(et),et.el=void 0):(Ke(ct),ct.style.transform="",be&&!be.contains(ct)&&be.appendChild(ct)))}for(const et of Object.values(ve))et==null||et.destroy();ve={},ae==null||ae.destroy(),ae=void 0,re==null||re.destroy(),re=void 0;for(const[et,ct]of Object.entries(ue.classes||{}))et!=="container"&&s$9(me,ct);s$9(be,"is-draggable")}function Rt(){return pe||Ee>0}function Xt(){return pe||Ee<Ne.length-1}const It={add:function(et,ct){var bt;let _t=$e;const St=Ee,Ct=Et(),Nt=re!=null&&re.isRunning()?re.getEndValues().pos:$e,rt=Ct&&Math.floor((Nt-(((bt=Ne[0])===null||bt===void 0?void 0:bt.pos)||0))/Ct)||0;return je(et,ct),Xe(De),We(),re&&Ct&&(St===Ee&&(_t-=rt*Ct),_t===Se?$e=Se:re.spring({clamp:!0,mass:1,tension:300,friction:25,restDelta:1,restSpeed:1}).from({pos:_t}).to({pos:Se}).start()),Lt(),It},canGoPrev:Rt,canGoNext:Xt,destroy:function(){return Ie("destroy"),window.removeEventListener("resize",qe),Gt(),Fe.clear(),me=null,Ne=[],Oe=[],ue=Object.assign({},h$5),ve={},Re=[],le=void 0,De="*",ce=2,It},emit:Ie,filter:function(et="*"){return Xe(et),We(),$e=t$8(Le,$e,Me),Lt(),Ie("filter",et),It},getContainer:function(){return me},getGapDim:it,getGestures:function(){return ae},getLastMouseMove:function(){return b$3},getOption:function(et){return xe(et)},getOptions:function(){return ue},getPage:function(){return Ne[Ee]},getPageIndex:function(et){if(et!==void 0){for(const ct of Ne||[])for(const bt of ct.slides)if(bt.index===et)return ct.index;return-1}return Ee},getPageIndexFromPosition:lt,getPageProgress:function(et,ct){var bt;et===void 0&&(et=Ee);const _t=Ne[et];if(!_t)return et>Ee?-1:1;const St=Et(),Ct=it();let Nt=_t.pos,rt=Dt();if(pe&&ct!==!0){const kt=Math.floor((rt-((bt=Ne[0])===null||bt===void 0?void 0:bt.pos))/St)||0;rt-=kt*St,Nt=[Nt+St,Nt,Nt-St].reduce(function($t,Pt){return Math.abs(Pt-rt)<Math.abs($t-rt)?Pt:$t})}return(rt-Nt)/(_t.dim+Ct)||0},getPageVisibility:function(et){var ct;et===void 0&&(et=Ee);const bt=Ne[et];if(!bt)return et>Ee?-1:1;const _t=Dt(),St=gt();let Ct=bt.pos;if(pe){const Nt=Et(),rt=Ct+(Math.floor((_t-((ct=Ne[0])===null||ct===void 0?void 0:ct.pos))/Nt)||0)*Nt;Ct=[rt+Nt,rt,rt-Nt].reduce(function(kt,$t){return Math.abs($t-_t)<Math.abs(kt-_t)?$t:kt})}return Ct>_t&&Ct+bt.dim<_t+St?1:Ct<_t?(Ct+bt.dim-_t)/bt.dim||0:Ct+bt.dim>_t+St&&(_t+St-Ct)/bt.dim||0},getPages:function(){return Ne},getPlugins:function(){return ve},getPosition:Dt,getSlides:function(){return Oe},getState:function(){return ce},getTotalSlideDim:Et,getTween:function(){return re},getViewport:function(){return be},getViewportDim:gt,getVisibleSlides:function(et){return et===void 0?Ve:mt(et)},goTo:Tt,hasNavigated:function(){return ie!==void 0},hideError:yt,hideLoading:ft,init:function(){if(!ee||!n$b(ee))throw new Error("No Element found");return ce!==0&&(Gt(),ce=0),me=ee,de=te,window.removeEventListener("resize",qe),de.breakpoints&&window.addEventListener("resize",qe),qe(),It},isInfinite:function(){return pe},isInTransition:function(){return ze.size>0},isRTL:function(){return _e},isSettled:function(){return ye},isVertical:function(){return ge},localize:function(et,ct=[]){return Ce(et,ct)},next:function(et={}){return Tt(Ee+1,et),It},off:function(et,ct){for(const bt of et instanceof Array?et:[et])Fe.has(bt)&&Fe.set(bt,Fe.get(bt).filter(_t=>_t!==ct));return It},on:function(et,ct){for(const bt of et instanceof Array?et:[et])Fe.set(bt,[...Fe.get(bt)||[],ct]);return It},prev:function(et={}){return Tt(Ee-1,et),It},reInit:function(et={},ct={}){return Gt(),ce=0,le=void 0,De="*",te=et,de=et,ne=ct,qe(),It},remove:function(et){et===void 0&&(et=Oe.length-1);const ct=Oe[et];return ct&&(Ie("removeSlide",ct),ct.el&&(Ke(ct.el),ct.el.remove(),ct.el=void 0),Oe.splice(et,1),Xe(De),We(),$e=t$8(Le,$e,Me),Lt()),It},setPosition:function(et){$e=et,Ue(),Lt()},showError:function(et,ct){ft(et),yt(et);const bt=et.el;if(bt){const _t=document.createElement("div");s$a(_t,"f-html"),s$a(_t,"is-error"),_t.innerHTML=Ce(ct||"<p>{{ERROR}}</p>"),et.htmlEl=_t,s$a(bt,"has-html"),s$a(bt,"has-error"),bt.insertAdjacentElement("afterbegin",_t),Ie("contentReady",et)}return It},showLoading:function(et){const ct=et.el,bt=ct==null?void 0:ct.querySelector(".f-spinner");if(!ct||bt)return It;const _t=xe("spinnerTpl"),St=e$9(_t);return St&&(s$a(St,"f-spinner"),ct.insertAdjacentElement("beforeend",St)),It},version:"6.1.3"};return It};E$3.l10n={en_EN:o$7},E$3.getDefaults=()=>h$5;/*! License details at fancyapps.com/license */const t$4=(ee=!0,te="--f-scrollbar-compensate",ne="--f-body-margin",ae="hide-scrollbar")=>{const re=document,oe=re.body,ie=re.documentElement;if(ee){if(oe.classList.contains(ae))return;let le=window.innerWidth-ie.getBoundingClientRect().width;le<0&&(le=0),ie.style.setProperty(te,`${le}px`);const ce=parseFloat(window.getComputedStyle(oe).marginRight);ce&&oe.style.setProperty(ne,`${ce}px`),oe.classList.add(ae)}else oe.classList.remove(ae),oe.style.setProperty(ne,""),re.documentElement.style.setProperty(te,"")};/*! License details at fancyapps.com/license */function e$3(){return!(typeof window>"u"||!window.document||!window.document.createElement)}/*! License details at fancyapps.com/license */const n$7=function(ee="",te="",ne=""){return ee.split(te).join(ne)};/*! License details at fancyapps.com/license */const a$7={tpl:ee=>`<img class="f-panzoom__content"
|
|
14
|
+
</svg>`}};return re[ne.value]||re.marketing});return(re,oe)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["gap-2 font-semibold flex justify-center items-center min-w-19 lg:min-w-32 w-0 p-1.5 rounded-lg transition-colors",ae.value.colorClass])},[ee.showIcon?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:"flex-shrink-0 hidden lg:block",innerHTML:ae.value.icon},null,8,_hoisted_1$2y)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_2$2f,e$b.toDisplayString(ae.value.label),1)],2))}},_sfc_main$2L={__name:"DepartmentIcon",props:{color:{type:String,default:""}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createElementBlock("svg",{style:e$b.normalizeStyle(ee.color?{color:ee.color}:void 0),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[...ne[0]||(ne[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 4a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2v14a1 1 0 1 1 0 2H5a1 1 0 1 1 0-2V5a1 1 0 0 1-1-1Zm5 2a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H9Zm5 0a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-1Zm-5 4a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1H9Zm5 0a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1h-1Zm-3 4a2 2 0 0 0-2 2v3h2v-3h2v3h2v-3a2 2 0 0 0-2-2h-2Z","clip-rule":"evenodd"},null,-1)])],4))}},useDepartmentStore=pinia.defineStore("department",{state:()=>({departments:[],count:null,loaded:!1}),actions:{async fetchDepartments(ee=""){try{let te=`${departmentUrl}`;const ne=await api.get(te);this.departments=ne.data,this.count=this.departments.length,this.loaded=!0}catch(te){console.log("Erro ao buscar departamentos:",te)}},removeDepartments(ee){this.departments=this.departments.filter(te=>te.id!==ee)},addDepartments(ee){const te=this.departments.findIndex(ne=>ne.id===ee.id);te!==-1?this.departments[te]=ee:this.departments.push(ee)}}}),_hoisted_1$2x=["title"],_hoisted_2$2e={class:"whitespace-nowrap text-sm font-medium"},_hoisted_3$1_={class:"flex justify-center"},_hoisted_4$1O={class:"flex justify-center"},_hoisted_5$1E={class:"flex-shrink-0 hidden lg:block"},_hoisted_6$1v={key:0,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},_hoisted_7$1n={key:1,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},_hoisted_8$1e={key:2,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},_hoisted_9$18={key:3,class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},_hoisted_10$11={class:"text-xs"},_hoisted_11$V={class:"mx-auto flex justify-center"},_hoisted_12$Q={class:"w-72 rounded-lg p-2"},_hoisted_13$J={key:0,class:"space-y-2"},_hoisted_14$H={class:"font-medium text-slate-100 text-sm"},_hoisted_15$C={key:1,class:"text-xs text-slate-400 text-center py-2"},_hoisted_16$y={class:"flex items-center gap-2 px-3 py-1.5 bg-gradient-to-r from-blue-500/10 to-blue-400/10 border border-blue-500/30 rounded-lg cursor-pointer hover:border-blue-300/50 transition-all"},_hoisted_17$r={class:"text-sm font-semibold text-blue-500"},_hoisted_18$r={class:"z-50 flex items-center justify-center gap-2"},_hoisted_19$m={class:"border border-base-200 rounded-md overflow-hidden"},_hoisted_20$l={class:"flex justify-between items-center p-2 sticky top-0 bg-base-200 z-10"},_hoisted_21$i={class:"font-semibold text-sm"},_hoisted_22$g=["disabled","onClick"],_hoisted_23$c=["onClick"],_hoisted_24$a=["onClick"],_hoisted_25$8=["onClick"],_sfc_main$2K={__name:"templateTable",props:{instanceId:{type:[String,Number],required:!0},departmentId:{type:[String,Number],default:null},extraParams:{type:Object,default:()=>({})},mode:{type:String,default:"manage",validator:ee=>["manage","send"].includes(ee)},showLang:{type:Boolean,default:!1},showDepartments:{type:Boolean,default:!1},itemsPerPage:{type:Number,default:15}},emits:["send","edit","delete","copy-id"],setup(ee,{expose:te,emit:ne}){const ae=ee,re=e$b.ref([]),oe=e$b.ref(!1),ie=e$b.ref(1),le=e$b.ref(0),ce=e$b.ref({}),de=useDepartmentStore(),ue=e$b.computed(()=>{const pe=[{key:"name",label:"Nome",width:"w-64",headerAlign:"left",filter:{type:"text",placeholder:"Buscar nome..."}}];return ae.showLang&&pe.push({key:"lang",label:"Idioma",width:"w-20",headerAlign:"left",filter:{type:"select",key:"language",options:[{value:"pt_BR",label:"Português"},{value:"en",label:"Inglês"}]}}),pe.push({key:"category",label:"Categoria",width:"w-32",filter:{type:"select",options:[{value:"MARKETING",label:"Marketing"},{value:"UTILITY",label:"Utilidade"},{value:"AUTHENTICATION",label:"Autenticação"}]}},{key:"status",label:"Status",width:"w-32",filter:{type:"select",options:[{value:"PENDING",label:"Pendente"},{value:"APPROVED",label:"Aprovado"},{value:"REJECTED",label:"Reprovado"},{value:"PENDING_DELETION",label:"Ag. deleção"}]}}),ae.showDepartments&&pe.push({key:"department",label:"Departamento(s)",width:"w-28",headerAlign:"center",filter:{type:"multiselect",key:"departments",options:de.departments.map(_e=>({value:String(_e.id),label:_e.name}))}}),pe.push({key:"actions",label:"Ações",width:"w-44",cellClass:"whitespace-nowrap"}),pe});async function ve(){oe.value=!0;try{const pe=new URLSearchParams;pe.set("page",ie.value),pe.set("instance",ae.instanceId),ae.departmentId&&pe.set("department",ae.departmentId);for(const[ge,ke]of Object.entries(ce.value))Array.isArray(ke)?ke.length&&pe.set(ge,ke.join(",")):ke!=null&&ke!==""&&pe.append(ge,ke);if(ae.extraParams)for(const[ge,ke]of Object.entries(ae.extraParams))Array.isArray(ke)?ke.forEach($e=>pe.append(ge,$e)):ke!=null&&ke!==""&&pe.append(ge,ke);const{data:_e}=await api.get(`${templateUrl}?${pe.toString()}`);re.value=_e.results,le.value=_e.count}catch{re.value=[],le.value=0}finally{oe.value=!1}}function me(pe){ce.value=pe,ie.value=1,ve()}function be(pe){ie.value=pe,ve()}e$b.watch(()=>[ae.instanceId,ae.departmentId,ae.extraParams],()=>{ie.value=1,ve()},{deep:!0}),e$b.onMounted(()=>{ve(),ae.showDepartments&&!de.loaded&&de.fetchDepartments()});function fe(pe){switch(pe==null?void 0:pe.toLowerCase()){case"pending":return"Pendente";case"approved":return"Aprovado";case"rejected":return"Reprovado";case"pending_deletion":return"Aguardando deleção";default:return pe??""}}return te({refresh:ve}),(pe,_e)=>{const ge=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createBlock(baseTable,{columns:ue.value,rows:re.value,loading:oe.value,"total-items":le.value,"items-per-page":ee.itemsPerPage,"current-page":ie.value,filters:ce.value,"empty-text":"Nenhum modelo de mensagem disponível","onUpdate:currentPage":be,"onUpdate:filters":me},e$b.createSlots({"empty-action":e$b.withCtx(()=>[e$b.renderSlot(pe.$slots,"empty-action",{},void 0,!0)]),"cell-name":e$b.withCtx(({row:ke})=>[e$b.createElementVNode("span",{title:ke.name,class:"block truncate text-left max-w-64 whitespace-nowrap font-medium text-sm"},e$b.toDisplayString(ke.name),9,_hoisted_1$2x)]),"cell-category":e$b.withCtx(({row:ke})=>[e$b.createElementVNode("div",_hoisted_3$1_,[e$b.createVNode(_sfc_main$2M,{category:ke.category},null,8,["category"])])]),"cell-status":e$b.withCtx(({row:ke})=>{var $e,ye,Ee,Se,Le,Me,De,Oe;return[e$b.createElementVNode("div",_hoisted_4$1O,[e$b.createElementVNode("div",{class:e$b.normalizeClass([{"bg-orange-500/20 border border-orange-500 text-orange-300 dark:text-orange-500 hover:text-orange-200 hover:border-orange-200":(($e=ke.status)==null?void 0:$e.toLowerCase())==="pending","bg-green-600/20 border border-green-600 dark:text-green-500 text-green-300 hover:text-green-200 hover:border-green-200":((ye=ke.status)==null?void 0:ye.toLowerCase())==="approved","bg-red-500/20 border border-red-500 text-red-300 dark:text-red-500 hover:text-red-200 hover:border-red-200":((Ee=ke.status)==null?void 0:Ee.toLowerCase())==="rejected"||((Se=ke.status)==null?void 0:Se.toLowerCase())==="pending_deletion"},"p-1.5 rounded-lg font-semibold text-xs flex items-center justify-center gap-2 min-w-19 lg:min-w-28 w-0 transition-colors"])},[e$b.createElementVNode("div",_hoisted_5$1E,[((Le=ke.status)==null?void 0:Le.toLowerCase())==="pending"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_6$1v,[..._e[0]||(_e[0]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3M3.22302 14C4.13247 18.008 7.71683 21 12 21c4.9706 0 9-4.0294 9-9 0-4.97056-4.0294-9-9-9-3.72916 0-6.92858 2.26806-8.29409 5.5M7 9H3V5"},null,-1)])])):((Me=ke.status)==null?void 0:Me.toLowerCase())==="rejected"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$1n,[..._e[1]||(_e[1]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"m6 6 12 12m3-6a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"},null,-1)])])):((De=ke.status)==null?void 0:De.toLowerCase())==="approved"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1e,[..._e[2]||(_e[2]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8.032 12 1.984 1.984 4.96-4.96m4.55 5.272.893-.893a1.984 1.984 0 0 0 0-2.806l-.893-.893a1.984 1.984 0 0 1-.581-1.403V7.04a1.984 1.984 0 0 0-1.984-1.984h-1.262a1.983 1.983 0 0 1-1.403-.581l-.893-.893a1.984 1.984 0 0 0-2.806 0l-.893.893a1.984 1.984 0 0 1-1.403.581H7.04A1.984 1.984 0 0 0 5.055 7.04v1.262c0 .527-.209 1.031-.581 1.403l-.893.893a1.984 1.984 0 0 0 0 2.806l.893.893c.372.372.581.876.581 1.403v1.262a1.984 1.984 0 0 0 1.984 1.984h1.262c.527 0 1.031.209 1.403.581l.893.893a1.984 1.984 0 0 0 2.806 0l.893-.893a1.985 1.985 0 0 1 1.403-.581h1.262a1.984 1.984 0 0 0 1.984-1.984V15.7c0-.527.209-1.031.581-1.403Z"},null,-1)])])):((Oe=ke.status)==null?void 0:Oe.toLowerCase())==="pending_deletion"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_9$18,[..._e[3]||(_e[3]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 7h14m-9 3v8m4-8v8M10 3h4a1 1 0 0 1 1 1v3H9V4a1 1 0 0 1 1-1ZM6 7h12v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7Z"},null,-1)])])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("span",_hoisted_10$11,e$b.toDisplayString(fe(ke.status)),1)],2)])]}),"cell-actions":e$b.withCtx(({row:ke})=>{var $e,ye;return[e$b.createElementVNode("main",_hoisted_18$r,[e$b.createVNode(ge,{placement:"left",class:"preview-popper"},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_19$m,[e$b.createElementVNode("div",_hoisted_20$l,[e$b.createElementVNode("p",_hoisted_21$i,e$b.toDisplayString(ke.name),1)]),e$b.renderSlot(pe.$slots,"preview",{template:ke},()=>[_e[5]||(_e[5]=e$b.createElementVNode("span",{class:"block p-4 text-xs text-gray-400 text-center"}," Sem pré-visualização disponível ",-1))],!0)])]),default:e$b.withCtx(()=>[_e[6]||(_e[6]=e$b.createElementVNode("button",{class:"group action-btn action-btn-info"},[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-0 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Pré-visualizar")],-1))]),_:2},1024),ee.mode==="send"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,disabled:(($e=ke.status)==null?void 0:$e.toLowerCase())!=="approved",class:e$b.normalizeClass(["action-btn group",((ye=ke.status)==null?void 0:ye.toLowerCase())==="approved"?"action-btn-success":"action-btn-danger"]),onClick:Ee=>pe.$emit("send",ke)},[..._e[7]||(_e[7]=[e$b.createElementVNode("svg",{class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 14 16"},[e$b.createElementVNode("path",{d:"M0 .984v14.032a1 1 0 0 0 1.506.845l12.006-7.016a.974.974 0 0 0 0-1.69L1.506.139A1 1 0 0 0 0 .984Z"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-0 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Enviar modelo",-1)])],10,_hoisted_22$g)):e$b.createCommentVNode("",!0),ee.mode==="manage"?(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"group action-btn action-btn-success",onClick:Ee=>pe.$emit("edit",ke)},[..._e[8]||(_e[8]=[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-0 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Editar Template",-1)])],8,_hoisted_23$c)):e$b.createCommentVNode("",!0),ee.mode==="manage"?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,class:"group action-btn action-btn-danger",onClick:Ee=>pe.$emit("delete",ke)},[..._e[9]||(_e[9]=[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M0 0h24v24H0V0z",fill:"none"}),e$b.createElementVNode("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4z"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-10 -top-3 z-50 m-2 mx-auto rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Excluir",-1)])],8,_hoisted_24$a)):e$b.createCommentVNode("",!0),ee.mode==="manage"?(e$b.openBlock(),e$b.createElementBlock("button",{key:3,class:"group action-btn action-btn-info",onClick:Ee=>pe.$emit("copy-id",ke)},[..._e[10]||(_e[10]=[e$b.createElementVNode("svg",{class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M7 9v6a4 4 0 0 0 4 4h4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1v2Z","clip-rule":"evenodd"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 3.054V7H9.2a2 2 0 0 1 .281-.432l2.46-2.87A2 2 0 0 1 13 3.054ZM15 3v4a2 2 0 0 1-2 2H9v6a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-3Z","clip-rule":"evenodd"})],-1),e$b.createElementVNode("span",{class:"pointer-events-none absolute right-2 -top-3 z-50 m-2 mx-auto -translate-x-1/3 rounded-md bg-slate-700 p-2 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},"Copiar ID",-1)])],8,_hoisted_25$8)):e$b.createCommentVNode("",!0)]),e$b.renderSlot(pe.$slots,"extra-actions",{template:ke},void 0,!0)]}),_:2},[ee.showLang?{name:"cell-lang",fn:e$b.withCtx(({row:ke})=>[e$b.createElementVNode("span",_hoisted_2$2e,e$b.toDisplayString(ke.lang),1)]),key:"0"}:void 0,ee.showDepartments?{name:"cell-department",fn:e$b.withCtx(({row:ke})=>[e$b.createElementVNode("div",_hoisted_11$V,[e$b.createVNode(ge,{placement:"top",arrow:!1,class:"tip-popper"},{content:e$b.withCtx(()=>{var $e;return[e$b.createElementVNode("section",_hoisted_12$Q,[_e[4]||(_e[4]=e$b.createElementVNode("div",{class:"text-sm font-semibold text-slate-100 pb-2"}," Departamentos ",-1)),(($e=ke.department)==null?void 0:$e.length)>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$J,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ke.department,ye=>(e$b.openBlock(),e$b.createElementBlock("div",{key:ye.id,class:"bg-slate-800/80 rounded-lg p-2 border border-slate-700/50 hover:border-blue-500/30 transition-all"},[e$b.createElementVNode("span",_hoisted_14$H,e$b.toDisplayString(ye.name),1)]))),128))])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$C," Sem departamentos vinculados "))])]}),default:e$b.withCtx(()=>{var $e;return[e$b.createElementVNode("div",_hoisted_16$y,[e$b.createVNode(_sfc_main$2L,{class:"size-5 text-blue-400"}),e$b.createElementVNode("span",_hoisted_17$r,e$b.toDisplayString(($e=ke.department)==null?void 0:$e.length),1)])]}),_:2},1024)])]),key:"1"}:void 0]),1032,["columns","rows","loading","total-items","items-per-page","current-page","filters"])}}},templateTable=_export_sfc$1(_sfc_main$2K,[["__scopeId","data-v-07b01775"]]);function tryOnScopeDispose(ee){return e$b.getCurrentScope()?(e$b.onScopeDispose(ee),!0):!1}function toValue(ee){return typeof ee=="function"?ee():e$b.unref(ee)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString$2=Object.prototype.toString,isObject=ee=>toString$2.call(ee)==="[object Object]",noop=()=>{},isIOS=getIsIOS();function getIsIOS(){var ee,te;return isClient&&((ee=window==null?void 0:window.navigator)==null?void 0:ee.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((te=window==null?void 0:window.navigator)==null?void 0:te.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function unrefElement(ee){var te;const ne=toValue(ee);return(te=ne==null?void 0:ne.$el)!=null?te:ne}const defaultWindow=isClient?window:void 0;function useEventListener$1(...ee){let te,ne,ae,re;if(typeof ee[0]=="string"||Array.isArray(ee[0])?([ne,ae,re]=ee,te=defaultWindow):[te,ne,ae,re]=ee,!te)return noop;Array.isArray(ne)||(ne=[ne]),Array.isArray(ae)||(ae=[ae]);const oe=[],ie=()=>{oe.forEach(ue=>ue()),oe.length=0},le=(ue,ve,me,be)=>(ue.addEventListener(ve,me,be),()=>ue.removeEventListener(ve,me,be)),ce=e$b.watch(()=>[unrefElement(te),toValue(re)],([ue,ve])=>{if(ie(),!ue)return;const me=isObject(ve)?{...ve}:ve;oe.push(...ne.flatMap(be=>ae.map(fe=>le(ue,be,fe,me))))},{immediate:!0,flush:"post"}),de=()=>{ce(),ie()};return tryOnScopeDispose(de),de}let _iOSWorkaround=!1;function onClickOutside(ee,te,ne={}){const{window:ae=defaultWindow,ignore:re=[],capture:oe=!0,detectIframe:ie=!1}=ne;if(!ae)return noop;isIOS&&!_iOSWorkaround&&(_iOSWorkaround=!0,Array.from(ae.document.body.children).forEach(me=>me.addEventListener("click",noop)),ae.document.documentElement.addEventListener("click",noop));let le=!0;const ce=me=>re.some(be=>{if(typeof be=="string")return Array.from(ae.document.querySelectorAll(be)).some(fe=>fe===me.target||me.composedPath().includes(fe));{const fe=unrefElement(be);return fe&&(me.target===fe||me.composedPath().includes(fe))}}),ue=[useEventListener$1(ae,"click",me=>{const be=unrefElement(ee);if(!(!be||be===me.target||me.composedPath().includes(be))){if(me.detail===0&&(le=!ce(me)),!le){le=!0;return}te(me)}},{passive:!0,capture:oe}),useEventListener$1(ae,"pointerdown",me=>{const be=unrefElement(ee);le=!ce(me)&&!!(be&&!me.composedPath().includes(be))},{passive:!0}),ie&&useEventListener$1(ae,"blur",me=>{setTimeout(()=>{var be;const fe=unrefElement(ee);((be=ae.document.activeElement)==null?void 0:be.tagName)==="IFRAME"&&!(fe!=null&&fe.contains(ae.document.activeElement))&&te(me)},0)})].filter(Boolean);return()=>ue.forEach(me=>me())}const _hoisted_1$2w={class:"line-clamp-2 uppercase text-xs truncate text-white"},_hoisted_2$2d={key:0,class:"select_widget_lib"},_sfc_main$2J={__name:"primary_select",props:{config:{type:Object,default:{title:"select_primary"}}},emits:["closeSelect"],setup(ee,{emit:te}){const ne=ee,ae=e$b.ref(!1),re=e$b.ref(null);e$b.computed(()=>ne.selectConfig.some(le=>le.freeSlot));const oe=()=>{ae.value=!ae.value};return onClickOutside(re,()=>{ae.value&&(ae.value=!1)}),(le,ce)=>(e$b.openBlock(),e$b.createElementBlock("div",{ref_key:"target",ref:re,class:"relative w-full"},[e$b.createElementVNode("button",{onClick:oe,class:"bg-base-100 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-base-300"},[e$b.createElementVNode("div",null,[e$b.createElementVNode("p",_hoisted_1$2w,e$b.toDisplayString(ee.config.title),1)]),e$b.createElementVNode("div",null,[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass([ae.value?"rotate-180 transition-transform ease-in-out":"","w-3 h-3 text-white"]),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[...ce[0]||(ce[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M18.4 10.3A2 2 0 0 0 17 7H7a2 2 0 0 0-1.5 3.3l4.9 5.9a2 2 0 0 0 3 0l5-6Z","clip-rule":"evenodd"},null,-1)])],2))])]),ae.value?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_2$2d,[e$b.createElementVNode("div",null,[e$b.renderSlot(le.$slots,"free-slot",{},void 0,!0)])])):e$b.createCommentVNode("",!0)],512))}},primarySelect=_export_sfc$1(_sfc_main$2J,[["__scopeId","data-v-265f04f1"]]),_hoisted_1$2v={key:0,class:"modal_head"},_hoisted_2$2c={class:"modal_responsive"},_hoisted_3$1Z={class:"flex min-h-full items-center justify-center text-center sm:p-0"},_hoisted_4$1N={class:"modal_tittle text-current bg-base-300 border-base-100"},_hoisted_5$1D={class:"flex items-center w-full"},_hoisted_6$1u=["innerHTML"],_hoisted_7$1m={class:"text-xl ml-1 font-semibold flex items-center gap-2"},_hoisted_8$1d={class:"bg-base-200"},_hoisted_9$17={class:"text-center"},_hoisted_10$10={class:"modal_end_button border-base-100 bg-base-300"},_sfc_main$2I={__name:"simple_modal",props:{isOpen:{type:Boolean,default:!1},header:{type:Object,default:{title:"title",svg:"<svg class='w-5 mr-2 text-primary inline-block' aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'> <path d='M18 3h-5.7a2 2 0 0 0-1.4.6L3.6 11a2 2 0 0 0 0 2.8l6.6 6.6a2 2 0 0 0 2.8 0l7.4-7.5a2 2 0 0 0 .6-1.4V6a3 3 0 0 0-3-3Zm-2.4 6.4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z' /> </svg>"}},size:{type:String,default:"md:w-1/2 xl:w-1/3"}},emits:["update:isOpen","close"],setup(ee,{emit:te}){e$b.useSlots();const ne=ee,ae=te,re=()=>{ae("update:isOpen",!ne.isOpen),ne.isOpen&&ae("close")};return(oe,ie)=>(e$b.openBlock(),e$b.createBlock(e$b.Transition,{"leave-active-class":"transition-opacity duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0","enter-active-class":"transition-opacity duration-200 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100"},{default:e$b.withCtx(()=>{var le,ce;return[ee.isOpen?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$2v,[ie[2]||(ie[2]=e$b.createElementVNode("div",{class:"modal-overlay absolute h-full w-full bg-gray-600 opacity-50"},null,-1)),e$b.createElementVNode("div",_hoisted_2$2c,[e$b.createElementVNode("div",_hoisted_3$1Z,[e$b.createElementVNode("div",{class:e$b.normalizeClass([ee.size,"z-50 w-full shadow-card rounded-2xl"])},[e$b.createElementVNode("div",_hoisted_4$1N,[e$b.createElementVNode("section",_hoisted_5$1D,[oe.$slots.header?e$b.renderSlot(oe.$slots,"header",{key:1},void 0,!0):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[e$b.createElementVNode("span",{innerHTML:(le=ee.header)==null?void 0:le.svg},null,8,_hoisted_6$1u),e$b.createElementVNode("h3",_hoisted_7$1m,e$b.toDisplayString((ce=ee.header)==null?void 0:ce.title),1)],64))]),e$b.createElementVNode("button",{onClick:ie[0]||(ie[0]=de=>re()),class:"modal_close_button bg-base-200/40"},[...ie[1]||(ie[1]=[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)])])]),e$b.createElementVNode("div",_hoisted_8$1d,[e$b.createElementVNode("div",_hoisted_9$17,[e$b.renderSlot(oe.$slots,"body",{},void 0,!0)])]),e$b.createElementVNode("div",_hoisted_10$10,[e$b.renderSlot(oe.$slots,"footer",{},void 0,!0)])],2)])])])):e$b.createCommentVNode("",!0)]}),_:3}))}},simpleModal=_export_sfc$1(_sfc_main$2I,[["__scopeId","data-v-171e94f2"]]),_hoisted_1$2u={class:"simple_card_header"},_hoisted_2$2b={key:0,class:"simple_card_icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"none"},_hoisted_3$1Y={key:1,class:"simple_card_icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"none"},_hoisted_4$1M={key:2,class:"simple_card_icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"none"},_hoisted_5$1C={key:3,class:"simple_card_icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 23 23"},_hoisted_6$1t={class:"simple_card_title"},_hoisted_7$1l={class:"simple_card_descripiton"},_sfc_main$2H={__name:"simple_card",props:{content:{type:Object,default:{title:"Title",description:"Coloque aqui a descrição"}},typeCard:{type:String,default:"default"}},setup(ee){const te=ee,ne=e$b.computed(()=>({simple_card_success:te.typeCard==="success",simple_card_info:te.typeCard==="info",simple_card_alert:te.typeCard==="alert",simple_card_error:te.typeCard==="error"}));return(ae,re)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass([ne.value,"simple_card"])},[e$b.createElementVNode("div",_hoisted_1$2u,[ee.typeCard==="success"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_2$2b,[...re[0]||(re[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.25 10C0.25 4.61522 4.61522 0.25 10 0.25C15.3848 0.25 19.75 4.61522 19.75 10C19.75 15.3848 15.3848 19.75 10 19.75C4.61522 19.75 0.25 15.3848 0.25 10ZM13.6103 8.18593C13.8511 7.84887 13.773 7.38046 13.4359 7.1397C13.0989 6.89894 12.6305 6.97701 12.3897 7.31407L9.1543 11.8436L7.53033 10.2197C7.23744 9.92678 6.76256 9.92678 6.46967 10.2197C6.17678 10.5126 6.17678 10.9874 6.46967 11.2803L8.71967 13.5303C8.87556 13.6862 9.09215 13.7656 9.31186 13.7474C9.53157 13.7293 9.73216 13.6153 9.8603 13.4359L13.6103 8.18593Z",fill:"currentColor"},null,-1)])])):e$b.createCommentVNode("",!0),ee.typeCard==="info"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_3$1Y,[...re[1]||(re[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.25 10C0.25 4.61522 4.61522 0.25 10 0.25C15.3848 0.25 19.75 4.61522 19.75 10C19.75 15.3848 15.3848 19.75 10 19.75C4.61522 19.75 0.25 15.3848 0.25 10ZM10 6.25C10.4142 6.25 10.75 6.58579 10.75 7V10.75C10.75 11.1642 10.4142 11.5 10 11.5C9.58579 11.5 9.25 11.1642 9.25 10.75V7C9.25 6.58579 9.58579 6.25 10 6.25ZM10 14.5C10.4142 14.5 10.75 14.1642 10.75 13.75C10.75 13.3358 10.4142 13 10 13C9.58579 13 9.25 13.3358 9.25 13.75C9.25 14.1642 9.58579 14.5 10 14.5Z",fill:"currentColor"},null,-1)])])):e$b.createCommentVNode("",!0),ee.typeCard==="alert"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_4$1M,[...re[2]||(re[2]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.40123 2.0034C9.55572 0.0022862 12.4439 0.0022856 13.5983 2.0034L20.9527 14.7509C22.1065 16.7509 20.6631 19.2501 18.3541 19.2501H3.64546C1.33649 19.2501 -0.106939 16.7509 1.04691 14.7509L8.40123 2.0034ZM11 7.25C11.4142 7.25 11.75 7.58579 11.75 8V11.75C11.75 12.1642 11.4142 12.5 11 12.5C10.5858 12.5 10.25 12.1642 10.25 11.75V8C10.25 7.58579 10.5858 7.25 11 7.25ZM11 15.5C11.4142 15.5 11.75 15.1642 11.75 14.75C11.75 14.3358 11.4142 14 11 14C10.5858 14 10.25 14.3358 10.25 14.75C10.25 15.1642 10.5858 15.5 11 15.5Z",fill:"currentColor"},null,-1)])])):e$b.createCommentVNode("",!0),ee.typeCard==="error"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_5$1C,[...re[3]||(re[3]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm7.707-3.707a1 1 0 0 0-1.414 1.414L10.586 12l-2.293 2.293a1 1 0 1 0 1.414 1.414L12 13.414l2.293 2.293a1 1 0 0 0 1.414-1.414L13.414 12l2.293-2.293a1 1 0 0 0-1.414-1.414L12 10.586 9.707 8.293Z","clip-rule":"evenodd"},null,-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_6$1t,e$b.toDisplayString(ee.content.title),1)]),e$b.createElementVNode("section",_hoisted_7$1l,[e$b.createElementVNode("p",null,e$b.toDisplayString(ee.content.description),1)])],2))}},FRAME_LAYER_OPTIONS=Object.freeze({ring:[{key:"gradient",label:"Gradiente"},{key:"rainbow",label:"Arco-íris"},{key:"neon",label:"Neon"},{key:"double",label:"Aro duplo"},{key:"solid",label:"Cor sólida"},{key:"arc",label:"Aro de assinatura",locked:!0}],ornament:[{key:"none",label:"Sem ornamento"},{key:"wings",label:"Asas"},{key:"crown",label:"Coroa"},{key:"holly",label:"Azevinho"},{key:"bow",label:"Laço"},{key:"flowers",label:"Flores"},{key:"cat",label:"Gatinho"},{key:"runes",label:"Runas",locked:!0},{key:"bolt",label:"Raio",locked:!0},{key:"heart",label:"Coração",locked:!0},{key:"bars",label:"Barras",locked:!0},{key:"blade",label:"Lâmina",locked:!0},{key:"claw",label:"Garra",locked:!0},{key:"crest",label:"Emblema",locked:!0},{key:"orb",label:"Orbe",locked:!0}],effect:[{key:"none",label:"Sem efeito"},{key:"aura",label:"Aura"},{key:"flame",label:"Fogo"},{key:"frost",label:"Geada"},{key:"lightning",label:"Raios"}],particles:[{key:"none",label:"Sem partículas"},{key:"sparks",label:"Faíscas"},{key:"stars",label:"Estrelas"},{key:"snow",label:"Neve"},{key:"confetti",label:"Confetes"},{key:"hearts",label:"Corações"},{key:"petals",label:"Pétalas"},{key:"paws",label:"Patinhas"},{key:"whales",label:"Baleias",locked:!0}]}),RING_FINE=Object.freeze({gradient:{width:3,glow:.45,intensity:.65},rainbow:{width:5,glow:.78,intensity:.9},neon:{width:5,glow:.9,intensity:.92},double:{width:4,glow:.6,intensity:.8},solid:{width:3,glow:.3,intensity:.6},arc:{width:4,glow:.95,intensity:.95}}),ORNAMENT_FINE=Object.freeze({none:{intensity:.7,scale:1,offset_y:0,placement:"front"},wings:{intensity:.9,scale:1.08,offset_y:2,placement:"behind"},crown:{intensity:.95,scale:1,offset_y:0,placement:"front"},holly:{intensity:.8,scale:1,offset_y:0,placement:"front"},bow:{intensity:.9,scale:1,offset_y:0,placement:"front"},flowers:{intensity:.88,scale:1,offset_y:0,placement:"behind"},cat:{intensity:.95,scale:1,offset_y:0,placement:"behind"},runes:{intensity:1,scale:1,offset_y:0,placement:"front"},bolt:{intensity:1,scale:1,offset_y:0,placement:"front"},heart:{intensity:1,scale:.96,offset_y:0,placement:"front"},bars:{intensity:1,scale:.94,offset_y:0,placement:"front"},blade:{intensity:1,scale:1,offset_y:0,placement:"front"},claw:{intensity:1,scale:1,offset_y:0,placement:"front"},crest:{intensity:1,scale:1,offset_y:0,placement:"front"},orb:{intensity:1,scale:.98,offset_y:0,placement:"front"}}),EFFECT_FINE=Object.freeze({none:{intensity:.65,spread:1},aura:{intensity:.55,spread:1},flame:{intensity:.92,spread:.85},frost:{intensity:.75,spread:1},lightning:{intensity:.9,spread:1.1}}),PARTICLES_FINE=Object.freeze({none:{intensity:.65,density:7,size:1,orbit:1},sparks:{intensity:.9,density:10,size:.8,orbit:1.15},stars:{intensity:.7,density:8,size:1,orbit:1},snow:{intensity:.8,density:9,size:1,orbit:1},confetti:{intensity:.8,density:10,size:1,orbit:1},hearts:{intensity:.82,density:8,size:1,orbit:1.04},petals:{intensity:.78,density:9,size:1,orbit:1.08},paws:{intensity:.86,density:7,size:1,orbit:1.06},whales:{intensity:.9,density:3,size:1.15,orbit:1.08}}),MOTION_FINE=Object.freeze({none:{speed:.9,pulse:!0,flicker:!1},aura:{speed:.8,pulse:!0,flicker:!1},flame:{speed:1.35,pulse:!1,flicker:!0},frost:{speed:.65,pulse:!0,flicker:!1},lightning:{speed:1.5,pulse:!1,flicker:!0}}),DEFAULT_COLORS=["#7C3AED","#22D3EE","#F8FAFC"],HEX_COLOR=/^#[0-9a-f]{6}$/i;function clone(ee){return JSON.parse(JSON.stringify(ee))}function color(ee,te){return HEX_COLOR.test(String(ee||""))?String(ee).toUpperCase():te}function optionEntry(ee,te){return FRAME_LAYER_OPTIONS[ee].find(ne=>ne.key===te)}function optionExists(ee,te){return!!optionEntry(ee,te)}function frameVariantLocked(ee,te){var ne;return!!((ne=optionEntry(ee,te))!=null&&ne.locked)}const LAYERS=["ring","ornament","effect","particles"];function isSignatureFrameVisual(ee){const te=normalizeFrameVisual(ee);return LAYERS.some(ne=>frameVariantLocked(ne,te[ne].variant))}function defaultVariant(ee){return FRAME_LAYER_OPTIONS[ee][0].key}function normalizeLayer(ee,te,ne){var oe,ie,le;const ae=te&&typeof te=="object"?te:{},re=optionExists(ee,ae.variant)?ae.variant:defaultVariant(ee);return{enabled:ae.enabled!==!1&&re!=="none",variant:re,colors:[color((oe=ae.colors)==null?void 0:oe[0],ne[0]),color((ie=ae.colors)==null?void 0:ie[1],ne[1]),color((le=ae.colors)==null?void 0:le[2],ne[2])]}}function ringBackground(ee,te){const[ne,ae,re]=te;return ee==="solid"?ne:ee==="rainbow"?`conic-gradient(from var(--sm-frame-angle, 0deg), ${ne}, #F97316, ${ae}, #22C55E, #06B6D4, ${re}, #8B5CF6, #EC4899, ${ne})`:ee==="neon"?`conic-gradient(from var(--sm-frame-angle, 0deg), ${ne}, ${ae}, ${re}, ${ne})`:ee==="double"?`linear-gradient(135deg, ${ne}, ${ae})`:`linear-gradient(135deg, ${ne}, ${ae} 50%, ${re})`}function normalizeFrameVisual(ee={}){var de,ue,ve,me,be,fe,pe;const te=ee&&typeof ee=="object"?ee:{},ne=[color((ue=(de=te.ring)==null?void 0:de.colors)==null?void 0:ue[0],DEFAULT_COLORS[0]),color((me=(ve=te.ring)==null?void 0:ve.colors)==null?void 0:me[1],DEFAULT_COLORS[1]),color((fe=(be=te.ring)==null?void 0:be.colors)==null?void 0:fe[2],DEFAULT_COLORS[2])],ae={...normalizeLayer("ring",te.ring,ne)};Object.assign(ae,RING_FINE[ae.variant]||RING_FINE.gradient);const re={...normalizeLayer("ornament",te.ornament,ne)};Object.assign(re,ORNAMENT_FINE[re.variant]||ORNAMENT_FINE.none);const oe={...normalizeLayer("effect",te.effect,ne)};Object.assign(oe,EFFECT_FINE[oe.variant]||EFFECT_FINE.none);const ie={...normalizeLayer("particles",te.particles,ne)};Object.assign(ie,PARTICLES_FINE[ie.variant]||PARTICLES_FINE.none);const le=MOTION_FINE[oe.variant]||MOTION_FINE.none,ce={enabled:((pe=te.motion)==null?void 0:pe.enabled)!==!1,speed:le.speed,rotation:!0,direction:"clockwise",pulse:le.pulse,flicker:le.flicker};return{ring:ae,ornament:re,effect:oe,particles:ie,motion:ce,css:ringBackground(ae.variant,ae.colors),animated:ce.enabled}}function frameRingBackground(ee){const te=normalizeFrameVisual(ee);return ringBackground(te.ring.variant,te.ring.colors)}function resolveFrameVisual(ee){return ee!=null&&ee.visual?normalizeFrameVisual(ee.visual):null}function preset(ee,te,ne,ae=""){return{id:ee,name:te,description:ae,visual:normalizeFrameVisual(ne)}}const FRAME_STUDIO_PRESETS=Object.freeze([preset("slate","Grafite",{ring:{variant:"solid",colors:["#94A3B8","#64748B","#CBD5E1"]},motion:{enabled:!1}}),preset("sunrise","Alvorada",{ring:{variant:"gradient",colors:["#FBBF24","#FB7185","#FDE68A"]},motion:{enabled:!1}}),preset("tide","Maré",{ring:{variant:"double",colors:["#38BDF8","#0EA5E9","#E0F2FE"]},motion:{enabled:!1}}),preset("pulse","Pulso",{ring:{variant:"neon",colors:["#8B5CF6","#22D3EE","#F8FAFC"]},motion:{enabled:!0}}),preset("halo","Halo",{ring:{variant:"gradient",colors:["#A78BFA","#F0ABFC","#F8FAFC"]},effect:{variant:"aura",colors:["#A78BFA","#F0ABFC","#FFFFFF"]},motion:{enabled:!0}}),preset("aurora","Aurora",{ring:{variant:"neon",colors:["#34D399","#38BDF8","#F472B6"]},effect:{variant:"aura",colors:["#34D399","#38BDF8","#F472B6"]},particles:{variant:"stars",colors:["#F8FAFC","#38BDF8","#F472B6"]},motion:{enabled:!0}}),preset("celestial-wings","Asas Celestiais",{ring:{variant:"double",colors:["#E0E7FF","#818CF8","#C4B5FD"]},ornament:{variant:"wings",colors:["#F8FAFC","#A5B4FC","#C4B5FD"]},effect:{variant:"aura",colors:["#A5B4FC","#C4B5FD","#FFFFFF"]},particles:{variant:"stars",colors:["#FFFFFF","#C4B5FD","#A5B4FC"]},motion:{enabled:!0}}),preset("inferno","Inferno",{ring:{variant:"neon",colors:["#EF4444","#F97316","#FDE047"]},effect:{variant:"flame",colors:["#EF4444","#F97316","#FDE047"]},particles:{variant:"sparks",colors:["#FDE047","#FB923C","#EF4444"]},motion:{enabled:!0}}),preset("winter","Inverno Encantado",{ring:{variant:"double",colors:["#E0F2FE","#38BDF8","#A5F3FC"]},ornament:{variant:"holly",colors:["#166534","#22C55E","#DC2626"]},effect:{variant:"frost",colors:["#E0F2FE","#7DD3FC","#FFFFFF"]},particles:{variant:"snow",colors:["#FFFFFF","#E0F2FE","#BAE6FD"]},motion:{enabled:!0}}),preset("champion","Campeão",{ring:{variant:"double",colors:["#F59E0B","#FDE68A","#D97706"]},ornament:{variant:"crown",colors:["#FDE68A","#F59E0B","#FFFFFF"]},effect:{variant:"aura",colors:["#F59E0B","#FDE68A","#FFFFFF"]},particles:{variant:"confetti",colors:["#F59E0B","#22D3EE","#F472B6"]},motion:{enabled:!0}}),preset("neon-storm","Tempestade Neon",{ring:{variant:"neon",colors:["#22D3EE","#6366F1","#D946EF"]},effect:{variant:"lightning",colors:["#67E8F9","#818CF8","#FFFFFF"]},particles:{variant:"sparks",colors:["#67E8F9","#C4B5FD","#FFFFFF"]},motion:{enabled:!0}}),preset("spectrum","Espectro",{ring:{variant:"rainbow",colors:["#FB7185","#FACC15","#60A5FA"]},motion:{enabled:!0}},"Cores espectrais em um aro contínuo."),preset("pastel","Pastel",{ring:{variant:"double",colors:["#5BCEFA","#F5A9B8","#FFFFFF"]},effect:{variant:"aura",colors:["#5BCEFA","#F5A9B8","#FFFFFF"]},particles:{variant:"stars",colors:["#FFFFFF","#5BCEFA","#F5A9B8"]},motion:{enabled:!0}},"Tons suaves e pontos de luz."),preset("charm","Encanto",{ring:{variant:"double",colors:["#F472B6","#C084FC","#FDF2F8"]},ornament:{variant:"bow",colors:["#F472B6","#C084FC","#FFFFFF"]},effect:{variant:"aura",colors:["#F9A8D4","#C4B5FD","#FFFFFF"]},particles:{variant:"hearts",colors:["#FB7185","#F472B6","#C084FC"]},motion:{enabled:!0}},"Formas delicadas e brilho sutil."),preset("garden","Jardim",{ring:{variant:"gradient",colors:["#FB7185","#D946EF","#FEF3C7"]},ornament:{variant:"flowers",colors:["#F9A8D4","#FDE68A","#FFFFFF"]},effect:{variant:"aura",colors:["#F9A8D4","#E879F9","#FFFFFF"]},particles:{variant:"petals",colors:["#FDA4AF","#F9A8D4","#FDE68A"]},motion:{enabled:!0}},"Elementos orgânicos em movimento."),preset("playful","Travessura",{ring:{variant:"neon",colors:["#A855F7","#EC4899","#67E8F9"]},ornament:{variant:"cat",colors:["#C084FC","#F9A8D4","#FDE68A"]},effect:{variant:"aura",colors:["#A855F7","#EC4899","#67E8F9"]},particles:{variant:"paws",colors:["#F9A8D4","#C084FC","#67E8F9"]},motion:{enabled:!0}},"Linhas expressivas e detalhes lúdicos.")]),FRAME_SIGNATURE_MODELS=Object.freeze([preset("signature-runes","Aro Ancestral",{ring:{variant:"arc",colors:["#FBBF24","#F59E0B","#FEF3C7"]},ornament:{variant:"runes",colors:["#FCD34D","#F59E0B","#FFFBEB"]},particles:{variant:"sparks",colors:["#FDE68A","#FBBF24","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-bolt","Faísca Arcana",{ring:{variant:"arc",colors:["#FCD34D","#F59E0B","#FEF9C3"]},ornament:{variant:"bolt",colors:["#FDE047","#F59E0B","#FFFBEB"]},particles:{variant:"stars",colors:["#FEF9C3","#FDE047","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-heart","Doce Encanto",{ring:{variant:"arc",colors:["#F472B6","#EC4899","#FFFFFF"]},ornament:{variant:"heart",colors:["#F9A8D4","#EC4899","#FFFFFF"]},particles:{variant:"hearts",colors:["#F9A8D4","#FB7185","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-bars","Pulso Púrpura",{ring:{variant:"arc",colors:["#A78BFA","#8B5CF6","#DDD6FE"]},ornament:{variant:"bars",colors:["#C4B5FD","#8B5CF6","#F5F3FF"]},particles:{variant:"whales",colors:["#C4B5FD","#8B5CF6","#F5F3FF"]},motion:{enabled:!0}}),preset("signature-blade","Lâmina de Luz",{ring:{variant:"arc",colors:["#60A5FA","#3B82F6","#DBEAFE"]},ornament:{variant:"blade",colors:["#38BDF8","#64748B","#FFFFFF"]},particles:{variant:"sparks",colors:["#DBEAFE","#60A5FA","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-claw","Rastro Ancestral",{ring:{variant:"arc",colors:["#4ADE80","#22C55E","#DCFCE7"]},ornament:{variant:"claw",colors:["#86EFAC","#16A34A","#F0FDF4"]},particles:{variant:"sparks",colors:["#DCFCE7","#4ADE80","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-crest","Emblema Heroico",{ring:{variant:"arc",colors:["#EF4444","#B91C1C","#FFF1F2"]},ornament:{variant:"crest",colors:["#F87171","#B91C1C","#FFFFFF"]},particles:{variant:"sparks",colors:["#FFF1F2","#EF4444","#FFFFFF"]},motion:{enabled:!0}}),preset("signature-orb","Orbe Selvagem",{ring:{variant:"arc",colors:["#FDE047","#FACC15","#FEF9C3"]},ornament:{variant:"orb",colors:["#FACC15","#EF4444","#FFFFFF"]},particles:{variant:"sparks",colors:["#FEF9C3","#FDE047","#FFFFFF"]},motion:{enabled:!0}})]);function findFramePreset(ee){return FRAME_STUDIO_PRESETS.find(te=>te.id===ee)||FRAME_SIGNATURE_MODELS.find(te=>te.id===ee)||null}const DECORATIVE_LAYERS=["effect","particles","ornament"],FRAME_TIERS=Object.freeze([{layers:1,name:"Simples",hint:"nível 1–10"},{layers:2,name:"Composta",hint:"nível 10–20"},{layers:3,name:"Elaborada",hint:"nível 20–40"},{layers:4,name:"Lendária",hint:"nível 40+"}]);function activeDecorativeLayers(ee){return DECORATIVE_LAYERS.filter(te=>ee[te].enabled&&ee[te].variant!=="none")}function frameLayerCount(ee){return 1+activeDecorativeLayers(normalizeFrameVisual(ee)).length}function frameTier(ee){const te=frameLayerCount(ee);return FRAME_TIERS.find(ne=>ne.layers===te)||FRAME_TIERS[FRAME_TIERS.length-1]}const LADDER_STEP_LEVELS=Object.freeze({1:[10],2:[10,25],3:[5,15,30],4:[5,15,25,40]}),LADDER_STEP_SUFFIX=["I","II","III","IV"];function deriveFrameLadder(ee){const te=normalizeFrameVisual(ee==null?void 0:ee.visual),ne=activeDecorativeLayers(te),ae=ne.length+1,re=LADDER_STEP_LEVELS[ae]||LADDER_STEP_LEVELS[4],oe=String((ee==null?void 0:ee.name)||"Moldura").trim();return Array.from({length:ae},(ie,le)=>{const ce=ne.slice(0,le),de=DECORATIVE_LAYERS.reduce((ue,ve)=>{const me={variant:"none",enabled:!1};return{...ue,[ve]:ce.includes(ve)?clone(te[ve]):{...me,colors:clone(te[ve].colors)}}},{});return{type:"frame",name:`${oe} ${LADDER_STEP_SUFFIX[le]||le+1}`,status:!0,season_id:null,visual:normalizeFrameVisual({ring:clone(te.ring),...de,motion:{enabled:te.motion.enabled&&ce.length>0}}),availability:{kind:"level",level:re[le]}}})}function createFrameDraft(ee="aurora"){const te=findFramePreset(ee)||FRAME_STUDIO_PRESETS[0];return{id:null,type:"frame",name:te.name,status:!0,season_id:null,availability:{kind:"public"},visual:clone(te.visual)}}function validateFrameDraft(ee){var ne;const te={};return String((ee==null?void 0:ee.name)||"").trim()||(te.name="Dê um nome para a moldura."),String((ee==null?void 0:ee.name)||"").trim().length>48&&(te.name="Use no máximo 48 caracteres."),((ne=ee==null?void 0:ee.availability)==null?void 0:ne.kind)==="season_rank"&&!ee.availability.season_id&&!(ee!=null&&ee.season_id)&&(te.season_id="Escolha a temporada desta regra de obtenção."),te}function validateFrameRewardDraft(ee){const te={};return String((ee==null?void 0:ee.name)||"").trim()||(te.name="Dê um nome para a moldura."),String((ee==null?void 0:ee.name)||"").trim().length>48&&(te.name="Use no máximo 48 caracteres."),te}function framePayloadBase(ee){const te=normalizeFrameVisual(ee.visual),ne={ring:layerPayload(te.ring),ornament:layerPayload(te.ornament),effect:layerPayload(te.effect),particles:layerPayload(te.particles),motion:{enabled:te.motion.enabled}};return{type:"frame",name:String(ee.name).trim(),status:ee.status!==!1,visual:ne}}function layerPayload(ee){return{enabled:ee.enabled,variant:ee.variant,colors:[...ee.colors]}}function createFrameRewardApiPayload(ee){const te=validateFrameRewardDraft(ee);if(Object.keys(te).length){const ne=new Error("A recompensa de moldura possui campos inválidos.");throw ne.fields=te,ne}return{...framePayloadBase(ee)}}function createFrameApiPayload(ee){const te=validateFrameDraft(ee);if(Object.keys(te).length){const oe=new Error("A moldura possui campos inválidos.");throw oe.fields=te,oe}const ne=typeof ee.availability=="string"?{kind:ee.availability}:ee.availability||{kind:"public"},{season_id:ae,...re}=ne;return{...framePayloadBase(ee),season_id:ae??ee.season_id??null,availability:re}}const whaleSvgUrl="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%20512%20512'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--fxemoji'%20preserveAspectRatio='xMidYMid%20meet'%3e%3cpath%20fill='%2394DEF7'%20d='M508.36%20241.99c-.123-.424-.26-.795-.405-1.142c5.304%20107.375-138.325%20176.779-239.848%20176.779c-54.532%200-67.454-46.877-87.643-95.976a301.342%20301.342%200%200%200-1.632-5.615c-21.07-69.795-137.899-101.8-169.134-72.73C4.803%20247.599%202%20253.601%202%20261.516c0%201.012.018%202.017.049%203.018C4.113%20394.814%20139.282%20499.93%20269.945%20499.93c131.673%200%20238.414-106.742%20238.414-238.414c.001-4.659.673-17.2.001-19.526z'%3e%3c/path%3e%3cpath%20fill='%2300B1FF'%20d='M507.965%20241.215c-.006-.123-.004-.244-.01-.367c.143.342.279.708.4%201.126a161.121%20161.121%200%200%200-1.056-9.011c-.032-.278-.055-.554-.09-.833l-.031-.018c-8.724-58.79-48.079-97.941-77.889-113.876a132.97%20132.97%200%200%200-3.237-4.838c-.02-.079-.036-.152-.055-.234l-.549-2.538l-.585-2.947c-.36-2.108-.741-4.43-1.015-6.874c-.277-2.439-.456-4.996-.447-7.456c-.01-2.462.258-4.803.696-6.683a11.487%2011.487%200%200%201%201.611-3.982c.081-.089.16-.173.222-.266l.089-.14a.702.702%200%200%200%20.12-.109c.072-.077.123-.165.181-.25c.087-.066.163-.137.229-.216c.107-.171.334-.293.447-.489c.111-.074.213-.156.307-.246c.081-.097.17-.202.313-.289c.124-.094.243-.196.356-.307c.107-.114.309-.193.446-.31c.156-.111.279-.24.452-.356c.192-.108.38-.221.566-.341l.277-.184l.069-.047l.034-.024c-.514.261.717-.367.608-.313l.042-.025l.333-.198l1.329-.79l.663-.394l1.071-.669l2.165-1.446c.764-.505%201.293-.942%201.892-1.403c.59-.453%201.158-.931%201.73-1.397c1.104-.982%202.203-1.955%203.22-2.99c2.022-2.081%203.867-4.254%205.436-6.51a50.883%2050.883%200%200%200%206.825-13.662a51.363%2051.363%200%200%200%202.352-12.61a49.822%2049.822%200%200%200-.47-10.397c-.215-1.514-.544-2.927-.824-4.207a59.17%2059.17%200%200%200-1.018-3.503c-.719-2.096-1.418-3.699-1.976-4.794c-.542-1.093-.925-1.68-.913-1.734a3.677%203.677%200%201%200-7.354%200c.011-.054-.371.397-1.015%201.246l-2.719%203.598c-.566.756-1.18%201.579-1.86%202.449c-.64.878-1.393%201.793-2.129%202.753a140.065%20140.065%200%200%201-4.97%205.968c-1.784%202.016-3.684%204.002-5.631%205.805a51.29%2051.29%200%200%201-5.935%204.721c-.971.691-1.984%201.262-2.949%201.843c-.511.255-.988.537-1.477.802c-.254.118-.515.225-.755.359c-.235.121-.519.3-.64.307c-.156.047-.305.1-.448.162l-.243.131l-.699.327l-1.4.656l-.351.164l-.044.021c-.138.069%201.065-.543.523-.267l-.136.068l-.272.136l-1.086.55l-2.165%201.13c-.722.403-1.448.87-2.167%201.314c-.719.465-1.427.893-2.133%201.425l-2.097%201.607c-5.574%204.353-10.324%2010.744-13.017%2017.447a45.584%2045.584%200%200%200-2.618%209.686c-3.718-2.178-7.716-4.218-12.143-5.924c-5.35-2.082-11.365-3.729-18.329-4.023c-3.461-.156-7.197.17-10.933%201.044c-3.743.906-7.489%202.417-10.773%204.478l-1.213.787l-.3.2c-.105.069.617-.399.294-.188l-.039.029l-.079.057l-.314.228l-1.249.908l-.73.523c-.219.147-.326.283-.63.457c-1.047.756-2.107%201.382-3.138%201.994a38.17%2038.17%200%200%201-6.192%202.876c-1.033.359-2.068.709-3.092.949c-1.028.313-2.036.465-3.025.68c-1.967.338-3.827.559-5.39.655c-1.587.153-2.832.12-3.685.186c-.83.021-1.217.084-1.048.184a7.926%207.926%200%201%200-8.402%2013.442c.172.095.553%201.025%201.368%202.479a31.423%2031.423%200%200%200%204.07%205.575c1.984%202.124%204.66%204.542%208.256%206.574a39.084%2039.084%200%200%200%2013.332%204.725c5.245.91%2011.233.794%2017.244-.526c3.005-.653%205.986-1.638%208.894-2.852l.55-.237l.62-.298l1.242-.61l1.244-.628l.992-.526l.04-.021c.268.033.74.083%201.404.223c.805.193%201.855.443%203.02.848c2.357.761%205.185%201.989%208.117%203.41c1.452.739%202.981%201.462%204.476%202.283c1.505.807%202.979%201.696%204.503%202.526c1.509.85%202.988%201.743%204.443%202.643a129.62%20129.62%200%200%201%204.333%202.649l4.141%202.608l3.893%202.507l10.771%207.08c.101.136.196.268.299.406c21.579%2017.085%2036.028%2042.773%2038.141%2071.892c-.998-.854-1.982-1.651-2.872-2.397c-2.216-1.767-4.078-3.186-5.433-4.158l-2.201-1.569c-2.067-1.467-4.924-1.564-7.116-.024a6.16%206.16%200%200%200-1.498%208.581l.319.454l1.271%201.809c.84%201.192%202.011%202.966%203.359%205.101c.648%201.092%201.385%202.239%202.089%203.499c.714%201.253%201.468%202.563%202.174%203.95c.744%201.366%201.435%202.805%202.122%204.258c.728%201.437%201.291%202.949%201.939%204.41c.598%201.478%201.103%202.963%201.636%204.395c.413%201.451.884%202.854%201.219%204.198c.019.095.041.188.06.282a100.474%20100.474%200%200%201-2.494%208.182a55.331%2055.331%200%200%200-1.985%203.467c-45.484%2087.138-130.687%2078.792-180.854%203.023c-17.245-26.045-48.063-43.714-80.768-53.436c-18.699-7.551-41.129-10.855-64.603-10.855c-53.511%200-92.27%206.326-95.012%2048.874c30.674-21.373%20118.321.252%20153.936%2050.866c5.14%209.819%209.563%2019.925%2013.682%2029.94l.016.055c3.365%208.183%206.529%2016.287%209.717%2024.139c.393.969.788%201.934%201.182%202.895c.276.672.55%201.357.827%202.025l.006-.007c13.068%2031.496%2027.327%2057.82%2058.081%2064.988l.139.032a66.858%2066.858%200%200%200%204.419.868l.463.075c.624.098%201.255.188%201.892.271l.591.077c.601.074%201.208.139%201.82.199c.234.023.465.048.701.07c.591.053%201.19.097%201.791.138c.256.017.509.038.768.053c.617.036%201.243.062%201.871.085c.244.009.484.023.73.03a92.24%2092.24%200%200%200%202.646.039c1.609%200%203.228-.018%204.857-.053c.547-.012%201.102-.036%201.652-.052c1.087-.031%202.172-.059%203.267-.105c.652-.027%201.311-.068%201.966-.101c1.001-.05%202-.096%203.007-.159c.697-.043%201.4-.1%202.1-.149c.975-.069%201.947-.133%202.927-.214c.721-.059%201.448-.131%202.171-.196c.965-.087%201.928-.17%202.897-.268c.744-.075%201.493-.162%202.239-.244c.956-.104%201.911-.206%202.871-.321c.758-.091%201.52-.193%202.28-.291c.955-.122%201.908-.242%202.866-.375c.774-.107%201.551-.225%202.328-.339c.947-.139%201.893-.276%202.842-.425c.184-.029.367-.053.552-.082l.785%201.47l1.362%202.542l1.511%202.616l1.588%202.736l1.774%202.819l1.883%202.926c.629%201.001%201.32%201.96%202.048%202.98l2.184%203.048c.771%201.04%201.541%202.091%202.369%203.109c.793%201.021%201.705%202.08%202.562%203.124c.86%201.046%201.748%202.099%202.698%203.164c.971%201.041%201.898%202.072%202.93%203.111l3.091%203.108c2.144%202.086%204.409%204.038%206.827%205.976c2.336%201.948%204.899%203.813%207.508%205.514l4.009%202.49a60.862%2060.862%200%200%200%204.157%202.26c.706.351%201.39.715%202.106%201.043l2.158.954c1.449.605%202.821%201.288%204.3%201.783l4.373%201.444c1.443.459%202.922.799%204.352%201.181c2.876.749%205.788%201.081%208.545%201.524c1.383.2%202.787.209%204.138.307c1.359.052%202.683.189%203.991.143c1.301.005%202.595-.082%203.848-.136l1.86-.097l1.811-.196c1.189-.118%202.363-.321%203.496-.485l1.678-.264l1.622-.346c1.065-.219%202.106-.511%203.11-.758c1.003-.269%201.981-.481%202.91-.802a209.75%20209.75%200%200%200%205.216-1.868a79.912%2079.912%200%200%200%208.02-3.919c2.132-1.272%203.744-2.443%204.835-3.184c.546-.366.956-.697%201.233-.907l.418-.322a4.174%204.174%200%200%200%20.263-6.392l-.911-.83l-.458-.417c-.301-.272-.748-.7-1.316-1.176l-.946-.821l-1.116-.918c-.8-.688-1.701-1.367-2.69-2.158l-3.167-2.597c-1.117-.924-2.321-1.74-3.524-2.817l-3.72-3.034c-.645-.463-1.251-1.075-1.882-1.593c-.628-.522-1.254-1.091-1.888-1.598c-2.511-2.143-4.94-4.378-7.212-6.533c-.599-.478-1.092-1.15-1.652-1.649l-1.611-1.589c-.513-.543-1.007-1.115-1.521-1.612c-.53-.47-.994-1.05-1.474-1.576c-1.959-2.032-3.744-4.085-5.652-6.054c-1.905-1.947-3.878-4.015-6.065-6.197a682.294%20682.294%200%200%201-7.103-7.078c-2.505-2.473-5.193-5.031-8.038-7.729a315.84%20315.84%200%200%200%203.962-1.505c.444-.172.885-.348%201.328-.521a350.725%20350.725%200%200%200%204.768-1.91a313.805%20313.805%200%200%200%204.781-2.005a329.54%20329.54%200%200%200%203.989-1.747c.476-.212.951-.427%201.427-.641a305.31%20305.31%200%200%200%203.339-1.532c.376-.175.753-.348%201.128-.524a320.563%20320.563%200%200%200%204.26-2.046c.377-.185.751-.373%201.127-.559a294.32%20294.32%200%200%200%203.322-1.67c.423-.216.846-.431%201.268-.649a288.878%20288.878%200%200%200%204.238-2.228l.284-.155c1.329-.716%202.65-1.444%203.965-2.179c.394-.22.786-.442%201.178-.663c1.153-.652%202.3-1.31%203.44-1.976c.266-.156.535-.309.801-.465a285.739%20285.739%200%200%200%204.119-2.473c.295-.181.587-.364.881-.545c1.118-.69%202.228-1.388%203.332-2.092c.329-.21.659-.419.987-.631c1.359-.876%202.71-1.76%204.047-2.657l.121-.082a249.4%20249.4%200%200%200%204.754-3.28a238.369%20238.369%200%200%200%203.466-2.491c.147-.108.296-.214.442-.321a230.552%20230.552%200%200%200%203.864-2.908c.221-.17.439-.341.659-.512a218.993%20218.993%200%200%200%203.218-2.538c.235-.189.472-.377.706-.567a217.815%20217.815%200%200%200%203.734-3.089l.004-.004a212.063%20212.063%200%200%200%204.234-3.692a206.713%20206.713%200%200%200%203.333-3.043l.136-.125c1.175-1.1%202.33-2.213%203.471-3.335c.159-.156.315-.314.474-.471c.995-.985%201.975-1.979%202.943-2.981c.158-.164.318-.326.475-.491a177.773%20177.773%200%200%200%206.316-6.948l.49-.571a164.21%20164.21%200%200%200%205.848-7.245c.113-.148.223-.297.335-.446a158.277%20158.277%200%200%200%202.496-3.4l.293-.409a147.489%20147.489%200%200%200%205.086-7.678l.336-.546a136.36%20136.36%200%200%200%204.502-7.931l.234-.453a130.998%20130.998%200%200%200%201.881-3.77l.167-.346a125.44%20125.44%200%200%200%203.6-8.347l.214-.552a119.768%20119.768%200%200%200%202.918-8.553c.049-.164.096-.329.144-.493c.399-1.354.775-2.716%201.124-4.086l.081-.309a113.712%20113.712%200%200%200%201.063-4.606c.301-1.441.57-2.892.816-4.35l.098-.583c.491-3.002.865-6.04%201.115-9.112l.043-.569c.11-1.442.196-2.89.251-4.347c.004-.1.01-.2.013-.301c.057-1.592.081-3.193.071-4.803l-.003-.202c-.01-1.499-.055-2.997-.124-4.502zM356.242%20108.389a1.689%201.689%200%200%201-.207.161c-.525.374-1.155.726-1.641.873l.863-.465l.342-.184l.086-.046l.043-.023c-.469.306.692-.446.563-.361l-.049.045z'%3e%3c/path%3e%3cpath%20fill='%23EDEDE2'%20d='M176.205%20308.716a16.311%2016.311%200%200%200-.31-1.818c-12.97-55.324-43.201-75.19-75.053-86.142c-29.651-10.195-76.99-16.091-75.57%2014.413c41.872-11.739%20127.743%2017.345%20150.933%2073.547z'%3e%3c/path%3e%3cpath%20fill='%23D6D3C5'%20d='M85.928%20216.421l-6.395%2020.515l-.314-.078c-.744-.181-1.486-.356-2.227-.526l-.736-.167c-.332-.075-.662-.144-.994-.217l6.388-20.494c1.436.305%202.864.627%204.278.967zm-20.656-3.485l-6.344%2020.352c.304.032.607.061.913.096c.273.031.547.062.822.095c.68.08%201.362.164%202.048.255l.63.087l6.361-20.406a120.92%20120.92%200%200%200-4.43-.479zm35.57%207.82c-1.16-.399-2.35-.79-3.561-1.174l-6.407%2020.555c.79.252%201.581.512%202.371.776l.546.182c.41.139.82.284%201.23.426l6.408-20.558c-.196-.068-.391-.14-.587-.207zm-52.369-7.783l-6.142%2019.704c.136-.006.271-.012.407-.016c.584-.021%201.172-.036%201.764-.047c.27-.005.542-.007.813-.009c.537-.005%201.076-.007%201.618-.004l6.233-19.997c-1.605.07-3.173.191-4.693.369zm116.922%2063.139l-3.041%209.756c.297.362.599.721.89%201.087l.047.061c.8%201.007%201.571%202.031%202.329%203.063l2.458-7.887a129.759%20129.759%200%200%200-2.683-6.08zm-8.388-14.817a100.83%20100.83%200%200%200-3.195-4.439l-4.766%2015.288a125.806%20125.806%200%200%201%203.56%203.267l4.401-14.116zm-13.148-15.651a95.275%2095.275%200%200%200-3.552-3.257l-5.891%2018.561c1.268.849%202.525%201.71%203.762%202.594l5.681-17.898zm-115.01-23.571l-3.604%2011.563a27.64%2027.64%200%200%200%20.028%201.54c.354-.098.707-.195%201.066-.288c.229-.06.457-.12.689-.177a61.822%2061.822%200%200%201%202.213-.501c.142-.03.287-.056.43-.085l5.386-17.28c-2.495%201.365-4.595%203.094-6.208%205.228zm101.376%2012.692a102.81%20102.81%200%200%200-3.822-2.404l-6.369%2020.012c1.312.694%202.613%201.409%203.906%202.138l6.285-19.746zm-14.108-7.87a131.68%20131.68%200%200%200-4.013-1.805l-6.499%2020.478c1.349.564%202.693%201.145%204.032%201.744l6.48-20.417z'%3e%3c/path%3e%3cpath%20fill='%232B3B47'%20d='M243.055%20335.671c6.275%200%2011.371%205.085%2011.371%2011.381v13.973c0%206.285-5.096%2011.382-11.371%2011.382c-6.285%200-11.381-5.097-11.381-11.382v-13.973c0-6.296%205.095-11.381%2011.381-11.381z'%3e%3c/path%3e%3c/svg%3e",harrysWandUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAA11UlEQVR42uzav6ue9QGG8U9MSMAYJIgoKg4SXPxBpxBwEbQ6dBCtILSCIAi1IELbyUmnujlI61BwEATBJaDVtlAiGQPBRZSASJAQCZE2sSSpiTnfToFDCbE5533f50l6feD6G+7lliRJrnk34zf4O07iAo7jb/g1dkqSJNeVX+KfGFfoOH4uSZJc87bhDxj/Y2v4nSRJcs3ahT9jXGVreEqSJLnm3IHDGBvseJ+AJEmuLT/BMYxN9itJkmT+8DP8C2MB/UWSJJm9F3ABY0EdkyRJZusGvIGx4P4tSZLM0k7sx1hCJyRJktm5HYcwltRfJUmSWbkfRzGW2MuSJMls/BSnMJbYP7BLkiSZhedxHmPJ/UKSJJncFvweYwX9UZIkmdwOvIuxgj7GNkmSZFK34CDGCvoMN0uSJJPagyMYK+g47pYkSSb1EE5irKAz2CtJkkzqGZzDWEE/4AlJkmQyW/Aq1jBW1EuSJMlktuMdjBX2hiRJMpndOICxwj7EVkmSZBL34AuMFXYYOyVJkknswwmMFXYMd0mSJJN4GmcxVth3eFCSJJnEy7iIscIu4DFJkmTltuEtjAl6UZIkWbld+Ahjgl6XJElW7k58ijFB7+MGSZJkpfbiG4wJOoQbJUmSlXoSZzAm6CvcJkmSrHddPv0vdQr3S5IkK7MVb2JM1Hk8IkmSrMxN+ABjotbwnCRJsjJ34DDGhL0mSZKszAP4GmPC3sMWSZJkJR7HaYwJO4gdkiTJSryACxgT9iVulSRJlm4LXsWYuG9xryRJsnQ7sR9j4r7Hw5IkydLdjkMYE7eGZyVJkqW7D0cxTN8rkiTJ0j2KUxim721JkmTpnsd5DNP3CbZLkiTX/dP/Up9jtyRJsjQ78C7GTDqJPZIkydLcgoMYM+ks9kmSJEuzB0cwZtJFPCVJkizNQziJMaN+K0mSLM0zOIcxo/4kSZIs9em/hjGjPsY2SZJk4bbjHYyZ9RluliRJFm43DmDMrOO4W5IkWbh78AXGzDqDvZIkycLtwwmMmfUDnpAkSRbuaZzFmGEvSZIkC/cyLs50/N+QJEkWahvemunwD3yIrZIkycLswkczHf6Bw9gpSZIszJ34dKbDP3AMd0mSJAuzF9/MdPgHvsODkiTJwjyJMzMd/oELeEySJPm/ePpf6kVJkmQhtuLNmQ7++l6XJEkW4iZ8MNPBX9/7uEGSJNm0O3B4poO/vkO4UZIk2bQH8PVMB399X+E2SZJk0x7H6ZkO/vpO435JkmTTXsCFmQ7++s7jEUmSZFO24NWZjv1/t4bnJEmSTdmJ/TMd+8v1miRJsim349BMh/5yvYctkiTJht2HozMd+st1EDskSZINexSnZjr0l+tL3CpJkmzY8zg/06G/XN/iXkmS5Lp/+l/qezwsSZJsyA68O9ORv3ys4VlJkmRDbsHBmY78lXpFkiTZkD04MtOBv1JvS5IkG/IQTs504K/UJ9guSZJctWdwbqYDf6U+x25JkmRDT/+1mQ78lTqJPZIkyVXZjndmOu4/1lnskyRJrspuHJjpuP9YF/GUJElyVe7hP+zdS2zWdb7H8ffTK/RCqaU3WlpKS+kdCr1B5Y7AqCMDo8OMMjExcTEnMSbHnSvduXPhwoUnLkxMTNyYaHSpcXaHEDdGY2KMx8wZYzAnYgJGEH4H/+c8JDgdbMvzfeZ5+rxfyWf9//1Xn16+3/+PT0u03JeTZ5AkSSuyAHxTosW+nLyCJElakYeBKyVa7MvJe0ANkiRp2Z4GrpdosS8nHwMtSJKkZakF/gNI0cnlcgmIyH8DvUiSpGVpBt4tRvFvbGxIQEQuA3NIkqRl6QE+ii7/muqqtK2rI1XF/Pb/E3AKSZK0LHPA19Hlv76uLu3e1p9qq6ujnvEUkiRpWU4Dl6PLv6WxIe0fG04N9XVRz3gRSZJUOpP+nRtb0rGp8cj/+78DVCNJku6oGngJSNHp79iUTk5Ppu7WjVHPuAA0IkmS7qgJeLsYk/5jW3rSb3ZPpYHO9qjn/M11P0mSft1m4EJ0+VdXVaWZwa1Z+U/290Y953tgCkmSdEeTwFfR5V9fW5sWR7Zn5T87NBD1sZ9rwHEkSdIdnQAuRZd/8/p16fDE6M/ln03818St+/0FSZJ0R08C16LLf9OG5nTfzvGs/I9Mjqb1dbVRz3oBSZL0T+WA54AUnS2b7vl50j8r/+O7JlJL3Lrfm0AVkiRpSY3AW8WY9N/R0/1z8Wc5eTOdLRuinnceaECSJC2pC/jPYkz67/m/Sf98sp1/ICJfAJ1IkqQljQNfFmPSf9//T/rnM9q7Oep5l4AJJEnSko4B3xVj0v/QxMht5T8zGLbudxU4iiRJWtITwNX4Sf+m/KR/PtnOf3VVVcTzbgCPI0mS/nWT/r1ttyb9b+Xw5GhaVxu27vc8kiTpH9QDrwMpOkPdnfnSv5X7dk5k/w4AIvIGkEOSJN2mDfgwuvircrm0a6Dvl+Wf/SWgI27d70OgHkmSdJsh4LPo8q+tqU4Lw4NZ4f8yfe1tUc/9HGhHkiTdZhG4GF3+DfV16cD4jqXKP/vwDxCRb4FhJEnSbc4CP0SXf2tTYzo6NbZk+U9v60+5mOf+CBxGkiT9w6T/jejy72lrTSemJ5cs/32x637nkCRJ5NUBrxVx0n+pZB/+qa+tiXr2s0iSJPJagfeLMem/c+uWf1b+2Yd/Atf9XkWSJJG3Dfi0GJP+80tP+t9a92trbop6/gdAHZIkKbMAfFOUSf+x/KT/ksnu+Qci8gnQiiRJyjwMXIku/42NDflJ/3+a7d2dUc+/CAwhSZIyTwPXo8u/a2NLOr5r4k7ln339D4jIFWABSZJEDfAykKLT37EpncwX/dLJvv5XFXO173XgDJIkiWbg3eDiz+7qn+jryQr+Tjk4PpLqasLW/Z5BkiTRA3wUXf411VVpZmjgV8v/2NR4aqyvjzrHK0iSJOaAr6PLf31dXdo/Nvyr5X8idt3vPaAGSZIq3GngcnT5tzQ2pCOT2aT/r2bzPa1R5/gYaEGSpApXlEn/zmVM+ucz2NURdY6/A31IklTBqoGXSmXSP5+p/i1R57gMzCFJUgVrAt4uxqT/2JZs0n9ZmY9b9/sJOIUkSRVsM3AhuPyza3pnBrcuu/z3j+1ItdXVUed5CkmSKtgk8FV0+dfX1qbFke3LLv+jU2PZPQBARF5EkqQKdgK4FFz+2TW9hydGl1v+2WDgxsaGqPO8A1QjSVKFehK4Fl3+mzY0Z3f1Z+W+zHS3bow6zwWgEUmSKlAOeA5Iwcmu6T05Pbmi8h/obI86z9+AXiRJqkCNwFvFmPTf0dOdFfpKMtnfG3Wm74EpJEmqQF3A+WJM+u/OT/qvILNDAykXs+53DTiOJEkVaBz4shiT/vvyk/7LT3YPQOC631+QJKkCHQO+K8ak/6GJkRWX/5HJ0bS+rjbqXC8gSVIFegK4Gj/p37TiSf/8ul9L3Lrfm0AVkiRVkKJN+ve2rXjSP8vJm+ls2RB1rvNAA5IkVZB64HUgRWeouzMr81UkuwwIiMgXQCeSJFWQNuDD4OLPLufZNdC36vKf6OuJOtslYAJJkirIEPBZdPnX1lSnheHBVZf/zGDYut9V4CiSJFWQReBicPlnl/McGN+x2vLPLgOqrqqKONsN4HEkSaogZ4Efosu/takxu6FvleWfrfutqw1b93seSZIqRH7S/0Z0+fe0taYT+Un/VeS+nRPZdwKAiLwB5JAkqQLUAa+V+qT/zWQrgh1x635/BeqRJKkCtALvF2PSf+fWLVmJ30362tuizvg50I4kSRVgG/BpMSb95/OT/neRkZ7uqDN+CwwjSVIFWAC+Kcqk/9iOuy7/6W39KRdzxh+Bw0iSVAEeBq5El//Gxob8pP9dZV/sut85JEmqAE8D16PLv2tjS3Y5z12Wf3YjYH1tTdQ5n0WSpDWuBngZSMHJvst/8q6KP7/uNx657vcqkiStcc3Au9HFn8vlsu/y5wv8btf92pqbos76AVCHJElrWA/wUXT511RXpZmhgay8C5Etm8LW/T4BWpEkaQ2bA76OLv/1dXVp/9hwwcp/e3dn1FkvAkNIkrSGnQYuR5d/S2NDOjI5Vqjyz64FBiJyBdiLJElrWFEm/TsLM+mfT3YtcFVVLuKs14EzSJK0RlUDL5XTpH8+B8dHUl1N2LrfM0iStEY1AW8XY9J/bEs26V+wHJsaT4319VFnfgVJktaozcCFokz6D24taPmfiF33ew+oQZKkNWgS+Cp+0r82LY5sz0q7kOm5pzXqzB8DLUiStAadAC4V45v+RybGCl7+g10dUWf+O9CHJElr0JPAtejy725tSSemJwpe/lP9W6LOfBmYQ5KkNSYHPAek6Ax1d6QH9uwsePnP/7zulwtb9zuFJElrTCPwVjEm/Xdv60sPze0qePkfGNuRaquro87+FJIkrTFdwPliTPofmtiRfjc/XfDyPzo1lhrq66LO/iKSJK0x48CXxZj0v3/PZPr93j0FL//juyayYUIgIu8A1UiStIYcA74rxqT/mYXp9IfF2aywC53u1o1RZ78ANCJJ0hryBHC1GJP+f7x3Nsv9AUN/A53tUWf/G9CLJElrRFEn/R87OJ/+dGAupPwn+3ujzv49MIUkSWtEPfA6kKIztbU3/fnQQjp3cCE9OFP4if/ZoYGUi1n3+wl4EEmS1og24MPo4q+uqkr7x4ZSVv6H5tNv5wo/8b9/bDhy3e8vSJK0RgwBn0WXf31tTToxPf5z+Wf53fzugpf/kcnRbKMAiMgLSJK0RiwCF6PLv3n9upuFv+tW+Z8JWvdriVv3exOoQpKkNeAs8EN0+Xe0NKc/LM7cKv9H9s0UvPxP3kznxg1R73AeaECSpDKXn/S/EV3+g13t6bED87fK/4/759Jv9hR+17+/Y1PUO3wBdCJJUpmrA14r5qR/Po/unw9Z95voC1v3uwRMIElSmWsF3i/GpP/i6NBt5f/YwYX0wEzhy39mMGzd7ypwFEmSytw24NNiTPof3zWWL/5b+e1s4Xf9F0e2Zz9sAIXODeBxJEkqcwvAN8WY9H9obuft5X9wIZ2ai1n3W1cbtu73PJIklbmHgSvR5d++oTk9srjnH37zP71Q+PK/b+dE9sMGEJE3gBySJJWxp4Hr0eXf335PevTAXL70Y9f9pidTR0vYut9fgXokSSpTNcDLQIrOSG9X9j3/X5b/2Xtjrvbta2+LepfPgXYkSSpTzcC7wcWfTd7PDw9kZf+LhN3uN9LTHfU+3wLDSJJUpnqAj4LLP7to5+jUyFLln33058GA8p/e1p9yMe/zI3AYSZLK1BzwdXT5N62rTw/N7lyi/LPb/ULW/fbFrvudQ5KkMnUauBxd/ps2NKVH9mWT/kvmVMDVvocmRrJvCwAReRZJksrUvxdj0r9pfX06PLEjHds5umQWR7enue3bCprZoYHUtC5s3e9VJEkqQ9XAS0AyK84HQB2SJJWZJuDtEi3XUs8nQCuSJJWZzcCFEi3XUs9FYAhJksrMJPBViZZrqecKsBdJksrMCeBSiZZrqec6cAZJksrMk8C1Ei3XcsgzSJJURnLAcyVaquWSV5AkqYw0Am+VaKmWS94DapAkqUx0AedLtFTLJR8DLUiSVCbGgS9LtFTLJX8H+pAkqUwcA74r0VItl1wG5pAkqUw8AVwt0VItl1wHTiFJUhlw0r9weQpJkspAPfB6iZZpueVFJEkqA23AhyVapuWWd4BqJEkqcUPAZyVapuWWC0AjkiSVuEPA/0QX4/q62tTW3Lii3NPUmFoa1hc8Vblc1Hv+F9CNJEkl7izwQ3T5d7VuSGfvnUl/PrSw7PzpwFy6f8/O9JvdUwXNRF9v1Ht+D0whSVIJy0/634gu/8Gu9vTYgfkVlf+5gwvpwZldBS//2aGBlIv57f8n4EEkSSphdcBrQIrO1NberNBXknOH5tNDs9MFL//9Y8Oppro66l3/DUmSSlgr8H508VdXVaXF0aGs0Fea383vLnj5H5kczWYQgIi8gCRJJWwb8Gl0+dfX1qTju8ZWVf5n9u4pePkf3zWRWhobot73TaAKSZJK1ALwTXT5N69fl07N7VxV+T+yb6bg5X/yZjpbNkS973mgAUmSStTDwJXo8m/f0JweWdyzqvI/e+9sVtiFTn/7pqj3/QLoRJKkEvU0cD26/Pvb29KjB+ZWVf6P7p8PWfcb7d0c9b6XgAkkSSpBNcDLQIrOSG9Xtra3mvJ/7OBCeiBg3W9mMGzd7ypwFEmSSlAz8G5w8WcFOz88kBX5avPb2cKX/+LI9mwLASh0bgCPI0lSCeoBPoou/7qamnTfKif9sxxcSKfmCr/ud3hyNK2rDVv3ex5JkkrQHPB1dPk3ratPD+Un/VeZ0wuFL//7dk5kWwhARN4AckiSVGJOA5ejy3/Thqb0yL5VTPpHr/tNT6aOuHW/vwL1SJK0Mmtj0r+v/Z70p/2rmfSPX/fra2+Leu/PgXYkSSoh1cBLpT7pH327346e7qj3/hYYRpKkEtIEvF2MSf+57VuzAr+LZLcBPjBT+PKf3tafcjHv/iNwGEmSSshm4EJw+Wc35x2ZHLnL8s9u9wtZ99sXu+53DkmSSsgk8FV0+a+vr0sPzExmBX63OTVX+Kt9D02MZJcOARF5FkmSSsgJ4FJ0+bc2NaQze3fnC7wE1/3GI9f9XkWSpBLyJHAtuvw337Mx/fHe2YKU/+/37QlZ92trbop6/w+AOiRJKgE54DkgRWf75o507uB8vsBLct2vp6016v0/AVqRJKkENAJvFWPSf3Yom/QvRLJvBdy/p/Dlv727MwERuQgMIUlSCegCzsdP+lelwxM7Clb+jx6Iudp310BfAiJyBdiLJEklYBz4MnzSv672ZllPFqr8sw8FPRhwte/C8GCqirna9zpwBkmSSsAx4Lvo8t/Y2JDOLEwXrvyD1v0Ojo9kNw8CEXkGSZJKwBPA1ejy725tyU/6FyxnAtb9jk2Np8b6+gRE5BUkSfoVa2bSf6i7Iz2Wn/QvUH6/t/Drfidi1/3eA2qQJP0ve3cWI9lZnnH8X73v+7739L5Ud9d0dVXP9DabZ8zsnq1n6eBIIY5CgrgggRByAYhEoEQCK0oQJEIROIAgEkRmu0AK4BihGAcQi0NYQoLjgLAQGI/J2J55M31CCbDA7vF8X51TdZ6f9Ghu5+756vT3fq+EqBL4e8B8Z26oLyhsl9lc8TPu19PibdzvK0AjIiIiIWoFPuO5+IP38temx5yX/8Xtcb/d7m/8j3R1GOAjjwEDiIiIhGgU+Lrn8g/eyz+SmnlueUd2u9/cYL8BPnIVyCAiIhKiFeAHnss/eC//dHbBfflvZO34kvvyz/od9zuFiIhIiDaBn/ou/67mBttcTQeF7TQby3bSw2rftekJKy8tNcBHXoGIiEhIcjf9b/gu/5Gu9uATfVDYjnM6637W/+DctNVUVhjgI29FREQkJBXAuwv1pn8uZz3M+h9emA0eJQJ85CNAKSIiIiFoBv4pHzf9V6ZGvZX/hZW0l3G/7uYmA3zkYaAWERGREOwCHsnHTf/DC9O+yj94NdDHgp/hznYDfORRoA8REZEQLAPfz8dN/1OZeW/lf2k946X8k4N9BvjIE8A8IiIiITgHPOW7/Nsb6u38yuJzSzvy2/2WRoct4Wfc71ngOCIiIiF4JXDdd/kPtrfa5fVMUNS+cnIp5WHcb9zK/I37vRwREZE8KwPeDpjvTPZ1Bb/OfZb/6az7G/8HklNWXVFugI+8GRERkTyrBz7mufiDz+bZ8eFcSXsc91v0Mu7X6G/c74NACSIiInnUC3zBd/lXlJXZHfPT3sv//F7343533kxnY4MBPvIQUIOIiEgeZYD/8V3+dVWVdjIz7738N1f9rPYdbG8zwEe+DXQiIiKSR3cBV32Xf1tDnZ3fu+i9/C+vZb2M+0319RjgIz8GZhEREYGc4rjpP9DeYpfWMt7L/8rGsh3zMO6XHvE27vc0cBAREZE8KQX+slhu+udywsN2v5XJseB5YsB1bgB3IyIikid1wP35uOmfGRvyXvq51b6nMu7H/fYnp6yq3Nu43xsQERHJkx7gYc/lHzyQcyA5mSto7znjYbvfHfOzwfPEgI+8H0ggIiKCf0ngv3yXf3VlhR1LJ3PlXJjjfqmkdfgb93sAqERERAT/jgA/9l3+zXU1dmbP7lw5F+y430B7qwE+8k2gHREREfz7beAZ3+Xf09IUrNt9TkkX3Ha/id5uA3zkcWAcERERzxLA6wHznbGeDtvayOat/K+sZ+1Y2n35p3YNWgIM97kG7EdERMSzWuDD+bjpvzQa3PTPW7b2Zb2M++31O+63hYiIiGddwEP+b/qX2P7ZiaCU85lTGferfffNTlpleZkBPvI6REREPJsBvuO5/INVuEcXk7lSLvBxvxmf437vQkRE5DlKgTngHuCvgPcCHwc+BzwIfBh4B/BG4CTQzPO7A/iR7/Jvqs3vTf9czu51v9r3SCpprfV1BvjIJ4FyREREgErgAvAx4Ce3WCjXgS8CfwEs8MteBjxdbDf9c9lc8TPu19vabICPfBVoQkREYq8XeBvwuMOS+RfgHPDmYrzpn8ulte1xP/flP9bTZYCPfA8YQkREYq0aeA3wBGCFmrmhvqCM853L635W+y4MDxjgI08BexARkVg7DPxnVEt9BwnG4tZnxsMo/2CD4HEPq32Xx0esxM9q3+vAGUREJNbuAZ6JarHvIMFY3JHUTDjl72ncb2Nm0irKvI37vQoREYmtauC9US31naaxptruWk7lCrkoxv0Ozc1YbWWlAT7ydkREJLZKgQ9FtdR3mo7Geruwkg6t/M/uKbhxv08AZYiISCwlgHdFtdR3mpGu9u139nNlXDTjfj0t3sb9vgI0IiIisfXnUS31qN/0z+Xi9rjfbvc3/ke6OgzwkceAAUREJLZ+P6qlvtOb/itTo6GWf7Ddz8O439xgvwE+chXIICIisXUZuB7Vct/JTf/DC9Phlv9G1o4vuS//rN9xv1OIiEhsHQKuRbXcXyDBApxTmfmghEPLxrKd9LDad216wspLSw3wkVcgIiKxlQWejGq57+Sz/9ncQp8Qczrrftb/4Ny0VVdUGOAjb0NERGJrDPh+VMt9p+lsagje2Q9t1t/DuN/hhdlgWyHgIx8BShERkVjqBb4T1VIvlEPA+ZW0l3G/7uYmA3zkYaAWERGJpUbgi1Et80I5BFxcXfKy4Ge4s90AH3kU6ENERGKpCvhnXyVcXVFuU33dtjY9Zofmp4J/p/u7ra6q0gDv6W5utMvrGf+rfdczXsp/dqDXAB/5MZBERERiKQHc56t8Z/p7nu8XeDCm19nUUPCHAF/b/dKjw5bwM+73DHAEERGJrdf5Kt09E7t2XKD7kxPbXwoK9hBwcsn9jf/VqXEr8zfudw8iIhJb54AbPgomtav/Vks0WNLT19pccIeA01n32/0OJKesyt+B6C2IiEhspXzN+o/3dN7Gp/SsTfR2Fcwh4Oyyn3G/Rn/jfh8EShARkVjqBr7ro2D621qCEr/dYl0aHbJExA8B5/e6H/e782Y6G73diXgIqEFERGKpBvi8j4Lpampw+nl97+RIZA8Bm6t+VvsOdrQZ4CPfAjoQEZFYSgDv81AuwQt1m6tp15frgpHBRCIRqUPApbWsl3G/qb4en+N+s4iISGy9yUfB1FZW2Jmfv71f1IeAKxvLdszHuN+It3G/p4GDiIhIbF0AbvhYuXvy51v3iv4Q4GO738rkWLDACHCdG8DdiIhIbKWBp3xs3bszNfNCpVkcdwI2lu1UxtO4X7m3cb83ICIisdUPfM9xsQS/xg8kJ3MFWfSHgDPL7sv/jvkZq6+uMsBH7gMSiIhILFUAn/P8yl/RHwLO+Rj3SyWtraHeAB/5DFCJiIjE1l/7KJjp/u5cORb9IcDXuN9Ae6sBPvJNoB0REYmtyz4KpqelKffQT9EfArqaG+1IKum8/Cd6uw3wkceBcUREJLaSwFXXBdNYU7297z5XwLE4BLQ11AVP87oq/9SuQV//32vAfkREJLbqgUd8jPudzi7kileHgBeRvX7H/bYQEZHYSgD/4LpgShKJYG//zbKNbKJ+CNg3OxkcogAfeR0iIhJrf+SjYJbHd0W2+AvhEOB53O9diIhIrO0HninGG/+FfAjYHvdrra8zwEc+BVQgIiKx1QU8Vsw3/gv1ENDf5m3c72tAMyIiElvlwANxuPFfaIeAse5OA3zkB8AoIiISa/c6Lpfgbfq7llORLfdCOAQsDA8Y4CNPARlERCTWXuJ6w18C7ODcVGRLvRAOAcvjI1ZS4mVz4XXgDCIiEmudPpb8pIb7I1vmhXAI2JiZtIoyb+N+f4CIiMRaAvio64Lpa222rY1olnghHAL2J6estrLSAB/5G0REJPZe5bpg6qorbXM1HdkCL4RDgJ9X/oJ8HChDRERiLQVcc11cRxeTkS3uQjoEeMhXgEZERCTWaoBHimm3vw4Bz5vHgAFERCT23um6ZEa7OyJb1DE/BFzVuJ+IiACcdl0yzXU1dnk9E9mSjvEh4DpwChERib1e4HGHBROMqt2VLfzHfor0EPAKREQk9kqAT7oumX2z45Et5ZgfAt6KiIgI8GrXJTM70BvZMg4r6dGhKBwC/hEoRUREYm8JuOb4wZqC3PDnO3ct77bkYF+Yh4DPA7WIiEjsNQLfclkyZaWldiqzENkSDjPH0wvBU74hHQIeBfoQEREB3uu6aFamRiNbwGHm0nomt8gnjEPAE8A8IiIiwO+5LprB9pbIFnDYObO8GBR/CIeAZ4HjiIiIAHPAUy6Lprayoujf+X+xubKRtaOL80Hph3AIeDkiIiJAHfBvrvf7H16YjmwBR+DyX67w830IeDMiIiIQeL/ropkb6ots+Yadi2uZXNHn+xDwIaAEERER4Hdcl397Q71G/n5Nrqxn7Vju0//ODgF67EdERJybBZ5yPfJ3OquRv1+VrY1lO7EUlP8tZaSrwwAX+SIiIhJ7wd/9NfKXn1xez+bK/5Zz58001ta4WvZTjYiIxNp9rst/uLMtsgUcZjZXM3YsHZT/i056ZNgAF0khIiKx9Vuuy7++usouri1FtoTD+eT/fLf9b/0rQHlZqQG3m/OIiEgszQJXXZZ/aUmJHUsnI1vEYd30P5775O8oHY0NBtxufhcREYmdWuBrgLlMZmwoskWc5wTTD2dyv/odp7+txYDbzR8jIiKx83euy39AT/1aLhdWluzYYlDWXjLQ1mrA7ea1iIhIrNztuvzrqir11O/PPvefXAq2+nlNa32dAbebP0RERGJjGnjSZfmXlCRultJsZEs5P6N9GTudCT73e8/hhdngjQXgdvNSREQkFmqALwPmMunRwcgWc17+zr9nMbfMx0O8vgi4hoiIxMLfui7/vtbmyJazz2zty9q5Pel8Fn+QQ3MzVlleboCLdCMiIkVvCzDXK34vrMTr7/7bv/jP703v4DEfL5/+Hf3tP8h/ICIiRW8C+InTFb+JhB1JzUS2qH085HNub/5/8eeyMTNpTbkngN3k3YiISFGrBr4EmMukdg1Etqxdf+o/u/2LP6TivzOVtPGeruCBJcBlLiMiIkXtna7Lv6elybY2olnY7n7xh1r8QfZMjAbPKgOu8xOgFhERKVrO5/2rKyvs/N7FyBa3gx39wet9R3eHV/x3zM/YQHurJcCAXPT5X0REdmTO9Tv/CbBD81ORLe/byeW1rN2V3W0vCV7vCy+LI0NWVVFugM/sRkREilIT8A3XxTE/1BfZAr+Nl/tyD/iEmtWpcWtrqDfAd+5HRESKUgL4sOvi6GpqsK2NbGSL/JaysWybK0t2IpMKvfgPJKe3F/sEUxWA7zwNJBERkaL0WselEXySPrdndzTL/FZn+FfSdjy9EHrxH0klbaqvJ/ekb77yFkREpCgdAJ51Pe9/eGE6sqW+wxl+B4/3uMvC8IBVV1QYkM98TTf/RUSKUy/wfdfFsbuA5/3//0b/Tt/p95+l0eGdPObja+xvGhERKTrlwIOui6O/rTDf+b+0fbEvm7Kju+fiXvwGPAucRUREitK9zt/5r6osuHf+L64u2ancxb4IZHl8xFpyb/eHkxvAyxARkaK06bg0gmdnj6WTkS36XzXKdzJCxZ8O9xd/Lk8Dv4mIiBSlKcdLfoLsmdgV2bL/pVG+1SU7sRT+jf7cm/3zQwPWWFNtQNh5HNiHiIgUpSbg667LY6SrPZqF/7Ns3cyFvZEY5cvt5w+W9VTldvSHn08AQ4iISFEqAe53XBzBZ+tLa5loFv9G1s4FxR+NG/3rMxM22NGW29IXhfwQuAdIICIiRevPXBdIeVmpncosRPYXf1Rm+NOjw7kne6OU9wDtiIhIUTsD3HBdIusz45H7G/+F1WgU/+GFWZsd6LO6qqqoFf+jwGlERKTozQFPui6S6f7uCJV/dC73bcxM2q7O9uDrCBClXAfeAdQjIiJFrxX4tusyaW+stysbWRX/LyQztss6GhssAUb08lkgjYiIxEIp8AkfS37O7tkdjTn+kIv/yELS5ob6rb66yohm8X8XeKku+YmIxMvbAHO95OfQ/FS4T/auh7+L/+DctO3q6rDy0tKoFv+TwJ8A1YiISKz8ho9iWRjuD29Jz8b2kp7wi3+0u9PKolv8N4APAAOIiEjsLAE/dV0uPS2NtrURTvmf27NoR3eHd7N/f3IqN78f1eI34AH9nV9EJL46ge8CVgwrfjdXl0J9xGffbEEU/5eA8/o7v4hIfFUBnwWs0A8Al9czwQNDYY7y9be1WEkiEdXSN+Bh4ISKX0Qk3hLA+wAr5APA9p8Yzm5/7l+cD+kX/6T1tjZbItrF/6/AKRW/iIgAvAmwQj4AbK5mQnvB79D8TPB4T0lJpIv/y/rULyIiv+huwAr1AHBlYzm0sb4jqaRN9nVbeVlkb/Ub8Gn94hcRkedaA/63UA8AwcKekD73L44MWU1lRVRL/2ngA8AyIiIizzEC/ACwQjsAXF7LhvaK356JUWuuq41q8f8IuBfoR0RE5FdoBf4dsEI7AJzfm7aji+Hs4u9qboxq8X8DeCVQi4iIyK9RCTwAWCEdAK6sZ+1kJpX34r9jfsaGOtqierP/08Ax/X1fREReSAJ4D2CFdAA4F/zqnw/j7/zB8qIIruW9H9iLiIjIDr0RsEI5AGy/338qkwpjnj9YWQxEKdeAdwPTiIiI3IKLwI1COQBsri7lfa7/zlTSpvp6ovZ07xPAvUAfIiIit2gfcA2wqB8AtvYFr/nl/Vd/dnzE6qoitZf/MeA1QCMiIiIvwizwQ8CifgDYHu87sbSQ71f8goU9iegU/7eAV2oXv4iI3I4h4L8Bi/oBYHNlKe/jfXOD/VF6xe8h4CxQgoiIyG1oBR4BLOoHgDN5/uR/cG7aOpsaolL8X9Ab/SIi4koN8CBgUT4AXNnI/2x/emTYKssjMdr3IHACERERR8qAjwIW5QPAxbWMHVvM79/6e1uaDQg7nwIOICIi4lBJ7qGfKB8ALqyk7SV5LP/M2K4oPOjzWWAfIiIiHrw1iuUPBAeAfP+9//DCbLCnP+Qb/l/V3/hFRMSnP/VUYE7W3qZ29Qev+uVza19tZWXY43xbutUvIiI+vdpXkc0N9tpYT4cBt5Wpvu78vOZ3M2PdnWEu73kMeDlQjoiIiEf3+Hrid6SrPfhs7+IAMNHbnZfxvraGurCK/yrweqAGERERz64A130UWk9L0/aYXsEcAJbHR6wqnPG+G8B9QD8i8n/t3WtsnuddgPHL5zi248RxncSxHcexc/D57Jwcp7QhUZKmIeeTpqFOnRAwvq0ggVQhgUYlKhASgwkqAWNIgOADElonIYo2DpqgfNgmpIlRUDsqytqFQ0eSpXnI+5RJ1aumrPF9P4fX10+6JX/1++X6P6f7lpSBC8B3Y0Stq6Mtubq8UIl/KQaAygE+9fnc8v8ycAhJkjJyDrgTI2rt61qSCwfnKuEv/ABwbGos2bqpM4/wvwY87Qt+kqQsnY0V/5amxuTM4lQl+oUfAA7tHUm/TsjhTP6f9Tm/JClrJ4BbEcKWnoF/fGasEvzCDwCTg/15nNn/RWAMSZIydjJS/NNP5lbGdldiX+gB4Pj0RB7b+b4JfMyNfCRJeTgL3I4VucWRwUroCz0A/MDEaLKxbX3W8f8s0IMkSTm4BNyJFbmpwb5K5As9ABzetztpbW7Oehe/40iSlJOPAHdjhW5soLcS+EIPAHO7BpPGhvosv+n/ZaAVSZJy8rFYm/yQBnlrJe6FHgD29fVmuaXv68BJJEnK0SeAe7FiN7ytpxL2wg4AJ2Ymkv7urgTIav0usBFJknL0TMzY7XikK7mxslTYAeDxqbFkc0dm+/l/G7iBJEk5agA+HTN4/d1V8S/YALAytjdpW5fZEb5fAPqQJClHLcAfxAze9srhPkfS+BdxAEjP729qbMhqN78f97t+SVLe2oEXY0avp7Mjubq8mMb8YdZgT3fUAWBxZCirN/1fBQ4gSVLOtgF/FzN6j6TxX3jo+J/bP5s+Oog1AMwM7cjqJL/PA91IkpSzceCfY1/5Xzn88PE/f2AujXScASDd0z+Lz/zuAZ8CGpAkKWfHgJsxw7dl44ZVXflfOjSfRjrWADDa15sAsde3gBNIklQATwF3or7wt3ljcu3Iwz/zv3x4MY10pAEg/RuIvf4W2IkkSTmrB54Dksjf+T/k2/7pSl8WPDk3GWUAODE7mQx0b84i/i8ALUiSlLM24I8iRy99W//GysPH/9ryUlX8ww0AI71bk22bNmbxvP9ZJEkqgAHg72PHf2Rbz/3473/Y+KeDw6n5qTT4MQaAhvron/n9D3AJSZIK4FHg9djx3927ZTXxT9eTizNp7D9gACjy+hawjCRJOasDnqk6yjf2kb6r+da/EvqyDgBfB0aQJClnI8CXsojf9M7+Vcf/4ruf+5V1APgzT/GTJOWtHvgE8Hbk6KWb5xzYM7Tq+F9J3/ifKusA8JtAE5Ik5WgG+KsMopfumf/oxJ5Vx//akaXk1LvxL+MA8CkP85Ek5ekR4FeBu1mEb11zU3JybjwN+GrXEwvTlbiXbQC4B3wSSZJy0gY8A9zMKn7trS3Jk4vTQeJ/dil9479sA8Bd4GkkScrBJuCngTeyjF/3hvbk4qG5IPG/eDB96a9sA8B3gctIkpSxXcAvAv+Zdfz6Nm/63ln+AZ77p9v8lm0AuAOcR5KkjDQD54AXgXfyiN9Ib0/V1r6r2+nvifnKc/9SDQC3gbNIkhRZPfAo8BngTSDJa01VfeMf6Ll/mQaAW8ATSJIUSR2wH/gl4F/ziH31nvmH9w0Hjf+Fg3OVkJdpALgDnEGSpAg6gJ8EXgGSIqzW5qb7wR0PGv/0eN/ZyTINAHeBi0iSFFgn8DMBbvEHXZs72pPzB2ZDxj89IOh05bl/eQaAd4CPIElSQPXAjwLfBpIirb19W5PrR5aqAx7qkJ+yDAD3gI8jSVJAo8BfFi38zY2NydHx3WmsQ68rhxcq8S7TAOAOf5KkYOqAnwJuFy3+2zZ1Juf2z0SJ//WVdJ//Mg0AzyNJUiDtwB8WLPzpYT6zQwPJjZU01lHWk4vpJ39lGQA+B9QjSVIAu4CvFC3+27s2Vl31h18X3t3qtywDwItAM5IkBTAN/HuRwt++riU5Or4nYvirt/oNt46M7UkaGxpi/C4vA+1IkhTAPPBmkW73Tw72pWFOIx1zrexPzixMB43/8emJZMP61hi/zWvAdiRJCmCuKPGvr6+r7OOf7sAXOfzVp/wFXQPdm2P8Pm8DC0iSFMBe4K0ihH94W0/1c/4Mbv0vBb/1P71zINYuf6eRJCmAbuAf8wx/U2NDMtbf+xA7+YV66386wnP/+hi/1U8gSVIA64Av5RT+9Pn43K4d6aY7aYxzWJcOzQd/7t/Rui7G7/UCkiQF8pk8TuvbuaU7+cHp0RyCX73hz/7kZLgNf9I12NMd43f7G6AFSZICOJdV9Ovq6pKezo5kYXgwveIOEO9At/5ng8Z/YXgoxu/3OtCHJEkB9ANvRo5+ul3vgT1DyeXDafQLtS4fWgga/8cmR5OWpqbQv+Nt4CCSJAVQB/x5xFv86el8AV7oi7ZuHF1KTs2HvfW/pXND8N/S0/0kSSF9NFb8+7u7Ch3+qmN+g63xgb4Yv+fvIElSIJuAN8Lv2NeQLI8OFzb4713XlpeSk2E/+UvvegAh11eBNiRJCuTToeO/vqU5OTU3UdjgV62g2/2euL82tbeFjv9/AaNIkhTIOPBOyFh1rm+tbNdb2NjH/uZ/7/ZtCRB6XUWSpID+eC3HP/SLf8uje9Kti4GQ69eQJCmgeeBeqFC1NDUmZ5emCxv793/xby7crf+ZiaSzbX3o+H8NWI8kSQF9IdiBPXV1yfGZscKG/gHn/Ae99b+7d2vo+N8CppAkKaCZkLGaHRoobOgfvOPfTMBb/7srQ5CH/EiSCu+3AkUq3dnvxkoxI/+gdfnwQti3/sPf+v9ToA5JkgLaBtwKtcPfDy3NFDb0D1qn58N99jfWvz10/P8N6EGSpMCeDRWrmaH+wkb+QevCwXCf/T06sS/d8AgIuc4hSVJgdcA3QoSqtbmp8iJdYUP/fuvGylJyKuBRv1s2Bt/r/7eRJCmCo6FitTgyWNjQP2idPxDus7/ZoR2h4/9NoAtJkiJ4IUSs2ta1lO7q//qRpeTkXJj4H5saC33M7z3gBJIkRdAM/EeIYO3fM1TY0D9onQ142t9gT3foq/9fR5KkSI6FevZ/fWWpsKF/v3V1OdymP4f37U7qwn7z/yqwAUmSIvmVEMEaG+gtbOiz2PSnq6M99NX/WSRJiuifQgTrzOJUYUMf++p/crA/dPx/H0mSIhoOEayezo7Chv4Drv6L+uLfTWA7kiRF9MMhonWgZC//XVleLPKLf08hSVLRP/+rg+TiofKc9V9ZZxbCbPl7ZHRP6Bf/XnKvf0lSFr6+2mht7mgrbOhjH/jT0xl0x787wCiSJEXWDtxbbbgmdmwvbOxjXv0vjgwlQMj1C0iSlIGlEOE6PjNW2NjHuvo/MTORdLSuC/3NfzuSJGXgqQDH/pZq859QV//jA32hr/7PI0lSRp5bbbi6SvT8/9KhhUCf/Y0nLU2NIeP/eSRJytDnVhuvoa2PFDb41ev0fJir/+FtW0LG/zYwgiRJGfriagM2t2tHYYP/3nXh4HyQ+D82OZo0NtSHHACeQ5KkjH1jtQGbHy7+AHBjZX9yan4qyACw45HNIeP/BtCJJEkZe2OVAUs3wVkeHS5s/CvrXKDjfo+O703qw27683EkScrBfwNJLQ8BVwJu+tPbtTFk/L8GNCJJUg7uBopZemW8Mra7WLf+jy6lt/6DnfUPCeHWMSRJyslbQFKrQ8DZxdmibvn7J0iSlKOXgaQWh4ALB+eCxf/g3pGQv9FdYAxJknL0c9WBqoV3Aq4sLyQnZyeLevX/G0iSlLNdwB0gqZU7AVeXF+/Hf6qoV//fAfqRJKkAngeSWhgCrh/5v5f+inv176Y/kqTCaAJeKvsQcO1+/E+/G/+iXv2/BWxCkqQC2QD8dVmHgPfEv8hX/59EkqQPxSEg8/jv370r5P//TaAVSZIKqmoIiPF1wEjh419ZXR3tIf/3H0OSpIIrxZ2AmPGf3jkQ8n9+FViHJEklUOg7AdeOLCanIsX/8cmxpKWpMeT/+yNIklQiWdwJCHXlX9QDf/4FaEaSpJLJ8E5A/vEfH9ge+n98GkmSSiqnOwHxb/tXf/NfXx/0rP9XgCYkSSqxHIeA+Ff+K2N7k5amptD/10eRJKkG5DAExI//Y5OjSVtLS+j/5ytAA5Ik1Yjs3gmIf9s/jX9H67oY/8spJEmqMZncCUiv/MsZ/79AkqQaFf1OwOzQjjLG/zYwjiRJNSz2EFDZka9M8U+AZ5EkaQ0o1RAQOf7/ALQgSdIaUYrHAZHjfxtYQJKkNabQdwIeEH9P+5MkqVaHgAzi/3tIkrTGZfs4IP/4fxVoR5IkZXQnIP/4vwbsQJIkZXonIM/43wSmkCRJuQwBecT/beAgkiQp1yEgy/h/B3gcSZJUiCHA+EuS9KHUyBCwvqXZ+EuS9KHUwBBg/CVJKq6yDQHGX5KkNTYEGH9JktbYEGD8JUlaY0OA8ZckaY0NAcZfkiTW1hBg/CVJ4nvWxhBg/CVJolptDwHGX5KkB6rNIeAWcApJkvQBamsIMP6SJH3famMIMP6SJBVUOgQYf0mS1p50CDD+kiStPekQYPwlSVp70iHA+EuStPakQ4DxlyRp7dkAvPQh4n/TTX4kSaoNTcDzwJ3/J/5fBvYhSZJqyjDw88DLwFvALeAV4LPAGaAOSZJUjf8Fo6HAhMXYfJkAAAAASUVORK5CYII=";function signature({particleCap:ee,ornament:te}){return Object.freeze({particleCap:ee,ornament:Object.freeze(te)})}const FRAME_SIGNATURE_CONFIG=Object.freeze({runes:signature({particleCap:3,ornament:{top:"-12%",left:"-12%",width:"124%",height:"124%"}}),bolt:signature({particleCap:4,ornament:{top:"10%",left:"20%",width:"106%",height:"106%"}}),heart:signature({particleCap:5,ornament:{top:"10%",left:"86%",width:"27%",height:"27%"}}),bars:signature({particleCap:3,ornament:{top:"9%",left:"87%",width:"28%",height:"34%"}}),blade:signature({particleCap:4,ornament:{top:"10%",left:"20%",width:"106%",height:"106%"}}),claw:signature({particleCap:4,ornament:{top:"86%",left:"83%",width:"31%",height:"31%"}}),crest:signature({particleCap:3,ornament:{top:"85%",left:"84%",width:"31%",height:"31%"}}),orb:signature({particleCap:3,ornament:{top:"-6%",left:"-6%",width:"112%",height:"112%"}})});function frameSignatureConfig(ee){return FRAME_SIGNATURE_CONFIG[ee]||null}const RUNE_GLYPHS=Object.freeze(["M0 -3v6","M0 -3v6M-2.2 -1h4.4","M-2 -3 0 3 2 -3","M0 -3v6M2.2 -2.4 0 0","M-2.2 -3h4.4M0 -3v6","M-2 3 0 -3 2 3M-1.4 .8h2.8"]),SIGNATURE_RUNE_MARKS=Object.freeze(Array.from({length:14},(ee,te)=>{const ne=te<7?0:1,ae=te-ne*7;return Object.freeze({d:RUNE_GLYPHS[te%RUNE_GLYPHS.length],transform:`translate(50 50) rotate(${(ne?63:243)+ae*9}) translate(0 -47)`})})),_hoisted_1$2t=["d","transform"],_hoisted_2$2a=["href"],_sfc_main$2G={__name:"SignatureFrameOrnament",props:{variant:{type:String,required:!0},motion:{type:Boolean,default:!1},clearance:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>frameSignatureConfig(te.variant)),ae=e$b.computed(()=>{var ie;const oe=(ie=ne.value)==null?void 0:ie.ornament;return oe?{"--sm-signature-top":oe.top,"--sm-signature-left":oe.left,"--sm-signature-width":oe.width,"--sm-signature-height":oe.height}:{}}),re=e$b.computed(()=>["sm-frame-ornament","sm-frame-signature",["bolt","heart","bars","claw","crest"].includes(te.variant)?"sm-frame-ornament--badge":`sm-frame-ornament--${te.variant}`,`sm-frame-signature--${te.variant}`,te.clearance?"sm-frame-ornament--clearance":"sm-frame-ornament--art",te.motion?"sm-frame-signature--motion":""]);return(oe,ie)=>ee.variant==="runes"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:0,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 100 100",fill:"none"},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(SIGNATURE_RUNE_MARKS),(le,ce)=>(e$b.openBlock(),e$b.createElementBlock("path",{key:ce,d:le.d,transform:le.transform},null,8,_hoisted_1$2t))),128))],6)):ee.variant==="blade"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:1,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 120 120",fill:"none"},[...ie[0]||(ie[0]=[e$b.createStaticVNode('<line class="sm-blade-halo" x1="60" y1="89" x2="101" y2="42" data-v-f94f9f66></line><line class="sm-blade-color" x1="60" y1="89" x2="101" y2="42" data-v-f94f9f66></line><line class="sm-blade-core" x1="60" y1="89" x2="101" y2="42" data-v-f94f9f66></line><g class="sm-blade-hilt" transform="rotate(-49 57 93)" data-v-f94f9f66><rect x="47" y="89" width="19" height="7" rx="2" data-v-f94f9f66></rect><path d="M49 89v7m5-7v7m7-7v7" data-v-f94f9f66></path><rect x="64" y="87" width="4" height="11" rx="1" data-v-f94f9f66></rect></g>',4)])],6)):ee.variant==="bolt"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:2,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 120 120",fill:"none"},[ee.clearance?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("image",{key:0,class:"sm-harry-wand",href:e$b.unref(harrysWandUrl),x:"58",y:"40",width:"50",height:"50",preserveAspectRatio:"xMidYMid meet"},null,8,_hoisted_2$2a)),ie[1]||(ie[1]=e$b.createElementVNode("path",{class:"sm-arcane-bolt",d:"M13.9 1.6 5.2 13.9h4.9L8.9 22.4 18.8 9.3h-5.2l.3-7.7Z",transform:"translate(-24 2) scale(1.08)",fill:"currentColor",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"1.1","stroke-linejoin":"round"},null,-1))],6)):ee.variant==="heart"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:3,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 32 32"},[...ie[2]||(ie[2]=[e$b.createElementVNode("path",{class:"sm-career-case",d:"M5.1 11.2h21.8c1.5 0 2.7 1.2 2.7 2.7v11.2c0 1.5-1.2 2.7-2.7 2.7H5.1c-1.5 0-2.7-1.2-2.7-2.7V13.9c0-1.5 1.2-2.7 2.7-2.7Z",fill:"var(--sm-frame-ornament-secondary)",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{d:"M11.1 11.2V8.8c0-1.6 1.3-2.9 2.9-2.9h4c1.6 0 2.9 1.3 2.9 2.9v2.4",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-career-monogram",d:"M12.4 15.1v8.7m0-8.7H16c3.1 0 3.1 3.9 0 3.9h-3.6m3.7 0c3.7 0 3.7 4.8 0 4.8h-3.7",fill:"none",stroke:"var(--sm-frame-ornament-accent)","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-career-sparkle",d:"m25.8 3.1.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8.8-2.2Z",fill:"var(--sm-frame-ornament-accent)"},null,-1)])],6)):ee.variant==="bars"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:4,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 24 24"},[...ie[3]||(ie[3]=[e$b.createElementVNode("path",{d:"M3.2 2.2 10.7 7v14.8l-7.5-4.7V2.2Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"m20.8 2.2-7.5 4.7v14.9l7.5-4.7V2.2Z",fill:"var(--sm-frame-ornament-secondary)"},null,-1)])],6)):ee.variant==="claw"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:5,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 512 512"},[...ie[4]||(ie[4]=[e$b.createElementVNode("path",{d:"M511.517 370.284c-5.971-20.294-92.954-22.906-113.159-18.866-20.216 4.041-76.79 2.68-88.913-9.443-12.124-12.124 4.041-32.329 16.175-44.451 12.124-12.124 38.389-50.524 46.472-58.606 8.082-8.082 50.166-50.378 65.325-74.758 30.988-49.843 41.437-98.68 25.262-114.845-16.164-16.164-65.003-5.727-114.834 25.262-24.38 15.17-66.688 57.244-74.769 65.325-8.083 8.083-46.472 34.36-58.606 46.483-12.122 12.124-32.328 28.287-44.451 16.164-12.122-12.124-13.474-68.698-9.433-88.902 4.041-20.205 1.419-107.187-18.866-113.16C121.438-5.483 83.798 44.94 68.984 87.37 60.299 112.241-13.868 228.816 2.296 313.689c16.175 84.872 31 127.982 49.507 146.503 18.519 18.519 61.642 33.343 146.503 49.507 84.872 16.164 201.448-57.991 226.319-66.676 42.431-14.825 92.853-52.466 86.892-72.739Z",fill:"currentColor"},null,-1)])],6)):ee.variant==="crest"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:6,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 190.764 222.769"},[...ie[5]||(ie[5]=[e$b.createElementVNode("path",{d:"M91.256 43.595c-42.332 2.172-75.995 37.577-75.995 80.931 0 14.627 3.832 28.349 10.535 40.195l-8.118 15.765C6.548 164.704 0 145.388 0 124.526 0 71.248 42.704 28.053 95.382 28.053c.753 0 1.504.009 2.252.026L111.412 0h29.434v39.696c29.733 16.337 49.918 48.2 49.918 84.829 0 53.279-42.704 96.473-95.382 96.473-16.079 0-31.229-4.024-44.519-11.132l6.712-13.875c11.262 6.107 24.134 9.571 37.807 9.571 44.249 0 80.121-36.282 80.121-81.037 0-27.971-14.013-52.633-35.325-67.197v76.695l-26.897-25.442V50.453l-33.218 78.891h33.218V116.68l31.141 29.274-32.179 24.705V157.58H68.437l-28.855 65.189-35.708-.699L91.256 43.595Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"m112.21 179.637 27.915-23.914v23.914Z",fill:"currentColor"},null,-1)])],6)):ee.variant==="orb"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:7,class:e$b.normalizeClass(re.value),style:e$b.normalizeStyle(ae.value),viewBox:"0 0 100 100"},[...ie[6]||(ie[6]=[e$b.createStaticVNode('<path class="sm-orb-bolt" d="m82 0-12 18h7l-4 13 14-20h-7l2-11Z" fill="currentColor" stroke="var(--sm-frame-ornament-secondary)" stroke-width="1.1" stroke-linejoin="round" data-v-f94f9f66></path><g class="sm-orb-mark" data-v-f94f9f66><path d="M72 84a12 12 0 0 1 24 0H72Z" fill="var(--sm-frame-ornament-secondary)" data-v-f94f9f66></path><path d="M96 84a12 12 0 0 1-24 0h24Z" fill="var(--sm-frame-ornament-accent)" data-v-f94f9f66></path><circle cx="84" cy="84" r="12" fill="none" stroke="#30343b" stroke-width="2.4" data-v-f94f9f66></circle><path d="M72 84h24" stroke="#30343b" stroke-width="2.4" data-v-f94f9f66></path><circle cx="84" cy="84" r="4.2" fill="#f8fafc" stroke="#30343b" stroke-width="2" data-v-f94f9f66></circle><circle cx="84" cy="84" r="1.7" fill="#30343b" data-v-f94f9f66></circle><circle cx="83.5" cy="83.5" r=".55" fill="#ffffff" opacity=".9" data-v-f94f9f66></circle></g>',2)])],6)):e$b.createCommentVNode("",!0)}},SignatureFrameOrnament=_export_sfc$1(_sfc_main$2G,[["__scopeId","data-v-f94f9f66"]]),states=new WeakMap;let observer=null;function ensureObserver(){return observer||typeof IntersectionObserver>"u"||(observer=new IntersectionObserver(ee=>{for(const te of ee){const ne=states.get(te.target);ne&&(ne.value=!te.isIntersecting)}},{rootMargin:"150px"})),observer}function useOffscreenPause(ee=!0){const te=e$b.shallowRef(null),ne=e$b.ref(!1),ae=e$b.computed(()=>!!(typeof ee=="function"?ee():e$b.unref(ee))),re=()=>{var le;return((le=te.value)==null?void 0:le.$el)||te.value};function oe(){const le=re();if(!(le!=null&&le.nodeType))return;const ce=ensureObserver();ce&&(states.set(le,ne),ce.observe(le))}function ie(){const le=re();!(le!=null&&le.nodeType)||!observer||(observer.unobserve(le),states.delete(le),ne.value=!1)}return e$b.onMounted(()=>{ae.value&&oe(),e$b.watch(ae,le=>le?oe():ie())}),e$b.onBeforeUnmount(ie),{offscreenRef:te,paused:ne}}const _hoisted_1$2s={key:0,class:"sm-frame-effect sm-frame-effect--lightning",viewBox:"0 0 100 100",fill:"none"},_hoisted_2$29={key:1,class:"sm-frame-effect sm-frame-effect--flame"},_hoisted_3$1X={class:"sm-frame-flower sm-frame-flower--large",transform:"translate(23 101)"},_hoisted_4$1L=["transform"],_hoisted_5$1B={class:"sm-frame-flower sm-frame-flower--medium",transform:"translate(112 32)"},_hoisted_6$1s=["transform"],_hoisted_7$1k={class:"sm-frame-flower sm-frame-flower--small",transform:"translate(123 65)"},_hoisted_8$1c=["transform"],_hoisted_9$16={key:0,class:"sm-frame-snowflake",viewBox:"0 0 16 16",fill:"none"},_hoisted_10$$={key:1,class:"sm-frame-star",viewBox:"0 0 16 16"},_hoisted_11$U={key:2,class:"sm-frame-spark",viewBox:"0 0 16 16"},_hoisted_12$P={key:3,class:"sm-frame-heart",viewBox:"0 0 16 16"},_hoisted_13$I={key:4,class:"sm-frame-petal",viewBox:"0 0 16 16"},_hoisted_14$G={key:5,class:"sm-frame-paw",viewBox:"0 0 18 18"},_hoisted_15$B=["src"],_sfc_main$2F={__name:"FrameEffects",props:{visual:{type:Object,required:!0},visualNormalized:{type:Boolean,default:!1},effectLevel:{type:String,default:"full",validator:ee=>["full","compact","border"].includes(ee)},pauseOffscreen:{type:Boolean,default:!0}},setup(ee){const te=ee,ne=e$b.computed(()=>te.visualNormalized?te.visual:normalizeFrameVisual(te.visual)),ae=e$b.computed(()=>ne.value.ornament),re=e$b.computed(()=>ne.value.effect),oe=e$b.computed(()=>ne.value.particles),ie=e$b.computed(()=>te.effectLevel==="border"),le=e$b.computed(()=>ae.value.enabled&&frameVariantLocked("ornament",ae.value.variant)),ce=e$b.computed(()=>le.value?ae.value.variant:""),de=e$b.computed(()=>frameSignatureConfig(ce.value)),ue=e$b.computed(()=>ae.value.enabled&&(!ie.value||le.value)),ve=e$b.computed(()=>ae.value.placement==="behind"?[!1]:[!0,!1]);function me($e,ye){return["sm-frame-ornament",`sm-frame-ornament--${$e}`,ye?"sm-frame-ornament--clearance":"sm-frame-ornament--art",ae.value.placement==="behind"?"sm-frame-ornament--behind":"sm-frame-ornament--front"]}const be=e$b.computed(()=>!ie.value&&re.value.enabled&&re.value.variant!=="none"),fe=e$b.computed(()=>{var Ee;const $e=te.effectLevel==="compact"?4:oe.value.density,ye=((Ee=de.value)==null?void 0:Ee.particleCap)??oe.value.density;return Math.min(oe.value.density,$e,ye)}),pe=e$b.computed(()=>{const $e=ne.value.ring.colors;return{"--sm-frame-primary":$e[0],"--sm-frame-secondary":$e[1],"--sm-frame-accent":$e[2],"--sm-frame-ornament-primary":ae.value.colors[0],"--sm-frame-ornament-secondary":ae.value.colors[1],"--sm-frame-ornament-accent":ae.value.colors[2],"--sm-frame-ornament-opacity":.35+ae.value.intensity*.65,"--sm-frame-ornament-scale":ae.value.scale,"--sm-frame-ornament-offset-y":`${ae.value.offset_y}%`,"--sm-frame-ornament-clearance":"rgb(var(--bg-base-300))","--sm-frame-effect-primary":re.value.colors[0],"--sm-frame-effect-secondary":re.value.colors[1],"--sm-frame-effect-accent":re.value.colors[2],"--sm-frame-effect-spread":re.value.spread,"--sm-frame-effect-inset":`${15*re.value.spread}%`,"--sm-frame-effect-inset-tight":`${7*re.value.spread}%`,"--sm-frame-effect-inset-wide":`${17*re.value.spread}%`,"--sm-frame-particle-primary":oe.value.colors[0],"--sm-frame-particle-secondary":oe.value.colors[1],"--sm-frame-particle-accent":oe.value.colors[2],"--sm-frame-particle-size":`${oe.value.size*5}%`,"--sm-frame-particle-orbit":oe.value.orbit,"--sm-frame-particle-opacity":.4+oe.value.intensity*.6,"--sm-frame-intensity":re.value.intensity,"--sm-frame-effect-opacity":.5+re.value.intensity*.5,"--sm-frame-speed":`${6/ne.value.motion.speed}s`,"--sm-frame-effect-speed":`${4.2/ne.value.motion.speed}s`,"--sm-frame-ornament-speed":`${3.6/ne.value.motion.speed}s`,"--sm-frame-particle-speed":`${3.2/ne.value.motion.speed}s`,"--sm-frame-whale-speed":`${5.4/ne.value.motion.speed}s`,"--sm-frame-fast":`${1.8/ne.value.motion.speed}s`,"--sm-frame-flash":`${2.7/ne.value.motion.speed}s`}}),{offscreenRef:_e,paused:ge}=useOffscreenPause(()=>te.pauseOffscreen),ke=e$b.computed(()=>ne.value.motion.enabled?["sm-frame-effects--motion",ne.value.motion.pulse?"sm-frame-effects--pulse":"",ne.value.motion.flicker?"sm-frame-effects--flicker":"",ge.value?"sm-frame-effects--paused":""]:["sm-frame-effects--static"]);return($e,ye)=>ee.effectLevel!=="border"||le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,ref_key:"offscreenRef",ref:_e,class:e$b.normalizeClass(["sm-frame-effects",[`sm-frame-effects--${ee.effectLevel}`,le.value?"sm-frame-effects--signature":"",ce.value?`sm-frame-effects--signature-${ce.value}`:"",ke.value]]),style:e$b.normalizeStyle(pe.value),"aria-hidden":"true"},[be.value&&re.value.variant==="lightning"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_1$2s,[...ye[0]||(ye[0]=[e$b.createStaticVNode('<circle class="sm-lightning-orbit-halo" cx="50" cy="50" r="39" data-v-6b52c80e></circle><circle class="sm-lightning-orbit-core" cx="50" cy="50" r="39" data-v-6b52c80e></circle><g class="sm-lightning-discharge sm-lightning-discharge--north-west" data-v-6b52c80e><path class="sm-lightning-halo" d="m20 34 7-4-2-5 8-2-1-6 8 2" data-v-6b52c80e></path><path class="sm-lightning-core" d="m20 34 7-4-2-5 8-2-1-6 8 2" data-v-6b52c80e></path><path class="sm-lightning-branch" d="m27 30-5-1m10-6 4-4" data-v-6b52c80e></path></g><g class="sm-lightning-discharge sm-lightning-discharge--east" data-v-6b52c80e><path class="sm-lightning-halo" d="m80 33-3 7 5 2-3 7 6 3-4 7" data-v-6b52c80e></path><path class="sm-lightning-core" d="m80 33-3 7 5 2-3 7 6 3-4 7" data-v-6b52c80e></path><path class="sm-lightning-branch" d="m82 42 5-3m-8 10-5 3" data-v-6b52c80e></path></g><g class="sm-lightning-discharge sm-lightning-discharge--south-west" data-v-6b52c80e><path class="sm-lightning-halo" d="m39 82-7-3-3 5-6-6-5 3-3-7" data-v-6b52c80e></path><path class="sm-lightning-core" d="m39 82-7-3-3 5-6-6-5 3-3-7" data-v-6b52c80e></path><path class="sm-lightning-branch" d="m29 79 1-5m-7 4-4-4" data-v-6b52c80e></path></g>',5)])])):be.value&&re.value.variant==="flame"?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$29,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(8,Ee=>e$b.createElementVNode("i",{key:Ee,style:e$b.normalizeStyle({"--sm-flame-index":Ee-1})},null,4)),64))])):be.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:2,class:e$b.normalizeClass(["sm-frame-effect",`sm-frame-effect--${re.value.variant}`])},null,2)):e$b.createCommentVNode("",!0),(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ve.value,Ee=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:Ee?"clearance":"art"},[ue.value&&ae.value.variant==="wings"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:0,class:e$b.normalizeClass(me("wings",Ee)),viewBox:"0 0 220 132",fill:"none"},[...ye[1]||(ye[1]=[e$b.createStaticVNode('<g class="sm-frame-wing sm-frame-wing--left" data-v-6b52c80e><path class="sm-frame-wing-silhouette" d="M100 57C80 54 69 40 56 20 46 5 28 1 8 5c13 7 22 17 27 30-11-7-22-10-34-10 9 10 17 20 28 27-9-2-18-1-27 2 12 12 25 21 41 25-8 1-16 4-23 9 18 9 38 10 55 3 11-4 20-12 28-24Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--primary" d="M92 59C73 55 61 41 49 22 42 12 31 7 19 7c14 8 23 21 26 36 15 4 31 10 47 16Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--secondary" d="M89 66C65 65 45 55 20 33c9 18 23 30 42 37-13 0-27-4-42-10 15 17 35 25 57 23 5-5 9-11 12-17Z" data-v-6b52c80e></path><path class="sm-frame-wing-detail" d="M92 59C69 54 53 43 40 28M88 68C62 68 42 59 24 45M79 82C57 85 39 80 24 70" data-v-6b52c80e></path></g><g class="sm-frame-wing sm-frame-wing--right" transform="translate(220 0) scale(-1 1)" data-v-6b52c80e><path class="sm-frame-wing-silhouette" d="M100 57C80 54 69 40 56 20 46 5 28 1 8 5c13 7 22 17 27 30-11-7-22-10-34-10 9 10 17 20 28 27-9-2-18-1-27 2 12 12 25 21 41 25-8 1-16 4-23 9 18 9 38 10 55 3 11-4 20-12 28-24Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--primary" d="M92 59C73 55 61 41 49 22 42 12 31 7 19 7c14 8 23 21 26 36 15 4 31 10 47 16Z" data-v-6b52c80e></path><path class="sm-frame-wing-feather sm-frame-wing-feather--secondary" d="M89 66C65 65 45 55 20 33c9 18 23 30 42 37-13 0-27-4-42-10 15 17 35 25 57 23 5-5 9-11 12-17Z" data-v-6b52c80e></path><path class="sm-frame-wing-detail" d="M92 59C69 54 53 43 40 28M88 68C62 68 42 59 24 45M79 82C57 85 39 80 24 70" data-v-6b52c80e></path></g>',2)])],2)):ue.value&&ae.value.variant==="crown"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:1,class:e$b.normalizeClass(me("crown",Ee)),viewBox:"0 0 96 58",fill:"none"},[...ye[2]||(ye[2]=[e$b.createElementVNode("path",{class:"sm-frame-crown-body",d:"m12 42-4-28 22 16L48 7l18 23 22-16-4 28H12Z",fill:"color-mix(in srgb, currentColor 76%, transparent)",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"2.5","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-frame-crown-band",d:"M13 41h70l-3 11H16l-3-11Z",fill:"var(--sm-frame-ornament-secondary)",stroke:"currentColor","stroke-width":"2","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{d:"M21 45h54",stroke:"var(--sm-frame-ornament-accent)","stroke-width":"2","stroke-linecap":"round"},null,-1)])],2)):ue.value&&ae.value.variant==="holly"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:2,class:e$b.normalizeClass(me("holly",Ee)),viewBox:"0 0 120 100",fill:"none"},[...ye[3]||(ye[3]=[e$b.createStaticVNode('<path d="M58 52C45 38 28 30 8 28l13 12-17 2 18 8-13 8 20 1-8 13 18-11c3 15 12 25 24 32-2-17-7-29-15-38 13 0 25-5 35-16-16 3-28 7-36 15Z" fill="var(--sm-frame-ornament-primary)" stroke="var(--sm-frame-ornament-secondary)" stroke-linejoin="round" stroke-width="3" data-v-6b52c80e></path><path d="M53 48c17-12 35-15 57-9l-14 10 17 4-19 6 12 11-20-3 5 15-17-15c-5 14-16 23-30 28 5-16 11-27 22-35-13-3-24-9-33-20Z" fill="var(--sm-frame-ornament-primary)" stroke="var(--sm-frame-ornament-secondary)" stroke-linejoin="round" stroke-width="3" data-v-6b52c80e></path><path d="M38 59C28 47 14 42 2 43l11 9-13 4 16 6-9 10 17-2 3 15 9-18" fill="var(--sm-frame-ornament-secondary)" opacity=".68" data-v-6b52c80e></path><circle cx="51" cy="62" r="10" fill="var(--sm-frame-ornament-accent)" data-v-6b52c80e></circle><circle cx="68" cy="64" r="10" fill="var(--sm-frame-ornament-accent)" data-v-6b52c80e></circle><circle cx="59" cy="78" r="10" fill="var(--sm-frame-ornament-accent)" data-v-6b52c80e></circle><circle cx="48" cy="58" r="2.7" fill="white" opacity=".42" data-v-6b52c80e></circle><circle cx="65" cy="60" r="2.7" fill="white" opacity=".42" data-v-6b52c80e></circle><circle cx="56" cy="74" r="2.7" fill="white" opacity=".42" data-v-6b52c80e></circle>',9)])],2)):ue.value&&ae.value.variant==="bow"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:3,class:e$b.normalizeClass(me("bow",Ee)),viewBox:"0 0 96 68",fill:"none"},[...ye[4]||(ye[4]=[e$b.createStaticVNode('<path d="M43 30C31 9 10 6 7 20 4 34 25 41 43 35Z" fill="currentColor" stroke="var(--sm-frame-ornament-secondary)" stroke-width="3" data-v-6b52c80e></path><path d="M53 30C65 9 86 6 89 20c3 14-18 21-36 15Z" fill="currentColor" stroke="var(--sm-frame-ornament-secondary)" stroke-width="3" data-v-6b52c80e></path><path d="m42 39-16 24 22-10 22 10-16-24Z" fill="var(--sm-frame-ornament-secondary)" stroke="currentColor" stroke-width="3" stroke-linejoin="round" data-v-6b52c80e></path><rect x="38" y="25" width="20" height="20" rx="8" fill="var(--sm-frame-ornament-accent)" stroke="var(--sm-frame-ornament-secondary)" stroke-width="3" data-v-6b52c80e></rect><path d="M16 20c7-4 14-2 20 7M80 20c-7-4-14-2-20 7" stroke="white" stroke-width="3" opacity=".5" data-v-6b52c80e></path>',5)])],2)):ue.value&&ae.value.variant==="flowers"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:4,class:e$b.normalizeClass(me("flowers",Ee)),viewBox:"0 0 140 140",fill:"none"},[e$b.createElementVNode("g",_hoisted_3$1X,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,Se=>e$b.createElementVNode("ellipse",{key:`large-${Se}`,ry:"18",rx:"8","transform-origin":"0 0",transform:`rotate(${(Se-1)*72}) translate(0 -15)`,fill:"currentColor"},null,8,_hoisted_4$1L)),64)),ye[5]||(ye[5]=e$b.createElementVNode("circle",{r:"8",fill:"var(--sm-frame-ornament-accent)"},null,-1))]),e$b.createElementVNode("g",_hoisted_5$1B,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,Se=>e$b.createElementVNode("ellipse",{key:`medium-${Se}`,ry:"15",rx:"7","transform-origin":"0 0",transform:`rotate(${(Se-1)*72}) translate(0 -12)`,fill:"var(--sm-frame-ornament-secondary)"},null,8,_hoisted_6$1s)),64)),ye[6]||(ye[6]=e$b.createElementVNode("circle",{r:"6.5",fill:"var(--sm-frame-ornament-accent)"},null,-1))]),e$b.createElementVNode("g",_hoisted_7$1k,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,Se=>e$b.createElementVNode("ellipse",{key:`small-${Se}`,ry:"10",rx:"5","transform-origin":"0 0",transform:`rotate(${(Se-1)*72}) translate(0 -8)`,fill:"currentColor"},null,8,_hoisted_8$1c)),64)),ye[7]||(ye[7]=e$b.createElementVNode("circle",{r:"4",fill:"var(--sm-frame-ornament-accent)"},null,-1))]),ye[8]||(ye[8]=e$b.createElementVNode("path",{d:"M29 111c11 6 19 12 23 21M106 41c-10 3-18 8-24 16",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"4","stroke-linecap":"round"},null,-1))],2)):ue.value&&ae.value.variant==="cat"?(e$b.openBlock(),e$b.createElementBlock("svg",{key:5,class:e$b.normalizeClass(me("cat",Ee)),viewBox:"0 0 140 128",fill:"none"},[...ye[9]||(ye[9]=[e$b.createElementVNode("path",{class:"sm-cat-ear sm-cat-ear--left",d:"M37 47C34 39 31 27 33 18C44 22 53 30 58 39C50 39 43 42 37 47Z",fill:"currentColor",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-cat-ear sm-cat-ear--right",d:"M103 47C106 39 109 27 107 18C96 22 87 30 82 39C90 39 97 42 103 47Z",fill:"currentColor",stroke:"var(--sm-frame-ornament-secondary)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e$b.createElementVNode("path",{class:"sm-cat-inner-ear",d:"M38 38C36 33 35 27 36 23C43 26 49 31 52 37C47 36 42 37 38 38ZM102 38C104 33 105 27 104 23C97 26 91 31 88 37C93 36 98 37 102 38Z",fill:"var(--sm-frame-ornament-accent)",opacity:".9"},null,-1),e$b.createElementVNode("path",{class:"sm-cat-whiskers",d:"M29 76C19 72 11 68 2 62M26 89C16 88 8 88 0 89M30 101C20 105 12 109 4 115M111 76c10-4 18-8 27-14M114 89c10-1 18-1 26 0M110 101c10 4 18 8 26 14",stroke:"currentColor","stroke-width":"3.5","stroke-linecap":"round"},null,-1)])],2)):ue.value&&le.value?(e$b.openBlock(),e$b.createBlock(SignatureFrameOrnament,{key:`${Ee?"clearance":"art"}-${ce.value}`,variant:ce.value,motion:ne.value.motion.enabled,clearance:Ee},null,8,["variant","motion","clearance"])):e$b.createCommentVNode("",!0)],64))),128)),!ie.value&&oe.value.enabled&&oe.value.variant!=="none"?(e$b.openBlock(),e$b.createElementBlock("span",{key:3,class:e$b.normalizeClass(["sm-frame-particles",`sm-frame-particles--${oe.value.variant}`])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(fe.value,Ee=>(e$b.openBlock(),e$b.createElementBlock("i",{key:Ee},[oe.value.variant==="snow"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_9$16,[...ye[10]||(ye[10]=[e$b.createElementVNode("line",{x1:"8",y1:"1",x2:"8",y2:"15"},null,-1),e$b.createElementVNode("line",{x1:"2",y1:"4.5",x2:"14",y2:"11.5"},null,-1),e$b.createElementVNode("line",{x1:"2",y1:"11.5",x2:"14",y2:"4.5"},null,-1)])])):oe.value.variant==="stars"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_10$$,[...ye[11]||(ye[11]=[e$b.createElementVNode("polygon",{points:"8,0.8 10.15,5.45 15.25,6.05 11.5,9.5 12.5,14.55 8,11.95 3.5,14.55 4.5,9.5 0.75,6.05 5.85,5.45"},null,-1)])])):oe.value.variant==="sparks"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_11$U,[...ye[12]||(ye[12]=[e$b.createElementVNode("polygon",{points:"8,0 9.55,6.35 16,8 9.55,9.65 8,16 6.45,9.65 0,8 6.45,6.35"},null,-1)])])):oe.value.variant==="hearts"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$P,[...ye[13]||(ye[13]=[e$b.createElementVNode("path",{d:"M8 14.2C6.8 12.6 1.2 9.5 1.2 5.4A3.6 3.6 0 0 1 8 3.7a3.6 3.6 0 0 1 6.8 1.7c0 4.1-5.6 7.2-6.8 8.8Z"},null,-1)])])):oe.value.variant==="petals"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$I,[...ye[14]||(ye[14]=[e$b.createElementVNode("path",{d:"M2 13.5C1.7 7.9 4.5 2.8 13.8 1.4 14.7 9.1 10.6 14.3 2 13.5Z"},null,-1),e$b.createElementVNode("path",{d:"M3 12.5c3.6-2.2 6.3-4.8 9.2-8.4",fill:"none"},null,-1)])])):oe.value.variant==="paws"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_14$G,[...ye[15]||(ye[15]=[e$b.createStaticVNode('<ellipse cx="9" cy="12" rx="5.2" ry="4.2" data-v-6b52c80e></ellipse><circle cx="3.4" cy="7.1" r="2.1" data-v-6b52c80e></circle><circle cx="7.2" cy="3.9" r="2.2" data-v-6b52c80e></circle><circle cx="11.4" cy="3.9" r="2.2" data-v-6b52c80e></circle><circle cx="15" cy="7.3" r="2" data-v-6b52c80e></circle>',5)])])):oe.value.variant==="whales"?(e$b.openBlock(),e$b.createElementBlock("img",{key:6,class:"sm-frame-whale",src:e$b.unref(whaleSvgUrl),alt:"","aria-hidden":"true"},null,8,_hoisted_15$B)):e$b.createCommentVNode("",!0)]))),128))],2)):e$b.createCommentVNode("",!0)],6)):e$b.createCommentVNode("",!0)}},FrameEffects=_export_sfc$1(_sfc_main$2F,[["__scopeId","data-v-6b52c80e"]]),CHANNELS=["whatsapp","instagram","telegram","webchat","sms"],ALIASES={"whatsapp-qrcode":"whatsapp","whatsapp-api-official":"whatsapp","whatsapp-api":"whatsapp",whatsapp:"whatsapp",instagram:"instagram",telegram:"telegram",webchat:"webchat","web-chat":"webchat",widget:"webchat",sms:"sms"},LABELS={whatsapp:"WhatsApp",instagram:"Instagram",telegram:"Telegram",webchat:"Webchat",sms:"SMS"};function normalizeChannel(ee){return ee?ALIASES[String(ee).trim().toLowerCase()]??null:null}function channelLabel(ee){return LABELS[normalizeChannel(ee)]??""}function isOfficialChannel(ee){return String(ee||"").toLowerCase().includes("official")}const _hoisted_1$2r=["aria-label"],_hoisted_2$28={class:"channel-icon-glyph",viewBox:"0 0 16 16",fill:"currentColor"},_hoisted_3$1W={key:0,d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},_hoisted_4$1K={key:1,d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},_hoisted_5$1A={key:2,d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.287 5.906c-.778.324-2.334.994-4.666 2.01-.378.15-.577.298-.595.442-.03.243.275.339.69.47.057.018.116.037.176.057.415.144.973.31 1.262.317.263.006.556-.102.88-.325 2.14-1.443 3.245-2.173 3.315-2.19.05-.011.118-.026.164.015.045.041.041.12.036.141-.03.125-1.204 1.216-1.812 1.78-.19.176-.324.3-.352.33a8.404 8.404 0 0 1-.198.196c-.38.366-.664.64.015 1.088.327.216.589.394.85.572.284.194.568.387.936.629.093.06.183.125.27.187.331.236.63.448.997.414.214-.02.435-.22.547-.82.265-1.417.786-4.486.906-5.751a1.426 1.426 0 0 0-.013-.315.337.337 0 0 0-.114-.217.526.526 0 0 0-.31-.093c-.3.005-.763.166-2.984 1.09z"},_hoisted_6$1r={key:3,d:"M1.6 7.6C1.6 8.96 2.083 10.215 2.897 11.223L1.677 13.457C1.627 13.55 1.6 13.655 1.6 13.762C1.6 14.115 1.885 14.4 2.237 14.4C2.337 14.4 2.433 14.385 2.525 14.348L5.435 13.1C6.22 13.422 7.088 13.6 8 13.6C11.535 13.6 14.4 10.912 14.4 7.6C14.4 4.287 11.535 1.6 8 1.6C4.465 1.6 1.6 4.287 1.6 7.6zM3.95 11.797C4.183 11.37 4.135 10.845 3.83 10.467C3.177 9.66 2.8 8.67 2.8 7.6C2.8 5.02 5.055 2.8 8 2.8C10.945 2.8 13.2 5.02 13.2 7.6C13.2 10.18 10.945 12.4 8 12.4C7.245 12.4 6.533 12.253 5.893 11.99C5.595 11.867 5.26 11.87 4.965 11.997L3.5 12.622L3.95 11.797zM5.2 8.4C5.643 8.4 6 8.043 6 7.6C6 7.158 5.643 6.8 5.2 6.8C4.758 6.8 4.4 7.158 4.4 7.6C4.4 8.043 4.758 8.4 5.2 8.4zM8.8 7.6C8.8 7.158 8.442 6.8 8 6.8C7.558 6.8 7.2 7.158 7.2 7.6C7.2 8.043 7.558 8.4 8 8.4C8.442 8.4 8.8 8.043 8.8 7.6zM10.8 8.4C11.242 8.4 11.6 8.043 11.6 7.6C11.6 7.158 11.242 6.8 10.8 6.8C10.357 6.8 10 7.158 10 7.6C10 8.043 10.357 8.4 10.8 8.4z"},_hoisted_7$1j={key:4,d:"M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H8.9l-2.4 2.2c-.5.45-1.3.1-1.3-.57V11H3a1 1 0 0 1-1-1V3zm2.5 2.25a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7zm0 2.5a.75.75 0 0 0 0 1.5h4a.75.75 0 0 0 0-1.5h-4z"},_hoisted_8$1b={key:0,class:"channel-icon-official",viewBox:"0 0 16 16",fill:"#0081fb","aria-hidden":"true"},_sfc_main$2E={__name:"ChannelIcon",props:{channel:{type:String,default:null},tone:{type:String,default:"mono",validator:ee=>["mono","brand"].includes(ee)},official:{type:Boolean,default:!1}},setup(ee){const te=ee,ne={whatsapp:"#25d366",instagram:"#d6249f",telegram:"#229ed9",webchat:"#ffffff"},ae=e$b.computed(()=>normalizeChannel(te.channel)),re=e$b.computed(()=>channelLabel(te.channel)),oe=e$b.computed(()=>te.tone==="brand"?ne[ae.value]??null:null),ie=e$b.computed(()=>te.official&&ae.value==="whatsapp");return(le,ce)=>ae.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"channel-icon",style:e$b.normalizeStyle(oe.value?{color:oe.value}:null),role:"img","aria-label":re.value},[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_2$28,[ae.value==="whatsapp"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_3$1W)):ae.value==="instagram"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_4$1K)):ae.value==="telegram"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_5$1A)):ae.value==="webchat"?(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_6$1r)):(e$b.openBlock(),e$b.createElementBlock("path",_hoisted_7$1j))])),ie.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1b,[...ce[0]||(ce[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)])])):e$b.createCommentVNode("",!0)],12,_hoisted_1$2r)):e$b.createCommentVNode("",!0)}},ChannelIcon=_export_sfc$1(_sfc_main$2E,[["__scopeId","data-v-06c1e53c"]]),MAX_ENTRIES=300;try{window.localStorage.removeItem("sm-click:media-size")}catch{}const sizes=new Map;function isDataSource(ee){return typeof ee=="string"&&ee.startsWith("data:")}function mediaKey(ee){return typeof ee!="string"||!ee||ee.startsWith("undefined")||isDataSource(ee)?"":ee.split("?")[0]}function sameMediaSource(ee,te){if(isDataSource(ee)||isDataSource(te))return ee===te;const ne=mediaKey(ee);return!!ne&&ne===mediaKey(te)}function rememberMediaSize(ee,te,ne){const ae=mediaKey(ee);if(!ae||!(te>0)||!(ne>0))return;const re=sizes.get(ae);re&&re.w===te&&re.h===ne||(sizes.delete(ae),sizes.set(ae,{w:te,h:ne}),sizes.size>MAX_ENTRIES&&sizes.delete(sizes.keys().next().value))}function readMediaSize(ee){const te=mediaKey(ee);return te&&sizes.get(te)||null}function positivePair(ee,te){const ne=Number(ee),ae=Number(te);return ne>0&&ae>0?{w:ne,h:ae}:null}function mediaSizeFromContent(ee,te){var ae,re;const ne=ee||{};return positivePair(ne.width,ne.height)||positivePair(ne.media_width,ne.media_height)||positivePair((ae=ne.dimensions)==null?void 0:ae.width,(re=ne.dimensions)==null?void 0:re.height)||readMediaSize(te||ne.url||"")}const preloadedImageSources=new Set;function validImageSource(ee){return typeof ee=="string"&&ee.length>0&&!ee.startsWith("undefined")}function isImageSourcePreloaded(ee){return validImageSource(ee)&&preloadedImageSources.has(ee)}function preloadImageSource(ee){return new Promise(te=>{if(preloadedImageSources.has(ee)){te();return}const ne=new Image,ae=async re=>{var oe;if(ne.onload=null,ne.onerror=null,re){try{await((oe=ne.decode)==null?void 0:oe.call(ne))}catch{}preloadedImageSources.add(ee),rememberMediaSize(ee,ne.naturalWidth,ne.naturalHeight)}te()};ne.onload=()=>void ae(!0),ne.onerror=()=>void ae(!1),ne.src=ee})}async function warmImageSources(ee,te){const ne=[...new Set(ee.filter(validImageSource))];if(ne.length===0)return;const ae=Promise.allSettled(ne.map(preloadImageSource));await new Promise(re=>{const oe=window.setTimeout(re,te);ae.then(()=>{window.clearTimeout(oe),re()})})}function senderHue(ee){const te=String(ee||"").trim().toLowerCase();if(!te)return 210;let ne=5381;for(let ae=0;ae<te.length;ae+=1)ne=(ne<<5)+ne+te.charCodeAt(ae)>>>0;return ne%12*30}function senderColorStyle(ee){return{"--sender-hue":senderHue(ee)}}const LETTER=new RegExp("\\p{L}|\\p{N}","u");function avatarInitials(ee,te=""){const ne=String(ee||te||"").trim();if(!ne||!LETTER.test(ne))return"";const ae=ne.split(/\s+/).filter(oe=>LETTER.test(oe));return ae.length?(ae.length>1?ae[0].charAt(0)+ae[ae.length-1].charAt(0):ae[0].slice(0,2)).toUpperCase():""}function avatarHue(ee){return senderHue(ee)}const RARITIES={common:{key:"common",label:"Comum",order:0,accentRgb:null,glow:0,badge:"bg-slate-400/20 text-slate-100",chip:"bg-slate-400/10 text-slate-300 dark:bg-slate-500/15 dark:text-slate-600",text:"text-slate-300 dark:text-slate-600",bar:"from-slate-400/70 to-slate-300"},rare:{key:"rare",label:"Raro",order:1,accentRgb:"56 189 248",glow:.16,badge:"bg-sky-500/25 text-sky-100",chip:"bg-sky-500/10 text-sky-300 dark:bg-sky-500/15 dark:text-sky-700",text:"text-sky-300 dark:text-sky-700",bar:"from-sky-500/80 to-sky-300"},epic:{key:"epic",label:"Épico",order:2,accentRgb:"167 139 250",glow:.22,badge:"bg-violet-500/25 text-violet-100",chip:"bg-violet-500/10 text-violet-300 dark:bg-violet-500/15 dark:text-violet-700",text:"text-violet-300 dark:text-violet-700",bar:"from-violet-500/80 to-violet-300"},legendary:{key:"legendary",label:"Lendário",order:3,accentRgb:"251 191 36",glow:.28,badge:"bg-amber-400/25 text-amber-100",chip:"bg-amber-400/10 text-amber-300 dark:bg-amber-400/15 dark:text-amber-700",text:"text-amber-300 dark:text-amber-700",bar:"from-amber-500/80 to-amber-300"},secret:{key:"secret",label:"Secreta",order:4,accentRgb:"232 121 249",glow:.26,badge:"bg-fuchsia-500/25 text-fuchsia-100",chip:"bg-fuchsia-500/10 text-fuchsia-300 dark:bg-fuchsia-500/15 dark:text-fuchsia-700",text:"text-fuchsia-300 dark:text-fuchsia-700",bar:"from-fuchsia-500/80 to-fuchsia-300"}},MIN_GRADE_PARAM={key:"min_grade",label:"Nota mínima",unit:"de 10",min:1,max:10,default:9},MAX_MINUTES_PARAM={key:"max_minutes",label:"Tempo máximo",unit:"min",min:1,max:600,default:5},MAX_QUEUE_MINUTES_PARAM={...MAX_MINUTES_PARAM,label:"Espera máxima",default:1},ACHIEVEMENT_METRICS=[{key:"chat_finished",label:"Atendimentos concluídos",unit:"atendimentos",params:[]},{key:"chat_grade",label:"Avaliação (nota)",unit:"avaliações",params:[MIN_GRADE_PARAM]},{key:"chat_attending_time",label:"Tempo de atendimento",unit:"atendimentos",params:[MAX_MINUTES_PARAM]},{key:"chat_waiting_time",label:"Tempo de espera na fila",unit:"atendimentos",params:[MAX_QUEUE_MINUTES_PARAM]},{key:"chat_flow",label:"Atendimento proativo",unit:"atendimentos",params:[]},{key:"level",label:"Nível alcançado",unit:"nível",params:[]},{key:"season_points",label:"Pontos na temporada",unit:"pts",params:[]},{key:"season_rank",label:"Posição na temporada",unit:"posição",params:[]},{key:"season_wins",label:"Temporadas vencidas",unit:"temporadas",params:[]}],ACHIEVEMENT_SCOPES=[{key:"general",label:"Geral (permanente)"},{key:"season",label:"Temporada atual"}];function achievementMetric(ee){return ACHIEVEMENT_METRICS.find(te=>te.key===ee)||null}function metricParams(ee){var te;return((te=achievementMetric(ee))==null?void 0:te.params)||[]}function defaultMetricParams(ee){return Object.fromEntries(metricParams(ee).map(te=>[te.key,te.default]))}function normalizeParams(ee,te={}){const ne=metricParams(ee).map(ae=>[ae.key,Number(te==null?void 0:te[ae.key])]).filter(([,ae])=>Number.isFinite(ae));return Object.fromEntries(ne)}function createAchievementRequirement(ee={}){const te=ACHIEVEMENT_SCOPES.some(ne=>ne.key===ee.scope)?ee.scope:"general";return{metric:ee.metric,target:Number(ee.target),params:normalizeParams(ee.metric,ee.params),scope:te,season:te==="season"?ee.season??null:null}}function isInvalidPositiveNumber(ee){const te=Number(ee);return ee===""||ee===null||ee===void 0||!Number.isFinite(te)||te<1}function validateAchievementDraft(ee){var ne;const te={};return ee&&(String(ee.name||"").trim()||(te.name="Dê um nome para a conquista."),String(ee.description||"").trim()||(te.description="Descreva como desbloquear."),achievementMetric(ee.metric)||(te.metric="Escolha uma métrica."),ee.scope&&!ACHIEVEMENT_SCOPES.some(ae=>ae.key===ee.scope)&&(te.scope="Escolha um escopo."),ee.scope==="season"&&!((ne=ee.season)!=null&&ne.id)&&(te.season="Selecione a temporada."),isInvalidPositiveNumber(ee.target)&&(te.target="Informe uma meta igual ou maior que 1."),isInvalidPositiveNumber(ee.xp)&&(te.xp="Informe uma recompensa igual ou maior que 1."),metricParams(ee.metric).forEach(ae=>{var oe;const re=Number((oe=ee.params)==null?void 0:oe[ae.key]);(!Number.isFinite(re)||re<ae.min||re>ae.max)&&(te[ae.key]=`Informe ${ae.label.toLowerCase()} entre ${ae.min} e ${ae.max}.`)}),ee.rarity==="secret"&&!String(ee.hint||"").trim()&&(te.hint="Conquistas secretas precisam de uma dica.")),te}function createCustomAchievement(ee){const te=RARITIES[ee.rarity]?ee.rarity:"common";return{id:`custom-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,name:String(ee.name).trim(),description:String(ee.description).trim(),icon:ee.icon||"🏅",rarity:te,hint:te==="secret"?String(ee.hint).trim():"",requirement:createAchievementRequirement(ee),xp:Number(ee.xp),status:!0}}function createCustomAchievementApiPayload(ee){const{id:te,...ne}=createCustomAchievement(ee);return ne}const REQUIREMENT_SENTENCE={chat_finished:(ee,te)=>`Conclua ${ee} ${te===1?"atendimento":"atendimentos"}`,chat_grade:(ee,te,ne)=>{const ae=`${ee} ${te===1?"avaliação":"avaliações"}`;return ne.min_grade?`Receba ${ae} com nota ${ne.min_grade}${ne.min_grade>=10?"":" ou mais"}`:`Receba ${ae}`},chat_attending_time:(ee,te,ne)=>{const ae=`${ee} ${te===1?"atendimento":"atendimentos"}`;if(!ne.max_minutes)return`Resolva ${ae} rapidamente`;const re=`em menos de ${minutesLabel(ne.max_minutes)}`;return te===1?`Resolva ${ae} ${re}`:`Resolva ${ae}, cada um ${re}`},chat_waiting_time:(ee,te,ne)=>{const ae=`${ee} ${te===1?"atendimento":"atendimentos"}`;if(!ne.max_minutes)return`Capture ${ae} sem deixar na fila`;const re=`com menos de ${minutesLabel(ne.max_minutes)} de fila`;return te===1?`Capture ${ae} ${re}`:`Capture ${ae}, cada um ${re}`},chat_flow:(ee,te)=>te===1?"Inicie 1 atendimento proativo":`Inicie ${ee} atendimentos proativos`,level:ee=>`Alcance o nível ${ee}`,season_points:ee=>`Acumule ${ee} pontos`,season_rank:(ee,te)=>te===1?"Termine uma temporada em 1º lugar":`Termine uma temporada no top ${ee}`,season_wins:(ee,te)=>`Vença ${ee} ${te===1?"temporada":"temporadas"}`};function minutesLabel(ee){return`${formatTarget(ee)} ${Number(ee)===1?"minuto":"minutos"}`}function formatTarget(ee){return Number(ee).toLocaleString("pt-BR")}function describeAchievementRequirement(ee){var ve;const te=ee==null?void 0:ee.requirement,ne=achievementMetric(te==null?void 0:te.metric),ae=Number(te==null?void 0:te.target);if(!ne||!Number.isFinite(ae)||ae<1)return null;const re=normalizeParams(ne.key,te.params),oe=te.scope==="season"?"season":"general",ie=te.season??null,le=(ie==null?void 0:ie.name)??null,ce=ee.progress??((ve=ee.unlocked)==null?void 0:ve.progress),de=Number(ce),ue=ce!=null&&Number.isFinite(de);return{metric:ne.key,metricLabel:ne.label,unit:ne.unit,target:ae,params:re,scope:oe,season:ie,seasonName:le,scopeLabel:oe==="season"?"Por temporada":"Conta desde sempre",text:REQUIREMENT_SENTENCE[ne.key](formatTarget(ae),ae,re),progress:ue?{current:Math.max(0,Math.min(de,ae)),target:ae,remaining:Math.max(0,ae-de),pct:Math.max(0,Math.min(100,Math.round(de/ae*100)))}:null}}const RAW_BASE_ACHIEVEMENTS=[{id:"primeiro-contato",name:"Primeiro Contato",description:"Conclua 1 atendimento.",icon:"👋",rarity:"common",metric:"chat_finished",target:1,xp:25},{id:"pegando-o-jeito",name:"Pegando o Jeito",description:"Conclua 25 atendimentos.",icon:"🔥",rarity:"common",metric:"chat_finished",target:25,xp:50},{id:"primeira-estrela",name:"Primeira Estrela",description:"Receba 1 avaliação com nota 9 ou mais.",icon:"⭐",rarity:"common",metric:"chat_grade",params:{min_grade:9},target:1,xp:25},{id:"mao-na-massa",name:"Mão na Massa",description:"Inicie 1 atendimento proativo.",icon:"💪",rarity:"common",metric:"chat_flow",target:1,xp:25},{id:"sem-enrolar",name:"Sem Enrolar",description:"Resolva 10 atendimentos, cada um em menos de 5 minutos.",icon:"⚡",rarity:"common",metric:"chat_attending_time",params:{max_minutes:5},target:10,xp:50},{id:"porta-aberta",name:"Porta Aberta",description:"Capture 10 atendimentos, cada um com menos de 1 minuto de fila.",icon:"🚪",rarity:"common",metric:"chat_waiting_time",params:{max_minutes:1},target:10,xp:50},{id:"centuriao",name:"Centurião",description:"Conclua 100 atendimentos.",icon:"💯",rarity:"rare",metric:"chat_finished",target:100,xp:120},{id:"modo-turbo",name:"Modo Turbo",description:"Resolva 50 atendimentos, cada um em menos de 5 minutos.",icon:"🚀",rarity:"rare",metric:"chat_attending_time",params:{max_minutes:5},target:50,xp:120},{id:"ima-de-elogios",name:"Ímã de Elogios",description:"Receba 25 avaliações com nota 9 ou mais.",icon:"🧲",rarity:"rare",metric:"chat_grade",params:{min_grade:9},target:25,xp:130},{id:"ninja-da-fila",name:"Ninja da Fila",description:"Capture 50 atendimentos, cada um com menos de 1 minuto de fila.",icon:"🥷",rarity:"rare",metric:"chat_waiting_time",params:{max_minutes:1},target:50,xp:140},{id:"cacador-de-clientes",name:"Caçador de Clientes",description:"Inicie 25 atendimentos proativos.",icon:"🎯",rarity:"rare",metric:"chat_flow",target:25,xp:140},{id:"veterano",name:"Veterano",description:"Alcance o nível 15.",icon:"🎖️",rarity:"rare",metric:"level",target:15,xp:160},{id:"pontuador",name:"Pontuador",description:"Acumule 500 pontos na temporada.",icon:"📊",rarity:"rare",metric:"season_points",scope:"season",target:500,xp:150},{id:"maratonista",name:"Maratonista",description:"Conclua 1.000 atendimentos.",icon:"🏃",rarity:"epic",metric:"chat_finished",target:1e3,xp:350},{id:"colecionador-de-dez",name:"Colecionador de Dez",description:"Receba 100 avaliações com nota 10.",icon:"💎",rarity:"epic",metric:"chat_grade",params:{min_grade:10},target:100,xp:400},{id:"velocidade-de-cruzeiro",name:"Velocidade de Cruzeiro",description:"Resolva 250 atendimentos, cada um em menos de 5 minutos.",icon:"🛫",rarity:"epic",metric:"chat_attending_time",params:{max_minutes:5},target:250,xp:380},{id:"especialista",name:"Especialista",description:"Alcance o nível 30.",icon:"⚔️",rarity:"epic",metric:"level",target:30,xp:500},{id:"lugar-ao-sol",name:"Lugar ao Sol",description:"Termine uma temporada no top 3.",icon:"🥉",rarity:"epic",metric:"season_rank",target:3,xp:400},{id:"lenda-viva",name:"Lenda Viva",description:"Conclua 10.000 atendimentos.",icon:"👑",rarity:"legendary",metric:"chat_finished",target:1e4,xp:1e3},{id:"imortal",name:"Imortal",description:"Alcance o nível 50.",icon:"♾️",rarity:"legendary",metric:"level",target:50,xp:1200},{id:"topo-do-mundo",name:"Topo do Mundo",description:"Termine uma temporada em 1º lugar.",icon:"🌟",rarity:"legendary",metric:"season_rank",target:1,xp:1200},{id:"dinastia",name:"Dinastia",description:"Vença 3 temporadas.",icon:"🏆",rarity:"legendary",metric:"season_wins",target:3,xp:1500},{id:"speedrun",name:"Speedrun Any%",description:"Resolva 10 atendimentos, cada um em menos de 2 minutos.",icon:"🏁",rarity:"secret",hint:"Rápido demais para ser visto.",metric:"chat_attending_time",params:{max_minutes:2},target:10,xp:1800},{id:"na-mosca",name:"Na Mosca",description:"Receba 10 avaliações com nota 10.",icon:"🔟",rarity:"secret",hint:"Perfeição tem sequência.",metric:"chat_grade",params:{min_grade:10},target:10,xp:2e3},{id:"movido-a-cafe",name:"Movido a Café",description:"Conclua 500 atendimentos.",icon:"☕",rarity:"secret",hint:"☕ ☕ ☕",metric:"chat_finished",target:500,xp:2200},{id:"elite",name:"Elite",description:"Acumule 1.337 pontos na temporada.",icon:"😎",rarity:"secret",hint:"Um número muito específico.",metric:"season_points",scope:"season",target:1337,xp:2337},{id:"a-virada",name:"A Virada",description:"Termine uma temporada no top 5.",icon:"📈",rarity:"secret",hint:"Ninguém viu essa chegando.",metric:"season_rank",target:5,xp:2100}],BASE_ACHIEVEMENTS=RAW_BASE_ACHIEVEMENTS.map(({metric:ee,target:te,params:ne,scope:ae,season:re,...oe})=>({hint:"",status:!0,...oe,requirement:createAchievementRequirement({metric:ee,target:te,params:ne,scope:ae,season:re})})),SM_PLAY_MOCK_ENABLED=!1,XP_CURVE_BASE=100,XP_CURVE_EXPONENT=1.5;function xpStep(ee){const te=Number(ee)>=1?Number(ee):1;return Math.round(XP_CURVE_BASE*te**XP_CURVE_EXPONENT)}function xpFloorForLevel(ee){const te=Number(ee)>=1?Math.trunc(Number(ee)):1;let ne=0;for(let ae=1;ae<te;ae+=1)ne+=xpStep(ae);return ne}function resolveLevel(ee){const te=Math.max(0,Math.trunc(Number(ee)||0));let ne=1,ae=0;for(;te-ae>=xpStep(ne);)ae+=xpStep(ne),ne+=1;const re=te-ae,oe=xpStep(ne);return{level:ne,xp_into_level:re,xp_for_next:oe,progress_pct:Math.min(100,Math.round(re/oe*100))}}function buildBalanceImpact({points:ee=0,totalXp:te=0,level:ne=0,delta:ae=0}={}){const re=ve=>Number(ve).toLocaleString("pt-BR"),oe=ae!==0,ie=Math.max(0,Number(ee)+ae),le=Math.max(0,Number(te)+ae),ce=resolveLevel(le).level,de=ce-Number(ne),ue=Math.abs(de);return[{key:"points",label:"Pontos da temporada",from:re(ee),to:re(ie),changed:oe},{key:"xp",label:"XP total",from:re(te),to:re(le),changed:oe},{key:"level",label:"Nível",from:String(ne),to:String(ce),changed:oe&&ue>0,note:ue?`${de>0?"+":"−"}${ue} ${ue===1?"nível":"níveis"}`:""}]}const activeCatalog=e$b.shallowRef({frames:[],titles:[],achievements:[]});let catalogIndex={frame:new Map,title:new Map,achievement:new Map};function indexById(ee){const te=new Map;for(const ne of ee)ne!=null&&ne.id&&te.set(ne.id,ne);return te}function setCosmeticsCatalog(ee){activeCatalog.value={frames:(ee==null?void 0:ee.frames)??[],titles:(ee==null?void 0:ee.titles)??[],achievements:(ee==null?void 0:ee.achievements)??[]},catalogIndex={frame:indexById(activeCatalog.value.frames),title:indexById(activeCatalog.value.titles),achievement:indexById(activeCatalog.value.achievements)}}const activeAchievements=e$b.shallowRef([]);let achievementIndex=new Map;function setAchievementsCatalog(ee){activeAchievements.value=Array.isArray(ee)?ee:[],achievementIndex=indexById(activeAchievements.value)}function findAchievement(ee){return ee?(activeAchievements.value,achievementIndex.get(ee)||null):null}function findCosmetic(ee,te){var ne;return te?(activeCatalog.value,((ne=catalogIndex[ee])==null?void 0:ne.get(te))||null):null}function isRequirementMet(ee,te){var ne;return!ee||ee.kind==="public"?!0:ee.kind==="level"?te.level>=ee.level:ee.kind==="achievement"?te.unlockedAchievementIds.has(ee.id):ee.kind==="season_rank"?te.bestSeasonRank<=ee.rank:["manual","grant","season"].includes(ee.kind)?((ne=te.ownedCosmeticIds)==null?void 0:ne.has(ee.cosmetic_id))??!1:!1}function isSecretToViewer(ee,te){var ne;return(ee==null?void 0:ee.rarity)==="secret"&&!(te!=null&&te.revealSecrets)&&!((ne=te==null?void 0:te.unlockedAchievementIds)!=null&&ne.has(ee.id))}function requirementLabel(ee,te){if(!ee||ee.kind==="public")return"Disponível para todos";if(ee.kind==="level")return`Nível ${ee.level}`;if(ee.kind==="season_rank")return`Top ${ee.rank} na temporada`;if(ee.kind==="season")return"Coleção de temporada";if(["manual","grant"].includes(ee.kind))return"Concedido pela gestão";const ne=findAchievement(ee.id);return ne?isSecretToViewer(ne,te)?"Conquista secreta":`Conquista: ${ne.name}`:"Conquista"}function describeCosmeticRequirement(ee,te=null){const ne={...baselineMeritContext(),...te||{}},ae=(ee==null?void 0:ee.kind)??"public",re=requirementLabel(ee,ne);if(!ee||ae==="public")return{kind:"public",label:re,text:"Já está disponível — sem requisito."};if(ae==="level"){const oe=Number(ee.level)||0,ie=Number(ne.level)||0;return{kind:ae,label:re,text:`Chegue ao nível ${oe}. O XP que sobe o nível não zera entre temporadas.`,unit:"níveis",progress:oe>0?{current:Math.max(0,Math.min(ie,oe)),target:oe,remaining:Math.max(0,oe-ie),pct:Math.max(0,Math.min(100,Math.round(ie/oe*100)))}:null}}if(ae==="season_rank"){const oe=Number(ee.rank)||0,ie=Number(ne.bestSeasonRank),le=Number.isFinite(ie);return{kind:ae,label:re,text:`Feche uma temporada entre os ${oe} primeiros do seu departamento.`,note:le?`Sua melhor posição até agora: ${ie}º`:"Você ainda não fechou uma temporada com posição registrada."}}if(ae==="achievement"){const oe=findAchievement(ee.id),ie=isSecretToViewer(oe,ne);return oe?{kind:ae,label:re,text:ie?"Desbloqueie uma conquista secreta — ela se revela quando você chegar lá.":`Desbloqueie a conquista "${oe.name}".`,note:ie?null:oe.description||null}:{kind:ae,label:re,text:"Desbloqueie a conquista ligada a este item."}}return ae==="season"?{kind:ae,label:re,text:"Item de coleção de temporada: sai com o ciclo em que é oferecido."}:["manual","grant"].includes(ae)?{kind:ae,label:re,text:"Só a gestão concede este item — não há como desbloquear atendendo."}:{kind:ae,label:re,text:re}}function resolveCosmeticRequirement(ee){const te=ee.availability||ee.requirement;return te?{...typeof te=="string"?{kind:te}:{...te},cosmetic_id:ee.id}:null}function baselineMeritContext(){return{level:1,unlockedAchievementIds:new Set,bestSeasonRank:1/0,ownedCosmeticIds:new Set,revealSecrets:!1}}function buildCosmetics(ee=baselineMeritContext()){const te=re=>{var ce;const oe=resolveCosmeticRequirement(re),ie=isRequirementMet(oe,ee),le={...re,unlocked:ie,availability:oe,requirementLabel:requirementLabel(oe,ee)};return re.type!=="achievement"?le:re.achievementId?{...le,requirementLabel:((ce=RARITIES[re.rarity])==null?void 0:ce.label)||"Desbloqueada"}:{...le,requirementLabel:"Sem destaque"}},ne=activeCatalog.value,ae=ne.achievements.filter(re=>!re.achievementId||isRequirementMet(resolveCosmeticRequirement(re),ee));return[{slot:"frame",label:"Molduras",items:ne.frames.map(te)},{slot:"title",label:"Títulos",items:ne.titles.map(te)},{slot:"achievement",label:"Destaque",items:ae.map(te)}]}function slotId(ee){return ee?typeof ee=="object"?ee.id??null:ee:null}function resolveSmPlayEnabled(ee,te=SM_PLAY_MOCK_ENABLED){var ne;return!ee||typeof ee!="object"?!1:!!(((ne=ee.gamification)==null?void 0:ne.enabled)??ee.gamification_enabled??te)}function resolveAttendantGamification(ee){var ue;const te=(ee==null?void 0:ee.gamification)??(ee==null?void 0:ee.game_profile)??{},ne=te.cosmetics??(ee==null?void 0:ee.cosmetics)??{},ae=ne.equipped??te.equipped??((ue=ee==null?void 0:ee.cosmetics)==null?void 0:ue.equipped)??ne,re=slotId(ae.frame)??null,oe=slotId(ae.title)??null,ie=slotId(ae.achievement)??null,le=(ve,me,be)=>{const fe=ve==="achievement"?findAchievement(be):findCosmetic(ve,be);return fe?typeof me!="object"?fe:{...fe,...me,...me.rarity==null&&fe.rarity?{rarity:fe.rarity}:{}}:typeof me=="object"?me:null},ce=te.level??(ee==null?void 0:ee.gamification_level)??(ee==null?void 0:ee.level)??null,de=ce===null||ce===""?null:Number(ce);return{level:Number.isFinite(de)?de:null,equipped:{frame:re,title:oe,achievement:ie},frame:le("frame",ae.frame,re),title:le("title",ae.title,oe),achievement:le("achievement",ae.achievement,ie)}}const useAttendantStore=pinia.defineStore("attendant",{state:()=>({attendants:[],count:null,loaded:!1}),getters:{logged_attendant:ee=>()=>ee.attendants.find(te=>te.is_me),attendantsById:ee=>{const te=new Map;for(const ne of ee.attendants)(ne==null?void 0:ne.id)!=null&&te.set(String(ne.id),ne);return te}},actions:{async fetchAttendants(){try{let ee=`${attendantUrl}`;const te=await api.get(ee);this.attendants=te.data,this.count=this.attendants.length}catch(ee){console.log("Erro ao buscar atendentes:",ee)}},removeAttendants(ee){this.attendants=this.attendants.filter(te=>te.id!==ee)},addAttendants(ee){const te=this.attendants.findIndex(ne=>ne.id===ee.id);te!==-1?this.attendants[te]=ee:this.attendants.push(ee)}}}),useMessageUiStore=pinia.defineStore("smClickMessageUi",{state:()=>({deviceType:"web",smPlayEnabled:!1,currentChat:null,attendant:null,themeMode:!0,forwardMode:{active:!1,selectedMessages:[]},actionsMenu:{messageId:null,message:null,x:0,y:0},quote:null,editMessage:{id:null,text:"",editing:!1},list:{modal:!1,message:null}}),getters:{isWebDevice:ee=>ee.deviceType==="web",chatActive:ee=>{var te;return((te=ee.currentChat)==null?void 0:te.status)==="active"},chatInstanceId:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.instance)==null?void 0:ne.id)??null},instancePhone:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.instance)==null?void 0:ne.telephone)??""},isGroupChat:ee=>{var te;return!!((te=ee.currentChat)!=null&&te.group)},contactPhoto:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.contact)==null?void 0:ne.photo)??""},contactName:ee=>{var te,ne;return((ne=(te=ee.currentChat)==null?void 0:te.contact)==null?void 0:ne.name)??""},isMessageSelected:ee=>te=>ee.forwardMode.selectedMessages.includes(te),isActionsTarget:ee=>te=>ee.actionsMenu.messageId!==null&&ee.actionsMenu.messageId===te,loggedAttendant:ee=>ee.attendant||useAttendantStore().logged_attendant()||null},actions:{setContext({deviceType:ee,smPlayEnabled:te,currentChat:ne,themeMode:ae,attendant:re}={}){ee!==void 0&&(this.deviceType=ee||"web"),te!==void 0&&(this.smPlayEnabled=!!te),ne!==void 0&&(this.currentChat=ne),ae!==void 0&&(this.themeMode=!!ae),re!==void 0&&(this.attendant=re)},openActions(ee,te){ee!=null&&ee.id&&(this.actionsMenu={messageId:ee.id,message:ee,x:(te==null?void 0:te.clientX)??0,y:(te==null?void 0:te.clientY)??0})},closeActions(){this.actionsMenu={messageId:null,message:null,x:0,y:0}},startForward(ee){this.forwardMode.active=!0;const te=Array.isArray(ee==null?void 0:ee.items)?ee.items.map(ne=>ne==null?void 0:ne.id).filter(ne=>ne!=null&&ne!==""):[];this.forwardMode.selectedMessages=te.length?te:[ee==null?void 0:ee.id].filter(Boolean)},toggleMessageSelection(ee){if(!ee)return;this.forwardMode.active=!0;const te=this.forwardMode.selectedMessages.indexOf(ee);te>-1?this.forwardMode.selectedMessages.splice(te,1):this.forwardMode.selectedMessages.push(ee),this.forwardMode.selectedMessages.length||(this.forwardMode.active=!1)},togglePackageSelection(ee=[]){const te=ee.filter(ae=>ae!=null&&ae!=="");if(!te.length)return;this.forwardMode.active=!0;const ne=te.filter(ae=>this.forwardMode.selectedMessages.includes(ae));ne.length>te.length-ne.length?this.forwardMode.selectedMessages=this.forwardMode.selectedMessages.filter(ae=>!te.includes(ae)):te.forEach(ae=>{this.forwardMode.selectedMessages.includes(ae)||this.forwardMode.selectedMessages.push(ae)}),this.forwardMode.selectedMessages.length||(this.forwardMode.active=!1)},clearForward(){this.forwardMode.active=!1,this.forwardMode.selectedMessages=[]},setQuote(ee,te,ne){if(!ee){this.quote=null;return}this.quote={...ee,id:ne,...te?{sent_by:te}:{}}},clearQuote(){this.quote=null},startEdit(ee){var te;this.editMessage={id:(ee==null?void 0:ee.id)??null,editing:!0,text:((te=ee==null?void 0:ee.content)==null?void 0:te.text)??""},this.quote=null},clearEdit(){this.editMessage={id:null,text:"",editing:!1}},openList(ee){this.list.modal=!0,this.list.message=ee},closeList(){this.list.modal=!1,this.list.message=null}}}),_hoisted_1$2q={key:0,class:"sm-avatar-arc",viewBox:"0 0 100 100",fill:"none","aria-hidden":"true"},_hoisted_2$27={key:0,class:"sm-avatar-core sm-avatar-core--empty","aria-hidden":"true"},_hoisted_3$1V={key:1,class:"sm-avatar-core"},_hoisted_4$1J=["alt"],_hoisted_5$1z=["src","alt"],_hoisted_6$1q={key:2,class:"sm-avatar-core sm-avatar-core--initials"},_hoisted_7$1i={key:0,class:"size-[62%]",viewBox:"0 0 24 24",fill:"currentColor"},_hoisted_8$1a={key:1,class:"size-[58%]",viewBox:"0 0 24 24",fill:"currentColor"},_hoisted_9$15={class:"sm-avatar-level"},_hoisted_10$_=["title"],_hoisted_11$T={key:3,class:"sm-avatar-outcome","aria-hidden":"true"},_hoisted_12$O={key:0,class:"sm-avatar-outcome-icon sm-avatar-outcome-icon--won",viewBox:"0 0 20 20",fill:"none"},_hoisted_13$H={key:1,class:"sm-avatar-outcome-icon sm-avatar-outcome-icon--lost",viewBox:"0 0 20 17",fill:"none"},_hoisted_14$F={key:4,class:"sm-avatar-blocked","aria-hidden":"true"},FRAME_REFERENCE_SIZE=72,_sfc_main$2D={__name:"Avatar",props:{photo:{type:String,default:""},name:{type:String,default:""},size:{type:String,default:"md",validator:ee=>["xs","sm","md","lg","xl","preview","fill"].includes(ee)},scale:{type:String,default:"identity",validator:ee=>["identity","app"].includes(ee)},fallback:{type:String,default:"initials",validator:ee=>["initials","icon","group"].includes(ee)},attendant:{type:Object,default:null},smPlay:{type:Boolean,default:void 0},frame:{type:Object,default:void 0},frameOnly:{type:Boolean,default:!1},level:{type:Number,default:null},showLevel:{type:Boolean,default:!0},effectLevel:{type:String,default:"border",validator:ee=>["full","compact","border"].includes(ee)},clickable:{type:Boolean,default:!1},blocked:{type:Boolean,default:!1},channel:{type:String,default:null},outcome:{type:String,default:null,validator:ee=>[null,"","won","lost"].includes(ee)}},emits:["view"],setup(ee,{emit:te}){const ne=ee,ae=te,re={identity:{xs:22.4,sm:38.4,md:44,lg:60,preview:66,xl:112},app:{xs:26,sm:40,md:56,lg:80,xl:112}},oe=!!pinia.getActivePinia(),ie=oe?useAttendantStore():null,le=oe?useMessageUiStore():null,ce=e$b.inject("smPlayEnabled",null),de=e$b.computed(()=>{var Ue;return ne.name||((Ue=ne.attendant)==null?void 0:Ue.name)||""}),ue=e$b.computed(()=>{var Ue;return ne.photo||((Ue=ne.attendant)==null?void 0:Ue.photo)||""}),ve=e$b.computed(()=>{var at;const Ue=(at=ne.attendant)==null?void 0:at.id;return!Ue||!ie?null:ie.attendantsById.get(String(Ue))||null}),me=e$b.computed(()=>{if(!ne.attendant)return null;const Ue=resolveAttendantGamification(ne.attendant);return Ue.frame||Ue.title||Ue.achievement||!ve.value?Ue:resolveAttendantGamification(ve.value)}),be=e$b.computed(()=>{if(ne.smPlay!==void 0)return ne.smPlay;const Ue=e$b.unref(ce);return Ue!=null?!!Ue:!!(le!=null&&le.smPlayEnabled)}),fe=e$b.computed(()=>!!ne.attendant&&be.value&&resolveSmPlayEnabled(ve.value||ne.attendant)),pe=e$b.computed(()=>{var Ue;return ne.frame!==void 0?ne.frame:fe.value?(Ue=me.value)==null?void 0:Ue.frame:null}),_e=e$b.computed(()=>{var Ue;return ne.level!==null?ne.level:fe.value?(Ue=me.value)==null?void 0:Ue.level:null}),ge=e$b.computed(()=>avatarInitials(de.value)),ke=e$b.computed(()=>ne.fallback==="initials"&&!!ge.value),$e=e$b.computed(()=>avatarHue(de.value||ue.value)),ye=e$b.computed(()=>!isImageSourcePreloaded(ue.value)),Ee=e$b.computed(()=>resolveFrameVisual(pe.value)),Se=e$b.computed(()=>{var Ue;return((Ue=Ee.value)==null?void 0:Ue.css)??null}),Le=e$b.computed(()=>!!Se.value),Me=e$b.computed(()=>{var Ue;return((Ue=Ee.value)==null?void 0:Ue.ring.variant)==="arc"}),De=e$b.computed(()=>{var Ue;return((Ue=Ee.value)==null?void 0:Ue.ring.variant)==="double"}),Oe=e$b.computed(()=>{var Ue,at;return Me.value&&((at=(Ue=Ee.value)==null?void 0:Ue.ornament)==null?void 0:at.variant)||""}),Re=e$b.computed(()=>{var Ue;return!!((Ue=Ee.value)!=null&&Ue.ornament.enabled)&&frameVariantLocked("ornament",Ee.value.ornament.variant)}),ze=e$b.computed(()=>{var Ue,at;return((Ue=Ee.value)==null?void 0:Ue.motion.enabled)&&((at=Ee.value)==null?void 0:at.motion.rotation)&&ne.effectLevel!=="border"}),Ve=e$b.computed(()=>{var Ue;return ze.value&&["rainbow","neon"].includes((Ue=Ee.value)==null?void 0:Ue.ring.variant)}),Ne=e$b.computed(()=>{var at;if(ne.size==="fill")return 1;const Ue=((at=re[ne.scale])==null?void 0:at[ne.size])??FRAME_REFERENCE_SIZE;return Math.min(2.4,Ue/FRAME_REFERENCE_SIZE)}),Pe=Ue=>`calc(var(--sm-frame-width, 2px) * ${Math.round(Ue*100)/100})`,Be=e$b.computed(()=>{if(!Ee.value)return"";const Ue=Ee.value.ring;if(Ue.variant==="arc")return"none";const at=Ue.glow*Ue.intensity,Je=Ue.colors[0],lt=Ue.colors[1];if(Ue.variant==="double")return`0 0 ${Pe(1.6+at*1.8)} color-mix(in srgb, ${Je} ${Math.round(28+at*45)}%, transparent)`;if(Ue.variant==="neon")return`0 0 ${Pe(1.4+at*1.4)} color-mix(in srgb, ${Je} ${Math.round(45+at*45)}%, transparent), 0 0 ${Pe(2.6+at*2.6)} color-mix(in srgb, ${lt} ${Math.round(25+at*45)}%, transparent)`;if(Ue.variant==="rainbow"){const it=Ue.colors[2];return`0 0 ${Pe(1.3+at*1.3)} color-mix(in srgb, ${Je} ${Math.round(35+at*40)}%, transparent), 0 0 ${Pe(2.2+at*2.2)} color-mix(in srgb, ${lt} ${Math.round(25+at*35)}%, transparent), 0 0 ${Pe(3.1+at*3.1)} color-mix(in srgb, ${it} ${Math.round(18+at*32)}%, transparent)`}return`0 0 ${Pe(1.2+at*2)} color-mix(in srgb, ${Je} ${Math.round(18+at*42)}%, transparent)`}),Ae=e$b.computed(()=>{var lt;if(ne.size==="fill"&&!Le.value)return"0px";const Ue=Me.value?.72:De.value?1.4:1,at=Me.value?1.5:De.value?3:2,Je=(((lt=Ee.value)==null?void 0:lt.ring.width)||2)*Ue/FRAME_REFERENCE_SIZE;return ne.size==="fill"?`max(${at}px, ${Math.round(Je*1e4)/100}cqw)`:`${Math.max(at,Je*FRAME_REFERENCE_SIZE*Ne.value)}px`}),xe=e$b.computed(()=>{var Ue,at,Je,lt,it,gt,Et,mt;return Le.value?{"--sm-frame-bg":Me.value?"transparent":Se.value,boxShadow:Be.value,"--sm-frame-width":Ae.value,"--sm-frame-band-gap":"max(1px, calc(var(--sm-frame-width) * 0.16))","--sm-frame-band-inner":"calc(max(1px, calc(var(--sm-frame-width) * 0.16)) + max(1px, calc(var(--sm-frame-width) * 0.3)))","--sm-frame-primary":((at=(Ue=Ee.value)==null?void 0:Ue.ring.colors)==null?void 0:at[0])||"rgb(var(--primary-rgb))","--sm-frame-secondary":((lt=(Je=Ee.value)==null?void 0:Je.ring.colors)==null?void 0:lt[1])||"rgb(var(--primary-rgb))","--sm-frame-accent":((gt=(it=Ee.value)==null?void 0:it.ring.colors)==null?void 0:gt[2])||"rgb(var(--primary-rgb))","--sm-frame-ring-speed":`${6/(((Et=Ee.value)==null?void 0:Et.motion.speed)||1)}s`,"--sm-frame-ring-direction":((mt=Ee.value)==null?void 0:mt.motion.direction)==="counterclockwise"?"reverse":"normal","--avatar-hue":$e.value}:{"--sm-frame-width":Ae.value,"--avatar-hue":$e.value}}),Ce=e$b.computed(()=>({background:Se.value||"rgb(var(--primary-rgb))"})),Fe=e$b.computed(()=>ne.size==="fill"?"sm-avatar--fill":`sm-avatar--${ne.scale}-${ne.size}`),Ie=e$b.computed(()=>{const Ue=normalizeChannel(ne.channel);return Ue==="whatsapp"?null:Ue}),qe=e$b.computed(()=>{var Ue;return!!((Ue=Ee.value)!=null&&Ue.motion.enabled)&&(ne.effectLevel!=="border"||Re.value)}),{offscreenRef:Ge,paused:Ze}=useOffscreenPause(qe);function Xe(){ne.clickable&&ue.value&&ae("view",ue.value)}return(Ue,at)=>{const Je=e$b.resolveDirective("lazy");return e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(ee.clickable?"button":"div"),{ref_key:"offscreenRef",ref:Ge,class:e$b.normalizeClass(["sm-avatar",[Fe.value,ee.clickable?"sm-avatar--clickable":"",e$b.unref(Ze)?"sm-avatar--offscreen":""]]),type:ee.clickable?"button":void 0,onClick:Xe},{default:e$b.withCtx(()=>{var lt;return[Ee.value&&(ee.effectLevel!=="border"||Re.value)?(e$b.openBlock(),e$b.createBlock(FrameEffects,{key:0,visual:Ee.value,"visual-normalized":"","effect-level":ee.effectLevel,"pause-offscreen":!1},null,8,["visual","effect-level"])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",{class:e$b.normalizeClass(["sm-avatar-frame",[ze.value?"sm-avatar-frame--animated":"",Ve.value?"sm-avatar-frame--spins":"",(lt=Ee.value)!=null&<.ring.variant?`sm-avatar-frame--${Ee.value.ring.variant}`:"",Oe.value?`sm-avatar-frame--signature-${Oe.value}`:"",Le.value?"sm-avatar-frame--painted":"",ee.frameOnly&&!Le.value?"sm-avatar-frame--empty":""]]),style:e$b.normalizeStyle(xe.value)},[Me.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_1$2q,[...at[0]||(at[0]=[e$b.createElementVNode("circle",{class:"sm-avatar-arc-halo",cx:"50",cy:"50",r:"48.5"},null,-1),e$b.createElementVNode("circle",{class:"sm-avatar-arc-core",cx:"50",cy:"50",r:"48.5"},null,-1),e$b.createElementVNode("circle",{class:"sm-avatar-arc-highlight",cx:"50",cy:"50",r:"48.5"},null,-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",{class:e$b.normalizeClass(["sm-avatar-gap",Le.value&&ee.scale==="app"?"sm-avatar-gap--app":""])},[ee.frameOnly?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_2$27)):ue.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_3$1V,[ye.value?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("img",{key:0,alt:de.value,class:"sm-avatar-image"},null,8,_hoisted_4$1J)),[[Je,ue.value]]):(e$b.openBlock(),e$b.createElementBlock("img",{key:1,src:ue.value,alt:de.value,class:"sm-avatar-image"},null,8,_hoisted_5$1z))])):ke.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$1q,e$b.toDisplayString(ge.value),1)):(e$b.openBlock(),e$b.createElementBlock("div",{key:3,class:e$b.normalizeClass(["sm-avatar-core",ee.fallback==="group"?"sm-avatar-core--initials sm-avatar-core--group":"sm-avatar-core--icon"]),"aria-hidden":"true"},[ee.fallback==="group"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$1i,[...at[1]||(at[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 6a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm-1.5 8a4 4 0 0 0-4 4 2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-3Zm6.82-3.096a5.51 5.51 0 0 0-2.797-6.293 3.5 3.5 0 1 1 2.796 6.292ZM19.5 18h.5a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-1.1a5.503 5.503 0 0 1-.471.762A5.998 5.998 0 0 1 19.5 18ZM4 7.5a3.5 3.5 0 0 1 5.477-2.889 5.5 5.5 0 0 0-2.796 6.293A3.501 3.501 0 0 1 4 7.5ZM7.1 12H6a4 4 0 0 0-4 4 2 2 0 0 0 2 2h.5a5.998 5.998 0 0 1 3.071-5.238A5.505 5.505 0 0 1 7.1 12Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1a,[...at[2]||(at[2]=[e$b.createElementVNode("path",{d:"M12 12.4a4.2 4.2 0 1 0 0-8.4 4.2 4.2 0 0 0 0 8.4Zm0 1.7c-3.98 0-7.2 2.28-7.2 5.09 0 .45.37.81.83.81h12.74c.46 0 .83-.36.83-.81 0-2.81-3.22-5.09-7.2-5.09Z"},null,-1)])]))],2))],2)],6),!ee.frameOnly&&ee.showLevel&&_e.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"sm-avatar-level-frame",style:e$b.normalizeStyle(Ce.value)},[e$b.createElementVNode("span",_hoisted_9$15,e$b.toDisplayString(_e.value),1)],4)):e$b.createCommentVNode("",!0),Ie.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:2,class:e$b.normalizeClass(["sm-avatar-channel",`sm-avatar-channel--${Ie.value}`]),title:e$b.unref(channelLabel)(ee.channel)},[e$b.createVNode(ChannelIcon,{channel:Ie.value},null,8,["channel"])],10,_hoisted_10$_)):e$b.createCommentVNode("",!0),ee.outcome?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_11$T,[ee.outcome==="won"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$O,[...at[3]||(at[3]=[e$b.createElementVNode("path",{d:"M3.16666 6.37502C3.74962 6.37502 4.2222 6.85073 4.22222 7.43752V15.9375C4.22222 16.5243 3.74963 17 3.16666 17H1.05555C0.472588 17 0 16.5243 0 15.9375V7.43752C1.50967e-05 6.85073 0.472597 6.37502 1.05555 6.37502H3.16666Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.48143 1.4454C9.79496 -0.637173 11.5194 0.143216 11.5194 0.143216C13.863 1.75728 13.005 4.80783 12.2832 6.13118H17.4424C19.5307 6.65187 19.0768 8.34354 18.5887 9.12465C19.5056 10.7905 18.4191 11.7716 17.7609 12.0538C18.1175 13.7717 17.0601 14.4178 16.4869 14.5264C16.8944 16.4004 15.5533 16.9564 14.8314 17H10.436C8.49997 16.9999 6.19055 16.1753 5.27777 15.7632V7.368C9.03523 5.6108 9.09933 3.98356 9.48143 1.4454Z",fill:"currentColor"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$H,[...at[4]||(at[4]=[e$b.createElementVNode("path",{d:"M15.8333 10.625C15.2504 10.625 14.7778 10.1493 14.7778 9.56249L14.7778 1.0625C14.7778 0.475698 15.2504 1.57955e-06 15.8333 1.63051e-06L17.9444 1.81507e-06C18.5274 1.86603e-06 19 0.475698 19 1.0625L19 9.56249C19 10.1493 18.5274 10.625 17.9444 10.625L15.8333 10.625Z",fill:"currentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.51857 15.5546C9.20504 17.6372 7.48065 16.8568 7.48065 16.8568C5.13698 15.2427 5.99503 12.1922 6.71681 10.8688L1.55759 10.8688C-0.530671 10.3481 -0.0768444 8.65646 0.411319 7.87535C-0.50562 6.20951 0.580926 5.22844 1.23906 4.94622C0.882549 3.22832 1.93994 2.5822 2.51315 2.47363C2.10564 0.59965 3.44673 0.0436064 4.16864 6.1075e-07L8.56403 9.95007e-07C10.5 0.000138493 12.8095 0.824657 13.7222 1.23682L13.7222 9.632C9.96477 11.3892 9.90067 13.0164 9.51857 15.5546Z",fill:"currentColor"},null,-1)])]))])):e$b.createCommentVNode("",!0),ee.blocked?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_14$F,[...at[5]||(at[5]=[e$b.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"})],-1)])])):e$b.createCommentVNode("",!0),e$b.renderSlot(Ue.$slots,"badge",{},void 0,!0)]}),_:3},8,["class","type"])}}},Avatar=_export_sfc$1(_sfc_main$2D,[["__scopeId","data-v-a254c3bf"]]),_hoisted_1$2p={class:"vcard"},_hoisted_2$26={class:"vcard__stack"},_hoisted_3$1U={class:"vcard__info"},_hoisted_4$1I={class:"vcard__name"},_hoisted_5$1y={key:0,class:"vcard__subtitle"},_hoisted_6$1p={key:0,class:"vcard__chevron","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},_hoisted_7$1h={key:0,class:"vcard-modal vcard-people"},_hoisted_8$19={class:"vcard-person__info"},_hoisted_9$14={class:"vcard-person__name"},_hoisted_10$Z={key:0,class:"vcard-person__phone"},_hoisted_11$S=["onClick"],_hoisted_12$N={key:1,class:"vcard-modal"},_hoisted_13$G={class:"vcard-hero"},_hoisted_14$E={class:"vcard-hero__info"},_hoisted_15$A={class:"vcard-hero__name"},_hoisted_16$x={key:0,class:"vcard-hero__role"},_hoisted_17$q={key:0,class:"vcard-rows"},_hoisted_18$q={class:"vcard-row__icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_19$l=["d"],_hoisted_20$k={class:"vcard-row__text"},_hoisted_21$h={class:"vcard-row__label"},_hoisted_22$f={class:"vcard-row__value"},_hoisted_23$b={key:0,class:"vcard-row__copied"},_sfc_main$2C=Object.assign({name:"ContactMessageCard"},{__name:"contactMessageCard",props:{contact:{type:Object,default:()=>({})},contacts:{type:Array,default:null},showStartChat:{type:Boolean,default:!1}},emits:["start-chat"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.ref("");let ie=null;function le(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function ce(Re){const ze=(Re??"").toString().replace(/\D/g,"");return ze.length===13&&ze.startsWith("55")?`+55 (${ze.slice(2,4)}) ${ze.slice(4,9)}-${ze.slice(9)}`:ze.length===12&&ze.startsWith("55")?`+55 (${ze.slice(2,4)}) ${ze.slice(4,8)}-${ze.slice(8)}`:ze.length===11?`(${ze.slice(0,2)}) ${ze.slice(2,7)}-${ze.slice(7)}`:ze.length===10?`(${ze.slice(0,2)}) ${ze.slice(2,6)}-${ze.slice(6)}`:Re}function de(Re){return typeof Re=="string"?Re:[Re.street,Re.city,Re.state,Re.zip,Re.country].filter(Boolean).join(", ")}function ue(Re){const ze=/^(\d{4})-(\d{2})-(\d{2})/.exec(Re||"");return ze?`${ze[3]}/${ze[2]}/${ze[1]}`:Re}function ve(Re){const ze=Re||{};return{name:ze.name||"Contato",title:ze.title||"",org:ze.org||ze.organization||"",photo:ze.photo||null,birthday:ze.birthday||"",phones:le(ze.telephones??ze.phones??ze.phone??ze.telephone).filter(Boolean),emails:le(ze.emails??ze.email).map(Ve=>typeof Ve=="string"?{email:Ve,type:""}:Ve).filter(Ve=>Ve&&Ve.email),urls:le(ze.urls??ze.url).map(Ve=>typeof Ve=="string"?{url:Ve,type:""}:Ve).filter(Ve=>Ve&&Ve.url),addresses:le(ze.addresses??ze.address).filter(Boolean)}}const me=e$b.computed(()=>{const Re=le(ne.contacts);return(Re.length?Re:[ne.contact]).map(ve)}),be=e$b.computed(()=>me.value.length>1),fe=e$b.computed(()=>me.value[0]),pe=e$b.computed(()=>me.value.slice(0,3)),_e=e$b.computed(()=>{if(!be.value)return fe.value.name;const Re=me.value.length-1;return Re===1?`${fe.value.name} e 1 outro contato`:`${fe.value.name} e ${Re} outros contatos`}),ge=e$b.computed(()=>{if(be.value)return`${me.value.length} contatos`;const Re=fe.value;return Re.phones.length?ce(Re.phones[0]):Re.org||Re.title||""}),ke=e$b.computed(()=>{const Re=fe.value;return Re.phones.length>1||Re.emails.length>0||Re.urls.length>0||Re.addresses.length>0||!!Re.birthday||!!Re.title||!!Re.org}),$e=e$b.computed(()=>be.value||ke.value),ye=e$b.computed(()=>({title:be.value?`${me.value.length} contatos`:fe.value.name,svg:be.value?'<svg class="size-5 text-primary" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H7Zm9.5-8a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm-.5 9a5.97 5.97 0 0 1 1.5 3.96V19a2 2 0 0 1-.28 1H20a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-2Z" clip-rule="evenodd"/></svg>':'<svg class="size-5 text-primary" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-4Z" clip-rule="evenodd"/></svg>'})),Ee={phone:"M7.4 3.6a2 2 0 0 0-2.8 0l-1 1a4 4 0 0 0-.5 4.9 33 33 0 0 0 11.4 11.4 4 4 0 0 0 4.9-.5l1-1a2 2 0 0 0 0-2.8l-2.3-2.3a2 2 0 0 0-2.8 0l-.8.8a24 24 0 0 1-5.5-5.5l.8-.8a2 2 0 0 0 0-2.8L7.4 3.6Z",email:"M2.04 6.6 12 12.7l9.96-6.1A2 2 0 0 0 20 5H4a2 2 0 0 0-1.96 1.6ZM2 8.9V17a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8.9l-9.48 5.8a1 1 0 0 1-1.04 0L2 8.9Z",addr:"M12 2a7 7 0 0 0-7 7c0 5 6.1 12.2 6.3 12.5a1 1 0 0 0 1.4 0C13 21.2 19 14 19 9a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z",url:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20ZM4.2 13h3.3c.1 2 .5 3.8 1.1 5.2A8 8 0 0 1 4.2 13Zm3.3-2H4.2A8 8 0 0 1 8.6 5.8C8 7.2 7.6 9 7.5 11ZM12 4.2c.9.9 1.8 3.1 2 6.8h-4c.2-3.7 1.1-5.9 2-6.8Zm0 15.6c-.9-.9-1.8-3.1-2-6.8h4c-.2 3.7-1.1 5.9-2 6.8Zm3.4-1.6c.6-1.4 1-3.2 1.1-5.2h3.3a8 8 0 0 1-4.4 5.2ZM16.5 11c-.1-2-.5-3.8-1.1-5.2A8 8 0 0 1 19.8 11h-3.3Z",birthday:"M12 2a1 1 0 0 1 1 1v1h1a3 3 0 0 1 3 3v1h1a2 2 0 0 1 2 2v3.2a3 3 0 0 1-2 .3 3 3 0 0 1-4 0 3 3 0 0 1-4 0 3 3 0 0 1-4 0 3 3 0 0 1-2-.3V10a2 2 0 0 1 2-2h1V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm-8 14a5 5 0 0 0 4-.6 5 5 0 0 0 4 0 5 5 0 0 0 4 0 5 5 0 0 0 4 .6V19a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3Z"},Se=e$b.computed(()=>{const Re=fe.value,ze=[],Ve=(Ne,Pe,Be,Ae={})=>{Be&&ze.push({id:`${Ne}-${ze.length}`,icon:Ee[Ne],label:Pe,value:Be,...Ae})};return Re.phones.forEach(Ne=>Ve("phone","Telefone",ce(Ne))),Re.emails.forEach(Ne=>Ve("email",Ne.type||"E-mail",Ne.email)),Re.addresses.forEach(Ne=>Ve("addr","Endereço",de(Ne))),Re.urls.forEach(Ne=>Ve("url",Ne.type||"Site",Ne.url,{link:Ne.url})),Ve("birthday","Aniversário",Re.birthday&&ue(Re.birthday)),ze}),Le=e$b.computed(()=>[fe.value.title,fe.value.org].filter(Boolean).join(" · "));function Me(){$e.value&&(re.value=!0)}function De(Re){re.value=!1,ae("start-chat",Re)}async function Oe(Re,ze){if(Re)try{await navigator.clipboard.writeText(Re),oe.value=ze,ie&&clearTimeout(ie),ie=setTimeout(()=>{oe.value=""},1500)}catch(Ve){console.error("Falha ao copiar:",Ve)}}return(Re,ze)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("article",_hoisted_1$2p,[(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent($e.value?"button":"div"),{class:"vcard__head",title:$e.value?"Ver detalhes":null,onClick:e$b.withModifiers(Me,["stop"])},{default:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_2$26,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(pe.value,(Ve,Ne)=>(e$b.openBlock(),e$b.createBlock(Avatar,{key:`avatar-${Ne}`,class:"vcard__avatar",style:e$b.normalizeStyle({zIndex:pe.value.length-Ne}),photo:Ve.photo||"",name:Ve.name,size:"sm",scale:"app",frame:null,"show-level":!1},null,8,["style","photo","name"]))),128))]),e$b.createElementVNode("div",_hoisted_3$1U,[e$b.createElementVNode("span",_hoisted_4$1I,e$b.toDisplayString(_e.value),1),ge.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$1y,e$b.toDisplayString(ge.value),1)):e$b.createCommentVNode("",!0)]),$e.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_6$1p,[...ze[4]||(ze[4]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 5 7 7-7 7"},null,-1)])])):e$b.createCommentVNode("",!0)]),_:1},8,["title"])),be.value?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"vcard__action",type:"button",onClick:ze[0]||(ze[0]=e$b.withModifiers(Ve=>re.value=!0,["stop"]))},"Ver todos")):ee.showStartChat?(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"vcard__action",type:"button",onClick:ze[1]||(ze[1]=e$b.withModifiers(Ve=>ae("start-chat",fe.value),["stop"]))},[...ze[5]||(ze[5]=[e$b.createElementVNode("svg",{class:"vcard__action-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H7Zm8-1a1 1 0 0 1 1-1h1v-1a1 1 0 1 1 2 0v1h1a1 1 0 1 1 0 2h-1v1a1 1 0 1 1-2 0v-1h-1a1 1 0 0 1-1-1Z","clip-rule":"evenodd"})],-1),e$b.createElementVNode("span",null,"Iniciar conversa",-1)])])):e$b.createCommentVNode("",!0)]),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(simpleModal,{"is-open":re.value,size:"sm:w-[26rem] md:w-[27rem]",header:ye.value,onClose:ze[3]||(ze[3]=Ve=>re.value=!1)},e$b.createSlots({body:e$b.withCtx(()=>[be.value?(e$b.openBlock(),e$b.createElementBlock("ul",_hoisted_7$1h,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(me.value,(Ve,Ne)=>(e$b.openBlock(),e$b.createElementBlock("li",{key:`contact-${Ne}`,class:"vcard-person"},[e$b.createVNode(Avatar,{photo:Ve.photo||"",name:Ve.name,size:"sm",scale:"app",frame:null,"show-level":!1},null,8,["photo","name"]),e$b.createElementVNode("div",_hoisted_8$19,[e$b.createElementVNode("span",_hoisted_9$14,e$b.toDisplayString(Ve.name),1),Ve.phones.length?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_10$Z,e$b.toDisplayString(ce(Ve.phones[0])),1)):e$b.createCommentVNode("",!0)]),ee.showStartChat?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"vcard-person__chat",type:"button",title:"Iniciar conversa",onClick:e$b.withModifiers(Pe=>De(Ve),["stop"])},[...ze[6]||(ze[6]=[e$b.createElementVNode("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h1v3a1 1 0 0 0 1.6.8L11.3 17H20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4Zm3 5h10a1 1 0 1 1 0 2H7a1 1 0 1 1 0-2Zm0 4h6a1 1 0 1 1 0 2H7a1 1 0 1 1 0-2Z","clip-rule":"evenodd"})],-1)])],8,_hoisted_11$S)):e$b.createCommentVNode("",!0)]))),128))])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$N,[e$b.createElementVNode("header",_hoisted_13$G,[e$b.createVNode(Avatar,{photo:fe.value.photo||"",name:fe.value.name,size:"md",scale:"app",frame:null,"show-level":!1},null,8,["photo","name"]),e$b.createElementVNode("div",_hoisted_14$E,[e$b.createElementVNode("span",_hoisted_15$A,e$b.toDisplayString(fe.value.name),1),Le.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$x,e$b.toDisplayString(Le.value),1)):e$b.createCommentVNode("",!0)])]),Se.value.length?(e$b.openBlock(),e$b.createElementBlock("ul",_hoisted_17$q,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Se.value,Ve=>(e$b.openBlock(),e$b.createElementBlock("li",{key:Ve.id},[(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(Ve.link?"a":"button"),{class:e$b.normalizeClass(["vcard-row",{"vcard-row--link":Ve.link}]),href:Ve.link||null,target:Ve.link?"_blank":null,rel:Ve.link?"noopener noreferrer":null,type:Ve.link?null:"button",title:Ve.link?"Abrir":oe.value===Ve.id?"Copiado!":"Clique para copiar",onClick:e$b.withModifiers(Ne=>Ve.link?null:Oe(Ve.value,Ve.id),["stop"])},{default:e$b.withCtx(()=>[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_18$q,[e$b.createElementVNode("path",{d:Ve.icon},null,8,_hoisted_19$l)])),e$b.createElementVNode("span",_hoisted_20$k,[e$b.createElementVNode("span",_hoisted_21$h,e$b.toDisplayString(Ve.label),1),e$b.createElementVNode("span",_hoisted_22$f,e$b.toDisplayString(Ve.value),1)]),oe.value===Ve.id?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_23$b,"Copiado")):e$b.createCommentVNode("",!0)]),_:2},1032,["class","href","target","rel","type","title","onClick"]))]))),128))])):e$b.createCommentVNode("",!0)]))]),_:2},[ee.showStartChat&&!be.value?{name:"footer",fn:e$b.withCtx(()=>[e$b.createElementVNode("button",{class:"vcard-modal__action",type:"button",onClick:ze[2]||(ze[2]=e$b.withModifiers(Ve=>De(fe.value),["stop"]))}," Iniciar conversa ")]),key:"0"}:void 0]),1032,["is-open","header"])]))],64))}}),ContactMessageCard=_export_sfc$1(_sfc_main$2C,[["__scopeId","data-v-baeb9a8d"]]);/*! License details at fancyapps.com/license */const t$9=ee=>typeof ee=="string";/*! License details at fancyapps.com/license */const n$b=ee=>ee&&ee!==null&&ee instanceof Element&&"nodeType"in ee;/*! License details at fancyapps.com/license */const e$a=function(ee){if(!(ee&&ee instanceof Element&&ee.offsetParent))return!1;const te=ee.scrollHeight>ee.clientHeight,ne=window.getComputedStyle(ee).overflowY,ae=ne.indexOf("hidden")!==-1,re=ne.indexOf("visible")!==-1;return te&&!ae&&!re},n$a=function(ee,te=void 0){return!ee||ee===document.body||te&&ee===te?null:e$a(ee)?ee:n$a(ee.parentElement,te)};/*! License details at fancyapps.com/license */const e$9=function(ee){var te=new DOMParser().parseFromString(ee,"text/html").body;if(te.childElementCount>1){for(var ne=document.createElement("div");te.firstChild;)ne.appendChild(te.firstChild);return ne}let ae=te.firstChild;return!ae||ae instanceof HTMLElement?ae:((ne=document.createElement("div")).appendChild(ae),ne)};/*! License details at fancyapps.com/license */const t$8=function(ee=0,te=0,ne=0){return Math.max(Math.min(te,ne),ee)};/*! License details at fancyapps.com/license */const t$7=ee=>typeof ee=="object"&&ee!==null&&ee.constructor===Object&&Object.prototype.toString.call(ee)==="[object Object]";/*! License details at fancyapps.com/license */function e$8(ee){return t$7(ee)||Array.isArray(ee)}function n$9(ee,te){const ne=Object.keys(ee),ae=Object.keys(te);return ne.length===ae.length&&ne.every(re=>{const oe=ee[re],ie=te[re];return typeof oe=="function"?`${oe}`==`${ie}`:e$8(oe)&&e$8(ie)?n$9(oe,ie):oe===ie})}/*! License details at fancyapps.com/license */const e$7=function(ee){for(const te of s$c)te.getState()===i$a.Running&&te.tick(a$9?ee-a$9:0);a$9=ee,u$7=window.requestAnimationFrame(e$7)};var i$a,o$9,r$7;(function(ee){ee[ee.Initializing=0]="Initializing",ee[ee.Running=1]="Running",ee[ee.Paused=2]="Paused",ee[ee.Completed=3]="Completed",ee[ee.Destroyed=4]="Destroyed"})(i$a||(i$a={})),function(ee){ee[ee.Spring=0]="Spring",ee[ee.Ease=1]="Ease"}(o$9||(o$9={})),function(ee){ee[ee.Loop=0]="Loop",ee[ee.Reverse=1]="Reverse"}(r$7||(r$7={}));const s$c=new Set;let u$7=null,a$9=0;function c$5(){let ee=i$a.Initializing,te=o$9.Ease,ne=0,ae=0,re=c$5.Easings.Linear,oe=500,ie=0,le=0,ce=0,de=0,ue=1/0,ve=.01,me=.01,be=!1,fe={},pe=null,_e={},ge={},ke={},$e=0,ye=0,Ee=r$7.Loop,Se=c$5.Easings.Linear;const Le=new Map;function Me(Ve,...Ne){for(const Pe of Le.get(Ve)||[])Pe(...Ne)}function De(Ve){return ae=0,Ve?pe=setTimeout(()=>{Oe()},Ve):Oe(),ze}function Oe(){ee=i$a.Running,Me("start",_e,ge)}function Re(){if(ee=i$a.Completed,ke={},Me("end",_e),ee===i$a.Completed)if(ne<$e){if(ne++,Ee===r$7.Reverse){const Ve=Object.assign({},fe);fe=Object.assign({},ge),ge=Ve}De(ye)}else ne=0;return ze}const ze={getState:function(){return ee},easing:function(Ve){return re=Ve,te=o$9.Ease,ke={},ze},duration:function(Ve){return oe=Ve,ze},spring:function(Ve={}){te=o$9.Spring;const Ne={velocity:0,mass:1,tension:170,friction:26,restDelta:.1,restSpeed:.1,maxSpeed:1/0,clamp:!0},{velocity:Pe,mass:Be,tension:Ae,friction:xe,restDelta:Ce,restSpeed:Fe,maxSpeed:Ie,clamp:qe}=Object.assign(Object.assign({},Ne),Ve);return ie=Pe,le=Be,ce=Ae,de=xe,me=Ce,ve=Fe,ue=Ie,be=qe,ke={},ze},isRunning:function(){return ee===i$a.Running},isSpring:function(){return te===o$9.Spring},from:function(Ve){return _e=Object.assign({},Ve),ze},to:function(Ve){return ge=Ve,ze},repeat:function(Ve,Ne=0,Pe=r$7.Loop,Be){return $e=Ve,ye=Ne,Ee=Pe,Se=Be||re,ze},on:function(Ve,Ne){var Pe,Be;return Pe=Ve,Be=Ne,Le.set(Pe,[...Le.get(Pe)||[],Be]),ze},off:function(Ve,Ne){var Pe,Be;return Pe=Ve,Be=Ne,Le.has(Pe)&&Le.set(Pe,Le.get(Pe).filter(Ae=>Ae!==Be)),ze},start:function(Ve){return n$9(_e,ge)||(ee=i$a.Initializing,fe=Object.assign({},_e),s$c.add(this),u$7||(u$7=window.requestAnimationFrame(e$7)),De(Ve)),ze},pause:function(){return pe&&(clearTimeout(pe),pe=null),ee===i$a.Running&&(ee=i$a.Paused,Me("pause",_e)),ze},end:Re,tick:function(Ve){Ve>50&&(Ve=50),ae+=Ve;let Ne=0,Pe=!1;if(ee!==i$a.Running)return ze;if(te===o$9.Ease){Ne=t$8(0,ae/oe,1),Pe=Ne===1;const Ae=Ee===r$7.Reverse?Se:re;for(const xe in _e)_e[xe]=fe[xe]+(ge[xe]-fe[xe])*Ae(Ne)}if(te===o$9.Spring){const Ae=.001*Ve;let xe=0;for(const Ce in _e){const Fe=ge[Ce];let Ie=_e[Ce];if(typeof Fe!="number"||isNaN(Fe)||typeof Ie!="number"||isNaN(Ie))continue;if(Math.abs(Fe-Ie)<=me){_e[Ce]=Fe,ke[Ce]=0;continue}ke[Ce]||(typeof ie=="object"&&typeof ie[Ce]=="number"?ke[Ce]=ie[Ce]:ke[Ce]=typeof ie=="number"?ie:0);let qe=ke[Ce];qe=t$8(-1*Math.abs(ue),qe,Math.abs(ue));const Ge=qe*le*de;qe+=((Ie>Fe?-1:1)*(Math.abs(Fe-Ie)*ce)-Ge)/le*Ae,Ie+=qe*Ae;const Ze=_e[Ce]>Fe?Ie<Fe:Ie>Fe;let Xe=Math.abs(qe)<ve&&Math.abs(Fe-Ie)<=me;be&&Ze&&(Xe=!0),Xe?(Ie=Fe,qe=0):xe++,_e[Ce]=Ie,ke[Ce]=qe}Pe=!xe}const Be=Object.assign({},ge);return Me("step",_e,fe,ge,Ne),Pe&&ee===i$a.Running&&n$9(ge,Be)&&(ee=i$a.Completed,Re()),ze},getStartValues:function(){return fe},getCurrentValues:function(){return _e},getCurrentVelocities:function(){return ke},getEndValues:function(){return ge},destroy:function(){ee=i$a.Destroyed,pe&&(clearTimeout(pe),pe=null),fe=_e=ge={},s$c.delete(this)}};return ze}c$5.destroy=()=>{for(const ee of s$c)ee.destroy();u$7&&(cancelAnimationFrame(u$7),u$7=null)},c$5.Easings={Linear:function(ee){return ee},EaseIn:function(ee){return ee===0?0:Math.pow(2,10*ee-10)},EaseOut:function(ee){return ee===1?1:1-Math.pow(2,-10*ee)},EaseInOut:function(ee){return ee===0?0:ee===1?1:ee<.5?Math.pow(2,20*ee-10)/2:(2-Math.pow(2,-20*ee+10))/2}};/*! License details at fancyapps.com/license */function e$6(ee){return typeof TouchEvent<"u"&&ee instanceof TouchEvent}function t$6(ee,te){const ne=[],ae=e$6(ee)?ee[te]:ee instanceof MouseEvent&&(te==="changedTouches"||ee.type!=="mouseup")?[ee]:[];for(const re of ae)ne.push({x:re.clientX,y:re.clientY,ts:Date.now()});return ne}function n$8(ee){return t$6(ee,"touches")}function o$8(ee){return t$6(ee,"targetTouches")}function s$b(ee){return t$6(ee,"changedTouches")}function i$9(ee){const te=ee[0],ne=ee[1]||te;return{x:(te.x+ne.x)/2,y:(te.y+ne.y)/2,ts:ne.ts}}function c$4(ee){const te=ee[0],ne=ee[1]||ee[0];return te&&ne?-1*Math.sqrt((ne.x-te.x)*(ne.x-te.x)+(ne.y-te.y)*(ne.y-te.y)):0}const r$6=ee=>{ee.cancelable&&ee.preventDefault()},a$8={passive:!1},u$6={panThreshold:5,swipeThreshold:3,ignore:["textarea","input","select","[contenteditable]","[data-selectable]","[data-draggable]"]};let l$8=!1,d$4=!0;const f$4=(ee,te)=>{let ne,ae,re,oe=Object.assign(Object.assign({},u$6),te),ie=[],le=[],ce=[],de=!1,ue=!1,ve=!1,me=!1,be=0,fe=0,pe=0,_e=0,ge=0,ke=0,$e=0,ye=0,Ee=0,Se=[],Le=0,Me=0;const De=new Map;function Oe(Ce){const Fe=c$4(le),Ie=c$4(ce),qe=Fe&&Ie?Fe/Ie:0,Ge=Math.abs($e)>Math.abs(ye)?$e:ye,Ze={srcEvent:ne,isPanRecognized:de,isSwipeRecognized:ue,firstTouch:ie,previousTouch:ce,currentTouch:le,deltaX:pe,deltaY:_e,offsetX:ge,offsetY:ke,velocityX:$e,velocityY:ye,velocity:Ge,angle:Ee,axis:re,scale:qe,center:ae};for(const Xe of De.get(Ce)||[])Xe(Ze)}function Re(Ce){const Fe=Date.now();if(Se=Se.filter(Ie=>!Ie.ts||Ie.ts>Fe-100),Ce&&Se.push(Ce),$e=0,ye=0,Se.length>3){const Ie=Se[0],qe=Se[Se.length-1];if(Ie&&qe){const Ge=qe.x-Ie.x,Ze=qe.y-Ie.y,Xe=Ie.ts&&qe.ts?qe.ts-Ie.ts:0;Xe>0&&($e=Math.abs(Ge)>3?Ge/(Xe/30):0,ye=Math.abs(Ze)>3?Ze/(Xe/30):0)}}}function ze(Ce){if(typeof MouseEvent<"u"&&Ce instanceof MouseEvent){if(l$8)return}else l$8=!0;const Fe=Ce.composedPath()[0],Ie=oe.ignore.join(",");if(Fe.matches(Ie)||Fe.closest(Ie))return;if(typeof MouseEvent<"u"&&Ce instanceof MouseEvent){if(!Ce.buttons||Ce.button!==0)return;r$6(Ce)}Ce instanceof MouseEvent&&(window.addEventListener("mousemove",Ve),window.addEventListener("mouseup",Ne)),window.addEventListener("blur",Pe),ne=Ce,le=o$8(Ce),ie=[...le],ce=[],fe=le.length,ae=i$9(le),fe===1&&(de=!1,ue=!1,ve=!1),fe&&Re(i$9(le));const qe=Date.now(),Ge=qe-(be||qe);me=Ge>0&&Ge<=250&&fe===1,be=qe,clearTimeout(Le),Oe("start")}function Ve(Ce){var Fe;if(!ie.length||Ce.defaultPrevented)return;ne=Ce,ce=[...le],le=n$8(Ce);const Ie=i$9(ce),qe=i$9(n$8(Ce));if(Re(qe),fe=le.length,ae=qe,ce.length===le.length?(pe=qe.x-Ie.x,_e=qe.y-Ie.y):(pe=0,_e=0),ie.length){const Ge=i$9(ie);ge=qe.x-Ge.x,ke=qe.y-Ge.y}if(le.length>1){const Ge=c$4(le),Ze=c$4(ce);Math.abs(Ge-Ze)>=.1&&(ve=!0,Oe("pinch"))}de||(de=Math.abs(ge)>oe.panThreshold||Math.abs(ke)>oe.panThreshold,de&&(d$4=!1,clearTimeout(Me),Me=0,Ee=Math.abs(180*Math.atan2(ke,ge)/Math.PI),re=Ee>45&&Ee<135?"y":"x",ie=[...le],ce=[...le],ge=0,ke=0,pe=0,_e=0,(Fe=window.getSelection())===null||Fe===void 0||Fe.removeAllRanges(),Oe("panstart"))),de&&(pe||_e)&&Oe("pan"),Oe("move")}function Ne(Ce){if(ne=Ce,!ie.length)return;const Fe=o$8(Ce),Ie=s$b(Ce);if(fe=Fe.length,ae=i$9(Ie),Ie.length&&Re(i$9(Ie)),ce=[...le],le=[...Fe],ie=[...Fe],fe>0)Oe("end"),de=!1,ue=!1,Se=[];else{const qe=oe.swipeThreshold;(Math.abs($e)>qe||Math.abs(ye)>qe)&&(ue=!0),de&&Oe("panend"),ue&&Oe("swipe"),de||ue||ve||(Oe("tap"),me?Oe("doubleTap"):Le=setTimeout(function(){Oe("singleTap")},250)),Oe("end"),Be()}}function Pe(){clearTimeout(Le),Be(),de&&Oe("panend"),Oe("end")}function Be(){l$8=!1,de=!1,ue=!1,me=!1,fe=0,Se=[],le=[],ce=[],ie=[],pe=0,_e=0,ge=0,ke=0,$e=0,ye=0,Ee=0,re=void 0,window.removeEventListener("mousemove",Ve),window.removeEventListener("mouseup",Ne),window.removeEventListener("blur",Pe),d$4||Me||(Me=setTimeout(()=>{d$4=!0,Me=0},100))}function Ae(Ce){const Fe=Ce.target;l$8=!1,Fe&&!Ce.defaultPrevented&&(d$4||(r$6(Ce),Ce.stopPropagation()))}const xe={init:function(){return ee&&(ee.addEventListener("click",Ae,a$8),ee.addEventListener("mousedown",ze,a$8),ee.addEventListener("touchstart",ze,a$8),ee.addEventListener("touchmove",Ve,a$8),ee.addEventListener("touchend",Ne),ee.addEventListener("touchcancel",Ne)),xe},on:function(Ce,Fe){return function(Ie,qe){De.set(Ie,[...De.get(Ie)||[],qe])}(Ce,Fe),xe},off:function(Ce,Fe){return De.has(Ce)&&De.set(Ce,De.get(Ce).filter(Ie=>Ie!==Fe)),xe},isPointerDown:()=>fe>0,destroy:function(){clearTimeout(Le),clearTimeout(Me),Me=0,ee&&(ee.removeEventListener("click",Ae,a$8),ee.removeEventListener("mousedown",ze,a$8),ee.removeEventListener("touchstart",ze,a$8),ee.removeEventListener("touchmove",Ve,a$8),ee.removeEventListener("touchend",Ne),ee.removeEventListener("touchcancel",Ne)),ee=null,Be()}};return xe};f$4.isClickAllowed=()=>d$4;/*! License details at fancyapps.com/license */const e$5={IMAGE_ERROR:"This image couldn't be loaded. <br /> Please try again later.",MOVE_UP:"Move up",MOVE_DOWN:"Move down",MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",TOGGLE_FULL:"Toggle zoom level",TOGGLE_1TO1:"Toggle zoom level",ITERATE_ZOOM:"Toggle zoom level",ROTATE_CCW:"Rotate counterclockwise",ROTATE_CW:"Rotate clockwise",FLIP_X:"Flip horizontally",FLIP_Y:"Flip vertically",RESET:"Reset",TOGGLE_FS:"Toggle fullscreen"};/*! License details at fancyapps.com/license */const s$a=(ee,te="")=>{ee&&ee.classList&&te.split(" ").forEach(ne=>{ne&&ee.classList.add(ne)})};/*! License details at fancyapps.com/license */const s$9=(ee,te="")=>{ee&&ee.classList&&te.split(" ").forEach(ne=>{ne&&ee.classList.remove(ne)})};/*! License details at fancyapps.com/license */const s$8=(ee,te="",ne)=>{ee&&ee.classList&&te.split(" ").forEach(ae=>{ae&&ee.classList.toggle(ae,ne||!1)})};/*! License details at fancyapps.com/license */const h$6=ee=>{ee.cancelable&&ee.preventDefault()},m$4=(ee,te=1e4)=>(ee=parseFloat(ee+"")||0,Math.round((ee+Number.EPSILON)*te)/te),p$3=ee=>ee instanceof HTMLImageElement;var v$6,b$4;(function(ee){ee.Reset="reset",ee.Zoom="zoom",ee.ZoomIn="zoomIn",ee.ZoomOut="zoomOut",ee.ZoomTo="zoomTo",ee.ToggleCover="toggleCover",ee.ToggleFull="toggleFull",ee.ToggleMax="toggleMax",ee.IterateZoom="iterateZoom",ee.Pan="pan",ee.Swipe="swipe",ee.Move="move",ee.MoveLeft="moveLeft",ee.MoveRight="moveRight",ee.MoveUp="moveUp",ee.MoveDown="moveDown",ee.RotateCCW="rotateCCW",ee.RotateCW="rotateCW",ee.FlipX="flipX",ee.FlipY="flipY",ee.ToggleFS="toggleFS"})(v$6||(v$6={})),function(ee){ee.Cover="cover",ee.Full="full",ee.Max="max"}(b$4||(b$4={}));const y$5={x:0,y:0,scale:1,angle:0,flipX:1,flipY:1},x$2={bounds:!0,classes:{container:"f-panzoom",wrapper:"f-panzoom__wrapper",content:"f-panzoom__content",viewport:"f-panzoom__viewport"},clickAction:v$6.ToggleFull,dblClickAction:!1,gestures:{},height:"auto",l10n:e$5,maxScale:4,minScale:1,mouseMoveFactor:1,panMode:"drag",protected:!1,singleClickAction:!1,spinnerTpl:'<div class="f-spinner"></div>',wheelAction:v$6.Zoom,width:"auto"};let w$6,M$2=0,k$4=0,j$3=0;const E$4=(ee,te={},ne={})=>{let ae,re,oe,ie,le,ce,de,ue,ve=0,me=Object.assign(Object.assign({},x$2),te),be={},fe=Object.assign({},y$5),pe=Object.assign({},y$5);const _e=[];function ge(We){let Ke=me[We];return Ke&&typeof Ke=="function"?Ke(tt):Ke}function ke(){return ee&&ee.parentElement&&ae&&ve===3}const $e=new Map;function ye(We,...Ke){const nt=[...$e.get(We)||[]];me.on&&nt.push(me.on[We]);for(const ht of nt)ht&&ht instanceof Function&&ht(tt,...Ke);We!=="*"&&ye("*",We,...Ke)}function Ee(We){if(!ke())return;const Ke=We.target;if(n$a(Ke))return;const nt=Date.now(),ht=[-We.deltaX||0,-We.deltaY||0,-We.detail||0].reduce(function(Tt,Dt){return Math.abs(Dt)>Math.abs(Tt)?Dt:Tt}),st=t$8(-1,ht,1);ye("wheel",We,st);const ft=ge("wheelAction");if(!ft||We.defaultPrevented)return;const yt=pe.scale;let wt=yt*(st>0?1.5:.5);if(ft===v$6.Zoom){const Tt=Math.abs(We.deltaY)<100&&Math.abs(We.deltaX)<100;if(nt-k$4<(Tt?200:45))return void h$6(We);k$4=nt;const Dt=Ae(),Lt=Ie();if(m$4(wt)<m$4(Dt)&&m$4(yt)<=m$4(Dt)?(j$3+=Math.abs(st),wt=Dt):m$4(wt)>m$4(Lt)&&m$4(yt)>=m$4(Lt)?(j$3+=Math.abs(st),wt=Lt):(j$3=0,wt=t$8(Dt,wt,Lt)),j$3>7)return}switch(h$6(We),ft){case v$6.Pan:Xe(ft,{srcEvent:We,deltaX:2*-We.deltaX,deltaY:2*-We.deltaY});break;case v$6.Zoom:Xe(v$6.ZoomTo,{srcEvent:We,scale:wt,center:{x:We.clientX,y:We.clientY}});break;default:Xe(ft,{srcEvent:We})}}function Se(We){var Ke,nt;const ht=We.composedPath()[0];if(!f$4.isClickAllowed()||!n$b(ht)||We.defaultPrevented||!(ee!=null&&ee.contains(ht))||ht.hasAttribute("disabled")||ht.hasAttribute("aria-disabled"))return;const st=ht.closest("[data-panzoom-action]"),ft=(Ke=st==null?void 0:st.dataset)===null||Ke===void 0?void 0:Ke.panzoomAction,yt=((nt=st==null?void 0:st.dataset)===null||nt===void 0?void 0:nt.panzoomValue)||"";if(ft){switch(h$6(We),ft){case v$6.ZoomTo:case v$6.ZoomIn:case v$6.ZoomOut:Xe(ft,{scale:parseFloat(yt||"")||void 0});break;case v$6.MoveLeft:case v$6.MoveRight:Xe(ft,{deltaX:parseFloat(yt||"")||void 0});break;case v$6.MoveUp:case v$6.MoveDown:Xe(ft,{deltaY:parseFloat(yt||"")||void 0});break;case v$6.ToggleFS:dt();break;default:Xe(ft)}return}if(!(ae!=null&&ae.contains(ht)))return;const wt={srcEvent:We};if(Xe(ge("clickAction"),wt),ge("dblClickAction")){const Tt=Date.now(),Dt=Tt-(M$2||Tt);M$2=Tt,Dt>0&&Dt<=250?(w$6&&(clearTimeout(w$6),w$6=void 0),Xe(ge("dblClickAction"),wt)):w$6=setTimeout(()=>{Xe(ge("singleClickAction"),wt)},250)}}function Le(We){if(ue=We,!ke()||!Ne()||fe.scale<=1||pe.scale<=1||((ae==null?void 0:ae.dataset.animationName)||"").indexOf("zoom")>-1)return;const Ke=Pe(pe.scale);if(!Ke)return;const{x:nt,y:ht}=Ke;Xe(v$6.Pan,{deltaX:nt-pe.x,deltaY:ht-pe.y})}function Me(){var We;ee&&(s$9(ee,"is-loading"),(We=ee.querySelector(".f-spinner"))===null||We===void 0||We.remove())}function De(){if(!ee||!re)return;if(Me(),p$3(re)&&(!re.complete||!re.naturalWidth))return ve=2,ae==null||ae.classList.add("has-error"),void ye("error");ye("loaded");const{width:We,height:Ke}=ze();p$3(re)&&(re.setAttribute("width",We+""),re.setAttribute("height",Ke+"")),ae&&(s$9(ae,"has-error"),p$3(re)&&(ae.setAttribute("width",We+""),ae.setAttribute("height",Ke+""),ae.style.aspectRatio=`${We/Ke||""}`)),ce=c$5().on("start",(ht,st)=>{st.angle!==void 0&&(st.angle=90*Math.round(st.angle/90)),st.flipX!==void 0&&(st.flipX=st.flipX>0?1:-1),st.flipY!==void 0&&(st.flipY=st.flipY>0?1:-1),pe=Object.assign(Object.assign({},y$5),st),Ze(),ye("animationStart")}).on("pause",ht=>{pe=Object.assign(Object.assign({},y$5),ht)}).on("step",ht=>{if(!ke())return void(ce==null||ce.end());if(fe=Object.assign(Object.assign({},y$5),ht),Ne()||!ge("bounds")||je()||pe.scale>fe.scale||pe.scale<xe())return void Ue();const st=qe(pe.scale);let ft=!1,yt=!1,wt=!1,Tt=!1;fe.x<st.x[0]&&(ft=!0),fe.x>st.x[1]&&(yt=!0),fe.y<st.y[0]&&(Tt=!0),fe.y>st.y[1]&&(wt=!0);let Dt=!1,Lt=!1,Gt=!1,Rt=!1;pe.x<st.x[0]&&(Dt=!0),pe.x>st.x[1]&&(Lt=!0),pe.y<st.y[0]&&(Rt=!0),pe.y>st.y[1]&&(Gt=!0);let Xt=!1;(yt&&Lt||ft&&Dt)&&(pe.x=t$8(st.x[0],pe.x,st.x[1]),Xt=!0),(wt&&Gt||Tt&&Rt)&&(pe.y=t$8(st.y[0],pe.y,st.y[1]),Xt=!0),Xt&&ce&&ce.spring({tension:94,friction:17,maxSpeed:555*pe.scale,restDelta:.1,restSpeed:.1,velocity:ce.getCurrentVelocities()}).from(fe).to(pe).start(),Ue()}).on("end",()=>{le!=null&&le.isPointerDown()||Ge(),ce!=null&&ce.isRunning()||(Ze(),ye("animationEnd"))}),function(){const ht=ge("gestures");if(!ht||!ie||!re)return;let st=!1;le=f$4(ie,ht).on("start",ft=>{if(!ge("gestures")||!ce||!ke()||Ne())return;const yt=ft.srcEvent;(fe.scale>1||ft.currentTouch.length>1)&&(yt==null||yt.stopPropagation(),ce.pause(),st=!0),ft.currentTouch.length===1&&ye("touchStart")}).on("move",ft=>{var yt;st&&(pe.scale!==1||ft.currentTouch.length>1)&&(h$6(ft.srcEvent),(yt=ft.srcEvent)===null||yt===void 0||yt.stopPropagation())}).on("pan",ft=>{if(!st)return;const yt=ft.srcEvent;(pe.scale!==1||ft.currentTouch.length>1)&&(h$6(yt),Xe(v$6.Pan,ft))}).on("swipe",ft=>{st&&pe.scale>1&&Xe(v$6.Swipe,ft)}).on("tap",ft=>{ye("click",ft)}).on("singleTap",ft=>{ye("singleClick",ft)}).on("doubleTap",ft=>{ye("dblClick",ft)}).on("pinch",ft=>{st&&(ft.scale>xe()?Xe(v$6.ZoomIn,ft):ft.scale<xe()?Xe(v$6.ZoomOut,ft):Xe(v$6.Pan,ft))}).on("end",ft=>{st&&(ft.currentTouch.length?(ft.srcEvent.stopPropagation(),h$6(ft.srcEvent),ce==null||ce.end()):(st=!1,Ze(),Ge(),ye("touchEnd")))}).init()}(),ie&&(ie.addEventListener("wheel",Ee,{passive:!1}),_e.push(()=>{ie==null||ie.removeEventListener("wheel",Ee,{passive:!1})})),ee==null||ee.addEventListener("click",Se),document==null||document.addEventListener("mousemove",Le),_e.push(()=>{ee==null||ee.removeEventListener("click",Se),document==null||document.removeEventListener("mousemove",Le)});const nt=Oe();fe=Object.assign({},nt),pe=Object.assign({},nt),ve=3,Ue(),Ze(),ye("ready"),requestAnimationFrame(()=>{Me(),ie&&(ie.style.visibility="")})}function Oe(){const We=Object.assign({},ge("startPos")||{});let Ke=We.scale,nt=1;nt=typeof Ke=="string"?Be(Ke):typeof Ke=="number"?Ke:xe();const ht=Object.assign(Object.assign(Object.assign({},y$5),We),{scale:nt}),st=Ne()?Pe(nt):void 0;if(st){const{x:ft,y:yt}=st;ht.x=ft,ht.y=yt}return ht}function Re(){const We={top:0,left:0,width:0,height:0};if(ae){const Ke=ae.getBoundingClientRect();pe.angle%180==90?(We.top=Ke.top+.5*Ke.height-.5*Ke.width,We.left=Ke.left+.5*Ke.width-.5*Ke.height,We.width=Ke.height,We.height=Ke.width):(We.top=Ke.top,We.left=Ke.left,We.width=Ke.width,We.height=Ke.height)}return We}function ze(){let We=ge("width"),Ke=ge("height");if(re&&We==="auto"){const nt=re.getAttribute("width");We=nt?parseFloat(nt+""):re.dataset.width!==void 0?parseFloat(re.dataset.width+""):p$3(ie)?ie.naturalWidth:p$3(re)?re.naturalWidth:(ae==null?void 0:ae.getBoundingClientRect().width)||0}else We=t$9(We)?parseFloat(We):We;if(re&&Ke==="auto"){const nt=re.getAttribute("height");Ke=nt?parseFloat(nt+""):re.dataset.height!==void 0?parseFloat(re.dataset.height+""):p$3(ie)?ie.naturalHeight:p$3(re)?re.naturalHeight:(ae==null?void 0:ae.getBoundingClientRect().height)||0}else Ke=t$9(Ke)?parseFloat(Ke):Ke;return{width:We,height:Ke}}function Ve(){const We=Re();return{width:We.width,height:We.height}}function Ne(){return ge("panMode")==="mousemove"&&matchMedia("(hover: hover)").matches}function Pe(We){const Ke=ue||ge("event"),nt=ae==null?void 0:ae.getBoundingClientRect();if(!Ke||!nt||We<=1)return{x:0,y:0};const ht=(Ke.clientX||0)-nt.left,st=(Ke.clientY||0)-nt.top,{width:ft,height:yt}=Ve(),wt=qe(We);if(We>1){const Rt=ge("mouseMoveFactor");Rt>1&&(We*=Rt)}let Tt=ft*We,Dt=yt*We,Lt=.5*(Tt-ft)-ht/ft*100/100*(Tt-ft),Gt=.5*(Dt-yt)-st/yt*100/100*(Dt-yt);return Lt=t$8(wt.x[0],Lt,wt.x[1]),Gt=t$8(wt.y[0],Gt,wt.y[1]),{x:Lt,y:Gt}}function Be(We="base"){if(!ee)return 1;const Ke=ee.getBoundingClientRect(),nt=Re(),{width:ht,height:st}=ze(),ft=Lt=>{if(typeof Lt=="number")return Lt;switch(Lt){case"min":case"base":return 1;case"cover":return Math.max(Ke.height/nt.height,Ke.width/nt.width)||1;case"full":case"max":{const Gt=pe.angle%180==90?st:ht;return Gt&&nt.width?Gt/nt.width:1}}},yt=ge("minScale"),wt=ge("maxScale"),Tt=Math.min(ft("full"),ft(yt)),Dt=typeof wt=="number"?ft("full")*wt:Math.min(ft("full"),ft(wt));switch(We){case"min":return Tt;case"base":return t$8(Tt,1,Dt);case"cover":return ft("cover");case"full":return Math.min(Dt,ft("full"));case"max":return Dt}}function Ae(){return Be("min")}function xe(){return Be("base")}function Ce(){return Be("cover")}function Fe(){return Be("full")}function Ie(){return Be("max")}function qe(We){const Ke={x:[0,0],y:[0,0]},nt=ee==null?void 0:ee.getBoundingClientRect();if(!nt)return Ke;const ht=Re(),st=nt.width,ft=nt.height;let yt=ht.width,wt=ht.height,Tt=We=We===void 0?pe.scale:We,Dt=We;if(Ne()&&We>1){const Lt=ge("mouseMoveFactor");Lt>1&&(yt*We>st+.01&&(Tt*=Lt),wt*We>ft+.01&&(Dt*=Lt))}return yt*=Tt,wt*=Dt,We>1&&(yt>st&&(Ke.x[0]=.5*(st-yt),Ke.x[1]=.5*(yt-st)),Ke.x[0]-=.5*(ht.left-nt.left),Ke.x[1]-=.5*(ht.left-nt.left),Ke.x[0]-=.5*(ht.left+ht.width-nt.right),Ke.x[1]-=.5*(ht.left+ht.width-nt.right),wt>ft&&(Ke.y[0]=.5*(ft-wt),Ke.y[1]=.5*(wt-ft)),Ke.y[0]-=.5*(ht.top-nt.top),Ke.y[1]-=.5*(ht.top-nt.top),Ke.y[0]-=.5*(ht.top+ht.height-nt.bottom),Ke.y[1]-=.5*(ht.top+ht.height-nt.bottom)),Ke}function Ge(){if(!ke()||!ge("bounds")||!ce)return;const We=Ae(),Ke=Ie(),nt=t$8(We,pe.scale,Ke);if(pe.scale<We-.01||pe.scale>Ke+.01)return void Xe(v$6.ZoomTo,{scale:nt});if(ce.isRunning()||je())return;const ht=qe(nt);pe.x<ht.x[0]||pe.x>ht.x[1]||pe.y<ht.y[0]||pe.y>ht.y[1]?(pe.x=t$8(ht.x[0],pe.x,ht.x[1]),pe.y=t$8(ht.y[0],pe.y,ht.y[1]),ce.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:ce.getCurrentVelocities()}),ce.from(fe).to(pe).start()):Ue()}function Ze(We){var Ke;if(!ke())return;const nt=mt(),ht=je(),st=Qe(),ft=ut(),yt=Je(),wt=lt();s$8(ae,"is-fullsize",ft),s$8(ae,"is-expanded",st),s$8(ae,"is-dragging",ht),s$8(ae,"can-drag",nt),s$8(ae,"will-zoom-in",yt),s$8(ae,"will-zoom-out",wt);const Tt=gt(),Dt=Et(),Lt=it(),Gt=!ke();for(const Rt of((Ke=We||ee)===null||Ke===void 0?void 0:Ke.querySelectorAll("[data-panzoom-action]"))||[]){const Xt=Rt.dataset.panzoomAction;let It=!1;if(Gt)It=!0;else switch(Xt){case v$6.ZoomIn:Tt||(It=!0);break;case v$6.ZoomOut:Lt||(It=!0);break;case v$6.ToggleFull:{Dt||Lt||(It=!0);const et=Rt.querySelector("g");et&&(et.style.display=ft&&!It?"none":"");break}case v$6.IterateZoom:{Tt||Lt||(It=!0);const et=Rt.querySelector("g");et&&(et.style.display=Tt||It?"":"none");break}case v$6.ToggleCover:case v$6.ToggleMax:Tt||Lt||(It=!0)}It?(Rt.setAttribute("aria-disabled",""),Rt.setAttribute("tabindex","-1")):(Rt.removeAttribute("aria-disabled"),Rt.removeAttribute("tabindex"))}}function Xe(We,Ke){var nt;if(!(We&&ee&&re&&ce&&ke())||We===v$6.Swipe&&Math.abs(ce.getCurrentVelocities().scale)>.01)return;const ht=Object.assign({},pe);let st=Object.assign({},pe),ft=qe(Ne()?ht.scale:fe.scale);const yt=ce.getCurrentVelocities(),wt=Re(),Tt=(((nt=(Ke=Ke||{}).currentTouch)===null||nt===void 0?void 0:nt.length)||0)>1,Dt=Ke.velocityX||0,Lt=Ke.velocityY||0;let Gt=Ke.center;Ke.srcEvent&&(Gt=i$9(s$b(Ke.srcEvent)));let Rt=Ke.deltaX||0,Xt=Ke.deltaY||0;switch(We){case v$6.MoveRight:Rt=Ke.deltaX||100;break;case v$6.MoveLeft:Rt=Ke.deltaX||-100;break;case v$6.MoveUp:Xt=Ke.deltaY||-100;break;case v$6.MoveDown:Xt=Ke.deltaY||100}let It=[];switch(We){case v$6.Reset:st=Object.assign({},y$5),st.scale=xe();break;case v$6.Pan:case v$6.Move:case v$6.MoveLeft:case v$6.MoveRight:case v$6.MoveUp:case v$6.MoveDown:if(je()){let bt=1,_t=1;st.x<=ft.x[0]&&Dt<=0&&(bt=Math.max(.01,1-Math.abs(1/wt.width*Math.abs(st.x-ft.x[0]))),bt*=.2),st.x>=ft.x[1]&&Dt>=0&&(bt=Math.max(.01,1-Math.abs(1/wt.width*Math.abs(st.x-ft.x[1]))),bt*=.2),st.y<=ft.y[0]&&Lt<=0&&(_t=Math.max(.01,1-Math.abs(1/wt.height*Math.abs(st.y-ft.y[0]))),_t*=.2),st.y>=ft.y[1]&&Lt>=0&&(_t=Math.max(.01,1-Math.abs(1/wt.height*Math.abs(st.y-ft.y[1]))),_t*=.2),st.x+=Rt*bt,st.y+=Xt*_t}else st.x=t$8(ft.x[0],st.x+Rt,ft.x[1]),st.y=t$8(ft.y[0],st.y+Xt,ft.y[1]);break;case v$6.Swipe:const et=(bt=0)=>Math.sign(bt)*Math.pow(Math.abs(bt),1.5);st.x+=t$8(-1e3,et(Dt),1e3),st.y+=t$8(-1e3,et(Lt),1e3),Lt&&!Dt&&(st.x=t$8(ft.x[0],st.x,ft.x[1])),!Lt&&Dt&&(st.y=t$8(ft.y[0],st.y,ft.y[1])),yt.x=Dt,yt.y=Lt;break;case v$6.ZoomTo:st.scale=Ke.scale||1;break;case v$6.ZoomIn:st.scale=st.scale*(Ke.scale||2),Tt||(st.scale=Math.min(st.scale,Ie()));break;case v$6.ZoomOut:st.scale=st.scale*(Ke.scale||.5),Tt||(st.scale=Math.max(st.scale,Ae()));break;case v$6.ToggleCover:It=[xe(),Ce()];break;case v$6.ToggleFull:It=[xe(),Fe()];break;case v$6.ToggleMax:It=[xe(),Ie()];break;case v$6.IterateZoom:It=[xe(),Fe(),Ie()];break;case v$6.Zoom:const ct=Fe();st.scale>=ct-.05?st.scale=xe():st.scale=Math.min(ct,st.scale*(Ke.scale||2));break;case v$6.RotateCW:st.angle+=90;break;case v$6.RotateCCW:st.angle-=90;break;case v$6.FlipX:st.flipX*=-1;break;case v$6.FlipY:st.flipY*=-1}if(fe.angle!==void 0&&Math.abs(fe.angle)>=360&&(st.angle-=360*Math.floor(fe.angle/360),fe.angle-=360*Math.floor(fe.angle/360)),It.length){const et=It.findIndex(ct=>ct>st.scale+1e-4);st.scale=It[et]||It[0]}if(Tt&&(st.scale=t$8(Ae()*(Tt?.8:1),st.scale,Ie()*(Tt?1.6:1))),Ne()){const et=Pe(st.scale);if(et){const{x:ct,y:bt}=et;st.x=ct,st.y=bt}}else if(Math.abs(st.scale-ht.scale)>1e-4){let et=0,ct=0;if(Gt)et=Gt.x,ct=Gt.y;else{const Nt=ee.getBoundingClientRect();et=Nt.x+.5*Nt.width,ct=Nt.y+.5*Nt.height}let bt=et-wt.left,_t=ct-wt.top;bt-=.5*wt.width,_t-=.5*wt.height;const St=(bt-ht.x)/ht.scale,Ct=(_t-ht.y)/ht.scale;st.x=bt-St*st.scale,st.y=_t-Ct*st.scale,!Tt&&ge("bounds")&&(ft=qe(st.scale),st.x=t$8(ft.x[0],st.x,ft.x[1]),st.y=t$8(ft.y[0],st.y,ft.y[1]))}if(We===v$6.Swipe){let et=94,ct=17,bt=500*st.scale,_t=yt;ce.spring({tension:et,friction:ct,maxSpeed:bt,restDelta:.1,restSpeed:.1,velocity:_t})}else We===v$6.Pan||Tt?ce.spring({tension:900,friction:17,restDelta:.01,restSpeed:.01,maxSpeed:1}):ce.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:yt});if(Ke.velocity===0||n$9(fe,st))fe=Object.assign({},st),pe=Object.assign({},st),ce.end(),Ue(),Ze();else{if(n$9(pe,st))return;ce.from(fe).to(st).start()}ye("action",We)}function Ue(){if(!re||!ae||!ie)return;const{width:We,height:Ke}=ze();Object.assign(ae.style,{maxWidth:`min(${We}px, 100%)`,maxHeight:`min(${Ke}px, 100%)`});const nt=function(){const{width:Rt,height:Xt}=ze(),{width:It,height:et}=Ve();if(!ee)return{x:0,y:0,width:0,height:0,scale:0,flipX:0,flipY:0,angle:0,fitWidth:It,fitHeight:et,fullWidth:Rt,fullHeight:Xt};let{x:ct,y:bt,scale:_t,angle:St,flipX:Ct,flipY:Nt}=fe,rt=1/Fe(),kt=Rt,$t=Xt,Pt=fe.scale*rt,Ft=pe.scale*rt;const Ot=Math.max(It,et),Ht=Math.min(It,et);Rt>Xt?(kt=Ot,$t=Ht):(kt=Ht,$t=Ot),Pt=Rt>Xt?Ot*_t/Rt||1:Ot*_t/Xt||1;let Zt=kt?Rt*Ft:0,an=$t?Xt*Ft:0,rn=kt&&$t?Rt*Pt/Zt:0;return ct=ct+.5*kt-.5*Zt,bt=bt+.5*$t-.5*an,{x:ct,y:bt,width:Zt,height:an,scale:rn,flipX:Ct,flipY:Nt,angle:St,fitWidth:It,fitHeight:et,fullWidth:Rt,fullHeight:Xt}}(),{x:ht,y:st,width:ft,height:yt,scale:wt,angle:Tt,flipX:Dt,flipY:Lt}=nt;let Gt=`translate(${m$4(ht)}px, ${m$4(st)}px)`;Gt+=Dt!==1||Lt!==1?` scaleX(${m$4(wt*Dt)}) scaleY(${m$4(wt*Lt)})`:` scale(${m$4(wt)})`,Tt!==0&&(Gt+=` rotate(${Tt}deg)`),ie.style.width=`${m$4(ft)}px`,ie.style.height=`${m$4(yt)}px`,ie.style.transform=`${Gt}`,ye("render")}function at(){let We=pe.scale;const Ke=ge("clickAction");let nt=xe();if(Ke){let ht=[];switch(Ke){case v$6.ZoomIn:nt=2*We;break;case v$6.ZoomOut:nt=.5*We;break;case v$6.ToggleCover:ht=[xe(),Ce()];break;case v$6.ToggleFull:ht=[xe(),Fe()];break;case v$6.ToggleMax:ht=[xe(),Ie()];break;case v$6.IterateZoom:ht=[xe(),Fe(),Ie()];break;case v$6.Zoom:const st=Fe();nt=We>=st-.05?xe():Math.min(st,2*We)}if(ht.length){const st=ht.findIndex(ft=>ft>We+1e-4);nt=ht[st]||xe()}}return nt=t$8(Ae(),nt,Ie()),nt}function Je(){return!!(ke()&&at()>pe.scale)}function lt(){return!!(ke()&&at()<pe.scale)}function it(){return!!(ke()&&pe.scale>Ae())}function gt(){return!!(ke()&&pe.scale<Ie())}function Et(){return!!(ke()&&pe.scale<Fe())}function mt(){return!(!(ke()&&Qe()&&le)||Ne())}function je(){return!(!ke()||!(le!=null&&le.isPointerDown())||Ne())}function Qe(){return!!(ke()&&pe.scale>xe())}function ut(){return!!(ke()&&pe.scale>=Fe())}function dt(){const We="in-fullscreen",Ke="with-panzoom-in-fullscreen";ee==null||ee.classList.toggle(We);const nt=ee==null?void 0:ee.classList.contains(We);nt?(document.documentElement.classList.add(Ke),document.addEventListener("keydown",pt,!0)):(document.documentElement.classList.remove(Ke),document.removeEventListener("keydown",pt,!0)),Ue(),ye(nt?"enterFS":"exitFS")}function pt(We){We.key!=="Escape"||We.defaultPrevented||dt()}const tt={canDrag:mt,canZoomIn:gt,canZoomOut:it,canZoomToFull:Et,destroy:function(){ye("destroy");for(const We of Object.values(be))We==null||We.destroy(tt);for(const We of _e)We();return ae&&(ae.style.aspectRatio="",ae.style.maxWidth="",ae.style.maxHeight=""),ie&&(ie.style.width="",ie.style.height="",ie.style.transform=""),ae=void 0,re=void 0,ie=void 0,fe=Object.assign({},y$5),pe=Object.assign({},y$5),ce==null||ce.destroy(),ce=void 0,le==null||le.destroy(),le=void 0,ve=4,tt},emit:ye,execute:Xe,getBoundaries:qe,getContainer:function(){return ee},getContent:function(){return re},getFullDim:ze,getGestures:function(){return le},getMousemovePos:Pe,getOptions:function(){return me},getPlugins:function(){return be},getScale:Be,getStartPosition:Oe,getState:function(){return ve},getTransform:function(We){return We===!0?pe:fe},getTween:function(){return ce},getViewport:function(){return ie},getWrapper:function(){return ae},init:function(){return ve=0,ye("init"),function(){for(const[We,Ke]of Object.entries(Object.assign(Object.assign({},ne),me.plugins||{})))if(We&&!be[We]&&Ke instanceof Function){const nt=Ke();nt.init(tt),be[We]=nt}ye("initPlugins")}(),function(){const We=Object.assign(Object.assign({},x$2.classes),ge("classes"));if(ee&&(s$a(ee,We.container),re=ee.querySelector("."+We.content),!!re)){if(re.setAttribute("draggable","false"),ae=ee.querySelector("."+We.wrapper),ae||(ae=document.createElement("div"),s$a(ae,We.wrapper),re.insertAdjacentElement("beforebegin",ae),ae.insertAdjacentElement("afterbegin",re)),ie=ee.querySelector("."+We.viewport),ie||(ie=document.createElement("div"),s$a(ie,We.viewport),ie.insertAdjacentElement("afterbegin",re),ae.insertAdjacentElement("beforeend",ie)),oe=re.cloneNode(!0),oe.removeAttribute("id"),ae.insertAdjacentElement("afterbegin",oe),re instanceof HTMLPictureElement&&(re=re.querySelector("img")),oe instanceof HTMLPictureElement&&(oe=oe.querySelector("img")),ie instanceof HTMLPictureElement&&(ie=ie.querySelector("img")),ie&&(ie.style.visibility="hidden",ge("protected"))){ie.addEventListener("contextmenu",nt=>{h$6(nt)});const Ke=document.createElement("div");s$a(Ke,"f-panzoom__protected"),ie.appendChild(Ke)}ye("initLayout")}}(),function(){if(ee&&ae&&!de){let We=null;de=new ResizeObserver(()=>{ke()&&(We=We||requestAnimationFrame(()=>{ke()&&(Ze(),Ge(),ye("refresh")),We=null}))}),de.observe(ae),_e.push(()=>{de==null||de.disconnect(),de=void 0,We&&(cancelAnimationFrame(We),We=null)})}}(),function(){if(!ee||!re)return;if(!p$3(re)||!p$3(oe))return void De();const We=()=>{re&&p$3(re)&&re.decode().then(()=>{De()}).catch(()=>{De()})};if(ve=1,ee.classList.add("is-loading"),ye("loading"),oe.src&&oe.complete)return void We();(function(){if(!ee||ee!=null&&ee.querySelector(".f-spinner"))return;const Ke=ge("spinnerTpl"),nt=e$9(Ke);nt&&(nt.classList.add("f-spinner"),ee.classList.add("is-loading"),ae==null||ae.insertAdjacentElement("afterbegin",nt))})(),oe.addEventListener("load",We,!1),oe.addEventListener("error",We,!1),_e.push(()=>{oe==null||oe.removeEventListener("load",We,!1),oe==null||oe.removeEventListener("error",We,!1)})}(),tt},isDragging:je,isExpanded:Qe,isFullsize:ut,isMousemoveMode:Ne,localize:function(We,Ke=[]){const nt=ge("l10n")||{};We=String(We).replace(/\{\{(\w+)\}\}/g,(ht,st)=>nt[st]||ht);for(let ht=0;ht<Ke.length;ht++)We=We.split(Ke[ht][0]).join(Ke[ht][1]);return We=We.replace(/\{\{(.*?)\}\}/g,(ht,st)=>st)},off:function(We,Ke){for(const nt of We instanceof Array?We:[We])$e.has(nt)&&$e.set(nt,$e.get(nt).filter(ht=>ht!==Ke));return tt},on:function(We,Ke){for(const nt of We instanceof Array?We:[We])$e.set(nt,[...$e.get(nt)||[],Ke]);return tt},toggleFS:dt,updateControls:Ze,version:"6.1.3",willZoomIn:Je,willZoomOut:lt};return tt};E$4.l10n={en_EN:e$5},E$4.getDefaults=()=>x$2;/*! License details at fancyapps.com/license */const e$4=(ee,te)=>{let ne=[];return ee.childNodes.forEach(ae=>{ae.nodeType!==Node.ELEMENT_NODE||te&&!ae.matches(te)||ne.push(ae)}),ne};/*! License details at fancyapps.com/license */const r$5=(ee,...te)=>{const ne=te.length;for(let ae=0;ae<ne;ae++){const re=te[ae]||{};Object.entries(re).forEach(([oe,ie])=>{const le=Array.isArray(ie)?[]:{};ee[oe]||Object.assign(ee,{[oe]:le}),t$7(ie)?Object.assign(ee[oe],r$5(ee[oe],ie)):Array.isArray(ie)?Object.assign(ee,{[oe]:[...ie]}):Object.assign(ee,{[oe]:ie})})}return ee};/*! License details at fancyapps.com/license */const t$5=function(ee=0,te=0,ne=0,ae=0,re=0,oe=!1){const ie=(ee-te)/(ne-te)*(re-ae)+ae;return oe?ae<re?t$8(ae,ie,re):t$8(re,ie,ae):ie};/*! License details at fancyapps.com/license */const o$7=Object.assign(Object.assign({},e$5),{ERROR:"Something went wrong. <br /> Please try again later.",NEXT:"Next page",PREV:"Previous page",GOTO:"Go to page #%d",DOWNLOAD:"Download",TOGGLE_FULLSCREEN:"Toggle full-screen mode",TOGGLE_EXPAND:"Toggle full-size mode",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_AUTOPLAY:"Toggle slideshow"});/*! License details at fancyapps.com/license */const m$3=ee=>{ee.cancelable&&ee.preventDefault()},h$5={adaptiveHeight:!1,center:!0,classes:{container:"f-carousel",isEnabled:"is-enabled",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",hasAdaptiveHeight:"has-adaptive-height",viewport:"f-carousel__viewport",slide:"f-carousel__slide",isSelected:"is-selected"},dragFree:!1,enabled:!0,errorTpl:'<div class="f-html">{{ERROR}}</div>',fill:!1,infinite:!0,initialPage:0,l10n:o$7,rtl:!1,slides:[],slidesPerPage:"auto",spinnerTpl:'<div class="f-spinner"></div>',transition:"fade",tween:{clamp:!0,mass:1,tension:160,friction:25,restDelta:1,restSpeed:1,velocity:0},vertical:!1};let b$3,y$4=0;const E$3=(ee,te={},ne={})=>{y$4++;let ae,re,oe,ie,le,ce=0,de=Object.assign({},h$5),ue=Object.assign({},h$5),ve={},me=null,be=null,fe=!1,pe=!1,_e=!1,ge=!1,ke="height",$e=0,ye=!0,Ee=0,Se=0,Le=0,Me=0,De="*",Oe=[],Re=[];const ze=new Set;let Ve=[],Ne=[],Pe=0,Be=0,Ae=0;function xe(et,...ct){let bt=ue[et];return bt&&bt instanceof Function?bt(It,...ct):bt}function Ce(et,ct=[]){const bt=xe("l10n")||{};et=String(et).replace(/\{\{(\w+)\}\}/g,(_t,St)=>bt[St]||_t);for(let _t=0;_t<ct.length;_t++)et=et.split(ct[_t][0]).join(ct[_t][1]);return et=et.replace(/\{\{(.*?)\}\}/g,(_t,St)=>St)}const Fe=new Map;function Ie(et,...ct){const bt=[...Fe.get(et)||[]];ue.on&&bt.push(ue.on[et]);for(const _t of bt)_t&&_t instanceof Function&&_t(It,...ct);et!=="*"&&Ie("*",et,...ct)}function qe(){var et,ct;const bt=r$5({},h$5,de);r$5(bt,h$5,de);let _t="";const St=de.breakpoints||{};if(St)for(const[Ct,Nt]of Object.entries(St))window.matchMedia(Ct).matches&&(_t+=Ct,r$5(bt,Nt));if(le===void 0||_t!==le){if(le=_t,ce!==0){let Ct=(ct=(et=Ne[Ee])===null||et===void 0?void 0:et.slides[0])===null||ct===void 0?void 0:ct.index;Ct===void 0&&(Ct=ue.initialSlide),bt.initialSlide=Ct,bt.slides=[];for(const Nt of Oe)Nt.isVirtual&&bt.slides.push(Nt)}Gt(),ue=bt,xe("enabled")!==!1&&(ce=0,Ie("init"),function(){for(const[Ct,Nt]of Object.entries(Object.assign(Object.assign({},ne),ue.plugins||{})))if(Ct&&!ve[Ct]&&Nt instanceof Function){const rt=Nt();rt.init(It,E$3),ve[Ct]=rt}Ie("initPlugins")}(),function(){if(!me)return;const Ct=xe("classes")||{};s$a(me,Ct.container);const Nt=xe("style");if(Nt&&t$7(Nt))for(const[rt,kt]of Object.entries(Nt))me.style.setProperty(rt,kt);be=me.querySelector(`.${Ct.viewport}`),be||(be=document.createElement("div"),s$a(be,Ct.viewport),be.append(...e$4(me,`.${Ct.slide}`)),me.insertAdjacentElement("afterbegin",be)),me.carousel=It,Ie("initLayout")}(),function(){if(!be)return;const Ct=xe("classes")||{};Oe=[],[...e$4(be,`.${Ct.slide}`)].forEach(Nt=>{if(Nt.parentElement){const rt=Qe(Object.assign({el:Nt,isVirtual:!1},Nt.dataset||{}));Ie("createSlide",rt),Oe.push(rt)}}),tt();for(const Nt of Oe)Ie("addSlide",Nt);je(xe("slides"));for(const Nt of Oe){const rt=Nt.el;(rt==null?void 0:rt.parentElement)===be&&(s$a(rt,ue.classes.slide),s$a(rt,Nt.class),wt(Nt),Ie("attachSlideEl",Nt))}Ie("initSlides")}(),We(),ce=1,s$a(me,(xe("classes")||{}).isEnabled||""),Lt(),at(),re=c$5().on("start",()=>{ae&&ae.isPointerDown()||(Ue(),Lt())}).on("step",Ct=>{const Nt=$e;$e=Ct.pos,$e!==Nt&&(ye=!1,Lt())}).on("end",Ct=>{ae!=null&&ae.isPointerDown()||($e=Ct.pos,re&&!pe&&($e<Le||$e>Me)?re.spring({clamp:!0,mass:1,tension:200,friction:25,velocity:0,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:t$8(Le,$e,Me)}).start():ye||(ye=!0,Ie("settle")))}),Ze(),function(){if(!me||!be)return;me.addEventListener("click",st,{passive:!1}),document.addEventListener("mousemove",Ge);const Ct=be.getBoundingClientRect();if(Pe=Ct.height,Be=Ct.width,!oe){let Nt=null;oe=new ResizeObserver(()=>{Nt||(Nt=requestAnimationFrame(()=>{(function(){if(ce!==1||!be)return;const rt=Ne.length,kt=be.getBoundingClientRect(),$t=kt.height,Pt=kt.width;rt>1&&(ge&&Math.abs($t-Pe)<.5||!ge&&Math.abs(Pt-Be)<.5)||(We(),Ze(),Pe=$t,Be=Pt,ge&&!$t||!ge&&!Pt||me&&be&&(rt===Ne.length&&(ae!=null&&ae.isPointerDown())||(xe("dragFree")&&(pe||$e>Le&&$e<Me)?(Ue(),Lt()):Tt(Ee,{transition:!1}))))})(),Nt=null}))}),oe.observe(be)}}(),Ie("ready"))}}function Ge(et){b$3=et}function Ze(){xe("gestures")===!1?ae&&(ae.destroy(),ae=void 0):ae||function(){const et=xe("gestures");!ae&&et!==!1&&be&&(ae=f$4(be,et).on("start",ct=>{var bt,_t;if(!re)return;const{srcEvent:St}=ct;ge&&e$6(St)&&!n$a(St.target)&&m$3(St),re.pause(),re.getCurrentVelocities().pos=0;const Ct=(bt=Ne[Ee])===null||bt===void 0?void 0:bt.slides[0];Ct&&ze.has(Ct.index)&&Ct.el&&($e=Ct.offset||0,$e+=(function(Nt){const rt=window.getComputedStyle(Nt),kt=new DOMMatrixReadOnly(rt.transform);return{width:kt.m41||0,height:kt.m42||0}}(Ct.el)[ke]||0)*(_e&&!ge?1:-1)),nt(),pe||($e<Le||$e>Me)&&re.spring({clamp:!0,mass:1,tension:500,friction:25,velocity:((_t=re.getCurrentVelocities())===null||_t===void 0?void 0:_t.pos)||0,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:t$8(Le,$e,Me)}).start()}).on("move",ct=>{var bt,_t;const{srcEvent:St,axis:Ct}=ct,Nt=St.target;if(Ct||(m$3(St),St.stopPropagation(),St.stopImmediatePropagation()),(Ct==="y"&&ge||Ct==="x"&&!ge)&&(m$3(St),St.stopPropagation()),!Ct)return;const{deltaX:rt,deltaY:kt}=ct;if(!re||e$6(St)&&((bt=St.touches)===null||bt===void 0?void 0:bt.length)>1||Ct==="y"&&!ge||Ct==="x"&&ge||Nt&&n$a(Nt)&&(Ct!=="x"||ge))return;const $t=_e&&!ge?1:-1;let Pt=ge?kt:rt,Ft=re!=null&&re.isRunning()?re.getEndValues().pos:$e,Ot=1;pe||(Ft<=Le&&Pt*$t<0?(Ot=Math.max(.01,1-(Math.abs(1/gt()*Math.abs(Ft-Le))||0)),Ot*=.2):Ft>=Me&&Pt*$t>0&&(Ot=Math.max(.01,1-(Math.abs(1/gt()*Math.abs(Ft-Me))||0)),Ot*=.2)),Ft+=Pt*Ot*$t,re.spring({clamp:!0,mass:1,tension:700,friction:25,velocity:((_t=re.getCurrentVelocities())===null||_t===void 0?void 0:_t.pos)||0,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:Ft}).start()}).on("panstart",ct=>{(ct==null?void 0:ct.axis)===(ge?"y":"x")&&s$a(be,"is-dragging")}).on("panend",()=>{s$9(be,"is-dragging")}).on("end",ct=>{var bt,_t;const{srcEvent:St,axis:Ct,velocityX:Nt,velocityY:rt,currentTouch:kt}=ct;if(kt.length>0||!re)return;const $t=St.target,Pt=$t&&n$a($t)&&!(Ct==="x"&&!ge);ge&&e$6(St)&&!ct.axis&&st(St);const Ft=Ne.length,Ot=xe("dragFree");if(!Ft)return;const Ht=xe("vertical")?rt:Nt;let Zt=re!=null&&re.isRunning()?re.getEndValues().pos:$e;const an=_e&&!ge?1:-1;if(Pt||(Zt+=Ht*(Ot?5:1)*an),!pe&&(Ht*an<=0&&Zt<Le||Ht*an>=0&&Zt>Me)){let on=0;return Math.abs(Ht)>0&&(on=2*Math.abs(Ht),on=Math.min(.3*gt(),on)),Zt=t$8(Le+-1*on,Zt,Me+on),void re.spring({clamp:!0,mass:1,tension:380,friction:25,velocity:-1*Ht,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:Zt}).start()}if(Ot||!((bt=ve.Autoscroll)===null||bt===void 0)&&bt.isEnabled())return void(Math.abs(Ht)>10?re.spring({clamp:!0,mass:1,tension:150,friction:25,velocity:-1*Ht,restDelta:1,restSpeed:1}).from({pos:$e}).to({pos:Zt}).start():re.isRunning()||ye||(ye=!0,Ie("settle")));if(!Ot&&!(!((_t=ve.Autoscroll)===null||_t===void 0)&&_t.isEnabled())&&(!ct.offsetX&&!ct.offsetY||Ct==="y"&&!ge||Ct==="x"&&ge))return void Tt(Ee,{transition:"tween"});let rn=lt(Zt);Math.abs(Ht)>10&&rn===Ee&&(rn+=Ht>0?_e&&!ge?1:-1:_e&&!ge?-1:1),Tt(rn,{transition:"tween",tween:{velocity:-1*Ht}})}).init())}(),s$8(be,"is-draggable",!!ae&&Ne.length>0)}function Xe(et="*"){var ct;const bt=[];for(const _t of Oe)(et==="*"||_t.class&&_t.class.includes(et)||_t.el&&(!((ct=_t.el)===null||ct===void 0)&&ct.classList.contains(et)))&&bt.push(_t);ie=void 0,De=et,Re=[...bt]}function Ue(){if(!re)return;const et=lt(re!=null&&re.isRunning()?re.getEndValues().pos:$e);et!==Ee&&(ie=Ee,Ee=et,wt(),at(),Je(),Ie("change",Ee,ie))}function at(){var et,ct;if(!me)return;for(const St of me.querySelectorAll("[data-carousel-index]"))St.innerHTML=Ee+"";for(const St of me.querySelectorAll("[data-carousel-page]"))St.innerHTML=Ee+1+"";for(const St of me.querySelectorAll("[data-carousel-pages]"))St.innerHTML=Ne.length+"";for(const St of me.querySelectorAll("[data-carousel-go-to]"))parseInt(((et=St.dataset)===null||et===void 0?void 0:et.carouselGoTo)||"-1",10)===Ee?St.setAttribute("aria-current","true"):St.removeAttribute("aria-current");for(const St of me.querySelectorAll("[data-carousel-go-prev]"))St.toggleAttribute("aria-disabled",!Rt()),Rt()?St.removeAttribute("tabindex"):St.setAttribute("tabindex","-1");for(const St of me.querySelectorAll("[data-carousel-go-next]"))St.toggleAttribute("aria-disabled",!Xt()),Xt()?St.removeAttribute("tabindex"):St.setAttribute("tabindex","-1");let bt=!1;const _t=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0];_t&&(_t.downloadSrc||_t.type==="image"&&_t.src)&&(bt=!0);for(const St of me.querySelectorAll("[data-carousel-download]"))St.toggleAttribute("aria-disabled",!bt)}function Je(et){var ct;et||(et=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0]);const bt=et==null?void 0:et.el;if(bt)for(const _t of bt.querySelectorAll("[data-slide-index]"))_t.innerHTML=et.index+1+""}function lt(et){var ct,bt,_t;if(!Ne.length)return 0;const St=Et();let Ct=et;pe?Ct-=Math.floor((et-((ct=Ne[0])===null||ct===void 0?void 0:ct.pos))/St)*St||0:Ct=t$8((bt=Ne[0])===null||bt===void 0?void 0:bt.pos,et,(_t=Ne[Ne.length-1])===null||_t===void 0?void 0:_t.pos);const Nt=new Map;let rt=0;for(const $t of Ne){const Pt=Math.abs($t.pos-Ct),Ft=Math.abs($t.pos-Ct-St),Ot=Math.abs($t.pos-Ct+St),Ht=Math.min(Pt,Ft,Ot);Nt.set(rt,Ht),rt++}const kt=Nt.size>0?[...Nt.entries()].reduce(($t,Pt)=>Pt[1]<$t[1]?Pt:$t):[Ee,0];return parseInt(kt[0])}function it(){return Ae}function gt(){let et=0;return be&&(be.childElementCount||(be.style.display="grid"),et=be.getBoundingClientRect()[ke]||0,be.style.display=""),et}function Et(et=!0){return Re.length?Re.reduce((ct,bt)=>ct+bt.dim,0)+(Re.length-(pe&&et?0:1))*Ae:0}function mt(et){const ct=Et(),bt=gt();if(!ct||!be||!bt)return[];const _t=[];et=et===void 0?$e:et,pe&&(et-=Math.floor(et/ct)*ct||0);let St=0,Ct=0;if(fe){const rt=be.getBoundingClientRect();St=Math.abs(rt[ge?"top":"left"]),Ct=Math.abs(window[ge?"innerHeight":"innerWidth"]-rt[ge?"bottom":"right"])}let Nt=0;for(let rt of Re){const kt=($t=0)=>{_t.indexOf(rt)>-1||(rt.pos=Nt-et+$t||0,rt.offset+$t>et-rt.dim-St+.51&&rt.offset+$t<et+bt+Ct-.51&&_t.push(rt))};rt.offset=Nt,pe&&(kt(ct),kt(-1*ct)),kt(),Nt+=rt.dim+Ae}return _t}function je(et,ct){const bt=[];for(const _t of Array.isArray(et)?et:[et]){const St=Qe(Object.assign(Object.assign({},_t),{isVirtual:!0}));St.el||(St.el=document.createElement("div")),Ie("createSlide",St),bt.push(St)}Oe.splice(ct===void 0?Oe.length:ct,0,...bt),tt();for(const _t of bt)Ie("addSlide",_t),ut(_t);return Xe(De),bt}function Qe(et){return(t$9(et)||et instanceof HTMLElement)&&(et={html:et}),Object.assign({index:-1,el:void 0,class:"",isVirtual:!0,dim:0,pos:0,offset:0,html:"",src:""},et)}function ut(et){let ct=et.el;if(!et||!ct)return;const bt=et.html?et.html instanceof HTMLElement?et.html:e$9(et.html):void 0;bt&&(s$a(bt,"f-html"),et.htmlEl=bt,s$a(ct,"has-html"),ct.append(bt),Ie("contentReady",et))}function dt(et){if(!be||!et)return;let ct=et.el;if(ct){if(ct.setAttribute("index",et.index+""),ct.parentElement!==be){let bt;s$a(ct,ue.classes.slide),s$a(ct,et.class),wt(et);for(const _t of Oe)if(_t.index>et.index){bt=_t.el;break}be.insertBefore(ct,bt&&be.contains(bt)?bt:null),Ie("attachSlideEl",et)}return Je(et),ct}}function pt(et){const ct=et==null?void 0:et.el;ct&&(ct.remove(),Ke(ct),Ie("detachSlideEl",et))}function tt(){for(let et=0;et<Oe.length;et++){const ct=Oe[et],bt=ct.el;bt&&(ct.index!==et&&Ke(bt),bt.setAttribute("index",`${et}`)),ct.index=et}}function We(){var et,ct,bt,_t,St;if(!me||!be)return;_e=xe("rtl"),ge=xe("vertical"),ke=ge?"height":"width";const Ct=xe("classes");if(s$8(me,Ct.isLTR,!_e),s$8(me,Ct.isRTL,_e),s$8(me,Ct.isHorizontal,!ge),s$8(me,Ct.isVertical,ge),s$8(me,Ct.hasAdaptiveHeight,xe("adaptiveHeight")),!gt())return;const Nt=window.getComputedStyle(be);fe=Nt.getPropertyValue("overflow-"+(ge?"y":"x"))==="visible",Ae=be&&parseFloat(Nt.getPropertyValue("--f-carousel-gap"))||0;const rt=function(){let kt=0;if(be){let $t=document.createElement("div");$t.style.display="block",s$a($t,ue.classes.slide),be.appendChild($t),kt=$t.getBoundingClientRect()[ke],$t.remove(),$t=void 0}return kt}();for(const kt of Re){const $t=kt.el;let Pt=0;if(!kt.isVirtual&&$t&&n$b($t)){let Ft=!1;$t.parentElement&&$t.parentElement===be||(be.appendChild($t),Ft=!0),Pt=$t.getBoundingClientRect()[ke],Ft&&((et=$t.parentElement)===null||et===void 0||et.removeChild($t))}else Pt=rt;kt.dim=Pt}if(pe=!1,xe("infinite")){pe=!0;const kt=Et();let $t=gt();if(fe){const Pt=be.getBoundingClientRect();$t+=Pt.left,$t+=Pt.right-Pt.width}for(let Pt=0;Pt<Re.length;Pt++){const Ft=((ct=Re[Pt])===null||ct===void 0?void 0:ct.dim)+Ae;if(kt-Ft<$t&&kt-Ft-$t<Ft){pe=!1;break}}}(function(){var kt;if(!me)return;const $t=gt(),Pt=Et(!1);let Ft=xe("slidesPerPage");Ft=Ft==="auto"?1/0:parseFloat(Ft+""),Ne=[];let Ot=0,Ht=0;for(const Bt of Re)(!Ne.length||Ot+Bt.dim-$t>.05||Ht>=Ft)&&(Ne.push({index:Ne.length,slides:[],dim:0,offset:0,pos:0}),Ot=0,Ht=0),(kt=Ne[Ne.length-1])===null||kt===void 0||kt.slides.push(Bt),Ot+=Bt.dim+Ae,Ht++;const Zt=xe("center"),an=xe("fill");let rn=0;for(const Bt of Ne){Bt.dim=(Bt.slides.length-1)*Ae;for(const Mt of Bt.slides)Bt.dim+=Mt.dim;Bt.offset=rn,Bt.pos=rn,Zt!==!1&&(Bt.pos-=.5*($t-Bt.dim)),an&&!pe&&Pt>$t&&(Bt.pos=t$8(0,Bt.pos,Pt-$t)),rn+=Bt.dim+Ae}const on=[];let Vt;for(const Bt of Ne){const Mt=Object.assign({},Bt);Vt&&Math.abs(Mt.pos-Vt.pos)<.1?(Vt.dim+=Mt.dim,Vt.slides=[...Vt.slides,...Mt.slides]):(Vt=Mt,Mt.index=on.length,on.push(Mt))}Ne=on,Ee=t$8(0,Ee,Ne.length-1)})(),Le=((bt=Ne[0])===null||bt===void 0?void 0:bt.pos)||0,Me=((_t=Ne[Ne.length-1])===null||_t===void 0?void 0:_t.pos)||0,ce===0?function(){var kt;ie=void 0,Ee=xe("initialPage");const $t=xe("initialSlide")||void 0;$t!==void 0&&(Ee=It.getPageIndex($t)||0),Ee=t$8(0,Ee,Ne.length-1),$e=((kt=Ne[Ee])===null||kt===void 0?void 0:kt.pos)||0,Se=$e}():Se=((St=Ne[Ee||0])===null||St===void 0?void 0:St.pos)||0,Ie("refresh"),at()}function Ke(et){if(!et||!n$b(et))return;const ct=parseInt(et.getAttribute("index")||"-1");let bt="";for(const St of Array.from(et.classList)){const Ct=St.match(/^f-(\w+)(Out|In)$/);Ct&&Ct[1]&&(bt=Ct[1]+"")}if(!et||!bt)return;const _t=[`f-${bt}Out`,`f-${bt}In`,"to-prev","to-next","from-prev","from-next"];et.removeEventListener("animationend",ht),s$9(et,_t.join(" ")),ze.delete(ct)}function nt(){if(!be)return;const et=ze.size>0;for(const ct of Re)Ke(ct.el);ze.clear(),et&&Lt()}function ht(et){var ct;((ct=et.animationName)===null||ct===void 0?void 0:ct.substring(0,2))==="f-"&&(Ke(et.target),ze.size||(s$9(me,"in-transition"),!ye&&Math.abs(It.getPosition(!0)-Se)<.5&&(ye=!0,Ie("settle"))),Lt())}function st(et){var ct;if(et.defaultPrevented)return;const bt=et.composedPath()[0];if(bt.closest("[data-carousel-go-prev]"))return m$3(et),void It.prev();if(bt.closest("[data-carousel-go-next]"))return m$3(et),void It.next();const _t=bt.closest("[data-carousel-go-to]");if(_t)return m$3(et),void It.goTo(parseFloat(_t.dataset.carouselGoTo||"")||0);if(bt.closest("[data-carousel-download]")){m$3(et);const St=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0];if(St&&(St.downloadSrc||St.type==="image"&&St.src)){const Ct=St.downloadFilename,Nt=document.createElement("a"),rt=St.downloadSrc||St.src||"";Nt.href=rt,Nt.target="_blank",Nt.download=Ct||rt,Nt.click()}}else Ie("click",et)}function ft(et){var ct;const bt=et.el;bt&&((ct=bt.querySelector(".f-spinner"))===null||ct===void 0||ct.remove())}function yt(et){var ct;const bt=et.el;bt&&((ct=bt.querySelector(".f-html.is-error"))===null||ct===void 0||ct.remove(),s$9(bt,"has-error"))}function wt(et){var ct;et||(et=(ct=Ne[Ee])===null||ct===void 0?void 0:ct.slides[0]);const bt=et==null?void 0:et.el;if(!bt)return;let _t=xe("formatCaption",et);_t===void 0&&(_t=et.caption),_t=_t||"";const St=xe("captionEl");if(St&&St instanceof HTMLElement){if(et.index!==Ee)return;if(t$9(_t)&&(St.innerHTML=Ce(_t+"")),_t instanceof HTMLElement){if(_t.parentElement===St)return;St.innerHTML="",_t.parentElement&&(_t=_t.cloneNode(!0)),St.append(_t)}return}if(!_t)return;let Ct=et.captionEl||bt.querySelector(".f-caption");!Ct&&_t instanceof HTMLElement&&_t.classList.contains("f-caption")&&(Ct=_t),Ct||(Ct=document.createElement("div"),s$a(Ct,"f-caption"),t$9(_t)?Ct.innerHTML=Ce(_t+""):_t instanceof HTMLElement&&(_t.parentElement&&(_t=_t.cloneNode(!0)),Ct.append(_t)));const Nt=`f-caption-${y$4}_${et.index}`;Ct.setAttribute("id",Nt),Ct.dataset.selectable="true",s$a(bt,"has-caption"),bt.setAttribute("aria-labelledby",Nt),et.captionEl=Ct,bt.insertAdjacentElement("beforeend",Ct)}function Tt(et,ct={}){var bt,_t;let{transition:St,tween:Ct}=Object.assign({transition:ue.transition,tween:ue.tween},ct||{});if(!me||!re)return;const Nt=Ne.length;if(!Nt||function($t,Pt){var Ft,Ot,Ht,Zt;if(!(me&&re&&Pt&&t$9(Pt)&&Pt!=="tween")||((Ft=Ne[Ee])===null||Ft===void 0?void 0:Ft.slides.length)>1)return!1;const an=Ne.length;let rn=$t>Ee?1:-1;$t=pe?($t%an+an)%an:t$8(0,$t,an-1),_e&&(rn*=-1);const on=(Ot=Ne[Ee])===null||Ot===void 0?void 0:Ot.slides[0],Vt=on==null?void 0:on.index,Bt=(Ht=Ne[$t])===null||Ht===void 0?void 0:Ht.slides[0],Mt=Bt==null?void 0:Bt.index,Jt=(Zt=Ne[$t])===null||Zt===void 0?void 0:Zt.pos;if(Mt===void 0||Vt===void 0||Vt===Mt||$e===Jt||Math.abs(gt()-((Bt==null?void 0:Bt.dim)||0))>1)return!1;ye=!1,re.pause(),nt(),s$a(me,"in-transition"),$e=Se=Jt;const Yt=dt(on),sn=dt(Bt);return Ue(),Yt&&(ze.add(Vt),Yt.style.transform="",Yt.addEventListener("animationend",ht),s$9(Yt,ue.classes.isSelected),Yt.inert=!1,s$a(Yt,`f-${Pt}Out to-${rn>0?"next":"prev"}`)),sn&&(ze.add(Mt),sn.style.transform="",sn.addEventListener("animationend",ht),s$a(sn,ue.classes.isSelected),sn.inert=!1,s$a(sn,`f-${Pt}In from-${rn>0?"prev":"next"}`)),Lt(),!0}(et,St))return;et=pe?(et%Nt+Nt)%Nt:t$8(0,et,Nt-1),Se=((bt=Ne[et||0])===null||bt===void 0?void 0:bt.pos)||0;const kt=re.isRunning()?re.getEndValues().pos:$e;if(Math.abs(Se-kt)<1)return $e=Se,Ee!==et&&(wt(),ie=Ee,Ee=et,at(),Je(),Ie("change",Ee,ie)),Lt(),void(ye||(ye=!0,Ie("settle")));if(re.pause(),nt(),pe){const $t=Et(),Pt=Math.floor((kt-((_t=Ne[0])===null||_t===void 0?void 0:_t.pos))/$t)||0,Ft=Se+Pt*$t;Se=[Ft+$t,Ft,Ft-$t].reduce(function(Ot,Ht){return Math.abs(Ht-kt)<Math.abs(Ot-kt)?Ht:Ot})}St!==!1&&t$7(Ct)?re.spring(r$5({},ue.tween,Ct)).from({pos:$e}).to({pos:Se}).start():($e=Se,Ue(),Lt(),ye||(ye=!0,Ie("settle")))}function Dt(et){var ct;let bt=$e;if(pe&&et!==!0){const _t=Et();bt-=(Math.floor(($e-((ct=Ne[0])===null||ct===void 0?void 0:ct.pos)||0)/_t)||0)*_t}return bt}function Lt(){var et;if(!me||!be)return;Ve=mt();const ct=new Set,bt=[],_t=Ne[Ee],St=ue.setTransform;let Ct;for(const Nt of Re){const rt=ze.has(Nt.index),kt=Ve.indexOf(Nt)>-1,$t=((et=_t==null?void 0:_t.slides)===null||et===void 0?void 0:et.indexOf(Nt))>-1;if(Nt.isVirtual&&!rt&&!kt)continue;let Pt=dt(Nt);if(Pt&&(bt.push(Nt),$t&&ct.add(Pt),xe("adaptiveHeight")&&$t)){const Ft=(Pt.firstElementChild||Pt).getBoundingClientRect().height;Ct=Ct==null?Ft:Math.max(Ct,Ft)}}be&&Ct&&(be.style.height=`${Ct}px`),[...e$4(be,`.${ue.classes.slide}`)].forEach(Nt=>{s$8(Nt,ue.classes.isSelected,ct.has(Nt));const rt=Oe[parseInt(Nt.getAttribute("index")||"-1")];if(!rt)return Nt.remove(),void Ke(Nt);const kt=ze.has(rt.index),$t=Ve.indexOf(rt)>-1;if(rt.isVirtual&&!kt&&!$t)return void pt(rt);if(Nt.inert=!$t,St===!1)return;let Pt=rt.pos?Math.round(1e4*rt.pos)/1e4:0,Ft=0,Ot=0,Ht=0,Zt=0;kt||(Ft=ge?0:_e?-1*Pt:Pt,Ot=ge?Pt:0,Ht=t$5(Ft,0,rt.dim,0,100),Zt=t$5(Ot,0,rt.dim,0,100)),St instanceof Function&&!kt?St(It,rt,{x:Ft,y:Ot,xPercent:Ht,yPercent:Zt}):Nt.style.transform=Ft||Ot?`translate3d(${Ht}%, ${Zt}%,0)`:""}),Ie("render",bt)}function Gt(){me==null||me.removeEventListener("click",st),document.removeEventListener("mousemove",Ge),ze.clear(),oe==null||oe.disconnect(),oe=void 0;for(const et of Oe){let ct=et.el;ct&&n$b(ct)&&(et.state=void 0,ft(et),yt(et),et.isVirtual?(pt(et),et.el=void 0):(Ke(ct),ct.style.transform="",be&&!be.contains(ct)&&be.appendChild(ct)))}for(const et of Object.values(ve))et==null||et.destroy();ve={},ae==null||ae.destroy(),ae=void 0,re==null||re.destroy(),re=void 0;for(const[et,ct]of Object.entries(ue.classes||{}))et!=="container"&&s$9(me,ct);s$9(be,"is-draggable")}function Rt(){return pe||Ee>0}function Xt(){return pe||Ee<Ne.length-1}const It={add:function(et,ct){var bt;let _t=$e;const St=Ee,Ct=Et(),Nt=re!=null&&re.isRunning()?re.getEndValues().pos:$e,rt=Ct&&Math.floor((Nt-(((bt=Ne[0])===null||bt===void 0?void 0:bt.pos)||0))/Ct)||0;return je(et,ct),Xe(De),We(),re&&Ct&&(St===Ee&&(_t-=rt*Ct),_t===Se?$e=Se:re.spring({clamp:!0,mass:1,tension:300,friction:25,restDelta:1,restSpeed:1}).from({pos:_t}).to({pos:Se}).start()),Lt(),It},canGoPrev:Rt,canGoNext:Xt,destroy:function(){return Ie("destroy"),window.removeEventListener("resize",qe),Gt(),Fe.clear(),me=null,Ne=[],Oe=[],ue=Object.assign({},h$5),ve={},Re=[],le=void 0,De="*",ce=2,It},emit:Ie,filter:function(et="*"){return Xe(et),We(),$e=t$8(Le,$e,Me),Lt(),Ie("filter",et),It},getContainer:function(){return me},getGapDim:it,getGestures:function(){return ae},getLastMouseMove:function(){return b$3},getOption:function(et){return xe(et)},getOptions:function(){return ue},getPage:function(){return Ne[Ee]},getPageIndex:function(et){if(et!==void 0){for(const ct of Ne||[])for(const bt of ct.slides)if(bt.index===et)return ct.index;return-1}return Ee},getPageIndexFromPosition:lt,getPageProgress:function(et,ct){var bt;et===void 0&&(et=Ee);const _t=Ne[et];if(!_t)return et>Ee?-1:1;const St=Et(),Ct=it();let Nt=_t.pos,rt=Dt();if(pe&&ct!==!0){const kt=Math.floor((rt-((bt=Ne[0])===null||bt===void 0?void 0:bt.pos))/St)||0;rt-=kt*St,Nt=[Nt+St,Nt,Nt-St].reduce(function($t,Pt){return Math.abs(Pt-rt)<Math.abs($t-rt)?Pt:$t})}return(rt-Nt)/(_t.dim+Ct)||0},getPageVisibility:function(et){var ct;et===void 0&&(et=Ee);const bt=Ne[et];if(!bt)return et>Ee?-1:1;const _t=Dt(),St=gt();let Ct=bt.pos;if(pe){const Nt=Et(),rt=Ct+(Math.floor((_t-((ct=Ne[0])===null||ct===void 0?void 0:ct.pos))/Nt)||0)*Nt;Ct=[rt+Nt,rt,rt-Nt].reduce(function(kt,$t){return Math.abs($t-_t)<Math.abs(kt-_t)?$t:kt})}return Ct>_t&&Ct+bt.dim<_t+St?1:Ct<_t?(Ct+bt.dim-_t)/bt.dim||0:Ct+bt.dim>_t+St&&(_t+St-Ct)/bt.dim||0},getPages:function(){return Ne},getPlugins:function(){return ve},getPosition:Dt,getSlides:function(){return Oe},getState:function(){return ce},getTotalSlideDim:Et,getTween:function(){return re},getViewport:function(){return be},getViewportDim:gt,getVisibleSlides:function(et){return et===void 0?Ve:mt(et)},goTo:Tt,hasNavigated:function(){return ie!==void 0},hideError:yt,hideLoading:ft,init:function(){if(!ee||!n$b(ee))throw new Error("No Element found");return ce!==0&&(Gt(),ce=0),me=ee,de=te,window.removeEventListener("resize",qe),de.breakpoints&&window.addEventListener("resize",qe),qe(),It},isInfinite:function(){return pe},isInTransition:function(){return ze.size>0},isRTL:function(){return _e},isSettled:function(){return ye},isVertical:function(){return ge},localize:function(et,ct=[]){return Ce(et,ct)},next:function(et={}){return Tt(Ee+1,et),It},off:function(et,ct){for(const bt of et instanceof Array?et:[et])Fe.has(bt)&&Fe.set(bt,Fe.get(bt).filter(_t=>_t!==ct));return It},on:function(et,ct){for(const bt of et instanceof Array?et:[et])Fe.set(bt,[...Fe.get(bt)||[],ct]);return It},prev:function(et={}){return Tt(Ee-1,et),It},reInit:function(et={},ct={}){return Gt(),ce=0,le=void 0,De="*",te=et,de=et,ne=ct,qe(),It},remove:function(et){et===void 0&&(et=Oe.length-1);const ct=Oe[et];return ct&&(Ie("removeSlide",ct),ct.el&&(Ke(ct.el),ct.el.remove(),ct.el=void 0),Oe.splice(et,1),Xe(De),We(),$e=t$8(Le,$e,Me),Lt()),It},setPosition:function(et){$e=et,Ue(),Lt()},showError:function(et,ct){ft(et),yt(et);const bt=et.el;if(bt){const _t=document.createElement("div");s$a(_t,"f-html"),s$a(_t,"is-error"),_t.innerHTML=Ce(ct||"<p>{{ERROR}}</p>"),et.htmlEl=_t,s$a(bt,"has-html"),s$a(bt,"has-error"),bt.insertAdjacentElement("afterbegin",_t),Ie("contentReady",et)}return It},showLoading:function(et){const ct=et.el,bt=ct==null?void 0:ct.querySelector(".f-spinner");if(!ct||bt)return It;const _t=xe("spinnerTpl"),St=e$9(_t);return St&&(s$a(St,"f-spinner"),ct.insertAdjacentElement("beforeend",St)),It},version:"6.1.3"};return It};E$3.l10n={en_EN:o$7},E$3.getDefaults=()=>h$5;/*! License details at fancyapps.com/license */const t$4=(ee=!0,te="--f-scrollbar-compensate",ne="--f-body-margin",ae="hide-scrollbar")=>{const re=document,oe=re.body,ie=re.documentElement;if(ee){if(oe.classList.contains(ae))return;let le=window.innerWidth-ie.getBoundingClientRect().width;le<0&&(le=0),ie.style.setProperty(te,`${le}px`);const ce=parseFloat(window.getComputedStyle(oe).marginRight);ce&&oe.style.setProperty(ne,`${ce}px`),oe.classList.add(ae)}else oe.classList.remove(ae),oe.style.setProperty(ne,""),re.documentElement.style.setProperty(te,"")};/*! License details at fancyapps.com/license */function e$3(){return!(typeof window>"u"||!window.document||!window.document.createElement)}/*! License details at fancyapps.com/license */const n$7=function(ee="",te="",ne=""){return ee.split(te).join(ne)};/*! License details at fancyapps.com/license */const a$7={tpl:ee=>`<img class="f-panzoom__content"
|
|
15
15
|
${ee.srcset?'data-lazy-srcset="{{srcset}}"':""}
|
|
16
16
|
${ee.sizes?'data-lazy-sizes="{{sizes}}"':""}
|
|
17
17
|
data-lazy-src="{{src}}" alt="{{alt}}" />`},s$7=()=>{let ee;function te(ue,ve){const me=ee==null?void 0:ee.getOptions().Zoomable;let be=(t$7(me)?Object.assign(Object.assign({},a$7),me):a$7)[ue];return be&&typeof be=="function"&&ve?be(ve):be}function ne(){ee&&ee.getOptions().Zoomable!==!1&&(ee.on("addSlide",oe),ee.on("removeSlide",ie),ee.on("attachSlideEl",le),ee.on("click",re),ee.on("change",ae),ee.on("ready",ae))}function ae(){ce();const ue=(ee==null?void 0:ee.getVisibleSlides())||[];if(ue.length>1||(ee==null?void 0:ee.getOption("transition"))==="slide")for(const ve of ue){const me=ve.panzoomRef;me&&((ee==null?void 0:ee.getPage().slides)||[]).indexOf(ve)<0&&me.execute(v$6.ZoomTo,Object.assign({},me.getStartPosition()))}}function re(ue,ve){const me=ve.target;me&&!ve.defaultPrevented&&me.dataset.panzoomAction&&de(me.dataset.panzoomAction)}function oe(ue,ve){const me=ve.el;if(!ee||!me||ve.panzoomRef)return;const be=ve.src||ve.lazySrc||"",fe=ve.alt||ve.caption||`Image #${ve.index}`,pe=ve.srcset||ve.lazySrcset||"",_e=ve.sizes||ve.lazySizes||"";if(be&&t$9(be)&&!ve.html&&(!ve.type||ve.type==="image")){ve.type="image",ve.thumbSrc=ve.thumbSrc||be;let Ee=te("tpl",ve);Ee=n$7(Ee,"{{src}}",be+""),Ee=n$7(Ee,"{{srcset}}",pe+""),Ee=n$7(Ee,"{{sizes}}",_e+""),me.insertAdjacentHTML("afterbegin",Ee)}const ge=me.querySelector(".f-panzoom__content");if(!ge)return;ge.setAttribute("alt",fe+"");const ke=ve.width&&ve.width!=="auto"?parseFloat(ve.width+""):"auto",$e=ve.height&&ve.height!=="auto"?parseFloat(ve.height+""):"auto",ye=E$4(me,Object.assign({width:ke,height:$e,classes:{container:"f-zoomable"},event:()=>ee==null?void 0:ee.getLastMouseMove(),spinnerTpl:()=>(ee==null?void 0:ee.getOption("spinnerTpl"))||""},te("Panzoom")));ye.on("*",(Ee,Se,...Le)=>{ee&&(Se==="loading"&&(ve.state=0),Se==="loaded"&&(ve.state=1),Se==="error"&&(ve.state=2,ee==null||ee.showError(ve,"{{IMAGE_ERROR}}")),ee.emit(`panzoom:${Se}`,ve,...Le),Se==="ready"&&ee.emit("contentReady",ve),ve.index===(ee==null?void 0:ee.getPageIndex())&&ce())}),ve.panzoomRef=ye}function ie(ue,ve){ve.panzoomRef&&(ve.panzoomRef.destroy(),ve.panzoomRef=void 0)}function le(ue,ve){const me=ve.panzoomRef;if(me)switch(me.getState()){case 0:me.init();break;case 3:me.execute(v$6.ZoomTo,Object.assign(Object.assign({},me.getStartPosition()),{velocity:0}))}}function ce(){var ue,ve;const me=(ee==null?void 0:ee.getContainer())||void 0,be=(ve=(ue=ee==null?void 0:ee.getPage())===null||ue===void 0?void 0:ue.slides[0])===null||ve===void 0?void 0:ve.panzoomRef;if(me)if(be)be.updateControls(me);else for(const fe of me.querySelectorAll("[data-panzoom-action]")||[])fe.setAttribute("aria-disabled",""),fe.setAttribute("tabindex","-1")}function de(ue,...ve){var me;(me=ee==null?void 0:ee.getPage().slides[0].panzoomRef)===null||me===void 0||me.execute(ue,...ve)}return{init:function(ue){ee=ue,ee.on("initPlugins",ne)},destroy:function(){if(ee){ee.off("initPlugins",ne),ee.off("addSlide",oe),ee.off("removeSlide",ie),ee.off("attachSlideEl",le),ee.off("click",re),ee.off("change",ae),ee.off("ready",ae);for(const ue of ee.getSlides())ie(0,ue)}ee=void 0},execute:de}};/*! License details at fancyapps.com/license */const e$2={syncOnChange:!1,syncOnClick:!0,syncOnHover:!1},i$8=()=>{let ee,te;function ne(){const be=ee==null?void 0:ee.getOptions().Sync;return t$7(be)?Object.assign(Object.assign({},e$2),be):e$2}function ae(be){var fe,pe,_e;ee&&be&&(te=be,ee.getOptions().classes=Object.assign(Object.assign({},ee.getOptions().classes),{isSelected:""}),ee.getOptions().initialSlide=((pe=(fe=te.getPage())===null||fe===void 0?void 0:fe.slides[0])===null||pe===void 0?void 0:pe.index)||0,ne().syncOnChange&&ee.on("change",ie),ne().syncOnClick&&ee.on("click",ce),ne().syncOnHover&&((_e=ee.getViewport())===null||_e===void 0||_e.addEventListener("mouseover",de)),function(){!ee||!te||(ee.on("ready",oe),ee.on("refresh",ue),te.on("change",le),te.on("filter",ve))}())}function re(){const be=ne().target;ee&&be&&ae(be)}function oe(){me()}function ie(){var be;if(ee&&te){const fe=((be=ee.getPage())===null||be===void 0?void 0:be.slides)||[],pe=te.getPageIndex(fe[0].index||0);pe>-1&&te.goTo(pe,ee.hasNavigated()?void 0:{tween:!1,transition:!1}),me()}}function le(){var be;if(ee&&te){const fe=ee.getPageIndex(((be=te.getPage())===null||be===void 0?void 0:be.slides[0].index)||0);fe>-1&&ee.goTo(fe,te.hasNavigated()?void 0:{tween:!1,transition:!1}),me()}}function ce(be,fe){var pe;if(!ee||!te||!((pe=ee.getTween())===null||pe===void 0)&&pe.isRunning())return;const _e=ee==null?void 0:ee.getOptions().classes.slide;if(!_e)return;const ge=_e?fe.target.closest(`.${_e}`):null;if(ge){const ke=parseInt(ge.getAttribute("index")||"")||0,$e=te.getPageIndex(ke);te.goTo($e)}}function de(be){ee&&ce(0,be)}function ue(){var be;if(ee&&te){const fe=ee.getPageIndex(((be=te.getPage())===null||be===void 0?void 0:be.slides[0].index)||0);fe>-1&&ee.goTo(fe,{tween:!1,transition:!1}),me()}}function ve(be,fe){ee&&te&&(ee.filter(fe),le())}function me(){var be,fe,pe;if(!te)return;const _e=((fe=(be=te.getPage())===null||be===void 0?void 0:be.slides[0])===null||fe===void 0?void 0:fe.index)||0;for(const ge of(ee==null?void 0:ee.getSlides())||[])(pe=ge.el)===null||pe===void 0||pe.classList.toggle("is-selected",ge.index===_e)}return{init:function(be){ee=be,ee.on("initSlides",re)},destroy:function(){var be;ee==null||ee.off("ready",oe),ee==null||ee.off("refresh",ue),ee==null||ee.off("change",ie),ee==null||ee.off("click",ce),(be=ee==null?void 0:ee.getViewport())===null||be===void 0||be.removeEventListener("mouseover",de),te==null||te.off("change",le),te==null||te.off("filter",ve),te=void 0,ee==null||ee.off("initSlides",re),ee=void 0},getTarget:function(){return te}}};/*! License details at fancyapps.com/license */const s$6={showLoading:!0,preload:1},n$6="is-lazyloading",o$6="is-lazyloaded",l$7="has-lazyerror",i$7=()=>{let ee;function te(){const re=ee==null?void 0:ee.getOptions().Lazyload;return t$7(re)?Object.assign(Object.assign({},s$6),re):s$6}function ne(re){var oe;const ie=re.el;if(!ie)return;const le="[data-lazy-src],[data-lazy-srcset],[data-lazy-bg]",ce=Array.from(ie.querySelectorAll(le));ie.matches(le)&&ce.push(ie);for(const de of ce){const ue=de.dataset.lazySrc,ve=de.dataset.lazySrcset,me=de.dataset.lazySizes,be=de.dataset.lazyBg,fe=(de instanceof HTMLImageElement||de instanceof HTMLSourceElement)&&(ue||ve),pe=de instanceof HTMLElement&&be;if(!fe&&!pe)continue;const _e=ue||ve||be;if(_e){if(fe&&_e){const ge=(oe=de.parentElement)===null||oe===void 0?void 0:oe.classList.contains("f-panzoom__wrapper");te().showLoading&&(ee==null||ee.showLoading(re)),de.addEventListener("load",()=>{ee==null||ee.hideLoading(re),s$9(de,l$7),de instanceof HTMLImageElement?de.decode().then(()=>{s$9(de,n$6),s$a(de,o$6)}):(s$9(de,n$6),s$a(de,o$6)),ge||ee==null||ee.emit("lazyLoad:loaded",re,de,_e)}),de.addEventListener("error",()=>{ee==null||ee.hideLoading(re),s$9(de,n$6),s$a(de,l$7),ge||ee==null||ee.emit("lazyLoad:error",re,de,_e)}),de.classList.add("f-lazyload"),de.classList.add(n$6),ge||ee==null||ee.emit("lazyLoad:load",re,de,_e),ue&&(de.src=ue),ve&&(de.srcset=ve),me&&(de.sizes=me)}else pe&&(document.body.contains(de)||(document.createElement("img").src=be),de.style.backgroundImage=`url('${be}')`);delete de.dataset.lazySrc,delete de.dataset.lazySrcset,delete de.dataset.lazySizes,delete de.dataset.lazyBg}}}function ae(){if(!ee)return;const re=[...ee.getVisibleSlides()],oe=te().preload;if(oe>0){const ie=ee.getPosition(),le=ee.getViewportDim();re.push(...ee.getVisibleSlides(ie+le*oe),...ee.getVisibleSlides(ie-le*oe))}for(const ie of re)ne(ie)}return{init:function(re){ee=re,ee.on("render",ae)},destroy:function(){ee==null||ee.off("render",ae),ee=void 0}}};/*! License details at fancyapps.com/license */const r$4='<svg width="24" height="24" viewBox="0 0 24 24" tabindex="-1">',i$6="</svg>",s$5={prevTpl:r$4+'<path d="M15 3l-9 9 9 9"></path>'+i$6,nextTpl:r$4+'<path d="M9 3l9 9-9 9"></path>'+i$6},l$6=()=>{let ee,te,ne;function ae(){const le=ee==null?void 0:ee.getOptions().Arrows;return t$7(le)?Object.assign(Object.assign({},s$5),le):s$5}function re(le){if(!ee)return;const ce=`<button data-carousel-go-${le} tabindex="0" class="f-button is-arrow is-${le}" title="{{${le.toUpperCase()}}}">`+ae()[`${le}Tpl`]+"</button",de=e$9(ee.localize(ce))||void 0;return de&&s$a(de,ae()[`${le}Class`]),de}function oe(){var le;te==null||te.remove(),te=void 0,ne==null||ne.remove(),ne=void 0,(le=ee==null?void 0:ee.getContainer())===null||le===void 0||le.classList.remove("has-arrows")}function ie(){ee&&ee.getOptions().Arrows!==!1&&ee.getPages().length>1?(function(){if(!ee)return;const le=ee.getViewport();le&&(te||(te=re("prev"),te&&le.insertAdjacentElement("beforebegin",te)),ne||(ne=re("next"),ne&&le.insertAdjacentElement("afterend",ne)),s$8(ee.getContainer(),"has-arrows",!(!te&&!ne)))}(),ee&&(te==null||te.toggleAttribute("aria-disabled",!ee.canGoPrev()),ne==null||ne.toggleAttribute("aria-disabled",!ee.canGoNext()))):oe()}return{init:function(le){ee=le.on(["change","refresh"],ie)},destroy:function(){oe(),ee==null||ee.off(["change","refresh"],ie),ee=void 0}}};/*! License details at fancyapps.com/license */const t$3='<circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/>',M$1='<g><line x1="11" y1="8" x2="11" y2="14"></line></g>'+t$3,o$5={moveLeft:["moveLeft","MOVE_LEFT",'<path d="M5 12h14M5 12l6 6M5 12l6-6"/>'],moveRight:["moveRight","MOVE_RIGHT",'<path d="M5 12h14M13 18l6-6M13 6l6 6"/>'],moveUp:["moveUp","MOVE_UP",'<path d="M12 5v14M18 11l-6-6M6 11l6-6"/>'],moveDown:["moveDown","MOVE_DOWN",'<path d="M12 5v14M18 13l-6 6M6 13l6 6"/>'],zoomOut:["zoomOut","ZOOM_OUT",t$3],zoomIn:["zoomIn","ZOOM_IN",M$1],toggleFull:["toggleFull","TOGGLE_FULL",M$1],iterateZoom:["iterateZoom","ITERATE_ZOOM",M$1],toggle1to1:["toggleFull","TOGGLE_FULL",'<path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/>'],rotateCCW:["rotateCCW","ROTATE_CCW",'<path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/>'],rotateCW:["rotateCW","ROTATE_CW",'<path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/>'],flipX:["flipX","FLIP_X",'<path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/>'],flipY:["flipY","FLIP_Y",'<path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/>'],reset:["reset","RESET",'<path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>'],toggleFS:["toggleFS","TOGGLE_FS",'<g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g>']},v$5={};for(const[ee,te]of Object.entries(o$5))v$5[ee]={tpl:`<button data-panzoom-action="${te[0]}" class="f-button" title="{{${te[1]}}}"><svg>${te[2]}</svg></button>`};/*! License details at fancyapps.com/license */var l$5;(function(ee){ee.Left="left",ee.middle="middle",ee.right="right"})(l$5||(l$5={}));const s$4=Object.assign({counter:{tpl:'<div class="f-counter"><span data-carousel-page></span>/<span data-carousel-pages></span></div>'},download:{tpl:'<button data-carousel-download class="f-button" title="{{DOWNLOAD}}"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></button>'},autoplay:{tpl:'<button data-autoplay-action="toggle" class="f-button" title="{{TOGGLE_AUTOPLAY}}"><svg><g><path d="M5 3.5 19 12 5 20.5Z"/></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},thumbs:{tpl:'<button data-thumbs-action="toggle" class="f-button" title="{{TOGGLE_THUMBS}}"><svg><rect width="18" height="14" x="3" y="3" rx="2"/><path d="M4 21h1M9 21h1M14 21h1M19 21h1"/></svg></button>'}},v$5),a$6={absolute:!1,display:{left:[],middle:["zoomIn","zoomOut","toggle1to1","rotateCCW","rotateCW","flipX","flipY","reset"],right:[]},enabled:"auto",items:{}},r$3=()=>{let ee,te;function ne(re){const oe=ee==null?void 0:ee.getOptions().Toolbar;let ie=(t$7(oe)?Object.assign(Object.assign({},a$6),oe):a$6)[re];return ie&&typeof ie=="function"&&ee?ie(ee):ie}function ae(){var re,oe;if(!(ee!=null&&ee.getOptions().Toolbar)||!ee||te)return;const ie=ee.getContainer();if(!ie)return;let le=ne("enabled");if(!le)return;const ce=ne("absolute"),de=ee.getSlides().length>1;let ue=!1,ve=!1;for(const ge of ee.getSlides())ge.panzoomRef&&(ue=!0),(ge.downloadSrc||ge.type==="image"&&ge.src)&&(ve=!0);const me=((re=ee.getPlugins().Thumbs)===null||re===void 0?void 0:re.isEnabled())||!1,be=de&&ee.getPlugins().Autoplay||!1,fe=ee.getPlugins().Fullscreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled);if(le==="auto"&&(le=ue),!le)return;te=ie.querySelector(".f-carousel__toolbar")||void 0,te||(te=document.createElement("div"),te.classList.add("f-carousel__toolbar"));const pe=ne("display"),_e=r$5({},s$4,ne("items"));for(const ge of["left","middle","right"]){const ke=pe[ge]||[],$e=document.createElement("div");$e.classList.add("f-carousel__toolbar__column"),$e.classList.add(`is-${ge}`);for(const ye of ke){let Ee;if(t$9(ye)){if(ye==="counter"&&!de||ye==="autoplay"&&!be||v$5[ye]&&!ue||ye==="fullscreen"&&!fe||ye==="thumbs"&&!me||ye==="download"&&!ve)continue;Ee=_e[ye]}if(t$7(ye)&&(Ee=ye),Ee&&Ee.tpl){let Se=ee.localize(Ee.tpl);Se=Se.split("<svg>").join('<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24">');const Le=e$9(Se);Le&&(typeof Ee.click=="function"&&ee&&Le.addEventListener("click",Me=>{Me.preventDefault(),Me.stopPropagation(),typeof Ee.click=="function"&&ee&&Ee.click(ee,Me)}),$e.append(Le))}}te.append($e)}if(te.childElementCount){if(ce&&te.classList.add("is-absolute"),!te.parentElement){const ge=ne("parentEl");ge?ge.insertAdjacentElement("afterbegin",te):(oe=ee.getViewport())===null||oe===void 0||oe.insertAdjacentElement("beforebegin",te)}ie.contains(te)&&ie.classList.add("has-toolbar")}}return{init:function(re){ee=re,ee==null||ee.on("initSlides",ae)},destroy:function(){var re;ee==null||ee.off("initSlides",ae),(re=ee==null?void 0:ee.getContainer())===null||re===void 0||re.classList.remove("has-toolbar"),te==null||te.remove(),te=void 0},add:function(re,oe){s$4[re]=oe},isEnabled:function(){return!!te}}};/*! License details at fancyapps.com/license */const n$5={autoStart:!0,pauseOnHover:!0,showProgressbar:!0,timeout:2e3},o$4=()=>{let ee,te,ne=!1,ae=!1,re=!1,oe=null;function ie(Ee){const Se=ee==null?void 0:ee.getOptions().Autoplay;let Le=(t$7(Se)?Object.assign(Object.assign({},n$5),Se):n$5)[Ee];return Le&&typeof Le=="function"&&ee?Le(ee):Le}function le(){clearTimeout(te),te=void 0}function ce(){if(!ee||!ne||re||ae||te||!ee.isSettled()||function(){var Se;const Le=((Se=ee==null?void 0:ee.getPage())===null||Se===void 0?void 0:Se.slides)||[];for(const Me of Le)if(Me.state===0)return!0;return!1}())return;(function(){var Se,Le,Me,De;if(!ee||(ve(),!ie("showProgressbar")))return;let Oe=ie("progressbarParentEl");if(!Oe&&(!((Se=ee.getPlugins().Toolbar)===null||Se===void 0)&&Se.isEnabled())&&(Oe=ee.getContainer()),!Oe&&((Le=ee.getPlugins().Toolbar)===null||Le===void 0?void 0:Le.isEnabled())!==!0){const ze=((Me=ee.getPages()[0])===null||Me===void 0?void 0:Me.slides)||[],Ve=((De=ee.getPage())===null||De===void 0?void 0:De.slides)||[];ze.length===1&&Ve.length===1&&(Oe=Ve[0].el)}if(Oe||(Oe=ee.getViewport()),!Oe)return;oe=document.createElement("div"),s$a(oe,"f-progressbar"),Oe.prepend(oe);const Re=ie("timeout")||1e3;oe.style.animationDuration=`${Re}ms`})();const Ee=ie("timeout");te=setTimeout(()=>{ee&&ne&&!ae&&(ee.isInfinite()||ee.getPageIndex()!==ee.getPages().length-1?ee.next():ee.goTo(0))},Ee)}function de(){var Ee;if(!ee||ee.getPages().length<2||ee.getOptions().Autoplay===!1||ne)return;ne=!0,ee.emit("autoplay:start",ie("timeout")),s$a(ee.getContainer(),"has-autoplay"),(Ee=ee.getTween())===null||Ee===void 0||Ee.on("start",ge);const Se=ee==null?void 0:ee.getContainer();Se&&ie("pauseOnHover")&&matchMedia("(hover: hover)").matches&&(Se.addEventListener("mouseenter",ke,!1),Se.addEventListener("mouseleave",$e,!1)),ee.on("change",pe),ee.on("settle",_e),ee.on("contentReady",be),ee.on("panzoom:touchStart",ue),ee.on("panzoom:wheel",ue),ee.isSettled()&&ce()}function ue(){var Ee;if(le(),ve(),ee){if(ne){ee.emit("autoplay:end"),(Ee=ee.getTween())===null||Ee===void 0||Ee.off("start",ge);const Se=ee.getContainer();Se&&(Se.classList.remove("has-autoplay"),Se.removeEventListener("mouseenter",ke,!1),Se.removeEventListener("mouseleave",$e,!1))}ee.off("change",pe),ee.off("settle",_e),ee.off("contentReady",be),ee.off("panzoom:touchStart",ue),ee.off("panzoom:wheel",ue)}ne=!1,ae=!1}function ve(){oe&&(oe.remove(),oe=null)}function me(){ee&&ee.getPages().length>1&&ie("autoStart")&&de()}function be(){ce()}function fe(Ee,Se){const Le=Se.target;Le&&!Se.defaultPrevented&&Le.dataset.autoplayAction==="toggle"&&ye.toggle()}function pe(){!ee||!(ee!=null&&ee.isInfinite())&&ee.getPageIndex()===ee.getPages().length-1?ue():(ve(),le())}function _e(){ce()}function ge(){le(),ve()}function ke(){re=!0,ne&&(ve(),le())}function $e(){re=!1,ne&&!ae&&(ee!=null&&ee.isSettled())&&ce()}const ye={init:function(Ee){ee=Ee,ee.on("ready",me),ee.on("click",fe)},destroy:function(){ue(),ee==null||ee.off("ready",me),ee==null||ee.off("click",fe),ee=void 0},isEnabled:()=>ne,pause:function(){ae=!0,le()},resume:function(){ae=!1,ne&&!re&&ce()},start(){de()},stop(){ue()},toggle(){ne?ue():de()}};return ye};/*! License details at fancyapps.com/license */const u$5={Carousel:{Lazyload:{showLoading:!1}},minCount:2,showOnStart:!0,thumbTpl:'<button aria-label="Slide to #{{page}}"><img draggable="false" alt="{{alt}}" data-lazy-src="{{src}}" /></button>',type:"modern"};let a$5;const c$3=()=>{let ee,te,ne,ae,re,oe=0,ie=0,le=!0;function ce(Ve){const Ne=ee==null?void 0:ee.getOptions().Thumbs;let Pe=(t$7(Ne)?Object.assign(Object.assign({},u$5),Ne):u$5)[Ve];return Pe&&typeof Pe=="function"&&ee?Pe(ee):Pe}function de(){if(!ee||(ee==null?void 0:ee.getOptions().Thumbs)===!1)return!1;let Ve=0;for(const Ne of ee.getSlides())Ne.thumbSrc&&Ve++;return Ve>=ce("minCount")}function ue(){return ce("type")==="modern"}function ve(){return ce("type")==="scrollable"}function me(){const Ve=[],Ne=(ee==null?void 0:ee.getSlides())||[];for(const Pe of Ne)Ve.push({index:Pe.index,class:Pe.thumbClass,html:be(Pe)});return Ve}function be(Ve){const Ne=Ve.thumb?Ve.thumb instanceof HTMLImageElement?Ve.thumb.src:Ve.thumb:Ve.thumbSrc||void 0,Pe=Ve.thumbAlt===void 0?`Thumbnail #${Ve.index}`:Ve.thumbAlt+"";let Be=ce("thumbTpl");return Be=n$7(Be,"{{alt}}",Pe),Be=n$7(Be,"{{src}}",Ne+""),Be=n$7(Be,"{{index}}",`${Ve.index}`),Be=n$7(Be,"{{page}}",`${Ve.index||1}`),Be}function fe(Ve){return`<div index="${Ve.index||0}" class="f-thumbs__slide ${Ve.class||""}">${Ve.html||""}</div>`}function pe(Ve=!1){var Ne;const Pe=ee==null?void 0:ee.getContainer();if(!ee||!Pe||ne||!de())return;const Be=((Ne=ce("Carousel"))===null||Ne===void 0?void 0:Ne.classes)||{};if(Be.container=Be.container||"f-thumbs",!ne){const Ae=Pe.nextElementSibling;Ae!=null&&Ae.classList.contains(Be.container)&&(ne=Ae)}if(!ne){ne=document.createElement("div");const Ae=ce("parentEl");Ae?Ae.insertAdjacentElement("beforeend",ne):Pe.insertAdjacentElement("afterend",ne)}s$a(ne,Be.container),s$a(ne,"f-thumbs"),s$a(ne,`is-${ce("type")}`),Ve&&s$a(ne,"is-hidden")}function _e(){if(!ne||!ve())return;ae=document.createElement("div"),s$a(ae,"f-thumbs__viewport");let Ve="";for(const Ne of me())typeof(Ne.html||"")=="string"&&(Ve+=fe(Ne));ae.innerHTML=Ve,ne.append(ae),ne.addEventListener("click",Ne=>{Ne.preventDefault();const Pe=Ne.target.closest("[index]"),Be=parseInt((Pe==null?void 0:Pe.getAttribute("index"))||"-1");ee&&Be>-1&&ee.goTo(Be)}),re=new IntersectionObserver(Ne=>{Ne.forEach(Pe=>{Pe.isIntersecting&&Pe.target instanceof HTMLImageElement&&(Pe.target.src=Pe.target.getAttribute("data-lazy-src")+"",Pe.target.removeAttribute("data-lazy-src"),re==null||re.unobserve(Pe.target))})},{root:ae,rootMargin:"100px"}),ne.querySelectorAll("[data-lazy-src]").forEach(Ne=>{re==null||re.observe(Ne)}),ee==null||ee.emit("thumbs:ready")}function ge(){var Ve;if(!a$5||!ee||!ne||ve()||te)return;const Ne=me();if(!Ne.length)return;const Pe=r$5({},{Sync:{target:ee},Lazyload:{preload:1},slides:Ne,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",slide:"f-thumbs__slide"},center:!0,fill:!ue(),infinite:!1,dragFree:!0,rtl:ee.getOptions().rtl||!1,slidesPerPage:Be=>{let Ae=0;return ue()&&(function(){if(!ue()||!ne)return;const xe=Ce=>ne&&parseFloat(getComputedStyle(ne).getPropertyValue("--f-thumb-"+Ce))||0;oe=xe("width"),ie=xe("clip-width")}(),Ae=4*(oe-ie)),Be&&Be.getTotalSlideDim()<=Be.getViewportDim()-Ae?1/0:1}},u$5.Carousel||{},ce("Carousel")||{});te=a$5(ne,Pe,{Sync:i$8,Lazyload:i$7}),te.on("ready",()=>{s$a(ne,"is-syncing"),ee==null||ee.emit("thumbs:ready"),ue()&&(ee==null||ee.on("render",Ee))}),te.on("destroy",()=>{ee==null||ee.emit("thumbs:destroy")}),te.init(),(Ve=te.getGestures())===null||Ve===void 0||Ve.on("start",()=>{le=!1}),te.on("click",(Be,Ae)=>{const xe=Ae.target;if(xe){const Ce=xe.matches("button")?xe:xe.firstElementChild;Ce&&Ce.matches("button")&&(Ae.preventDefault(),Ce.focus({preventScroll:!0}))}}),s$a(ee.getContainer(),"has-thumbs"),ze()}function ke(){de()&&ce("showOnStart")&&(pe(),_e())}function $e(){var Ve;de()&&(ge(),ee==null||ee.on("addSlide",Le),ee==null||ee.on("removeSlide",Me),ee==null||ee.on("click",De),ee==null||ee.on("refresh",Oe),(Ve=ee==null?void 0:ee.getGestures())===null||Ve===void 0||Ve.on("start",ye),Re(!0))}function ye(){var Ve,Ne;le=!0,!((Ve=document.activeElement)===null||Ve===void 0)&&Ve.closest(".f-thumbs")&&((Ne=document.activeElement)===null||Ne===void 0||Ne.blur())}function Ee(){var Ve,Ne;ne==null||ne.classList.toggle("is-syncing",(ee==null?void 0:ee.hasNavigated())===!1||((Ve=ee==null?void 0:ee.getTween())===null||Ve===void 0?void 0:Ve.isRunning())),ze(),!((Ne=ee==null?void 0:ee.getGestures())===null||Ne===void 0)&&Ne.isPointerDown()&&function(){if(!ue()||!ee||!te||!le)return;const Pe=te.getTween(),Be=te.getPages(),Ae=ee.getPageIndex()||0,xe=ee.getPageProgress()||0;if(!(ee&&Be&&Be[Ae]&&Pe))return;const Ce=Pe.isRunning()?Pe.getCurrentValues().pos:te.getPosition();if(Ce===void 0)return;let Fe=Be[Ae].pos+xe*(oe-ie);Fe=t$8(Be[0].pos,Fe,Be[Be.length-1].pos),Pe.from({pos:Ce}).to({pos:Fe}).start()}()}function Se(){le=!0,Re()}function Le(Ve,Ne){const Pe={html:be(Ne)};if(te)te.add(Pe,Ne.index);else if(ae){const Be=e$9(fe(Pe));if(Be){ae.append(Be);const Ae=Be.querySelector("img");Ae&&(re==null||re.observe(Ae))}}}function Me(Ve,Ne){var Pe;te?te.remove(Ne.index):ae&&((Pe=ae.querySelector(`[index="${Ne.index}"]`))===null||Pe===void 0||Pe.remove())}function De(Ve,Ne){var Pe;const Be=Ne.target;Ne.defaultPrevented||((Pe=Be==null?void 0:Be.dataset)===null||Pe===void 0?void 0:Pe.thumbsAction)!=="toggle"||(ne||(pe(!0),_e(),ge()),ne&&ne.classList.toggle("is-hidden"))}function Oe(){Re()}function Re(Ve=!1){if(!ee||!ae||!ve())return;const Ne=ee.getPageIndex();ae.querySelectorAll(".is-selected").forEach(Be=>{Be.classList.remove("is-selected")});const Pe=ae.querySelector(`[index="${Ne}"]`);if(Pe){Pe.classList.add("is-selected");const Be=ae.getBoundingClientRect(),Ae=Pe.getBoundingClientRect(),xe=Pe.offsetTop-ae.offsetTop-.5*Be.height+.5*Ae.height,Ce=Pe.scrollLeft-ae.scrollLeft-.5*Be.width+.5*Ae.width;ae.scrollTo({top:xe,left:Ce,behavior:Ve?"instant":"smooth"})}}function ze(){if(!ue()||!ee||!te)return;const Ve=(te==null?void 0:te.getSlides())||[];let Ne=-.5*oe;for(const Pe of Ve){const Be=Pe.el;if(!Be)continue;let Ae=ee.getPageProgress(Pe.index)||0;Ae=Math.max(-1,Math.min(1,Ae)),Ae>-1&&Ae<1&&(Ne+=.5*oe*(1-Math.abs(Ae))),Ae=Math.round(1e4*Ae)/1e4,Ne=Math.round(1e4*Ne)/1e4,Be.style.setProperty("--progress",`${Math.abs(Ae)}`),Be.style.setProperty("--shift",`${ee!=null&&ee.isRTL()?-1*Ne:Ne}px`),Ae>-1&&Ae<1&&(Ne+=.5*oe*(1-Math.abs(Ae)))}}return{init:function(Ve,Ne){a$5=Ne,ee=Ve,ee.on("ready",$e),ee.on("initSlides",ke),ee.on("change",Se)},destroy:function(){var Ve,Ne;ve()&&(ee==null||ee.emit("thumbs:destroy")),ee==null||ee.off("ready",$e),ee==null||ee.off("initSlides",ke),ee==null||ee.off("change",Se),ee==null||ee.off("render",Ee),ee==null||ee.off("addSlide",Le),ee==null||ee.off("click",De),ee==null||ee.off("refresh",Oe),(Ve=ee==null?void 0:ee.getGestures())===null||Ve===void 0||Ve.off("start",ye),(Ne=ee==null?void 0:ee.getContainer())===null||Ne===void 0||Ne.classList.remove("has-thumbs"),ee=void 0,te==null||te.destroy(),te=void 0,ne==null||ne.remove(),ne=void 0},getCarousel:function(){return te},getContainer:function(){return ne},getType:function(){return ce("type")},isEnabled:de}};/*! License details at fancyapps.com/license */const a$4={iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"}},i$5=()=>{let ee;function te(re,oe){let ie=oe.src;if(!t$9(ie))return;let le=oe.type;if(!le){if(le||(ie.charAt(0)==="#"?le="inline":ie.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.((a)?png|avif|gif|jp(g|eg)|pjp(eg)?|jfif|svg|webp|bmp|ico|tif(f)?)((\?|#).*)?$)/i)?le="image":ie.match(/\.(pdf)((\?|#).*)?$/i)?le="pdf":ie.match(/\.(html|php)((\?|#).*)?$/i)&&(le="iframe")),!le){const ce=ie.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i);ce&&(ie=`https://maps.google.${ce[1]}/?ll=${(ce[2]?ce[2]+"&z="+Math.floor(parseFloat(ce[3]))+(ce[4]?ce[4].replace(/^\//,"&"):""):ce[4]+"").replace(/\?/,"&")}&output=${ce[4]&&ce[4].indexOf("layer=c")>0?"svembed":"embed"}`,le="gmap")}if(!le){const ce=ie.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i);ce&&(ie=`https://maps.google.${ce[1]}/maps?q=${ce[2].replace("query=","q=").replace("api=1","")}&output=embed`,le="gmap")}oe.src=ie,oe.type=le}}function ne(re,oe){oe.type!=="iframe"&&oe.type!=="pdf"&&oe.type!=="gmap"||function(ie){if(!ee||!ie.el||!ie.src)return;const le=document.createElement("iframe");le.classList.add("f-iframe");for(const[de,ue]of Object.entries(function(){const ve=ee==null?void 0:ee.getOptions().Html;return t$7(ve)?Object.assign(Object.assign({},a$4),ve):a$4}().iframeAttr||{}))le.setAttribute(de,ue);le.onerror=()=>{ee&&ee.getState()===1&&ee.showError(ie,"{{IFRAME_ERROR}}")},le.src=ie.src;const ce=document.createElement("div");if(ce.classList.add("f-html"),ce.append(le),ie.width){let de=`${ie.width}`;de.match(/^\d+$/)&&(de+="px"),ce.style.maxWidth=`${de}`}if(ie.height){let de=`${ie.height}`;de.match(/^\d+$/)&&(de+="px"),ce.style.maxHeight=`${de}`}if(ie.aspectRatio){const de=ie.el.getBoundingClientRect();ce.style.aspectRatio=`${ie.aspectRatio}`,ce.style[de.width>de.height?"width":"height"]="auto",ce.style[de.width>de.height?"maxWidth":"maxHeight"]="none"}ie.contentEl=le,ie.htmlEl=ce,ie.el.classList.add("has-html"),ie.el.classList.add("has-iframe"),ie.el.classList.add(`has-${ie.type}`),ie.el.prepend(ce),ee.emit("contentReady",ie)}(oe)}function ae(re,oe){var ie,le;oe.type!=="iframe"&&oe.type!=="pdf"&&oe.type!=="gmap"||(ee==null||ee.hideError(oe),(ie=oe.contentEl)===null||ie===void 0||ie.remove(),oe.contentEl=void 0,(le=oe.htmlEl)===null||le===void 0||le.remove(),oe.htmlEl=void 0)}return{init:function(re){ee=re,ee.on("addSlide",te),ee.on("attachSlideEl",ne),ee.on("detachSlideEl",ae)},destroy:function(){ee==null||ee.off("addSlide",te),ee==null||ee.off("attachSlideEl",ne),ee==null||ee.off("detachSlideEl",ae),ee=void 0}}};/*! License details at fancyapps.com/license */const n$4=(ee,te={})=>{const ne=new URL(ee),ae=new URLSearchParams(ne.search),re=new URLSearchParams;for(const[le,ce]of[...ae,...Object.entries(te)]){let de=ce+"";if(le==="t"){let ue=de.match(/((\d*)m)?(\d*)s?/);ue&&re.set("start",60*parseInt(ue[2]||"0")+parseInt(ue[3]||"0")+"")}else re.set(le,de)}let oe=re+"",ie=ee.match(/#t=((.*)?\d+s)/);return ie&&(oe+=`#t=${ie[1]}`),oe},i$4={autoplay:!1,html5videoTpl:`<video class="f-html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
.fade-leave-to[data-v-5784ed69] {
|
|
108
108
|
opacity: 0;
|
|
109
109
|
}
|
|
110
|
-
`;styleInject(css_248z),script.__scopeId="data-v-5784ed69";var entry_esm=(()=>{const ee=script;return ee.install=te=>{te.component("Popper",ee)},ee})();const _hoisted_1$21={class:"sections-header"},_hoisted_2$1M={class:"conversation-tabs","aria-label":"Tipo de conversa"},_hoisted_3$1B=["aria-current","onClick"],_hoisted_4$1p={key:0,class:"tab-count"},_hoisted_5$1h={class:"search-field px-2 flex items-center gap-2 relative"},_hoisted_6$18=["value","placeholder"],_sfc_main$2e={__name:"sectionsHeader",props:{hasUnread:{type:Object,default:()=>({attendants:!1,groups:!1})},currentState:{type:String,default:""},searchQuery:{type:String,default:""}},emits:["update:currentState","update:searchQuery"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.currentState==="groups"),oe=e$b.computed(()=>ne.currentState==="attendants"),ie=e$b.computed(()=>re.value?"Pesquise entre os grupos...":oe.value?"Pesquise entre os atendentes...":"Pesquise..."),le=e$b.computed(()=>[{key:"attendants",label:"Atendentes"},{key:"groups",label:"Grupos"}].map(de=>{var ve;const ue=Number((ve=ne.hasUnread)==null?void 0:ve[de.key])||0;return ue>0?{...de,count:ue}:de})),ce=e$b.computed({get:()=>ne.currentState,set:de=>ae("update:currentState",de)});return(de,ue)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$21,[e$b.createElementVNode("nav",_hoisted_2$1M,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(le.value,ve=>(e$b.openBlock(),e$b.createElementBlock("button",{key:ve.key,type:"button",class:e$b.normalizeClass(["conversation-tab",{active:ce.value===ve.key}]),"aria-current":ce.value===ve.key?"page":void 0,onClick:me=>ce.value=ve.key},[e$b.createElementVNode("span",null,e$b.toDisplayString(ve.label),1),ve.count?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$1p,e$b.toDisplayString(ve.count),1)):e$b.createCommentVNode("",!0)],10,_hoisted_3$1B))),128))]),e$b.createElementVNode("div",_hoisted_5$1h,[ue[3]||(ue[3]=e$b.createElementVNode("svg",{class:"search-icon size-4 absolute top-1/2 -translate-y-1/2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"m21 21-3.5-3.5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"})],-1)),e$b.createElementVNode("input",{value:ee.searchQuery,onInput:ue[0]||(ue[0]=ve=>ae("update:searchQuery",ve.target.value)),class:"search-input bg-base-300 text-base-content w-full text-sm",placeholder:ie.value},null,40,_hoisted_6$18),ee.searchQuery?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,type:"button",class:"clear-search","aria-label":"Limpar busca",onClick:ue[1]||(ue[1]=ve=>ae("update:searchQuery",""))},[...ue[2]||(ue[2]=[e$b.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[e$b.createElementVNode("path",{d:"m7 7 10 10M17 7 7 17",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])])):e$b.createCommentVNode("",!0)])]))}},SectionsHeader=_export_sfc$1(_sfc_main$2e,[["__scopeId","data-v-6bad30c7"]]),_hoisted_1$20=["title"],_hoisted_2$1L={key:0,class:"legendary-bg","aria-hidden":"true"},_hoisted_3$1A={key:1,class:"secret-bg","aria-hidden":"true"},_hoisted_4$1o={key:2,class:"relative z-10 leading-none"},_hoisted_5$1g={key:3,class:"relative z-10 size-1/2 text-base-content/35",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","aria-hidden":"true"},_sfc_main$2d={__name:"AchievementBadge",props:{achievement:{type:Object,default:null},size:{type:String,default:"md",validator:ee=>["sm","md","lg"].includes(ee)},showLabel:{type:Boolean,default:!1},secretHidden:{type:Boolean,default:!1}},setup(ee){const te=ee,ne={sm:{token:"size-8",icon:"text-sm",label:"text-[11px]"},md:{token:"size-9",icon:"text-lg",label:"text-xs"},lg:{token:"size-11",icon:"text-xl",label:"text-[13px]"}},ae=e$b.computed(()=>ne[te.size]||ne.md),re=e$b.computed(()=>{var me;return((me=te.achievement)==null?void 0:me.rarity)||null}),oe=e$b.computed(()=>re.value==="legendary"),ie=e$b.computed(()=>{var me;return((me=te.achievement)==null?void 0:me.rarity)==="secret"}),le=e$b.computed(()=>{var me;return((me=RARITIES[re.value])==null?void 0:me.badge)||"text-base-content/35"}),ce=e$b.computed(()=>{var me;return te.secretHidden?"?":((me=te.achievement)==null?void 0:me.icon)||""}),de=e$b.computed(()=>!!ce.value),ue=e$b.computed(()=>{var me;return((me=te.achievement)==null?void 0:me.name)||"Nenhuma"}),ve=e$b.computed(()=>{var me;return(me=te.achievement)!=null&&me.icon?`Conquista: ${te.achievement.name}`:"Sem conquista"});return(me,be)=>(e$b.openBlock(),e$b.createElementBlock("span",{class:e$b.normalizeClass(["inline-flex min-w-0 items-center",ee.showLabel?"flex-col justify-center gap-1.5 text-center":""]),title:ve.value},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["badge-shell relative inline-grid shrink-0 place-items-center p-px",ae.value.token])},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["badge-core relative grid size-full place-items-center overflow-hidden",[le.value,ae.value.icon,ie.value?"secret-core":""]])},[oe.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$1L)):e$b.createCommentVNode("",!0),ie.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$1A)):e$b.createCommentVNode("",!0),de.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$1o,e$b.toDisplayString(ce.value),1)):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_5$1g,[...be[0]||(be[0]=[e$b.createElementVNode("path",{"stroke-linecap":"round",d:"M6 12h12"},null,-1)])]))],2),be[1]||(be[1]=e$b.createElementVNode("span",{class:"badge-glint pointer-events-none absolute inset-[14%]","aria-hidden":"true"},null,-1))],2),ee.showLabel?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["max-w-full truncate text-center font-medium leading-tight text-base-content/85",ae.value.label])},e$b.toDisplayString(ue.value),3)):e$b.createCommentVNode("",!0)],10,_hoisted_1$20))}},AchievementBadge=_export_sfc$1(_sfc_main$2d,[["__scopeId","data-v-8128142d"]]),_sfc_main$2c={__name:"GameAchievementToken",props:{achievement:{type:Object,default:null},size:{type:String,default:"md",validator:ee=>["sm","md","lg"].includes(ee)},showLabel:{type:Boolean,default:!1}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createBlock(AchievementBadge,{achievement:ee.achievement,size:ee.size,"show-label":ee.showLabel},null,8,["achievement","size","show-label"]))}},_hoisted_1$1$=["title"],_hoisted_2$1K={class:"truncate pr-0.5"},_sfc_main$2b={__name:"GameTitle",props:{title:{type:Object,default:null},size:{type:String,default:"md",validator:ee=>["sm","md","lg","xl"].includes(ee)},align:{type:String,default:"center",validator:ee=>["center","start"].includes(ee)},tooltip:{type:Boolean,default:!0}},setup(ee){const te=ee,ne={sm:"text-xs",md:"text-[13px]",lg:"text-sm",xl:"text-[15px]"},ae=e$b.computed(()=>te.align==="start"?"justify-start text-left":"justify-center text-center");return(re,oe)=>ee.title?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["game-title inline-flex max-w-full font-semibold italic leading-snug tracking-[0.02em] text-primary",[ne[te.size],ae.value]]),title:ee.tooltip?`Título: ${ee.title.name}`:void 0},[e$b.createElementVNode("span",_hoisted_2$1K,e$b.toDisplayString(ee.title.name),1)],10,_hoisted_1$1$)):e$b.createCommentVNode("",!0)}},_hoisted_1$1_={key:0,class:"avatar-halo pointer-events-none absolute -inset-1.5 rounded-full bg-primary/25 blur-md","aria-hidden":"true"},_hoisted_2$1J={key:1,class:"edit-badge absolute -right-0.5 -top-0.5 z-10 grid size-6 place-items-center rounded-full text-white shadow-md transition group-hover:scale-110","aria-hidden":"true"},_hoisted_3$1z={class:"relative min-w-0 flex-1"},_hoisted_4$1n={class:"mb-1 flex items-center justify-between"},_hoisted_5$1f={class:"text-[11px] font-bold tabular-nums text-base-content/60"},_hoisted_6$17={class:"mt-1.5 text-xs text-base-content/70"},_hoisted_7$11={class:"font-bold text-base-content"},_hoisted_8$W={class:"font-bold text-base-content"},_hoisted_9$S={class:"min-w-0 flex-1"},_hoisted_10$N={class:"block truncate text-sm font-bold text-base-content"},_hoisted_11$H={class:"relative shrink-0"},_hoisted_12$D={key:0,class:"halo pointer-events-none absolute -inset-2 rounded-full bg-primary/20 blur-md","aria-hidden":"true"},_hoisted_13$y={key:0,class:"edit-scrim absolute inset-0 flex flex-col items-center justify-center gap-0.5 rounded-full bg-base-300/75 opacity-0 backdrop-blur-[2px] transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100","aria-hidden":"true"},_hoisted_14$x={key:0,class:"inline-flex min-w-0 items-center gap-2"},_hoisted_15$u={class:"max-w-48 truncate text-xs font-medium text-base-content/80"},_hoisted_16$r={key:2,class:"mt-1.5 flex w-full min-w-0 items-center gap-2"},_hoisted_17$k={class:"shrink-0 text-[10px] font-bold tabular-nums text-base-content/55"},_hoisted_18$k={key:0,class:"mt-1"},_sfc_main$2a={__name:"GameIdentity",props:{name:{type:String,required:!0},photo:{type:String,default:""},level:{type:Number,default:null},variant:{type:String,default:"hero",validator:ee=>["hero","panel","compact","card"].includes(ee)},editable:{type:Boolean,default:!1},embedded:{type:Boolean,default:!1},avatarSize:{type:String,default:null,validator:ee=>ee==null||["xs","sm","md","lg","xl","preview"].includes(ee)},effectLevel:{type:String,default:"border",validator:ee=>["full","compact","border"].includes(ee)},frame:{type:Object,default:null},title:{type:Object,default:null},achievement:{type:Object,default:null},progress:{type:Object,default:null},dense:{type:Boolean,default:!1}},emits:["edit"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.variant==="hero"),oe=e$b.computed(()=>ne.variant==="panel"),ie=e$b.computed(()=>ne.variant==="compact"),le=e$b.computed(()=>ne.variant==="card"),ce=e$b.computed(()=>ne.dense&&le.value),de=e$b.computed(()=>ne.avatarSize||(ce.value?"md":"lg")),ue=e$b.computed(()=>ne.avatarSize||(re.value?"lg":oe.value?"xl":"md")),ve=e$b.computed(()=>ne.title||null),me=e$b.computed(()=>{var Pe;return(Pe=ne.achievement)!=null&&Pe.icon?ne.achievement:null}),be=e$b.computed(()=>ne.editable&&!le.value),fe=e$b.computed(()=>{var Be,Ae;const Pe=(Ae=(Be=resolveFrameVisual(ne.frame))==null?void 0:Be.ring)==null?void 0:Ae.colors;return{"--sm-profile-frame-primary":(Pe==null?void 0:Pe[0])||"rgb(var(--primary-rgb))","--sm-profile-frame-secondary":(Pe==null?void 0:Pe[1])||"rgb(var(--primary-rgb))","--sm-profile-frame-accent":(Pe==null?void 0:Pe[2])||"rgb(var(--primary-rgb))"}}),pe=e$b.computed(()=>{const Pe=ne.progress;return!!Pe&&Number(Pe.xp_for_next)>0}),_e=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.xp_into_level)??0)}),ge=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.xp_for_next)??0)}),ke=e$b.computed(()=>Math.max(0,ge.value-_e.value)),$e=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.level)??ne.level??1)+1}),ye=e$b.computed(()=>{const Pe=ne.progress;if(!Pe)return 0;const Be=Number.isFinite(Number(Pe.progress_pct))?Number(Pe.progress_pct):_e.value/(ge.value||1)*100;return Math.max(0,Math.min(100,Math.round(Be)))}),Ee=Pe=>Number(Pe||0).toLocaleString("pt-BR"),Se=e$b.ref(!1),Le=e$b.ref(!1);let Me=null,De=null;const Oe=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.level)??ne.level??0)});function Re(Pe,Be,Ae){return clearTimeout(Be),Pe.value=!1,e$b.nextTick(()=>{Pe.value=!0}),setTimeout(()=>{Pe.value=!1},Ae)}e$b.watch([ye,Oe],([Pe,Be],[Ae,xe])=>{var Ce;pe.value&&((Ce=window.matchMedia)!=null&&Ce.call(window,"(prefers-reduced-motion: reduce)").matches||(Be>xe&&xe>0?De=Re(Le,De,1e3):Pe>Ae&&(Me=Re(Se,Me,760))))}),e$b.onBeforeUnmount(()=>{clearTimeout(Me),clearTimeout(De)});function ze(Pe){const Be=Pe.trim(),Ae=Be.match(/^#([0-9a-fA-F]{3,8})$/);if(Ae){let Ce=Ae[1];return(Ce.length===3||Ce.length===4)&&(Ce=Ce.split("").map(Fe=>Fe+Fe).join("")),{r:parseInt(Ce.slice(0,2),16),g:parseInt(Ce.slice(2,4),16),b:parseInt(Ce.slice(4,6),16)}}const xe=Be.match(/^rgba?\(([^)]+)\)$/i);if(xe){const Ce=xe[1].split(/[\s,/]+/).map(Number).filter(Fe=>!Number.isNaN(Fe));if(Ce.length>=3)return{r:Ce[0],g:Ce[1],b:Ce[2]}}return null}function Ve(Pe){if(!Pe||typeof Pe!="string")return null;const Be=Pe.match(/#[0-9a-fA-F]{3,8}|rgba?\([^)]*\)/gi);if(!Be)return null;let Ae=null,xe=-1;for(const Ce of Be){const Fe=ze(Ce);if(!Fe)continue;const Ie=Math.max(Fe.r,Fe.g,Fe.b),qe=Math.min(Fe.r,Fe.g,Fe.b),Ge=(Ie-qe)*2+Ie;Ge>xe&&(xe=Ge,Ae=Fe)}return Ae?`rgb(${Ae.r} ${Ae.g} ${Ae.b})`:null}const Ne=e$b.computed(()=>{var Be,Ae,xe,Ce,Fe;const Pe=((Ae=(Be=ne.frame)==null?void 0:Be.visual)==null?void 0:Ae.css)||((xe=ne.frame)==null?void 0:xe.css)||((Ce=ne.frame)==null?void 0:Ce.background)||((Fe=ne.frame)==null?void 0:Fe.gradient)||null;return Ve(Pe)||"rgb(var(--primary-rgb))"});return(Pe,Be)=>le.value?(e$b.openBlock(),e$b.createElementBlock("article",{key:0,class:e$b.normalizeClass(["game-identity-card plate relative text-left",[ee.embedded?"game-identity-card--embedded":"p-4",ce.value?"game-identity-card--dense":""]]),style:e$b.normalizeStyle(fe.value)},[Be[7]||(Be[7]=e$b.createElementVNode("div",{class:"card-glow pointer-events-none absolute -left-8 -top-10 size-32 rounded-full","aria-hidden":"true"},null,-1)),e$b.createElementVNode("div",{class:e$b.normalizeClass(["relative flex min-w-0 items-center",ce.value?"gap-3":"gap-4"])},[(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(ee.editable?"button":"div"),{type:ee.editable?"button":void 0,class:"edit-avatar group relative block shrink-0 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-base-300","aria-label":ee.editable?"Personalizar identidade":void 0,title:ee.editable?"Personalizar identidade":void 0,onClick:Be[0]||(Be[0]=Ae=>ee.editable&&ae("edit"))},{default:e$b.withCtx(()=>[ee.editable?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_1$1_)):e$b.createCommentVNode("",!0),e$b.createVNode(Avatar,{name:ee.name,photo:ee.photo,level:ee.level,frame:ee.frame,size:de.value,"effect-level":ee.effectLevel},null,8,["name","photo","level","frame","size","effect-level"]),ee.editable?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$1J,[...Be[2]||(Be[2]=[e$b.createElementVNode("svg",{class:"size-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M14 4.182A4.136 4.136 0 0 1 16.9 3c1.087 0 2.13.425 2.899 1.182A4.01 4.01 0 0 1 21 7.037c0 1.068-.43 2.092-1.194 2.849L18.5 11.214l-5.8-5.71 1.287-1.31.012-.012Zm-2.717 2.763L6.186 12.13l2.175 2.141 5.063-5.218-2.141-2.108Zm-6.25 6.886-1.98 5.849a.992.992 0 0 0 .245 1.026 1.03 1.03 0 0 0 1.043.242L10.282 19l-5.25-5.168Zm6.954 4.01 5.096-5.186-2.218-2.183-5.063 5.218 2.185 2.15Z","clip-rule":"evenodd"})],-1)])])):e$b.createCommentVNode("",!0)]),_:1},8,["type","aria-label","title"])),e$b.createElementVNode("div",_hoisted_3$1z,[e$b.createElementVNode("p",{class:e$b.normalizeClass(["truncate font-extrabold leading-tight tracking-tight",ce.value?"text-lg":"text-xl"])},e$b.toDisplayString(ee.name),3),ve.value?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:0,title:ve.value,size:ce.value?"md":"lg",align:"start",class:"mt-0.5 text-start"},null,8,["title","size"])):e$b.createCommentVNode("",!0)])],2),pe.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["relative",ce.value?"mt-3":"mt-4"])},[e$b.createElementVNode("div",_hoisted_4$1n,[Be[3]||(Be[3]=e$b.createElementVNode("span",{class:"text-[10px] font-bold uppercase tracking-wider text-base-content/45"}," Progresso de nível ",-1)),e$b.createElementVNode("span",_hoisted_5$1f,e$b.toDisplayString(Ee(_e.value))+" / "+e$b.toDisplayString(Ee(ge.value))+" XP ",1)]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-track",{"xp-track--burst":Le.value}])},[e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-fill smplay-blocks",{"xp-fill--gain":Se.value}]),style:e$b.normalizeStyle({width:`${ye.value}%`,background:Ne.value})},null,6),Le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"xp-burst",style:e$b.normalizeStyle({background:Ne.value}),"aria-hidden":"true"},null,4)):e$b.createCommentVNode("",!0)],2),e$b.createElementVNode("p",_hoisted_6$17,[Be[4]||(Be[4]=e$b.createTextVNode(" Faltam ",-1)),e$b.createElementVNode("strong",_hoisted_7$11,e$b.toDisplayString(Ee(ke.value))+" XP",1),Be[5]||(Be[5]=e$b.createTextVNode(" pro ",-1)),e$b.createElementVNode("strong",_hoisted_8$W,"Nível "+e$b.toDisplayString($e.value),1)])],2)):e$b.createCommentVNode("",!0),me.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["achievement-strip relative flex min-w-0 items-center gap-3",ce.value?"mt-3 p-2":"mt-4 p-2.5"])},[e$b.createVNode(_sfc_main$2c,{achievement:me.value,size:"sm"},null,8,["achievement"]),e$b.createElementVNode("span",_hoisted_9$S,[Be[6]||(Be[6]=e$b.createElementVNode("span",{class:"block text-[10px] font-bold uppercase tracking-wider text-primary/70"}," Conquista em destaque ",-1)),e$b.createElementVNode("span",_hoisted_10$N,e$b.toDisplayString(me.value.name),1)])],2)):e$b.createCommentVNode("",!0),Pe.$slots.footer?(e$b.openBlock(),e$b.createElementBlock("div",{key:2,class:e$b.normalizeClass(["relative",ce.value?"mt-2.5":"mt-3"])},[e$b.renderSlot(Pe.$slots,"footer",{},void 0,!0)],2)):e$b.createCommentVNode("",!0)],6)):(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["game-identity flex min-w-0",re.value?"w-full items-center gap-4 text-left sm:gap-5":oe.value?"flex-col items-center gap-4 text-center":"w-full items-center gap-3 text-left"])},[e$b.createElementVNode("div",_hoisted_11$H,[re.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$D)):e$b.createCommentVNode("",!0),(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(be.value?"button":"div"),{type:be.value?"button":void 0,class:"group relative block rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-base-300","aria-label":be.value?"Personalizar identidade":void 0,title:be.value?"Personalizar identidade":void 0,onClick:Be[1]||(Be[1]=Ae=>be.value&&ae("edit"))},{default:e$b.withCtx(()=>[e$b.createVNode(Avatar,{name:ee.name,photo:ee.photo,level:ee.level,size:ue.value,frame:ee.frame,"effect-level":ee.effectLevel},null,8,["name","photo","level","size","frame","effect-level"]),be.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_13$y,[...Be[8]||(Be[8]=[e$b.createElementVNode("svg",{class:"size-5 text-base-content",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.86 4.49a1.9 1.9 0 1 1 2.7 2.68L8.4 18.33l-3.65.97.97-3.65L16.86 4.49Z"})],-1),e$b.createElementVNode("span",{class:"text-[10px] font-semibold uppercase tracking-wide text-base-content/80"},"Editar",-1)])])):e$b.createCommentVNode("",!0)]),_:1},8,["type","aria-label","title"]))]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["flex min-w-0 flex-col",oe.value?"max-w-full items-center":"min-w-0 flex-1 items-start"])},[e$b.createElementVNode("p",{class:e$b.normalizeClass(["max-w-full truncate leading-tight",re.value?"text-2xl font-bold tracking-tight":"text-base font-semibold"])},e$b.toDisplayString(ee.name),3),ve.value?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:0,title:ve.value,size:re.value?"lg":"md",class:"mt-1"},null,8,["title","size"])):e$b.createCommentVNode("",!0),me.value||Pe.$slots.chips?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["flex flex-wrap items-center gap-2",[ie.value?"mt-1.5":"mt-3",oe.value?"justify-center":"justify-start"]])},[me.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_14$x,[e$b.createVNode(_sfc_main$2c,{achievement:me.value,size:"sm"},null,8,["achievement"]),e$b.createElementVNode("span",_hoisted_15$u,e$b.toDisplayString(me.value.name),1)])):e$b.createCommentVNode("",!0),e$b.renderSlot(Pe.$slots,"chips",{},void 0,!0)],2)):e$b.createCommentVNode("",!0),ie.value&&pe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_16$r,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-track xp-track--slim min-w-0 flex-1",{"xp-track--burst":Le.value}])},[e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-fill smplay-blocks",{"xp-fill--gain":Se.value}]),style:e$b.normalizeStyle({width:`${ye.value}%`,background:Ne.value})},null,6),Le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"xp-burst",style:e$b.normalizeStyle({background:Ne.value}),"aria-hidden":"true"},null,4)):e$b.createCommentVNode("",!0)],2),e$b.createElementVNode("span",_hoisted_17$k,e$b.toDisplayString(Ee(ke.value))+" XP → Nv "+e$b.toDisplayString($e.value),1)])):e$b.createCommentVNode("",!0)],2),oe.value&&Pe.$slots.default?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$k,[e$b.renderSlot(Pe.$slots,"default",{},void 0,!0)])):e$b.createCommentVNode("",!0)],2))}},GameIdentity=_export_sfc$1(_sfc_main$2a,[["__scopeId","data-v-8958acce"]]),_hoisted_1$1Z={key:1,class:"sm-game-details"},_hoisted_2$1I={class:"sm-game-name"},_hoisted_3$1y={class:"sm-game-meta"},_hoisted_4$1m=["title"],_hoisted_5$1e={class:"sm-game-achievement-name"},_hoisted_6$16={key:2,class:"sm-game-fallback"},_sfc_main$29={__name:"AttendantGameIdentity",props:{attendant:{type:Object,default:()=>({})},variant:{type:String,default:"list",validator:ee=>["avatar","list","header","message"].includes(ee)},showLevel:{type:Boolean,default:!0},showAvatar:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showAchievement:{type:Boolean,default:!0},fallbackMeta:{type:String,default:""},frame:{type:Object,default:void 0},title:{type:Object,default:void 0},hoverPreview:{type:Boolean,default:!1},hoverDelay:{type:Number,default:420},avatarSize:{type:String,default:"auto",validator:ee=>["auto","xs","sm","md","lg"].includes(ee)},effectLevel:{type:String,default:"border",validator:ee=>["full","compact","border"].includes(ee)},isGroup:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>resolveAttendantGamification(te.attendant)),ae=e$b.computed(()=>te.frame!==void 0?te.frame:ne.value.frame),re=e$b.computed(()=>te.title!==void 0?te.title:ne.value.title),oe=e$b.computed(()=>te.avatarSize!=="auto"?te.avatarSize:te.variant==="avatar"?"xs":["list","message"].includes(te.variant)?"sm":"md"),ie=e$b.computed(()=>te.variant!=="avatar"),le=e$b.ref(null),ce=e$b.ref(!1),de=e$b.ref({}),ue=e$b.ref("top");let ve=null,me=null;function be(){te.hoverPreview&&(window.clearTimeout(me),!ce.value&&(window.clearTimeout(ve),ve=window.setTimeout(()=>{ve=null,fe()},Math.max(0,te.hoverDelay))))}function fe(){var Oe;if(!te.hoverPreview)return;window.clearTimeout(me);const ge=(Oe=le.value)==null?void 0:Oe.getBoundingClientRect();if(!ge)return;const ke=8,$e=Math.min(360,window.innerWidth-ke*2),ye=180,Ee=7,Se=window.innerWidth-$e-ke,Le=Math.max(ke,Math.min(ge.left,Se)),Me=ge.top>=ye+Ee+ke;ue.value=Me?"top":"bottom";const De={left:`${Le}px`,width:`${$e}px`};de.value=Me?{...De,bottom:`${window.innerHeight-ge.top+Ee}px`}:{...De,top:`${ge.bottom+Ee}px`},ce.value=!0}function pe(){window.clearTimeout(ve),ve=null,ce.value&&(window.clearTimeout(me),me=window.setTimeout(()=>ce.value=!1,120))}function _e(){window.clearTimeout(ve),window.clearTimeout(me)}return e$b.onBeforeUnmount(()=>{window.clearTimeout(ve),window.clearTimeout(me)}),(ge,ke)=>{var $e,ye,Ee,Se,Le,Me,De;return e$b.openBlock(),e$b.createElementBlock("div",{ref_key:"triggerRef",ref:le,class:e$b.normalizeClass(["sm-game-identity",`sm-game-identity--${ee.variant}`]),onMouseenter:be,onMouseleave:pe},[ee.showAvatar?(e$b.openBlock(),e$b.createBlock(Avatar,{key:0,name:(($e=ee.attendant)==null?void 0:$e.name)||"Atendente",photo:((ye=ee.attendant)==null?void 0:ye.photo)||"",level:ne.value.level,frame:ae.value,"show-level":ee.showLevel,size:oe.value,"effect-level":ee.effectLevel},null,8,["name","photo","level","frame","show-level","size","effect-level"])):e$b.createCommentVNode("",!0),ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1Z,[e$b.createElementVNode("span",_hoisted_2$1I,e$b.toDisplayString(((Ee=ee.attendant)==null?void 0:Ee.name)||"Atendente"),1),e$b.createElementVNode("span",_hoisted_3$1y,[ee.showTitle&&((Se=re.value)!=null&&Se.name)?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:0,title:re.value,size:"sm",class:"sm-game-title justify-start text-left text-primary"},null,8,["title"])):e$b.createCommentVNode("",!0),ee.showAchievement&&((Le=ne.value.achievement)!=null&&Le.name)?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"sm-game-achievement",title:ne.value.achievement.name},[e$b.createVNode(_sfc_main$2c,{achievement:ne.value.achievement,size:"sm"},null,8,["achievement"]),e$b.createElementVNode("span",_hoisted_5$1e,e$b.toDisplayString(ne.value.achievement.name),1)],8,_hoisted_4$1m)):e$b.createCommentVNode("",!0),ee.fallbackMeta&&!(ee.showTitle&&((Me=re.value)!=null&&Me.name))&&!(ee.showAchievement&&((De=ne.value.achievement)!=null&&De.name))?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$16,e$b.toDisplayString(ee.fallbackMeta),1)):e$b.createCommentVNode("",!0)])])):e$b.createCommentVNode("",!0),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(e$b.Transition,{name:"sm-profile-preview"},{default:e$b.withCtx(()=>{var Oe,Re;return[ce.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["sm-profile-preview",`sm-profile-preview--${ue.value}`]),style:e$b.normalizeStyle(de.value),onMouseenter:_e,onMouseleave:pe},[e$b.createVNode(GameIdentity,{variant:"card",embedded:"",name:((Oe=ee.attendant)==null?void 0:Oe.name)||"Atendente",photo:((Re=ee.attendant)==null?void 0:Re.photo)||"",level:ne.value.level,frame:ae.value,title:re.value,achievement:ne.value.achievement,"avatar-size":"preview","effect-level":"compact"},null,8,["name","photo","level","frame","title","achievement"])],38)):e$b.createCommentVNode("",!0)]}),_:1})]))],34)}}},AttendantGameIdentity=_export_sfc$1(_sfc_main$29,[["__scopeId","data-v-be8f6255"]]),PRESENCE={Online:{key:"online",label:"Online",color:"rgb(var(--success-rgb))"},Busy:{key:"busy",label:"Ocupado",color:"rgb(var(--error-rgb))"},Away:{key:"away",label:"Ausente",color:"rgb(var(--warning-rgb))"},Offline:{key:"offline",label:"Offline",color:"rgb(148 163 184)"}};function resolvePresence(ee){return PRESENCE[ee]||PRESENCE.Offline}function normalizeUnreadValue(ee,te){return typeof ee=="number"?ee:ee&&typeof ee=="object"&&te?Number(ee[te])||0:Number(ee)||0}function shouldIncrementUnread({isChatVisible:ee,selectedChannelId:te,messageChannelId:ne,senderId:ae,currentAttendantId:re}){return re&&ae===re?!1:!ee||!(!!te&&te===ne)}function getConversationMessages(ee){var te;return ee?ee.is_group?((te=ee.chat_info)==null?void 0:te.messages)||[]:ee.messages||[]:[]}const EMOJI_ONLY_PATTERN=new RegExp("^(?:\\p{Extended_Pictographic}|\\p{Emoji_Modifier}|\\p{Regional_Indicator}|\\uFE0F|\\u200D|\\s)+$","u");function countGraphemes$1(ee){if(typeof Intl<"u"&&typeof Intl.Segmenter=="function"){const te=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(te.segment(ee)).length}return Array.from(ee).length}function isEmojiOnlyText(ee,te=3){const ne=String(ee??"").trim();return!ne||!EMOJI_ONLY_PATTERN.test(ne)?!1:countGraphemes$1(ne.replace(/\s/g,""))<=te}const RUN_BREAK_MS=12e4;function isRunStart(ee,te){var ie,le,ce;const ne=ee==null?void 0:ee[te];if(!((ie=ne==null?void 0:ne.sender)!=null&&ie.id)||((le=ne.content)==null?void 0:le.type)==="system")return!1;const ae=ee[te-1];if(!((ce=ae==null?void 0:ae.sender)!=null&&ce.id)||ae.sender.id!==ne.sender.id)return!0;const re=new Date(ne.created_at).getTime(),oe=new Date(ae.created_at).getTime();return!Number.isFinite(re)||!Number.isFinite(oe)||re-oe>RUN_BREAK_MS}function groupMessagesByDay(ee=[],te={}){const{formatLabel:ne=()=>"",firstUnreadId:ae=null}=te,re=[];return ee.forEach((oe,ie)=>{var ve,me,be;const le=new Date(oe.created_at),ce=Number.isFinite(le.getTime())?le.toDateString():`no-date-${ie}`,de={msg:oe,index:ie,isLast:ie===ee.length-1,showSender:isRunStart(ee,ie),isFirstUnread:!!ae&&oe.id===ae,isEmojiOnly:!((me=(ve=oe.content)==null?void 0:ve.media)!=null&&me.data)&&isEmojiOnlyText((be=oe.content)==null?void 0:be.content)},ue=re[re.length-1];if((ue==null?void 0:ue.key)===ce){ue.items.push(de);return}re.push({key:ce,label:ne(oe.created_at),items:[de]})}),re}const URL_PATTERN=/(?:https?:\/\/|www\.)[^\s<]+/gi,TRAILING_PUNCTUATION=/[.,;:!?)\]}]+$/;function linkifyText(ee){const te=String(ee??"");if(!te)return[];const ne=[];let ae=0,re;for(URL_PATTERN.lastIndex=0;(re=URL_PATTERN.exec(te))!==null;){const oe=re[0].replace(TRAILING_PUNCTUATION,"");oe&&(re.index>ae&&ne.push({type:"text",value:te.slice(ae,re.index)}),ne.push({type:"link",value:oe,href:oe.toLowerCase().startsWith("www.")?`https://${oe}`:oe}),ae=re.index+oe.length,URL_PATTERN.lastIndex=ae)}return ae<te.length&&ne.push({type:"text",value:te.slice(ae)}),ne}const _hoisted_1$1Y=["aria-busy"],_hoisted_2$1H={key:1,class:"empty-state"},_hoisted_3$1x={class:"empty-state-icon"},_hoisted_4$1l={key:0,class:"size-6","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_5$1d={key:1,class:"size-6","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_6$15={class:"empty-copy"},_hoisted_7$10=["onClick","aria-current"],_hoisted_8$V={key:0,class:"game-conversation-identity"},_hoisted_9$R=["title"],_hoisted_10$M={class:"conversation-avatar"},_hoisted_11$G=["title"],_hoisted_12$C={class:"conversation-copy"},_hoisted_13$x={class:"conversation-name"},_hoisted_14$w={key:2,class:"message-indicator"},_hoisted_15$t=["title"],_hoisted_16$q={key:2,class:"loading-more","aria-label":"Carregando mais grupos"},_sfc_main$28={__name:"mountListForType",props:{content:{type:Array,default:()=>[]},mode:{type:String,default:!1},loader:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},currentAttendantId:{type:[String,Number],default:null}},emits:["load-more"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.mode==="groups"),oe=e$b.inject("useChat"),ie=e$b.inject("selectedConversation",null),le=e$b.inject("smPlayEnabled",e$b.computed(()=>!1)),ce=ge=>{typeof oe.selectChatToOpen=="function"&&oe.selectChatToOpen(ge)},de=()=>{var ge;return(ge=oe.openCreateOrEdit)==null?void 0:ge.call(oe,"create")},ue=ge=>{var Ee,Se;const ke=ie==null?void 0:ie.value;if(!ke)return!1;const $e=((Ee=ke.internal_chat)==null?void 0:Ee.channel_id)||ke.id,ye=((Se=ge.internal_chat)==null?void 0:Se.channel_id)||ge.id;return $e===ye},ve=ge=>{const ke=ge.currentTarget;!ke||ne.loadingMore||ke.scrollHeight-ke.scrollTop-ke.clientHeight<96&&ae("load-more")},me=ge=>{var ke;return normalizeUnreadValue((ke=ge==null?void 0:ge.internal_chat)==null?void 0:ke.unread,ne.currentAttendantId)},be=ge=>resolvePresence(ge==null?void 0:ge.login_status),fe=ge=>{var $e,ye;const ke=(($e=ge==null?void 0:ge.internal_chat)==null?void 0:$e.channel_id)||(ge==null?void 0:ge.id);return((ye=oe==null?void 0:oe.getDraft)==null?void 0:ye.call(oe,ke))||""},pe=ge=>!!fe(ge)&&!ue(ge),_e=ge=>{var ke;if(pe(ge))return`Rascunho: ${fe(ge)}`;if(re.value){const $e=((ke=ge==null?void 0:ge.participants)==null?void 0:ke.length)||0;return $e===1?"1 membro":`${$e} membros`}return be(ge).label};return(ge,ke)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("ul",{class:e$b.normalizeClass(["attendants-list hide-scrollbar bg-base-300",{"has-floating-action":re.value}]),"aria-busy":ee.loader||ee.loadingMore,onScrollPassive:ve},[ee.loader&&ee.content.length===0?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},e$b.renderList(6,$e=>e$b.createElementVNode("li",{key:`conversation-skeleton-${$e}`,class:"list-entry"},[...ke[0]||(ke[0]=[e$b.createElementVNode("div",{class:"conversation-skeleton","aria-hidden":"true"},[e$b.createElementVNode("span",{class:"skeleton-avatar"}),e$b.createElementVNode("span",{class:"skeleton-copy"},[e$b.createElementVNode("i"),e$b.createElementVNode("i")])],-1)])])),64)):ee.content.length===0?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_2$1H,[e$b.createElementVNode("div",_hoisted_3$1x,[re.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_4$1l,[...ke[1]||(ke[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 6a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm-1.5 8a4 4 0 0 0-4 4 2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-3Zm6.82-3.096a5.51 5.51 0 0 0-2.797-6.293 3.5 3.5 0 1 1 2.796 6.292ZM19.5 18h.5a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-1.1a5.503 5.503 0 0 1-.471.762A5.998 5.998 0 0 1 19.5 18ZM4 7.5a3.5 3.5 0 0 1 5.477-2.889 5.5 5.5 0 0 0-2.796 6.293A3.501 3.501 0 0 1 4 7.5ZM7.1 12H6a4 4 0 0 0-4 4 2 2 0 0 0 2 2h.5a5.998 5.998 0 0 1 3.071-5.238A5.505 5.505 0 0 1 7.1 12Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_5$1d,[...ke[2]||(ke[2]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-4Z","clip-rule":"evenodd"},null,-1)])]))]),e$b.createElementVNode("p",_hoisted_6$15,e$b.toDisplayString(re.value?"não há grupos disponíveis":"não há atendentes disponíveis"),1)])):e$b.createCommentVNode("",!0),(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.content,$e=>(e$b.openBlock(),e$b.createElementBlock("li",{key:$e.id,class:"list-entry"},[e$b.createElementVNode("button",{type:"button",onClick:ye=>ce($e),"aria-current":ue($e)?"true":void 0,class:e$b.normalizeClass(["attendant-item",$e.isMoved?"moved":"",ue($e)?"selected":""])},[e$b.unref(le)&&!re.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$V,[e$b.createVNode(AttendantGameIdentity,{attendant:$e,variant:"list","avatar-size":"sm","show-level":!0,"show-achievement":!1,"fallback-meta":be($e).label,"hover-preview":""},null,8,["attendant","fallback-meta"]),e$b.createElementVNode("i",{class:"status-indicator",style:e$b.normalizeStyle({backgroundColor:be($e).color}),title:be($e).label},null,12,_hoisted_9$R)])):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createElementVNode("span",_hoisted_10$M,[e$b.createVNode(Avatar,{photo:$e.photo,name:$e.name,size:"fill",class:"size-full"},null,8,["photo","name"]),re.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("i",{key:0,class:"status-indicator",style:e$b.normalizeStyle({backgroundColor:be($e).color}),title:be($e).label},null,12,_hoisted_11$G))]),e$b.createElementVNode("span",_hoisted_12$C,[e$b.createElementVNode("strong",_hoisted_13$x,e$b.toDisplayString($e.name),1),e$b.createElementVNode("span",{class:e$b.normalizeClass(["conversation-meta",{online:!re.value&&!pe($e)&&be($e).key==="online",draft:pe($e)}])},e$b.toDisplayString(_e($e)),3)])],64)),me($e)>0?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_14$w,e$b.toDisplayString(me($e)),1)):e$b.unref(le)&&!re.value&&pe($e)?(e$b.openBlock(),e$b.createElementBlock("span",{key:3,class:"draft-indicator",title:fe($e)}," Rascunho ",8,_hoisted_15$t)):e$b.createCommentVNode("",!0)],10,_hoisted_7$10)]))),128)),ee.loadingMore?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_16$q,[...ke[3]||(ke[3]=[e$b.createElementVNode("span",null,null,-1)])])):e$b.createCommentVNode("",!0)],42,_hoisted_1$1Y),re.value&&!ee.loader?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,type:"button",class:"create-group-button",title:"Criar grupo","aria-label":"Criar novo grupo",onClick:de},[...ke[4]||(ke[4]=[e$b.createElementVNode("span",{class:"create-group-label"},"Criar grupo",-1),e$b.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[e$b.createElementVNode("path",{d:"M12 5v14M5 12h14",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round"})],-1)])])):e$b.createCommentVNode("",!0)],64))}},MountListForType=_export_sfc$1(_sfc_main$28,[["__scopeId","data-v-817262be"]]),_hoisted_1$1X={class:"attendants-container"},_sfc_main$27={__name:"ChatList",props:{listAttendants:{type:Array,default:()=>[],required:!0},listGroups:{type:Array,default:()=>[],required:!0},currentAttendant:{type:Object,required:!0},mobile:{type:Boolean,default:!1},currentList:{type:String,default:void 0},searchQuery:{type:String,default:void 0}},emits:["update:currentList","update:searchQuery"],setup(ee,{emit:te}){const ne=ee,ae=e$b.inject("useChat"),re=te,oe=e$b.ref(ne.currentList??"attendants"),ie=e$b.computed({get(){return ne.currentList??oe.value},set($e){if(ne.currentList===void 0){oe.value=$e;return}re("update:currentList",$e)}}),le=e$b.ref(ne.searchQuery??""),ce=e$b.computed({get(){return ne.searchQuery??le.value},set($e){if(ne.searchQuery===void 0){le.value=$e;return}re("update:searchQuery",$e)}}),de=e$b.computed(()=>ce.value?ne.listAttendants.filter($e=>$e.name.toLowerCase().includes(ce.value.toLowerCase())&&$e.id!==ne.currentAttendant.id):ne.listAttendants.filter($e=>$e.id!==ne.currentAttendant.id)),ue=$e=>String($e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim(),ve=$e=>{var ye;return[$e==null?void 0:$e.name,(ye=$e==null?void 0:$e.internal_chat)==null?void 0:ye.name,$e==null?void 0:$e.description].filter(Boolean).join(" ")},me=e$b.computed(()=>{const $e=(ne.listGroups||[]).filter(Ee=>Ee==null?void 0:Ee.is_group),ye=ue(ce.value);return ye?$e.filter(Ee=>ue(ve(Ee)).includes(ye)):$e});e$b.watch(()=>ie.value,async $e=>{ce.value="",$e==="groups"&&await pe()});const be=e$b.ref(!1),fe=e$b.ref(!1),pe=async()=>{typeof ae.fetchGroupChannels=="function"&&(be.value=!0,await ae.fetchGroupChannels(1),be.value=!1)},_e=async()=>{var $e;if(!(ie.value!=="groups"||fe.value)&&ae.hasMoreGroups){fe.value=!0;try{await(($e=ae.loadNextGroupPage)==null?void 0:$e.call(ae))}finally{fe.value=!1}}},ge=e$b.computed(()=>(ne.listAttendants||[]).filter($e=>{var ye;return $e.id!==((ye=ne.currentAttendant)==null?void 0:ye.id)}).reduce(($e,ye)=>{var Ee,Se;return $e+normalizeUnreadValue((Ee=ye==null?void 0:ye.internal_chat)==null?void 0:Ee.unread,(Se=ne.currentAttendant)==null?void 0:Se.id)},0)),ke=e$b.computed(()=>(ne.listGroups||[]).filter($e=>$e.is_group).reduce(($e,ye)=>{var Ee,Se;return $e+normalizeUnreadValue((Ee=ye==null?void 0:ye.internal_chat)==null?void 0:Ee.unread,(Se=ne.currentAttendant)==null?void 0:Se.id)},0));return($e,ye)=>{var Ee;return e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1X,[e$b.createVNode(SectionsHeader,{hasUnread:{attendants:ge.value,groups:ke.value},currentState:ie.value,"onUpdate:currentState":ye[0]||(ye[0]=Se=>ie.value=Se),searchQuery:ce.value,"onUpdate:searchQuery":ye[1]||(ye[1]=Se=>ce.value=Se)},null,8,["hasUnread","currentState","searchQuery"]),e$b.createVNode(MountListForType,{content:ie.value==="attendants"?de.value:me.value,mode:ie.value,loader:be.value,"loading-more":fe.value,"current-attendant-id":(Ee=ee.currentAttendant)==null?void 0:Ee.id,onLoadMore:_e},null,8,["content","mode","loader","loading-more","current-attendant-id"])])}}},ChatList=_export_sfc$1(_sfc_main$27,[["__scopeId","data-v-b3058c16"]]);function addDays(ee,te,ne){const ae=toDate(ee,ne==null?void 0:ne.in);return isNaN(te)?constructFrom(ee,NaN):(ae.setDate(ae.getDate()+te),ae)}function startOfISOWeek(ee,te){return startOfWeek(ee,{...te,weekStartsOn:1})}function getISOWeekYear(ee,te){const ne=toDate(ee,te==null?void 0:te.in),ae=ne.getFullYear(),re=constructFrom(ne,0);re.setFullYear(ae+1,0,4),re.setHours(0,0,0,0);const oe=startOfISOWeek(re),ie=constructFrom(ne,0);ie.setFullYear(ae,0,4),ie.setHours(0,0,0,0);const le=startOfISOWeek(ie);return ne.getTime()>=oe.getTime()?ae+1:ne.getTime()>=le.getTime()?ae:ae-1}function getTimezoneOffsetInMilliseconds(ee){const te=toDate(ee),ne=new Date(Date.UTC(te.getFullYear(),te.getMonth(),te.getDate(),te.getHours(),te.getMinutes(),te.getSeconds(),te.getMilliseconds()));return ne.setUTCFullYear(te.getFullYear()),+ee-+ne}function startOfDay(ee,te){const ne=toDate(ee,te==null?void 0:te.in);return ne.setHours(0,0,0,0),ne}function differenceInCalendarDays(ee,te,ne){const[ae,re]=normalizeDates(ne==null?void 0:ne.in,ee,te),oe=startOfDay(ae),ie=startOfDay(re),le=+oe-getTimezoneOffsetInMilliseconds(oe),ce=+ie-getTimezoneOffsetInMilliseconds(ie);return Math.round((le-ce)/millisecondsInDay)}function startOfISOWeekYear(ee,te){const ne=getISOWeekYear(ee,te),ae=constructFrom(ee,0);return ae.setFullYear(ne,0,4),ae.setHours(0,0,0,0),startOfISOWeek(ae)}function constructNow(ee){return constructFrom(ee,Date.now())}function isSameDay(ee,te,ne){const[ae,re]=normalizeDates(ne==null?void 0:ne.in,ee,te);return+startOfDay(ae)==+startOfDay(re)}function isDate(ee){return ee instanceof Date||typeof ee=="object"&&Object.prototype.toString.call(ee)==="[object Date]"}function isValid(ee){return!(!isDate(ee)&&typeof ee!="number"||isNaN(+toDate(ee)))}function startOfYear(ee,te){const ne=toDate(ee,te==null?void 0:te.in);return ne.setFullYear(ne.getFullYear(),0,1),ne.setHours(0,0,0,0),ne}function getDayOfYear(ee,te){const ne=toDate(ee,te==null?void 0:te.in);return differenceInCalendarDays(ne,startOfYear(ne))+1}function getISOWeek(ee,te){const ne=toDate(ee,te==null?void 0:te.in),ae=+startOfISOWeek(ne)-+startOfISOWeekYear(ne);return Math.round(ae/millisecondsInWeek)+1}function getWeekYear(ee,te){var ue,ve,me,be;const ne=toDate(ee,te==null?void 0:te.in),ae=ne.getFullYear(),re=getDefaultOptions(),oe=(te==null?void 0:te.firstWeekContainsDate)??((ve=(ue=te==null?void 0:te.locale)==null?void 0:ue.options)==null?void 0:ve.firstWeekContainsDate)??re.firstWeekContainsDate??((be=(me=re.locale)==null?void 0:me.options)==null?void 0:be.firstWeekContainsDate)??1,ie=constructFrom((te==null?void 0:te.in)||ee,0);ie.setFullYear(ae+1,0,oe),ie.setHours(0,0,0,0);const le=startOfWeek(ie,te),ce=constructFrom((te==null?void 0:te.in)||ee,0);ce.setFullYear(ae,0,oe),ce.setHours(0,0,0,0);const de=startOfWeek(ce,te);return+ne>=+le?ae+1:+ne>=+de?ae:ae-1}function startOfWeekYear(ee,te){var le,ce,de,ue;const ne=getDefaultOptions(),ae=(te==null?void 0:te.firstWeekContainsDate)??((ce=(le=te==null?void 0:te.locale)==null?void 0:le.options)==null?void 0:ce.firstWeekContainsDate)??ne.firstWeekContainsDate??((ue=(de=ne.locale)==null?void 0:de.options)==null?void 0:ue.firstWeekContainsDate)??1,re=getWeekYear(ee,te),oe=constructFrom((te==null?void 0:te.in)||ee,0);return oe.setFullYear(re,0,ae),oe.setHours(0,0,0,0),startOfWeek(oe,te)}function getWeek(ee,te){const ne=toDate(ee,te==null?void 0:te.in),ae=+startOfWeek(ne,te)-+startOfWeekYear(ne,te);return Math.round(ae/millisecondsInWeek)+1}function addLeadingZeros(ee,te){const ne=ee<0?"-":"",ae=Math.abs(ee).toString().padStart(te,"0");return ne+ae}const lightFormatters={y(ee,te){const ne=ee.getFullYear(),ae=ne>0?ne:1-ne;return addLeadingZeros(te==="yy"?ae%100:ae,te.length)},M(ee,te){const ne=ee.getMonth();return te==="M"?String(ne+1):addLeadingZeros(ne+1,2)},d(ee,te){return addLeadingZeros(ee.getDate(),te.length)},a(ee,te){const ne=ee.getHours()/12>=1?"pm":"am";switch(te){case"a":case"aa":return ne.toUpperCase();case"aaa":return ne;case"aaaaa":return ne[0];case"aaaa":default:return ne==="am"?"a.m.":"p.m."}},h(ee,te){return addLeadingZeros(ee.getHours()%12||12,te.length)},H(ee,te){return addLeadingZeros(ee.getHours(),te.length)},m(ee,te){return addLeadingZeros(ee.getMinutes(),te.length)},s(ee,te){return addLeadingZeros(ee.getSeconds(),te.length)},S(ee,te){const ne=te.length,ae=ee.getMilliseconds(),re=Math.trunc(ae*Math.pow(10,ne-3));return addLeadingZeros(re,te.length)}},dayPeriodEnum={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(ee,te,ne){const ae=ee.getFullYear()>0?1:0;switch(te){case"G":case"GG":case"GGG":return ne.era(ae,{width:"abbreviated"});case"GGGGG":return ne.era(ae,{width:"narrow"});case"GGGG":default:return ne.era(ae,{width:"wide"})}},y:function(ee,te,ne){if(te==="yo"){const ae=ee.getFullYear(),re=ae>0?ae:1-ae;return ne.ordinalNumber(re,{unit:"year"})}return lightFormatters.y(ee,te)},Y:function(ee,te,ne,ae){const re=getWeekYear(ee,ae),oe=re>0?re:1-re;if(te==="YY"){const ie=oe%100;return addLeadingZeros(ie,2)}return te==="Yo"?ne.ordinalNumber(oe,{unit:"year"}):addLeadingZeros(oe,te.length)},R:function(ee,te){const ne=getISOWeekYear(ee);return addLeadingZeros(ne,te.length)},u:function(ee,te){const ne=ee.getFullYear();return addLeadingZeros(ne,te.length)},Q:function(ee,te,ne){const ae=Math.ceil((ee.getMonth()+1)/3);switch(te){case"Q":return String(ae);case"QQ":return addLeadingZeros(ae,2);case"Qo":return ne.ordinalNumber(ae,{unit:"quarter"});case"QQQ":return ne.quarter(ae,{width:"abbreviated",context:"formatting"});case"QQQQQ":return ne.quarter(ae,{width:"narrow",context:"formatting"});case"QQQQ":default:return ne.quarter(ae,{width:"wide",context:"formatting"})}},q:function(ee,te,ne){const ae=Math.ceil((ee.getMonth()+1)/3);switch(te){case"q":return String(ae);case"qq":return addLeadingZeros(ae,2);case"qo":return ne.ordinalNumber(ae,{unit:"quarter"});case"qqq":return ne.quarter(ae,{width:"abbreviated",context:"standalone"});case"qqqqq":return ne.quarter(ae,{width:"narrow",context:"standalone"});case"qqqq":default:return ne.quarter(ae,{width:"wide",context:"standalone"})}},M:function(ee,te,ne){const ae=ee.getMonth();switch(te){case"M":case"MM":return lightFormatters.M(ee,te);case"Mo":return ne.ordinalNumber(ae+1,{unit:"month"});case"MMM":return ne.month(ae,{width:"abbreviated",context:"formatting"});case"MMMMM":return ne.month(ae,{width:"narrow",context:"formatting"});case"MMMM":default:return ne.month(ae,{width:"wide",context:"formatting"})}},L:function(ee,te,ne){const ae=ee.getMonth();switch(te){case"L":return String(ae+1);case"LL":return addLeadingZeros(ae+1,2);case"Lo":return ne.ordinalNumber(ae+1,{unit:"month"});case"LLL":return ne.month(ae,{width:"abbreviated",context:"standalone"});case"LLLLL":return ne.month(ae,{width:"narrow",context:"standalone"});case"LLLL":default:return ne.month(ae,{width:"wide",context:"standalone"})}},w:function(ee,te,ne,ae){const re=getWeek(ee,ae);return te==="wo"?ne.ordinalNumber(re,{unit:"week"}):addLeadingZeros(re,te.length)},I:function(ee,te,ne){const ae=getISOWeek(ee);return te==="Io"?ne.ordinalNumber(ae,{unit:"week"}):addLeadingZeros(ae,te.length)},d:function(ee,te,ne){return te==="do"?ne.ordinalNumber(ee.getDate(),{unit:"date"}):lightFormatters.d(ee,te)},D:function(ee,te,ne){const ae=getDayOfYear(ee);return te==="Do"?ne.ordinalNumber(ae,{unit:"dayOfYear"}):addLeadingZeros(ae,te.length)},E:function(ee,te,ne){const ae=ee.getDay();switch(te){case"E":case"EE":case"EEE":return ne.day(ae,{width:"abbreviated",context:"formatting"});case"EEEEE":return ne.day(ae,{width:"narrow",context:"formatting"});case"EEEEEE":return ne.day(ae,{width:"short",context:"formatting"});case"EEEE":default:return ne.day(ae,{width:"wide",context:"formatting"})}},e:function(ee,te,ne,ae){const re=ee.getDay(),oe=(re-ae.weekStartsOn+8)%7||7;switch(te){case"e":return String(oe);case"ee":return addLeadingZeros(oe,2);case"eo":return ne.ordinalNumber(oe,{unit:"day"});case"eee":return ne.day(re,{width:"abbreviated",context:"formatting"});case"eeeee":return ne.day(re,{width:"narrow",context:"formatting"});case"eeeeee":return ne.day(re,{width:"short",context:"formatting"});case"eeee":default:return ne.day(re,{width:"wide",context:"formatting"})}},c:function(ee,te,ne,ae){const re=ee.getDay(),oe=(re-ae.weekStartsOn+8)%7||7;switch(te){case"c":return String(oe);case"cc":return addLeadingZeros(oe,te.length);case"co":return ne.ordinalNumber(oe,{unit:"day"});case"ccc":return ne.day(re,{width:"abbreviated",context:"standalone"});case"ccccc":return ne.day(re,{width:"narrow",context:"standalone"});case"cccccc":return ne.day(re,{width:"short",context:"standalone"});case"cccc":default:return ne.day(re,{width:"wide",context:"standalone"})}},i:function(ee,te,ne){const ae=ee.getDay(),re=ae===0?7:ae;switch(te){case"i":return String(re);case"ii":return addLeadingZeros(re,te.length);case"io":return ne.ordinalNumber(re,{unit:"day"});case"iii":return ne.day(ae,{width:"abbreviated",context:"formatting"});case"iiiii":return ne.day(ae,{width:"narrow",context:"formatting"});case"iiiiii":return ne.day(ae,{width:"short",context:"formatting"});case"iiii":default:return ne.day(ae,{width:"wide",context:"formatting"})}},a:function(ee,te,ne){const re=ee.getHours()/12>=1?"pm":"am";switch(te){case"a":case"aa":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"aaa":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return ne.dayPeriod(re,{width:"narrow",context:"formatting"});case"aaaa":default:return ne.dayPeriod(re,{width:"wide",context:"formatting"})}},b:function(ee,te,ne){const ae=ee.getHours();let re;switch(ae===12?re=dayPeriodEnum.noon:ae===0?re=dayPeriodEnum.midnight:re=ae/12>=1?"pm":"am",te){case"b":case"bb":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"bbb":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return ne.dayPeriod(re,{width:"narrow",context:"formatting"});case"bbbb":default:return ne.dayPeriod(re,{width:"wide",context:"formatting"})}},B:function(ee,te,ne){const ae=ee.getHours();let re;switch(ae>=17?re=dayPeriodEnum.evening:ae>=12?re=dayPeriodEnum.afternoon:ae>=4?re=dayPeriodEnum.morning:re=dayPeriodEnum.night,te){case"B":case"BB":case"BBB":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"BBBBB":return ne.dayPeriod(re,{width:"narrow",context:"formatting"});case"BBBB":default:return ne.dayPeriod(re,{width:"wide",context:"formatting"})}},h:function(ee,te,ne){if(te==="ho"){let ae=ee.getHours()%12;return ae===0&&(ae=12),ne.ordinalNumber(ae,{unit:"hour"})}return lightFormatters.h(ee,te)},H:function(ee,te,ne){return te==="Ho"?ne.ordinalNumber(ee.getHours(),{unit:"hour"}):lightFormatters.H(ee,te)},K:function(ee,te,ne){const ae=ee.getHours()%12;return te==="Ko"?ne.ordinalNumber(ae,{unit:"hour"}):addLeadingZeros(ae,te.length)},k:function(ee,te,ne){let ae=ee.getHours();return ae===0&&(ae=24),te==="ko"?ne.ordinalNumber(ae,{unit:"hour"}):addLeadingZeros(ae,te.length)},m:function(ee,te,ne){return te==="mo"?ne.ordinalNumber(ee.getMinutes(),{unit:"minute"}):lightFormatters.m(ee,te)},s:function(ee,te,ne){return te==="so"?ne.ordinalNumber(ee.getSeconds(),{unit:"second"}):lightFormatters.s(ee,te)},S:function(ee,te){return lightFormatters.S(ee,te)},X:function(ee,te,ne){const ae=ee.getTimezoneOffset();if(ae===0)return"Z";switch(te){case"X":return formatTimezoneWithOptionalMinutes(ae);case"XXXX":case"XX":return formatTimezone(ae);case"XXXXX":case"XXX":default:return formatTimezone(ae,":")}},x:function(ee,te,ne){const ae=ee.getTimezoneOffset();switch(te){case"x":return formatTimezoneWithOptionalMinutes(ae);case"xxxx":case"xx":return formatTimezone(ae);case"xxxxx":case"xxx":default:return formatTimezone(ae,":")}},O:function(ee,te,ne){const ae=ee.getTimezoneOffset();switch(te){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(ae,":");case"OOOO":default:return"GMT"+formatTimezone(ae,":")}},z:function(ee,te,ne){const ae=ee.getTimezoneOffset();switch(te){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(ae,":");case"zzzz":default:return"GMT"+formatTimezone(ae,":")}},t:function(ee,te,ne){const ae=Math.trunc(+ee/1e3);return addLeadingZeros(ae,te.length)},T:function(ee,te,ne){return addLeadingZeros(+ee,te.length)}};function formatTimezoneShort(ee,te=""){const ne=ee>0?"-":"+",ae=Math.abs(ee),re=Math.trunc(ae/60),oe=ae%60;return oe===0?ne+String(re):ne+String(re)+te+addLeadingZeros(oe,2)}function formatTimezoneWithOptionalMinutes(ee,te){return ee%60===0?(ee>0?"-":"+")+addLeadingZeros(Math.abs(ee)/60,2):formatTimezone(ee,te)}function formatTimezone(ee,te=""){const ne=ee>0?"-":"+",ae=Math.abs(ee),re=addLeadingZeros(Math.trunc(ae/60),2),oe=addLeadingZeros(ae%60,2);return ne+re+te+oe}const dateLongFormatter=(ee,te)=>{switch(ee){case"P":return te.date({width:"short"});case"PP":return te.date({width:"medium"});case"PPP":return te.date({width:"long"});case"PPPP":default:return te.date({width:"full"})}},timeLongFormatter=(ee,te)=>{switch(ee){case"p":return te.time({width:"short"});case"pp":return te.time({width:"medium"});case"ppp":return te.time({width:"long"});case"pppp":default:return te.time({width:"full"})}},dateTimeLongFormatter=(ee,te)=>{const ne=ee.match(/(P+)(p+)?/)||[],ae=ne[1],re=ne[2];if(!re)return dateLongFormatter(ee,te);let oe;switch(ae){case"P":oe=te.dateTime({width:"short"});break;case"PP":oe=te.dateTime({width:"medium"});break;case"PPP":oe=te.dateTime({width:"long"});break;case"PPPP":default:oe=te.dateTime({width:"full"});break}return oe.replace("{{date}}",dateLongFormatter(ae,te)).replace("{{time}}",timeLongFormatter(re,te))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(ee){return dayOfYearTokenRE.test(ee)}function isProtectedWeekYearToken(ee){return weekYearTokenRE.test(ee)}function warnOrThrowProtectedError(ee,te,ne){const ae=message(ee,te,ne);if(console.warn(ae),throwTokens.includes(ee))throw new RangeError(ae)}function message(ee,te,ne){const ae=ee[0]==="Y"?"years":"days of the month";return`Use \`${ee.toLowerCase()}\` instead of \`${ee}\` (in \`${te}\`) for formatting ${ae} to the input \`${ne}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function format(ee,te,ne){var ue,ve,me,be,fe,pe,_e,ge;const ae=getDefaultOptions(),re=(ne==null?void 0:ne.locale)??ae.locale??enUS,oe=(ne==null?void 0:ne.firstWeekContainsDate)??((ve=(ue=ne==null?void 0:ne.locale)==null?void 0:ue.options)==null?void 0:ve.firstWeekContainsDate)??ae.firstWeekContainsDate??((be=(me=ae.locale)==null?void 0:me.options)==null?void 0:be.firstWeekContainsDate)??1,ie=(ne==null?void 0:ne.weekStartsOn)??((pe=(fe=ne==null?void 0:ne.locale)==null?void 0:fe.options)==null?void 0:pe.weekStartsOn)??ae.weekStartsOn??((ge=(_e=ae.locale)==null?void 0:_e.options)==null?void 0:ge.weekStartsOn)??0,le=toDate(ee,ne==null?void 0:ne.in);if(!isValid(le))throw new RangeError("Invalid time value");let ce=te.match(longFormattingTokensRegExp).map(ke=>{const $e=ke[0];if($e==="p"||$e==="P"){const ye=longFormatters[$e];return ye(ke,re.formatLong)}return ke}).join("").match(formattingTokensRegExp).map(ke=>{if(ke==="''")return{isToken:!1,value:"'"};const $e=ke[0];if($e==="'")return{isToken:!1,value:cleanEscapedString(ke)};if(formatters[$e])return{isToken:!0,value:ke};if($e.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$e+"`");return{isToken:!1,value:ke}});re.localize.preprocessor&&(ce=re.localize.preprocessor(le,ce));const de={firstWeekContainsDate:oe,weekStartsOn:ie,locale:re};return ce.map(ke=>{if(!ke.isToken)return ke.value;const $e=ke.value;(!(ne!=null&&ne.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken($e)||!(ne!=null&&ne.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken($e))&&warnOrThrowProtectedError($e,te,String(ee));const ye=formatters[$e[0]];return ye(le,$e,re.localize,de)}).join("")}function cleanEscapedString(ee){const te=ee.match(escapedStringRegExp);return te?te[1].replace(doubleQuoteRegExp,"'"):ee}function isThisWeek(ee,te){return isSameWeek(constructFrom(ee,ee),constructNow(ee),te)}function isToday(ee,te){return isSameDay(constructFrom(ee,ee),constructNow(ee))}function subDays(ee,te,ne){return addDays(ee,-1,ne)}function isYesterday(ee,te){return isSameDay(constructFrom(ee,ee),subDays(constructNow(ee)))}const _hoisted_1$1W={class:"chat-info bg-base-200"},_hoisted_2$1G={class:"info-head"},_hoisted_3$1w={class:"info-title"},_hoisted_4$1k={class:"identity"},_hoisted_5$1c={key:0,class:"identity-avatar"},_hoisted_6$14={key:2,class:"identity-avatar"},_hoisted_7$$={class:"identity-name"},_hoisted_8$U={key:3,class:"identity-sub"},_hoisted_9$Q={key:5,class:"identity-sub presence"},_hoisted_10$L={class:"facts"},_hoisted_11$F={key:0,class:"members"},_hoisted_12$B=["aria-disabled"],_hoisted_13$w={class:"members-label"},_hoisted_14$v={class:"members-list"},_hoisted_15$s={key:1,class:"member-avatar"},_hoisted_16$p={class:"member-name"},_hoisted_17$j=["disabled","onClick","onMouseenter","onFocus"],_hoisted_18$j={key:0,class:"loader-sm"},_hoisted_19$g={key:1,class:"info-foot"},_hoisted_20$g=["disabled"],_hoisted_21$e=["disabled"],_hoisted_22$c={key:0,class:"loader-sm"},_sfc_main$26={__name:"groupChatInfo",props:{selectedAttendant:{type:Object,required:!0},attendant:{type:Object,required:!0},participantsGroup:{type:Array,default:()=>[]},participantCount:{type:Number,default:0},isGroup:{type:Boolean,default:!0}},emits:["close"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.inject("useChat"),oe=e$b.inject("smPlayEnabled",e$b.computed(()=>!1)),ie=()=>{Ee.value&&typeof re.openCreateOrEdit=="function"&&re.openCreateOrEdit("edit",ne.selectedAttendant)},le=async Ve=>{var Ne,Pe,Be;if(!(!Ve||Ve.id===((Ne=ne.attendant)==null?void 0:Ne.id)||Ve.loading)&&typeof re.removeGroupParticipant=="function"){Ve.loading=!0;try{await re.removeGroupParticipant((Be=(Pe=ne.selectedAttendant)==null?void 0:Pe.internal_chat)==null?void 0:Be.channel_id,Ve.id)}finally{Ve.loading=!1}}},ce=e$b.ref(!1),de=e$b.ref(!1),ue=e$b.ref(null),ve=e$b.ref(!1),me=e$b.ref({}),be=e$b.ref(""),fe=()=>{if(!ue.value)return;const Ve=ue.value.getBoundingClientRect(),Ne=240,Pe=8,Be=Math.max(Pe,window.innerWidth-Ne-Pe),Ae=Math.min(Math.max(Pe,Ve.right+Pe),Be),xe=Ve.top+Ve.height/2;me.value={left:`${Ae}px`,top:`${xe}px`}},pe=async(Ve,Ne)=>{Ne&&(ue.value=Ve.currentTarget,be.value=Ne,ve.value=!0,await e$b.nextTick(),fe())},_e=()=>{ve.value=!1,ue.value=null,be.value=""},ge=()=>{ve.value&&fe()},ke=()=>{de.value=!0},$e=()=>{de.value=!1},ye=async()=>{var Pe,Be;const Ve=(Be=(Pe=ne.selectedAttendant)==null?void 0:Pe.internal_chat)==null?void 0:Be.channel_id;if(!Ve||typeof re.leaveGroup!="function")return;if(ce.value=!0,!await re.leaveGroup(Ve)){ce.value=!1,$e();return}ae("close"),typeof re.closeSelectedChat=="function"&&re.closeSelectedChat(),ce.value=!1,$e()},Ee=e$b.computed(()=>ne.selectedAttendant.created_by===ne.attendant.id),Se=e$b.computed(()=>{const Ve=ne.participantsGroup.find(Ne=>ne.selectedAttendant.created_by===Ne.id);return Ve?Ve.name:"Desconhecido"}),Le=e$b.computed(()=>{var Ne;const Ve=(Ne=ne.selectedAttendant)==null?void 0:Ne.created_at;return Ve?new Date(Ve).toLocaleDateString("pt-BR"):"data desconhecida"}),Me=e$b.computed(()=>{var Ve;return resolvePresence((Ve=ne.selectedAttendant)==null?void 0:Ve.login_status)}),De=e$b.computed(()=>resolveAttendantGamification(ne.selectedAttendant).title),Oe=e$b.computed(()=>{var Pe,Be,Ae;if(ne.isGroup)return[{key:"members",label:"Membros",value:String(ne.participantCount)},{key:"admin",label:"Administrador",value:Se.value},{key:"created",label:"Criado em",value:Le.value}];const Ve=[{key:"status",label:"Status",value:Me.value.label}],Ne=((Pe=ne.selectedAttendant)==null?void 0:Pe.department)||((Be=ne.selectedAttendant)==null?void 0:Be.sector);return Ne&&Ve.push({key:"sector",label:"Departamento",value:typeof Ne=="string"?Ne:Ne==null?void 0:Ne.name}),(Ae=ne.selectedAttendant)!=null&&Ae.email&&Ve.push({key:"email",label:"E-mail",value:ne.selectedAttendant.email}),Ve.filter(xe=>xe.value)}),Re=e$b.computed(()=>Ee.value?"":`Você não é o administrador do grupo. Somente ${Se.value} pode ajustar os membros.`),ze=Ve=>{var Ne;return(Ve==null?void 0:Ve.id)===((Ne=ne.attendant)==null?void 0:Ne.id)?"Você não pode remover a si mesmo do grupo.":Ee.value?"":`Você não é o administrador do grupo. Somente ${Se.value} pode remover membros.`};return e$b.onMounted(()=>{window.addEventListener("resize",ge),window.addEventListener("scroll",ge,!0)}),e$b.onBeforeUnmount(()=>{window.removeEventListener("resize",ge),window.removeEventListener("scroll",ge,!0)}),(Ve,Ne)=>{var Pe;return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$1W,[e$b.createElementVNode("header",_hoisted_2$1G,[e$b.createElementVNode("button",{class:"icon-btn",onClick:Ne[0]||(Ne[0]=Be=>ae("close")),title:"Voltar"},[...Ne[3]||(Ne[3]=[e$b.createElementVNode("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M15 18l-6-6 6-6"})],-1)])]),e$b.createElementVNode("p",_hoisted_3$1w,e$b.toDisplayString(ee.isGroup?"Informações do grupo":"Informações do atendente"),1)]),e$b.createElementVNode("section",_hoisted_4$1k,[ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_5$1c,[e$b.createVNode(Avatar,{photo:ee.selectedAttendant.photo,name:ee.selectedAttendant.name,size:"fill",class:"size-full"},null,8,["photo","name"])])):e$b.unref(oe)?(e$b.openBlock(),e$b.createBlock(AttendantGameIdentity,{key:1,attendant:ee.selectedAttendant,variant:"avatar","avatar-size":"lg",class:"identity-game-avatar"},null,8,["attendant"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$14,[e$b.createVNode(Avatar,{photo:ee.selectedAttendant.photo,name:ee.selectedAttendant.name,size:"fill",class:"size-full"},null,8,["photo","name"])])),e$b.createElementVNode("h1",_hoisted_7$$,e$b.toDisplayString(ee.selectedAttendant.name),1),ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_8$U," Grupo · "+e$b.toDisplayString(ee.participantCount)+" membros ",1)):e$b.unref(oe)&&((Pe=De.value)!=null&&Pe.name)?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:4,title:De.value,size:"md",class:"identity-title"},null,8,["title"])):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_9$Q,[e$b.createElementVNode("i",{style:e$b.normalizeStyle({backgroundColor:Me.value.color})},null,4),e$b.createTextVNode(" "+e$b.toDisplayString(Me.value.label),1)]))]),e$b.createElementVNode("dl",_hoisted_10$L,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Oe.value,Be=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Be.key,class:"fact"},[e$b.createElementVNode("dt",null,e$b.toDisplayString(Be.label),1),e$b.createElementVNode("dd",null,e$b.toDisplayString(Be.value),1)]))),128))]),ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$F,[e$b.createElementVNode("button",{"aria-disabled":!Ee.value,class:e$b.normalizeClass(["member-row action-row",!Ee.value&&"is-blocked"]),onClick:ie,onMouseenter:Ne[1]||(Ne[1]=Be=>pe(Be,Re.value)),onMouseleave:_e,onFocus:Ne[2]||(Ne[2]=Be=>pe(Be,Re.value)),onBlur:_e},[...Ne[4]||(Ne[4]=[e$b.createStaticVNode('<span class="action-icon" data-v-0671c4f9><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" data-v-0671c4f9><path d="M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2" data-v-0671c4f9></path><circle cx="9" cy="7" r="4" data-v-0671c4f9></circle><path d="M19 8v6M22 11h-6" data-v-0671c4f9></path></svg></span><span class="member-name" data-v-0671c4f9>Ajustar membros do grupo</span>',2)])],42,_hoisted_12$B),e$b.createElementVNode("p",_hoisted_13$w,e$b.toDisplayString(ee.participantCount)+" participantes",1),e$b.createElementVNode("ul",_hoisted_14$v,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.participantsGroup,Be=>(e$b.openBlock(),e$b.createElementBlock("li",{key:Be.id,class:"member-row"},[e$b.unref(oe)?(e$b.openBlock(),e$b.createBlock(AttendantGameIdentity,{key:0,attendant:Be,variant:"avatar","avatar-size":"sm","hover-preview":"",class:"member-game-avatar"},null,8,["attendant"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$s,[e$b.createVNode(Avatar,{photo:Be.photo,name:Be.name,size:"fill",class:"size-full"},null,8,["photo","name"])])),e$b.createElementVNode("span",_hoisted_16$p,e$b.toDisplayString(Be.name),1),e$b.createElementVNode("button",{class:e$b.normalizeClass(["remove-button",Be.id===ee.attendant.id?"is-me":""]),disabled:!Ee.value||Be.id===ee.attendant.id||Be.loading,onClick:Ae=>le(Be),onMouseenter:Ae=>pe(Ae,ze(Be)),onMouseleave:_e,onFocus:Ae=>pe(Ae,ze(Be)),onBlur:_e},[Be.loading?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_18$j)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createTextVNode(e$b.toDisplayString(Be.id===ee.attendant.id?"Eu":"Remover"),1)],64))],42,_hoisted_17$j)]))),128))])])):e$b.createCommentVNode("",!0),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[ve.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"action-tooltip bg-base-300",style:e$b.normalizeStyle(me.value)},e$b.toDisplayString(be.value),5)):e$b.createCommentVNode("",!0)])),ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("footer",_hoisted_19$g,[de.value?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[e$b.createElementVNode("button",{class:"foot-button",onClick:$e,disabled:ce.value}," Cancelar ",8,_hoisted_20$g),e$b.createElementVNode("button",{class:"foot-button is-danger",onClick:ye,disabled:ce.value},[ce.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_22$c)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createTextVNode("Confirmar saída")],64))],8,_hoisted_21$e)],64)):(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"foot-button is-danger-ghost",onClick:ke}," Sair do grupo "))])):e$b.createCommentVNode("",!0)])}}},GroupChatInfo=_export_sfc$1(_sfc_main$26,[["__scopeId","data-v-0671c4f9"]]),_hoisted_1$1V=["href"],_sfc_main$25={__name:"messageText",props:{text:{type:String,default:""},emojiOnly:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>linkifyText(te.text));return(ae,re)=>(e$b.openBlock(),e$b.createElementBlock("p",{class:e$b.normalizeClass(["message-text",{"emoji-only":ee.emojiOnly}])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ne.value,(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:ie},[oe.type==="link"?(e$b.openBlock(),e$b.createElementBlock("a",{key:0,class:"message-link",href:oe.href,target:"_blank",rel:"noopener noreferrer",onClick:re[0]||(re[0]=e$b.withModifiers(()=>{},["stop"]))},e$b.toDisplayString(oe.value),9,_hoisted_1$1V)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createTextVNode(e$b.toDisplayString(oe.value),1)],64))],64))),128))],2))}},MessageText=_export_sfc$1(_sfc_main$25,[["__scopeId","data-v-be876b02"]]);function t$1(ee,te,ne,ae){return new(ne||(ne=Promise))(function(re,oe){function ie(de){try{ce(ae.next(de))}catch(ue){oe(ue)}}function le(de){try{ce(ae.throw(de))}catch(ue){oe(ue)}}function ce(de){var ue;de.done?re(de.value):(ue=de.value,ue instanceof ne?ue:new ne(function(ve){ve(ue)})).then(ie,le)}ce((ae=ae.apply(ee,te||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;class e{constructor(){this.listeners={}}on(te,ne,ae){if(this.listeners[te]||(this.listeners[te]=new Set),ae==null?void 0:ae.once){const re=(...oe)=>{this.un(te,re),ne(...oe)};return this.listeners[te].add(re),()=>this.un(te,re)}return this.listeners[te].add(ne),()=>this.un(te,ne)}un(te,ne){var ae;(ae=this.listeners[te])===null||ae===void 0||ae.delete(ne)}once(te,ne){return this.on(te,ne,{once:!0})}unAll(){this.listeners={}}emit(te,...ne){this.listeners[te]&&this.listeners[te].forEach(ae=>ae(...ne))}}const i$2={decode:function(ee,te){return t$1(this,void 0,void 0,function*(){const ne=new AudioContext({sampleRate:te});try{return yield ne.decodeAudioData(ee)}finally{ne.state!=="closed"&&(yield ne.close().catch(()=>{}))}})},createBuffer:function(ee,te){if(!ee||ee.length===0)throw new Error("channelData must be a non-empty array");if(te<=0)throw new Error("duration must be greater than 0");if(typeof ee[0]=="number"&&(ee=[ee]),!ee[0]||ee[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(ae){const re=ae[0];if(re.some(oe=>oe>1||oe<-1)){const oe=re.length;let ie=0;for(let le=0;le<oe;le++){const ce=Math.abs(re[le]);ce>ie&&(ie=ce)}for(const le of ae)for(let ce=0;ce<oe;ce++)le[ce]/=ie}})(ee);const ne=ee.map(ae=>ae instanceof Float32Array?ae:Float32Array.from(ae));return{duration:te,length:ne[0].length,sampleRate:ne[0].length/te,numberOfChannels:ne.length,getChannelData:ae=>{const re=ne[ae];if(!re)throw new Error(`Channel ${ae} not found`);return re},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function n$1(ee,te){const ne=te.xmlns?document.createElementNS(te.xmlns,ee):document.createElement(ee);for(const[ae,re]of Object.entries(te))if(ae==="children"&&re)for(const[oe,ie]of Object.entries(re))ie instanceof Node?ne.appendChild(ie):typeof ie=="string"?ne.appendChild(document.createTextNode(ie)):ne.appendChild(n$1(oe,ie));else ae==="style"?Object.assign(ne.style,re):ae==="textContent"?ne.textContent=re:ne.setAttribute(ae,re.toString());return ne}function s$2(ee,te,ne){const ae=n$1(ee,te||{});return ne==null||ne.appendChild(ae),ae}function r$1(ee){return ee instanceof HTMLElement||typeof ee=="object"&&ee!==null&&ee.nodeType===Node.ELEMENT_NODE&&typeof ee.style=="object"}var o$1=Object.freeze({__proto__:null,createElement:s$2,default:s$2,isHTMLElement:r$1});const a$2={fetchBlob:function(ee,te,ne){return t$1(this,void 0,void 0,function*(){var ae;const re=yield fetch(ee,ne);if(re.status>=400)throw new Error(`Failed to fetch ${ee}: ${re.status} (${re.statusText})`);return function(oe,ie,le){t$1(this,void 0,void 0,function*(){var ce;if(!oe.body||!oe.headers)return;const de=oe.body.getReader(),ue=Number(oe.headers.get("Content-Length"))||0;let ve=0;const me=()=>{de.cancel()};if(le){if(le.aborted)return void de.cancel();le.addEventListener("abort",me,{once:!0})}try{for(;;){const be=yield de.read();if(be.done)break;if(ve+=((ce=be.value)===null||ce===void 0?void 0:ce.length)||0,ue>0){const fe=Math.round(ve/ue*100);ie(fe)}}}catch(be){if(be instanceof DOMException&&be.name==="AbortError")return;console.warn("Progress tracking error:",be)}finally{le&&le.removeEventListener("abort",me)}})}(re.clone(),te,(ae=ne==null?void 0:ne.signal)!==null&&ae!==void 0?ae:void 0),re.blob()})}};function l$1(ee){let te=ee;const ne=new Set;return{get value(){return te},set(ae){Object.is(te,ae)||(te=ae,ne.forEach(re=>re(te)))},update(ae){this.set(ae(te))},subscribe:ae=>(ne.add(ae),()=>ne.delete(ae))}}function h$4(ee,te){const ne=l$1(ee());return te.forEach(ae=>ae.subscribe(()=>{const re=ee();Object.is(ne.value,re)||ne.set(re)})),{get value(){return ne.value},subscribe:ae=>ne.subscribe(ae)}}function c$1(ee,te){let ne;const ae=()=>{ne&&(ne(),ne=void 0),ne=ee()},re=te.map(oe=>oe.subscribe(ae));return ae(),()=>{ne&&(ne(),ne=void 0),re.forEach(oe=>oe())}}let u$3=class extends e{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(te){super(),this.isExternalMedia=!1,this._ownBlobUrl=null,this.reactiveMediaEventCleanups=[],te.media?(this.media=te.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=l$1(!1),this._currentTime=l$1(0),this._duration=l$1(0),this._volume=l$1(this.media.volume),this._muted=l$1(this.media.muted),this._playbackRate=l$1(this.media.playbackRate||1),this._seeking=l$1(!1),this.setupReactiveMediaEvents(),te.mediaControls&&(this.media.controls=!0),te.autoplay&&(this.media.autoplay=!0),te.playbackRate!=null&&this.onMediaEvent("canplay",()=>{te.playbackRate!=null&&(this.media.playbackRate=te.playbackRate)},{once:!0})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(te,ne,ae){return this.media.addEventListener(te,ne,ae),()=>this.media.removeEventListener(te,ne,ae)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){this._ownBlobUrl&&(URL.revokeObjectURL(this._ownBlobUrl),this._ownBlobUrl=null)}canPlayType(te){return this.media.canPlayType(te)!==""}setSrc(te,ne){const ae=this.getSrc();if(te&&ae===te)return;this.revokeSrc();const re=ne instanceof Blob&&(this.canPlayType(ne.type)||!te)?URL.createObjectURL(ne):te;if(re!==te&&(this._ownBlobUrl=re),ae&&this.media.removeAttribute("src"),re||te)try{this.media.src=re}catch{this.media.src=te}}destroy(){this.reactiveMediaEventCleanups.forEach(te=>te()),this.reactiveMediaEventCleanups=[],this.revokeSrc(),this.unAll(),this.isExternalMedia||(this.media.pause(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(te){this.reactiveMediaEventCleanups.forEach(ne=>ne()),this.reactiveMediaEventCleanups=[],this.media=te,this.setupReactiveMediaEvents()}play(){return t$1(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(te){if(te instanceof DOMException&&te.name==="AbortError")return;throw te}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(te){this.media.currentTime=Math.max(0,Math.min(te,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(te){this.media.volume=te}getMuted(){return this.media.muted}setMuted(te){this.media.muted=te}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(te,ne){ne!=null&&(this.media.preservesPitch=ne),this.media.playbackRate=te}getMediaElement(){return this.media}setSinkId(te){return this.media.setSinkId(te)}};function d$2({maxTop:ee,maxBottom:te,halfHeight:ne,vScale:ae,barMinHeight:re=0,barAlign:oe}){let ie=Math.round(ee*ne*ae),le=ie+Math.round(te*ne*ae)||1;return le<re&&(le=re,oe||(ie=le/2)),{topHeight:ie,totalHeight:le}}function p$2({barAlign:ee,halfHeight:te,topHeight:ne,totalHeight:ae,canvasHeight:re}){return ee==="top"?0:ee==="bottom"?re-ae:te-ne}function m$2(ee,te,ne){const ae=te-ee.left,re=ne-ee.top;return[ae/ee.width,re/ee.height]}function g$2(ee){return!!(ee.barWidth||ee.barGap||ee.barAlign)}function f$3(ee,te){if(!g$2(te))return ee;const ne=te.barWidth||.5,ae=ne+(te.barGap||ne/2);return ae===0?ee:Math.floor(ee/ae)*ae}function v$4({scrollLeft:ee,totalWidth:te,numCanvases:ne}){if(te===0)return[0];const ae=ee/te,re=Math.floor(ae*ne);return[re-1,re,re+1]}function b$2(ee){const te=ee._cleanup;typeof te=="function"&&te()}function y$3(ee){const te=l$1({scrollLeft:ee.scrollLeft,scrollWidth:ee.scrollWidth,clientWidth:ee.clientWidth}),ne=h$4(()=>function(oe){const{scrollLeft:ie,scrollWidth:le,clientWidth:ce}=oe;if(le===0)return{startX:0,endX:1};const de=ie/le,ue=(ie+ce)/le;return{startX:Math.max(0,Math.min(1,de)),endX:Math.max(0,Math.min(1,ue))}}(te.value),[te]),ae=h$4(()=>function(oe){return{left:oe.scrollLeft,right:oe.scrollLeft+oe.clientWidth}}(te.value),[te]),re=()=>{te.set({scrollLeft:ee.scrollLeft,scrollWidth:ee.scrollWidth,clientWidth:ee.clientWidth})};return ee.addEventListener("scroll",re,{passive:!0}),{scrollData:te,percentages:ne,bounds:ae,cleanup:()=>{ee.removeEventListener("scroll",re),b$2(te)}}}let C$2=class extends e{constructor(te,ne){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.containerInlinePadding=0,this.onClickWrapper=ie=>{const le=this.wrapper.getBoundingClientRect(),[ce,de]=m$2(le,ie.clientX,ie.clientY);this.emit("click",ce,de)},this.onDblClickWrapper=ie=>{const le=this.wrapper.getBoundingClientRect(),[ce,de]=m$2(le,ie.clientX,ie.clientY);this.emit("dblclick",ce,de)},this.subscriptions=[],this.options=te;const ae=this.parentFromOptionsContainer(te.container);this.parent=ae;const[re,oe]=this.initHtml();ae.appendChild(re),this.container=re,this.scrollContainer=oe.querySelector(".scroll"),this.wrapper=oe.querySelector(".wrapper"),this.canvasWrapper=oe.querySelector(".canvases"),this.progressWrapper=oe.querySelector(".progress"),this.cursor=oe.querySelector(".cursor"),this.calculateInlinePadding(),ne&&oe.appendChild(ne),this.initEvents()}parentFromOptionsContainer(te){let ne;if(typeof te=="string"?ne=document.querySelector(te):r$1(te)&&(ne=te),!ne)throw new Error("Container not found");return ne}initEvents(){this.wrapper.addEventListener("click",this.onClickWrapper),this.wrapper.addEventListener("dblclick",this.onDblClickWrapper),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=y$3(this.scrollContainer);const te=c$1(()=>{const{startX:ne,endX:ae}=this.scrollStream.percentages.value,{left:re,right:oe}=this.scrollStream.bounds.value;this.emit("scroll",ne,ae,re,oe)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(te),typeof ResizeObserver=="function"){const ne=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{ne().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const te=this.parent.clientWidth;this.calculateInlinePadding(),te===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=te,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=function(ne,ae={}){const{threshold:re=3,mouseButton:oe=0,touchDelay:ie=100}=ae,le=l$1(null),ce=new Map,de=matchMedia("(pointer: coarse)").matches;let ue=()=>{};const ve=me=>{if(me.button!==oe||ce.has(me.pointerId)||(ce.set(me.pointerId,me),ce.size>1))return;const be=me.pointerId;let fe=me.clientX,pe=me.clientY,_e=!1;const ge=Date.now(),ke=ne.getBoundingClientRect(),{left:$e,top:ye}=ke,Ee=Oe=>{if(Oe.pointerId!==be||Oe.defaultPrevented||ce.size>1||de&&Date.now()-ge<ie)return;const Re=Oe.clientX,ze=Oe.clientY,Ve=Re-fe,Ne=ze-pe;(_e||Math.abs(Ve)>re||Math.abs(Ne)>re)&&(Oe.preventDefault(),Oe.stopPropagation(),_e||(le.set({type:"start",x:fe-$e,y:pe-ye}),_e=!0),le.set({type:"move",x:Re-$e,y:ze-ye,deltaX:Ve,deltaY:Ne}),fe=Re,pe=ze)},Se=Oe=>{if(ce.delete(Oe.pointerId)){if(Oe.pointerId===be&&_e){const Re=Oe.clientX,ze=Oe.clientY;le.set({type:"end",x:Re-$e,y:ze-ye})}ce.size===0&&ue()}},Le=Oe=>{Oe.relatedTarget&&Oe.relatedTarget!==document.documentElement||Se(Oe)},Me=Oe=>{_e&&(Oe.stopPropagation(),Oe.preventDefault())},De=Oe=>{Oe.defaultPrevented||ce.size>1||_e&&Oe.preventDefault()};document.addEventListener("pointermove",Ee),document.addEventListener("pointerup",Se),document.addEventListener("pointerout",Le),document.addEventListener("pointercancel",Le),document.addEventListener("touchmove",De,{passive:!1}),document.addEventListener("click",Me,{capture:!0}),ue=()=>{document.removeEventListener("pointermove",Ee),document.removeEventListener("pointerup",Se),document.removeEventListener("pointerout",Le),document.removeEventListener("pointercancel",Le),document.removeEventListener("touchmove",De),setTimeout(()=>{document.removeEventListener("click",Me,{capture:!0})},10)}};return ne.addEventListener("pointerdown",ve),{signal:le,cleanup:()=>{ue(),ne.removeEventListener("pointerdown",ve),ce.clear(),b$2(le)}}}(this.wrapper);const te=c$1(()=>{const ne=this.dragStream.signal.value;if(!ne)return;const ae=this.wrapper.getBoundingClientRect().width,re=(oe=ne.x/ae)<0?0:oe>1?1:oe;var oe;ne.type==="start"?(this.isDragging=!0,this.emit("dragstart",re)):ne.type==="move"?this.emit("drag",re):ne.type==="end"&&(this.isDragging=!1,this.emit("dragend",re))},[this.dragStream.signal]);this.subscriptions.push(te)}calculateInlinePadding(){const{paddingLeft:te,paddingRight:ne}=getComputedStyle(this.scrollContainer),ae=parseFloat(te)+parseFloat(ne);this.containerInlinePadding=Number.isNaN(ae)?0:ae}initHtml(){const te=document.createElement("div"),ne=te.attachShadow({mode:"open"}),ae=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return ne.innerHTML=`
|
|
110
|
+
`;styleInject(css_248z),script.__scopeId="data-v-5784ed69";var entry_esm=(()=>{const ee=script;return ee.install=te=>{te.component("Popper",ee)},ee})();const _hoisted_1$21={class:"sections-header"},_hoisted_2$1M={class:"conversation-tabs","aria-label":"Tipo de conversa"},_hoisted_3$1B=["aria-current","onClick"],_hoisted_4$1p={key:0,class:"tab-count"},_hoisted_5$1h={class:"search-field px-2 flex items-center gap-2 relative"},_hoisted_6$18=["value","placeholder"],_sfc_main$2e={__name:"sectionsHeader",props:{hasUnread:{type:Object,default:()=>({attendants:!1,groups:!1})},currentState:{type:String,default:""},searchQuery:{type:String,default:""}},emits:["update:currentState","update:searchQuery"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.currentState==="groups"),oe=e$b.computed(()=>ne.currentState==="attendants"),ie=e$b.computed(()=>re.value?"Pesquise entre os grupos...":oe.value?"Pesquise entre os atendentes...":"Pesquise..."),le=e$b.computed(()=>[{key:"attendants",label:"Atendentes"},{key:"groups",label:"Grupos"}].map(de=>{var ve;const ue=Number((ve=ne.hasUnread)==null?void 0:ve[de.key])||0;return ue>0?{...de,count:ue}:de})),ce=e$b.computed({get:()=>ne.currentState,set:de=>ae("update:currentState",de)});return(de,ue)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$21,[e$b.createElementVNode("nav",_hoisted_2$1M,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(le.value,ve=>(e$b.openBlock(),e$b.createElementBlock("button",{key:ve.key,type:"button",class:e$b.normalizeClass(["conversation-tab",{active:ce.value===ve.key}]),"aria-current":ce.value===ve.key?"page":void 0,onClick:me=>ce.value=ve.key},[e$b.createElementVNode("span",null,e$b.toDisplayString(ve.label),1),ve.count?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$1p,e$b.toDisplayString(ve.count),1)):e$b.createCommentVNode("",!0)],10,_hoisted_3$1B))),128))]),e$b.createElementVNode("div",_hoisted_5$1h,[ue[3]||(ue[3]=e$b.createElementVNode("svg",{class:"search-icon size-4 absolute top-1/2 -translate-y-1/2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"m21 21-3.5-3.5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"})],-1)),e$b.createElementVNode("input",{value:ee.searchQuery,onInput:ue[0]||(ue[0]=ve=>ae("update:searchQuery",ve.target.value)),class:"search-input bg-base-300 text-base-content w-full text-sm",placeholder:ie.value},null,40,_hoisted_6$18),ee.searchQuery?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,type:"button",class:"clear-search","aria-label":"Limpar busca",onClick:ue[1]||(ue[1]=ve=>ae("update:searchQuery",""))},[...ue[2]||(ue[2]=[e$b.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[e$b.createElementVNode("path",{d:"m7 7 10 10M17 7 7 17",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])])):e$b.createCommentVNode("",!0)])]))}},SectionsHeader=_export_sfc$1(_sfc_main$2e,[["__scopeId","data-v-6bad30c7"]]),_hoisted_1$20=["title"],_hoisted_2$1L={key:0,class:"legendary-bg","aria-hidden":"true"},_hoisted_3$1A={key:1,class:"secret-bg","aria-hidden":"true"},_hoisted_4$1o={key:2,class:"relative z-10 leading-none"},_hoisted_5$1g={key:3,class:"relative z-10 size-1/2 text-base-content/35",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","aria-hidden":"true"},_sfc_main$2d={__name:"AchievementBadge",props:{achievement:{type:Object,default:null},size:{type:String,default:"md",validator:ee=>["sm","md","lg"].includes(ee)},showLabel:{type:Boolean,default:!1},secretHidden:{type:Boolean,default:!1}},setup(ee){const te=ee,ne={sm:{token:"size-8",icon:"text-sm",label:"text-[11px]"},md:{token:"size-9",icon:"text-lg",label:"text-xs"},lg:{token:"size-11",icon:"text-xl",label:"text-[13px]"}},ae=e$b.computed(()=>ne[te.size]||ne.md),re=e$b.computed(()=>{var me;return((me=te.achievement)==null?void 0:me.rarity)||null}),oe=e$b.computed(()=>re.value==="legendary"),ie=e$b.computed(()=>{var me;return((me=te.achievement)==null?void 0:me.rarity)==="secret"}),le=e$b.computed(()=>{var me;return((me=RARITIES[re.value])==null?void 0:me.badge)||"text-base-content/35"}),ce=e$b.computed(()=>{var me;return te.secretHidden?"?":((me=te.achievement)==null?void 0:me.icon)||""}),de=e$b.computed(()=>!!ce.value),ue=e$b.computed(()=>{var me;return((me=te.achievement)==null?void 0:me.name)||"Nenhuma"}),ve=e$b.computed(()=>{var me;return(me=te.achievement)!=null&&me.icon?`Conquista: ${te.achievement.name}`:"Sem conquista"});return(me,be)=>(e$b.openBlock(),e$b.createElementBlock("span",{class:e$b.normalizeClass(["inline-flex min-w-0 items-center",ee.showLabel?"flex-col justify-center gap-1.5 text-center":""]),title:ve.value},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["badge-shell relative inline-grid shrink-0 place-items-center p-px",ae.value.token])},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["badge-core relative grid size-full place-items-center overflow-hidden",[le.value,ae.value.icon,ie.value?"secret-core":""]])},[oe.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$1L)):e$b.createCommentVNode("",!0),ie.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$1A)):e$b.createCommentVNode("",!0),de.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$1o,e$b.toDisplayString(ce.value),1)):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_5$1g,[...be[0]||(be[0]=[e$b.createElementVNode("path",{"stroke-linecap":"round",d:"M6 12h12"},null,-1)])]))],2),be[1]||(be[1]=e$b.createElementVNode("span",{class:"badge-glint pointer-events-none absolute inset-[14%]","aria-hidden":"true"},null,-1))],2),ee.showLabel?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["max-w-full truncate text-center font-medium leading-tight text-base-content/85",ae.value.label])},e$b.toDisplayString(ue.value),3)):e$b.createCommentVNode("",!0)],10,_hoisted_1$20))}},AchievementBadge=_export_sfc$1(_sfc_main$2d,[["__scopeId","data-v-8128142d"]]),_sfc_main$2c={__name:"GameAchievementToken",props:{achievement:{type:Object,default:null},size:{type:String,default:"md",validator:ee=>["sm","md","lg"].includes(ee)},showLabel:{type:Boolean,default:!1}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createBlock(AchievementBadge,{achievement:ee.achievement,size:ee.size,"show-label":ee.showLabel},null,8,["achievement","size","show-label"]))}},_hoisted_1$1$=["title"],_hoisted_2$1K={class:"truncate pr-0.5"},_sfc_main$2b={__name:"GameTitle",props:{title:{type:Object,default:null},size:{type:String,default:"md",validator:ee=>["sm","md","lg","xl"].includes(ee)},align:{type:String,default:"center",validator:ee=>["center","start"].includes(ee)},tooltip:{type:Boolean,default:!0}},setup(ee){const te=ee,ne={sm:"text-xs",md:"text-[13px]",lg:"text-sm",xl:"text-[15px]"},ae=e$b.computed(()=>te.align==="start"?"justify-start text-left":"justify-center text-center");return(re,oe)=>ee.title?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["game-title inline-flex max-w-full font-semibold italic leading-snug tracking-[0.02em] text-primary",[ne[te.size],ae.value]]),title:ee.tooltip?`Título: ${ee.title.name}`:void 0},[e$b.createElementVNode("span",_hoisted_2$1K,e$b.toDisplayString(ee.title.name),1)],10,_hoisted_1$1$)):e$b.createCommentVNode("",!0)}},_hoisted_1$1_={key:0,class:"avatar-halo pointer-events-none absolute -inset-1.5 rounded-full bg-primary/25 blur-md","aria-hidden":"true"},_hoisted_2$1J={key:1,class:"edit-badge absolute -right-0.5 -top-0.5 z-10 grid size-6 place-items-center rounded-full text-white shadow-md transition group-hover:scale-110","aria-hidden":"true"},_hoisted_3$1z={class:"relative min-w-0 flex-1"},_hoisted_4$1n={class:"mb-1 flex items-center justify-between"},_hoisted_5$1f={class:"text-[11px] font-bold tabular-nums text-base-content/60"},_hoisted_6$17={class:"mt-1.5 text-xs text-base-content/70"},_hoisted_7$11={class:"font-bold text-base-content"},_hoisted_8$W={class:"font-bold text-base-content"},_hoisted_9$S={class:"min-w-0 flex-1"},_hoisted_10$N={class:"block truncate text-sm font-bold text-base-content"},_hoisted_11$H={class:"relative shrink-0"},_hoisted_12$D={key:0,class:"halo pointer-events-none absolute -inset-2 rounded-full bg-primary/20 blur-md","aria-hidden":"true"},_hoisted_13$y={key:0,class:"edit-scrim absolute inset-0 flex flex-col items-center justify-center gap-0.5 rounded-full bg-base-300/75 opacity-0 backdrop-blur-[2px] transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100","aria-hidden":"true"},_hoisted_14$x={key:0,class:"inline-flex min-w-0 items-center gap-2"},_hoisted_15$u={class:"max-w-48 truncate text-xs font-medium text-base-content/80"},_hoisted_16$r={key:2,class:"mt-1.5 flex w-full min-w-0 items-center gap-2"},_hoisted_17$k={class:"shrink-0 text-[10px] font-bold tabular-nums text-base-content/55"},_hoisted_18$k={key:0,class:"mt-1"},_sfc_main$2a={__name:"GameIdentity",props:{name:{type:String,required:!0},photo:{type:String,default:""},level:{type:Number,default:null},variant:{type:String,default:"hero",validator:ee=>["hero","panel","compact","card"].includes(ee)},editable:{type:Boolean,default:!1},embedded:{type:Boolean,default:!1},avatarSize:{type:String,default:null,validator:ee=>ee==null||["xs","sm","md","lg","xl","preview"].includes(ee)},effectLevel:{type:String,default:"border",validator:ee=>["full","compact","border"].includes(ee)},frame:{type:Object,default:null},title:{type:Object,default:null},achievement:{type:Object,default:null},progress:{type:Object,default:null},dense:{type:Boolean,default:!1}},emits:["edit"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.variant==="hero"),oe=e$b.computed(()=>ne.variant==="panel"),ie=e$b.computed(()=>ne.variant==="compact"),le=e$b.computed(()=>ne.variant==="card"),ce=e$b.computed(()=>ne.dense&&le.value),de=e$b.computed(()=>ne.avatarSize||(ce.value?"md":"lg")),ue=e$b.computed(()=>ne.avatarSize||(re.value?"lg":oe.value?"xl":"md")),ve=e$b.computed(()=>ne.title||null),me=e$b.computed(()=>{var Pe;return(Pe=ne.achievement)!=null&&Pe.icon?ne.achievement:null}),be=e$b.computed(()=>ne.editable&&!le.value),fe=e$b.computed(()=>{var Be,Ae;const Pe=(Ae=(Be=resolveFrameVisual(ne.frame))==null?void 0:Be.ring)==null?void 0:Ae.colors;return{"--sm-profile-frame-primary":(Pe==null?void 0:Pe[0])||"rgb(var(--primary-rgb))","--sm-profile-frame-secondary":(Pe==null?void 0:Pe[1])||"rgb(var(--primary-rgb))","--sm-profile-frame-accent":(Pe==null?void 0:Pe[2])||"rgb(var(--primary-rgb))"}}),pe=e$b.computed(()=>{const Pe=ne.progress;return!!Pe&&Number(Pe.xp_for_next)>0}),_e=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.xp_into_level)??0)}),ge=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.xp_for_next)??0)}),ke=e$b.computed(()=>Math.max(0,ge.value-_e.value)),$e=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.level)??ne.level??1)+1}),ye=e$b.computed(()=>{const Pe=ne.progress;if(!Pe)return 0;const Be=Number.isFinite(Number(Pe.progress_pct))?Number(Pe.progress_pct):_e.value/(ge.value||1)*100;return Math.max(0,Math.min(100,Math.round(Be)))}),Ee=Pe=>Number(Pe||0).toLocaleString("pt-BR"),Se=e$b.ref(!1),Le=e$b.ref(!1);let Me=null,De=null;const Oe=e$b.computed(()=>{var Pe;return Number(((Pe=ne.progress)==null?void 0:Pe.level)??ne.level??0)});function Re(Pe,Be,Ae){return clearTimeout(Be),Pe.value=!1,e$b.nextTick(()=>{Pe.value=!0}),setTimeout(()=>{Pe.value=!1},Ae)}e$b.watch([ye,Oe],([Pe,Be],[Ae,xe])=>{var Ce;pe.value&&((Ce=window.matchMedia)!=null&&Ce.call(window,"(prefers-reduced-motion: reduce)").matches||(Be>xe&&xe>0?De=Re(Le,De,1e3):Pe>Ae&&(Me=Re(Se,Me,760))))}),e$b.onBeforeUnmount(()=>{clearTimeout(Me),clearTimeout(De)});function ze(Pe){const Be=Pe.trim(),Ae=Be.match(/^#([0-9a-fA-F]{3,8})$/);if(Ae){let Ce=Ae[1];return(Ce.length===3||Ce.length===4)&&(Ce=Ce.split("").map(Fe=>Fe+Fe).join("")),{r:parseInt(Ce.slice(0,2),16),g:parseInt(Ce.slice(2,4),16),b:parseInt(Ce.slice(4,6),16)}}const xe=Be.match(/^rgba?\(([^)]+)\)$/i);if(xe){const Ce=xe[1].split(/[\s,/]+/).map(Number).filter(Fe=>!Number.isNaN(Fe));if(Ce.length>=3)return{r:Ce[0],g:Ce[1],b:Ce[2]}}return null}function Ve(Pe){if(!Pe||typeof Pe!="string")return null;const Be=Pe.match(/#[0-9a-fA-F]{3,8}|rgba?\([^)]*\)/gi);if(!Be)return null;let Ae=null,xe=-1;for(const Ce of Be){const Fe=ze(Ce);if(!Fe)continue;const Ie=Math.max(Fe.r,Fe.g,Fe.b),qe=Math.min(Fe.r,Fe.g,Fe.b),Ge=(Ie-qe)*2+Ie;Ge>xe&&(xe=Ge,Ae=Fe)}return Ae?`rgb(${Ae.r} ${Ae.g} ${Ae.b})`:null}const Ne=e$b.computed(()=>{var Be,Ae,xe,Ce,Fe;const Pe=((Ae=(Be=ne.frame)==null?void 0:Be.visual)==null?void 0:Ae.css)||((xe=ne.frame)==null?void 0:xe.css)||((Ce=ne.frame)==null?void 0:Ce.background)||((Fe=ne.frame)==null?void 0:Fe.gradient)||null;return Ve(Pe)||"rgb(var(--primary-rgb))"});return(Pe,Be)=>le.value?(e$b.openBlock(),e$b.createElementBlock("article",{key:0,class:e$b.normalizeClass(["game-identity-card plate relative text-left",[ee.embedded?"game-identity-card--embedded":"p-4",ce.value?"game-identity-card--dense":""]]),style:e$b.normalizeStyle(fe.value)},[Be[7]||(Be[7]=e$b.createElementVNode("div",{class:"card-glow pointer-events-none absolute -left-8 -top-10 size-32 rounded-full","aria-hidden":"true"},null,-1)),e$b.createElementVNode("div",{class:e$b.normalizeClass(["relative flex min-w-0 items-center",ce.value?"gap-3":"gap-4"])},[(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(ee.editable?"button":"div"),{type:ee.editable?"button":void 0,class:"edit-avatar group relative block shrink-0 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-base-300","aria-label":ee.editable?"Personalizar identidade":void 0,title:ee.editable?"Personalizar identidade":void 0,onClick:Be[0]||(Be[0]=Ae=>ee.editable&&ae("edit"))},{default:e$b.withCtx(()=>[ee.editable?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_1$1_)):e$b.createCommentVNode("",!0),e$b.createVNode(Avatar,{name:ee.name,photo:ee.photo,level:ee.level,frame:ee.frame,size:de.value,"effect-level":ee.effectLevel},null,8,["name","photo","level","frame","size","effect-level"]),ee.editable?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$1J,[...Be[2]||(Be[2]=[e$b.createElementVNode("svg",{class:"size-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M14 4.182A4.136 4.136 0 0 1 16.9 3c1.087 0 2.13.425 2.899 1.182A4.01 4.01 0 0 1 21 7.037c0 1.068-.43 2.092-1.194 2.849L18.5 11.214l-5.8-5.71 1.287-1.31.012-.012Zm-2.717 2.763L6.186 12.13l2.175 2.141 5.063-5.218-2.141-2.108Zm-6.25 6.886-1.98 5.849a.992.992 0 0 0 .245 1.026 1.03 1.03 0 0 0 1.043.242L10.282 19l-5.25-5.168Zm6.954 4.01 5.096-5.186-2.218-2.183-5.063 5.218 2.185 2.15Z","clip-rule":"evenodd"})],-1)])])):e$b.createCommentVNode("",!0)]),_:1},8,["type","aria-label","title"])),e$b.createElementVNode("div",_hoisted_3$1z,[e$b.createElementVNode("p",{class:e$b.normalizeClass(["truncate font-extrabold leading-tight tracking-tight",ce.value?"text-lg":"text-xl"])},e$b.toDisplayString(ee.name),3),ve.value?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:0,title:ve.value,size:ce.value?"md":"lg",align:"start",class:"mt-0.5 text-start"},null,8,["title","size"])):e$b.createCommentVNode("",!0)])],2),pe.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["relative",ce.value?"mt-3":"mt-4"])},[e$b.createElementVNode("div",_hoisted_4$1n,[Be[3]||(Be[3]=e$b.createElementVNode("span",{class:"text-[10px] font-bold uppercase tracking-wider text-base-content/45"}," Progresso de nível ",-1)),e$b.createElementVNode("span",_hoisted_5$1f,e$b.toDisplayString(Ee(_e.value))+" / "+e$b.toDisplayString(Ee(ge.value))+" XP ",1)]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-track",{"xp-track--burst":Le.value}])},[e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-fill smplay-blocks",{"xp-fill--gain":Se.value}]),style:e$b.normalizeStyle({width:`${ye.value}%`,background:Ne.value})},null,6),Le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"xp-burst",style:e$b.normalizeStyle({background:Ne.value}),"aria-hidden":"true"},null,4)):e$b.createCommentVNode("",!0)],2),e$b.createElementVNode("p",_hoisted_6$17,[Be[4]||(Be[4]=e$b.createTextVNode(" Faltam ",-1)),e$b.createElementVNode("strong",_hoisted_7$11,e$b.toDisplayString(Ee(ke.value))+" XP",1),Be[5]||(Be[5]=e$b.createTextVNode(" pro ",-1)),e$b.createElementVNode("strong",_hoisted_8$W,"Nível "+e$b.toDisplayString($e.value),1)])],2)):e$b.createCommentVNode("",!0),me.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["achievement-strip relative flex min-w-0 items-center gap-3",ce.value?"mt-3 p-2":"mt-4 p-2.5"])},[e$b.createVNode(_sfc_main$2c,{achievement:me.value,size:"sm"},null,8,["achievement"]),e$b.createElementVNode("span",_hoisted_9$S,[Be[6]||(Be[6]=e$b.createElementVNode("span",{class:"block text-[10px] font-bold uppercase tracking-wider text-primary/70"}," Conquista em destaque ",-1)),e$b.createElementVNode("span",_hoisted_10$N,e$b.toDisplayString(me.value.name),1)])],2)):e$b.createCommentVNode("",!0),Pe.$slots.footer?(e$b.openBlock(),e$b.createElementBlock("div",{key:2,class:e$b.normalizeClass(["relative",ce.value?"mt-2.5":"mt-3"])},[e$b.renderSlot(Pe.$slots,"footer",{},void 0,!0)],2)):e$b.createCommentVNode("",!0)],6)):(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["game-identity flex min-w-0",re.value?"w-full items-center gap-4 text-left sm:gap-5":oe.value?"flex-col items-center gap-4 text-center":"w-full items-center gap-3 text-left"])},[e$b.createElementVNode("div",_hoisted_11$H,[re.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$D)):e$b.createCommentVNode("",!0),(e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(be.value?"button":"div"),{type:be.value?"button":void 0,class:"group relative block rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-base-300","aria-label":be.value?"Personalizar identidade":void 0,title:be.value?"Personalizar identidade":void 0,onClick:Be[1]||(Be[1]=Ae=>be.value&&ae("edit"))},{default:e$b.withCtx(()=>[e$b.createVNode(Avatar,{name:ee.name,photo:ee.photo,level:ee.level,size:ue.value,frame:ee.frame,"effect-level":ee.effectLevel},null,8,["name","photo","level","size","frame","effect-level"]),be.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_13$y,[...Be[8]||(Be[8]=[e$b.createElementVNode("svg",{class:"size-5 text-base-content",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.86 4.49a1.9 1.9 0 1 1 2.7 2.68L8.4 18.33l-3.65.97.97-3.65L16.86 4.49Z"})],-1),e$b.createElementVNode("span",{class:"text-[10px] font-semibold uppercase tracking-wide text-base-content/80"},"Editar",-1)])])):e$b.createCommentVNode("",!0)]),_:1},8,["type","aria-label","title"]))]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["flex min-w-0 flex-col",oe.value?"max-w-full items-center":"min-w-0 flex-1 items-start"])},[e$b.createElementVNode("p",{class:e$b.normalizeClass(["max-w-full truncate leading-tight",re.value?"text-2xl font-bold tracking-tight":"text-base font-semibold"])},e$b.toDisplayString(ee.name),3),ve.value?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:0,title:ve.value,size:re.value?"lg":"md",class:"mt-1"},null,8,["title","size"])):e$b.createCommentVNode("",!0),me.value||Pe.$slots.chips?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["flex flex-wrap items-center gap-2",[ie.value?"mt-1.5":"mt-3",oe.value?"justify-center":"justify-start"]])},[me.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_14$x,[e$b.createVNode(_sfc_main$2c,{achievement:me.value,size:"sm"},null,8,["achievement"]),e$b.createElementVNode("span",_hoisted_15$u,e$b.toDisplayString(me.value.name),1)])):e$b.createCommentVNode("",!0),e$b.renderSlot(Pe.$slots,"chips",{},void 0,!0)],2)):e$b.createCommentVNode("",!0),ie.value&&pe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_16$r,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-track xp-track--slim min-w-0 flex-1",{"xp-track--burst":Le.value}])},[e$b.createElementVNode("div",{class:e$b.normalizeClass(["xp-fill smplay-blocks",{"xp-fill--gain":Se.value}]),style:e$b.normalizeStyle({width:`${ye.value}%`,background:Ne.value})},null,6),Le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"xp-burst",style:e$b.normalizeStyle({background:Ne.value}),"aria-hidden":"true"},null,4)):e$b.createCommentVNode("",!0)],2),e$b.createElementVNode("span",_hoisted_17$k,e$b.toDisplayString(Ee(ke.value))+" XP → Nv "+e$b.toDisplayString($e.value),1)])):e$b.createCommentVNode("",!0)],2),oe.value&&Pe.$slots.default?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$k,[e$b.renderSlot(Pe.$slots,"default",{},void 0,!0)])):e$b.createCommentVNode("",!0)],2))}},GameIdentity=_export_sfc$1(_sfc_main$2a,[["__scopeId","data-v-8958acce"]]),_hoisted_1$1Z={key:1,class:"sm-game-details"},_hoisted_2$1I={class:"sm-game-name"},_hoisted_3$1y={class:"sm-game-meta"},_hoisted_4$1m=["title"],_hoisted_5$1e={class:"sm-game-achievement-name"},_hoisted_6$16={key:2,class:"sm-game-fallback"},_sfc_main$29={__name:"AttendantGameIdentity",props:{attendant:{type:Object,default:()=>({})},variant:{type:String,default:"list",validator:ee=>["avatar","list","header","message"].includes(ee)},showLevel:{type:Boolean,default:!0},showAvatar:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showAchievement:{type:Boolean,default:!0},fallbackMeta:{type:String,default:""},frame:{type:Object,default:void 0},title:{type:Object,default:void 0},hoverPreview:{type:Boolean,default:!1},hoverDelay:{type:Number,default:420},avatarSize:{type:String,default:"auto",validator:ee=>["auto","xs","sm","md","lg"].includes(ee)},effectLevel:{type:String,default:"border",validator:ee=>["full","compact","border"].includes(ee)},isGroup:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>resolveAttendantGamification(te.attendant)),ae=e$b.computed(()=>te.frame!==void 0?te.frame:ne.value.frame),re=e$b.computed(()=>te.title!==void 0?te.title:ne.value.title),oe=e$b.computed(()=>te.avatarSize!=="auto"?te.avatarSize:te.variant==="avatar"?"xs":["list","message"].includes(te.variant)?"sm":"md"),ie=e$b.computed(()=>te.variant!=="avatar"),le=e$b.ref(null),ce=e$b.ref(!1),de=e$b.ref({}),ue=e$b.ref("top");let ve=null,me=null;function be(){te.hoverPreview&&(window.clearTimeout(me),!ce.value&&(window.clearTimeout(ve),ve=window.setTimeout(()=>{ve=null,fe()},Math.max(0,te.hoverDelay))))}function fe(){var Oe;if(!te.hoverPreview)return;window.clearTimeout(me);const ge=(Oe=le.value)==null?void 0:Oe.getBoundingClientRect();if(!ge)return;const ke=8,$e=Math.min(360,window.innerWidth-ke*2),ye=180,Ee=7,Se=window.innerWidth-$e-ke,Le=Math.max(ke,Math.min(ge.left,Se)),Me=ge.top>=ye+Ee+ke;ue.value=Me?"top":"bottom";const De={left:`${Le}px`,width:`${$e}px`};de.value=Me?{...De,bottom:`${window.innerHeight-ge.top+Ee}px`}:{...De,top:`${ge.bottom+Ee}px`},ce.value=!0}function pe(){window.clearTimeout(ve),ve=null,ce.value&&(window.clearTimeout(me),me=window.setTimeout(()=>ce.value=!1,120))}function _e(){window.clearTimeout(ve),window.clearTimeout(me)}return e$b.onBeforeUnmount(()=>{window.clearTimeout(ve),window.clearTimeout(me)}),(ge,ke)=>{var $e,ye,Ee,Se,Le,Me,De;return e$b.openBlock(),e$b.createElementBlock("div",{ref_key:"triggerRef",ref:le,class:e$b.normalizeClass(["sm-game-identity",`sm-game-identity--${ee.variant}`]),onMouseenter:be,onMouseleave:pe},[ee.showAvatar?(e$b.openBlock(),e$b.createBlock(Avatar,{key:0,name:(($e=ee.attendant)==null?void 0:$e.name)||"Atendente",photo:((ye=ee.attendant)==null?void 0:ye.photo)||"",level:ne.value.level,frame:ae.value,"show-level":ee.showLevel,size:oe.value,"effect-level":ee.effectLevel},null,8,["name","photo","level","frame","show-level","size","effect-level"])):e$b.createCommentVNode("",!0),ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1Z,[e$b.createElementVNode("span",_hoisted_2$1I,e$b.toDisplayString(((Ee=ee.attendant)==null?void 0:Ee.name)||"Atendente"),1),e$b.createElementVNode("span",_hoisted_3$1y,[ee.showTitle&&((Se=re.value)!=null&&Se.name)?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:0,title:re.value,size:"sm",class:"sm-game-title justify-start text-left text-primary"},null,8,["title"])):e$b.createCommentVNode("",!0),ee.showAchievement&&((Le=ne.value.achievement)!=null&&Le.name)?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"sm-game-achievement",title:ne.value.achievement.name},[e$b.createVNode(_sfc_main$2c,{achievement:ne.value.achievement,size:"sm"},null,8,["achievement"]),e$b.createElementVNode("span",_hoisted_5$1e,e$b.toDisplayString(ne.value.achievement.name),1)],8,_hoisted_4$1m)):e$b.createCommentVNode("",!0),ee.fallbackMeta&&!(ee.showTitle&&((Me=re.value)!=null&&Me.name))&&!(ee.showAchievement&&((De=ne.value.achievement)!=null&&De.name))?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$16,e$b.toDisplayString(ee.fallbackMeta),1)):e$b.createCommentVNode("",!0)])])):e$b.createCommentVNode("",!0),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(e$b.Transition,{name:"sm-profile-preview"},{default:e$b.withCtx(()=>{var Oe,Re;return[ce.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["sm-profile-preview",`sm-profile-preview--${ue.value}`]),style:e$b.normalizeStyle(de.value),onMouseenter:_e,onMouseleave:pe},[e$b.createVNode(GameIdentity,{variant:"card",embedded:"",name:((Oe=ee.attendant)==null?void 0:Oe.name)||"Atendente",photo:((Re=ee.attendant)==null?void 0:Re.photo)||"",level:ne.value.level,frame:ae.value,title:re.value,achievement:ne.value.achievement,"avatar-size":"preview","effect-level":"full"},null,8,["name","photo","level","frame","title","achievement"])],38)):e$b.createCommentVNode("",!0)]}),_:1})]))],34)}}},AttendantGameIdentity=_export_sfc$1(_sfc_main$29,[["__scopeId","data-v-024ef36b"]]),PRESENCE={Online:{key:"online",label:"Online",color:"rgb(var(--success-rgb))"},Busy:{key:"busy",label:"Ocupado",color:"rgb(var(--error-rgb))"},Away:{key:"away",label:"Ausente",color:"rgb(var(--warning-rgb))"},Offline:{key:"offline",label:"Offline",color:"rgb(148 163 184)"}};function resolvePresence(ee){return PRESENCE[ee]||PRESENCE.Offline}function normalizeUnreadValue(ee,te){return typeof ee=="number"?ee:ee&&typeof ee=="object"&&te?Number(ee[te])||0:Number(ee)||0}function shouldIncrementUnread({isChatVisible:ee,selectedChannelId:te,messageChannelId:ne,senderId:ae,currentAttendantId:re}){return re&&ae===re?!1:!ee||!(!!te&&te===ne)}function getConversationMessages(ee){var te;return ee?ee.is_group?((te=ee.chat_info)==null?void 0:te.messages)||[]:ee.messages||[]:[]}const EMOJI_ONLY_PATTERN=new RegExp("^(?:\\p{Extended_Pictographic}|\\p{Emoji_Modifier}|\\p{Regional_Indicator}|\\uFE0F|\\u200D|\\s)+$","u");function countGraphemes$1(ee){if(typeof Intl<"u"&&typeof Intl.Segmenter=="function"){const te=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(te.segment(ee)).length}return Array.from(ee).length}function isEmojiOnlyText(ee,te=3){const ne=String(ee??"").trim();return!ne||!EMOJI_ONLY_PATTERN.test(ne)?!1:countGraphemes$1(ne.replace(/\s/g,""))<=te}const RUN_BREAK_MS=12e4;function isRunStart(ee,te){var ie,le,ce;const ne=ee==null?void 0:ee[te];if(!((ie=ne==null?void 0:ne.sender)!=null&&ie.id)||((le=ne.content)==null?void 0:le.type)==="system")return!1;const ae=ee[te-1];if(!((ce=ae==null?void 0:ae.sender)!=null&&ce.id)||ae.sender.id!==ne.sender.id)return!0;const re=new Date(ne.created_at).getTime(),oe=new Date(ae.created_at).getTime();return!Number.isFinite(re)||!Number.isFinite(oe)||re-oe>RUN_BREAK_MS}function groupMessagesByDay(ee=[],te={}){const{formatLabel:ne=()=>"",firstUnreadId:ae=null}=te,re=[];return ee.forEach((oe,ie)=>{var ve,me,be;const le=new Date(oe.created_at),ce=Number.isFinite(le.getTime())?le.toDateString():`no-date-${ie}`,de={msg:oe,index:ie,isLast:ie===ee.length-1,showSender:isRunStart(ee,ie),isFirstUnread:!!ae&&oe.id===ae,isEmojiOnly:!((me=(ve=oe.content)==null?void 0:ve.media)!=null&&me.data)&&isEmojiOnlyText((be=oe.content)==null?void 0:be.content)},ue=re[re.length-1];if((ue==null?void 0:ue.key)===ce){ue.items.push(de);return}re.push({key:ce,label:ne(oe.created_at),items:[de]})}),re}const URL_PATTERN=/(?:https?:\/\/|www\.)[^\s<]+/gi,TRAILING_PUNCTUATION=/[.,;:!?)\]}]+$/;function linkifyText(ee){const te=String(ee??"");if(!te)return[];const ne=[];let ae=0,re;for(URL_PATTERN.lastIndex=0;(re=URL_PATTERN.exec(te))!==null;){const oe=re[0].replace(TRAILING_PUNCTUATION,"");oe&&(re.index>ae&&ne.push({type:"text",value:te.slice(ae,re.index)}),ne.push({type:"link",value:oe,href:oe.toLowerCase().startsWith("www.")?`https://${oe}`:oe}),ae=re.index+oe.length,URL_PATTERN.lastIndex=ae)}return ae<te.length&&ne.push({type:"text",value:te.slice(ae)}),ne}const _hoisted_1$1Y=["aria-busy"],_hoisted_2$1H={key:1,class:"empty-state"},_hoisted_3$1x={class:"empty-state-icon"},_hoisted_4$1l={key:0,class:"size-6","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_5$1d={key:1,class:"size-6","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_6$15={class:"empty-copy"},_hoisted_7$10=["onClick","aria-current"],_hoisted_8$V={key:0,class:"game-conversation-identity"},_hoisted_9$R=["title"],_hoisted_10$M={class:"conversation-avatar"},_hoisted_11$G=["title"],_hoisted_12$C={class:"conversation-copy"},_hoisted_13$x={class:"conversation-name"},_hoisted_14$w={key:2,class:"message-indicator"},_hoisted_15$t=["title"],_hoisted_16$q={key:2,class:"loading-more","aria-label":"Carregando mais grupos"},_sfc_main$28={__name:"mountListForType",props:{content:{type:Array,default:()=>[]},mode:{type:String,default:!1},loader:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},currentAttendantId:{type:[String,Number],default:null}},emits:["load-more"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.mode==="groups"),oe=e$b.inject("useChat"),ie=e$b.inject("selectedConversation",null),le=e$b.inject("smPlayEnabled",e$b.computed(()=>!1)),ce=ge=>{typeof oe.selectChatToOpen=="function"&&oe.selectChatToOpen(ge)},de=()=>{var ge;return(ge=oe.openCreateOrEdit)==null?void 0:ge.call(oe,"create")},ue=ge=>{var Ee,Se;const ke=ie==null?void 0:ie.value;if(!ke)return!1;const $e=((Ee=ke.internal_chat)==null?void 0:Ee.channel_id)||ke.id,ye=((Se=ge.internal_chat)==null?void 0:Se.channel_id)||ge.id;return $e===ye},ve=ge=>{const ke=ge.currentTarget;!ke||ne.loadingMore||ke.scrollHeight-ke.scrollTop-ke.clientHeight<96&&ae("load-more")},me=ge=>{var ke;return normalizeUnreadValue((ke=ge==null?void 0:ge.internal_chat)==null?void 0:ke.unread,ne.currentAttendantId)},be=ge=>resolvePresence(ge==null?void 0:ge.login_status),fe=ge=>{var $e,ye;const ke=(($e=ge==null?void 0:ge.internal_chat)==null?void 0:$e.channel_id)||(ge==null?void 0:ge.id);return((ye=oe==null?void 0:oe.getDraft)==null?void 0:ye.call(oe,ke))||""},pe=ge=>!!fe(ge)&&!ue(ge),_e=ge=>{var ke;if(pe(ge))return`Rascunho: ${fe(ge)}`;if(re.value){const $e=((ke=ge==null?void 0:ge.participants)==null?void 0:ke.length)||0;return $e===1?"1 membro":`${$e} membros`}return be(ge).label};return(ge,ke)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("ul",{class:e$b.normalizeClass(["attendants-list hide-scrollbar bg-base-300",{"has-floating-action":re.value}]),"aria-busy":ee.loader||ee.loadingMore,onScrollPassive:ve},[ee.loader&&ee.content.length===0?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},e$b.renderList(6,$e=>e$b.createElementVNode("li",{key:`conversation-skeleton-${$e}`,class:"list-entry"},[...ke[0]||(ke[0]=[e$b.createElementVNode("div",{class:"conversation-skeleton","aria-hidden":"true"},[e$b.createElementVNode("span",{class:"skeleton-avatar"}),e$b.createElementVNode("span",{class:"skeleton-copy"},[e$b.createElementVNode("i"),e$b.createElementVNode("i")])],-1)])])),64)):ee.content.length===0?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_2$1H,[e$b.createElementVNode("div",_hoisted_3$1x,[re.value?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_4$1l,[...ke[1]||(ke[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 6a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm-1.5 8a4 4 0 0 0-4 4 2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-3Zm6.82-3.096a5.51 5.51 0 0 0-2.797-6.293 3.5 3.5 0 1 1 2.796 6.292ZM19.5 18h.5a2 2 0 0 0 2-2 4 4 0 0 0-4-4h-1.1a5.503 5.503 0 0 1-.471.762A5.998 5.998 0 0 1 19.5 18ZM4 7.5a3.5 3.5 0 0 1 5.477-2.889 5.5 5.5 0 0 0-2.796 6.293A3.501 3.501 0 0 1 4 7.5ZM7.1 12H6a4 4 0 0 0-4 4 2 2 0 0 0 2 2h.5a5.998 5.998 0 0 1 3.071-5.238A5.505 5.505 0 0 1 7.1 12Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_5$1d,[...ke[2]||(ke[2]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-4Z","clip-rule":"evenodd"},null,-1)])]))]),e$b.createElementVNode("p",_hoisted_6$15,e$b.toDisplayString(re.value?"não há grupos disponíveis":"não há atendentes disponíveis"),1)])):e$b.createCommentVNode("",!0),(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.content,$e=>(e$b.openBlock(),e$b.createElementBlock("li",{key:$e.id,class:"list-entry"},[e$b.createElementVNode("button",{type:"button",onClick:ye=>ce($e),"aria-current":ue($e)?"true":void 0,class:e$b.normalizeClass(["attendant-item",$e.isMoved?"moved":"",ue($e)?"selected":""])},[e$b.unref(le)&&!re.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$V,[e$b.createVNode(AttendantGameIdentity,{attendant:$e,variant:"list","avatar-size":"sm","show-level":!0,"show-achievement":!1,"fallback-meta":be($e).label,"hover-preview":""},null,8,["attendant","fallback-meta"]),e$b.createElementVNode("i",{class:"status-indicator",style:e$b.normalizeStyle({backgroundColor:be($e).color}),title:be($e).label},null,12,_hoisted_9$R)])):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createElementVNode("span",_hoisted_10$M,[e$b.createVNode(Avatar,{photo:$e.photo,name:$e.name,size:"fill",class:"size-full"},null,8,["photo","name"]),re.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("i",{key:0,class:"status-indicator",style:e$b.normalizeStyle({backgroundColor:be($e).color}),title:be($e).label},null,12,_hoisted_11$G))]),e$b.createElementVNode("span",_hoisted_12$C,[e$b.createElementVNode("strong",_hoisted_13$x,e$b.toDisplayString($e.name),1),e$b.createElementVNode("span",{class:e$b.normalizeClass(["conversation-meta",{online:!re.value&&!pe($e)&&be($e).key==="online",draft:pe($e)}])},e$b.toDisplayString(_e($e)),3)])],64)),me($e)>0?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_14$w,e$b.toDisplayString(me($e)),1)):e$b.unref(le)&&!re.value&&pe($e)?(e$b.openBlock(),e$b.createElementBlock("span",{key:3,class:"draft-indicator",title:fe($e)}," Rascunho ",8,_hoisted_15$t)):e$b.createCommentVNode("",!0)],10,_hoisted_7$10)]))),128)),ee.loadingMore?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_16$q,[...ke[3]||(ke[3]=[e$b.createElementVNode("span",null,null,-1)])])):e$b.createCommentVNode("",!0)],42,_hoisted_1$1Y),re.value&&!ee.loader?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,type:"button",class:"create-group-button",title:"Criar grupo","aria-label":"Criar novo grupo",onClick:de},[...ke[4]||(ke[4]=[e$b.createElementVNode("span",{class:"create-group-label"},"Criar grupo",-1),e$b.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[e$b.createElementVNode("path",{d:"M12 5v14M5 12h14",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round"})],-1)])])):e$b.createCommentVNode("",!0)],64))}},MountListForType=_export_sfc$1(_sfc_main$28,[["__scopeId","data-v-817262be"]]),_hoisted_1$1X={class:"attendants-container"},_sfc_main$27={__name:"ChatList",props:{listAttendants:{type:Array,default:()=>[],required:!0},listGroups:{type:Array,default:()=>[],required:!0},currentAttendant:{type:Object,required:!0},mobile:{type:Boolean,default:!1},currentList:{type:String,default:void 0},searchQuery:{type:String,default:void 0}},emits:["update:currentList","update:searchQuery"],setup(ee,{emit:te}){const ne=ee,ae=e$b.inject("useChat"),re=te,oe=e$b.ref(ne.currentList??"attendants"),ie=e$b.computed({get(){return ne.currentList??oe.value},set($e){if(ne.currentList===void 0){oe.value=$e;return}re("update:currentList",$e)}}),le=e$b.ref(ne.searchQuery??""),ce=e$b.computed({get(){return ne.searchQuery??le.value},set($e){if(ne.searchQuery===void 0){le.value=$e;return}re("update:searchQuery",$e)}}),de=e$b.computed(()=>ce.value?ne.listAttendants.filter($e=>$e.name.toLowerCase().includes(ce.value.toLowerCase())&&$e.id!==ne.currentAttendant.id):ne.listAttendants.filter($e=>$e.id!==ne.currentAttendant.id)),ue=$e=>String($e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim(),ve=$e=>{var ye;return[$e==null?void 0:$e.name,(ye=$e==null?void 0:$e.internal_chat)==null?void 0:ye.name,$e==null?void 0:$e.description].filter(Boolean).join(" ")},me=e$b.computed(()=>{const $e=(ne.listGroups||[]).filter(Ee=>Ee==null?void 0:Ee.is_group),ye=ue(ce.value);return ye?$e.filter(Ee=>ue(ve(Ee)).includes(ye)):$e});e$b.watch(()=>ie.value,async $e=>{ce.value="",$e==="groups"&&await pe()});const be=e$b.ref(!1),fe=e$b.ref(!1),pe=async()=>{typeof ae.fetchGroupChannels=="function"&&(be.value=!0,await ae.fetchGroupChannels(1),be.value=!1)},_e=async()=>{var $e;if(!(ie.value!=="groups"||fe.value)&&ae.hasMoreGroups){fe.value=!0;try{await(($e=ae.loadNextGroupPage)==null?void 0:$e.call(ae))}finally{fe.value=!1}}},ge=e$b.computed(()=>(ne.listAttendants||[]).filter($e=>{var ye;return $e.id!==((ye=ne.currentAttendant)==null?void 0:ye.id)}).reduce(($e,ye)=>{var Ee,Se;return $e+normalizeUnreadValue((Ee=ye==null?void 0:ye.internal_chat)==null?void 0:Ee.unread,(Se=ne.currentAttendant)==null?void 0:Se.id)},0)),ke=e$b.computed(()=>(ne.listGroups||[]).filter($e=>$e.is_group).reduce(($e,ye)=>{var Ee,Se;return $e+normalizeUnreadValue((Ee=ye==null?void 0:ye.internal_chat)==null?void 0:Ee.unread,(Se=ne.currentAttendant)==null?void 0:Se.id)},0));return($e,ye)=>{var Ee;return e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1X,[e$b.createVNode(SectionsHeader,{hasUnread:{attendants:ge.value,groups:ke.value},currentState:ie.value,"onUpdate:currentState":ye[0]||(ye[0]=Se=>ie.value=Se),searchQuery:ce.value,"onUpdate:searchQuery":ye[1]||(ye[1]=Se=>ce.value=Se)},null,8,["hasUnread","currentState","searchQuery"]),e$b.createVNode(MountListForType,{content:ie.value==="attendants"?de.value:me.value,mode:ie.value,loader:be.value,"loading-more":fe.value,"current-attendant-id":(Ee=ee.currentAttendant)==null?void 0:Ee.id,onLoadMore:_e},null,8,["content","mode","loader","loading-more","current-attendant-id"])])}}},ChatList=_export_sfc$1(_sfc_main$27,[["__scopeId","data-v-b3058c16"]]);function addDays(ee,te,ne){const ae=toDate(ee,ne==null?void 0:ne.in);return isNaN(te)?constructFrom(ee,NaN):(ae.setDate(ae.getDate()+te),ae)}function startOfISOWeek(ee,te){return startOfWeek(ee,{...te,weekStartsOn:1})}function getISOWeekYear(ee,te){const ne=toDate(ee,te==null?void 0:te.in),ae=ne.getFullYear(),re=constructFrom(ne,0);re.setFullYear(ae+1,0,4),re.setHours(0,0,0,0);const oe=startOfISOWeek(re),ie=constructFrom(ne,0);ie.setFullYear(ae,0,4),ie.setHours(0,0,0,0);const le=startOfISOWeek(ie);return ne.getTime()>=oe.getTime()?ae+1:ne.getTime()>=le.getTime()?ae:ae-1}function getTimezoneOffsetInMilliseconds(ee){const te=toDate(ee),ne=new Date(Date.UTC(te.getFullYear(),te.getMonth(),te.getDate(),te.getHours(),te.getMinutes(),te.getSeconds(),te.getMilliseconds()));return ne.setUTCFullYear(te.getFullYear()),+ee-+ne}function startOfDay(ee,te){const ne=toDate(ee,te==null?void 0:te.in);return ne.setHours(0,0,0,0),ne}function differenceInCalendarDays(ee,te,ne){const[ae,re]=normalizeDates(ne==null?void 0:ne.in,ee,te),oe=startOfDay(ae),ie=startOfDay(re),le=+oe-getTimezoneOffsetInMilliseconds(oe),ce=+ie-getTimezoneOffsetInMilliseconds(ie);return Math.round((le-ce)/millisecondsInDay)}function startOfISOWeekYear(ee,te){const ne=getISOWeekYear(ee,te),ae=constructFrom(ee,0);return ae.setFullYear(ne,0,4),ae.setHours(0,0,0,0),startOfISOWeek(ae)}function constructNow(ee){return constructFrom(ee,Date.now())}function isSameDay(ee,te,ne){const[ae,re]=normalizeDates(ne==null?void 0:ne.in,ee,te);return+startOfDay(ae)==+startOfDay(re)}function isDate(ee){return ee instanceof Date||typeof ee=="object"&&Object.prototype.toString.call(ee)==="[object Date]"}function isValid(ee){return!(!isDate(ee)&&typeof ee!="number"||isNaN(+toDate(ee)))}function startOfYear(ee,te){const ne=toDate(ee,te==null?void 0:te.in);return ne.setFullYear(ne.getFullYear(),0,1),ne.setHours(0,0,0,0),ne}function getDayOfYear(ee,te){const ne=toDate(ee,te==null?void 0:te.in);return differenceInCalendarDays(ne,startOfYear(ne))+1}function getISOWeek(ee,te){const ne=toDate(ee,te==null?void 0:te.in),ae=+startOfISOWeek(ne)-+startOfISOWeekYear(ne);return Math.round(ae/millisecondsInWeek)+1}function getWeekYear(ee,te){var ue,ve,me,be;const ne=toDate(ee,te==null?void 0:te.in),ae=ne.getFullYear(),re=getDefaultOptions(),oe=(te==null?void 0:te.firstWeekContainsDate)??((ve=(ue=te==null?void 0:te.locale)==null?void 0:ue.options)==null?void 0:ve.firstWeekContainsDate)??re.firstWeekContainsDate??((be=(me=re.locale)==null?void 0:me.options)==null?void 0:be.firstWeekContainsDate)??1,ie=constructFrom((te==null?void 0:te.in)||ee,0);ie.setFullYear(ae+1,0,oe),ie.setHours(0,0,0,0);const le=startOfWeek(ie,te),ce=constructFrom((te==null?void 0:te.in)||ee,0);ce.setFullYear(ae,0,oe),ce.setHours(0,0,0,0);const de=startOfWeek(ce,te);return+ne>=+le?ae+1:+ne>=+de?ae:ae-1}function startOfWeekYear(ee,te){var le,ce,de,ue;const ne=getDefaultOptions(),ae=(te==null?void 0:te.firstWeekContainsDate)??((ce=(le=te==null?void 0:te.locale)==null?void 0:le.options)==null?void 0:ce.firstWeekContainsDate)??ne.firstWeekContainsDate??((ue=(de=ne.locale)==null?void 0:de.options)==null?void 0:ue.firstWeekContainsDate)??1,re=getWeekYear(ee,te),oe=constructFrom((te==null?void 0:te.in)||ee,0);return oe.setFullYear(re,0,ae),oe.setHours(0,0,0,0),startOfWeek(oe,te)}function getWeek(ee,te){const ne=toDate(ee,te==null?void 0:te.in),ae=+startOfWeek(ne,te)-+startOfWeekYear(ne,te);return Math.round(ae/millisecondsInWeek)+1}function addLeadingZeros(ee,te){const ne=ee<0?"-":"",ae=Math.abs(ee).toString().padStart(te,"0");return ne+ae}const lightFormatters={y(ee,te){const ne=ee.getFullYear(),ae=ne>0?ne:1-ne;return addLeadingZeros(te==="yy"?ae%100:ae,te.length)},M(ee,te){const ne=ee.getMonth();return te==="M"?String(ne+1):addLeadingZeros(ne+1,2)},d(ee,te){return addLeadingZeros(ee.getDate(),te.length)},a(ee,te){const ne=ee.getHours()/12>=1?"pm":"am";switch(te){case"a":case"aa":return ne.toUpperCase();case"aaa":return ne;case"aaaaa":return ne[0];case"aaaa":default:return ne==="am"?"a.m.":"p.m."}},h(ee,te){return addLeadingZeros(ee.getHours()%12||12,te.length)},H(ee,te){return addLeadingZeros(ee.getHours(),te.length)},m(ee,te){return addLeadingZeros(ee.getMinutes(),te.length)},s(ee,te){return addLeadingZeros(ee.getSeconds(),te.length)},S(ee,te){const ne=te.length,ae=ee.getMilliseconds(),re=Math.trunc(ae*Math.pow(10,ne-3));return addLeadingZeros(re,te.length)}},dayPeriodEnum={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(ee,te,ne){const ae=ee.getFullYear()>0?1:0;switch(te){case"G":case"GG":case"GGG":return ne.era(ae,{width:"abbreviated"});case"GGGGG":return ne.era(ae,{width:"narrow"});case"GGGG":default:return ne.era(ae,{width:"wide"})}},y:function(ee,te,ne){if(te==="yo"){const ae=ee.getFullYear(),re=ae>0?ae:1-ae;return ne.ordinalNumber(re,{unit:"year"})}return lightFormatters.y(ee,te)},Y:function(ee,te,ne,ae){const re=getWeekYear(ee,ae),oe=re>0?re:1-re;if(te==="YY"){const ie=oe%100;return addLeadingZeros(ie,2)}return te==="Yo"?ne.ordinalNumber(oe,{unit:"year"}):addLeadingZeros(oe,te.length)},R:function(ee,te){const ne=getISOWeekYear(ee);return addLeadingZeros(ne,te.length)},u:function(ee,te){const ne=ee.getFullYear();return addLeadingZeros(ne,te.length)},Q:function(ee,te,ne){const ae=Math.ceil((ee.getMonth()+1)/3);switch(te){case"Q":return String(ae);case"QQ":return addLeadingZeros(ae,2);case"Qo":return ne.ordinalNumber(ae,{unit:"quarter"});case"QQQ":return ne.quarter(ae,{width:"abbreviated",context:"formatting"});case"QQQQQ":return ne.quarter(ae,{width:"narrow",context:"formatting"});case"QQQQ":default:return ne.quarter(ae,{width:"wide",context:"formatting"})}},q:function(ee,te,ne){const ae=Math.ceil((ee.getMonth()+1)/3);switch(te){case"q":return String(ae);case"qq":return addLeadingZeros(ae,2);case"qo":return ne.ordinalNumber(ae,{unit:"quarter"});case"qqq":return ne.quarter(ae,{width:"abbreviated",context:"standalone"});case"qqqqq":return ne.quarter(ae,{width:"narrow",context:"standalone"});case"qqqq":default:return ne.quarter(ae,{width:"wide",context:"standalone"})}},M:function(ee,te,ne){const ae=ee.getMonth();switch(te){case"M":case"MM":return lightFormatters.M(ee,te);case"Mo":return ne.ordinalNumber(ae+1,{unit:"month"});case"MMM":return ne.month(ae,{width:"abbreviated",context:"formatting"});case"MMMMM":return ne.month(ae,{width:"narrow",context:"formatting"});case"MMMM":default:return ne.month(ae,{width:"wide",context:"formatting"})}},L:function(ee,te,ne){const ae=ee.getMonth();switch(te){case"L":return String(ae+1);case"LL":return addLeadingZeros(ae+1,2);case"Lo":return ne.ordinalNumber(ae+1,{unit:"month"});case"LLL":return ne.month(ae,{width:"abbreviated",context:"standalone"});case"LLLLL":return ne.month(ae,{width:"narrow",context:"standalone"});case"LLLL":default:return ne.month(ae,{width:"wide",context:"standalone"})}},w:function(ee,te,ne,ae){const re=getWeek(ee,ae);return te==="wo"?ne.ordinalNumber(re,{unit:"week"}):addLeadingZeros(re,te.length)},I:function(ee,te,ne){const ae=getISOWeek(ee);return te==="Io"?ne.ordinalNumber(ae,{unit:"week"}):addLeadingZeros(ae,te.length)},d:function(ee,te,ne){return te==="do"?ne.ordinalNumber(ee.getDate(),{unit:"date"}):lightFormatters.d(ee,te)},D:function(ee,te,ne){const ae=getDayOfYear(ee);return te==="Do"?ne.ordinalNumber(ae,{unit:"dayOfYear"}):addLeadingZeros(ae,te.length)},E:function(ee,te,ne){const ae=ee.getDay();switch(te){case"E":case"EE":case"EEE":return ne.day(ae,{width:"abbreviated",context:"formatting"});case"EEEEE":return ne.day(ae,{width:"narrow",context:"formatting"});case"EEEEEE":return ne.day(ae,{width:"short",context:"formatting"});case"EEEE":default:return ne.day(ae,{width:"wide",context:"formatting"})}},e:function(ee,te,ne,ae){const re=ee.getDay(),oe=(re-ae.weekStartsOn+8)%7||7;switch(te){case"e":return String(oe);case"ee":return addLeadingZeros(oe,2);case"eo":return ne.ordinalNumber(oe,{unit:"day"});case"eee":return ne.day(re,{width:"abbreviated",context:"formatting"});case"eeeee":return ne.day(re,{width:"narrow",context:"formatting"});case"eeeeee":return ne.day(re,{width:"short",context:"formatting"});case"eeee":default:return ne.day(re,{width:"wide",context:"formatting"})}},c:function(ee,te,ne,ae){const re=ee.getDay(),oe=(re-ae.weekStartsOn+8)%7||7;switch(te){case"c":return String(oe);case"cc":return addLeadingZeros(oe,te.length);case"co":return ne.ordinalNumber(oe,{unit:"day"});case"ccc":return ne.day(re,{width:"abbreviated",context:"standalone"});case"ccccc":return ne.day(re,{width:"narrow",context:"standalone"});case"cccccc":return ne.day(re,{width:"short",context:"standalone"});case"cccc":default:return ne.day(re,{width:"wide",context:"standalone"})}},i:function(ee,te,ne){const ae=ee.getDay(),re=ae===0?7:ae;switch(te){case"i":return String(re);case"ii":return addLeadingZeros(re,te.length);case"io":return ne.ordinalNumber(re,{unit:"day"});case"iii":return ne.day(ae,{width:"abbreviated",context:"formatting"});case"iiiii":return ne.day(ae,{width:"narrow",context:"formatting"});case"iiiiii":return ne.day(ae,{width:"short",context:"formatting"});case"iiii":default:return ne.day(ae,{width:"wide",context:"formatting"})}},a:function(ee,te,ne){const re=ee.getHours()/12>=1?"pm":"am";switch(te){case"a":case"aa":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"aaa":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return ne.dayPeriod(re,{width:"narrow",context:"formatting"});case"aaaa":default:return ne.dayPeriod(re,{width:"wide",context:"formatting"})}},b:function(ee,te,ne){const ae=ee.getHours();let re;switch(ae===12?re=dayPeriodEnum.noon:ae===0?re=dayPeriodEnum.midnight:re=ae/12>=1?"pm":"am",te){case"b":case"bb":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"bbb":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return ne.dayPeriod(re,{width:"narrow",context:"formatting"});case"bbbb":default:return ne.dayPeriod(re,{width:"wide",context:"formatting"})}},B:function(ee,te,ne){const ae=ee.getHours();let re;switch(ae>=17?re=dayPeriodEnum.evening:ae>=12?re=dayPeriodEnum.afternoon:ae>=4?re=dayPeriodEnum.morning:re=dayPeriodEnum.night,te){case"B":case"BB":case"BBB":return ne.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"BBBBB":return ne.dayPeriod(re,{width:"narrow",context:"formatting"});case"BBBB":default:return ne.dayPeriod(re,{width:"wide",context:"formatting"})}},h:function(ee,te,ne){if(te==="ho"){let ae=ee.getHours()%12;return ae===0&&(ae=12),ne.ordinalNumber(ae,{unit:"hour"})}return lightFormatters.h(ee,te)},H:function(ee,te,ne){return te==="Ho"?ne.ordinalNumber(ee.getHours(),{unit:"hour"}):lightFormatters.H(ee,te)},K:function(ee,te,ne){const ae=ee.getHours()%12;return te==="Ko"?ne.ordinalNumber(ae,{unit:"hour"}):addLeadingZeros(ae,te.length)},k:function(ee,te,ne){let ae=ee.getHours();return ae===0&&(ae=24),te==="ko"?ne.ordinalNumber(ae,{unit:"hour"}):addLeadingZeros(ae,te.length)},m:function(ee,te,ne){return te==="mo"?ne.ordinalNumber(ee.getMinutes(),{unit:"minute"}):lightFormatters.m(ee,te)},s:function(ee,te,ne){return te==="so"?ne.ordinalNumber(ee.getSeconds(),{unit:"second"}):lightFormatters.s(ee,te)},S:function(ee,te){return lightFormatters.S(ee,te)},X:function(ee,te,ne){const ae=ee.getTimezoneOffset();if(ae===0)return"Z";switch(te){case"X":return formatTimezoneWithOptionalMinutes(ae);case"XXXX":case"XX":return formatTimezone(ae);case"XXXXX":case"XXX":default:return formatTimezone(ae,":")}},x:function(ee,te,ne){const ae=ee.getTimezoneOffset();switch(te){case"x":return formatTimezoneWithOptionalMinutes(ae);case"xxxx":case"xx":return formatTimezone(ae);case"xxxxx":case"xxx":default:return formatTimezone(ae,":")}},O:function(ee,te,ne){const ae=ee.getTimezoneOffset();switch(te){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(ae,":");case"OOOO":default:return"GMT"+formatTimezone(ae,":")}},z:function(ee,te,ne){const ae=ee.getTimezoneOffset();switch(te){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(ae,":");case"zzzz":default:return"GMT"+formatTimezone(ae,":")}},t:function(ee,te,ne){const ae=Math.trunc(+ee/1e3);return addLeadingZeros(ae,te.length)},T:function(ee,te,ne){return addLeadingZeros(+ee,te.length)}};function formatTimezoneShort(ee,te=""){const ne=ee>0?"-":"+",ae=Math.abs(ee),re=Math.trunc(ae/60),oe=ae%60;return oe===0?ne+String(re):ne+String(re)+te+addLeadingZeros(oe,2)}function formatTimezoneWithOptionalMinutes(ee,te){return ee%60===0?(ee>0?"-":"+")+addLeadingZeros(Math.abs(ee)/60,2):formatTimezone(ee,te)}function formatTimezone(ee,te=""){const ne=ee>0?"-":"+",ae=Math.abs(ee),re=addLeadingZeros(Math.trunc(ae/60),2),oe=addLeadingZeros(ae%60,2);return ne+re+te+oe}const dateLongFormatter=(ee,te)=>{switch(ee){case"P":return te.date({width:"short"});case"PP":return te.date({width:"medium"});case"PPP":return te.date({width:"long"});case"PPPP":default:return te.date({width:"full"})}},timeLongFormatter=(ee,te)=>{switch(ee){case"p":return te.time({width:"short"});case"pp":return te.time({width:"medium"});case"ppp":return te.time({width:"long"});case"pppp":default:return te.time({width:"full"})}},dateTimeLongFormatter=(ee,te)=>{const ne=ee.match(/(P+)(p+)?/)||[],ae=ne[1],re=ne[2];if(!re)return dateLongFormatter(ee,te);let oe;switch(ae){case"P":oe=te.dateTime({width:"short"});break;case"PP":oe=te.dateTime({width:"medium"});break;case"PPP":oe=te.dateTime({width:"long"});break;case"PPPP":default:oe=te.dateTime({width:"full"});break}return oe.replace("{{date}}",dateLongFormatter(ae,te)).replace("{{time}}",timeLongFormatter(re,te))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(ee){return dayOfYearTokenRE.test(ee)}function isProtectedWeekYearToken(ee){return weekYearTokenRE.test(ee)}function warnOrThrowProtectedError(ee,te,ne){const ae=message(ee,te,ne);if(console.warn(ae),throwTokens.includes(ee))throw new RangeError(ae)}function message(ee,te,ne){const ae=ee[0]==="Y"?"years":"days of the month";return`Use \`${ee.toLowerCase()}\` instead of \`${ee}\` (in \`${te}\`) for formatting ${ae} to the input \`${ne}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function format(ee,te,ne){var ue,ve,me,be,fe,pe,_e,ge;const ae=getDefaultOptions(),re=(ne==null?void 0:ne.locale)??ae.locale??enUS,oe=(ne==null?void 0:ne.firstWeekContainsDate)??((ve=(ue=ne==null?void 0:ne.locale)==null?void 0:ue.options)==null?void 0:ve.firstWeekContainsDate)??ae.firstWeekContainsDate??((be=(me=ae.locale)==null?void 0:me.options)==null?void 0:be.firstWeekContainsDate)??1,ie=(ne==null?void 0:ne.weekStartsOn)??((pe=(fe=ne==null?void 0:ne.locale)==null?void 0:fe.options)==null?void 0:pe.weekStartsOn)??ae.weekStartsOn??((ge=(_e=ae.locale)==null?void 0:_e.options)==null?void 0:ge.weekStartsOn)??0,le=toDate(ee,ne==null?void 0:ne.in);if(!isValid(le))throw new RangeError("Invalid time value");let ce=te.match(longFormattingTokensRegExp).map(ke=>{const $e=ke[0];if($e==="p"||$e==="P"){const ye=longFormatters[$e];return ye(ke,re.formatLong)}return ke}).join("").match(formattingTokensRegExp).map(ke=>{if(ke==="''")return{isToken:!1,value:"'"};const $e=ke[0];if($e==="'")return{isToken:!1,value:cleanEscapedString(ke)};if(formatters[$e])return{isToken:!0,value:ke};if($e.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$e+"`");return{isToken:!1,value:ke}});re.localize.preprocessor&&(ce=re.localize.preprocessor(le,ce));const de={firstWeekContainsDate:oe,weekStartsOn:ie,locale:re};return ce.map(ke=>{if(!ke.isToken)return ke.value;const $e=ke.value;(!(ne!=null&&ne.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken($e)||!(ne!=null&&ne.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken($e))&&warnOrThrowProtectedError($e,te,String(ee));const ye=formatters[$e[0]];return ye(le,$e,re.localize,de)}).join("")}function cleanEscapedString(ee){const te=ee.match(escapedStringRegExp);return te?te[1].replace(doubleQuoteRegExp,"'"):ee}function isThisWeek(ee,te){return isSameWeek(constructFrom(ee,ee),constructNow(ee),te)}function isToday(ee,te){return isSameDay(constructFrom(ee,ee),constructNow(ee))}function subDays(ee,te,ne){return addDays(ee,-1,ne)}function isYesterday(ee,te){return isSameDay(constructFrom(ee,ee),subDays(constructNow(ee)))}const _hoisted_1$1W={class:"chat-info bg-base-200"},_hoisted_2$1G={class:"info-head"},_hoisted_3$1w={class:"info-title"},_hoisted_4$1k={class:"identity"},_hoisted_5$1c={key:0,class:"identity-avatar"},_hoisted_6$14={key:2,class:"identity-avatar"},_hoisted_7$$={class:"identity-name"},_hoisted_8$U={key:3,class:"identity-sub"},_hoisted_9$Q={key:5,class:"identity-sub presence"},_hoisted_10$L={class:"facts"},_hoisted_11$F={key:0,class:"members"},_hoisted_12$B=["aria-disabled"],_hoisted_13$w={class:"members-label"},_hoisted_14$v={class:"members-list"},_hoisted_15$s={key:1,class:"member-avatar"},_hoisted_16$p={class:"member-name"},_hoisted_17$j=["disabled","onClick","onMouseenter","onFocus"],_hoisted_18$j={key:0,class:"loader-sm"},_hoisted_19$g={key:1,class:"info-foot"},_hoisted_20$g=["disabled"],_hoisted_21$e=["disabled"],_hoisted_22$c={key:0,class:"loader-sm"},_sfc_main$26={__name:"groupChatInfo",props:{selectedAttendant:{type:Object,required:!0},attendant:{type:Object,required:!0},participantsGroup:{type:Array,default:()=>[]},participantCount:{type:Number,default:0},isGroup:{type:Boolean,default:!0}},emits:["close"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.inject("useChat"),oe=e$b.inject("smPlayEnabled",e$b.computed(()=>!1)),ie=()=>{Ee.value&&typeof re.openCreateOrEdit=="function"&&re.openCreateOrEdit("edit",ne.selectedAttendant)},le=async Ve=>{var Ne,Pe,Be;if(!(!Ve||Ve.id===((Ne=ne.attendant)==null?void 0:Ne.id)||Ve.loading)&&typeof re.removeGroupParticipant=="function"){Ve.loading=!0;try{await re.removeGroupParticipant((Be=(Pe=ne.selectedAttendant)==null?void 0:Pe.internal_chat)==null?void 0:Be.channel_id,Ve.id)}finally{Ve.loading=!1}}},ce=e$b.ref(!1),de=e$b.ref(!1),ue=e$b.ref(null),ve=e$b.ref(!1),me=e$b.ref({}),be=e$b.ref(""),fe=()=>{if(!ue.value)return;const Ve=ue.value.getBoundingClientRect(),Ne=240,Pe=8,Be=Math.max(Pe,window.innerWidth-Ne-Pe),Ae=Math.min(Math.max(Pe,Ve.right+Pe),Be),xe=Ve.top+Ve.height/2;me.value={left:`${Ae}px`,top:`${xe}px`}},pe=async(Ve,Ne)=>{Ne&&(ue.value=Ve.currentTarget,be.value=Ne,ve.value=!0,await e$b.nextTick(),fe())},_e=()=>{ve.value=!1,ue.value=null,be.value=""},ge=()=>{ve.value&&fe()},ke=()=>{de.value=!0},$e=()=>{de.value=!1},ye=async()=>{var Pe,Be;const Ve=(Be=(Pe=ne.selectedAttendant)==null?void 0:Pe.internal_chat)==null?void 0:Be.channel_id;if(!Ve||typeof re.leaveGroup!="function")return;if(ce.value=!0,!await re.leaveGroup(Ve)){ce.value=!1,$e();return}ae("close"),typeof re.closeSelectedChat=="function"&&re.closeSelectedChat(),ce.value=!1,$e()},Ee=e$b.computed(()=>ne.selectedAttendant.created_by===ne.attendant.id),Se=e$b.computed(()=>{const Ve=ne.participantsGroup.find(Ne=>ne.selectedAttendant.created_by===Ne.id);return Ve?Ve.name:"Desconhecido"}),Le=e$b.computed(()=>{var Ne;const Ve=(Ne=ne.selectedAttendant)==null?void 0:Ne.created_at;return Ve?new Date(Ve).toLocaleDateString("pt-BR"):"data desconhecida"}),Me=e$b.computed(()=>{var Ve;return resolvePresence((Ve=ne.selectedAttendant)==null?void 0:Ve.login_status)}),De=e$b.computed(()=>resolveAttendantGamification(ne.selectedAttendant).title),Oe=e$b.computed(()=>{var Pe,Be,Ae;if(ne.isGroup)return[{key:"members",label:"Membros",value:String(ne.participantCount)},{key:"admin",label:"Administrador",value:Se.value},{key:"created",label:"Criado em",value:Le.value}];const Ve=[{key:"status",label:"Status",value:Me.value.label}],Ne=((Pe=ne.selectedAttendant)==null?void 0:Pe.department)||((Be=ne.selectedAttendant)==null?void 0:Be.sector);return Ne&&Ve.push({key:"sector",label:"Departamento",value:typeof Ne=="string"?Ne:Ne==null?void 0:Ne.name}),(Ae=ne.selectedAttendant)!=null&&Ae.email&&Ve.push({key:"email",label:"E-mail",value:ne.selectedAttendant.email}),Ve.filter(xe=>xe.value)}),Re=e$b.computed(()=>Ee.value?"":`Você não é o administrador do grupo. Somente ${Se.value} pode ajustar os membros.`),ze=Ve=>{var Ne;return(Ve==null?void 0:Ve.id)===((Ne=ne.attendant)==null?void 0:Ne.id)?"Você não pode remover a si mesmo do grupo.":Ee.value?"":`Você não é o administrador do grupo. Somente ${Se.value} pode remover membros.`};return e$b.onMounted(()=>{window.addEventListener("resize",ge),window.addEventListener("scroll",ge,!0)}),e$b.onBeforeUnmount(()=>{window.removeEventListener("resize",ge),window.removeEventListener("scroll",ge,!0)}),(Ve,Ne)=>{var Pe;return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$1W,[e$b.createElementVNode("header",_hoisted_2$1G,[e$b.createElementVNode("button",{class:"icon-btn",onClick:Ne[0]||(Ne[0]=Be=>ae("close")),title:"Voltar"},[...Ne[3]||(Ne[3]=[e$b.createElementVNode("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M15 18l-6-6 6-6"})],-1)])]),e$b.createElementVNode("p",_hoisted_3$1w,e$b.toDisplayString(ee.isGroup?"Informações do grupo":"Informações do atendente"),1)]),e$b.createElementVNode("section",_hoisted_4$1k,[ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_5$1c,[e$b.createVNode(Avatar,{photo:ee.selectedAttendant.photo,name:ee.selectedAttendant.name,size:"fill",class:"size-full"},null,8,["photo","name"])])):e$b.unref(oe)?(e$b.openBlock(),e$b.createBlock(AttendantGameIdentity,{key:1,attendant:ee.selectedAttendant,variant:"avatar","avatar-size":"lg",class:"identity-game-avatar"},null,8,["attendant"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$14,[e$b.createVNode(Avatar,{photo:ee.selectedAttendant.photo,name:ee.selectedAttendant.name,size:"fill",class:"size-full"},null,8,["photo","name"])])),e$b.createElementVNode("h1",_hoisted_7$$,e$b.toDisplayString(ee.selectedAttendant.name),1),ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_8$U," Grupo · "+e$b.toDisplayString(ee.participantCount)+" membros ",1)):e$b.unref(oe)&&((Pe=De.value)!=null&&Pe.name)?(e$b.openBlock(),e$b.createBlock(_sfc_main$2b,{key:4,title:De.value,size:"md",class:"identity-title"},null,8,["title"])):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_9$Q,[e$b.createElementVNode("i",{style:e$b.normalizeStyle({backgroundColor:Me.value.color})},null,4),e$b.createTextVNode(" "+e$b.toDisplayString(Me.value.label),1)]))]),e$b.createElementVNode("dl",_hoisted_10$L,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Oe.value,Be=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Be.key,class:"fact"},[e$b.createElementVNode("dt",null,e$b.toDisplayString(Be.label),1),e$b.createElementVNode("dd",null,e$b.toDisplayString(Be.value),1)]))),128))]),ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$F,[e$b.createElementVNode("button",{"aria-disabled":!Ee.value,class:e$b.normalizeClass(["member-row action-row",!Ee.value&&"is-blocked"]),onClick:ie,onMouseenter:Ne[1]||(Ne[1]=Be=>pe(Be,Re.value)),onMouseleave:_e,onFocus:Ne[2]||(Ne[2]=Be=>pe(Be,Re.value)),onBlur:_e},[...Ne[4]||(Ne[4]=[e$b.createStaticVNode('<span class="action-icon" data-v-0671c4f9><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" data-v-0671c4f9><path d="M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2" data-v-0671c4f9></path><circle cx="9" cy="7" r="4" data-v-0671c4f9></circle><path d="M19 8v6M22 11h-6" data-v-0671c4f9></path></svg></span><span class="member-name" data-v-0671c4f9>Ajustar membros do grupo</span>',2)])],42,_hoisted_12$B),e$b.createElementVNode("p",_hoisted_13$w,e$b.toDisplayString(ee.participantCount)+" participantes",1),e$b.createElementVNode("ul",_hoisted_14$v,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.participantsGroup,Be=>(e$b.openBlock(),e$b.createElementBlock("li",{key:Be.id,class:"member-row"},[e$b.unref(oe)?(e$b.openBlock(),e$b.createBlock(AttendantGameIdentity,{key:0,attendant:Be,variant:"avatar","avatar-size":"sm","hover-preview":"",class:"member-game-avatar"},null,8,["attendant"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$s,[e$b.createVNode(Avatar,{photo:Be.photo,name:Be.name,size:"fill",class:"size-full"},null,8,["photo","name"])])),e$b.createElementVNode("span",_hoisted_16$p,e$b.toDisplayString(Be.name),1),e$b.createElementVNode("button",{class:e$b.normalizeClass(["remove-button",Be.id===ee.attendant.id?"is-me":""]),disabled:!Ee.value||Be.id===ee.attendant.id||Be.loading,onClick:Ae=>le(Be),onMouseenter:Ae=>pe(Ae,ze(Be)),onMouseleave:_e,onFocus:Ae=>pe(Ae,ze(Be)),onBlur:_e},[Be.loading?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_18$j)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createTextVNode(e$b.toDisplayString(Be.id===ee.attendant.id?"Eu":"Remover"),1)],64))],42,_hoisted_17$j)]))),128))])])):e$b.createCommentVNode("",!0),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[ve.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"action-tooltip bg-base-300",style:e$b.normalizeStyle(me.value)},e$b.toDisplayString(be.value),5)):e$b.createCommentVNode("",!0)])),ee.isGroup?(e$b.openBlock(),e$b.createElementBlock("footer",_hoisted_19$g,[de.value?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[e$b.createElementVNode("button",{class:"foot-button",onClick:$e,disabled:ce.value}," Cancelar ",8,_hoisted_20$g),e$b.createElementVNode("button",{class:"foot-button is-danger",onClick:ye,disabled:ce.value},[ce.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_22$c)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createTextVNode("Confirmar saída")],64))],8,_hoisted_21$e)],64)):(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"foot-button is-danger-ghost",onClick:ke}," Sair do grupo "))])):e$b.createCommentVNode("",!0)])}}},GroupChatInfo=_export_sfc$1(_sfc_main$26,[["__scopeId","data-v-0671c4f9"]]),_hoisted_1$1V=["href"],_sfc_main$25={__name:"messageText",props:{text:{type:String,default:""},emojiOnly:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>linkifyText(te.text));return(ae,re)=>(e$b.openBlock(),e$b.createElementBlock("p",{class:e$b.normalizeClass(["message-text",{"emoji-only":ee.emojiOnly}])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ne.value,(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:ie},[oe.type==="link"?(e$b.openBlock(),e$b.createElementBlock("a",{key:0,class:"message-link",href:oe.href,target:"_blank",rel:"noopener noreferrer",onClick:re[0]||(re[0]=e$b.withModifiers(()=>{},["stop"]))},e$b.toDisplayString(oe.value),9,_hoisted_1$1V)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createTextVNode(e$b.toDisplayString(oe.value),1)],64))],64))),128))],2))}},MessageText=_export_sfc$1(_sfc_main$25,[["__scopeId","data-v-be876b02"]]);function t$1(ee,te,ne,ae){return new(ne||(ne=Promise))(function(re,oe){function ie(de){try{ce(ae.next(de))}catch(ue){oe(ue)}}function le(de){try{ce(ae.throw(de))}catch(ue){oe(ue)}}function ce(de){var ue;de.done?re(de.value):(ue=de.value,ue instanceof ne?ue:new ne(function(ve){ve(ue)})).then(ie,le)}ce((ae=ae.apply(ee,te||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;class e{constructor(){this.listeners={}}on(te,ne,ae){if(this.listeners[te]||(this.listeners[te]=new Set),ae==null?void 0:ae.once){const re=(...oe)=>{this.un(te,re),ne(...oe)};return this.listeners[te].add(re),()=>this.un(te,re)}return this.listeners[te].add(ne),()=>this.un(te,ne)}un(te,ne){var ae;(ae=this.listeners[te])===null||ae===void 0||ae.delete(ne)}once(te,ne){return this.on(te,ne,{once:!0})}unAll(){this.listeners={}}emit(te,...ne){this.listeners[te]&&this.listeners[te].forEach(ae=>ae(...ne))}}const i$2={decode:function(ee,te){return t$1(this,void 0,void 0,function*(){const ne=new AudioContext({sampleRate:te});try{return yield ne.decodeAudioData(ee)}finally{ne.state!=="closed"&&(yield ne.close().catch(()=>{}))}})},createBuffer:function(ee,te){if(!ee||ee.length===0)throw new Error("channelData must be a non-empty array");if(te<=0)throw new Error("duration must be greater than 0");if(typeof ee[0]=="number"&&(ee=[ee]),!ee[0]||ee[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(ae){const re=ae[0];if(re.some(oe=>oe>1||oe<-1)){const oe=re.length;let ie=0;for(let le=0;le<oe;le++){const ce=Math.abs(re[le]);ce>ie&&(ie=ce)}for(const le of ae)for(let ce=0;ce<oe;ce++)le[ce]/=ie}})(ee);const ne=ee.map(ae=>ae instanceof Float32Array?ae:Float32Array.from(ae));return{duration:te,length:ne[0].length,sampleRate:ne[0].length/te,numberOfChannels:ne.length,getChannelData:ae=>{const re=ne[ae];if(!re)throw new Error(`Channel ${ae} not found`);return re},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function n$1(ee,te){const ne=te.xmlns?document.createElementNS(te.xmlns,ee):document.createElement(ee);for(const[ae,re]of Object.entries(te))if(ae==="children"&&re)for(const[oe,ie]of Object.entries(re))ie instanceof Node?ne.appendChild(ie):typeof ie=="string"?ne.appendChild(document.createTextNode(ie)):ne.appendChild(n$1(oe,ie));else ae==="style"?Object.assign(ne.style,re):ae==="textContent"?ne.textContent=re:ne.setAttribute(ae,re.toString());return ne}function s$2(ee,te,ne){const ae=n$1(ee,te||{});return ne==null||ne.appendChild(ae),ae}function r$1(ee){return ee instanceof HTMLElement||typeof ee=="object"&&ee!==null&&ee.nodeType===Node.ELEMENT_NODE&&typeof ee.style=="object"}var o$1=Object.freeze({__proto__:null,createElement:s$2,default:s$2,isHTMLElement:r$1});const a$2={fetchBlob:function(ee,te,ne){return t$1(this,void 0,void 0,function*(){var ae;const re=yield fetch(ee,ne);if(re.status>=400)throw new Error(`Failed to fetch ${ee}: ${re.status} (${re.statusText})`);return function(oe,ie,le){t$1(this,void 0,void 0,function*(){var ce;if(!oe.body||!oe.headers)return;const de=oe.body.getReader(),ue=Number(oe.headers.get("Content-Length"))||0;let ve=0;const me=()=>{de.cancel()};if(le){if(le.aborted)return void de.cancel();le.addEventListener("abort",me,{once:!0})}try{for(;;){const be=yield de.read();if(be.done)break;if(ve+=((ce=be.value)===null||ce===void 0?void 0:ce.length)||0,ue>0){const fe=Math.round(ve/ue*100);ie(fe)}}}catch(be){if(be instanceof DOMException&&be.name==="AbortError")return;console.warn("Progress tracking error:",be)}finally{le&&le.removeEventListener("abort",me)}})}(re.clone(),te,(ae=ne==null?void 0:ne.signal)!==null&&ae!==void 0?ae:void 0),re.blob()})}};function l$1(ee){let te=ee;const ne=new Set;return{get value(){return te},set(ae){Object.is(te,ae)||(te=ae,ne.forEach(re=>re(te)))},update(ae){this.set(ae(te))},subscribe:ae=>(ne.add(ae),()=>ne.delete(ae))}}function h$4(ee,te){const ne=l$1(ee());return te.forEach(ae=>ae.subscribe(()=>{const re=ee();Object.is(ne.value,re)||ne.set(re)})),{get value(){return ne.value},subscribe:ae=>ne.subscribe(ae)}}function c$1(ee,te){let ne;const ae=()=>{ne&&(ne(),ne=void 0),ne=ee()},re=te.map(oe=>oe.subscribe(ae));return ae(),()=>{ne&&(ne(),ne=void 0),re.forEach(oe=>oe())}}let u$3=class extends e{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(te){super(),this.isExternalMedia=!1,this._ownBlobUrl=null,this.reactiveMediaEventCleanups=[],te.media?(this.media=te.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=l$1(!1),this._currentTime=l$1(0),this._duration=l$1(0),this._volume=l$1(this.media.volume),this._muted=l$1(this.media.muted),this._playbackRate=l$1(this.media.playbackRate||1),this._seeking=l$1(!1),this.setupReactiveMediaEvents(),te.mediaControls&&(this.media.controls=!0),te.autoplay&&(this.media.autoplay=!0),te.playbackRate!=null&&this.onMediaEvent("canplay",()=>{te.playbackRate!=null&&(this.media.playbackRate=te.playbackRate)},{once:!0})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(te,ne,ae){return this.media.addEventListener(te,ne,ae),()=>this.media.removeEventListener(te,ne,ae)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){this._ownBlobUrl&&(URL.revokeObjectURL(this._ownBlobUrl),this._ownBlobUrl=null)}canPlayType(te){return this.media.canPlayType(te)!==""}setSrc(te,ne){const ae=this.getSrc();if(te&&ae===te)return;this.revokeSrc();const re=ne instanceof Blob&&(this.canPlayType(ne.type)||!te)?URL.createObjectURL(ne):te;if(re!==te&&(this._ownBlobUrl=re),ae&&this.media.removeAttribute("src"),re||te)try{this.media.src=re}catch{this.media.src=te}}destroy(){this.reactiveMediaEventCleanups.forEach(te=>te()),this.reactiveMediaEventCleanups=[],this.revokeSrc(),this.unAll(),this.isExternalMedia||(this.media.pause(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(te){this.reactiveMediaEventCleanups.forEach(ne=>ne()),this.reactiveMediaEventCleanups=[],this.media=te,this.setupReactiveMediaEvents()}play(){return t$1(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(te){if(te instanceof DOMException&&te.name==="AbortError")return;throw te}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(te){this.media.currentTime=Math.max(0,Math.min(te,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(te){this.media.volume=te}getMuted(){return this.media.muted}setMuted(te){this.media.muted=te}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(te,ne){ne!=null&&(this.media.preservesPitch=ne),this.media.playbackRate=te}getMediaElement(){return this.media}setSinkId(te){return this.media.setSinkId(te)}};function d$2({maxTop:ee,maxBottom:te,halfHeight:ne,vScale:ae,barMinHeight:re=0,barAlign:oe}){let ie=Math.round(ee*ne*ae),le=ie+Math.round(te*ne*ae)||1;return le<re&&(le=re,oe||(ie=le/2)),{topHeight:ie,totalHeight:le}}function p$2({barAlign:ee,halfHeight:te,topHeight:ne,totalHeight:ae,canvasHeight:re}){return ee==="top"?0:ee==="bottom"?re-ae:te-ne}function m$2(ee,te,ne){const ae=te-ee.left,re=ne-ee.top;return[ae/ee.width,re/ee.height]}function g$2(ee){return!!(ee.barWidth||ee.barGap||ee.barAlign)}function f$3(ee,te){if(!g$2(te))return ee;const ne=te.barWidth||.5,ae=ne+(te.barGap||ne/2);return ae===0?ee:Math.floor(ee/ae)*ae}function v$4({scrollLeft:ee,totalWidth:te,numCanvases:ne}){if(te===0)return[0];const ae=ee/te,re=Math.floor(ae*ne);return[re-1,re,re+1]}function b$2(ee){const te=ee._cleanup;typeof te=="function"&&te()}function y$3(ee){const te=l$1({scrollLeft:ee.scrollLeft,scrollWidth:ee.scrollWidth,clientWidth:ee.clientWidth}),ne=h$4(()=>function(oe){const{scrollLeft:ie,scrollWidth:le,clientWidth:ce}=oe;if(le===0)return{startX:0,endX:1};const de=ie/le,ue=(ie+ce)/le;return{startX:Math.max(0,Math.min(1,de)),endX:Math.max(0,Math.min(1,ue))}}(te.value),[te]),ae=h$4(()=>function(oe){return{left:oe.scrollLeft,right:oe.scrollLeft+oe.clientWidth}}(te.value),[te]),re=()=>{te.set({scrollLeft:ee.scrollLeft,scrollWidth:ee.scrollWidth,clientWidth:ee.clientWidth})};return ee.addEventListener("scroll",re,{passive:!0}),{scrollData:te,percentages:ne,bounds:ae,cleanup:()=>{ee.removeEventListener("scroll",re),b$2(te)}}}let C$2=class extends e{constructor(te,ne){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.containerInlinePadding=0,this.onClickWrapper=ie=>{const le=this.wrapper.getBoundingClientRect(),[ce,de]=m$2(le,ie.clientX,ie.clientY);this.emit("click",ce,de)},this.onDblClickWrapper=ie=>{const le=this.wrapper.getBoundingClientRect(),[ce,de]=m$2(le,ie.clientX,ie.clientY);this.emit("dblclick",ce,de)},this.subscriptions=[],this.options=te;const ae=this.parentFromOptionsContainer(te.container);this.parent=ae;const[re,oe]=this.initHtml();ae.appendChild(re),this.container=re,this.scrollContainer=oe.querySelector(".scroll"),this.wrapper=oe.querySelector(".wrapper"),this.canvasWrapper=oe.querySelector(".canvases"),this.progressWrapper=oe.querySelector(".progress"),this.cursor=oe.querySelector(".cursor"),this.calculateInlinePadding(),ne&&oe.appendChild(ne),this.initEvents()}parentFromOptionsContainer(te){let ne;if(typeof te=="string"?ne=document.querySelector(te):r$1(te)&&(ne=te),!ne)throw new Error("Container not found");return ne}initEvents(){this.wrapper.addEventListener("click",this.onClickWrapper),this.wrapper.addEventListener("dblclick",this.onDblClickWrapper),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=y$3(this.scrollContainer);const te=c$1(()=>{const{startX:ne,endX:ae}=this.scrollStream.percentages.value,{left:re,right:oe}=this.scrollStream.bounds.value;this.emit("scroll",ne,ae,re,oe)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(te),typeof ResizeObserver=="function"){const ne=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{ne().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const te=this.parent.clientWidth;this.calculateInlinePadding(),te===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=te,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=function(ne,ae={}){const{threshold:re=3,mouseButton:oe=0,touchDelay:ie=100}=ae,le=l$1(null),ce=new Map,de=matchMedia("(pointer: coarse)").matches;let ue=()=>{};const ve=me=>{if(me.button!==oe||ce.has(me.pointerId)||(ce.set(me.pointerId,me),ce.size>1))return;const be=me.pointerId;let fe=me.clientX,pe=me.clientY,_e=!1;const ge=Date.now(),ke=ne.getBoundingClientRect(),{left:$e,top:ye}=ke,Ee=Oe=>{if(Oe.pointerId!==be||Oe.defaultPrevented||ce.size>1||de&&Date.now()-ge<ie)return;const Re=Oe.clientX,ze=Oe.clientY,Ve=Re-fe,Ne=ze-pe;(_e||Math.abs(Ve)>re||Math.abs(Ne)>re)&&(Oe.preventDefault(),Oe.stopPropagation(),_e||(le.set({type:"start",x:fe-$e,y:pe-ye}),_e=!0),le.set({type:"move",x:Re-$e,y:ze-ye,deltaX:Ve,deltaY:Ne}),fe=Re,pe=ze)},Se=Oe=>{if(ce.delete(Oe.pointerId)){if(Oe.pointerId===be&&_e){const Re=Oe.clientX,ze=Oe.clientY;le.set({type:"end",x:Re-$e,y:ze-ye})}ce.size===0&&ue()}},Le=Oe=>{Oe.relatedTarget&&Oe.relatedTarget!==document.documentElement||Se(Oe)},Me=Oe=>{_e&&(Oe.stopPropagation(),Oe.preventDefault())},De=Oe=>{Oe.defaultPrevented||ce.size>1||_e&&Oe.preventDefault()};document.addEventListener("pointermove",Ee),document.addEventListener("pointerup",Se),document.addEventListener("pointerout",Le),document.addEventListener("pointercancel",Le),document.addEventListener("touchmove",De,{passive:!1}),document.addEventListener("click",Me,{capture:!0}),ue=()=>{document.removeEventListener("pointermove",Ee),document.removeEventListener("pointerup",Se),document.removeEventListener("pointerout",Le),document.removeEventListener("pointercancel",Le),document.removeEventListener("touchmove",De),setTimeout(()=>{document.removeEventListener("click",Me,{capture:!0})},10)}};return ne.addEventListener("pointerdown",ve),{signal:le,cleanup:()=>{ue(),ne.removeEventListener("pointerdown",ve),ce.clear(),b$2(le)}}}(this.wrapper);const te=c$1(()=>{const ne=this.dragStream.signal.value;if(!ne)return;const ae=this.wrapper.getBoundingClientRect().width,re=(oe=ne.x/ae)<0?0:oe>1?1:oe;var oe;ne.type==="start"?(this.isDragging=!0,this.emit("dragstart",re)):ne.type==="move"?this.emit("drag",re):ne.type==="end"&&(this.isDragging=!1,this.emit("dragend",re))},[this.dragStream.signal]);this.subscriptions.push(te)}calculateInlinePadding(){const{paddingLeft:te,paddingRight:ne}=getComputedStyle(this.scrollContainer),ae=parseFloat(te)+parseFloat(ne);this.containerInlinePadding=Number.isNaN(ae)?0:ae}initHtml(){const te=document.createElement("div"),ne=te.attachShadow({mode:"open"}),ae=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return ne.innerHTML=`
|
|
111
111
|
<style${ae?` nonce="${ae}"`:""}>
|
|
112
112
|
:host {
|
|
113
113
|
user-select: none;
|
|
@@ -220,7 +220,7 @@ $bm_rt = loopOut('cycle', 0);`},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,
|
|
|
220
220
|
c5.426-1.969,11.42-1.629,16.591,0.935c5.171,2.565,9.08,7.133,10.792,12.646L353.732,451.163z M296.189,175.873
|
|
221
221
|
c-5.686-1.423-12.815-2.847-22.064-2.847c-47.017,0-84.035,46.27-84.035,101.11c0,27.053,12.117,44.117,35.594,44.117
|
|
222
222
|
c26.346,0,54.125-33.443,60.527-74.754L296.189,175.873z"/>
|
|
223
|
-
</svg>`,info:ne.content.info??"Nome que será atribuído no Produto",type:ne.content.type??"text",placeholder:ne.content.placeholder??"Integração de sistemas",empty:ne.content.empty??!1,data:ne.content.data??"",currency:ne.content.currency??"BRL"}),oe=e$b.ref(re.data);e$b.watch(oe,ce=>{ae("update:content",{...re,data:ce})},{immediate:!0,deep:!0}),e$b.watch(()=>ne.content,ce=>{ce.data!==oe.value&&(oe.value=ce.data),ce.empty!==re.empty&&(re.empty=ce.empty),ce.currency!==re.currency&&(re.currency=ce.currency)},{deep:!0});const ie=e$b.computed(()=>re.empty&&!oe.value),le=e$b.computed(()=>re.type==="number");return(ce,de)=>{const ue=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$1t,[e$b.createElementVNode("header",_hoisted_2$1g,[e$b.createElementVNode("p",_hoisted_3$17,e$b.toDisplayString(re.title),1),re.info?(e$b.openBlock(),e$b.createBlock(ue,{key:0,hover:"",content:re.info,placement:"top",arrow:""},{default:e$b.withCtx(()=>[...de[2]||(de[2]=[e$b.createElementVNode("svg",{class:"size-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})],-1)])]),_:1},8,["content"])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["input__container bg-base-300",ie.value?"input__container--error":"",re.type==="textArea"?"textArea":"",le.value?"input__container--with-prefix":""])},[re.type!=="textArea"&&!le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(ie.value?"text-red-500":"text-current opacity-70"),innerHTML:re.svg},null,10,_hoisted_4$11)):e$b.createCommentVNode("",!0),le.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$V,[e$b.createVNode(CurrencyDisplay,{currency:re.currency,symbolOnly:""},null,8,["currency"])])):e$b.createCommentVNode("",!0),re.type!=="textArea"?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("input",{type:re.type,key:re.type,placeholder:re.placeholder,"onUpdate:modelValue":de[0]||(de[0]=ve=>oe.value=ve),class:e$b.normalizeClass([ie.value?"empty":null,"input__field bg-base-300"])},null,10,_hoisted_6$O)),[[e$b.vModelDynamic,oe.value]]):e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("textarea",{key:3,class:e$b.normalizeClass([ie.value?"empty":null,"input__field bg-base-300 h-full resize-y"]),"onUpdate:modelValue":de[1]||(de[1]=ve=>oe.value=ve),placeholder:re.placeholder},null,10,_hoisted_7$K)),[[e$b.vModelText,oe.value]]),ie.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$E," Campo obrigatório ")):e$b.createCommentVNode("",!0)],2)])}}},PrimaryInput=_export_sfc$1(_sfc_main$1D,[["__scopeId","data-v-45b32dec"]]),_hoisted_1$1s=["innerHTML"],_hoisted_2$1f=["innerHTML"],_hoisted_3$16={class:"text-text-text-base"},_hoisted_4$10=["onClick"],_hoisted_5$U={class:"flex items-center gap-2"},_hoisted_6$N=["innerHTML"],_hoisted_7$J={class:"text-text-base"},_hoisted_8$D={key:0,xmlns:"http://www.w3.org/2000/svg",class:"size-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_hoisted_9$A=["onClick"],_hoisted_10$x={class:"flex items-center gap-2"},_hoisted_11$u=["innerHTML"],_hoisted_12$s={class:"text-text-base"},_hoisted_13$o={key:0,xmlns:"http://www.w3.org/2000/svg",class:"size-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_hoisted_14$n=["onClick"],_hoisted_15$l={class:"flex items-center gap-2"},_hoisted_16$i=["innerHTML"],_hoisted_17$c={class:"text-text-base"},_hoisted_18$c={key:0,xmlns:"http://www.w3.org/2000/svg",class:"size-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_sfc_main$1C={__name:"simpleSelect",props:{modelValue:{type:[Array,String,Number,Object],default:()=>[]},options:{type:Array,required:!0,default:()=>[]},placeholder:{type:String,default:"Selecione uma opção..."},multiple:{type:Boolean,default:!1},theme:{type:String,default:"bg-base-300 border-base-300"},teleportTo:{type:String,default:null},overlay:{type:Boolean,default:!1},icon:{type:[String,Object],default:null},iconPlaceholder:{type:[String,Object],default:null}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.ref(null),ie=e$b.ref(null),le=e$b.ref(null),ce=e$b.ref({}),de=$e=>{var Ee,Se;if(!re.value)return;const ye=$e.target;(Ee=oe.value)!=null&&Ee.contains(ye)||(Se=ie.value)!=null&&Se.contains(ye)||(re.value=!1)},ue=$e=>{let ye=($e==null?void 0:$e.parentElement)||null;for(;ye&&ye!==document.body&&ye!==document.documentElement;){const Ee=window.getComputedStyle(ye),Se=Ee.willChange||"";if(Ee.transform!=="none"||Ee.perspective!=="none"||Ee.filter!=="none"||Ee.backdropFilter!=="none"||Se.includes("transform")||Se.includes("filter")||Se.includes("perspective"))return ye;ye=ye.parentElement}return null},ve=()=>{if(!ne.teleportTo&&!ne.overlay||!le.value)return;const $e=le.value.getBoundingClientRect();let ye=$e.bottom+6,Ee=$e.left;if(ne.overlay&&!ne.teleportTo){const Se=ue(le.value);if(Se){const Le=Se.getBoundingClientRect();ye-=Le.top,Ee-=Le.left}}ce.value={position:"fixed",top:`${ye}px`,left:`${Ee}px`,width:`${$e.width}px`,zIndex:9999}},me=e$b.computed(()=>ne.multiple?Array.isArray(ne.modelValue)&&ne.modelValue.length>0:ne.options.some($e=>$e.value===ne.modelValue)),be=e$b.computed(()=>{if(ne.multiple)return null;const $e=ne.options.find(ye=>ye.value===ne.modelValue);return($e==null?void 0:$e.icon)||ne.iconPlaceholder||ne.icon||null}),fe=e$b.computed(()=>ne.iconPlaceholder||ne.icon||null);e$b.watch(re,async $e=>{$e&&(await e$b.nextTick(),ve(),requestAnimationFrame(ve))});const pe=[];e$b.onMounted(()=>{if(document.addEventListener("mousedown",de),ne.teleportTo||ne.overlay){const $e=()=>{re.value&&ve()};window.addEventListener("scroll",$e,!0),window.addEventListener("resize",$e),pe.push(["scroll",$e],["resize",$e])}}),e$b.onUnmounted(()=>{document.removeEventListener("mousedown",de),pe.forEach(([$e,ye])=>window.removeEventListener($e,ye,$e==="scroll"?!0:void 0))});const _e=$e=>ne.multiple&&Array.isArray(ne.modelValue)?ne.modelValue.includes($e):ne.modelValue===$e,ge=$e=>{if(ne.multiple){const ye=Array.isArray(ne.modelValue)?[...ne.modelValue]:[],Ee=ye.indexOf($e);Ee===-1?ye.push($e):ye.splice(Ee,1),ae("update:modelValue",ye)}else ae("update:modelValue",$e),re.value=!1},ke=e$b.computed(()=>{if(ne.multiple&&Array.isArray(ne.modelValue))return ne.modelValue.length===0?ne.placeholder:ne.options.filter(Ee=>ne.modelValue.includes(Ee.value)).map(Ee=>Ee.name).join(", ");const $e=ne.options.find(ye=>ye.value===ne.modelValue);return($e==null?void 0:$e.name)||ne.placeholder});return($e,ye)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:"relative w-full",ref_key:"dropdownRef",ref:oe},[e$b.createElementVNode("div",{onClick:ye[0]||(ye[0]=Ee=>re.value=!re.value),class:e$b.normalizeClass(["flex flex-wrap items-center justify-between p-3 gap-2 rounded-md cursor-pointer transition",ee.theme]),ref_key:"triggerRef",ref:le},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["text-xs truncate max-w-full flex gap-2 items-center",me.value?"":"opacity-80"])},[me.value&&be.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"flex-shrink-0",innerHTML:be.value},null,8,_hoisted_1$1s)):!me.value&&fe.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"flex-shrink-0",innerHTML:fe.value},null,8,_hoisted_2$1f)):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_3$16,e$b.toDisplayString(ke.value),1)],2),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3 transition-transform duration-300",re.value?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...ye[1]||(ye[1]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 9-7 7-7-7"},null,-1)])],2))],2),re.value&&!ee.teleportTo&&!ee.overlay?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["absolute flex flex-col z-50 mt-1.5 w-full shadow-sm border rounded-md max-h-64 overflow-y-auto hide-scrollbar",ee.theme])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.options,Ee=>(e$b.openBlock(),e$b.createElementBlock("button",{key:Ee.value,class:e$b.normalizeClass([_e(Ee.value)?"bg-green-500/30 hover:bg-green-500/50":"hover:bg-base-200","flex items-center justify-between gap-2 px-3 py-2 text-left text-sm cursor-pointer transition w-full"]),onClick:Se=>ge(Ee.value)},[e$b.createElementVNode("div",_hoisted_5$U,[Ee.icon?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,innerHTML:Ee.icon,class:"flex-shrink-0"},null,8,_hoisted_6$N)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_7$J,e$b.toDisplayString(Ee.name),1)]),_e(Ee.value)?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$D,[...ye[2]||(ye[2]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)],10,_hoisted_4$10))),128))],2)):e$b.createCommentVNode("",!0),re.value&&!ee.teleportTo&&ee.overlay?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,style:e$b.normalizeStyle(ce.value),class:e$b.normalizeClass(["flex flex-col shadow-sm border rounded-md max-h-64 overflow-y-auto hide-scrollbar",ee.theme])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.options,Ee=>(e$b.openBlock(),e$b.createElementBlock("button",{key:Ee.value,class:e$b.normalizeClass([_e(Ee.value)?"bg-green-500/30 hover:bg-green-500/50":"hover:bg-base-200","flex items-center justify-between gap-2 px-3 py-2 text-left text-sm cursor-pointer transition w-full"]),onClick:Se=>ge(Ee.value)},[e$b.createElementVNode("div",_hoisted_10$x,[Ee.icon?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,innerHTML:Ee.icon,class:"flex-shrink-0"},null,8,_hoisted_11$u)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_12$s,e$b.toDisplayString(Ee.name),1)]),_e(Ee.value)?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$o,[...ye[3]||(ye[3]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)],10,_hoisted_9$A))),128))],6)):e$b.createCommentVNode("",!0),re.value&&ee.teleportTo?(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{key:2,to:ee.teleportTo},[e$b.createElementVNode("div",{ref_key:"teleportedRef",ref:ie,style:e$b.normalizeStyle(ce.value),class:e$b.normalizeClass(["flex flex-col shadow-sm border rounded-md max-h-64 overflow-y-auto hide-scrollbar",ee.theme])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.options,Ee=>(e$b.openBlock(),e$b.createElementBlock("button",{key:Ee.value,class:e$b.normalizeClass([_e(Ee.value)?"bg-green-500/30 hover:bg-green-500/50":"hover:bg-base-200","flex items-center justify-between gap-2 px-3 py-2 text-left text-sm cursor-pointer transition w-full"]),onClick:Se=>ge(Ee.value)},[e$b.createElementVNode("div",_hoisted_15$l,[Ee.icon?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,innerHTML:Ee.icon,class:"flex-shrink-0"},null,8,_hoisted_16$i)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_17$c,e$b.toDisplayString(Ee.name),1)]),_e(Ee.value)?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_18$c,[...ye[4]||(ye[4]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)],10,_hoisted_14$n))),128))],6)],8,["to"])):e$b.createCommentVNode("",!0)],512))}},SimpleSelect=_export_sfc$1(_sfc_main$1C,[["__scopeId","data-v-443d8f21"]]),_hoisted_1$1r={class:"toggle-page-buttons-wrapper"},_hoisted_2$1e=["disabled","onClick","onMouseenter","onMouseleave"],_hoisted_3$15={key:0,class:"size-4 text-white/80","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_4$$={key:1,class:"toggle-page-button-label"},_hoisted_5$T={key:0,class:"popper-content"},_sfc_main$1B={__name:"toggleListButtons",props:{modelValue:{type:String,required:!0},buttons:{type:Array,required:!0,default:()=>[]}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=e$b.ref({}),ae=oe=>{ne.value[oe]=!ne.value[oe]},re=oe=>{ne.value[oe]=!1};return(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock("main",_hoisted_1$1r,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.buttons,le=>(e$b.openBlock(),e$b.createBlock(e$b.unref(entry_esm),{key:le.value,class:"dark:popper-light w-full popper-dark",show:le.disabled&&ne.value[le.value],placement:"bottom",onShow:()=>ne.value[le.value]=!0,onHide:()=>ne.value[le.value]=!1},{content:e$b.withCtx(()=>[le.disabled&&le.disabledReason?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_5$T,e$b.toDisplayString(le.disabledReason),1)):e$b.createCommentVNode("",!0)]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{disabled:le.disabled,class:e$b.normalizeClass(["toggle-page-button",{selected:ee.modelValue===le.value}]),onClick:ce=>oe.$emit("update:modelValue",le.value),onMouseenter:ce=>le.disabled&&ae(le.value),onMouseleave:ce=>re(le.value)},[le.disabled?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_3$15,[...ie[0]||(ie[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_4$$,e$b.toDisplayString(le.label),1))],42,_hoisted_2$1e)]),_:2},1032,["show","onShow","onHide"]))),128))]))}},ToggleListButtons=_export_sfc$1(_sfc_main$1B,[["__scopeId","data-v-5b240a65"]]);function useWhatsappBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.whatsapp_infos)||[]).filter(ae=>(ae==null?void 0:ae.meta_business_acc_id)||(ae==null?void 0:ae.whatsapp_bsuid)).map((ae,re)=>({id:ae.id||`wa-${re}`,instanceName:ae.instance||"",bsuid:ae.whatsapp_bsuid||"",user_name:ae.whatsapp_user_name||""})).filter(ae=>ae.instanceName)})}function useInstagramBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.instagram_infos)||[]).filter(ae=>(ae==null?void 0:ae.instagram_account_id)||(ae==null?void 0:ae.instagram_bsuid)).map((ae,re)=>({id:ae.id||`ig-${re}`,instanceName:ae.instance||"",bsuid:ae.instagram_bsuid||"",user_name:ae.instagram_user_name||""})).filter(ae=>ae.instanceName)})}function useTelegramBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.telegram_infos)||[]).filter(ae=>(ae==null?void 0:ae.telegram_account_id)||(ae==null?void 0:ae.telegram_chat_id)).map((ae,re)=>({id:ae.id||`tg-${re}`,instanceName:ae.instance||"",bsuid:ae.telegram_chat_id||"",user_name:ae.telegram_user_name||""})).filter(ae=>ae.instanceName)})}function useWebchatBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.webchat_infos)||[]).filter(ae=>ae==null?void 0:ae.webchat_id).map((ae,re)=>({id:ae.id||`wc-${re}`,instanceName:ae.instance||"",bsuid:ae.webchat_id||"",user_name:""})).filter(ae=>ae.instanceName)})}function useHasContactBindings(ee,te,ne,ae){return e$b.computed(()=>{var re,oe;return ee.value.length>0||te.value.length>0||(((re=ne==null?void 0:ne.value)==null?void 0:re.length)||0)>0||(((oe=ae==null?void 0:ae.value)==null?void 0:oe.length)||0)>0})}const currencyLocaleMap={BRL:"pt-BR",USD:"en-US",EUR:"de-DE",JPY:"ja-JP",GBP:"en-GB",CHF:"de-CH",BTC:"en-US"},currencySymbols={BRL:"R$",USD:"$",EUR:"€",JPY:"¥",GBP:"£",CHF:"CHF",BTC:"₿"},formatCurrency=(ee,te="BRL")=>{const ne=Number(ee);if(!Number.isFinite(ne))return"";if(te==="BTC")return`₿ ${ne.toFixed(8)}`;const ae=currencyLocaleMap[te]??"en-US",re={style:"currency",currency:te};te==="JPY"&&(re.maximumFractionDigits=0);try{return new Intl.NumberFormat(ae,re).format(ne)}catch{return`${currencySymbols[te]??te} ${ne}`}},getCurrencySymbol=(ee="BRL")=>currencySymbols[ee]??ee,getCurrencyLocale=(ee="BRL")=>currencyLocaleMap[ee]??"en-US",_hoisted_1$1q={class:"discount-product-card"},_hoisted_2$1d={class:"discount-product-image"},_hoisted_3$14=["src"],_hoisted_4$_={key:1,class:"product-img-placeholder"},_hoisted_5$S={class:"discount-product-info"},_hoisted_6$M={class:"discount-product-header"},_hoisted_7$I={class:"discount-product-name"},_hoisted_8$C={class:"discount-badge-mini"},_hoisted_9$z={class:"discount-product-row"},_hoisted_10$w={class:"discount-product-prices"},_hoisted_11$t={class:"original-price"},_hoisted_12$r={class:"final-price"},_hoisted_13$n={class:"discount-product-quantity"},_hoisted_14$m={class:"qty-label"},_hoisted_15$k={class:"subtotal"},_sfc_main$1A={__name:"DiscountProductCard",props:{item:{type:Object,required:!0},getProductId:{type:Function,required:!0}},setup(ee){const te=ee,ne=()=>te.item.product.price*(1-te.item.discount/100),ae=()=>ne()*te.item.quantity,re=oe=>{const ie=Number(oe);return Number.isFinite(ie)?ie.toFixed(2):"0.00"};return(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_1$1q,[e$b.createElementVNode("div",_hoisted_2$1d,[ee.item.product.photo?(e$b.openBlock(),e$b.createElementBlock("img",{key:0,src:ee.item.product.photo,class:"product-img"},null,8,_hoisted_3$14)):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_4$_,[...ie[0]||(ie[0]=[e$b.createElementVNode("svg",{class:"size-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{fill:"currentColor",d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Zm1.01 8H8.00002v2.01H10.01V11Zm.99 0h2.01v2.01H11V11Zm5.01 0H14v2.01h2.01V11Zm-8.00998 3H10.01v2.01H8.00002V14ZM13.01 14H11v2.01h2.01V14Zm.99 0h2.01v2.01H14V14ZM11 4h6v1h-6V4Z","clip-rule":"evenodd"})],-1)])]))]),e$b.createElementVNode("div",_hoisted_5$S,[e$b.createElementVNode("div",_hoisted_6$M,[e$b.createElementVNode("span",_hoisted_7$I,e$b.toDisplayString(ee.item.product.name),1),e$b.createElementVNode("span",_hoisted_8$C,"-"+e$b.toDisplayString(re(ee.item.discount))+"%",1)]),e$b.createElementVNode("div",_hoisted_9$z,[e$b.createElementVNode("div",_hoisted_10$w,[e$b.createElementVNode("span",_hoisted_11$t,e$b.toDisplayString(e$b.unref(formatCurrency)(ee.item.product.price,ee.item.product.currency)),1),e$b.createElementVNode("span",_hoisted_12$r,e$b.toDisplayString(e$b.unref(formatCurrency)(ne(),ee.item.product.currency)),1)]),e$b.createElementVNode("div",_hoisted_13$n,[e$b.createElementVNode("span",_hoisted_14$m,e$b.toDisplayString(ee.item.quantity)+"x",1),e$b.createElementVNode("span",_hoisted_15$k,e$b.toDisplayString(e$b.unref(formatCurrency)(ae(),ee.item.product.currency)),1)])])])]))}},DiscountProductCard=_export_sfc$1(_sfc_main$1A,[["__scopeId","data-v-bc4339e3"]]),_hoisted_1$1p={key:0,class:"product-photo-section"},_hoisted_2$1c=["src"],_hoisted_3$13={key:1,class:"empty-product-photo"},_hoisted_4$Z={class:"product-header"},_hoisted_5$R=["title"],_hoisted_6$L={key:0,class:"incorporated-badge"},_hoisted_7$H={class:"product-pricing"},_hoisted_8$B={class:"flex gap-1 items-center"},_hoisted_9$y={key:0,class:"discount-percentage"},_hoisted_10$v={key:1,class:"discounted-price"},_hoisted_11$s={key:0,class:"price-line"},_hoisted_12$q={class:"price-total"},_sfc_main$1z={__name:"ProductListItem",props:{product:{type:Object,required:!0},quantity:{type:Number,default:0},discount:{type:Number,default:0},incorporated:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=oe=>{const ie=Number(oe);return Number.isFinite(ie)?ie.toFixed(2).replace(".",","):"0,00"},ae=()=>{var le;const oe=((le=re())==null?void 0:le.price)||0,ie=te.discount||0;return oe*(1-ie/100)},re=()=>{var oe;return((oe=te.product)==null?void 0:oe.product)||te.product};return(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["product-list-item",{"compact-mode":ee.compact,"has-quantity":ee.quantity>0}])},[ee.compact?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1p,[re().photo?(e$b.openBlock(),e$b.createElementBlock("img",{key:0,class:"product-photo",src:re().photo},null,8,_hoisted_2$1c)):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_3$13,[...ie[0]||(ie[0]=[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{fill:"currentColor",d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Zm1.01 8H8.00002v2.01H10.01V11Zm.99 0h2.01v2.01H11V11Zm5.01 0H14v2.01h2.01V11Zm-8.00998 3H10.01v2.01H8.00002V14ZM13.01 14H11v2.01h2.01V14Zm.99 0h2.01v2.01H14V14ZM11 4h6v1h-6V4Z","clip-rule":"evenodd"})],-1)])]))])),e$b.createElementVNode("section",{class:e$b.normalizeClass(["product-info-section",{"flex-1":!ee.compact,"w-full":ee.compact}])},[e$b.createElementVNode("div",_hoisted_4$Z,[e$b.createElementVNode("p",{class:e$b.normalizeClass(["products-and-services_badge dark:text-white flex-shrink-0",re().recurrence])},e$b.toDisplayString(re().recurrence==="monthly"?"Mensal":"Único"),3),e$b.createElementVNode("p",{title:re().name,class:e$b.normalizeClass(["label-product-name",ee.quantity>0?"text-white dark:text-primary":""])},e$b.toDisplayString(re().name),11,_hoisted_5$R),ee.incorporated?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$L,"+")):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("span",_hoisted_7$H,[e$b.createElementVNode("div",_hoisted_8$B,[e$b.createElementVNode("p",{class:e$b.normalizeClass(["text-xs font-semibold",ee.discount>0?"line-through opacity-60":""])},e$b.toDisplayString(e$b.unref(formatCurrency)(re().price,re().currency)),3),ee.discount>0?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_9$y," - "+e$b.toDisplayString(ne(ee.discount))+"% ",1)):e$b.createCommentVNode("",!0),ee.discount>0?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_10$v,e$b.toDisplayString(e$b.unref(formatCurrency)(ae(),re().currency)),1)):e$b.createCommentVNode("",!0)]),ee.quantity>0?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_11$s,[e$b.createTextVNode(" - x "+e$b.toDisplayString(ee.quantity)+" = ",1),e$b.createElementVNode("a",_hoisted_12$q,e$b.toDisplayString(e$b.unref(formatCurrency)(ae()*ee.quantity,re().currency)),1)])):e$b.createCommentVNode("",!0)])],2)],2))}},ProductListItem=_export_sfc$1(_sfc_main$1z,[["__scopeId","data-v-f557ef28"]]),_hoisted_1$1o={key:0,class:"header-products-list bg-base-300"},_hoisted_2$1b={key:0,style:{padding:"0.5rem 0.5rem 0rem 0.5rem"}},_hoisted_3$12={class:"flex items-center gap-2 flex-wrap"},_hoisted_4$Y={class:"currency-code"},_hoisted_5$Q={class:"discount-tooltip"},_hoisted_6$K={class:"discount-tooltip-header"},_hoisted_7$G={class:"discount-tooltip-list"},_hoisted_8$A={class:"original-value-wrapper"},_hoisted_9$x={class:"original-value-crossed"},_hoisted_10$u={class:"final-value"},_hoisted_11$r={class:"p-2 text-sm px-3"},_hoisted_12$p={class:"text-center"},_hoisted_13$m=["disabled"],_hoisted_14$l={key:0,class:"flex items-center gap-1"},_hoisted_15$j={key:1,class:"flex items-center gap-1"},_hoisted_16$h={class:"text-[13px]"},_hoisted_17$b={key:1,class:"flex items-center justify-center overflow-hidden h-full"},_hoisted_18$b={key:2,class:"list-products-list"},_hoisted_19$a={key:0},_hoisted_20$a={class:"w-full text-gray-500 list-none list-inside dark:text-gray-400 divide-y divide-base-200"},_hoisted_21$9={key:0,class:"department-blocked"},_hoisted_22$7={class:"flex gap-2 items-center pl-2 flex-1"},_hoisted_23$6={class:"product-actions-section"},_hoisted_24$6={class:"quantity-controls"},_hoisted_25$4=["disabled","onClick"],_hoisted_26$2=["disabled","onClick"],_hoisted_27$2={class:"discount-input-tooltip"},_hoisted_28$2={key:0,class:"text-xs"},_hoisted_29$2={key:1,class:"flex flex-col gap-1"},_hoisted_30$2={class:"text-xs"},_hoisted_31$2={class:"font-bold text-orange-400"},_hoisted_32$1={class:"discount-input-wrapper-animated"},_hoisted_33$1=["value","onInput","onFocus","onBlur","disabled","placeholder"],_hoisted_34$1={key:1,class:"flex flex-col flex-1 gap-2 items-center justify-center"},_hoisted_35$1={key:0,class:"text-gray-200 text-[10px] md:text-xs font-sans"},_sfc_main$1y={__name:"listProducts",props:{modelValue:{type:Array,default:()=>[]},allProducts:{type:[Object,Array],default:()=>{}},onMouseLeave:{type:Function,required:!1},departmentBypass:{type:String,default:""},readonly:{type:Boolean,default:!1},proposal:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["update:modelValue","generate-proposal"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.ref([]),ie=e$b.computed(()=>[...oe.value].sort((lt,it)=>{const gt=pe(lt)>0,Et=pe(it)>0;if(gt!==Et)return Et-gt;const mt=Ie(lt),je=Ie(it);return mt===je?0:mt-je}));function le(lt){return Array.isArray(lt)?lt.map(it=>it&&it.product?{product:{...it.product},quantity:it.quantity??0,discount:it.discount??0}:{product:{...it},quantity:it.quantity??0,discount:it.discount??0}):[]}const ce=e$b.ref(le(ne.modelValue)),de=e$b.ref(1),ue=e$b.ref(null),ve=e$b.ref(null),me=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=it.product||it,Et=gt.price||0,mt=it.quantity||0,je=it.discount||0,Qe=gt.currency||"BRL";if(mt===0)return;lt[Qe]||(lt[Qe]={currency:Qe,originalTotal:0,finalTotal:0,hasDiscount:!1});const ut=Et*mt,dt=Et*je/100*mt,pt=ut-dt;lt[Qe].originalTotal+=ut,lt[Qe].finalTotal+=pt,je>0&&(lt[Qe].hasDiscount=!0)}),Object.values(lt)});e$b.computed(()=>ce.value.reduce((lt,it)=>{var Qe;const gt=((Qe=it.product)==null?void 0:Qe.price)||it.price||0,Et=it.quantity||0,mt=it.discount||0,je=gt*(1-mt/100);return lt+je*Et},0)),e$b.computed(()=>ce.value.filter(lt=>lt.quantity>0&<.discount>0)),e$b.computed(()=>ce.value.reduce((lt,it)=>{var Qe;const gt=((Qe=it.product)==null?void 0:Qe.price)||it.price||0,Et=it.quantity||0,mt=it.discount||0,je=gt*mt/100*Et;return lt+je},0));function be(lt){var it;return((it=lt==null?void 0:lt.product)==null?void 0:it.id)??(lt==null?void 0:lt.id)}const fe=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=be(it);gt!=null&&(lt[gt]=it.quantity)}),lt}),pe=lt=>fe.value[lt.id]||0,_e=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=be(it);gt!=null&&(lt[gt]=it.discount||0)}),lt}),ge=lt=>_e.value[lt.id]||0,ke=(lt,it=100)=>{let gt=Number(lt);return Number.isFinite(gt)||(gt=0),gt<0&&(gt=0),gt>it&&(gt=it),Math.round(gt*100)/100},$e=(lt,it)=>{if(ne.readonly||Ie(lt)||!lt.discountable)return;const gt=lt.max_discount||100,Et=ke(it,gt),mt=ce.value.find(je=>be(je)===lt.id);mt&&(mt.discount=Et)},ye=(lt,it)=>{if(ne.readonly||Ie(lt)||!lt.discountable)return;const gt=lt.id;Xe.value[gt]=!0;let Et=it.target.value;if(Et===""){Ze.value[gt]="",it.target.value="",clearTimeout(Ue[gt]),Ue[gt]=setTimeout(()=>{Ze.value[gt]===""&&(Ze.value[gt]="0",$e(lt,0)),Xe.value[gt]=!1},600);return}Et=Et.replace(/[^\d.,]/g,"").replace(",",".");const mt=Et.split(".");mt.length>2&&(Et=mt[0]+"."+mt.slice(1).join("")),it.target.value=Et.replace(".",","),Ze.value[gt]=Et,clearTimeout(Ue[gt]),Ue[gt]=setTimeout(()=>{Ee(lt),Xe.value[gt]=!1},600)},Ee=lt=>{const it=lt.id;let gt=(Ze.value[it]||"").trim();if(gt===""||gt==="."){const je=ge(lt);Ze.value[it]=String(je);return}const Et=lt.max_discount||100,mt=ke(gt,Et);Ze.value[it]=String(mt),$e(lt,mt)},Se=(lt,it)=>{const gt=lt.id;Xe.value[gt]=!0,it.target.select()},Le=lt=>{const it=lt.id;clearTimeout(Ue[it]),Ze.value[it]===""?(Ze.value[it]="0",$e(lt,0)):Ee(lt),Xe.value[it]=!1},Me=lt=>{const it=lt.id;return Xe.value[it]?(Ze.value[it]??String(ge(lt))).replace(".",","):String(ge(lt)).replace(".",",")},De=lt=>{if(ne.readonly||Ie(lt))return;const it=ce.value.find(gt=>be(gt)===lt.id);it?it.quantity++:(ce.value.push({product:{...lt},quantity:1,discount:0}),Ze.value[lt.id]="0")},Oe=lt=>{if(ne.readonly||Ie(lt))return;const it=ce.value.find(gt=>be(gt)===lt.id);it&&(it.quantity>0?it.quantity--:it.quantity=0)},Re=(lt,it)=>{const gt=new URLSearchParams,Et=lt;return Object.keys(it).forEach(mt=>gt.append(mt,it[mt])),`${Et}?${gt.toString()}`};let ze=null;const Ve=async lt=>{if(ze!==de.value){ze=de.value;try{const{data:it}=await api.get(Re(crm_products,{page:de.value,...lt})),{results:gt,next:Et,previous:mt}=it;if(ue.value=Et,ve.value=mt,de.value===1)oe.value=gt;else{const je=new Set(oe.value.map(dt=>dt.id)),Qe=new Set(ce.value.map(dt=>be(dt))),ut=gt.filter(dt=>!je.has(dt.id)&&!Qe.has(dt.id));oe.value=[...oe.value,...ut]}ue.value&&(de.value+=1)}catch(it){console.error("Erro ao buscar produtos:",it)}finally{ze=null}}};function Ne(){const lt=new Set(oe.value.map(gt=>gt.id)),it=ce.value.filter(gt=>{const Et=be(gt);return Et&&!lt.has(Et)}).map(gt=>gt.product);it.length>0&&(oe.value=[...it,...oe.value])}function Pe(){ce.value.forEach(lt=>{const it=be(lt);it&&!Ze.value[it]&&(Ze.value[it]=String(lt.discount||0))})}let Be=!1;async function Ae(){var it;if(Be)return;Be=!0;const lt=Array.isArray(ne.allProducts)?ne.allProducts:(it=ne.allProducts)==null?void 0:it.results;lt&<.length>0?(oe.value=lt,ue.value=!Array.isArray(ne.allProducts)&&ne.allProducts.next||null,ve.value=!Array.isArray(ne.allProducts)&&ne.allProducts.previous||null,de.value=2):await Ve(),Ne(),Pe()}e$b.onMounted(Ae),e$b.watch(ie,lt=>{lt.forEach(it=>{if(it&&it.id&&!Ze.value[it.id]){const gt=ce.value.find(mt=>be(mt)===it.id),Et=(gt==null?void 0:gt.discount)||0;Ze.value[it.id]=String(Et)}})},{immediate:!0}),e$b.watch(ce,lt=>{ae("update:modelValue",lt.map(it=>({product:it.product,quantity:it.quantity,discount:it.discount||0}))),lt.forEach(it=>{const gt=be(it);gt&&!Xe.value[gt]&&(Ze.value[gt]=String(it.discount||0))})},{deep:!0}),e$b.watch(()=>ne.modelValue,lt=>{const it=le(lt);JSON.stringify(it)!==JSON.stringify(ce.value)&&(ce.value=it,Ne(),Pe())},{deep:!0});const xe=e$b.ref(!1),Ce=async lt=>{if(!xe.value){xe.value=!0;try{if(!ue.value){lt.complete();return}await Ve(),ue.value?lt.loaded():lt.complete()}catch(it){console.error("Erro ao carregar produtos:",it),lt.complete()}finally{xe.value=!1}}};function Fe(){typeof ne.onMouseLeave=="function"&&ne.onMouseLeave()}const Ie=lt=>{if(xe.value)return!1;const it=ne.departmentBypass;if(!it)return!1;const gt=Array.isArray(lt==null?void 0:lt.department)?lt.department:[];return gt.length===0?!1:!gt.some(mt=>mt&&mt.id===it)},qe=e$b.ref({query:""}),Ge=e$b.ref(!1),Ze=e$b.ref({}),Xe=e$b.ref({});let Ue={},at;e$b.watch(qe,()=>{clearTimeout(at),at=setTimeout(async()=>{const{query:lt}=qe.value;de.value=1,Ge.value=lt!=null,re.value=!0,await Ve({query:lt}),re.value=!1},500)},{deep:!0});function Je(){ae("generate-proposal")}return(lt,it)=>{const gt=e$b.resolveComponent("Popper"),Et=e$b.resolveComponent("SimpleLoader");return e$b.openBlock(),e$b.createElementBlock("div",{class:"list-products-wrapper",onMouseleave:Fe},[oe.value.length>0&&!Ge.value||Ge.value?(e$b.openBlock(),e$b.createElementBlock("header",_hoisted_1$1o,[me.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_2$1b,[e$b.createElementVNode("section",{class:e$b.normalizeClass(["total-price-badge text-white",{"with-proposal":ee.proposal}])},[e$b.createElementVNode("div",_hoisted_3$12,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(me.value,mt=>(e$b.openBlock(),e$b.createElementBlock("div",{key:mt.currency,class:"currency-badge"},[e$b.createElementVNode("span",_hoisted_4$Y,e$b.toDisplayString(e$b.unref(getCurrencySymbol)(mt.currency)),1),mt.hasDiscount?(e$b.openBlock(),e$b.createBlock(gt,{key:0,class:"discount-popper",hover:!0,placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("main",_hoisted_5$Q,[e$b.createElementVNode("div",_hoisted_6$K,e$b.toDisplayString(mt.currency)+" - Produtos com desconto ("+e$b.toDisplayString(ce.value.filter(je=>{var Qe;return(((Qe=je.product)==null?void 0:Qe.currency)||"BRL")===mt.currency&&je.quantity>0&&je.discount>0}).length)+") ",1),e$b.createElementVNode("ul",_hoisted_7$G,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ce.value.filter(je=>{var Qe;return(((Qe=je.product)==null?void 0:Qe.currency)||"BRL")===mt.currency&&je.quantity>0&&je.discount>0}),je=>(e$b.openBlock(),e$b.createBlock(DiscountProductCard,{key:be(je),item:je,getProductId:be},null,8,["item"]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_8$A,[e$b.createElementVNode("span",_hoisted_9$x,e$b.toDisplayString(e$b.unref(formatCurrency)(mt.originalTotal,mt.currency).replace(/[^\d.,\s]/g,"").trim()),1),it[1]||(it[1]=e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"discount-icon-small",viewBox:"0 0 55 62",fill:"none"},[e$b.createElementVNode("path",{d:"M26.6839 11.1304C28.6291 8.59593 32.6389 9.49368 33.6735 12.6953V12.6953C34.3268 14.7172 36.3132 15.9948 38.2894 15.6568V15.6568C41.3197 15.1384 43.9062 18.2943 42.9019 21.2848L42.6968 21.8954C42.033 23.8721 42.8293 26.1348 44.6 27.3029V27.3029C47.3871 29.1414 47.4599 33.2982 44.7337 34.9412L44.5536 35.0498C42.8092 36.1011 42.0583 38.3046 42.7427 40.3634L42.9237 40.9079C43.9644 44.0383 41.4451 47.0065 38.3496 46.2972V46.2972C36.3456 45.838 34.3946 46.9497 33.7532 48.9162L33.6179 49.3311C32.6312 52.3561 28.7486 52.8621 26.7994 50.2196V50.2196C25.5373 48.5086 23.2813 48.0035 21.5812 49.0513V49.0513C18.9556 50.6695 15.4947 48.5194 15.5032 45.2754L15.5044 44.8305C15.5099 42.7216 14.0337 40.8426 12.0265 40.4037V40.4037C8.92596 39.7259 7.48972 35.872 9.41874 33.4065L9.75425 32.9777C11.0229 31.3561 10.9991 28.9791 9.69678 27.2457L9.56236 27.0668C7.52706 24.3577 8.86928 20.5177 12.0288 20.0105V20.0105C14.036 19.6883 15.4714 17.9253 15.4592 15.7972L15.4555 15.1399C15.437 11.9204 18.8135 10.0995 21.4769 11.8926V11.8926C23.2138 13.062 25.4555 12.731 26.6839 11.1304V11.1304Z",fill:"currentColor"}),e$b.createElementVNode("path",{d:"M21.3849 25.185C20.8649 25.185 20.4649 25.3984 20.1849 25.825C19.9316 26.2117 19.8049 26.7384 19.8049 27.405C19.8049 28.8717 20.3316 29.605 21.3849 29.605C22.4516 29.605 22.9849 28.8717 22.9849 27.405C22.9849 26.765 22.8516 26.2384 22.5849 25.825C22.3049 25.3984 21.9049 25.185 21.3849 25.185ZM21.3849 23.345C22.5849 23.345 23.4983 23.7384 24.1249 24.525C24.6849 25.2317 24.9649 26.1917 24.9649 27.405C24.9649 28.6184 24.6849 29.5717 24.1249 30.265C23.4983 31.065 22.5849 31.465 21.3849 31.465C20.1583 31.465 19.2383 31.065 18.6249 30.265C18.0783 29.5584 17.8049 28.605 17.8049 27.405C17.8049 26.1917 18.0783 25.2317 18.6249 24.525C19.2516 23.7384 20.1716 23.345 21.3849 23.345ZM31.8649 23.105L23.1249 38.865H20.9449L29.6649 23.105H31.8649ZM31.4249 32.365C30.3716 32.365 29.8449 33.105 29.8449 34.585C29.8449 35.2384 29.9783 35.7584 30.2449 36.145C30.5249 36.585 30.9183 36.805 31.4249 36.805C32.4916 36.805 33.0249 36.065 33.0249 34.585C33.0249 33.105 32.4916 32.365 31.4249 32.365ZM31.4249 30.505C32.6383 30.505 33.5583 30.8984 34.1849 31.685C34.7449 32.3917 35.0249 33.3584 35.0249 34.585C35.0249 35.7984 34.7449 36.7517 34.1849 37.445C33.5583 38.2317 32.6383 38.625 31.4249 38.625C30.2249 38.625 29.3116 38.2317 28.6849 37.445C28.1516 36.7517 27.8849 35.7984 27.8849 34.585C27.8849 33.345 28.1516 32.3784 28.6849 31.685C29.3116 30.8984 30.2249 30.505 31.4249 30.505Z",fill:"white"})],-1))])]),_:2},1024)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_10$u,e$b.toDisplayString(e$b.unref(formatCurrency)(mt.finalTotal,mt.currency).replace(/[^\d.,\s]/g,"").trim()),1)]))),128))]),ee.proposal?(e$b.openBlock(),e$b.createBlock(gt,{key:0,class:"discount-popper",hover:!0,placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("main",_hoisted_11$r,[e$b.createElementVNode("div",_hoisted_12$p,e$b.toDisplayString(ce.value.length===0?"Adicione produtos para gerar proposta comercial":ne.loading?"Gerando proposta...":"Gerar proposta"),1)])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{onClick:Je,disabled:ce.value.length===0||ee.readonly||ne.loading,class:e$b.normalizeClass(["proposal-button",{disabled:ce.value.length===0||ee.readonly||ne.loading}])},[ne.loading?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_14$l,[...it[2]||(it[2]=[e$b.createElementVNode("div",{class:"size-4 animate-spin rounded-full border-2 border-white border-t-transparent"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$j,[it[3]||(it[3]=e$b.createElementVNode("svg",{class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M9 2.221V7H4.221a2 2 0 0 1 .365-.5L8.5 2.586A2 2 0 0 1 9 2.22ZM11 2v5a2 2 0 0 1-2 2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2 2 2 0 0 0 2 2h12a2 2 0 0 0 2-2 2 2 0 0 0 2-2v-7a2 2 0 0 0-2-2V4a2 2 0 0 0-2-2h-7Zm-6 9a1 1 0 0 0-1 1v5a1 1 0 1 0 2 0v-1h.5a2.5 2.5 0 0 0 0-5H5Zm1.5 3H6v-1h.5a.5.5 0 0 1 0 1Zm4.5-3a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h1.376A2.626 2.626 0 0 0 15 15.375v-1.75A2.626 2.626 0 0 0 12.375 11H11Zm1 5v-3h.375a.626.626 0 0 1 .625.626v1.748a.625.625 0 0 1-.626.626H12Zm5-5a1 1 0 0 0-1 1v5a1 1 0 1 0 2 0v-1h1a1 1 0 1 0 0-2h-1v-1h1a1 1 0 1 0 0-2h-2Z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_16$h,e$b.toDisplayString(ce.value.length),1)]))],10,_hoisted_13$m)]),_:1})):e$b.createCommentVNode("",!0)],2)])):e$b.createCommentVNode("",!0),e$b.withDirectives(e$b.createElementVNode("input",{class:"search-products-input bg-base-200 text-white dark:text-black",type:"text",placeholder:"Buscar...","onUpdate:modelValue":it[0]||(it[0]=mt=>qe.value.query=mt)},null,512),[[e$b.vModelText,qe.value.query]])])):e$b.createCommentVNode("",!0),re.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$b,[e$b.createVNode(Et)])):(e$b.openBlock(),e$b.createElementBlock("main",_hoisted_18$b,[oe.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_19$a,[e$b.createElementVNode("ul",_hoisted_20$a,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ie.value,(mt,je)=>(e$b.openBlock(),e$b.createElementBlock("li",{class:"flex w-full bg-base-300 justify-between items-center py-1.5 relative",key:mt.id},[Ie(mt)?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_21$9,[...it[4]||(it[4]=[e$b.createElementVNode("svg",{class:"size-5 text-white","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"})],-1),e$b.createElementVNode("p",{class:"text-xs text-white/80"},"Este produto não faz parte do seu departamento",-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_22$7,[e$b.createVNode(ProductListItem,{product:mt,quantity:pe(mt),discount:ge(mt)},null,8,["product","quantity","discount"])]),e$b.createElementVNode("section",_hoisted_23$6,[e$b.createElementVNode("div",_hoisted_24$6,[e$b.createElementVNode("button",{disabled:Ie(mt)||ee.readonly,class:"action-list-button bg-base-200",onClick:Qe=>Oe(mt)}," - ",8,_hoisted_25$4),e$b.createElementVNode("p",{class:e$b.normalizeClass(["w-5 text-xs flex items-center justify-center font-semibold font-sans",pe(mt)>0?"text-white dark:text-black":""])},e$b.toDisplayString(pe(mt)),3),e$b.createElementVNode("button",{disabled:Ie(mt)||ee.readonly,class:"action-list-button bg-base-200",onClick:Qe=>De(mt)}," + ",8,_hoisted_26$2)]),pe(mt)>0?(e$b.openBlock(),e$b.createBlock(gt,{key:0,class:"discount-input-popper",hover:!0,arrow:"",placement:"left"},{content:e$b.withCtx(()=>[e$b.createElementVNode("main",_hoisted_27$2,[mt.discountable?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_29$2,[it[6]||(it[6]=e$b.createElementVNode("div",{class:"text-xs"},"Desconto habilitado",-1)),e$b.createElementVNode("div",_hoisted_30$2,[it[5]||(it[5]=e$b.createTextVNode(" Máximo: ",-1)),e$b.createElementVNode("span",_hoisted_31$2,e$b.toDisplayString(mt.max_discount||100)+"%",1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_28$2," Desconto não permitido para este produto "))])]),default:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_32$1,[e$b.createElementVNode("input",{value:Me(mt),onInput:Qe=>ye(mt,Qe),onFocus:Qe=>Se(mt,Qe),onBlur:()=>Le(mt),inputmode:"decimal",type:"text",disabled:!mt.discountable||Ie(mt)||ee.readonly,class:e$b.normalizeClass(["discount-input-compact",{"not-discountable":!mt.discountable}]),placeholder:mt.discountable?"0":"N/A"},null,42,_hoisted_33$1),it[7]||(it[7]=e$b.createElementVNode("span",{class:"discount-symbol"},"%",-1))])]),_:2},1024)):e$b.createCommentVNode("",!0)])]))),128))]),ue.value?(e$b.openBlock(),e$b.createBlock(e$b.unref(Y$1),{key:0,onInfinite:Ce,class:"p-3"},{spinner:e$b.withCtx(()=>[...it[8]||(it[8]=[e$b.createElementVNode("section",{class:"w-full justify-center items-center flex"},[e$b.createElementVNode("div",{class:"size-4 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"})],-1)])]),_:1})):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0),!re.value&&oe.value.length<=0?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_34$1,[it[10]||(it[10]=e$b.createElementVNode("p",{class:"text-gray-200 dark:text-gray-900 text-xs md:text-base font-sans"},"Nenhum item encontrado",-1)),Ge.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_35$1,[...it[9]||(it[9]=[e$b.createTextVNode(" Comece criando seu primeiro na aba ",-1),e$b.createElementVNode("strong",null,"Produtos",-1)])]))])):e$b.createCommentVNode("",!0)]))],32)}}},ListProducts=_export_sfc$1(_sfc_main$1y,[["__scopeId","data-v-401abda7"]]),_hoisted_1$1n=["aria-label"],_hoisted_2$1a={class:"smplay-loader-blocks","aria-hidden":"true"},_hoisted_3$11={key:0,class:"smplay-pixel-label smplay-loader-label"},_hoisted_4$X={key:1,class:"smplay-loader-flavor"},_sfc_main$1x={__name:"PixelLoader",props:{size:{type:String,default:"md"},label:{type:String,default:""},flavor:{type:String,default:""},tone:{type:String,default:"primary",validator:ee=>["primary","current"].includes(ee)}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["smplay-loader",[`smplay-loader--${ee.size}`,ee.tone==="current"?"smplay-loader--current":""]]),role:"status","aria-label":ee.label||"Carregando"},[e$b.createElementVNode("span",_hoisted_2$1a,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,ae=>e$b.createElementVNode("i",{key:ae,style:e$b.normalizeStyle({"--i":ae-1})},null,4)),64))]),ee.label?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$11,e$b.toDisplayString(ee.label),1)):e$b.createCommentVNode("",!0),ee.flavor?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_4$X,e$b.toDisplayString(ee.flavor),1)):e$b.createCommentVNode("",!0)],10,_hoisted_1$1n))}},PixelLoader=_export_sfc$1(_sfc_main$1x,[["__scopeId","data-v-3a705123"]]),LOADER_PRESETS={inline:{size:"md",tone:"primary",pad:"none",axis:"row"},button:{size:"sm",tone:"current",pad:"none",axis:"row"},block:{size:"lg",tone:"primary",pad:"lg",axis:"column"},overlay:{size:"lg",tone:"primary",pad:"none",axis:"column"},page:{size:"lg",tone:"primary",pad:"lg",axis:"column"}},LOADER_CONTEXTS=Object.keys(LOADER_PRESETS),_hoisted_1$1m=["aria-label"],_hoisted_2$19={key:0,class:"sm-loader-label"},_sfc_main$1w={__name:"Loader",props:{context:{type:String,default:"inline",validator:ee=>LOADER_CONTEXTS.includes(ee)},size:{type:String,default:null,validator:ee=>["xs","sm","md","lg"].includes(ee)},tone:{type:String,default:null,validator:ee=>["primary","current"].includes(ee)},pad:{type:String,default:null,validator:ee=>["none","sm","md","lg"].includes(ee)},label:{type:String,default:""},variant:{type:String,default:"auto",validator:ee=>["auto","plain","pixel"].includes(ee)}},setup(ee){const te=ee,ne=e$b.computed(()=>LOADER_PRESETS[te.context]),ae=e$b.computed(()=>te.size||ne.value.size),re=e$b.computed(()=>te.tone||ne.value.tone),oe=e$b.computed(()=>te.pad||ne.value.pad),ie=e$b.computed(()=>ne.value.axis),le=pinia.getActivePinia()?useMessageUiStore():null,ce=e$b.inject("smPlayEnabled",null),de=e$b.computed(()=>{const me=e$b.unref(ce);return me!=null?!!me:!!(le!=null&&le.smPlayEnabled)}),ue=e$b.computed(()=>te.variant==="auto"?de.value:te.variant==="pixel"),ve=e$b.computed(()=>ae.value==="xs"?"sm":ae.value);return(me,be)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["sm-loader",[`sm-loader--${ee.context}`,`sm-loader--${ae.value}`,`sm-loader--pad-${oe.value}`,`sm-loader--${ie.value}`]]),role:"status","aria-live":"polite","aria-label":ee.label||"Carregando"},[ue.value?(e$b.openBlock(),e$b.createBlock(PixelLoader,{key:0,size:ve.value,label:ee.label,tone:re.value},null,8,["size","label","tone"])):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["sm-loader-ring",re.value==="current"?"sm-loader-ring--current":""]),"aria-hidden":"true"},null,2),ee.label?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$19,e$b.toDisplayString(ee.label),1)):e$b.createCommentVNode("",!0)],64))],10,_hoisted_1$1m))}},Loader=_export_sfc$1(_sfc_main$1w,[["__scopeId","data-v-ec626c94"]]),_sfc_main$1v={__name:"simpleLoader",setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createBlock(Loader,{context:"page",pad:"none"}))}},_hoisted_1$1l={key:0,class:"flex items-center justify-center overflow-hidden h-full"},_hoisted_2$18={class:"segmentation-fields-list"},_hoisted_3$10=["for"],_hoisted_4$W={class:"bool-field-title"},_hoisted_5$P=["id","onUpdate:modelValue"],_hoisted_6$J=["for","title"],_hoisted_7$F=["id","onUpdate:modelValue"],_hoisted_8$z=["id","onUpdate:modelValue"],_hoisted_9$w=["for","title"],_hoisted_10$t={key:2,class:"flex-1 justify-center items-center flex flex-col gap-2 h-full"},_sfc_main$1u={__name:"listSegmentationsFields",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(le(ne.modelValue)),oe=e$b.ref(!1),ie=e$b.ref(null);function le(_e){return JSON.parse(JSON.stringify(_e))}function ce(_e){if(typeof _e=="boolean")return _e;if(typeof _e=="number")return _e===1;if(typeof _e=="string"){const ge=_e.trim().toLowerCase();if(["true","1","yes","y","sim"].includes(ge))return!0;if(["false","0","no","n","nao","não"].includes(ge))return!1}return!1}function de(_e){Array.isArray(_e)&&_e.forEach(ge=>{(ge==null?void 0:ge.type)==="bool"&&(ge.content=ce(ge.content))})}function ue(_e){return _e!=null&&String(_e).trim()!==""}function ve(_e){return _e==="string"?"texto":_e==="float"?"número":_e==="list"?"lista":"Desconhecido"}function me(_e){if(!_e)return;_e.style.height="auto";const ge=parseFloat(window.getComputedStyle(_e).minHeight)||0;_e.style.height=`${Math.max(_e.scrollHeight,ge)}px`}function be(_e){me(_e==null?void 0:_e.target)}function fe(){ie.value&&ie.value.querySelectorAll("textarea.floating-textarea").forEach(_e=>me(_e))}const pe=async()=>{try{oe.value=!0;const _e=await api.get(segmentation_field);re.value=_e.data,de(re.value),await e$b.nextTick(),fe()}catch(_e){console.error("Error fetching segmentation fields:",_e)}finally{oe.value=!1}};return e$b.onMounted(()=>{ne.modelValue.length===0&&pe(),de(re.value),e$b.nextTick(fe)}),e$b.watch(()=>ne.modelValue,_e=>{re.value=le(_e),de(re.value),e$b.nextTick(fe)},{deep:!0}),e$b.watch(re,_e=>{JSON.stringify(_e)!==JSON.stringify(ne.modelValue)&&ae("update:modelValue",le(_e))},{deep:!0}),(_e,ge)=>{const ke=e$b.resolveComponent("SimpleSelect");return oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1l,[e$b.createVNode(_sfc_main$1v)])):re.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,ref_key:"fieldsRoot",ref:ie},[ge[0]||(ge[0]=e$b.createElementVNode("header",{class:"header-segmentation-fields bg-base-200"},[e$b.createElementVNode("p",{class:"text-[13px] font-semibold"},"Campos Personalizados")],-1)),e$b.createElementVNode("div",_hoisted_2$18,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(re.value,$e=>(e$b.openBlock(),e$b.createElementBlock("section",{key:$e.id},[e$b.createElementVNode("div",{class:e$b.normalizeClass(["segmentation-field-row",$e.type==="bool"?"segmentation-field-row--bool":"segmentation-field-row--input"])},[$e.type==="bool"?(e$b.openBlock(),e$b.createElementBlock("label",{key:0,for:"seg-label-"+$e.id,class:"bool-field bg-base-300 @apply shadow shadow-gray-900 dark:shadow-gray-400",title:"verdadeiro/falso"},[e$b.createElementVNode("span",_hoisted_4$W,e$b.toDisplayString($e.name),1),e$b.withDirectives(e$b.createElementVNode("input",{id:"seg-label-"+$e.id,class:"bool-switch-input",type:"checkbox","onUpdate:modelValue":ye=>$e.content=ye},null,8,_hoisted_5$P),[[e$b.vModelCheckbox,$e.content]])],8,_hoisted_3$10)):$e.type==="list"?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createElementVNode("label",{for:"seg-label-"+$e.id,class:"field-caption",title:ve($e.type)},e$b.toDisplayString($e.name),9,_hoisted_6$J),e$b.createVNode(ke,{id:"seg-label-"+$e.id,modelValue:$e.content,"onUpdate:modelValue":ye=>$e.content=ye,options:$e.additional_info.list.options.map(ye=>({value:ye,name:ye})),placeholder:"Selecione uma opção",overlay:!0,theme:"bg-base-300 border-base-300"},null,8,["id","modelValue","onUpdate:modelValue","options"])],64)):(e$b.openBlock(),e$b.createElementBlock("div",{key:2,class:e$b.normalizeClass(["floating-control",{"has-value":ue($e.content)}])},[$e.type==="string"?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("textarea",{key:0,id:"seg-label-"+$e.id,class:"floating-input bg-base-300 floating-textarea",placeholder:" ",rows:"1","onUpdate:modelValue":ye=>$e.content=ye,onInput:be},null,40,_hoisted_7$F)),[[e$b.vModelText,$e.content]]):$e.type==="float"?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("input",{key:1,id:"seg-label-"+$e.id,class:"floating-input bg-base-300",type:"number",step:"any",placeholder:" ","onUpdate:modelValue":ye=>$e.content=ye},null,8,_hoisted_8$z)),[[e$b.vModelText,$e.content]]):e$b.createCommentVNode("",!0),e$b.createElementVNode("label",{for:"seg-label-"+$e.id,class:"floating-label",title:ve($e.type)},e$b.toDisplayString($e.name),9,_hoisted_9$w)],2))],2)]))),128))])],512)):(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_10$t,[...ge[1]||(ge[1]=[e$b.createElementVNode("p",{class:"text-gray-200 text-xs md:text-base font-sans"}," Nenhum item encontrado ",-1),e$b.createElementVNode("p",{class:"text-gray-200 text-[10px] md:text-xs font-sans"},[e$b.createTextVNode(" Comece criando seu primeiro na aba "),e$b.createElementVNode("strong",null,"Campos Personalizados")],-1)])]))}}},ListSegmentationsFields=_export_sfc$1(_sfc_main$1u,[["__scopeId","data-v-52c2538d"]]),_hoisted_1$1k={class:"wallet-modal-header-content"},_hoisted_2$17={class:"wallet-modal-subtitle"},_hoisted_3$$={class:"wallet-modal-body"},_hoisted_4$V={key:0,class:"wallet-info"},_hoisted_5$O={class:"wallet-info__text"},_hoisted_6$I={key:1,class:"wallet-info"},_hoisted_7$E={class:"wallet-select-group"},_hoisted_8$y={key:0,class:"wallet-select-label"},_hoisted_9$v={key:1,class:"wallet-locked-field bg-base-300"},_hoisted_10$s={class:"wallet-locked-field__value"},_hoisted_11$q={key:3,class:"wallet-warning"},_hoisted_12$o={key:2,class:"wallet-note"},_hoisted_13$l={key:3,class:"wallet-select-group"},_hoisted_14$k={key:0,class:"wallet-select-label"},_hoisted_15$i={key:1,class:"wallet-locked-field bg-base-300"},_hoisted_16$g={class:"wallet-locked-field__value"},_hoisted_17$a={key:2,class:"wallet-locked-field wallet-locked-field--muted bg-base-300"},_hoisted_18$a={key:4,class:"wallet-info wallet-info--neutral"},_hoisted_19$9={class:"wallet-info__text"},_hoisted_20$9={class:"wallet-modal-footer w-full"},_hoisted_21$8=["disabled"],_hoisted_22$6=["disabled"],_hoisted_23$5={key:0,class:"wallet-spinner wallet-spinner--sm"},_hoisted_24$5={key:1},_sfc_main$1t={__name:"walletCreateModal",props:{isOpen:{type:Boolean,default:!1},contactId:{type:[String,Number],default:""},existingWallets:{type:Array,default:()=>[]},currentAttendance:{type:Object,default:()=>null},attendants:{type:Array,default:()=>[]},loggedAttendant:{type:Object,default:()=>null},loggedAttendantId:{type:[String,Number],default:null},hasDepartmentMembership:{type:Function,default:()=>!1},isDepartmentSupervisor:{type:Function,default:()=>!1}},emits:["update:isOpen","saved"],setup(ee,{emit:te}){const ne=ee,ae=te,re=useDepartmentStore(),oe=e$b.ref(!1),ie=e$b.ref([]),le=e$b.ref([]),ce=e$b.computed(()=>ne.existingWallets||[]),de=e$b.computed(()=>{var qe,Ge;return((qe=ne.currentAttendance)==null?void 0:qe.departmentId)??((Ge=ne.currentAttendance)==null?void 0:Ge.department_id)??null}),ue=e$b.computed(()=>{var qe,Ge;return((qe=ne.currentAttendance)==null?void 0:qe.departmentName)??((Ge=ne.currentAttendance)==null?void 0:Ge.department_name)??""});e$b.computed(()=>{var qe,Ge;return((qe=ne.currentAttendance)==null?void 0:qe.attendantName)??((Ge=ne.currentAttendance)==null?void 0:Ge.attendant_name)??""});const ve=e$b.computed(()=>!!de.value),me=e$b.computed(()=>!ne.currentAttendance),be=e$b.computed(()=>{var qe;return((qe=ne.loggedAttendant)==null?void 0:qe.name)||"Atendente não encontrado"}),fe=e$b.computed(()=>re.departments.filter(qe=>(qe==null?void 0:qe.wallets_enabled)!==!0).map(qe=>qe.id)),pe=e$b.computed(()=>le.value.filter(qe=>(qe==null?void 0:qe.wallets_enabled)===!0)),_e=e$b.computed(()=>de.value&&re.departments.find(qe=>String(qe.id)===String(de.value))||null),ge=e$b.computed(()=>{var qe;return((qe=_e.value)==null?void 0:qe.wallets_enabled)===!0}),ke=e$b.computed(()=>{var qe;return ve.value?de.value:((qe=pe.value[0])==null?void 0:qe.id)??null}),$e=e$b.computed(()=>me.value?!0:ne.isDepartmentSupervisor(ke.value)),ye=e$b.computed(()=>{const qe=ke.value;return qe?ce.value.filter(Ge=>String(Ge.department_id)===String(qe)):[]}),Ee=e$b.computed(()=>ye.value.length>0),Se=e$b.computed(()=>{const qe=new Set;return ye.value.forEach(Ge=>{(Ge==null?void 0:Ge.attendant_id)!=null&&qe.add(String(Ge.attendant_id))}),$e.value||(ne.attendants.forEach(Ge=>{String(Ge.id)!==String(ne.loggedAttendantId)&&qe.add(String(Ge.id))}),Ee.value&&ne.loggedAttendantId!=null&&qe.add(String(ne.loggedAttendantId))),Array.from(qe)}),Le=e$b.computed(()=>!ve.value&&!ke.value),Me=e$b.computed(()=>$e.value?ie.value[0]??null:ne.loggedAttendant),De=e$b.computed(()=>{var qe;return((qe=Me.value)==null?void 0:qe.id)??null}),Oe=e$b.computed(()=>String(De.value)===String(ne.loggedAttendantId)),Re=e$b.computed(()=>$e.value?"Neste fluxo, você pode atribuir qualquer atendente do departamento selecionado.":ke.value&&!ne.hasDepartmentMembership(ke.value)?"Você não pertence ao departamento selecionado, então não pode criar carteira nele.":Ee.value?"Este contato já possui um vínculo de carteira nesse departamento.":"Neste fluxo, o atendente responsável deve ser você."),ze=e$b.computed(()=>!$e.value),Ve=e$b.computed(()=>!$e.value&&Ee.value?"Já vinculado no departamento":$e.value?"Já encarteirado":"Somente você"),Ne=e$b.computed(()=>{var Ze;if(!ne.contactId||!Me.value||!ke.value)return!1;const qe=(Ze=Me.value)==null?void 0:Ze.id,Ge=ke.value;return!$e.value&&(!ne.loggedAttendantId||!Oe.value||!ne.hasDepartmentMembership(Ge)||Ee.value)?!1:!ce.value.some(Xe=>String(Xe.attendant_id)===String(qe)&&String(Xe.department_id)===String(Ge))}),Pe=()=>{ie.value=[],le.value=[],oe.value=!1},Be=()=>{if(!ve.value)return;const qe=_e.value;le.value=qe?[qe]:[]},Ae=()=>{$e.value||(ie.value=ne.loggedAttendant?[ne.loggedAttendant]:[])},xe=()=>{ae("update:isOpen",!1)},Ce=qe=>{ie.value=qe},Fe=qe=>{if(le.value=qe,$e.value){ie.value=[];return}Ae()},Ie=async()=>{var Xe,Ue,at;if(!Ne.value||!ne.contactId)return;const qe=(Xe=Me.value)==null?void 0:Xe.id,Ge=ke.value,Ze=contactWalletUrl(ne.contactId);try{oe.value=!0,await api.post(Ze,{attendant_id:qe,department_id:Ge}),notiwind.notify({group:"success",title:"Sucesso",text:"Contato encarteirado com sucesso."},4e3),ae("saved",{attendant_id:qe,department_id:Ge}),xe()}catch(Je){notiwind.notify({group:"error",title:"Falhou",text:((at=(Ue=Je==null?void 0:Je.response)==null?void 0:Ue.data)==null?void 0:at.message)||"Não foi possível encarteirar o contato."},4e3),console.error("Erro ao encarteirar contato:",Je)}finally{oe.value=!1}};return e$b.watch(()=>ne.isOpen,qe=>{if(qe){Be(),Ae();return}Pe()}),e$b.watch(()=>[de.value,re.departments.length],()=>{Be()}),e$b.watch(()=>[$e.value,ne.loggedAttendantId,ne.loggedAttendant],()=>{Ae()}),(qe,Ge)=>{const Ze=e$b.resolveComponent("departSelect"),Xe=e$b.resolveComponent("attendantSelect"),Ue=e$b.resolveComponent("SimpleModal");return e$b.openBlock(),e$b.createBlock(Ue,{size:"md:w-[450px]",isOpen:ee.isOpen,"onUpdate:isOpen":Ge[0]||(Ge[0]=at=>ae("update:isOpen",at))},{header:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_1$1k,[Ge[2]||(Ge[2]=e$b.createElementVNode("div",{class:"wallet-modal-header-icon"},[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 14a3 3 0 0 1 3-3h4a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a3 3 0 0 1-3-3Zm3-1a1 1 0 1 0 0 2h4v-2h-4Z","clip-rule":"evenodd"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.293 3.293a1 1 0 0 1 1.414 0L16.414 6h-2.828l-1.293-1.293a1 1 0 0 1 0-1.414ZM12.414 6 9.707 3.293a1 1 0 0 0-1.414 0L5.586 6h6.828ZM4.586 7l-.056.055A2 2 0 0 0 3 9v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2h-4a5 5 0 0 1 0-10h4a2 2 0 0 0-1.53-1.945L17.414 7H4.586Z","clip-rule":"evenodd"})])],-1)),e$b.createElementVNode("div",null,[Ge[1]||(Ge[1]=e$b.createElementVNode("h2",{class:"wallet-modal-title"},"Encarteirar contato",-1)),e$b.createElementVNode("p",_hoisted_2$17,e$b.toDisplayString(ve.value?"Vincule o contato a um atendente":"Vincule o contato a um atendente e departamento"),1)])])]),body:e$b.withCtx(()=>[e$b.createElementVNode("section",_hoisted_3$$,[ve.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_4$V,[Ge[5]||(Ge[5]=e$b.createElementVNode("p",{class:"wallet-info__title"},"Departamento fixo neste atendimento",-1)),e$b.createElementVNode("p",_hoisted_5$O,[Ge[3]||(Ge[3]=e$b.createTextVNode(" O contato será encarteirado no departamento ",-1)),e$b.createElementVNode("strong",null,e$b.toDisplayString(ue.value||"atual da conversa"),1),Ge[4]||(Ge[4]=e$b.createTextVNode(". Neste fluxo, esse departamento não pode ser alterado. ",-1))]),Ge[6]||(Ge[6]=e$b.createElementVNode("p",{class:"wallet-info__text"}," Depois do vínculo, os atendimentos deste contato que entrarem nesse departamento serão direcionados apenas para o atendente selecionado na carteira. ",-1))])):me.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$I,[...Ge[7]||(Ge[7]=[e$b.createElementVNode("p",{class:"wallet-info__title"},"Departamento definido neste vínculo",-1),e$b.createElementVNode("p",{class:"wallet-info__text"}," Como este vínculo está sendo criado fora de um atendimento, selecione o departamento em que o contato será encarteirado. ",-1),e$b.createElementVNode("p",{class:"wallet-info__text"}," Depois do vínculo, os atendimentos deste contato que entrarem nesse departamento, serão direcionados apenas para o atendente selecionado na carteira. ",-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_7$E,[ve.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("label",_hoisted_8$y," Departamento (com carteiras habilitadas) ")),ve.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_9$v,[Ge[8]||(Ge[8]=e$b.createElementVNode("span",{class:"wallet-locked-field__label"},"Departamento da conversa",-1)),e$b.createElementVNode("strong",_hoisted_10$s,e$b.toDisplayString(ue.value||"Departamento não encontrado"),1)])):(e$b.openBlock(),e$b.createBlock(Ze,{key:2,multiSelect:!1,preselect:!1,variant:"dropdown",maxHeight:"300px",disabledItems:fe.value,disabledReason:"Carteiras não habilitadas",onDepart:Fe},null,8,["disabledItems"])),!ve.value&&le.value.length>0&&pe.value.length===0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$q," O departamento selecionado não possui carteiras habilitadas. ")):e$b.createCommentVNode("",!0)]),ve.value&&!ge.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$o," O departamento atual desta conversa não suporta encarteiramento porque não possui carteiras habilitadas. ")):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$l,[$e.value&&!Le.value?(e$b.openBlock(),e$b.createElementBlock("label",_hoisted_14$k,"Atendente responsável")):e$b.createCommentVNode("",!0),$e.value?Le.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$a,[...Ge[10]||(Ge[10]=[e$b.createElementVNode("p",{class:"wallet-locked-field__value"}," Selecione um departamento para liberar os atendentes ",-1)])])):(e$b.openBlock(),e$b.createBlock(Xe,{key:3,multiSelect:!1,preselect:!1,department:pe.value,disabledItems:Se.value,disabledReason:Ve.value,variant:"dropdown",maxHeight:"210px",onAttend:Ce},null,8,["department","disabledItems","disabledReason"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$i,[Ge[9]||(Ge[9]=e$b.createElementVNode("span",{class:"wallet-locked-field__label"},"Atendente responsável",-1)),e$b.createElementVNode("strong",_hoisted_16$g,e$b.toDisplayString(be.value),1)]))])),ze.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$a,[Ge[11]||(Ge[11]=e$b.createElementVNode("p",{class:"wallet-info__title"},"Permissões deste vínculo",-1)),e$b.createElementVNode("p",_hoisted_19$9,e$b.toDisplayString(Re.value),1)])):e$b.createCommentVNode("",!0)])]),footer:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_20$9,[e$b.createElementVNode("button",{class:"wallet-btn wallet-btn-secondary",disabled:oe.value,onClick:xe}," Cancelar ",8,_hoisted_21$8),e$b.createElementVNode("button",{class:"wallet-btn wallet-btn-primary",disabled:!Ne.value||oe.value,onClick:Ie},[oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_23$5)):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_24$5,"Salvar vínculo"))],8,_hoisted_22$6)])]),_:1},8,["isOpen"])}}},WalletCreateModal=_export_sfc$1(_sfc_main$1t,[["__scopeId","data-v-314a95d9"]]),_hoisted_1$1j={class:"wallet-card__header"},_hoisted_2$16=["title"],_hoisted_3$_={class:"wallet-card__body"},_hoisted_4$U={class:"wallet-card__main"},_hoisted_5$N={class:"wallet-card__avatar"},_hoisted_6$H={class:"wallet-card__info text-start"},_hoisted_7$D=["title"],_hoisted_8$x={class:"wallet-card__actions"},_hoisted_9$u=["disabled"],_hoisted_10$r={class:"wallet-card__modal-content bg-base-200 rounded-b-xl"},_hoisted_11$p={class:"flex flex-col gap-2 p-2"},_hoisted_12$n={class:"wallet-card__modal-preview"},_hoisted_13$k={class:"wallet-card__modal-info-group"},_hoisted_14$j={class:"wallet-card__modal-info-item"},_hoisted_15$h=["title"],_hoisted_16$f={class:"wallet-card__modal-preview-card"},_hoisted_17$9={class:"wallet-card__modal-preview-main -mt-1"},_hoisted_18$9={class:"wallet-card__modal-avatar"},_hoisted_19$8={class:"wallet-card__modal-info text-start"},_hoisted_20$8=["title"],_hoisted_21$7={class:"wallet-card__modal-actions bg-base-300 rounded-b-xl"},_hoisted_22$5=["disabled"],_hoisted_23$4=["disabled"],_hoisted_24$4={key:0},_hoisted_25$3={key:1},_sfc_main$1s={__name:"walletCard",props:{wallet:{type:Object,required:!0},variant:{type:String,default:"default"},showDate:{type:Boolean,default:!0},isRemoving:{type:Boolean,default:!1},canRemove:{type:Boolean,default:!1}},emits:["remove"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.attendantName)||"Atendente nao informado"}),oe=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.attendantPhoto)||null}),ie=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.departmentName)||"Departamento nao informado"}),le=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.updatedAt)||null}),ce=pe=>{if(!pe)return null;const _e=new Date(pe);return Number.isNaN(_e.getTime())?null:new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(_e)};e$b.computed(()=>ce(le.value));const de=e$b.computed(()=>{var pe;return ne.canRemove&&!!((pe=ne.wallet)!=null&&pe.departmentId)}),ue=e$b.computed(()=>{const pe=["wallet-card","bg-base-300"];return ne.variant==="primary"&&pe.push("wallet-card--primary"),pe}),ve=e$b.ref(!1),me=()=>{!de.value||ne.isRemoving||(ve.value=!0)},be=()=>{ne.isRemoving||(ve.value=!1)},fe=()=>{!de.value||ne.isRemoving||(ve.value=!1,ae("remove",ne.wallet))};return(pe,_e)=>(e$b.openBlock(),e$b.createElementBlock("article",{class:e$b.normalizeClass(ue.value)},[e$b.createElementVNode("header",_hoisted_1$1j,[_e[0]||(_e[0]=e$b.createElementVNode("p",{class:"wallet-card__label"},"Departamento",-1)),e$b.createElementVNode("p",{class:"wallet-card__department rounded-xl bg-sky-500 px-2 p-1",title:ie.value},e$b.toDisplayString(ie.value),9,_hoisted_2$16)]),_e[8]||(_e[8]=e$b.createElementVNode("hr",{class:"border-none w-[70%] flex mx-auto justify-center bg-base-100/70 rounded-xl h-0.5"},null,-1)),e$b.createElementVNode("div",_hoisted_3$_,[e$b.createElementVNode("div",_hoisted_4$U,[e$b.createElementVNode("div",_hoisted_5$N,[e$b.createVNode(Avatar,{photo:oe.value,name:re.value,size:"fill",class:"size-10"},null,8,["photo","name"])]),e$b.createElementVNode("div",_hoisted_6$H,[e$b.createElementVNode("p",{class:"wallet-card__name",title:re.value},e$b.toDisplayString(re.value),9,_hoisted_7$D),_e[1]||(_e[1]=e$b.createElementVNode("p",{class:"wallet-card__role flex gap-1"},[e$b.createTextVNode(" Responsável "),e$b.createElementVNode("span",{class:"sm:block hidden"},"pelo atendimento")],-1))])]),e$b.createElementVNode("div",_hoisted_8$x,[ne.canRemove?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"wallet-card__remove-btn",disabled:ee.isRemoving||!de.value,onClick:me},e$b.toDisplayString(ee.isRemoving?"Removendo...":"Remover da carteira"),9,_hoisted_9$u)):e$b.createCommentVNode("",!0)])]),e$b.createVNode(e$b.Transition,{name:"fade"},{default:e$b.withCtx(()=>[ve.value?(e$b.openBlock(),e$b.createBlock(MinModal,{key:0,defineWidth:"max-w-sm",onClose:be},{header:e$b.withCtx(()=>[..._e[2]||(_e[2]=[e$b.createElementVNode("div",{class:"wallet-card__modal-header"},[e$b.createElementVNode("div",{class:"wallet-card__modal-icon"},[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0V8Zm-1 7a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H12Z","clip-rule":"evenodd"})])]),e$b.createElementVNode("p",{class:"wallet-card__modal-title"}," Remover atendente da carteira ")],-1)])]),body:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_10$r,[e$b.createElementVNode("section",_hoisted_11$p,[_e[7]||(_e[7]=e$b.createElementVNode("div",{class:"wallet-card__modal-message"},[e$b.createElementVNode("p",{class:"wallet-card__modal-text"}," Você está removendo o responsável por este atendimento neste departamento. Esta ação não pode ser desfeita. ")],-1)),e$b.createElementVNode("div",_hoisted_12$n,[_e[6]||(_e[6]=e$b.createElementVNode("p",{class:"wallet-card__modal-preview-label"}," Informações da remoção: ",-1)),e$b.createElementVNode("div",_hoisted_13$k,[e$b.createElementVNode("div",_hoisted_14$j,[_e[3]||(_e[3]=e$b.createElementVNode("span",{class:"wallet-card__modal-info-label"},"Departamento:",-1)),e$b.createElementVNode("p",{class:"wallet-card__modal-info-value",title:ie.value},e$b.toDisplayString(ie.value),9,_hoisted_15$h)])]),e$b.createElementVNode("div",_hoisted_16$f,[_e[5]||(_e[5]=e$b.createElementVNode("p",{class:"wallet-card__modal-preview-card-label"}," Atendente responsável: ",-1)),e$b.createElementVNode("div",_hoisted_17$9,[e$b.createElementVNode("div",_hoisted_18$9,[e$b.createVNode(Avatar,{photo:oe.value,name:re.value,size:"fill",class:"size-12"},null,8,["photo","name"])]),e$b.createElementVNode("div",_hoisted_19$8,[e$b.createElementVNode("p",{class:"wallet-card__modal-name",title:re.value},e$b.toDisplayString(re.value),9,_hoisted_20$8),_e[4]||(_e[4]=e$b.createElementVNode("p",{class:"wallet-card__modal-role"}," Responsável pelo atendimento ",-1))])])])])]),e$b.createElementVNode("div",_hoisted_21$7,[e$b.createElementVNode("button",{class:"wallet-card__modal-btn wallet-card__modal-btn--cancel",disabled:ee.isRemoving,onClick:be}," Cancelar ",8,_hoisted_22$5),e$b.createElementVNode("button",{class:"wallet-card__modal-btn wallet-card__modal-btn--danger",disabled:ee.isRemoving||!de.value,onClick:fe},[ee.isRemoving?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_25$3,"Removendo...")):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_24$4,"Remover atendente"))],8,_hoisted_23$4)])])]),_:1})):e$b.createCommentVNode("",!0)]),_:1})],2))}},WalletCard=_export_sfc$1(_sfc_main$1s,[["__scopeId","data-v-986d3a33"]]),_hoisted_1$1i={class:"wallet-section"},_hoisted_2$15={class:"wallet-box bg-base-200"},_hoisted_3$Z={class:"wallet-header"},_hoisted_4$T={class:"wallet-header__actions"},_hoisted_5$M=["disabled"],_hoisted_6$G=["disabled"],_hoisted_7$C={key:0,class:"wallet-empty-state"},_hoisted_8$w={key:1,class:"wallet-loading-state"},_hoisted_9$t={key:2,class:"wallet-error-state"},_hoisted_10$q={class:"wallet-error-text"},_hoisted_11$o={key:3,class:"wallet-empty-state"},_hoisted_12$m={key:4,class:"wallet-list"},_sfc_main$1r={__name:"walletSection",props:{contactId:{type:[String,Number],default:""},currentAttendance:{type:Object,default:()=>null},supervisor:{type:Boolean,default:!1},pageState:{type:String,default:"data"}},setup(ee){const te=ee,ne=useAttendantStore(),ae=useDepartmentStore(),re=e$b.ref([]),oe=e$b.ref(!1),ie=e$b.ref(""),le=e$b.ref(null),ce=e$b.ref([]),de=e$b.ref(!1),ue=e$b.computed(()=>{var Be;return((Be=ne.logged_attendant)==null?void 0:Be.call(ne))||null}),ve=e$b.computed(()=>{var Be;return((Be=ue.value)==null?void 0:Be.id)??null}),me=e$b.computed(()=>{var Be;return Array.isArray((Be=ue.value)==null?void 0:Be.department)?ue.value.department:[]}),be=Be=>!Be||!ve.value?null:me.value.find(Ae=>String(Ae==null?void 0:Ae.id)===String(Be))||null,fe=Be=>!!be(Be),pe=Be=>{var Ae;return((Ae=be(Be))==null?void 0:Ae.permission)==="supervisor"},_e=e$b.computed(()=>!te.currentAttendance),ge=Be=>_e.value||pe(Be),ke=Be=>Array.isArray(Be)?Be:Array.isArray(Be==null?void 0:Be.wallet)?Be.wallet:Array.isArray(Be==null?void 0:Be.results)?Be.results:[],$e=(Be,Ae)=>{if(Be!=null&&Be.id)return Be.id;const xe=(Be==null?void 0:Be.attendant_id)||"attendant",Ce=(Be==null?void 0:Be.department_id)||"department";return`${xe}-${Ce}-${Ae}`},ye=Be=>Be?ne.attendants.find(Ae=>String(Ae.id)===String(Be)):null,Ee=Be=>Be?ae.departments.find(Ae=>String(Ae.id)===String(Be)):null,Se=()=>{var Be,Ae,xe,Ce;return te.currentAttendance&&(((Be=te.currentAttendance)==null?void 0:Be.department_id)||((Ae=te.currentAttendance)==null?void 0:Ae.departmentId)||((Ce=(xe=te.currentAttendance)==null?void 0:xe.department)==null?void 0:Ce.id))||null},Le=()=>{const Be=re.value;if(_e.value)return Be;const Ae=Se(),xe=me.value.filter(Ce=>(Ce==null?void 0:Ce.permission)==="supervisor").map(Ce=>String(Ce==null?void 0:Ce.id));if(xe.length>0){const Ce=new Set(xe);return Ae&&Ce.add(String(Ae)),Be.filter(Fe=>Ce.has(String(Fe==null?void 0:Fe.department_id)))}return Ae?Be.filter(Ce=>String(Ce==null?void 0:Ce.department_id)===String(Ae)):[]},Me=e$b.computed(()=>Le().map((Be,Ae)=>{const xe=Be==null?void 0:Be.attendant_id,Ce=Be==null?void 0:Be.department_id,Fe=ye(xe),Ie=Ee(Ce),qe=(Fe==null?void 0:Fe.name)||"Atendente não encontrado",Ge=(Ie==null?void 0:Ie.name)||"Departamento não encontrado",Ze=(Fe==null?void 0:Fe.photo)||null,Xe=(Be==null?void 0:Be.updated_at)||(Be==null?void 0:Be.created_at)||null;return{id:$e(Be,Ae),attendantId:xe,departmentId:Ce,attendantName:qe,attendantPhoto:Ze,departmentName:Ge,updatedAt:Xe,canRemove:ge(Ce)||fe(Ce)&&String(xe)===String(ve.value)}})),De=async()=>{const Be=[];!ne.loaded&&ne.attendants.length===0&&Be.push(ne.fetchAttendants().then(()=>{ne.loaded=!0})),!ae.loaded&&ae.departments.length===0&&Be.push(ae.fetchDepartments().then(()=>{ae.loaded=!0})),Be.length>0&&await Promise.all(Be)},Oe=async({force:Be=!1}={})=>{var xe,Ce;const Ae=te.contactId;if(!Ae){re.value=[],ie.value="",le.value=null;return}if(!(!Be&&le.value===Ae&&ie.value===""))try{oe.value=!0,ie.value="";const[,{data:Fe}]=await Promise.all([De(),api.get(contactWalletUrl(Ae))]);re.value=ke(Fe),le.value=Ae}catch(Fe){ie.value=((Ce=(xe=Fe==null?void 0:Fe.response)==null?void 0:xe.data)==null?void 0:Ce.message)||"Não foi possível carregar as relações de carteira.",console.error("Erro ao buscar carteira do contato:",Fe)}finally{oe.value=!1}},Re=Be=>ce.value.includes(Be),ze=(Be,Ae)=>{if(Be){if(Ae){ce.value.includes(Be)||(ce.value=[...ce.value,Be]);return}ce.value=ce.value.filter(xe=>xe!==Be)}},Ve=()=>{de.value=!0},Ne=Be=>{const Ae=Be==null?void 0:Be.attendant_id,xe=Be==null?void 0:Be.department_id;if(!Ae||!xe)return;const Ce=re.value.findIndex(Fe=>(Fe==null?void 0:Fe.department_id)===xe);if(Ce>=0){re.value=re.value.map((Fe,Ie)=>Ie===Ce?{...Fe,attendant_id:Ae,department_id:xe}:Fe);return}re.value=[...re.value,{attendant_id:Ae,department_id:xe}]},Pe=async Be=>{var Fe,Ie,qe,Ge;const Ae=te.contactId,xe=Be==null?void 0:Be.departmentId,Ce=ge(xe)||fe(xe)&&String(Be==null?void 0:Be.attendantId)===String(ve.value);if(!(!Ae||!xe||Re(xe)||!Ce))try{ze(xe,!0),ie.value="";const Ze=contactWalletUrl(Ae),Xe={department_id:xe,attendant_id:null};try{await api.post(Ze,Xe)}catch(Ue){ie.value=((Ie=(Fe=Ue==null?void 0:Ue.response)==null?void 0:Fe.data)==null?void 0:Ie.message)||"Não foi possível remover o responsável da carteira.",console.error("Erro na requisição para remover da carteira:",Ue);return}re.value=re.value.filter(Ue=>(Ue==null?void 0:Ue.department_id)!==xe)}catch(Ze){ie.value=((Ge=(qe=Ze==null?void 0:Ze.response)==null?void 0:qe.data)==null?void 0:Ge.message)||"Não foi possível remover o responsável da carteira.",console.error("Erro ao remover relação da carteira:",Ze)}finally{ze(xe,!1)}};return e$b.watch(()=>[te.pageState,te.contactId],async([Be,Ae])=>{Be==="wallet"&&Ae&&Oe()},{immediate:!0}),(Be,Ae)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1i,[e$b.createElementVNode("section",_hoisted_2$15,[e$b.createElementVNode("header",_hoisted_3$Z,[Ae[5]||(Ae[5]=e$b.createStaticVNode('<div class="wallet-header__text" data-v-c68e2f8c><div class="wallet-header__icon" data-v-c68e2f8c><svg class="size-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24" data-v-c68e2f8c><path fill-rule="evenodd" d="M12 14a3 3 0 0 1 3-3h4a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a3 3 0 0 1-3-3Zm3-1a1 1 0 1 0 0 2h4v-2h-4Z" clip-rule="evenodd" data-v-c68e2f8c></path><path fill-rule="evenodd" d="M12.293 3.293a1 1 0 0 1 1.414 0L16.414 6h-2.828l-1.293-1.293a1 1 0 0 1 0-1.414ZM12.414 6 9.707 3.293a1 1 0 0 0-1.414 0L5.586 6h6.828ZM4.586 7l-.056.055A2 2 0 0 0 3 9v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2h-4a5 5 0 0 1 0-10h4a2 2 0 0 0-1.53-1.945L17.414 7H4.586Z" clip-rule="evenodd" data-v-c68e2f8c></path></svg></div><div data-v-c68e2f8c><h3 class="wallet-title" data-v-c68e2f8c>Carteira do contato</h3><p class="wallet-subtitle" data-v-c68e2f8c> Atendentes responsáveis por este contato e seus respectivos departamentos </p></div></div>',1)),e$b.createElementVNode("div",_hoisted_4$T,[e$b.createElementVNode("button",{class:"wallet-add-btn",disabled:!te.contactId||oe.value,onClick:Ve},[...Ae[3]||(Ae[3]=[e$b.createElementVNode("svg",{class:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1),e$b.createElementVNode("span",null,"Adicionar",-1)])],8,_hoisted_5$M),e$b.createElementVNode("button",{class:"wallet-refresh-btn",disabled:oe.value||!te.contactId,onClick:Ae[0]||(Ae[0]=xe=>Oe({force:!0}))},[...Ae[4]||(Ae[4]=[e$b.createElementVNode("svg",{class:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),e$b.createElementVNode("span",null,"Atualizar",-1)])],8,_hoisted_6$G)])]),te.contactId?oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_8$w,[...Ae[7]||(Ae[7]=[e$b.createElementVNode("div",{class:"wallet-spinner"},null,-1),e$b.createElementVNode("p",{class:"wallet-loading-text"},"Carregando carteira...",-1)])])):ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_9$t,[Ae[8]||(Ae[8]=e$b.createElementVNode("svg",{class:"wallet-error-icon",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("p",_hoisted_10$q,e$b.toDisplayString(ie.value),1),e$b.createElementVNode("button",{class:"wallet-retry-btn",onClick:Ae[1]||(Ae[1]=xe=>Oe({force:!0}))}," Tentar novamente ")])):Me.value.length===0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$o,[...Ae[9]||(Ae[9]=[e$b.createElementVNode("svg",{class:"wallet-empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})],-1),e$b.createElementVNode("p",{class:"wallet-empty-text"}," Nenhuma relação de carteira encontrada para este contato. ",-1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$m,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Me.value,xe=>(e$b.openBlock(),e$b.createBlock(WalletCard,{key:xe.id,wallet:xe,"is-removing":Re(xe.departmentId),"can-remove":xe.canRemove,onRemove:Pe},null,8,["wallet","is-removing","can-remove"]))),128))])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_7$C,[...Ae[6]||(Ae[6]=[e$b.createElementVNode("svg",{class:"wallet-empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})],-1),e$b.createElementVNode("p",{class:"wallet-empty-text"}," Salve o contato para visualizar e editar a carteira. ",-1)])]))]),e$b.createVNode(WalletCreateModal,{isOpen:de.value,"onUpdate:isOpen":Ae[2]||(Ae[2]=xe=>de.value=xe),"contact-id":te.contactId,"existing-wallets":re.value,"current-attendance":te.currentAttendance,attendants:e$b.unref(ne).attendants,"logged-attendant":ue.value,"logged-attendant-id":ve.value,"has-department-membership":fe,"is-department-supervisor":pe,onSaved:Ne},null,8,["isOpen","contact-id","existing-wallets","current-attendance","attendants","logged-attendant","logged-attendant-id"])]))}},WalletSection=_export_sfc$1(_sfc_main$1r,[["__scopeId","data-v-c68e2f8c"]]),_hoisted_1$1h=["href"],_hoisted_2$14={key:0,class:"size-3 opacity-70 group-hover:opacity-100",viewBox:"0 0 16 16"},_hoisted_3$Y=["id"],_hoisted_4$S=["fill"],_hoisted_5$L={class:"instagram-user group-hover:underline"},_sfc_main$1q={__name:"instagramBadge",props:{instagramUserName:{type:String,required:!0},size:{type:String,default:"small",validator:ee=>["small","medium","large"].includes(ee)},hideSvg:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>({"instagram-badge":!0,"instagram-badge--medium":te.size==="medium","instagram-badge--large":te.size==="large"})),ae=e$b.computed(()=>`ig-grad-${Math.random().toString(36).slice(2,9)}`);return(re,oe)=>ee.instagramUserName?(e$b.openBlock(),e$b.createElementBlock("a",{key:0,target:"_blank",rel:"noopener noreferrer",href:`https://www.instagram.com/${ee.instagramUserName}/`,class:e$b.normalizeClass([ne.value,"group rt-transition"]),onClick:oe[0]||(oe[0]=e$b.withModifiers(()=>{},["stop"]))},[ee.hideSvg?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_2$14,[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:ae.value,x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[...oe[1]||(oe[1]=[e$b.createElementVNode("stop",{offset:"0%",style:{"stop-color":"#fd5949"}},null,-1),e$b.createElementVNode("stop",{offset:"50%",style:{"stop-color":"#d6249f"}},null,-1),e$b.createElementVNode("stop",{offset:"100%",style:{"stop-color":"#285aeb"}},null,-1)])],8,_hoisted_3$Y)]),e$b.createElementVNode("path",{fill:`url(#${ae.value})`,d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},null,8,_hoisted_4$S)])),e$b.createElementVNode("span",_hoisted_5$L," @"+e$b.toDisplayString(ee.instagramUserName),1)],10,_hoisted_1$1h)):e$b.createCommentVNode("",!0)}},InstagramBadge=_export_sfc$1(_sfc_main$1q,[["__scopeId","data-v-d98b827e"]]),_hoisted_1$1g={key:0,class:"telegram-badge group"},_hoisted_2$13={class:"telegram-user"},_sfc_main$1p={__name:"telegramBadge",props:{telegramUserName:{type:String,required:!0}},setup(ee){return(te,ne)=>ee.telegramUserName?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_1$1g,[e$b.createElementVNode("span",_hoisted_2$13,e$b.toDisplayString(ee.telegramUserName),1)])):e$b.createCommentVNode("",!0)}},TelegramBadge=_export_sfc$1(_sfc_main$1p,[["__scopeId","data-v-2a493a9f"]]),_hoisted_1$1f={class:"rounded-md bg-base-200 p-1 shadow-sm transition-shadow duration-200 hover:shadow-md"},_hoisted_2$12={class:"text-start w-full items-center justify-between flex p-1 pb-2"},_hoisted_3$X={class:"bindings-popover"},_hoisted_4$R={class:"bindings-header-row"},_hoisted_5$K={key:0},_hoisted_6$F={class:"bindings-list"},_hoisted_7$B={class:"bindings-card__top"},_hoisted_8$v={class:"bindings-card__instance"},_hoisted_9$s={key:0,class:"bindings-card__username"},_hoisted_10$p={key:0,class:"bindings-card__bsuid-row"},_hoisted_11$n={class:"bindings-card__bsuid-code"},_hoisted_12$l={key:1,class:"bindings-divider"},_hoisted_13$j={key:2},_hoisted_14$i={class:"bindings-platform-title"},_hoisted_15$g={class:"size-3",style:{fill:"url(#ig-grad)"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},_hoisted_16$e={class:"bindings-list"},_hoisted_17$8={class:"bindings-card__top"},_hoisted_18$8={class:"bindings-card__instance"},_hoisted_19$7={key:0,class:"bindings-card__username"},_hoisted_20$7={key:0,class:"bindings-card__bsuid-row"},_hoisted_21$6={class:"bindings-card__bsuid-code"},_hoisted_22$4={key:3,class:"bindings-divider"},_hoisted_23$3={key:4},_hoisted_24$3={class:"bindings-list"},_hoisted_25$2={class:"bindings-card__top"},_hoisted_26$1={class:"bindings-card__instance"},_hoisted_27$1={key:0,class:"bindings-card__username"},_hoisted_28$1={key:0,class:"bindings-card__bsuid-row"},_hoisted_29$1={class:"bindings-card__bsuid-code"},_hoisted_30$1={key:5,class:"bindings-divider"},_hoisted_31$1={key:6},_hoisted_32={class:"bindings-platform-title"},_hoisted_33={class:"size-3",style:{fill:"url(#wc-grad)"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640"},_hoisted_34={class:"bindings-list"},_hoisted_35={class:"bindings-card__top"},_hoisted_36={class:"bindings-card__instance"},_hoisted_37={key:0,class:"bindings-card__bsuid-row"},_hoisted_38={class:"bindings-card__bsuid-code"},_hoisted_39={style:{"border-bottom-right-radius":"0.35rem","border-bottom-left-radius":"0.35rem"},class:"flex w-full relative rounded-md bg-base-300"},_hoisted_40={key:1,class:"text-xs font-medium font-sans py-3 blur-sm select-none"},_hoisted_41={key:0,class:"flex w-full relative rounded-md bg-base-300 mt-1"},_hoisted_42={class:"flex items-center w-full px-1 py-1.5 text-sm"},_hoisted_43={key:1,class:"flex w-full relative rounded-md bg-base-300 mt-1"},_hoisted_44={class:"flex items-center w-full px-1 py-1.5 text-sm"},_hoisted_45={class:"segmentation-fields-container bg-base-200"},_hoisted_46={class:"list-products-container"},_sfc_main$1o={__name:"contactSection",props:e$b.mergeModels({hasCrmPlus:{type:Boolean,default:!1},handlerToggleButtons:{type:Array,default:()=>[]},allProducts:{type:Object,default:()=>({})},departmentBypass:{type:[String,Number,Boolean,Object],default:void 0},currentAttendance:{type:Object,default:()=>null},supervisor:{type:Boolean,default:!1},isLargeScreen:{type:Boolean,default:!0},viewContactNumber:{type:Boolean,default:!1},contactId:{type:[String,Number],default:""},contact:{type:Object,default:()=>null}},{pageState:{type:String,default:"data"},pageStateModifiers:{},telephone:{type:String,default:""},telephoneModifiers:{},country:{type:String,default:"br"},countryModifiers:{},instagramUserName:{type:String,default:""},instagramUserNameModifiers:{},segmentationFields:{type:Array,default:()=>[]},segmentationFieldsModifiers:{},products:{type:Array,default:()=>[]},productsModifiers:{}}),emits:["update:pageState","update:telephone","update:country","update:instagramUserName","update:segmentationFields","update:products"],setup(ee){const te=ee,ne=e$b.useModel(ee,"pageState"),ae=e$b.useModel(ee,"telephone"),re=e$b.useModel(ee,"country"),oe=e$b.useModel(ee,"instagramUserName"),ie=e$b.useModel(ee,"segmentationFields"),le=e$b.useModel(ee,"products"),ce=(_e,ge)=>{const ke=(ge==null?void 0:ge.number)||_e||"",$e=String(ke).replace(/[^\d\s()-]/g,"");ae.value=$e},de=useWhatsappBindings(()=>te.contact),ue=useInstagramBindings(()=>te.contact),ve=useTelegramBindings(()=>te.contact),me=useWebchatBindings(()=>te.contact),be=useHasContactBindings(de,ue,ve,me),fe=e$b.computed(()=>{var _e;return((_e=ve.value[0])==null?void 0:_e.user_name)||""}),pe=e$b.ref(!1);return(_e,ge)=>{const ke=e$b.resolveComponent("Popper"),$e=e$b.resolveComponent("vue-tel-input");return e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[ee.isLargeScreen&&ee.hasCrmPlus?(e$b.openBlock(),e$b.createBlock(ToggleListButtons,{key:0,class:"section-toggle",buttons:te.handlerToggleButtons,modelValue:ne.value,"onUpdate:modelValue":ge[0]||(ge[0]=ye=>ne.value=ye)},null,8,["buttons","modelValue"])):e$b.createCommentVNode("",!0),e$b.withDirectives(e$b.createElementVNode("div",{class:e$b.normalizeClass([te.hasCrmPlus?"pt-1":"pt-0","flex flex-col gap-2 flex-1 min-h-0 px-1.5 overflow-hidden"])},[e$b.createElementVNode("div",_hoisted_1$1f,[e$b.createElementVNode("h1",_hoisted_2$12,[ge[19]||(ge[19]=e$b.createElementVNode("p",{class:"text-xs font-semibold"},"Contatos",-1)),e$b.unref(be)?(e$b.openBlock(),e$b.createBlock(ke,{key:ne.value,class:"dark:popper-light popper-dark",placement:"bottom",offsetDistance:4},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_3$X,[e$b.createElementVNode("div",_hoisted_4$R,[ge[7]||(ge[7]=e$b.createElementVNode("p",{class:"bindings-header"},"IDs por conta conectada",-1)),e$b.createElementVNode("button",{type:"button",class:"bindings-help-btn",title:"O que é o BSUID?",onClick:ge[1]||(ge[1]=e$b.withModifiers(ye=>pe.value=!0,["stop"]))}," ? ")]),e$b.unref(de).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_5$K,[ge[9]||(ge[9]=e$b.createElementVNode("div",{class:"bindings-platform-title"},[e$b.createElementVNode("svg",{class:"size-3 text-emerald-400",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 17 17"},[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})]),e$b.createElementVNode("span",{class:"text-emerald-400"},"WhatsApp")],-1)),e$b.createElementVNode("ul",_hoisted_6$F,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(de),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--wa"},[e$b.createElementVNode("div",_hoisted_7$B,[e$b.createElementVNode("span",_hoisted_8$v,e$b.toDisplayString(ye.instanceName),1),ye.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$s,e$b.toDisplayString(ye.user_name),1)):e$b.createCommentVNode("",!0)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_10$p,[ge[8]||(ge[8]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"BSUID",-1)),e$b.createElementVNode("code",_hoisted_11$n,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0),e$b.unref(de).length&&e$b.unref(ue).length?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_12$l)):e$b.createCommentVNode("",!0),e$b.unref(ue).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_13$j,[e$b.createElementVNode("div",_hoisted_14$i,[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_15$g,[...ge[10]||(ge[10]=[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:"ig-grad",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[e$b.createElementVNode("stop",{offset:"0%","stop-color":"#f58529"}),e$b.createElementVNode("stop",{offset:"40%","stop-color":"#dd2a7b"}),e$b.createElementVNode("stop",{offset:"70%","stop-color":"#8134af"}),e$b.createElementVNode("stop",{offset:"100%","stop-color":"#515bd4"})])],-1),e$b.createElementVNode("path",{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},null,-1)])])),ge[11]||(ge[11]=e$b.createElementVNode("span",{class:"ig-gradient-text"},"Instagram",-1))]),e$b.createElementVNode("ul",_hoisted_16$e,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(ue),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--ig"},[e$b.createElementVNode("div",_hoisted_17$8,[e$b.createElementVNode("span",_hoisted_18$8,e$b.toDisplayString(ye.instanceName),1),ye.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_19$7,"@"+e$b.toDisplayString(ye.user_name),1)):e$b.createCommentVNode("",!0)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_20$7,[ge[12]||(ge[12]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"ID Instagram",-1)),e$b.createElementVNode("code",_hoisted_21$6,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0),e$b.unref(ve).length&&(e$b.unref(de).length||e$b.unref(ue).length)?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_22$4)):e$b.createCommentVNode("",!0),e$b.unref(ve).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_23$3,[ge[14]||(ge[14]=e$b.createElementVNode("div",{class:"bindings-platform-title"},[e$b.createElementVNode("svg",{class:"size-3 text-[#229ED9]",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})]),e$b.createElementVNode("span",{class:"text-[#229ED9]"},"Telegram")],-1)),e$b.createElementVNode("ul",_hoisted_24$3,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(ve),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--tg"},[e$b.createElementVNode("div",_hoisted_25$2,[e$b.createElementVNode("span",_hoisted_26$1,e$b.toDisplayString(ye.instanceName),1),ye.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_27$1,"@"+e$b.toDisplayString(ye.user_name),1)):e$b.createCommentVNode("",!0)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_28$1,[ge[13]||(ge[13]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"Chat ID",-1)),e$b.createElementVNode("code",_hoisted_29$1,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0),e$b.unref(me).length&&(e$b.unref(de).length||e$b.unref(ue).length||e$b.unref(ve).length)?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_30$1)):e$b.createCommentVNode("",!0),e$b.unref(me).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_31$1,[e$b.createElementVNode("div",_hoisted_32,[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_33,[...ge[15]||(ge[15]=[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:"wc-grad",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[e$b.createElementVNode("stop",{offset:"0%","stop-color":"#8b5cf6"}),e$b.createElementVNode("stop",{offset:"50%","stop-color":"#06b6d4"}),e$b.createElementVNode("stop",{offset:"100%","stop-color":"#14b8a6"})])],-1),e$b.createElementVNode("path",{d:"M64 304C64 358.4 83.3 408.6 115.9 448.9L67.1 538.3C65.1 542 64 546.2 64 550.5C64 564.6 75.4 576 89.5 576C93.5 576 97.3 575.4 101 573.9L217.4 524C248.8 536.9 283.5 544 320 544C461.4 544 576 436.5 576 304C576 171.5 461.4 64 320 64C178.6 64 64 171.5 64 304zM158 471.9C167.3 454.8 165.4 433.8 153.2 418.7C127.1 386.4 112 346.8 112 304C112 200.8 202.2 112 320 112C437.8 112 528 200.8 528 304C528 407.2 437.8 496 320 496C289.8 496 261.3 490.1 235.7 479.6C223.8 474.7 210.4 474.8 198.6 479.9L140 504.9L158 471.9zM208 336C225.7 336 240 321.7 240 304C240 286.3 225.7 272 208 272C190.3 272 176 286.3 176 304C176 321.7 190.3 336 208 336zM352 304C352 286.3 337.7 272 320 272C302.3 272 288 286.3 288 304C288 321.7 302.3 336 320 336C337.7 336 352 321.7 352 304zM432 336C449.7 336 464 321.7 464 304C464 286.3 449.7 272 432 272C414.3 272 400 286.3 400 304C400 321.7 414.3 336 432 336z"},null,-1)])])),ge[16]||(ge[16]=e$b.createElementVNode("span",{class:"wc-gradient-text"},"Webchat",-1))]),e$b.createElementVNode("ul",_hoisted_34,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(me),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--wc"},[e$b.createElementVNode("div",_hoisted_35,[e$b.createElementVNode("span",_hoisted_36,e$b.toDisplayString(ye.instanceName),1)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_37,[ge[17]||(ge[17]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"ID do Visitante",-1)),e$b.createElementVNode("code",_hoisted_38,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0)])]),default:e$b.withCtx(()=>[ge[18]||(ge[18]=e$b.createElementVNode("button",{type:"button",class:"bindings-info-btn",title:"IDs por conta conectada"},[e$b.createElementVNode("svg",{class:"size-3.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})])],-1))]),_:1})):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",_hoisted_39,[ge[20]||(ge[20]=e$b.createElementVNode("span",{class:"flex justify-center items-center w-8"},[e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"size-4 text-gray-500 ml-1.5",viewBox:"0 0 17 17"},[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})])],-1)),ee.viewContactNumber?(e$b.openBlock(),e$b.createBlock($e,{key:0,class:"z-40 w-full",onCountryChanged:ge[2]||(ge[2]=ye=>re.value=ye.iso2),"onUpdate:modelValue":ce,mode:"national",validCharactersOnly:!0,defaultCountry:re.value||"br",modelValue:ae.value||"",inputOptions:{placeholder:"Coloque seu telefone",showDialCode:!1,required:!1,searchBoxPlaceholder:"Brazil"},dropdownOptions:{showSearchBox:!0,showFlags:!0,searchBoxPlaceholder:"Brazil"}},null,8,["defaultCountry","modelValue"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_40," +55 00000-0000 "))]),oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_41,[ge[21]||(ge[21]=e$b.createElementVNode("span",{class:"flex justify-center items-center w-8"},[e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"size-4 text-gray-500 ml-1.5",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 2.25c5.376 0 9.75 4.374 9.75 9.75s-4.374 9.75-9.75 9.75S2.25 17.376 2.25 12 6.624 2.25 12 2.25zm4.875 9.75c0 2.691-2.184 4.875-4.875 4.875s-4.875-2.184-4.875-4.875 2.184-4.875 4.875-4.875 4.875 2.184 4.875 4.875zm-1.906 0c0-1.637-1.332-2.969-2.969-2.969-1.636 0-2.969 1.332-2.969 2.969 0 1.637 1.333 2.969 2.969 2.969 1.637 0 2.969-1.332 2.969-2.969zm2.719-5.25c0 .621-.504 1.125-1.125 1.125s-1.125-.504-1.125-1.125.504-1.125 1.125-1.125 1.125.504 1.125 1.125z"})])],-1)),e$b.createElementVNode("div",_hoisted_42,[e$b.createVNode(InstagramBadge,{"hide-svg":!0,size:"large","instagram-user-name":oe.value},null,8,["instagram-user-name"])])])):e$b.createCommentVNode("",!0),fe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_43,[ge[22]||(ge[22]=e$b.createElementVNode("span",{class:"flex justify-center items-center w-8"},[e$b.createElementVNode("svg",{class:"size-4 text-gray-500 ml-1.5",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})])],-1)),e$b.createElementVNode("div",_hoisted_44,[e$b.createVNode(TelegramBadge,{"telegram-user-name":fe.value},null,8,["telegram-user-name"])])])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",_hoisted_45,[e$b.createVNode(ListSegmentationsFields,{modelValue:ie.value,"onUpdate:modelValue":ge[3]||(ge[3]=ye=>ie.value=ye)},null,8,["modelValue"])])],2),[[e$b.vShow,ne.value==="data"]]),e$b.withDirectives(e$b.createElementVNode("div",_hoisted_46,[e$b.createVNode(ListProducts,{modelValue:le.value,"onUpdate:modelValue":ge[4]||(ge[4]=ye=>le.value=ye),allProducts:te.allProducts,departmentBypass:te.departmentBypass},null,8,["modelValue","allProducts","departmentBypass"])],512),[[e$b.vShow,ne.value==="products"]]),e$b.withDirectives(e$b.createElementVNode("div",null,[e$b.createVNode(e$b.unref(WalletSection),{"contact-id":te.contactId,contact:te.contact,"current-attendance":te.currentAttendance,supervisor:te.supervisor,"page-state":ne.value},null,8,["contact-id","contact","current-attendance","supervisor","page-state"])],512),[[e$b.vShow,ne.value==="wallet"]]),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(simpleModal,{"is-open":pe.value,"onUpdate:isOpen":ge[6]||(ge[6]=ye=>pe.value=ye),size:"w-max",class:"text-white",header:{title:"O que é o BSUID?",svg:"<svg class='w-5 mr-2 text-blue-400 inline-block' viewBox='0 0 20 20' fill='currentColor'><path fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/></svg>"}},{body:e$b.withCtx(()=>[...ge[23]||(ge[23]=[e$b.createElementVNode("div",{class:"bsuid-help-body"},[e$b.createElementVNode("p",{class:"bsuid-help-intro"},[e$b.createTextVNode(" O "),e$b.createElementVNode("strong",null,"BSUID"),e$b.createTextVNode(" (Business-Scoped User ID) é um identificador único criado pela Meta para cada usuário do WhatsApp ou Instagram, específico para cada portfólio de negócios. ")]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon bsuid-help-icon--blue",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 2a8 8 0 100 16A8 8 0 0010 2zm0 3a1 1 0 011 1v4a1 1 0 11-2 0V6a1 1 0 011-1zm0 8a1 1 0 100 2 1 1 0 000-2z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("O mesmo contato terá um "),e$b.createElementVNode("strong",null,"BSUID diferente para cada instância"),e$b.createTextVNode(" conectada ao sistema, mesmo que seja o mesmo número. Cada instância de negócio enxerga o usuário com seu próprio ID único.")])]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon bsuid-help-icon--green",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("O BSUID é "),e$b.createElementVNode("strong",null,"permanente"),e$b.createTextVNode(" enquanto o usuário não trocar de número de telefone.")])]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("O mesmo vale para o "),e$b.createElementVNode("strong",null,"Instagram"),e$b.createTextVNode(": cada instância terá um BSUID diferente para o mesmo perfil do usuário.")])]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon bsuid-help-icon--yellow",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("Se um usuário "),e$b.createElementVNode("strong",null,"trocar de número"),e$b.createTextVNode(", o BSUID anterior se tornará inválido e um novo será gerado automaticamente pela Meta.")])]),e$b.createElementVNode("div",{class:"bsuid-help-example"},[e$b.createElementVNode("span",{class:"bsuid-help-example__label"},"Exemplo de BSUID"),e$b.createElementVNode("code",{class:"bsuid-help-example__code"},"BR.13491208655302741918"),e$b.createElementVNode("span",{class:"bsuid-help-example__note"},"Prefixo com o código do país (ISO 3166) + identificador único de até 128 caracteres")])],-1)])]),footer:e$b.withCtx(()=>[e$b.createElementVNode("button",{class:"bsuid-help-close-btn",type:"button",onClick:ge[5]||(ge[5]=ye=>pe.value=!1)}," Entendi ")]),_:1},8,["is-open"])]))],64)}}},ContactSection=_export_sfc$1(_sfc_main$1o,[["__scopeId","data-v-8e4d9bb6"]]),_hoisted_1$1e={class:"outcome-buttons-wrapper"},_sfc_main$1n={__name:"outcomeButton",props:{outcome:{type:String,default:null}},emits:["update:outcome","change"],setup(ee,{emit:te}){const ne=ee,ae=te;async function re(le){const ce=ne.outcome===le?null:le;ae("update:outcome",ce),ae("change",ce)}const oe=e$b.computed(()=>ne.outcome==="won"),ie=e$b.computed(()=>ne.outcome==="lost");return(le,ce)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1e,[e$b.createElementVNode("button",{onClick:ce[0]||(ce[0]=de=>re("won")),class:e$b.normalizeClass([["button_outcome-base",{"button_outcome-active-won":oe.value}],"hover:bg-green-500/40 dark:hover:bg-green-300/40"])},[ce[3]||(ce[3]=e$b.createElementVNode("p",null,"Ganho",-1)),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass([{"svg_outcome-active-won":oe.value},"size-4"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},[...ce[2]||(ce[2]=[e$b.createElementVNode("path",{d:"M3.16666 6.37502C3.74962 6.37502 4.2222 6.85073 4.22222 7.43752V15.9375C4.22222 16.5243 3.74963 17 3.16666 17H1.05555C0.472588 17 0 16.5243 0 15.9375V7.43752C1.50967e-05 6.85073 0.472597 6.37502 1.05555 6.37502H3.16666Z",fill:"CurrentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.48143 1.4454C9.79496 -0.637173 11.5194 0.143216 11.5194 0.143216C13.863 1.75728 13.005 4.80783 12.2832 6.13118H17.4424C19.5307 6.65187 19.0768 8.34354 18.5887 9.12465C19.5056 10.7905 18.4191 11.7716 17.7609 12.0538C18.1175 13.7717 17.0601 14.4178 16.4869 14.5264C16.8944 16.4004 15.5533 16.9564 14.8314 17H10.436C8.49997 16.9999 6.19055 16.1753 5.27777 15.7632V7.368C9.03523 5.6108 9.09933 3.98356 9.48143 1.4454Z",fill:"CurrentColor"},null,-1)])],2))],2),e$b.createElementVNode("button",{onClick:ce[1]||(ce[1]=de=>re("lost")),class:e$b.normalizeClass([["button_outcome-base",{"button_outcome-active-lost":ie.value}],"hover:bg-red-500/40 dark:hover:bg-red-300/40"])},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass([{"svg_outcome-active-lost":ie.value},"size-4 mt-0.8"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 19",fill:"none"},[...ce[4]||(ce[4]=[e$b.createElementVNode("path",{d:"M15.8333 10.625C15.2504 10.625 14.7778 10.1493 14.7778 9.56249L14.7778 1.0625C14.7778 0.475698 15.2504 1.57955e-06 15.8333 1.63051e-06L17.9444 1.81507e-06C18.5274 1.86603e-06 19 0.475698 19 1.0625L19 9.56249C19 10.1493 18.5274 10.625 17.9444 10.625L15.8333 10.625Z",fill:"CurrentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.51857 15.5546C9.20504 17.6372 7.48065 16.8568 7.48065 16.8568C5.13698 15.2427 5.99503 12.1922 6.71681 10.8688L1.55759 10.8688C-0.530671 10.3481 -0.0768444 8.65646 0.411319 7.87535C-0.50562 6.20951 0.580926 5.22844 1.23906 4.94622C0.882549 3.22832 1.93994 2.5822 2.51315 2.47363C2.10564 0.59965 3.44673 0.0436064 4.16864 6.1075e-07L8.56403 9.95007e-07C10.5 0.000138493 12.8095 0.824657 13.7222 1.23682L13.7222 9.632C9.96477 11.3892 9.90067 13.0164 9.51857 15.5546Z",fill:"CurrentColor"},null,-1)])],2)),ce[5]||(ce[5]=e$b.createElementVNode("p",null,"Perdido",-1))],2)]))}},OutcomeButton=_export_sfc$1(_sfc_main$1n,[["__scopeId","data-v-9b7f271f"]]),_hoisted_1$1d=["disabled"],_hoisted_2$11=["onMousemove","onClick"],_sfc_main$1m={__name:"ratingInput",props:{modelValue:{type:Number,default:0},size:{type:Number,default:24},gap:{type:Number,default:4},onRate:{type:Function,default:null},readonly:{type:Boolean,default:!1},starWeight:{type:Number,default:1}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(ne.modelValue),oe=e$b.ref(0),ie=e$b.ref(!1),le=e$b.ref(null);e$b.watch(()=>ne.modelValue,_e=>{re.value=_e});const ce=e$b.computed(()=>oe.value||re.value);function de(_e){const ge=ce.value,ke=(_e-1)*ne.starWeight,$e=_e*ne.starWeight;return ge>=$e?"100%":ge<=ke?"0%":`${(ge-ke)/ne.starWeight*100}%`}function ue(_e,ge){const ke=_e.currentTarget.getBoundingClientRect(),$e=_e.offsetX<ke.width/2;oe.value=(ge-1)*ne.starWeight+($e?ne.starWeight/2:ne.starWeight)}function ve(_e,ge){const ke=_e.currentTarget.getBoundingClientRect(),$e=_e.offsetX<ke.width/2,ye=(ge-1)*ne.starWeight+($e?ne.starWeight/2:ne.starWeight);re.value=re.value===ye?0:ye,ae("update:modelValue",re.value),typeof ne.onRate=="function"&&ne.onRate(re.value)}function me(){ne.readonly||(ie.value=!0)}function be(){ie.value=!1,oe.value=0}function fe(_e){if(!ie.value||!le.value||ne.readonly)return;const ge=_e.touches[0],ke=le.value.getBoundingClientRect(),$e=ge.clientX-ke.left,ye=ne.size+ne.gap,Ee=Math.floor($e/ye)+1;if(Ee>=1&&Ee<=5){const Se=le.value.children[Ee-1];if(Se){const Le=Se.getBoundingClientRect(),Me=ge.clientX-Le.left<Le.width/2;oe.value=(Ee-1)*ne.starWeight+(Me?ne.starWeight/2:ne.starWeight)}}}function pe(){ie.value&&oe.value>0&&(re.value=re.value===oe.value?0:oe.value,ae("update:modelValue",re.value),typeof ne.onRate=="function"&&ne.onRate(re.value)),ie.value=!1,oe.value=0}return(_e,ge)=>(e$b.openBlock(),e$b.createElementBlock("main",{ref_key:"containerRef",ref:le,disabled:ne.readonly,class:"flex select-none",style:e$b.normalizeStyle({gap:`${ee.gap}px`}),onMouseleavePassive:ge[1]||(ge[1]=ke=>!ne.readonly&&(oe.value=0)),onTouchstartPassive:me,onTouchmovePassive:fe,onTouchendPassive:pe,onTouchcancelPassive:be},[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,ke=>e$b.createElementVNode("div",{key:ke,class:e$b.normalizeClass(["relative",{"cursor-pointer":!ne.readonly,"cursor-default":ne.readonly}]),style:e$b.normalizeStyle({width:`${ee.size}px`,height:`${ee.size}px`}),onMousemove:$e=>!ne.readonly&&ue($e,ke),onMouseleave:ge[0]||(ge[0]=$e=>!ne.readonly&&(oe.value=0)),onClick:$e=>!ne.readonly&&ve($e,ke)},[(e$b.openBlock(),e$b.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"absolute top-0 left-0 color-disabled",style:e$b.normalizeStyle({width:`${ee.size}px`,height:`${ee.size}px`})},[...ge[2]||(ge[2]=[e$b.createElementVNode("path",{d:"M13.849 4.22c-.684-1.626-3.014-1.626-3.698 0L8.397 8.387l-4.552.361c-1.775.14-2.495 2.331-1.142 3.477l3.468 2.937-1.06 4.392c-.413 1.713 1.472 3.067 2.992 2.149L12 19.35l3.897 2.354c1.52.918 3.405-.436 2.992-2.15l-1.06-4.39 3.468-2.938c1.353-1.146.633-3.336-1.142-3.477l-4.552-.36-1.754-4.17Z"},null,-1)])],4)),e$b.createElementVNode("div",{class:e$b.normalizeClass(["absolute top-0 left-0 h-full overflow-hidden transition-all duration-150",{"text-primary":!oe.value,"text-hover":oe.value>0}]),style:e$b.normalizeStyle({width:de(ke),height:`${ee.size}px`})},[(e$b.openBlock(),e$b.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",style:e$b.normalizeStyle({width:`${ee.size}px`,height:`${ee.size}px`})},[...ge[3]||(ge[3]=[e$b.createElementVNode("path",{d:"M13.849 4.22c-.684-1.626-3.014-1.626-3.698 0L8.397 8.387l-4.552.361c-1.775.14-2.495 2.331-1.142 3.477l3.468 2.937-1.06 4.392c-.413 1.713 1.472 3.067 2.992 2.149L12 19.35l3.897 2.354c1.52.918 3.405-.436 2.992-2.15l-1.06-4.39 3.468-2.938c1.353-1.146.633-3.336-1.142-3.477l-4.552-.36-1.754-4.17Z"},null,-1)])],4))],6)],46,_hoisted_2$11)),64))],44,_hoisted_1$1d))}},RatingInput=_export_sfc$1(_sfc_main$1m,[["__scopeId","data-v-64a4ed3f"]]),_hoisted_1$1c={class:"client-overview-panel"},_hoisted_2$10={title:"Não é possível alterar a foto do cliente neste momento",class:"client-avatar-area"},_hoisted_3$W={class:"client-avatar-shell"},_hoisted_4$Q={class:"lock-anchor"},_hoisted_5$J={class:"w-[150px] p-1 text-center text-xs"},_hoisted_6$E=["disabled"],_hoisted_7$A={key:0,class:"size-4 text-red-200",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_8$u={key:1,class:"size-4 text-green-200",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_9$r={class:"refresh-avatar"},_hoisted_10$o=["disabled"],_hoisted_11$m={key:0,class:"client-overview-actions"},_hoisted_12$k={class:"client-rating-row"},_hoisted_13$i={key:0,class:"instance-panel"},_hoisted_14$h={class:"instance-panel-actions"},_hoisted_15$f=["disabled"],_sfc_main$1l={__name:"clientOverviewPanel",props:{hasCrmPlus:{type:Boolean,default:!1},name:{type:String,default:""},outcome:{type:String,default:null},rating:{type:[Number,String],default:null},photo:{type:String,default:null},contactId:{type:[Number,String],default:null},blocked:{type:Boolean,default:!1},canBlockContacts:{type:Boolean,default:!0}},emits:["update:outcome","update:rating","update:blocked","update:photo","photo-refresh"],setup(ee,{emit:te}){const ne=ee,ae=te,re=()=>{ae("update:blocked",!ne.blocked)},oe=e$b.ref(!1),ie=e$b.ref(!1),le=e$b.ref(null),ce=e$b.computed(()=>!!ne.contactId&&!oe.value),de=()=>{ce.value&&(ie.value=!ie.value,ie.value||(le.value=null))},ue=async()=>{try{const{data:me}=await api.get(`${contact_url}${ne.contactId}/`);return(me==null?void 0:me.photo)||null}catch{return null}},ve=async()=>{var me,be,fe;if(!(!ce.value||!le.value)){oe.value=!0;try{const{data:pe}=await api.post(contactRefreshAvatarUrl(ne.contactId),{instance:le.value.id}),_e=(pe==null?void 0:pe.photo)||((me=pe==null?void 0:pe.contact)==null?void 0:me.photo)||await ue();_e&&ae("update:photo",_e),ae("photo-refresh",{ok:!0,title:"Foto atualizada",message:(pe==null?void 0:pe.message)||"A foto de perfil do contato foi atualizada com sucesso."}),ie.value=!1,le.value=null}catch(pe){ae("photo-refresh",{ok:!1,title:"Erro ao atualizar",message:((fe=(be=pe==null?void 0:pe.response)==null?void 0:be.data)==null?void 0:fe.message)||"Não foi possível atualizar a foto de perfil do contato."})}finally{oe.value=!1}}};return(me,be)=>{const fe=e$b.resolveComponent("Popper"),pe=e$b.resolveComponent("InstanceSelect");return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$1c,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["client-overview-main",{"client-overview-main--single":!ee.hasCrmPlus}])},[e$b.createElementVNode("div",_hoisted_2$10,[e$b.createElementVNode("div",_hoisted_3$W,[e$b.createVNode(Avatar,{photo:ee.photo,name:ee.name,size:"fill",class:"avatar-client"},null,8,["photo","name"]),e$b.createElementVNode("div",_hoisted_4$Q,[e$b.createVNode(fe,{hover:"",content:ee.canBlockContacts?ee.blocked?"Desbloquear contato":"Bloquear contato":"Sem permissão para esta ação",placement:"right",arrow:""},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_5$J,e$b.toDisplayString(ee.canBlockContacts?ee.blocked?"Desbloquear contato":"Bloquear contato":"Sem permissão para esta ação"),1)]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{disabled:!ee.canBlockContacts,class:e$b.normalizeClass(["lock-button transition-all duration-200",[ee.blocked?"lock-button-blocked":"lock-button-unblocked",ee.canBlockContacts?"lock-button-enabled":"lock-button-disabled"]]),onClick:re},[ee.blocked?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$A,[...be[3]||(be[3]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$u,[...be[4]||(be[4]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M15 7a2 2 0 1 1 4 0v4a1 1 0 1 0 2 0V7a4 4 0 0 0-8 0v3H5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7a2 2 0 0 0-2-2V7Zm-5 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)])]))],10,_hoisted_6$E)]),_:1},8,["content"])]),e$b.createElementVNode("div",_hoisted_9$r,[e$b.createVNode(fe,{hover:"",content:"Atualizar foto de perfil",placement:"right",arrow:""},{content:e$b.withCtx(()=>[...be[5]||(be[5]=[e$b.createElementVNode("div",{class:"w-[150px] p-1 text-center text-xs"},"Atualizar foto de perfil",-1)])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{disabled:!ce.value,class:e$b.normalizeClass(["refresh-avatar-button transition-all duration-200",[ce.value?"refresh-avatar-button-unblocked":"refresh-avatar-button-blocked",ce.value?"lock-button-enabled":"lock-button-disabled",{"refresh-avatar-button-active":ie.value}]]),onClick:de},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4 text-blue-200",{"animate-spin":oe.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...be[6]||(be[6]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.651 7.65a7.131 7.131 0 0 0-12.68 3.15M18.001 4v4h-4m-7.652 8.35a7.13 7.13 0 0 0 12.68-3.15M6 20v-4h4"},null,-1)])],2))],10,_hoisted_10$o)]),_:1})])])]),ee.hasCrmPlus?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$m,[e$b.createVNode(OutcomeButton,{outcome:ee.outcome,"onUpdate:outcome":be[0]||(be[0]=_e=>me.$emit("update:outcome",_e))},null,8,["outcome"]),e$b.createElementVNode("div",_hoisted_12$k,[be[7]||(be[7]=e$b.createElementVNode("p",{class:"client-rating-label"},"Avaliação",-1)),e$b.createVNode(RatingInput,{"model-value":ee.rating||0,size:24,gap:5,"onUpdate:modelValue":be[1]||(be[1]=_e=>me.$emit("update:rating",_e))},null,8,["model-value"])])])):e$b.createCommentVNode("",!0)],2),e$b.createVNode(e$b.Transition,{name:"instance-panel"},{default:e$b.withCtx(()=>[ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$i,[e$b.createElementVNode("header",{class:"instance-panel-header"},[be[9]||(be[9]=e$b.createElementVNode("div",{class:"instance-panel-heading"},[e$b.createElementVNode("p",{class:"instance-panel-title"},"Atualizar foto de perfil"),e$b.createElementVNode("p",{class:"instance-panel-subtitle"},"Escolha a instância que fará a busca")],-1)),e$b.createElementVNode("button",{type:"button",class:"instance-panel-close",onClick:de},[...be[8]||(be[8]=[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)])])]),e$b.createVNode(pe,{modelValue:le.value,"onUpdate:modelValue":be[2]||(be[2]=_e=>le.value=_e)},null,8,["modelValue"]),be[11]||(be[11]=e$b.createElementVNode("p",{class:"instance-panel-hint"},[e$b.createElementVNode("svg",{class:"instance-panel-hint-icon size-4",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-2 3a1 1 0 0 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2v-3a1 1 0 0 0-1-1h-1Z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null," A foto mais recente é buscada no canal da instância escolhida. Se o contato tiver WhatsApp e Instagram com fotos diferentes, a imagem salva será a do tipo da instância selecionada aqui, contanto que a instância esteja conectada. ")],-1)),e$b.createElementVNode("div",_hoisted_14$h,[e$b.createElementVNode("button",{type:"button",class:"instance-panel-button",onClick:de},"Cancelar"),e$b.createElementVNode("button",{type:"button",class:"instance-panel-button instance-panel-button--confirm",disabled:!le.value||oe.value,onClick:ve},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4",{"animate-spin":oe.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...be[10]||(be[10]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.651 7.65a7.131 7.131 0 0 0-12.68 3.15M18.001 4v4h-4m-7.652 8.35a7.13 7.13 0 0 0 12.68-3.15M6 20v-4h4"},null,-1)])],2)),e$b.createElementVNode("p",null,e$b.toDisplayString(oe.value?"Atualizando":"Atualizar"),1)],8,_hoisted_15$f)])])):e$b.createCommentVNode("",!0)]),_:1})])}}},ClientOverviewPanel=_export_sfc$1(_sfc_main$1l,[["__scopeId","data-v-35180f3e"]]),_hoisted_1$1b={class:"relative shrink-0"},_hoisted_2$$={key:0,class:"truncate text-sm font-medium xl:text-base"},_hoisted_3$V={key:1,class:"merge-card__name"},_hoisted_4$P={key:0,class:"contact-phone rt-transition"},_hoisted_5$I={key:2,class:"conn-btns"},_hoisted_6$D={class:"conn-btn__count"},_hoisted_7$z={class:"stack-popover__list"},_hoisted_8$t={class:"stack-popover__name"},_hoisted_9$q={key:0,class:"stack-popover__username"},_hoisted_10$n={class:"conn-btn__count"},_hoisted_11$l={class:"stack-popover__list"},_hoisted_12$j={class:"stack-popover__name"},_hoisted_13$h={key:0,class:"stack-popover__username"},_hoisted_14$g={class:"conn-btn__count"},_hoisted_15$e={class:"stack-popover__list"},_hoisted_16$d={class:"stack-popover__name"},_hoisted_17$7={key:0,class:"stack-popover__username"},_hoisted_18$7={key:0,class:"flex shrink-0 flex-col items-center gap-2 text-xs xl:text-sm"},_hoisted_19$6={key:0,class:"flex items-center gap-1 opacity-80",title:"Quantidade de produtos vinculados"},_hoisted_20$6={class:"font-semibold"},_hoisted_21$5={key:1,class:"flex items-center gap-1 opacity-80",title:"Nota do contato"},_hoisted_22$3={style:{fill:"#facc15"},class:"size-4",viewBox:"0 0 20 20"},_hoisted_23$2={class:"font-semibold"},_hoisted_24$2={key:2,class:"merge-card__check"},_sfc_main$1k={__name:"contactCard",props:{contact:{type:Object,required:!0},mode:{type:String,default:"merge"},viewNumberPermission:{type:Boolean,default:!1},blockedTooltipText:{type:String,default:"Contato bloqueado - nao e possivel iniciar atendimento"},variant:{type:String,default:"default"},size:{type:String,default:"normal"},showBadge:{type:Boolean,default:!1},badgeText:{type:String,default:""},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1},avatarVariant:{type:String,default:"default"},showStartChat:{type:Boolean,default:!1}},emits:["select"],setup(ee,{emit:te}){const ne=ee,ae=te,re=Ce=>(Ce??"").toString().trim().replace(/\D/g,""),oe=Ce=>(Ce??"").toString().trim(),ie=Ce=>{const Fe=re(Ce);return Fe?Fe.length===11?`(${Fe.slice(0,2)}) ${Fe.slice(2,7)}-${Fe.slice(7)}`:Fe.length===10?`(${Fe.slice(0,2)}) ${Fe.slice(2,6)}-${Fe.slice(6)}`:Fe.length===13&&Fe.startsWith("55")?`+55 (${Fe.slice(2,4)}) ${Fe.slice(4,9)}-${Fe.slice(9)}`:Ce:""},le=e$b.computed(()=>ne.mode==="sidebar"),ce=e$b.computed(()=>{var Ce;return!!((Ce=ne.contact)!=null&&Ce.blocked)}),de=e$b.computed(()=>{var Ce;return!!((Ce=ne.contact)!=null&&Ce.telephone)}),ue=e$b.computed(()=>{var Ce;return!!((Ce=ne.contact)!=null&&Ce.instagram_user_name)});e$b.computed(()=>{var Ce,Fe;return((Fe=(Ce=ne.contact)==null?void 0:Ce.tags)==null?void 0:Fe.length)>0});const ve=e$b.computed(()=>{var Ce;return Array.isArray((Ce=ne.contact)==null?void 0:Ce.products)&&ne.contact.products.length>0}),me=e$b.computed(()=>{var Ce,Fe,Ie;return((Ce=ne.contact)==null?void 0:Ce.rating)!==null&&((Fe=ne.contact)==null?void 0:Fe.rating)!==void 0&&((Ie=ne.contact)==null?void 0:Ie.rating)!==""}),be=e$b.computed(()=>{var Ce;return ie((Ce=ne.contact)==null?void 0:Ce.telephone)}),fe=e$b.computed(()=>{var Ie,qe;const Ce=oe((Ie=ne.contact)==null?void 0:Ie.name);if(Ce)return Ce;const Fe=oe((qe=ne.contact)==null?void 0:qe.telephone);return ne.viewNumberPermission&&Fe?Fe:"Não disponível"}),pe=e$b.computed(()=>{var Ce;return le.value?fe.value:((Ce=ne.contact)==null?void 0:Ce.name)||"Sem nome"});e$b.computed(()=>{var Ie,qe;const Ce=oe((Ie=ne.contact)==null?void 0:Ie.name),Fe=oe((qe=ne.contact)==null?void 0:qe.telephone);return le.value&&ne.viewNumberPermission&&!!Ce&&!!Fe});const _e=e$b.computed(()=>!le.value&&ne.selectable?"button":"div"),ge=e$b.computed(()=>Ve.value||Ne.value||Pe.value),ke=e$b.computed(()=>{const Ce=["merge-card","bg-base-300"];return ne.selectable&&Ce.push("merge-card--selectable"),ne.selected&&Ce.push("merge-card--selected"),ne.variant==="primary"&&Ce.push("merge-card--primary"),ne.variant==="danger"&&Ce.push("merge-card--danger"),ge.value&&Ce.push("merge-card--popover-open"),Ce}),$e=e$b.computed(()=>{const Ce=["group relative flex items-center gap-3 p-3 text-xs transition-all xl:text-sm"];return ce.value?Ce.push("cursor-not-allowed opacity-60"):Ce.push("cursor-pointer hover:bg-base-100/50 dark:hover:bg-sky-300/20"),Ce}),ye=e$b.computed(()=>le.value?$e.value:ke.value),Ee=e$b.computed(()=>{if(le.value&&ce.value)return ne.blockedTooltipText}),Se=e$b.computed(()=>{if(le.value)return"size-12";const Ce=["merge-card__avatar"];return ne.size==="large"&&Ce.push("merge-card__avatar--lg"),ne.avatarVariant==="brand"?Ce.push("merge-card__avatar--brand"):ne.selected?Ce.push("merge-card__avatar--selected"):ne.variant==="primary"?Ce.push("merge-card__avatar--primary"):ne.variant==="danger"&&Ce.push("merge-card__avatar--danger"),Ce}),Le=e$b.computed(()=>le.value?"flex min-w-0 flex-1 flex-col gap-1":"merge-card__info"),Me=()=>{!le.value&&ne.selectable&&ae("select",ne.contact)},De=useWhatsappBindings(()=>ne.contact),Oe=useInstagramBindings(()=>ne.contact),Re=useTelegramBindings(()=>ne.contact),ze=useHasContactBindings(De,Oe,Re),Ve=e$b.ref(!1),Ne=e$b.ref(!1),Pe=e$b.ref(!1),Be=Ce=>{Ce.stopPropagation(),Ve.value=!Ve.value,Ne.value=!1,Pe.value=!1},Ae=Ce=>{Ce.stopPropagation(),Ne.value=!Ne.value,Ve.value=!1,Pe.value=!1},xe=Ce=>{Ce.stopPropagation(),Pe.value=!Pe.value,Ve.value=!1,Ne.value=!1};return(Ce,Fe)=>{const Ie=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(_e.value),{class:e$b.normalizeClass(ye.value),title:Ee.value,onClick:Me,style:e$b.normalizeStyle(`border-radius: ${ne.showStartChat?"0.5rem 0.5rem 0rem 0rem":"0.5rem"};`)},{default:e$b.withCtx(()=>{var qe,Ge;return[e$b.createElementVNode("div",_hoisted_1$1b,[e$b.createVNode(Avatar,{photo:ee.contact.photo,name:ee.contact.name,outcome:le.value?ee.contact.outcome:null,blocked:le.value&&ce.value,size:"fill",class:e$b.normalizeClass(Se.value)},null,8,["photo","name","outcome","blocked","class"])]),e$b.createElementVNode("div",{class:e$b.normalizeClass(Le.value)},[le.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$$,e$b.toDisplayString(pe.value),1)):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_3$V,e$b.toDisplayString(pe.value),1)),de.value||ue.value||e$b.unref(ze)?(e$b.openBlock(),e$b.createElementBlock("div",{key:2,class:e$b.normalizeClass(le.value?"contact-inline-meta":"contact-meta-column")},[de.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$P,[(qe=ee.contact)!=null&&qe.country&&((Ge=ee.contact)!=null&&Ge.telephone)?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass([` fi fi-${ee.contact.country.toLowerCase()}`,"text-xs size-[10px]"])},null,2)):e$b.createCommentVNode("",!0),e$b.createTextVNode(" "+e$b.toDisplayString(be.value),1)])):e$b.createCommentVNode("",!0),le.value&&ue.value?(e$b.openBlock(),e$b.createBlock(InstagramBadge,{key:1,"instagram-user-name":ee.contact.instagram_user_name},null,8,["instagram-user-name"])):e$b.createCommentVNode("",!0),!le.value&&e$b.unref(ze)?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_5$I,[e$b.unref(De).length?(e$b.openBlock(),e$b.createBlock(Ie,{key:0,placement:"bottom-start",class:"popper-dark",hover:!0},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:"stack-popover",onClick:Fe[0]||(Fe[0]=e$b.withModifiers(()=>{},["stop"]))},[Fe[5]||(Fe[5]=e$b.createElementVNode("p",{class:"stack-popover__title stack-popover__title--wa"}," WhatsApp ",-1)),e$b.createElementVNode("div",_hoisted_7$z,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(De),Ze=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Ze.id,class:"stack-popover__item stack-popover__item--wa"},[e$b.createElementVNode("span",_hoisted_8$t,e$b.toDisplayString(Ze.instanceName),1),Ze.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$q,e$b.toDisplayString(Ze.user_name),1)):e$b.createCommentVNode("",!0)]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{type:"button",class:"conn-btn conn-btn--wa",onClick:Be},[Fe[3]||(Fe[3]=e$b.createElementVNode("svg",{class:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 17 17"},[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1)),Fe[4]||(Fe[4]=e$b.createElementVNode("span",null,"WhatsApp",-1)),e$b.createElementVNode("span",_hoisted_6$D,e$b.toDisplayString(e$b.unref(De).length),1)])]),_:1})):e$b.createCommentVNode("",!0),e$b.unref(Oe).length?(e$b.openBlock(),e$b.createBlock(Ie,{key:1,placement:"bottom",class:"popper-dark",hover:!0},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:"stack-popover",onClick:Fe[1]||(Fe[1]=e$b.withModifiers(()=>{},["stop"]))},[Fe[8]||(Fe[8]=e$b.createElementVNode("p",{class:"stack-popover__title stack-popover__title--ig"}," Instagram ",-1)),e$b.createElementVNode("div",_hoisted_11$l,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(Oe),Ze=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Ze.id,class:"stack-popover__item stack-popover__item--ig"},[e$b.createElementVNode("span",_hoisted_12$j,e$b.toDisplayString(Ze.instanceName),1),Ze.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_13$h,"@"+e$b.toDisplayString(Ze.user_name),1)):e$b.createCommentVNode("",!0)]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{type:"button",class:"conn-btn conn-btn--ig",onClick:Ae},[Fe[6]||(Fe[6]=e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:"ig-conn-grad",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[e$b.createElementVNode("stop",{offset:"0%","stop-color":"#f58529"}),e$b.createElementVNode("stop",{offset:"40%","stop-color":"#dd2a7b"}),e$b.createElementVNode("stop",{offset:"70%","stop-color":"#8134af"}),e$b.createElementVNode("stop",{offset:"100%","stop-color":"#515bd4"})])]),e$b.createElementVNode("path",{fill:"url(#ig-conn-grad)",d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"})],-1)),Fe[7]||(Fe[7]=e$b.createElementVNode("span",{class:"conn-btn__ig-label"},"Instagram",-1)),e$b.createElementVNode("span",_hoisted_10$n,e$b.toDisplayString(e$b.unref(Oe).length),1)])]),_:1})):e$b.createCommentVNode("",!0),e$b.unref(Re).length?(e$b.openBlock(),e$b.createBlock(Ie,{key:2,placement:"bottom",class:"popper-dark",hover:!0},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:"stack-popover",onClick:Fe[2]||(Fe[2]=e$b.withModifiers(()=>{},["stop"]))},[Fe[11]||(Fe[11]=e$b.createElementVNode("p",{class:"stack-popover__title stack-popover__title--tg"}," Telegram ",-1)),e$b.createElementVNode("div",_hoisted_15$e,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(Re),Ze=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Ze.id,class:"stack-popover__item stack-popover__item--tg"},[e$b.createElementVNode("span",_hoisted_16$d,e$b.toDisplayString(Ze.instanceName),1),Ze.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_17$7,"@"+e$b.toDisplayString(Ze.user_name),1)):e$b.createCommentVNode("",!0)]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{type:"button",class:"conn-btn conn-btn--tg",onClick:xe},[Fe[9]||(Fe[9]=e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})],-1)),Fe[10]||(Fe[10]=e$b.createElementVNode("span",{class:"conn-btn__tg-label"},"Telegram",-1)),e$b.createElementVNode("span",_hoisted_14$g,e$b.toDisplayString(e$b.unref(Re).length),1)])]),_:1})):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0)],2)):e$b.createCommentVNode("",!0)],2),le.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$7,[ve.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_19$6,[Fe[12]||(Fe[12]=e$b.createElementVNode("svg",{class:"size-4 dark:text-primary_alt","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{fill:"currentColor",d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_20$6,e$b.toDisplayString(ee.contact.products.length),1)])):e$b.createCommentVNode("",!0),me.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_21$5,[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_22$3,[...Fe[13]||(Fe[13]=[e$b.createElementVNode("path",{d:"M10 15l-5.878 3.09 1.123-6.545L.489 6.91l6.572-.955L10 0l2.939 5.955 6.572.955-4.756 4.635 1.123 6.545z"},null,-1)])])),e$b.createElementVNode("span",_hoisted_23$2,e$b.toDisplayString(ee.contact.rating),1)])):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0),!le.value&&ee.showBadge&&ee.badgeText?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["merge-card__badge",[`merge-card__badge--${ee.variant}`]])},e$b.toDisplayString(ee.badgeText),3)):e$b.createCommentVNode("",!0),!le.value&&ee.selectable&&ee.selected?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_24$2,[...Fe[14]||(Fe[14]=[e$b.createElementVNode("svg",{class:"size-5",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)])])):e$b.createCommentVNode("",!0)]}),_:1},8,["class","title","style"])}}},ContactCard=_export_sfc$1(_sfc_main$1k,[["__scopeId","data-v-6cb70be7"]]),_hoisted_1$1a=["checked","disabled"],_hoisted_2$_={class:"checkbox-box"},_hoisted_3$U={key:0,class:"size-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3"},_sfc_main$1j={__name:"MergeConfirmCheckboxSection",props:{confirmed:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["update:confirmed"],setup(ee,{emit:te}){const ne=te,ae=re=>{ne("update:confirmed",re.target.checked)};return(re,oe)=>(e$b.openBlock(),e$b.createElementBlock("label",{class:e$b.normalizeClass(["confirm-checkbox",{"confirm-checkbox--checked":ee.confirmed,"confirm-checkbox--disabled":ee.loading}])},[e$b.createElementVNode("input",{type:"checkbox",checked:ee.confirmed,disabled:ee.loading,class:"sr-only",onChange:ae},null,40,_hoisted_1$1a),e$b.createElementVNode("div",_hoisted_2$_,[ee.confirmed?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_3$U,[...oe[0]||(oe[0]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)]),oe[1]||(oe[1]=e$b.createElementVNode("div",{class:"checkbox-content"},[e$b.createElementVNode("span",{class:"checkbox-title"},"Confirmo que entendi as consequências"),e$b.createElementVNode("span",{class:"checkbox-desc"},[e$b.createTextVNode(" Esta ação é "),e$b.createElementVNode("strong",null,"irreversível"),e$b.createTextVNode(". O contato selecionado será excluído permanentemente. ")])],-1))],2))}},_sfc_main$1i={},_hoisted_1$19={class:"merge-direction"};function _sfc_render$5(ee,te){return e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$19,[...te[0]||(te[0]=[e$b.createStaticVNode('<div class="merge-direction-line"></div><div class="merge-direction-icon"><svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path></svg></div><div class="merge-direction-line"></div>',3)])])}const MergeDirectionSection=_export_sfc$1(_sfc_main$1i,[["render",_sfc_render$5]]),_hoisted_1$18={key:0,class:"error-message"},_sfc_main$1h={__name:"MergeErrorSection",props:{error:{type:String,default:""}},setup(ee){return(te,ne)=>ee.error?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$18,[ne[0]||(ne[0]=e$b.createElementVNode("svg",{class:"size-4",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",null,e$b.toDisplayString(ee.error),1)])):e$b.createCommentVNode("",!0)}},_hoisted_1$17={key:0,class:"changes-list"},_hoisted_2$Z={class:"change-label"},_hoisted_3$T={class:"change-values"},_hoisted_4$O={class:"change-kept"},_hoisted_5$H={key:0,class:"incorporated-tag"},_hoisted_6$C={key:0,class:"change-discarded"},_hoisted_7$y={class:"discarded-text"},_sfc_main$1g={__name:"FieldChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0},previewContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=ce=>(ce??"").toString().trim(),oe=ce=>re(ce).replace(/\D/g,""),ie=ce=>{const de=oe(ce);return de?de.length===11?`(${de.slice(0,2)}) ${de.slice(2,7)}-${de.slice(7)}`:de.length===10?`(${de.slice(0,2)}) ${de.slice(2,6)}-${de.slice(6)}`:de.length===13&&de.startsWith("55")?`+55 (${de.slice(2,4)}) ${de.slice(4,9)}-${de.slice(9)}`:ce:null},le=e$b.computed(()=>{const ce=ne.parentContact||{},de=ne.childContact||{},ue=ne.previewContact||{};return[{key:"name",label:"Nome"},{key:"telephone",label:"Telefone",format:ie},{key:"instagram_user_name",label:"Instagram"}].map(me=>{const be=re(ce[me.key]),fe=re(de[me.key]),pe=re(ue[me.key]),_e=me.key==="telephone"?oe(be):be.toLowerCase(),ge=me.key==="telephone"?oe(fe):fe.toLowerCase(),ke=me.key==="telephone"?oe(pe):pe.toLowerCase(),$e=_e===ke&&be,ye=ge===ke&&fe&&!$e,Ee=$e?fe:ye?be:null,Se=me.format||(Le=>Le);return{key:me.key,label:me.label,finalValue:pe?Se(pe):null,discardedValue:Ee&&Ee!==pe?Se(Ee):null,fromChild:ye,hasChange:_e!==ge}}).filter(me=>me.hasChange)});return e$b.watchEffect(()=>{ae("changes-count",le.value.length)}),(ce,de)=>le.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$17,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(le.value,ue=>(e$b.openBlock(),e$b.createElementBlock("div",{key:ue.key,class:"change-item"},[e$b.createElementVNode("span",_hoisted_2$Z,e$b.toDisplayString(ue.label),1),e$b.createElementVNode("div",_hoisted_3$T,[e$b.createElementVNode("span",_hoisted_4$O,[de[0]||(de[0]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)),e$b.createTextVNode(" "+e$b.toDisplayString(ue.finalValue||"—")+" ",1),ue.fromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$H,"incorporado")):e$b.createCommentVNode("",!0)]),ue.discardedValue?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$C,[de[1]||(de[1]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_7$y,e$b.toDisplayString(ue.discardedValue),1)])):e$b.createCommentVNode("",!0)])]))),128))])):e$b.createCommentVNode("",!0)}},_hoisted_1$16={key:0,class:"array-changes-section"},_hoisted_2$Y={class:"array-changes-header"},_hoisted_3$S={class:"array-changes-count"},_hoisted_4$N={class:"products-list"},_sfc_main$1f={__name:"ProductsChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.computed(()=>{var be,fe;const ie=((be=ne.parentContact)==null?void 0:be.products)||[],le=((fe=ne.childContact)==null?void 0:fe.products)||[],ce=new Set(ie.map(pe=>{var _e;return((_e=pe.product)==null?void 0:_e.id)||pe.id})),de=ie,ue=le.filter(pe=>{var _e;return!ce.has(((_e=pe.product)==null?void 0:_e.id)||pe.id)}),ve=ue.length>0,me=ie.length+ue.length;return{hasChanges:ve,keptFromParent:de,incorporatedFromChild:ue,total:me}});return e$b.watchEffect(()=>{ae("changes-count",oe.value.hasChanges?1:0)}),(ie,le)=>oe.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$16,[e$b.createElementVNode("div",_hoisted_2$Y,[le[2]||(le[2]=e$b.createElementVNode("svg",{class:"size-3.5",viewBox:"0 0 24 24",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Z","clip-rule":"evenodd"})],-1)),le[3]||(le[3]=e$b.createElementVNode("span",{class:"array-changes-title"},"Produtos",-1)),e$b.createElementVNode("span",_hoisted_3$S," +"+e$b.toDisplayString(oe.value.incorporatedFromChild.length)+" incorporado"+e$b.toDisplayString(oe.value.incorporatedFromChild.length>1?"s":""),1),e$b.createElementVNode("button",{class:"expand-button",type:"button",onClick:le[0]||(le[0]=ce=>re.value=!re.value)},[e$b.createTextVNode(e$b.toDisplayString(re.value?"Ocultar":`Ver todos (${oe.value.total})`)+" ",1),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3",{"rotate-180":re.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...le[1]||(le[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),e$b.createElementVNode("div",_hoisted_4$N,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(oe.value.incorporatedFromChild,ce=>{var de;return e$b.openBlock(),e$b.createElementBlock("div",{key:((de=ce.product)==null?void 0:de.id)||ce.id,class:"product-wrapper product-wrapper--incorporated"},[e$b.createVNode(ProductListItem,{product:ce,quantity:ce.quantity||1,discount:ce.discount||0,incorporated:!0},null,8,["product","quantity","discount"])])}),128)),re.value?(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,{key:0},e$b.renderList(oe.value.keptFromParent,ce=>{var de;return e$b.openBlock(),e$b.createElementBlock("div",{key:((de=ce.product)==null?void 0:de.id)||ce.id,class:"product-wrapper"},[e$b.createVNode(ProductListItem,{product:ce,quantity:ce.quantity||1,discount:ce.discount||0},null,8,["product","quantity","discount"])])}),128)):e$b.createCommentVNode("",!0)])])):e$b.createCommentVNode("",!0)}},_hoisted_1$15={key:0,class:"array-changes-section"},_hoisted_2$X={class:"array-changes-header"},_hoisted_3$R={class:"array-changes-count"},_hoisted_4$M={key:0,class:"segmentation-changes-list"},_hoisted_5$G={class:"segmentation-field-name"},_hoisted_6$B={class:"segmentation-change-values"},_hoisted_7$x={class:"change-kept"},_hoisted_8$s={key:0,class:"incorporated-tag"},_hoisted_9$p={key:0,class:"change-discarded"},_hoisted_10$m={class:"discarded-text"},_sfc_main$1e={__name:"SegmentationChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=ue=>(ue??"").toString().trim(),ie=ue=>ue==null||oe(ue)==="",le=ue=>{if(!ue)return"";if(ue.type==="bool"){if(typeof ue.content=="boolean")return ue.content?"true":"false";const ve=oe(ue.content).toLowerCase();return ve?ve==="true"?"true":"false":""}return ue.type==="list"&&Array.isArray(ue.content)?ue.content.map(ve=>oe(ve)).join("|"):oe(ue.content)},ce=ue=>ie(ue==null?void 0:ue.content)?"—":ue.type==="bool"?le(ue)==="true"?"Verdadeiro":"Falso":ue.type==="list"?ue.content:ue.content||"—",de=e$b.computed(()=>{var _e,ge;const ue=((_e=ne.parentContact)==null?void 0:_e.segmentation_fields)||[],ve=((ge=ne.childContact)==null?void 0:ge.segmentation_fields)||[],me=new Map(ue.map(ke=>[ke.id,ke])),be=new Map(ve.map(ke=>[ke.id,ke])),fe=new Set([...me.keys(),...be.keys()]),pe=[];return fe.forEach(ke=>{const $e=me.get(ke),ye=be.get(ke),Ee=le($e),Se=le(ye),Le=!ie($e==null?void 0:$e.content),Me=!ie(ye==null?void 0:ye.content);if(Ee!==Se&&(Le||Me)){const De=Le||!Me?$e:ye,Oe=!Le&&Me,Re=ce(De),ze=Oe?$e:ye,Ve=ze&&!ie(ze.content)&&le(ze)!==le(De)?ce(ze):null;pe.push({id:De.id,name:De.name,finalValue:Re,discardedValue:Ve,incorporatedFromChild:!!Oe})}}),{hasChanges:pe.length>0,changes:pe}});return e$b.watchEffect(()=>{ae("changes-count",de.value.changes.length)}),(ue,ve)=>de.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$15,[e$b.createElementVNode("div",_hoisted_2$X,[ve[2]||(ve[2]=e$b.createElementVNode("svg",{class:"size-3.5",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M3 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z","clip-rule":"evenodd"})],-1)),ve[3]||(ve[3]=e$b.createElementVNode("span",{class:"array-changes-title"},"Campos Personalizados",-1)),e$b.createElementVNode("span",_hoisted_3$R,e$b.toDisplayString(de.value.changes.length)+" alteraç"+e$b.toDisplayString(de.value.changes.length>1?"ões":"ão"),1),e$b.createElementVNode("button",{class:"expand-button",type:"button",onClick:ve[0]||(ve[0]=me=>re.value=!re.value)},[e$b.createTextVNode(e$b.toDisplayString(re.value?"Ocultar":"Ver detalhes")+" ",1),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3",{"rotate-180":re.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...ve[1]||(ve[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),re.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_4$M,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(de.value.changes,me=>(e$b.openBlock(),e$b.createElementBlock("div",{key:me.id,class:"segmentation-change-item"},[e$b.createElementVNode("span",_hoisted_5$G,e$b.toDisplayString(me.name),1),e$b.createElementVNode("div",_hoisted_6$B,[e$b.createElementVNode("span",_hoisted_7$x,[ve[4]||(ve[4]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)),e$b.createTextVNode(" "+e$b.toDisplayString(me.finalValue)+" ",1),me.incorporatedFromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$s," incorporado ")):e$b.createCommentVNode("",!0)]),me.discardedValue?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$p,[ve[5]||(ve[5]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_10$m,e$b.toDisplayString(me.discardedValue||"—"),1)])):e$b.createCommentVNode("",!0)])]))),128))])):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0)}},_hoisted_1$14={key:0,class:"array-changes-section"},_hoisted_2$W={class:"array-changes-header"},_hoisted_3$Q={class:"array-changes-count"},_hoisted_4$L={class:"tags-list"},_hoisted_5$F={class:"tag-name"},_hoisted_6$A={class:"tag-name"},_sfc_main$1d={__name:"TagsChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.computed(()=>{var be,fe;const ie=((be=ne.parentContact)==null?void 0:be.tags)||[],le=((fe=ne.childContact)==null?void 0:fe.tags)||[],ce=new Set(ie.map(pe=>pe.id)),de=ie,ue=le.filter(pe=>!ce.has(pe.id)),ve=ue.length>0,me=ie.length+ue.length;return{hasChanges:ve,keptFromParent:de,incorporatedFromChild:ue,total:me}});return e$b.watchEffect(()=>{ae("changes-count",oe.value.hasChanges?1:0)}),(ie,le)=>oe.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$14,[e$b.createElementVNode("div",_hoisted_2$W,[le[2]||(le[2]=e$b.createElementVNode("svg",{class:"size-3.5",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"})],-1)),le[3]||(le[3]=e$b.createElementVNode("span",{class:"array-changes-title"},"Etiquetas",-1)),e$b.createElementVNode("span",_hoisted_3$Q," +"+e$b.toDisplayString(oe.value.incorporatedFromChild.length)+" incorporada"+e$b.toDisplayString(oe.value.incorporatedFromChild.length>1?"s":""),1),e$b.createElementVNode("button",{class:"expand-button",type:"button",onClick:le[0]||(le[0]=ce=>re.value=!re.value)},[e$b.createTextVNode(e$b.toDisplayString(re.value?"Ocultar":`Ver todas (${oe.value.total})`)+" ",1),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3",{"rotate-180":re.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...le[1]||(le[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),e$b.createElementVNode("div",_hoisted_4$L,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(oe.value.incorporatedFromChild,ce=>(e$b.openBlock(),e$b.createElementBlock("span",{key:ce.id,class:"tag-item tag-item--incorporated",style:e$b.normalizeStyle({backgroundColor:`${ce.color}20`,borderColor:`${ce.color}40`})},[e$b.createElementVNode("span",{class:"tag-color",style:e$b.normalizeStyle({backgroundColor:ce.color})},null,4),e$b.createElementVNode("span",_hoisted_5$F,e$b.toDisplayString(ce.name),1),le[4]||(le[4]=e$b.createElementVNode("span",{class:"incorporated-badge"},"+",-1))],4))),128)),re.value?(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,{key:0},e$b.renderList(oe.value.keptFromParent,ce=>(e$b.openBlock(),e$b.createElementBlock("span",{key:ce.id,class:"tag-item",style:e$b.normalizeStyle({backgroundColor:`${ce.color}20`,borderColor:`${ce.color}40`})},[e$b.createElementVNode("span",{class:"tag-color",style:e$b.normalizeStyle({backgroundColor:ce.color})},null,4),e$b.createElementVNode("span",_hoisted_6$A,e$b.toDisplayString(ce.name),1)],4))),128)):e$b.createCommentVNode("",!0)])])):e$b.createCommentVNode("",!0)}},_hoisted_1$13={class:"contact-section contact-section--result"},_hoisted_2$V={class:"section-header section-header--result"},_hoisted_3$P={key:0,class:"changes-badge"},_hoisted_4$K={class:"contact-card-wrapper contact-card-wrapper--result"},_hoisted_5$E={class:"array-changes-header"},_hoisted_6$z={key:0,class:"array-changes-count"},_hoisted_7$w={class:"ml-auto flex items-center gap-1.5"},_hoisted_8$r={class:"connections-result-list"},_hoisted_9$o={class:"conn-side conn-side--left"},_hoisted_10$l={key:0,class:"conn-icon conn-icon--wa",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 17 17"},_hoisted_11$k={key:1,class:"conn-icon conn-icon--ig",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},_hoisted_12$i={key:2,class:"conn-icon conn-icon--tg",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_13$g={class:"conn-instance"},_hoisted_14$f={class:"conn-side conn-side--right"},_hoisted_15$d={key:0,class:"incorporated-tag"},_hoisted_16$c={key:1,class:"conn-username"},_sfc_main$1c={__name:"MergeResultSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0},mergePreview:{type:Object,default:null}},setup(ee){const te=ee,ne=e$b.computed(()=>{var _e,ge,ke,$e,ye,Ee,Se,Le,Me,De,Oe,Re,ze,Ve,Ne,Pe;const me=te.mergePreview||{name:((_e=te.parentContact)==null?void 0:_e.name)||((ge=te.childContact)==null?void 0:ge.name),telephone:((ke=te.parentContact)==null?void 0:ke.telephone)||(($e=te.childContact)==null?void 0:$e.telephone),whatsapp_id:((ye=te.parentContact)==null?void 0:ye.whatsapp_id)||((Ee=te.childContact)==null?void 0:Ee.whatsapp_id),instagram_user_name:((Se=te.parentContact)==null?void 0:Se.instagram_user_name)||((Le=te.childContact)==null?void 0:Le.instagram_user_name)},be=[...((Me=te.parentContact)==null?void 0:Me.whatsapp_infos)||[],...((De=te.childContact)==null?void 0:De.whatsapp_infos)||[]],fe=[...((Oe=te.parentContact)==null?void 0:Oe.instagram_infos)||[],...((Re=te.childContact)==null?void 0:Re.instagram_infos)||[]],pe=[...((ze=te.parentContact)==null?void 0:ze.telegram_infos)||[],...((Ve=te.childContact)==null?void 0:Ve.telegram_infos)||[]];return{...me,photo:me.photo||((Ne=te.parentContact)==null?void 0:Ne.photo)||((Pe=te.childContact)==null?void 0:Pe.photo),whatsapp_infos:be,instagram_infos:fe,telegram_infos:pe}}),ae=e$b.ref(0),re=e$b.ref(0),oe=e$b.ref(0),ie=e$b.ref(0),le=e$b.ref(!1),ce=e$b.ref(!1),de=e$b.computed(()=>{var ke,$e,ye,Ee,Se,Le;const me=(((ke=te.parentContact)==null?void 0:ke.whatsapp_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`pwa-${De}`,platform:"whatsapp",instanceName:Me.instance,userName:Me.whatsapp_user_name||"",fromChild:!1})),be=((($e=te.childContact)==null?void 0:$e.whatsapp_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`cwa-${De}`,platform:"whatsapp",instanceName:Me.instance,userName:Me.whatsapp_user_name||"",fromChild:!0})),fe=(((ye=te.parentContact)==null?void 0:ye.instagram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`pig-${De}`,platform:"instagram",instanceName:Me.instance,userName:Me.instagram_user_name||"",fromChild:!1})),pe=(((Ee=te.childContact)==null?void 0:Ee.instagram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`cig-${De}`,platform:"instagram",instanceName:Me.instance,userName:Me.instagram_user_name||"",fromChild:!0})),_e=(((Se=te.parentContact)==null?void 0:Se.telegram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`ptg-${De}`,platform:"telegram",instanceName:Me.instance,userName:Me.telegram_user_name||"",fromChild:!1})),ge=(((Le=te.childContact)==null?void 0:Le.telegram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`ctg-${De}`,platform:"telegram",instanceName:Me.instance,userName:Me.telegram_user_name||"",fromChild:!0}));return[...me,...be,...fe,...pe,..._e,...ge]}),ue=e$b.computed(()=>de.value.filter(me=>me.fromChild).length),ve=e$b.computed(()=>ae.value+re.value+oe.value+ie.value+ue.value);return(me,be)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("section",_hoisted_1$13,[e$b.createElementVNode("header",_hoisted_2$V,[be[8]||(be[8]=e$b.createStaticVNode('<div class="section-header-content"><div class="section-icon section-icon--result"><svg class="size-4" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg></div><div><span class="section-title">Resultado da mesclagem</span><span class="section-subtitle"> Este será o contato final após a operação </span></div></div>',1)),ve.value>0?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$P,e$b.toDisplayString(ve.value)+" alteraç"+e$b.toDisplayString(ve.value>1?"ões":"ão"),1)):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",_hoisted_4$K,[e$b.createVNode(ContactCard,{contact:ne.value,variant:"primary","show-details":!0},null,8,["contact"])]),e$b.createVNode(_sfc_main$1g,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,"preview-contact":ne.value,onChangesCount:be[0]||(be[0]=fe=>ae.value=fe)},null,8,["parent-contact","child-contact","preview-contact"]),de.value.length?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:"array-changes-section cursor-pointer",onClick:be[2]||(be[2]=fe=>le.value=!le.value)},[e$b.createElementVNode("div",_hoisted_5$E,[be[10]||(be[10]=e$b.createElementVNode("span",{class:"array-changes-title"},"Conexões",-1)),ue.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$z," +"+e$b.toDisplayString(ue.value)+" incorporada"+e$b.toDisplayString(ue.value>1?"s":""),1)):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_7$w,[e$b.createElementVNode("button",{class:"connections-help-btn",type:"button",onClick:be[1]||(be[1]=e$b.withModifiers(fe=>ce.value=!0,["stop"]))}," ? "),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3 transition-transform duration-200",{"rotate-180":le.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...be[9]||(be[9]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),e$b.withDirectives(e$b.createElementVNode("div",_hoisted_8$r,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(de.value,fe=>(e$b.openBlock(),e$b.createElementBlock("div",{key:fe.id,class:e$b.normalizeClass(["connection-result-item",{"connection-result-item--new":fe.fromChild}])},[e$b.createElementVNode("div",_hoisted_9$o,[fe.platform==="whatsapp"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_10$l,[...be[11]||(be[11]=[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)])])):fe.platform==="instagram"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_11$k,[...be[12]||(be[12]=[e$b.createElementVNode("path",{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$i,[...be[13]||(be[13]=[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"},null,-1)])]))]),e$b.createElementVNode("span",_hoisted_13$g,e$b.toDisplayString(fe.instanceName),1),e$b.createElementVNode("div",_hoisted_14$f,[fe.fromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_15$d,"incorporado")):e$b.createCommentVNode("",!0),fe.userName?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$c,e$b.toDisplayString(fe.userName),1)):e$b.createCommentVNode("",!0)])],2))),128))],512),[[e$b.vShow,le.value]])])):e$b.createCommentVNode("",!0),e$b.createVNode(_sfc_main$1d,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:be[3]||(be[3]=fe=>re.value=fe)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1f,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:be[4]||(be[4]=fe=>oe.value=fe)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1e,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:be[5]||(be[5]=fe=>ie.value=fe)},null,8,["parent-contact","child-contact"])]),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(simpleModal,{"is-open":ce.value,"onUpdate:isOpen":be[7]||(be[7]=fe=>ce.value=fe),size:"w-max",class:"text-white",header:{title:"Sobre as Conexões",svg:"<svg class='w-5 mr-1 text-blue-400 inline-block' viewBox='0 0 20 20' fill='currentColor'><path fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/></svg>"}},{body:e$b.withCtx(()=>[...be[14]||(be[14]=[e$b.createElementVNode("div",{class:"connections-help-body"},[e$b.createElementVNode("p",{class:"connections-help-intro"},[e$b.createTextVNode(" As "),e$b.createElementVNode("strong",null,"conexões"),e$b.createTextVNode(" representam os canais de comunicação vinculados ao contato, como números de WhatsApp ou contas do Instagram associados a instâncias do sistema. ")]),e$b.createElementVNode("div",{class:"connections-help-rule"},[e$b.createElementVNode("svg",{class:"connections-help-rule-icon",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("Todas as conexões de "),e$b.createElementVNode("em",null,"ambos"),e$b.createTextVNode(" os contatos são preservadas no contato final, nenhuma é perdida na mesclagem.")])]),e$b.createElementVNode("div",{class:"connections-help-rule"},[e$b.createElementVNode("svg",{class:"connections-help-rule-icon connections-help-rule-icon--green",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM14 11a1 1 0 011 1v1h1a1 1 0 110 2h-1v1a1 1 0 11-2 0v-1h-1a1 1 0 110-2h1v-1a1 1 0 011-1z"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("Conexões marcadas como "),e$b.createElementVNode("span",{class:"connections-help-badge"},"incorporado"),e$b.createTextVNode(" pertencem ao contato secundário, que será apagado após a mesclagem.")])]),e$b.createElementVNode("div",{class:"connections-help-rule"},[e$b.createElementVNode("svg",{class:"connections-help-rule-icon",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,"Se houver conexões duplicadas entre os dois contatos, ambas continuarão existindo — revise-as após a mesclagem, se necessário.")])],-1)])]),footer:e$b.withCtx(()=>[e$b.createElementVNode("button",{class:"connections-help-close-btn",type:"button",onClick:be[6]||(be[6]=fe=>ce.value=!1)}," Entendi ")]),_:1},8,["is-open"])]))],64))}},_hoisted_1$12={class:"contact-section contact-section--remove"},_hoisted_2$U={class:"contact-card-wrapper"},_sfc_main$1b={__name:"RemoveContactSection",props:{childContact:{type:Object,required:!0}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$12,[ne[0]||(ne[0]=e$b.createStaticVNode('<header class="section-header section-header--remove"><div class="section-header-content"><div class="section-icon section-icon--remove"><svg class="size-4" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg></div><div><span class="section-title">Contato duplicado</span><span class="section-subtitle">Este contato será excluído permanentemente</span></div></div></header>',1)),e$b.createElementVNode("div",_hoisted_2$U,[e$b.createVNode(ContactCard,{contact:ee.childContact,size:"medium",variant:"danger"},null,8,["contact"])])]))}},_hoisted_1$11={class:"confirmation-panel"},_sfc_main$1a={__name:"MergeConfirmationPanel",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0},mergeValidation:{type:Object,required:!0},mergePreview:{type:Object,default:null},confirmed:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:confirmed"],setup(ee,{emit:te}){const ne=te,ae=re=>{ne("update:confirmed",re)};return(re,oe)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$11,[e$b.createVNode(_sfc_main$1b,{"child-contact":ee.childContact},null,8,["child-contact"]),e$b.createVNode(MergeDirectionSection),e$b.createVNode(_sfc_main$1c,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,"merge-preview":ee.mergePreview},null,8,["parent-contact","child-contact","merge-preview"]),e$b.createVNode(_sfc_main$1j,{confirmed:ee.confirmed,loading:ee.loading,"onUpdate:confirmed":ae},null,8,["confirmed","loading"]),e$b.createVNode(_sfc_main$1h,{error:ee.error},null,8,["error"])]))}},normalizeString=ee=>(ee??"").toString().trim(),normalizeDigits=ee=>normalizeString(ee).replace(/\D/g,""),parseWhatsAppId=ee=>{const te=normalizeString(ee);return te?te.endsWith("@c.us")?{type:"jid",value:te.replace("@c.us","")}:te.endsWith("@lid")?{type:"lid",value:te.replace("@lid","")}:{type:null,value:null}:{type:null,value:null}},extractJid=ee=>{const te=parseWhatsAppId(ee);return te.type==="jid"?te.value:null},extractLid=ee=>{const te=parseWhatsAppId(ee);return te.type==="lid"?te.value:null},removeBrazilCountryCode=ee=>ee.startsWith("55")&&ee.length>=12?ee.slice(2):ee,splitBrazilianPhone=ee=>{const te=removeBrazilCountryCode(normalizeDigits(ee));return te.length<10?null:{areaCode:te.slice(0,2),localNumber:te.slice(2),normalized:te}},compareTelephones=(ee,te)=>{const ne=removeBrazilCountryCode(normalizeDigits(ee)),ae=removeBrazilCountryCode(normalizeDigits(te));if(!ne||!ae)return{isCompatible:!0,isSame:ne===ae,isNineDigitVariant:!1,normalizedParent:ne,normalizedChild:ae};if(ne===ae)return{isCompatible:!0,isSame:!0,isNineDigitVariant:!1,normalizedParent:ne,normalizedChild:ae};const re=splitBrazilianPhone(ee),oe=splitBrazilianPhone(te);if(!re||!oe||re.areaCode!==oe.areaCode)return{isCompatible:!1,isSame:!1,isNineDigitVariant:!1,normalizedParent:ne,normalizedChild:ae};const ie=re.localNumber.length===9&&oe.localNumber.length===8&&re.localNumber.startsWith("9")&&re.localNumber.slice(1)===oe.localNumber,le=oe.localNumber.length===9&&re.localNumber.length===8&&oe.localNumber.startsWith("9")&&oe.localNumber.slice(1)===re.localNumber,ce=ie||le;return{isCompatible:ce,isSame:!1,isNineDigitVariant:ce,normalizedParent:ne,normalizedChild:ae}},resolveMergedTelephone=(ee,te,ne)=>{var oe,ie;const ae=normalizeString(ee==null?void 0:ee.telephone),re=normalizeString(te==null?void 0:te.telephone);if(!ae&&!re)return"";if(!ae)return re;if(!re)return ae;if(ne!=null&&ne.isNineDigitVariant){const le=((oe=ne.normalizedParent)==null?void 0:oe.length)||0;if((((ie=ne.normalizedChild)==null?void 0:ie.length)||0)>le)return re}return ae},validateContactMerge=(ee,te)=>{if(!ee||!te)return{canMerge:!1,reasons:[],mergeableFields:[],phoneComparison:null};const ne=[],ae=[],re=normalizeString(ee.telephone),oe=normalizeString(te.telephone),ie=!!re,le=!!oe,ce=extractJid(ee.whatsapp_id),de=extractJid(te.whatsapp_id),ue=extractLid(ee.whatsapp_id),ve=extractLid(te.whatsapp_id);let me=null;return ie&&le&&(me=compareTelephones(re,oe),me.isCompatible?me.isNineDigitVariant&&ae.push("telephone"):ne.push("Os telefones são diferentes e não são variação de 9º dígito")),(ie&&!le||!ie&&le)&&(ue&&ve&&ue!==ve&&ne.push("WhatsApp LID diferente entre os contatos"),ce&&de&&ce!==de&&ne.push("WhatsApp JID diferente entre os contatos")),ce&&de&&ce===de&&ae.push("whatsapp_jid"),ue&&ve&&ue===ve&&ae.push("whatsapp_lid"),{canMerge:ne.length===0,reasons:ne,mergeableFields:ae,phoneComparison:me}},generateMergePreview=(ee,te,ne)=>{if(!ee||!te)return null;const ae=extractJid(ee.whatsapp_id),re=extractJid(te.whatsapp_id),oe=extractLid(ee.whatsapp_id),ie=extractLid(te.whatsapp_id);let le=ee.whatsapp_id||te.whatsapp_id;ae||re?le=`${ae||re}@c.us`:(oe||ie)&&(le=`${oe||ie}@lid`);const ce=ee.tags||[],de=te.tags||[],ue=new Map;ce.forEach(ye=>ue.set(ye.id,ye)),de.forEach(ye=>{ue.has(ye.id)||ue.set(ye.id,ye)});const ve=Array.from(ue.values()),me=ee.products||[],be=te.products||[],fe=new Map;me.forEach(ye=>fe.set(ye.id,ye)),be.forEach(ye=>{fe.has(ye.id)||fe.set(ye.id,ye)});const pe=Array.from(fe.values()),_e=ee.segmentation_fields||[],ge=te.segmentation_fields||[],ke=new Map;_e.forEach(ye=>ke.set(ye.id,{...ye})),ge.forEach(ye=>{if(ke.has(ye.id)){const Ee=ke.get(ye.id),Se=normalizeString(Ee.content),Le=normalizeString(ye.content);!Se&&Le&&ke.set(ye.id,{...Ee,content:ye.content,content_id:ye.content_id})}else ke.set(ye.id,{...ye})});const $e=Array.from(ke.values());return{name:normalizeString(ee.name)||normalizeString(te.name),telephone:resolveMergedTelephone(ee,te,ne),whatsapp_id:le,instagram_user_name:normalizeString(ee.instagram_user_name)||normalizeString(te.instagram_user_name),tags:ve,products:pe,segmentation_fields:$e}};function useContactSearch(ee){const te=e$b.ref(""),ne=e$b.ref([]),ae=e$b.ref(!1),re=e$b.ref(1),oe=e$b.ref(null),ie=e$b.ref(0);let le=null,ce=0;const de=(be={})=>{const fe=new URLSearchParams;return Object.entries(be).forEach(([pe,_e])=>{_e!=null&&_e!==""&&fe.append(pe,_e)}),`${contact_url}?${fe.toString()}`},ue=async(be=!1)=>{const fe=++ce;be&&(re.value=1,ne.value=[],oe.value=null,ie.value++),ae.value=!0;try{const pe=await api.get(de({page:re.value,query:te.value||void 0}));if(fe!==ce)return;const _e=pe==null?void 0:pe.data,ge=Array.isArray(_e)?_e:Array.isArray(_e==null?void 0:_e.results)?_e.results:[];oe.value=(_e==null?void 0:_e.next)||null;const ke=normalizeString((ee==null?void 0:ee.value)||ee),$e=ge.filter(ye=>{const Ee=normalizeString(ye==null?void 0:ye.id);return Ee&&Ee!==ke});be||re.value===1?ne.value=$e:ne.value=[...ne.value,...$e]}catch(pe){if(fe!==ce)return;console.error("Erro ao buscar contatos:",pe),ne.value=be?[]:ne.value}finally{fe===ce&&(ae.value=!1)}},ve=async be=>{if(!oe.value){be.complete();return}re.value++;try{await ue(!1),oe.value?be.loaded():be.complete()}catch(fe){console.error("Erro ao carregar mais contatos:",fe),be.complete()}},me=()=>{te.value="",ne.value=[],re.value=1,oe.value=null,ce++,clearTimeout(le)};return e$b.watch(te,()=>{clearTimeout(le),le=setTimeout(()=>{ue(!0)},350)}),e$b.onUnmounted(()=>{clearTimeout(le),ce++}),{searchTerm:te,candidates:ne,candidatesLoading:ae,page:re,nextPage:oe,infiniteKey:ie,fetchCandidates:ue,loadMoreCandidates:ve,resetSearch:me}}const _hoisted_1$10={key:0,class:"merge-overlay"},_hoisted_2$T={class:"merge-modal bg-base-200"},_hoisted_3$O={class:"merge-header bg-base-300"},_hoisted_4$J={class:"merge-header-content"},_hoisted_5$D={class:"merge-subtitle"},_hoisted_6$y=["disabled"],_hoisted_7$v={class:"step-indicator"},_hoisted_8$q={class:"step-circle"},_hoisted_9$n={key:0},_hoisted_10$k={key:1},_hoisted_11$j={class:"merge-content"},_hoisted_12$h={class:"current-contact-section"},_hoisted_13$f={class:"search-section"},_hoisted_14$e={class:"search-box bg-base-300"},_hoisted_15$c={key:0,class:"search-spinner"},_hoisted_16$b={key:1,class:"empty-state"},_hoisted_17$6={key:2,class:"loading-state"},_hoisted_18$6={key:0,class:"validation-warning"},_hoisted_19$5={class:"warning-content"},_hoisted_20$5={class:"warning-list"},_hoisted_21$4={key:1,class:"merge-info"},_hoisted_22$2={class:"info-content"},_hoisted_23$1={class:"info-list"},_hoisted_24$1={key:0},_hoisted_25$1={key:1},_hoisted_26={key:2},_hoisted_27={class:"merge-footer bg-base-300"},_hoisted_28=["disabled"],_hoisted_29=["disabled"],_hoisted_30=["disabled"],_hoisted_31=["disabled"],_sfc_main$19={__name:"contactMergeModal",props:{isOpen:{type:Boolean,default:!1},currentContact:{type:Object,default:()=>({})},mergeContacts:{type:Function,default:null}},emits:["close","merged"],setup(ee,{emit:te}){const ne=ee,ae=te,{searchTerm:re,candidates:oe,candidatesLoading:ie,nextPage:le,infiniteKey:ce,fetchCandidates:de,loadMoreCandidates:ue,resetSearch:ve}=useContactSearch(()=>{var Ae;return(Ae=ne.currentContact)==null?void 0:Ae.id}),me=e$b.ref("select"),be=e$b.ref(!1),fe=e$b.ref(""),pe=e$b.ref(!1),_e=e$b.ref(null),ge=Ae=>JSON.parse(JSON.stringify(e$b.toRaw(Ae??{}))),ke=Ae=>{const xe=ge(Ae);return delete xe.__mergeKey,xe},$e=e$b.computed(()=>ne.currentContact),ye=e$b.computed(()=>_e.value),Ee=e$b.computed(()=>!!_e.value),Se=e$b.computed(()=>validateContactMerge($e.value,ye.value)),Le=e$b.computed(()=>generateMergePreview($e.value,ye.value,Se.value.phoneComparison)),Me=e$b.computed(()=>Ee.value&&Se.value.canMerge),De=e$b.computed(()=>Se.value.canMerge&&pe.value&&!be.value&&Ee.value),Oe=e$b.computed(()=>oe.value.filter(Ae=>{var xe;return Ae.id!==((xe=$e.value)==null?void 0:xe.id)})),Re=()=>{me.value="select",fe.value="",pe.value=!1,be.value=!1,_e.value=null,ve()},ze=({force:Ae=!1}={})=>{be.value&&!Ae||(Re(),ae("close"))},Ve=Ae=>{var xe;((xe=_e.value)==null?void 0:xe.id)===Ae.id?_e.value=null:_e.value=ge(Ae)},Ne=()=>{Me.value&&(me.value="confirm")},Pe=()=>{me.value="select",pe.value=!1,fe.value=""},Be=async()=>{if(!De.value)return;const Ae={parentId:$e.value.id??null,childId:ye.value.id??null,parentContact:ke($e.value),childContact:ke(ye.value),mergeableFields:[...Se.value.mergeableFields],mergedPreview:Le.value?{...Le.value}:null};try{be.value=!0,fe.value="";let xe=null;if(typeof ne.mergeContacts=="function"){const Ce=await ne.mergeContacts(Ae);xe=(Ce==null?void 0:Ce.object)??null}ae("merged",{...Ae,contact:xe}),ze({force:!0})}catch(xe){fe.value=(xe==null?void 0:xe.message)||"Não foi possível concluir a mesclagem de contatos."}finally{be.value=!1}};return e$b.watch(()=>ne.isOpen,Ae=>{Ae&&(Re(),de(!0))}),(Ae,xe)=>(e$b.openBlock(),e$b.createBlock(e$b.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e$b.withCtx(()=>[ee.isOpen?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$10,[e$b.createElementVNode("div",_hoisted_2$T,[e$b.createElementVNode("header",_hoisted_3$O,[e$b.createElementVNode("div",_hoisted_4$J,[xe[3]||(xe[3]=e$b.createElementVNode("div",{class:"merge-header-icon"},[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H6Zm7.25-2.095c.478-.86.75-1.85.75-2.905a5.973 5.973 0 0 0-.75-2.906 4 4 0 1 1 0 5.811ZM15.466 20c.34-.588.535-1.271.535-2v-1a5.978 5.978 0 0 0-1.528-4H18a4 4 0 0 1 4 4v1a2 2 0 0 1-2 2h-4.535Z","clip-rule":"evenodd"})])],-1)),e$b.createElementVNode("div",null,[xe[2]||(xe[2]=e$b.createElementVNode("h2",{class:"merge-title"},"Mesclar Contatos",-1)),e$b.createElementVNode("p",_hoisted_5$D,e$b.toDisplayString(me.value==="select"?"Selecione o contato para mesclar":"Confirme a mesclagem"),1)])]),e$b.createElementVNode("button",{class:"merge-close-btn",disabled:be.value,onClick:ze},[...xe[4]||(xe[4]=[e$b.createElementVNode("svg",{class:"size-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,_hoisted_6$y)]),e$b.createElementVNode("div",_hoisted_7$v,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:me.value==="select",completed:me.value==="confirm"}])},[e$b.createElementVNode("div",_hoisted_8$q,[me.value==="confirm"?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$n,"✓")):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_10$k,"1"))]),xe[5]||(xe[5]=e$b.createElementVNode("span",{class:"step-label"},"Selecionar",-1))],2),e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-line",{active:me.value==="confirm"}])},null,2),e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:me.value==="confirm"}])},[...xe[6]||(xe[6]=[e$b.createElementVNode("div",{class:"step-circle"},"2",-1),e$b.createElementVNode("span",{class:"step-label"},"Confirmar",-1)])],2)]),e$b.createElementVNode("div",_hoisted_11$j,[me.value==="select"?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[e$b.createElementVNode("div",_hoisted_12$h,[xe[7]||(xe[7]=e$b.createElementVNode("p",{class:"section-label"},"Contato Principal (será mantido)",-1)),e$b.createVNode(ContactCard,{contact:ee.currentContact,variant:"primary","show-badge":!0,"badge-text":"Principal","show-details":!0},null,8,["contact"])]),e$b.createElementVNode("div",_hoisted_13$f,[xe[10]||(xe[10]=e$b.createElementVNode("p",{class:"section-label"}," Selecione o contato a ser mesclado (será removido) ",-1)),e$b.createElementVNode("div",_hoisted_14$e,[xe[9]||(xe[9]=e$b.createElementVNode("svg",{class:"search-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),e$b.withDirectives(e$b.createElementVNode("input",{"onUpdate:modelValue":xe[0]||(xe[0]=Ce=>e$b.isRef(re)?re.value=Ce:null),placeholder:"Buscar por nome ou telefone...",class:"search-input ring-0 focus:ring-0 bg-base-300"},null,512),[[e$b.vModelText,e$b.unref(re)]]),e$b.unref(ie)&&Ae.page===1?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$c,[...xe[8]||(xe[8]=[e$b.createElementVNode("div",{class:"spinner"},null,-1)])])):e$b.createCommentVNode("",!0)])]),(e$b.openBlock(),e$b.createElementBlock("div",{class:"candidates-list",key:e$b.unref(ce)},[Oe.value.length>0?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Oe.value,Ce=>{var Fe;return e$b.openBlock(),e$b.createBlock(ContactCard,{key:Ce.id,contact:Ce,selectable:!0,selected:((Fe=_e.value)==null?void 0:Fe.id)===Ce.id,"show-details":!0,onSelect:Ve},null,8,["contact","selected"])}),128)),e$b.unref(le)?(e$b.openBlock(),e$b.createBlock(e$b.unref(Y$1),{key:0,onInfinite:e$b.unref(ue),class:"infinite-loader"},{spinner:e$b.withCtx(()=>[...xe[11]||(xe[11]=[e$b.createElementVNode("div",{class:"infinite-spinner"},[e$b.createElementVNode("div",{class:"spinner"}),e$b.createElementVNode("span",null,"Carregando mais contatos...")],-1)])]),complete:e$b.withCtx(()=>[...xe[12]||(xe[12]=[e$b.createElementVNode("span",null,null,-1)])]),_:1},8,["onInfinite"])):e$b.createCommentVNode("",!0)],64)):e$b.unref(ie)?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$6,[...xe[14]||(xe[14]=[e$b.createElementVNode("div",{class:"spinner spinner--lg"},null,-1),e$b.createElementVNode("span",null,"Buscando contatos...",-1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_16$b,[...xe[13]||(xe[13]=[e$b.createElementVNode("svg",{class:"empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})],-1),e$b.createElementVNode("p",{class:"empty-text"},"Nenhum contato encontrado",-1),e$b.createElementVNode("p",{class:"empty-hint"}," Tente buscar por outro nome ou telefone ",-1)])]))])),Ee.value&&!Se.value.canMerge?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$6,[xe[16]||(xe[16]=e$b.createElementVNode("svg",{class:"warning-icon",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("div",_hoisted_19$5,[xe[15]||(xe[15]=e$b.createElementVNode("p",{class:"warning-title"},"Mesclagem não permitida",-1)),e$b.createElementVNode("ul",_hoisted_20$5,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Se.value.reasons,(Ce,Fe)=>(e$b.openBlock(),e$b.createElementBlock("li",{key:Fe},e$b.toDisplayString(Ce),1))),128))])])])):e$b.createCommentVNode("",!0),Ee.value&&Se.value.canMerge&&Se.value.mergeableFields.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_21$4,[xe[18]||(xe[18]=e$b.createElementVNode("svg",{class:"info-icon",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("div",_hoisted_22$2,[xe[17]||(xe[17]=e$b.createElementVNode("p",{class:"info-title"},"Mesclagem permitida",-1)),e$b.createElementVNode("ul",_hoisted_23$1,[Se.value.mergeableFields.includes("telephone")?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_24$1," Telefones são variação de 9º dígito - será mantido o com 9 dígitos ")):e$b.createCommentVNode("",!0),Se.value.mergeableFields.includes("whatsapp_jid")?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_25$1," WhatsApp JID é o mesmo em ambos os contatos ")):e$b.createCommentVNode("",!0),Se.value.mergeableFields.includes("whatsapp_lid")?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_26," WhatsApp LID é o mesmo em ambos os contatos ")):e$b.createCommentVNode("",!0)])])])):e$b.createCommentVNode("",!0)],64)):me.value==="confirm"?(e$b.openBlock(),e$b.createBlock(_sfc_main$1a,{key:1,"parent-contact":$e.value,"child-contact":ye.value,"merge-validation":Se.value,"merge-preview":Le.value,confirmed:pe.value,loading:be.value,error:fe.value,"onUpdate:confirmed":xe[1]||(xe[1]=Ce=>pe.value=Ce)},null,8,["parent-contact","child-contact","merge-validation","merge-preview","confirmed","loading","error"])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("footer",_hoisted_27,[me.value==="confirm"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"btn-secondary",disabled:be.value,onClick:Pe},[...xe[19]||(xe[19]=[e$b.createElementVNode("svg",{class:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1),e$b.createTextVNode(" Voltar ",-1)])],8,_hoisted_28)):(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"btn-secondary",disabled:be.value,onClick:ze}," Cancelar ",8,_hoisted_29)),me.value==="select"?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,class:"btn-primary",disabled:!Me.value,onClick:Ne},[...xe[20]||(xe[20]=[e$b.createTextVNode(" Continuar ",-1),e$b.createElementVNode("svg",{class:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"})],-1)])],8,_hoisted_30)):(e$b.openBlock(),e$b.createElementBlock("button",{key:3,class:"btn-primary",disabled:!De.value,onClick:Be},[be.value?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[xe[21]||(xe[21]=e$b.createElementVNode("div",{class:"spinner spinner--sm spinner--white"},null,-1)),xe[22]||(xe[22]=e$b.createTextVNode(" Mesclando... ",-1))],64)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[xe[23]||(xe[23]=e$b.createElementVNode("svg",{class:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})],-1)),xe[24]||(xe[24]=e$b.createTextVNode(" Confirmar Mesclagem ",-1))],64))],8,_hoisted_31))])])])):e$b.createCommentVNode("",!0)]),_:1}))}},ContactMergeModal=_export_sfc$1(_sfc_main$19,[["__scopeId","data-v-d61138e7"]]),_hoisted_1$$={class:"modal-form-container-wrapper"},_hoisted_2$S={class:"modal_responsive"},_hoisted_3$N={style:{"min-height":"100%"},class:"flex min-h-full items-center justify-center text-center"},_hoisted_4$I={class:"modal-form-container"},_hoisted_5$C={class:"modal-form-header bg-base-300"},_hoisted_6$x={class:"flex items-center gap-2"},_hoisted_7$u={class:"flex flex-col items-start"},_hoisted_8$p={class:"text-lg"},_hoisted_9$m={key:0,class:"id-label-clients"},_hoisted_10$j={class:"flex items-center gap-2"},_hoisted_11$i=["disabled"],_hoisted_12$g={key:1,class:"w-full"},_hoisted_13$e={key:2,class:"modal-form-left-column-body"},_hoisted_14$d={class:"w-full"},_hoisted_15$b={class:"flex w-full flex-col gap-2"},_hoisted_16$a={class:"flex items-center justify-between px-1"},_hoisted_17$5={key:0,class:"flex size-full flex-col gap-2"},_hoisted_18$5={class:"flex items-center justify-between px-1"},_hoisted_19$4={class:"flex size-full min-h-0 flex-col rounded-lg bg-base-300"},_hoisted_20$4={key:3,class:"right-column bg-base-300"},_hoisted_21$3={key:0,class:"right-column bg-base-300"},_hoisted_22$1={class:"modal-form-end-button bg-base-300"},_hoisted_23=["disabled"],_hoisted_24={key:0,class:"size-4 animate-spin rounded-full border-4 border-solid border-t-transparent text-white"},_hoisted_25={key:1,class:"text-xs font-semibold"},_sfc_main$18={__name:"clientsForm",props:{form:{type:Object,default:()=>({tags:[],country:"BR",name:"",photo:null,raw_telephone:"",telephone:"",instagram_user_name:"",whatsapp_id:"",whatsapp_jid:"",whatsapp_lid:null,rating:null,outcome:null,created_at:"",updated_at:"",client:"",segmentation_fields:[],products:[],notes:"",blocked:!1})},save:{type:Function,default:()=>{}},hasCrmPlus:{type:Boolean,default:!1},canBlockContacts:{type:Boolean,default:!0},allProducts:{type:Object,default:()=>{}},allTags:{type:Object,default:()=>{}},departmentBypass:{type:String,default:""},currentAttendance:{type:Object,default:()=>null},supervisor:{type:Boolean,default:!1},canMergeContacts:{type:Boolean,default:!1},isDev:{type:Boolean,default:!1}},emits:["close","save","merge","photo-updated","photo-refresh"],setup(ee,{emit:te}){const ne=te,ae=e$b.ref("data"),re=ee,oe=e$b.reactive({...re.form}),ie=e$b.ref(!1),le=e$b.ref(!1),ce=e$b.ref(null),de=ze=>{oe.photo=ze,ne("photo-updated",{id:oe.id,photo:ze})},ue=e$b.ref([{title:"Nome",info:!1,type:"text",placeholder:"Digite o nome do contato",empty:e$b.computed(()=>le.value?le.value.some(ze=>ze.startsWith("name")):!1),data:e$b.computed({get:()=>oe.name,set:ze=>oe.name=ze})},{title:"Descrição",info:"Descreva o produto para facilitar a identificação",type:"textArea",placeholder:"Automatize fluxos de trabalho com integração rápida e segura entre sistemas.",empty:!1,data:e$b.computed({get:()=>oe.notes,set:ze=>oe.notes=ze})}]),ve=e$b.computed(()=>re.form.mode==="edit"?"Editar cliente":"Adicionar Novo Cliente"),me=ze=>{var Ne;const Ve=[];return(Ne=ze.name)!=null&&Ne.trim()||Ve.push("name"),Ve};e$b.computed(()=>le.value?le.value.some(ze=>ze.startsWith("telephone")):!1);const be=e$b.ref(!1),fe=e$b.computed(()=>re.canMergeContacts?oe.id?"ready":"missing-contact-id":"no-permission"),pe=e$b.computed(()=>fe.value==="ready"),_e=e$b.computed(()=>fe.value==="no-permission"?"Você não tem permissão para mesclar contatos.":fe.value==="missing-contact-id"?"Salve o contato para habilitar a mesclagem.":"Mescla contatos para unificar histórico e informações."),ge=()=>{const ze=fe.value==="no-permission";notiwind.notify({group:ze?"error":"info",title:ze?"Sem permissão":"Ação indisponível",text:ze?"Você não tem permissão para mesclar contatos.":"Salve o contato antes de iniciar a mesclagem."},3e3)},ke=()=>{if(!pe.value){ge();return}be.value=!0},$e=()=>{be.value=!1},ye=ze=>{ne("merge",{...ze,removedContactId:ze.childId}),$e()},Ee=async ze=>{var Ve;if(!pe.value)throw ge(),new Error("Fluxo de mesclagem bloqueado.");try{return(await api.post("/v1/api/contacts/contact/merge/",{contact_father:ze.parentId,contact_children:ze.childId,force:!0})).data}catch(Ne){throw console.error("Erro ao mesclar contatos:",Ne),((Ve=Ne.response)==null?void 0:Ve.data)||new Error("Ocorreu um erro ao mesclar os contatos.")}},Se=async()=>{try{if(ie.value=!0,le.value=me(oe),le.value.length>0)return;ce.value=JSON.parse(JSON.stringify(oe)),await re.save(ce.value)}catch(ze){console.error(ze)}finally{ie.value=!1}};e$b.watch(()=>re.form,ze=>{Object.assign(oe,e$b.toRaw(ze))},{immediate:!0});const Le=e$b.ref(window.innerWidth),Me=()=>{Le.value=window.innerWidth};e$b.onMounted(()=>{window.addEventListener("resize",Me)}),e$b.onUnmounted(()=>{window.removeEventListener("resize",Me)});const De=e$b.computed(()=>Le.value>=640);e$b.watch(De,(ze,Ve)=>{Ve?ae.value="contact":!Ve&&ze&&(ae.value="data")},{immediate:!0});const Oe=[{label:"Informações",value:"data"},{label:"Produtos",value:"products",disabled:re.form.status==="screening"||re.form.status==="finished",get disabledReason(){if(re.form.status==="screening")return"Este recurso não está disponível para conversas em leads.";if(re.form.status==="finished")return"Este recurso não está disponível para conversas finalizadas."}},{label:"Carteira",value:"wallet",disabled:!oe.id||re.form.status==="screening"||re.form.status==="finished",get disabledReason(){if(!oe.id)return"Salve o contato para habilitar a carteira.";if(re.form.status==="screening")return"Este recurso não está disponível para conversas em leads.";if(re.form.status==="finished")return"Este recurso não está disponível para conversas finalizadas."}}],Re=e$b.computed(()=>{const ze={label:"Contato",value:"contact"},Ve=Oe.filter(Ne=>Ne.value!=="contact");return re.hasCrmPlus?De.value?[...Ve]:[ze,...Ve]:[ze,...Ve.filter(Ne=>Ne.value!=="products"&&Ne.value!=="wallet")]});return(ze,Ve)=>{var Pe,Be,Ae;const Ne=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$$,[Ve[28]||(Ve[28]=e$b.createElementVNode("div",{class:"modal-form-background"},null,-1)),e$b.createElementVNode("div",_hoisted_2$S,[e$b.createElementVNode("div",_hoisted_3$N,[e$b.createElementVNode("div",_hoisted_4$I,[e$b.createElementVNode("div",{class:e$b.normalizeClass([{noCrmPlus:!ee.hasCrmPlus},"clients-form-background shadow-card relative rounded-2xl bg-base-200"])},[e$b.createElementVNode("div",_hoisted_5$C,[e$b.createElementVNode("span",_hoisted_6$x,[Ve[22]||(Ve[22]=e$b.createElementVNode("svg",{class:"size-6 text-green-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-4Z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_7$u,[e$b.createElementVNode("p",_hoisted_8$p,e$b.toDisplayString(ve.value),1),oe.id?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_9$m,"ID: "+e$b.toDisplayString(oe.id),1)):e$b.createCommentVNode("",!0)])]),e$b.createElementVNode("section",_hoisted_10$j,[e$b.createVNode(Ne,{hover:"",content:_e.value,placement:"bottom"},{default:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:e$b.normalizeClass(["inline-flex",{"cursor-not-allowed":!pe.value}])},[e$b.createElementVNode("button",{class:"button-merge-clients",disabled:!pe.value,onClick:ke}," Mesclar contatos ",8,_hoisted_11$i)],2)]),_:1},8,["content"]),e$b.createElementVNode("button",{class:"rounded-md bg-base-200 p-1.5 transition hover:bg-base-100",onClick:Ve[0]||(Ve[0]=xe=>ne("close"))},[...Ve[23]||(Ve[23]=[e$b.createElementVNode("svg",{class:"size-4 text-white dark:text-black","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)])])])]),e$b.createElementVNode("div",{class:e$b.normalizeClass([De.value?"grid grid-cols-2":"flex","modal-form-body"])},[e$b.createElementVNode("section",{class:e$b.normalizeClass([De.value?"p-2":"p-1.5","left-column"])},[De.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createBlock(ToggleListButtons,{key:0,modelValue:ae.value,"onUpdate:modelValue":Ve[1]||(Ve[1]=xe=>ae.value=xe),buttons:Re.value},null,8,["modelValue","buttons"])),De.value||ae.value==="contact"?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$g,[e$b.createVNode(ClientOverviewPanel,{"has-crm-plus":ee.hasCrmPlus,outcome:oe.outcome,rating:oe.rating,photo:oe.photo,name:oe.name,blocked:oe.blocked,"can-block-contacts":ee.canBlockContacts,"contact-id":oe.id,"onUpdate:outcome":Ve[2]||(Ve[2]=xe=>oe.outcome=xe),"onUpdate:rating":Ve[3]||(Ve[3]=xe=>oe.rating=xe),"onUpdate:blocked":Ve[4]||(Ve[4]=xe=>oe.blocked=xe),"onUpdate:photo":de,onPhotoRefresh:Ve[5]||(Ve[5]=xe=>ne("photo-refresh",xe))},null,8,["has-crm-plus","outcome","rating","photo","name","blocked","can-block-contacts","contact-id"])])):e$b.createCommentVNode("",!0),De.value||ae.value==="contact"?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$e,[e$b.createElementVNode("div",_hoisted_14$d,[e$b.createVNode(PrimaryInput,{content:ue.value[0],"onUpdate:content":Ve[6]||(Ve[6]=xe=>ue.value[0].data=xe.data)},null,8,["content"])]),e$b.createElementVNode("div",_hoisted_15$b,[e$b.createElementVNode("header",_hoisted_16$a,[Ve[25]||(Ve[25]=e$b.createElementVNode("p",{class:"text-left text-[13px] font-semibold"},"Escolha suas etiquetas",-1)),e$b.createVNode(Ne,{hover:"",content:"Etiquetas atribuídas ao cliente",placement:"top"},{default:e$b.withCtx(()=>[...Ve[24]||(Ve[24]=[e$b.createElementVNode("svg",{class:"size-4 text-white dark:text-black",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})],-1)])]),_:1})]),e$b.createVNode(SelectMultipleTags,{modelValue:oe.tags,"onUpdate:modelValue":Ve[7]||(Ve[7]=xe=>oe.tags=xe),overlay:!0,"all-tags":ee.allTags},null,8,["modelValue","all-tags"])]),ee.hasCrmPlus?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$5,[e$b.createElementVNode("header",_hoisted_18$5,[Ve[27]||(Ve[27]=e$b.createElementVNode("p",{class:"text-left text-[13px] font-semibold"},"Anotações sobre o cliente",-1)),e$b.createVNode(Ne,{hover:"",content:"Anotações adicionais sobre o cliente",placement:"top"},{default:e$b.withCtx(()=>[...Ve[26]||(Ve[26]=[e$b.createElementVNode("svg",{class:"size-4 text-white dark:text-black",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})],-1)])]),_:1})]),e$b.createElementVNode("div",_hoisted_19$4,[e$b.withDirectives(e$b.createElementVNode("textarea",{"onUpdate:modelValue":Ve[8]||(Ve[8]=xe=>oe.notes=xe),class:"form-text-area min-h-0 flex-1 bg-base-300",maxlength:"1000","aria-label":"Anotações do cliente"},null,512),[[e$b.vModelText,oe.notes]]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["mb-1 mr-1 rounded-md bg-base-300 px-1 text-right text-[10px]",((Pe=oe.notes)==null?void 0:Pe.length)>900?"text-red-500":((Be=oe.notes)==null?void 0:Be.length)>700?"text-yellow-500":"text-gray-400"])},e$b.toDisplayString(((Ae=oe.notes)==null?void 0:Ae.length)||0)+"/1000 ",3)])])):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0),!De.value&&ae.value!=="contact"?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_20$4,[e$b.createVNode(ContactSection,{"page-state":ae.value,"onUpdate:pageState":Ve[9]||(Ve[9]=xe=>ae.value=xe),telephone:oe.telephone,"onUpdate:telephone":Ve[10]||(Ve[10]=xe=>oe.telephone=xe),country:oe.country,"onUpdate:country":Ve[11]||(Ve[11]=xe=>oe.country=xe),"instagram-user-name":oe.instagram_user_name,"onUpdate:instagramUserName":Ve[12]||(Ve[12]=xe=>oe.instagram_user_name=xe),"segmentation-fields":oe.segmentation_fields,"onUpdate:segmentationFields":Ve[13]||(Ve[13]=xe=>oe.segmentation_fields=xe),products:oe.products,"onUpdate:products":Ve[14]||(Ve[14]=xe=>oe.products=xe),"view-contact-number":oe.viewContactNumber,"has-crm-plus":ee.hasCrmPlus,"handler-toggle-buttons":Re.value,"all-products":ee.allProducts,"department-bypass":ee.departmentBypass,"current-attendance":ee.currentAttendance,supervisor:re.supervisor,"is-large-screen":De.value,"contact-id":oe.id,contact:oe},null,8,["page-state","telephone","country","instagram-user-name","segmentation-fields","products","view-contact-number","has-crm-plus","handler-toggle-buttons","all-products","department-bypass","current-attendance","supervisor","is-large-screen","contact-id","contact"])])):e$b.createCommentVNode("",!0)],2),De.value?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_21$3,[e$b.createVNode(ContactSection,{"page-state":ae.value,"onUpdate:pageState":Ve[15]||(Ve[15]=xe=>ae.value=xe),telephone:oe.telephone,"onUpdate:telephone":Ve[16]||(Ve[16]=xe=>oe.telephone=xe),country:oe.country,"onUpdate:country":Ve[17]||(Ve[17]=xe=>oe.country=xe),"instagram-user-name":oe.instagram_user_name,"onUpdate:instagramUserName":Ve[18]||(Ve[18]=xe=>oe.instagram_user_name=xe),"segmentation-fields":oe.segmentation_fields,"onUpdate:segmentationFields":Ve[19]||(Ve[19]=xe=>oe.segmentation_fields=xe),products:oe.products,"onUpdate:products":Ve[20]||(Ve[20]=xe=>oe.products=xe),"view-contact-number":oe.viewContactNumber,"has-crm-plus":ee.hasCrmPlus,"handler-toggle-buttons":Re.value,"all-products":ee.allProducts,"department-bypass":ee.departmentBypass,"current-attendance":ee.currentAttendance,supervisor:re.supervisor,"is-large-screen":De.value,"contact-id":oe.id,contact:oe},null,8,["page-state","telephone","country","instagram-user-name","segmentation-fields","products","view-contact-number","has-crm-plus","handler-toggle-buttons","all-products","department-bypass","current-attendance","supervisor","is-large-screen","contact-id","contact"])])):e$b.createCommentVNode("",!0)],2),e$b.createElementVNode("div",_hoisted_22$1,[e$b.createElementVNode("button",{disabled:ie.value,class:"button-save-clients",onClick:Ve[21]||(Ve[21]=xe=>Se())},[ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_24)):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_25,"Salvar"))],8,_hoisted_23)]),e$b.createVNode(e$b.unref(ContactMergeModal),{"is-open":be.value,"current-contact":oe,"merge-contacts":Ee,onClose:$e,onMerged:ye},null,8,["is-open","current-contact"])],2)])])])])}}},ClientsForm=_export_sfc$1(_sfc_main$18,[["__scopeId","data-v-085f8937"]]),_hoisted_1$_={class:"sm-tag-list"},_hoisted_2$R={class:"sm-tag-list__popper-text"},_hoisted_3$M={class:"sm-tag-list__overflow"},_hoisted_4$H={key:1,class:"sm-tag-list__empty"},_sfc_main$17={__name:"TagList",props:{tags:{type:Array,default:()=>[]},max:{type:Number,default:0},size:{type:String,default:"sm"},variant:{type:String,default:"name"},removable:{type:Boolean,default:!1},maxWidth:{type:String,default:null},emptyText:{type:String,default:""}},emits:["remove"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.tags||[]),oe=e$b.computed(()=>ne.max>0?re.value.slice(0,ne.max):re.value),ie=e$b.computed(()=>Math.max(0,re.value.length-oe.value.length)),le=(ce,de)=>(ce==null?void 0:ce.id)??(ce==null?void 0:ce.name)??de;return(ce,de)=>{const ue=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$_,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(oe.value,(ve,me)=>(e$b.openBlock(),e$b.createBlock(ue,{key:le(ve,me),hover:"",arrow:"",placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("p",_hoisted_2$R,e$b.toDisplayString(ve.name),1)]),default:e$b.withCtx(()=>[e$b.createVNode(TagChip,{tag:ve,size:ee.size,variant:ee.variant,removable:ee.removable,"max-width":ee.maxWidth,onRemove:de[0]||(de[0]=be=>ae("remove",be))},null,8,["tag","size","variant","removable","max-width"])]),_:2},1024))),128)),ie.value?(e$b.openBlock(),e$b.createBlock(ue,{key:0,hover:"",arrow:"",placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("section",_hoisted_3$M,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.tags,(ve,me)=>(e$b.openBlock(),e$b.createBlock(TagChip,{key:le(ve,me),tag:ve,size:ee.size,"max-width":"12rem"},null,8,["tag","size"]))),128))])]),default:e$b.withCtx(()=>[e$b.createVNode(TagChip,{tag:{name:`+${ie.value}`},size:ee.size,"aria-label":"Mais etiquetas"},null,8,["tag","size"])]),_:1})):e$b.createCommentVNode("",!0),!re.value.length&&ee.emptyText?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$H,e$b.toDisplayString(ee.emptyText),1)):e$b.createCommentVNode("",!0)])}}},TagList=_export_sfc$1(_sfc_main$17,[["__scopeId","data-v-f7154dbb"]]),_sfc_main$16={__name:"tagView",props:{clients:{type:Object,required:!0}},setup(ee){const te=ee,ne=e$b.computed(()=>{var ae;return((ae=te.clients)==null?void 0:ae.tags)||[]});return(ae,re)=>(e$b.openBlock(),e$b.createBlock(TagList,{class:"justify-center",tags:ne.value,max:4,size:"xs",variant:"initial","empty-text":"-"},null,8,["tags"]))}},_sfc_main$15={__name:"floating-dev",setup(ee){const te=e$b.ref(!1),ne=e$b.ref({x:30,y:30}),ae=e$b.ref({x:0,y:0}),re=e$b.ref(!1),oe=e$b.ref(null),ie=e$b.ref(null),le=e$b.ref({vertical:"bottom",horizontal:"right"}),ce=e$b.computed(()=>({position:"fixed",left:`${ne.value.x}px`,top:`${ne.value.y}px`,zIndex:1e3,cursor:re.value?"grabbing":"grab"})),de=e$b.computed(()=>{const pe={position:"absolute",background:"#fff",borderRadius:"10px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2)",width:"280px",maxWidth:"90vw",zIndex:1001};return le.value.vertical==="top"?pe.bottom="60px":pe.top="60px",le.value.horizontal==="left"?pe.right="0":pe.left="0",pe});async function ue(){if(te.value){te.value=!1;return}te.value=!0,await e$b.nextTick(),ve()}function ve(){if(!oe.value||!ie.value)return;const pe=oe.value.getBoundingClientRect(),_e=ie.value.offsetWidth,ge=ie.value.offsetHeight,ke={top:pe.top,bottom:window.innerHeight-(pe.top+pe.height),left:pe.left,right:window.innerWidth-(pe.left+pe.width)};le.value.vertical=ke.bottom<ge&&ke.top>ge?"top":"bottom",le.value.horizontal=ke.right<_e&&ke.left>_e?"left":"right"}function me(pe){re.value=!0;const _e=pe.type.includes("touch")?pe.touches[0]:pe;ae.value={x:_e.clientX-ne.value.x,y:_e.clientY-ne.value.y},document.addEventListener("mousemove",be),document.addEventListener("mouseup",fe),document.addEventListener("touchmove",be),document.addEventListener("touchend",fe)}function be(pe){if(!re.value)return;const _e=pe.type.includes("touch")?pe.touches[0]:pe,ge=_e.clientX-ae.value.x,ke=_e.clientY-ae.value.y,$e=window.innerWidth-oe.value.offsetWidth,ye=window.innerHeight-oe.value.offsetHeight;ne.value.x=Math.min(Math.max(0,ge),$e),ne.value.y=Math.min(Math.max(0,ke),ye)}function fe(){re.value=!1,document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",fe),document.removeEventListener("touchmove",be),document.removeEventListener("touchend",fe)}return e$b.onBeforeUnmount(fe),(pe,_e)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:"floating-widget",style:e$b.normalizeStyle(ce.value),ref_key:"widgetRef",ref:oe,onMousedown:me,onTouchstart:me},[e$b.createElementVNode("button",{class:"floating-button",onClick:e$b.withModifiers(ue,["stop"]),"aria-label":"Abrir painel flutuante"},[..._e[0]||(_e[0]=[e$b.createElementVNode("svg",{class:"floating-button-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[e$b.createElementVNode("path",{d:"M370 378c28.89 23.52 46 46.07 46 86M142 378c-28.89 23.52-46 46.06-46 86M384 208c28.89-23.52 32-56.07 32-96M128 206c-28.89-23.52-32-54.06-32-94M464 288.13h-80M128 288.13H48M256 192v256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),e$b.createElementVNode("path",{d:"M256 448h0c-70.4 0-128-57.6-128-128v-96.07c0-65.07 57.6-96 128-96h0c70.4 0 128 25.6 128 96V320c0 70.4-57.6 128-128 128z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),e$b.createElementVNode("path",{d:"M179.43 143.52a49.08 49.08 0 01-3.43-15.73A80 80 0 01255.79 48h.42A80 80 0 01336 127.79a41.91 41.91 0 01-3.12 14.3",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"})],-1)])]),e$b.createVNode(e$b.Transition,{name:"fade"},{default:e$b.withCtx(()=>[te.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:"floating-panel",ref_key:"panelRef",ref:ie,style:e$b.normalizeStyle(de.value)},[e$b.renderSlot(pe.$slots,"default",{},()=>[_e[1]||(_e[1]=e$b.createElementVNode("p",{style:{"text-align":"center","font-size":"0.9rem"}}," Adicione seu conteúdo aqui 👇 ",-1))],!0)],4)):e$b.createCommentVNode("",!0)]),_:3})],36))}},FloatingDev=_export_sfc$1(_sfc_main$15,[["__scopeId","data-v-9a761c09"]]),_hoisted_1$Z={class:"unlock-hint"},_hoisted_2$Q={class:"flex items-center gap-2.5"},_hoisted_3$L={key:0,class:"grid shrink-0 place-items-center"},_hoisted_4$G={class:"min-w-0 flex-1"},_hoisted_5$B={class:"mt-1.5 text-[13px] font-bold leading-tight"},_hoisted_6$w={class:"requirement-block"},_hoisted_7$t={class:"block-label"},_hoisted_8$o={key:0,class:"mt-2"},_hoisted_9$l={class:"flex items-baseline justify-between text-[11px]"},_hoisted_10$i={class:"font-bold tabular-nums text-base-content/80"},_hoisted_11$h={key:0,class:"font-medium text-base-content/45"},_hoisted_12$f={class:"font-black tabular-nums text-base-content/55"},_hoisted_13$d=["aria-valuenow"],_hoisted_14$c={key:0,class:"mt-1 text-[10px] font-semibold text-base-content/45"},_hoisted_15$a={key:1,class:"mt-1.5 text-[11px] leading-snug text-base-content/55"},_hoisted_16$9={key:0,class:"flex flex-wrap items-center gap-1.5 text-[10px]"},_sfc_main$14={__name:"UnlockHint",props:{eyebrow:{type:String,default:""},eyebrowClass:{type:String,default:""},name:{type:String,default:""},blockLabel:{type:String,default:"Como desbloquear"},text:{type:String,default:""},textClass:{type:String,default:""},note:{type:String,default:""},unit:{type:String,default:""},progress:{type:Object,default:null},barClass:{type:String,default:""},pills:{type:Array,default:()=>[]},status:{type:Object,default:null}},setup(ee){function te(ne){return Number(ne).toLocaleString("pt-BR")}return(ne,ae)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$Z,[e$b.createElementVNode("header",_hoisted_2$Q,[ne.$slots.piece?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$L,[e$b.renderSlot(ne.$slots,"piece",{},void 0,!0)])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_4$G,[ee.eyebrow?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["block text-[9px] font-black uppercase leading-none tracking-[0.12em]",ee.eyebrowClass||"text-base-content/55"])},e$b.toDisplayString(ee.eyebrow),3)):e$b.createCommentVNode("",!0),e$b.renderSlot(ne.$slots,"name",{},()=>[e$b.createElementVNode("p",_hoisted_5$B,e$b.toDisplayString(ee.name),1)],!0)])]),e$b.createElementVNode("section",_hoisted_6$w,[e$b.createElementVNode("p",_hoisted_7$t,e$b.toDisplayString(ee.blockLabel),1),e$b.renderSlot(ne.$slots,"requirement",{},()=>[e$b.createElementVNode("p",{class:e$b.normalizeClass(["requirement-text",ee.textClass])},e$b.toDisplayString(ee.text),3)],!0),ee.progress?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_8$o,[e$b.createElementVNode("div",_hoisted_9$l,[e$b.createElementVNode("span",_hoisted_10$i,[e$b.createTextVNode(e$b.toDisplayString(te(ee.progress.current))+" / "+e$b.toDisplayString(te(ee.progress.target))+" ",1),ee.unit?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_11$h,e$b.toDisplayString(ee.unit),1)):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("span",_hoisted_12$f,e$b.toDisplayString(ee.progress.pct)+"%",1)]),e$b.createElementVNode("div",{class:"progress-track",role:"progressbar","aria-valuenow":ee.progress.pct,"aria-valuemin":"0","aria-valuemax":"100"},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["progress-fill smplay-blocks",ee.barClass||"progress-fill--default"]),style:e$b.normalizeStyle({width:`${ee.progress.pct}%`})},null,6)],8,_hoisted_13$d),ee.progress.remaining?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_14$c," Faltam "+e$b.toDisplayString(te(ee.progress.remaining))+" "+e$b.toDisplayString(ee.unit),1)):e$b.createCommentVNode("",!0)])):ee.note?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_15$a,e$b.toDisplayString(ee.note),1)):e$b.createCommentVNode("",!0)]),ee.pills.length||ee.status?(e$b.openBlock(),e$b.createElementBlock("footer",_hoisted_16$9,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.pills,re=>(e$b.openBlock(),e$b.createElementBlock("span",{key:re.label,class:e$b.normalizeClass(["foot-pill",re.class])},e$b.toDisplayString(re.label),3))),128)),ee.status?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["ml-auto inline-flex items-center gap-1 font-bold",ee.status.class||"text-base-content/45"])},[ae[0]||(ae[0]=e$b.createElementVNode("span",{class:"status-dot","aria-hidden":"true"},null,-1)),e$b.createTextVNode(" "+e$b.toDisplayString(ee.status.label),1)],2)):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0)]))}},UnlockHint=_export_sfc$1(_sfc_main$14,[["__scopeId","data-v-d3868b77"]]),_sfc_main$13={__name:"AchievementRequirements",props:{achievement:{type:Object,required:!0},unlocked:{type:Boolean,default:!1},unlockedAt:{type:[String,Number,Date],default:null},secretHidden:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>RARITIES[te.achievement.rarity]||RARITIES.common),ae=e$b.computed(()=>te.achievement.rarity==="secret"),re=e$b.computed(()=>te.secretHidden||ae.value?null:describeAchievementRequirement(te.achievement)),oe=e$b.computed(()=>{var be;return te.unlocked?null:((be=re.value)==null?void 0:be.progress)??null}),ie=e$b.computed(()=>{var be;return!te.unlocked&&((be=re.value)==null?void 0:be.scope)==="season"}),le=e$b.computed(()=>{const be=Number(te.achievement.xp);return Number.isFinite(be)&&be>0?be:null}),ce=e$b.computed(()=>{if(!te.unlockedAt)return"";const be=new Date(te.unlockedAt);return Number.isNaN(be.getTime())?"":be.toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})}),de=e$b.computed(()=>re.value?re.value.text:ae.value?te.achievement.hint?`"${te.achievement.hint}"`:"Sem dica.":te.achievement.description||"Requisito não revelado."),ue=e$b.computed(()=>re.value?"":ae.value?"italic":te.achievement.description?"":"text-base-content/55"),ve=e$b.computed(()=>{const be=[];return le.value&&be.push({label:`+${le.value.toLocaleString("pt-BR")} XP`,class:"font-black tracking-[0.02em] text-warning"}),ie.value&&be.push({label:re.value.scopeLabel,class:"font-bold tracking-[0.02em] text-warning"}),be}),me=e$b.computed(()=>te.unlocked?{label:ce.value?`Desbloqueada em ${ce.value}`:"Desbloqueada",class:"text-success"}:null);return(be,fe)=>{var pe;return e$b.openBlock(),e$b.createBlock(UnlockHint,{class:"achievement-requirements",eyebrow:ee.secretHidden?"Desconhecida":ne.value.label,"eyebrow-class":ee.secretHidden?"":ne.value.text,name:ee.secretHidden?"???":ee.achievement.name||"Sem nome","block-label":ae.value?"Dica":"Como desbloquear",text:de.value,"text-class":ue.value,unit:((pe=re.value)==null?void 0:pe.unit)||"",progress:oe.value,"bar-class":`${ne.value.bar} bg-gradient-to-r`,pills:ve.value,status:me.value},{piece:e$b.withCtx(()=>[e$b.createVNode(AchievementBadge,{achievement:ee.achievement,size:"md","secret-hidden":ee.secretHidden},null,8,["achievement","secret-hidden"])]),_:1},8,["eyebrow","eyebrow-class","name","block-label","text","text-class","unit","progress","bar-class","pills","status"])}}};function holdersCount(ee){if(ee==null||ee==="")return null;const te=Number(ee);return Number.isFinite(te)&&te>=0?Math.trunc(te):null}function holdersLabel(ee){const te=holdersCount(ee);return te===null?"":te===0?"Ninguém possui":`${te.toLocaleString("pt-BR")} ${te===1?"possui":"possuem"}`}const _hoisted_1$Y=["title"],_hoisted_2$P={class:"truncate"},_sfc_main$12={__name:"HoldersCount",props:{count:{type:[Number,String],default:null},iconClass:{type:String,default:"size-3.5"}},setup(ee){const te=ee,ne=e$b.computed(()=>holdersLabel(te.count));return(ae,re)=>ne.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"holders-count inline-flex items-center gap-1 text-base-content/50",title:`${ne.value} este item`},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["shrink-0",ee.iconClass]),fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},[...re[0]||(re[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H6Zm7.25-2.095c.478-.86.75-1.85.75-2.905a5.973 5.973 0 0 0-.75-2.906 4 4 0 1 1 0 5.811ZM15.466 20c.34-.588.535-1.271.535-2v-1a5.978 5.978 0 0 0-1.528-4H18a4 4 0 0 1 4 4v1a2 2 0 0 1-2 2h-4.535Z"},null,-1)])],2)),e$b.createElementVNode("span",_hoisted_2$P,e$b.toDisplayString(ne.value),1)],8,_hoisted_1$Y)):e$b.createCommentVNode("",!0)}},ownerId=e$b.ref(null),open=e$b.ref(!1),panelStyle=e$b.ref({}),placement=e$b.ref("top");let openTimer=null,closeTimer=null,releaseTimer=null,seq=0;const DEFAULTS={width:330,estimatedHeight:250,gap:8,viewportPadding:8};function place(ee,te){const ne=ee==null?void 0:ee.getBoundingClientRect();if(!ne)return;const ae=e$b.unref(te.viewportPadding??DEFAULTS.viewportPadding),re=Math.min(e$b.unref(te.width??DEFAULTS.width),window.innerWidth-ae*2),oe=e$b.unref(te.gap??DEFAULTS.gap),ie=window.innerWidth-re-ae,le=Math.max(ae,Math.min(ne.left+ne.width/2-re/2,ie)),ce=ne.top>=e$b.unref(te.estimatedHeight??DEFAULTS.estimatedHeight)+oe+ae;placement.value=ce?"top":"bottom",panelStyle.value={left:`${le}px`,width:`${re}px`,...ce?{bottom:`${window.innerHeight-ne.top+oe}px`}:{top:`${ne.bottom+oe}px`}},open.value=!0}function clearTimers(){window.clearTimeout(openTimer),window.clearTimeout(closeTimer),window.clearTimeout(releaseTimer),openTimer=closeTimer=releaseTimer=null}function useHoverPanel(ee={}){const{enabled:te=!0,delay:ne=240,closeDelay:ae=110,leaveDuration:re=180}=ee,oe=++seq,ie=e$b.ref(null),le=e$b.computed(()=>ownerId.value===oe),ce=e$b.computed(()=>ownerId.value===oe&&open.value);function de(){e$b.unref(te)&&(clearTimers(),!(ownerId.value===oe&&open.value)&&(ownerId.value=oe,open.value=!1,openTimer=window.setTimeout(()=>{openTimer=null,place(ie.value,ee)},Math.max(0,e$b.unref(ne)))))}function ue(){if(ownerId.value===oe){if(window.clearTimeout(openTimer),openTimer=null,!open.value){ownerId.value=null;return}window.clearTimeout(closeTimer),closeTimer=window.setTimeout(()=>{open.value=!1,releaseTimer=window.setTimeout(()=>{ownerId.value===oe&&(ownerId.value=null)},re)},e$b.unref(ae))}}function ve(){ownerId.value===oe&&(clearTimers(),open.value=!1,ownerId.value=null)}return e$b.onBeforeUnmount(ve),{triggerRef:ie,mounted:le,open:ce,panelStyle,placement,scheduleOpen:de,scheduleClose:ue,closeNow:ve}}const _hoisted_1$X={class:"relative flex items-start gap-2.5"},_hoisted_2$O={class:"min-w-0 flex-1"},_hoisted_3$K={key:0,class:"mb-0.5 flex items-center gap-1.5"},_hoisted_4$F={class:"truncate text-[14px] font-medium leading-tight tracking-[-0.015em] text-base-content"},_hoisted_5$A=["title"],_hoisted_6$v=["aria-label"],_hoisted_7$s=["title"],_hoisted_8$n={class:"meta-row relative mt-2 border-t pt-2"},_hoisted_9$k={class:"flex flex-wrap items-center gap-1.5 text-[11px]"},_hoisted_10$h={key:0,class:"xp-pill bg-warning/10 text-warning inline-flex items-center rounded-md px-1.5 py-1 font-black tracking-[0.02em]"},_hoisted_11$g=["disabled","aria-pressed","aria-label"],_hoisted_12$e={key:0,class:"size-3.5 animate-spin",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true"},_hoisted_13$c={key:1,class:"size-3.5",fill:"none",stroke:"currentColor","stroke-width":"2.6",viewBox:"0 0 24 24","aria-hidden":"true"},_hoisted_14$b={key:2,class:"size-3.5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},_hoisted_15$9={key:3,class:"state-label text-success ml-auto inline-flex items-center gap-1"},_hoisted_16$8={key:4,class:"state-label text-success ml-auto inline-flex items-center gap-1"},_hoisted_17$4={key:5,class:"state-label ml-auto inline-flex items-center gap-1 text-base-content/50"},_hoisted_18$4={class:"sm-hover-panel-face"},_sfc_main$11={__name:"AchievementCard",props:{achievement:{type:Object,required:!0},mode:{type:String,default:"catalog"},unlocked:{type:Boolean,default:!1},unlockedAt:{type:[String,Number,Date],default:null},removable:{type:Boolean,default:!1},equippable:{type:Boolean,default:!1},equipped:{type:Boolean,default:!1},equipping:{type:Boolean,default:!1},hoverRequirements:{type:Boolean,default:!1},hoverDelay:{type:Number,default:240}},emits:["remove","equip"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>RARITIES[ne.achievement.rarity]||RARITIES.common),oe=e$b.computed(()=>ne.mode==="attendant"),ie=e$b.computed(()=>oe.value&&!ne.unlocked),le=e$b.computed(()=>ne.equippable&&oe.value&&ne.unlocked);function ce(){ne.equipping||ae("equip",ne.equipped?null:ne.achievement.id)}const de=e$b.computed(()=>ne.achievement.rarity==="secret"),ue=e$b.computed(()=>ie.value&&de.value),ve=e$b.computed(()=>ue.value?"???":ne.achievement.name||"Sem nome"),me=e$b.computed(()=>de.value),be=e$b.computed(()=>ne.mode==="catalog"&&ne.achievement.status===!1),fe=e$b.computed(()=>`rarity-${ne.achievement.rarity||"common"}`),pe=e$b.computed(()=>{const{accentRgb:Pe,glow:Be}=re.value;return Pe?{"--rarity":Pe,"--rarity-glow":Be}:{}}),_e=e$b.computed(()=>{const Pe=re.value.accentRgb;return Pe?{"--panel-accent":`rgb(${Pe})`}:{}}),ge=e$b.computed(()=>ne.achievement.status===!1);function ke(Pe){return Number(Pe).toLocaleString("pt-BR")}const $e=e$b.computed(()=>ne.mode==="catalog"&&holdersCount(ne.achievement.holders)!==null),ye=e$b.computed(()=>ne.hoverRequirements),Ee=e$b.computed(()=>ne.hoverDelay),{triggerRef:Se,mounted:Le,open:Me,panelStyle:De,placement:Oe,scheduleOpen:Re,scheduleClose:ze,closeNow:Ve}=useHoverPanel({enabled:ye,delay:Ee}),Ne=e$b.computed(()=>{if(!ne.unlockedAt)return"";const Pe=new Date(ne.unlockedAt);return Number.isNaN(Pe.getTime())?"":Pe.toLocaleDateString("pt-BR",{day:"2-digit",month:"short",year:"numeric"})});return(Pe,Be)=>(e$b.openBlock(),e$b.createElementBlock("article",{ref_key:"triggerRef",ref:Se,class:e$b.normalizeClass([[fe.value,{"is-locked":ie.value,"is-inactive":ge.value,"is-equipped":ee.equipped}],"plate achievement-card relative flex flex-col p-2.5"]),style:e$b.normalizeStyle(pe.value),onMouseenter:Be[3]||(Be[3]=(...Ae)=>e$b.unref(Re)&&e$b.unref(Re)(...Ae)),onMouseleave:Be[4]||(Be[4]=(...Ae)=>e$b.unref(ze)&&e$b.unref(ze)(...Ae)),onClick:Be[5]||(Be[5]=(...Ae)=>e$b.unref(Ve)&&e$b.unref(Ve)(...Ae))},[e$b.createElementVNode("div",_hoisted_1$X,[e$b.createVNode(AchievementBadge,{achievement:ee.achievement,size:"md","secret-hidden":ue.value},null,8,["achievement","secret-hidden"]),e$b.createElementVNode("div",_hoisted_2$O,[be.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_3$K,[...Be[6]||(Be[6]=[e$b.createElementVNode("span",{class:"rarity-chip shrink-0 rounded-full bg-base-200 px-1.5 py-0.5 text-[9px] font-black uppercase tracking-[0.12em] text-base-content/50"}," Inativa ",-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_4$F,e$b.toDisplayString(ve.value),1),de.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("p",{key:1,class:"mt-0.5 truncate text-[11px] leading-snug text-base-content/60",title:ee.achievement.description},e$b.toDisplayString(ee.achievement.description||"Descreva como desbloquear"),9,_hoisted_5$A))]),ee.removable&&ee.mode==="catalog"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,type:"button",class:"remove-button hover:bg-error/10 hover:text-error focus-visible:outline-error -mr-1 -mt-1 flex size-7 shrink-0 items-center justify-center rounded-lg text-base-content/40 transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","aria-label":`Excluir conquista ${ee.achievement.name}`,onClick:Be[0]||(Be[0]=Ae=>ae("remove",ee.achievement.id))},[...Be[7]||(Be[7]=[e$b.createElementVNode("svg",{class:"size-3.5",fill:"none",stroke:"currentColor","stroke-width":"2.2",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"stroke-linecap":"round",d:"M6 6l12 12M18 6 6 18"})],-1)])],8,_hoisted_6$v)):e$b.createCommentVNode("",!0)]),me.value?(e$b.openBlock(),e$b.createElementBlock("p",{key:0,class:"hint-row relative mt-1.5 truncate px-1.5 py-1 text-[11px] italic leading-tight text-base-content/55",title:`Dica: ${ee.achievement.hint}`},' Dica: "'+e$b.toDisplayString(ee.achievement.hint||"...")+'" ',9,_hoisted_7$s)):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_8$n,[e$b.createElementVNode("div",_hoisted_9$k,[ue.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_10$h," +"+e$b.toDisplayString(ke(ee.achievement.xp))+" XP ",1)),$e.value?(e$b.openBlock(),e$b.createBlock(_sfc_main$12,{key:1,count:ee.achievement.holders,class:"state-label ml-auto"},null,8,["count"])):e$b.createCommentVNode("",!0),le.value?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,type:"button",disabled:ee.equipping,"aria-pressed":ee.equipped,"aria-label":ee.equipped?`Remover destaque de ${ee.achievement.name}`:`Destacar ${ee.achievement.name}`,class:e$b.normalizeClass(["equip-button ml-auto inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11px] font-bold uppercase tracking-[0.04em] ring-1 transition disabled:cursor-wait disabled:opacity-70",ee.equipped?"bg-primary/15 text-primary ring-primary/30":"bg-base-200/70 text-base-content/60 ring-transparent hover:bg-primary/10 hover:text-primary"]),onClick:ce},[ee.equipping?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$e,[...Be[8]||(Be[8]=[e$b.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e$b.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4Z"},null,-1)])])):ee.equipped?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$c,[...Be[9]||(Be[9]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5 13 4 4L19 7"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_14$b,[...Be[10]||(Be[10]=[e$b.createElementVNode("path",{d:"M12 2.5l2.6 5.9 6.4.6-4.8 4.3 1.4 6.3L12 16.9 6.4 19.6l1.4-6.3L3 9l6.4-.6L12 2.5Z"},null,-1)])])),e$b.createTextVNode(" "+e$b.toDisplayString(ee.equipping?"...":ee.equipped?"Destacado":"Destacar"),1)],10,_hoisted_11$g)):Ne.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_15$9,[Be[11]||(Be[11]=e$b.createElementVNode("span",{class:"status-dot","aria-hidden":"true"},null,-1)),e$b.createTextVNode(" "+e$b.toDisplayString(Ne.value),1)])):ee.unlocked?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$8,[...Be[12]||(Be[12]=[e$b.createElementVNode("span",{class:"status-dot","aria-hidden":"true"},null,-1),e$b.createTextVNode(" Desbloqueada",-1)])])):ie.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_17$4,[...Be[13]||(Be[13]=[e$b.createElementVNode("svg",{class:"size-3",fill:"none",stroke:"currentColor","stroke-width":"2.2",viewBox:"0 0 24 24","aria-hidden":"true"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 10V7a5 5 0 0 1 10 0v3M6 10h12v10H6V10Z"})],-1),e$b.createTextVNode(" Bloqueada ",-1)])])):e$b.createCommentVNode("",!0)])]),e$b.unref(Le)?(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{key:1,to:"body"},[e$b.createVNode(e$b.Transition,{name:"sm-hover-panel"},{default:e$b.withCtx(()=>[e$b.unref(Me)?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["sm-hover-panel achievement-hint",`sm-hover-panel--${e$b.unref(Oe)}`]),style:e$b.normalizeStyle([e$b.unref(De),_e.value]),onMouseenter:Be[1]||(Be[1]=(...Ae)=>e$b.unref(Re)&&e$b.unref(Re)(...Ae)),onMouseleave:Be[2]||(Be[2]=(...Ae)=>e$b.unref(ze)&&e$b.unref(ze)(...Ae))},[e$b.createElementVNode("div",_hoisted_18$4,[e$b.createVNode(_sfc_main$13,{achievement:ee.achievement,unlocked:ee.unlocked,"unlocked-at":ee.unlockedAt,"secret-hidden":ue.value},null,8,["achievement","unlocked","unlocked-at","secret-hidden"])])],38)):e$b.createCommentVNode("",!0)]),_:1})])):e$b.createCommentVNode("",!0)],38))}},AchievementCard=_export_sfc$1(_sfc_main$11,[["__scopeId","data-v-ff831b67"]]);pinia.defineStore("debug",{state:()=>({message:"Debug store initialized"}),actions:{logMessage(){console.log(this.message)}}});let sdkLoaded$1=!1,sdkLoadPromise$1=null,sdkFailed=!1;const TOKEN_TIMEOUT_MS=5e3;function timeoutAfter(ee){return new Promise((te,ne)=>setTimeout(()=>ne(new Error("timeout")),ee))}function invalidateSdk(ee){sdkLoaded$1=!1,sdkFailed=!0,ee&&console.warn("AWS WAF SDK indisponivel:",ee)}async function requestToken(){try{return await Promise.race([window.AwsWafIntegration.getToken(),timeoutAfter(TOKEN_TIMEOUT_MS)])||""}catch{return""}}function useAwsWafSdk({integrationUrl:ee,apiKey:te}){return console.log("Iniciando integração com AWS WAF SDK"),{name:"aws-waf",async loadSdk(){if(!(sdkFailed||sdkLoaded$1||!ee))return sdkLoadPromise$1||(sdkLoadPromise$1=new Promise(ne=>{const ae=document.createElement("script");ae.src=`${ee}/jsapi.js`,ae.defer=!0,ae.onload=()=>{console.log("AWS WAF SDK carregado com sucesso"),sdkLoaded$1=!0,ne()},ae.onerror=re=>{console.log("Erro ao carregar AWS WAF SDK:",re),invalidateSdk(re),ne()},document.head.appendChild(ae)}),sdkLoadPromise$1)},async getInvisibleToken(){var ne;return sdkFailed||typeof((ne=window.AwsWafIntegration)==null?void 0:ne.getToken)!="function"?"":await requestToken()},renderCaptcha(ne,{onSuccess:ae,onError:re}){var ie;if(sdkFailed){re(new Error("AWS WAF SDK indisponível (bloqueado pelo navegador)"));return}const oe=document.getElementById(ne);if(!oe||typeof((ie=window.AwsWafCaptcha)==null?void 0:ie.renderCaptcha)!="function"){invalidateSdk("AWS WAF captcha indisponivel para renderizacao"),re(new Error("AWS WAF captcha indisponível para renderização"));return}oe.innerHTML="";try{window.AwsWafCaptcha.renderCaptcha(oe,{apiKey:te,onSuccess:(...le)=>{ae(...le)},onError:le=>{invalidateSdk(le),re(le)},dynamicWidth:!1,disableLanguageSelector:!0,skipTitle:!0})}catch(le){invalidateSdk(le),re(le)}},isReady:()=>sdkLoaded$1&&!sdkFailed}}let sdkLoaded=!1,sdkLoadPromise=null,invisibleWidgetId=null;function useGoogleSdk({siteKey:ee,siteKeyVisible:te}={}){console.log("Iniciando integração com Google reCAPTCHA SDK");const ne=()=>{var ae;return(ae=window.grecaptcha)==null?void 0:ae.enterprise};return{name:"google-recaptcha",async loadSdk(){if(!(sdkLoaded||!ee))return sdkLoadPromise||(sdkLoadPromise=new Promise(ae=>{const re=document.createElement("script");re.src="https://www.google.com/recaptcha/enterprise.js?render=explicit",re.defer=!0,re.onload=()=>{window.grecaptcha.enterprise.ready(()=>{const oe=document.createElement("div");oe.id="__recaptcha_invisible",oe.style.display="none",document.body.appendChild(oe),invisibleWidgetId=window.grecaptcha.enterprise.render(oe,{sitekey:ee,size:"invisible"}),console.log("Google reCAPTCHA SDK carregado com sucesso"),sdkLoaded=!0,ae()})},re.onerror=oe=>{console.log("Erro ao carregar o Google reCAPTCHA SDK:",oe),sdkLoadPromise=null,ae()},document.head.appendChild(re)}),sdkLoadPromise)},async getInvisibleToken(){const ae=ne();if(!ae||!ee)return"";try{return await ae.execute(invisibleWidgetId,{action:"login"})}catch{return""}},renderCaptcha(ae,{onSuccess:re,onError:oe}){const ie=ne(),le=document.getElementById(ae);if(!le||!ie){oe(new Error("Google reCAPTCHA indisponível para renderização"));return}le.innerHTML="";const ce=te||ee;try{ie.render(le,{sitekey:ce,callback:re,"error-callback":oe})}catch(de){oe(de)}},isReady:()=>sdkLoaded}}const sdkInitializers={awswaf:ee=>useAwsWafSdk(ee),"aws-waf":ee=>useAwsWafSdk(ee),google:ee=>useGoogleSdk(ee),"google-recaptcha":ee=>useGoogleSdk(ee)};let _activeProvider=null;function setupSdkConfig({provider:ee,...te}){const ne=String(ee||"").trim().toLowerCase(),ae=sdkInitializers[ne];if(!ae){console.error("Provedor de SDK não suportado:",ee),_activeProvider=null;return}_activeProvider=ae(te)}function getActiveProvider(){return _activeProvider}const DELAY_MAP={1:0,2:0,3:1e3,4:3e3,5:5e3},MAX_DELAY=5e3;function useCaptchaProtection(){const ee=e$b.ref(0),te=e$b.ref(""),ne=e$b.ref(!1),ae=e$b.ref(0),re=e$b.ref(!1),oe=e$b.ref(!1),ie=e$b.ref(!1),le=e$b.ref(!1);let ce=null;const de=e$b.computed(()=>DELAY_MAP[ee.value]??MAX_DELAY),ue=e$b.computed(()=>!!_activeProvider&&le.value);async function ve(){_activeProvider&&(await _activeProvider.loadSdk(),le.value=_activeProvider.isReady())}async function me(){if(!_activeProvider)return"";await ve();try{const ke=await _activeProvider.getInvisibleToken();return le.value=_activeProvider.isReady()&&!!ke,te.value=ke,ke}catch(ke){return le.value=!1,console.warn("[Captcha] Falha ao obter token invisível:",ke),""}}function be(ke){return new Promise(async($e,ye)=>{if(!_activeProvider){ye(new Error("Captcha provider não configurado"));return}if(await ve(),!_activeProvider.isReady()){ye(new Error("Captcha SDK não está pronto"));return}_activeProvider.renderCaptcha(ke,{onSuccess:Ee=>{if(le.value=_activeProvider.isReady(),!Ee){ye(new Error("Captcha retornou token vazio"));return}te.value=Ee,re.value=!0,$e(Ee)},onError:Ee=>{le.value=_activeProvider.isReady(),ye(Ee)}})})}function fe(ke,{requiresVisibleCaptcha:$e=!1,userBlocked:ye=!1}={}){ee.value=ke,re.value=!1,oe.value=$e,ie.value=ye;const Ee=de.value;Ee>0&&_e(Ee)}function pe(){ee.value=0,re.value=!1,oe.value=!1,ie.value=!1,ne.value=!1,ae.value=0,ce&&(clearInterval(ce),ce=null)}function _e(ke){ne.value=!0,ae.value=Math.ceil(ke/1e3),ce&&clearInterval(ce),ce=setInterval(()=>{ae.value--,ae.value<=0&&(ne.value=!1,ce&&(clearInterval(ce),ce=null))},1e3)}function ge(){ce&&(clearInterval(ce),ce=null)}return{attempts:e$b.readonly(ee),captchaToken:e$b.readonly(te),isDelayActive:e$b.readonly(ne),delayRemaining:e$b.readonly(ae),captchaSolved:e$b.readonly(re),sdkReady:e$b.readonly(le),isUserBlocked:e$b.readonly(ie),requiredDelay:de,captchaEnabled:ue,loadSdk:ve,getInvisibleToken:me,renderVisibleCaptcha:be,setAttempts:fe,resetOnSuccess:pe,cleanup:ge}}const v$2="5.12.1",fr=30,ip=0,op=90,w$2=500,h$2=500,nm="Error",ddd=0,assets=[],layers=[{ddd:0,ind:1,ty:3,nm:"Ctrl-X",sr:1,ks:{o:{a:0,k:0,ix:11},r:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[-90]},{t:35,s:[0]}],ix:10,x:`var $bm_rt;
|
|
223
|
+
</svg>`,info:ne.content.info??"Nome que será atribuído no Produto",type:ne.content.type??"text",placeholder:ne.content.placeholder??"Integração de sistemas",empty:ne.content.empty??!1,data:ne.content.data??"",currency:ne.content.currency??"BRL"}),oe=e$b.ref(re.data);e$b.watch(oe,ce=>{ae("update:content",{...re,data:ce})},{immediate:!0,deep:!0}),e$b.watch(()=>ne.content,ce=>{ce.data!==oe.value&&(oe.value=ce.data),ce.empty!==re.empty&&(re.empty=ce.empty),ce.currency!==re.currency&&(re.currency=ce.currency)},{deep:!0});const ie=e$b.computed(()=>re.empty&&!oe.value),le=e$b.computed(()=>re.type==="number");return(ce,de)=>{const ue=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$1t,[e$b.createElementVNode("header",_hoisted_2$1g,[e$b.createElementVNode("p",_hoisted_3$17,e$b.toDisplayString(re.title),1),re.info?(e$b.openBlock(),e$b.createBlock(ue,{key:0,hover:"",content:re.info,placement:"top",arrow:""},{default:e$b.withCtx(()=>[...de[2]||(de[2]=[e$b.createElementVNode("svg",{class:"size-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})],-1)])]),_:1},8,["content"])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["input__container bg-base-300",ie.value?"input__container--error":"",re.type==="textArea"?"textArea":"",le.value?"input__container--with-prefix":""])},[re.type!=="textArea"&&!le.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(ie.value?"text-red-500":"text-current opacity-70"),innerHTML:re.svg},null,10,_hoisted_4$11)):e$b.createCommentVNode("",!0),le.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$V,[e$b.createVNode(CurrencyDisplay,{currency:re.currency,symbolOnly:""},null,8,["currency"])])):e$b.createCommentVNode("",!0),re.type!=="textArea"?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("input",{type:re.type,key:re.type,placeholder:re.placeholder,"onUpdate:modelValue":de[0]||(de[0]=ve=>oe.value=ve),class:e$b.normalizeClass([ie.value?"empty":null,"input__field bg-base-300"])},null,10,_hoisted_6$O)),[[e$b.vModelDynamic,oe.value]]):e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("textarea",{key:3,class:e$b.normalizeClass([ie.value?"empty":null,"input__field bg-base-300 h-full resize-y"]),"onUpdate:modelValue":de[1]||(de[1]=ve=>oe.value=ve),placeholder:re.placeholder},null,10,_hoisted_7$K)),[[e$b.vModelText,oe.value]]),ie.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$E," Campo obrigatório ")):e$b.createCommentVNode("",!0)],2)])}}},PrimaryInput=_export_sfc$1(_sfc_main$1D,[["__scopeId","data-v-45b32dec"]]),_hoisted_1$1s=["innerHTML"],_hoisted_2$1f=["innerHTML"],_hoisted_3$16={class:"text-text-text-base"},_hoisted_4$10=["onClick"],_hoisted_5$U={class:"flex items-center gap-2"},_hoisted_6$N=["innerHTML"],_hoisted_7$J={class:"text-text-base"},_hoisted_8$D={key:0,xmlns:"http://www.w3.org/2000/svg",class:"size-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_hoisted_9$A=["onClick"],_hoisted_10$x={class:"flex items-center gap-2"},_hoisted_11$u=["innerHTML"],_hoisted_12$s={class:"text-text-base"},_hoisted_13$o={key:0,xmlns:"http://www.w3.org/2000/svg",class:"size-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_hoisted_14$n=["onClick"],_hoisted_15$l={class:"flex items-center gap-2"},_hoisted_16$i=["innerHTML"],_hoisted_17$c={class:"text-text-base"},_hoisted_18$c={key:0,xmlns:"http://www.w3.org/2000/svg",class:"size-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_sfc_main$1C={__name:"simpleSelect",props:{modelValue:{type:[Array,String,Number,Object],default:()=>[]},options:{type:Array,required:!0,default:()=>[]},placeholder:{type:String,default:"Selecione uma opção..."},multiple:{type:Boolean,default:!1},theme:{type:String,default:"bg-base-300 border-base-300"},teleportTo:{type:String,default:null},overlay:{type:Boolean,default:!1},icon:{type:[String,Object],default:null},iconPlaceholder:{type:[String,Object],default:null}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.ref(null),ie=e$b.ref(null),le=e$b.ref(null),ce=e$b.ref({}),de=$e=>{var Ee,Se;if(!re.value)return;const ye=$e.target;(Ee=oe.value)!=null&&Ee.contains(ye)||(Se=ie.value)!=null&&Se.contains(ye)||(re.value=!1)},ue=$e=>{let ye=($e==null?void 0:$e.parentElement)||null;for(;ye&&ye!==document.body&&ye!==document.documentElement;){const Ee=window.getComputedStyle(ye),Se=Ee.willChange||"";if(Ee.transform!=="none"||Ee.perspective!=="none"||Ee.filter!=="none"||Ee.backdropFilter!=="none"||Se.includes("transform")||Se.includes("filter")||Se.includes("perspective"))return ye;ye=ye.parentElement}return null},ve=()=>{if(!ne.teleportTo&&!ne.overlay||!le.value)return;const $e=le.value.getBoundingClientRect();let ye=$e.bottom+6,Ee=$e.left;if(ne.overlay&&!ne.teleportTo){const Se=ue(le.value);if(Se){const Le=Se.getBoundingClientRect();ye-=Le.top,Ee-=Le.left}}ce.value={position:"fixed",top:`${ye}px`,left:`${Ee}px`,width:`${$e.width}px`,zIndex:9999}},me=e$b.computed(()=>ne.multiple?Array.isArray(ne.modelValue)&&ne.modelValue.length>0:ne.options.some($e=>$e.value===ne.modelValue)),be=e$b.computed(()=>{if(ne.multiple)return null;const $e=ne.options.find(ye=>ye.value===ne.modelValue);return($e==null?void 0:$e.icon)||ne.iconPlaceholder||ne.icon||null}),fe=e$b.computed(()=>ne.iconPlaceholder||ne.icon||null);e$b.watch(re,async $e=>{$e&&(await e$b.nextTick(),ve(),requestAnimationFrame(ve))});const pe=[];e$b.onMounted(()=>{if(document.addEventListener("mousedown",de),ne.teleportTo||ne.overlay){const $e=()=>{re.value&&ve()};window.addEventListener("scroll",$e,!0),window.addEventListener("resize",$e),pe.push(["scroll",$e],["resize",$e])}}),e$b.onUnmounted(()=>{document.removeEventListener("mousedown",de),pe.forEach(([$e,ye])=>window.removeEventListener($e,ye,$e==="scroll"?!0:void 0))});const _e=$e=>ne.multiple&&Array.isArray(ne.modelValue)?ne.modelValue.includes($e):ne.modelValue===$e,ge=$e=>{if(ne.multiple){const ye=Array.isArray(ne.modelValue)?[...ne.modelValue]:[],Ee=ye.indexOf($e);Ee===-1?ye.push($e):ye.splice(Ee,1),ae("update:modelValue",ye)}else ae("update:modelValue",$e),re.value=!1},ke=e$b.computed(()=>{if(ne.multiple&&Array.isArray(ne.modelValue))return ne.modelValue.length===0?ne.placeholder:ne.options.filter(Ee=>ne.modelValue.includes(Ee.value)).map(Ee=>Ee.name).join(", ");const $e=ne.options.find(ye=>ye.value===ne.modelValue);return($e==null?void 0:$e.name)||ne.placeholder});return($e,ye)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:"relative w-full",ref_key:"dropdownRef",ref:oe},[e$b.createElementVNode("div",{onClick:ye[0]||(ye[0]=Ee=>re.value=!re.value),class:e$b.normalizeClass(["flex flex-wrap items-center justify-between p-3 gap-2 rounded-md cursor-pointer transition",ee.theme]),ref_key:"triggerRef",ref:le},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["text-xs truncate max-w-full flex gap-2 items-center",me.value?"":"opacity-80"])},[me.value&&be.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"flex-shrink-0",innerHTML:be.value},null,8,_hoisted_1$1s)):!me.value&&fe.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"flex-shrink-0",innerHTML:fe.value},null,8,_hoisted_2$1f)):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_3$16,e$b.toDisplayString(ke.value),1)],2),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3 transition-transform duration-300",re.value?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...ye[1]||(ye[1]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 9-7 7-7-7"},null,-1)])],2))],2),re.value&&!ee.teleportTo&&!ee.overlay?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["absolute flex flex-col z-50 mt-1.5 w-full shadow-sm border rounded-md max-h-64 overflow-y-auto hide-scrollbar",ee.theme])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.options,Ee=>(e$b.openBlock(),e$b.createElementBlock("button",{key:Ee.value,class:e$b.normalizeClass([_e(Ee.value)?"bg-green-500/30 hover:bg-green-500/50":"hover:bg-base-200","flex items-center justify-between gap-2 px-3 py-2 text-left text-sm cursor-pointer transition w-full"]),onClick:Se=>ge(Ee.value)},[e$b.createElementVNode("div",_hoisted_5$U,[Ee.icon?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,innerHTML:Ee.icon,class:"flex-shrink-0"},null,8,_hoisted_6$N)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_7$J,e$b.toDisplayString(Ee.name),1)]),_e(Ee.value)?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$D,[...ye[2]||(ye[2]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)],10,_hoisted_4$10))),128))],2)):e$b.createCommentVNode("",!0),re.value&&!ee.teleportTo&&ee.overlay?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,style:e$b.normalizeStyle(ce.value),class:e$b.normalizeClass(["flex flex-col shadow-sm border rounded-md max-h-64 overflow-y-auto hide-scrollbar",ee.theme])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.options,Ee=>(e$b.openBlock(),e$b.createElementBlock("button",{key:Ee.value,class:e$b.normalizeClass([_e(Ee.value)?"bg-green-500/30 hover:bg-green-500/50":"hover:bg-base-200","flex items-center justify-between gap-2 px-3 py-2 text-left text-sm cursor-pointer transition w-full"]),onClick:Se=>ge(Ee.value)},[e$b.createElementVNode("div",_hoisted_10$x,[Ee.icon?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,innerHTML:Ee.icon,class:"flex-shrink-0"},null,8,_hoisted_11$u)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_12$s,e$b.toDisplayString(Ee.name),1)]),_e(Ee.value)?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$o,[...ye[3]||(ye[3]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)],10,_hoisted_9$A))),128))],6)):e$b.createCommentVNode("",!0),re.value&&ee.teleportTo?(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{key:2,to:ee.teleportTo},[e$b.createElementVNode("div",{ref_key:"teleportedRef",ref:ie,style:e$b.normalizeStyle(ce.value),class:e$b.normalizeClass(["flex flex-col shadow-sm border rounded-md max-h-64 overflow-y-auto hide-scrollbar",ee.theme])},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.options,Ee=>(e$b.openBlock(),e$b.createElementBlock("button",{key:Ee.value,class:e$b.normalizeClass([_e(Ee.value)?"bg-green-500/30 hover:bg-green-500/50":"hover:bg-base-200","flex items-center justify-between gap-2 px-3 py-2 text-left text-sm cursor-pointer transition w-full"]),onClick:Se=>ge(Ee.value)},[e$b.createElementVNode("div",_hoisted_15$l,[Ee.icon?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,innerHTML:Ee.icon,class:"flex-shrink-0"},null,8,_hoisted_16$i)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_17$c,e$b.toDisplayString(Ee.name),1)]),_e(Ee.value)?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_18$c,[...ye[4]||(ye[4]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)],10,_hoisted_14$n))),128))],6)],8,["to"])):e$b.createCommentVNode("",!0)],512))}},SimpleSelect=_export_sfc$1(_sfc_main$1C,[["__scopeId","data-v-443d8f21"]]),_hoisted_1$1r={class:"toggle-page-buttons-wrapper"},_hoisted_2$1e=["disabled","onClick","onMouseenter","onMouseleave"],_hoisted_3$15={key:0,class:"size-4 text-white/80","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_4$$={key:1,class:"toggle-page-button-label"},_hoisted_5$T={key:0,class:"popper-content"},_sfc_main$1B={__name:"toggleListButtons",props:{modelValue:{type:String,required:!0},buttons:{type:Array,required:!0,default:()=>[]}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=e$b.ref({}),ae=oe=>{ne.value[oe]=!ne.value[oe]},re=oe=>{ne.value[oe]=!1};return(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock("main",_hoisted_1$1r,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.buttons,le=>(e$b.openBlock(),e$b.createBlock(e$b.unref(entry_esm),{key:le.value,class:"dark:popper-light w-full popper-dark",show:le.disabled&&ne.value[le.value],placement:"bottom",onShow:()=>ne.value[le.value]=!0,onHide:()=>ne.value[le.value]=!1},{content:e$b.withCtx(()=>[le.disabled&&le.disabledReason?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_5$T,e$b.toDisplayString(le.disabledReason),1)):e$b.createCommentVNode("",!0)]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{disabled:le.disabled,class:e$b.normalizeClass(["toggle-page-button",{selected:ee.modelValue===le.value}]),onClick:ce=>oe.$emit("update:modelValue",le.value),onMouseenter:ce=>le.disabled&&ae(le.value),onMouseleave:ce=>re(le.value)},[le.disabled?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_3$15,[...ie[0]||(ie[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_4$$,e$b.toDisplayString(le.label),1))],42,_hoisted_2$1e)]),_:2},1032,["show","onShow","onHide"]))),128))]))}},ToggleListButtons=_export_sfc$1(_sfc_main$1B,[["__scopeId","data-v-5b240a65"]]);function useWhatsappBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.whatsapp_infos)||[]).filter(ae=>(ae==null?void 0:ae.meta_business_acc_id)||(ae==null?void 0:ae.whatsapp_bsuid)).map((ae,re)=>({id:ae.id||`wa-${re}`,instanceName:ae.instance||"",bsuid:ae.whatsapp_bsuid||"",user_name:ae.whatsapp_user_name||""})).filter(ae=>ae.instanceName)})}function useInstagramBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.instagram_infos)||[]).filter(ae=>(ae==null?void 0:ae.instagram_account_id)||(ae==null?void 0:ae.instagram_bsuid)).map((ae,re)=>({id:ae.id||`ig-${re}`,instanceName:ae.instance||"",bsuid:ae.instagram_bsuid||"",user_name:ae.instagram_user_name||""})).filter(ae=>ae.instanceName)})}function useTelegramBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.telegram_infos)||[]).filter(ae=>(ae==null?void 0:ae.telegram_account_id)||(ae==null?void 0:ae.telegram_chat_id)).map((ae,re)=>({id:ae.id||`tg-${re}`,instanceName:ae.instance||"",bsuid:ae.telegram_chat_id||"",user_name:ae.telegram_user_name||""})).filter(ae=>ae.instanceName)})}function useWebchatBindings(ee){return e$b.computed(()=>{const te=typeof ee=="function"?ee():ee==null?void 0:ee.value;return((te==null?void 0:te.webchat_infos)||[]).filter(ae=>ae==null?void 0:ae.webchat_id).map((ae,re)=>({id:ae.id||`wc-${re}`,instanceName:ae.instance||"",bsuid:ae.webchat_id||"",user_name:""})).filter(ae=>ae.instanceName)})}function useHasContactBindings(ee,te,ne,ae){return e$b.computed(()=>{var re,oe;return ee.value.length>0||te.value.length>0||(((re=ne==null?void 0:ne.value)==null?void 0:re.length)||0)>0||(((oe=ae==null?void 0:ae.value)==null?void 0:oe.length)||0)>0})}const currencyLocaleMap={BRL:"pt-BR",USD:"en-US",EUR:"de-DE",JPY:"ja-JP",GBP:"en-GB",CHF:"de-CH",BTC:"en-US"},currencySymbols={BRL:"R$",USD:"$",EUR:"€",JPY:"¥",GBP:"£",CHF:"CHF",BTC:"₿"},formatCurrency=(ee,te="BRL")=>{const ne=Number(ee);if(!Number.isFinite(ne))return"";if(te==="BTC")return`₿ ${ne.toFixed(8)}`;const ae=currencyLocaleMap[te]??"en-US",re={style:"currency",currency:te};te==="JPY"&&(re.maximumFractionDigits=0);try{return new Intl.NumberFormat(ae,re).format(ne)}catch{return`${currencySymbols[te]??te} ${ne}`}},getCurrencySymbol=(ee="BRL")=>currencySymbols[ee]??ee,getCurrencyLocale=(ee="BRL")=>currencyLocaleMap[ee]??"en-US",_hoisted_1$1q={class:"discount-product-card"},_hoisted_2$1d={class:"discount-product-image"},_hoisted_3$14=["src"],_hoisted_4$_={key:1,class:"product-img-placeholder"},_hoisted_5$S={class:"discount-product-info"},_hoisted_6$M={class:"discount-product-header"},_hoisted_7$I={class:"discount-product-name"},_hoisted_8$C={class:"discount-badge-mini"},_hoisted_9$z={class:"discount-product-row"},_hoisted_10$w={class:"discount-product-prices"},_hoisted_11$t={class:"original-price"},_hoisted_12$r={class:"final-price"},_hoisted_13$n={class:"discount-product-quantity"},_hoisted_14$m={class:"qty-label"},_hoisted_15$k={class:"subtotal"},_sfc_main$1A={__name:"DiscountProductCard",props:{item:{type:Object,required:!0},getProductId:{type:Function,required:!0}},setup(ee){const te=ee,ne=()=>te.item.product.price*(1-te.item.discount/100),ae=()=>ne()*te.item.quantity,re=oe=>{const ie=Number(oe);return Number.isFinite(ie)?ie.toFixed(2):"0.00"};return(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_1$1q,[e$b.createElementVNode("div",_hoisted_2$1d,[ee.item.product.photo?(e$b.openBlock(),e$b.createElementBlock("img",{key:0,src:ee.item.product.photo,class:"product-img"},null,8,_hoisted_3$14)):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_4$_,[...ie[0]||(ie[0]=[e$b.createElementVNode("svg",{class:"size-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{fill:"currentColor",d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Zm1.01 8H8.00002v2.01H10.01V11Zm.99 0h2.01v2.01H11V11Zm5.01 0H14v2.01h2.01V11Zm-8.00998 3H10.01v2.01H8.00002V14ZM13.01 14H11v2.01h2.01V14Zm.99 0h2.01v2.01H14V14ZM11 4h6v1h-6V4Z","clip-rule":"evenodd"})],-1)])]))]),e$b.createElementVNode("div",_hoisted_5$S,[e$b.createElementVNode("div",_hoisted_6$M,[e$b.createElementVNode("span",_hoisted_7$I,e$b.toDisplayString(ee.item.product.name),1),e$b.createElementVNode("span",_hoisted_8$C,"-"+e$b.toDisplayString(re(ee.item.discount))+"%",1)]),e$b.createElementVNode("div",_hoisted_9$z,[e$b.createElementVNode("div",_hoisted_10$w,[e$b.createElementVNode("span",_hoisted_11$t,e$b.toDisplayString(e$b.unref(formatCurrency)(ee.item.product.price,ee.item.product.currency)),1),e$b.createElementVNode("span",_hoisted_12$r,e$b.toDisplayString(e$b.unref(formatCurrency)(ne(),ee.item.product.currency)),1)]),e$b.createElementVNode("div",_hoisted_13$n,[e$b.createElementVNode("span",_hoisted_14$m,e$b.toDisplayString(ee.item.quantity)+"x",1),e$b.createElementVNode("span",_hoisted_15$k,e$b.toDisplayString(e$b.unref(formatCurrency)(ae(),ee.item.product.currency)),1)])])])]))}},DiscountProductCard=_export_sfc$1(_sfc_main$1A,[["__scopeId","data-v-bc4339e3"]]),_hoisted_1$1p={key:0,class:"product-photo-section"},_hoisted_2$1c=["src"],_hoisted_3$13={key:1,class:"empty-product-photo"},_hoisted_4$Z={class:"product-header"},_hoisted_5$R=["title"],_hoisted_6$L={key:0,class:"incorporated-badge"},_hoisted_7$H={class:"product-pricing"},_hoisted_8$B={class:"flex gap-1 items-center"},_hoisted_9$y={key:0,class:"discount-percentage"},_hoisted_10$v={key:1,class:"discounted-price"},_hoisted_11$s={key:0,class:"price-line"},_hoisted_12$q={class:"price-total"},_sfc_main$1z={__name:"ProductListItem",props:{product:{type:Object,required:!0},quantity:{type:Number,default:0},discount:{type:Number,default:0},incorporated:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=oe=>{const ie=Number(oe);return Number.isFinite(ie)?ie.toFixed(2).replace(".",","):"0,00"},ae=()=>{var le;const oe=((le=re())==null?void 0:le.price)||0,ie=te.discount||0;return oe*(1-ie/100)},re=()=>{var oe;return((oe=te.product)==null?void 0:oe.product)||te.product};return(oe,ie)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["product-list-item",{"compact-mode":ee.compact,"has-quantity":ee.quantity>0}])},[ee.compact?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1p,[re().photo?(e$b.openBlock(),e$b.createElementBlock("img",{key:0,class:"product-photo",src:re().photo},null,8,_hoisted_2$1c)):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_3$13,[...ie[0]||(ie[0]=[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{fill:"currentColor",d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Zm1.01 8H8.00002v2.01H10.01V11Zm.99 0h2.01v2.01H11V11Zm5.01 0H14v2.01h2.01V11Zm-8.00998 3H10.01v2.01H8.00002V14ZM13.01 14H11v2.01h2.01V14Zm.99 0h2.01v2.01H14V14ZM11 4h6v1h-6V4Z","clip-rule":"evenodd"})],-1)])]))])),e$b.createElementVNode("section",{class:e$b.normalizeClass(["product-info-section",{"flex-1":!ee.compact,"w-full":ee.compact}])},[e$b.createElementVNode("div",_hoisted_4$Z,[e$b.createElementVNode("p",{class:e$b.normalizeClass(["products-and-services_badge dark:text-white flex-shrink-0",re().recurrence])},e$b.toDisplayString(re().recurrence==="monthly"?"Mensal":"Único"),3),e$b.createElementVNode("p",{title:re().name,class:e$b.normalizeClass(["label-product-name",ee.quantity>0?"text-white dark:text-primary":""])},e$b.toDisplayString(re().name),11,_hoisted_5$R),ee.incorporated?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$L,"+")):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("span",_hoisted_7$H,[e$b.createElementVNode("div",_hoisted_8$B,[e$b.createElementVNode("p",{class:e$b.normalizeClass(["text-xs font-semibold",ee.discount>0?"line-through opacity-60":""])},e$b.toDisplayString(e$b.unref(formatCurrency)(re().price,re().currency)),3),ee.discount>0?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_9$y," - "+e$b.toDisplayString(ne(ee.discount))+"% ",1)):e$b.createCommentVNode("",!0),ee.discount>0?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_10$v,e$b.toDisplayString(e$b.unref(formatCurrency)(ae(),re().currency)),1)):e$b.createCommentVNode("",!0)]),ee.quantity>0?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_11$s,[e$b.createTextVNode(" - x "+e$b.toDisplayString(ee.quantity)+" = ",1),e$b.createElementVNode("a",_hoisted_12$q,e$b.toDisplayString(e$b.unref(formatCurrency)(ae()*ee.quantity,re().currency)),1)])):e$b.createCommentVNode("",!0)])],2)],2))}},ProductListItem=_export_sfc$1(_sfc_main$1z,[["__scopeId","data-v-f557ef28"]]),_hoisted_1$1o={key:0,class:"header-products-list bg-base-300"},_hoisted_2$1b={key:0,style:{padding:"0.5rem 0.5rem 0rem 0.5rem"}},_hoisted_3$12={class:"flex items-center gap-2 flex-wrap"},_hoisted_4$Y={class:"currency-code"},_hoisted_5$Q={class:"discount-tooltip"},_hoisted_6$K={class:"discount-tooltip-header"},_hoisted_7$G={class:"discount-tooltip-list"},_hoisted_8$A={class:"original-value-wrapper"},_hoisted_9$x={class:"original-value-crossed"},_hoisted_10$u={class:"final-value"},_hoisted_11$r={class:"p-2 text-sm px-3"},_hoisted_12$p={class:"text-center"},_hoisted_13$m=["disabled"],_hoisted_14$l={key:0,class:"flex items-center gap-1"},_hoisted_15$j={key:1,class:"flex items-center gap-1"},_hoisted_16$h={class:"text-[13px]"},_hoisted_17$b={key:1,class:"flex items-center justify-center overflow-hidden h-full"},_hoisted_18$b={key:2,class:"list-products-list"},_hoisted_19$a={key:0},_hoisted_20$a={class:"w-full text-gray-500 list-none list-inside dark:text-gray-400 divide-y divide-base-200"},_hoisted_21$9={key:0,class:"department-blocked"},_hoisted_22$7={class:"flex gap-2 items-center pl-2 flex-1"},_hoisted_23$6={class:"product-actions-section"},_hoisted_24$6={class:"quantity-controls"},_hoisted_25$4=["disabled","onClick"],_hoisted_26$2=["disabled","onClick"],_hoisted_27$2={class:"discount-input-tooltip"},_hoisted_28$2={key:0,class:"text-xs"},_hoisted_29$2={key:1,class:"flex flex-col gap-1"},_hoisted_30$2={class:"text-xs"},_hoisted_31$2={class:"font-bold text-orange-400"},_hoisted_32$1={class:"discount-input-wrapper-animated"},_hoisted_33$1=["value","onInput","onFocus","onBlur","disabled","placeholder"],_hoisted_34$1={key:1,class:"flex flex-col flex-1 gap-2 items-center justify-center"},_hoisted_35$1={key:0,class:"text-gray-200 text-[10px] md:text-xs font-sans"},_sfc_main$1y={__name:"listProducts",props:{modelValue:{type:Array,default:()=>[]},allProducts:{type:[Object,Array],default:()=>{}},onMouseLeave:{type:Function,required:!1},departmentBypass:{type:String,default:""},readonly:{type:Boolean,default:!1},proposal:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["update:modelValue","generate-proposal"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.ref([]),ie=e$b.computed(()=>[...oe.value].sort((lt,it)=>{const gt=pe(lt)>0,Et=pe(it)>0;if(gt!==Et)return Et-gt;const mt=Ie(lt),je=Ie(it);return mt===je?0:mt-je}));function le(lt){return Array.isArray(lt)?lt.map(it=>it&&it.product?{product:{...it.product},quantity:it.quantity??0,discount:it.discount??0}:{product:{...it},quantity:it.quantity??0,discount:it.discount??0}):[]}const ce=e$b.ref(le(ne.modelValue)),de=e$b.ref(1),ue=e$b.ref(null),ve=e$b.ref(null),me=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=it.product||it,Et=gt.price||0,mt=it.quantity||0,je=it.discount||0,Qe=gt.currency||"BRL";if(mt===0)return;lt[Qe]||(lt[Qe]={currency:Qe,originalTotal:0,finalTotal:0,hasDiscount:!1});const ut=Et*mt,dt=Et*je/100*mt,pt=ut-dt;lt[Qe].originalTotal+=ut,lt[Qe].finalTotal+=pt,je>0&&(lt[Qe].hasDiscount=!0)}),Object.values(lt)});e$b.computed(()=>ce.value.reduce((lt,it)=>{var Qe;const gt=((Qe=it.product)==null?void 0:Qe.price)||it.price||0,Et=it.quantity||0,mt=it.discount||0,je=gt*(1-mt/100);return lt+je*Et},0)),e$b.computed(()=>ce.value.filter(lt=>lt.quantity>0&<.discount>0)),e$b.computed(()=>ce.value.reduce((lt,it)=>{var Qe;const gt=((Qe=it.product)==null?void 0:Qe.price)||it.price||0,Et=it.quantity||0,mt=it.discount||0,je=gt*mt/100*Et;return lt+je},0));function be(lt){var it;return((it=lt==null?void 0:lt.product)==null?void 0:it.id)??(lt==null?void 0:lt.id)}const fe=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=be(it);gt!=null&&(lt[gt]=it.quantity)}),lt}),pe=lt=>fe.value[lt.id]||0,_e=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=be(it);gt!=null&&(lt[gt]=it.discount||0)}),lt}),ge=lt=>_e.value[lt.id]||0,ke=(lt,it=100)=>{let gt=Number(lt);return Number.isFinite(gt)||(gt=0),gt<0&&(gt=0),gt>it&&(gt=it),Math.round(gt*100)/100},$e=(lt,it)=>{if(ne.readonly||Ie(lt)||!lt.discountable)return;const gt=lt.max_discount||100,Et=ke(it,gt),mt=ce.value.find(je=>be(je)===lt.id);mt&&(mt.discount=Et)},ye=(lt,it)=>{if(ne.readonly||Ie(lt)||!lt.discountable)return;const gt=lt.id;Xe.value[gt]=!0;let Et=it.target.value;if(Et===""){Ze.value[gt]="",it.target.value="",clearTimeout(Ue[gt]),Ue[gt]=setTimeout(()=>{Ze.value[gt]===""&&(Ze.value[gt]="0",$e(lt,0)),Xe.value[gt]=!1},600);return}Et=Et.replace(/[^\d.,]/g,"").replace(",",".");const mt=Et.split(".");mt.length>2&&(Et=mt[0]+"."+mt.slice(1).join("")),it.target.value=Et.replace(".",","),Ze.value[gt]=Et,clearTimeout(Ue[gt]),Ue[gt]=setTimeout(()=>{Ee(lt),Xe.value[gt]=!1},600)},Ee=lt=>{const it=lt.id;let gt=(Ze.value[it]||"").trim();if(gt===""||gt==="."){const je=ge(lt);Ze.value[it]=String(je);return}const Et=lt.max_discount||100,mt=ke(gt,Et);Ze.value[it]=String(mt),$e(lt,mt)},Se=(lt,it)=>{const gt=lt.id;Xe.value[gt]=!0,it.target.select()},Le=lt=>{const it=lt.id;clearTimeout(Ue[it]),Ze.value[it]===""?(Ze.value[it]="0",$e(lt,0)):Ee(lt),Xe.value[it]=!1},Me=lt=>{const it=lt.id;return Xe.value[it]?(Ze.value[it]??String(ge(lt))).replace(".",","):String(ge(lt)).replace(".",",")},De=lt=>{if(ne.readonly||Ie(lt))return;const it=ce.value.find(gt=>be(gt)===lt.id);it?it.quantity++:(ce.value.push({product:{...lt},quantity:1,discount:0}),Ze.value[lt.id]="0")},Oe=lt=>{if(ne.readonly||Ie(lt))return;const it=ce.value.find(gt=>be(gt)===lt.id);it&&(it.quantity>0?it.quantity--:it.quantity=0)},Re=(lt,it)=>{const gt=new URLSearchParams,Et=lt;return Object.keys(it).forEach(mt=>gt.append(mt,it[mt])),`${Et}?${gt.toString()}`};let ze=null;const Ve=async lt=>{if(ze!==de.value){ze=de.value;try{const{data:it}=await api.get(Re(crm_products,{page:de.value,...lt})),{results:gt,next:Et,previous:mt}=it;if(ue.value=Et,ve.value=mt,de.value===1)oe.value=gt;else{const je=new Set(oe.value.map(dt=>dt.id)),Qe=new Set(ce.value.map(dt=>be(dt))),ut=gt.filter(dt=>!je.has(dt.id)&&!Qe.has(dt.id));oe.value=[...oe.value,...ut]}ue.value&&(de.value+=1)}catch(it){console.error("Erro ao buscar produtos:",it)}finally{ze=null}}};function Ne(){const lt=new Set(oe.value.map(gt=>gt.id)),it=ce.value.filter(gt=>{const Et=be(gt);return Et&&!lt.has(Et)}).map(gt=>gt.product);it.length>0&&(oe.value=[...it,...oe.value])}function Pe(){ce.value.forEach(lt=>{const it=be(lt);it&&!Ze.value[it]&&(Ze.value[it]=String(lt.discount||0))})}let Be=!1;async function Ae(){var it;if(Be)return;Be=!0;const lt=Array.isArray(ne.allProducts)?ne.allProducts:(it=ne.allProducts)==null?void 0:it.results;lt&<.length>0?(oe.value=lt,ue.value=!Array.isArray(ne.allProducts)&&ne.allProducts.next||null,ve.value=!Array.isArray(ne.allProducts)&&ne.allProducts.previous||null,de.value=2):await Ve(),Ne(),Pe()}e$b.onMounted(Ae),e$b.watch(ie,lt=>{lt.forEach(it=>{if(it&&it.id&&!Ze.value[it.id]){const gt=ce.value.find(mt=>be(mt)===it.id),Et=(gt==null?void 0:gt.discount)||0;Ze.value[it.id]=String(Et)}})},{immediate:!0}),e$b.watch(ce,lt=>{ae("update:modelValue",lt.map(it=>({product:it.product,quantity:it.quantity,discount:it.discount||0}))),lt.forEach(it=>{const gt=be(it);gt&&!Xe.value[gt]&&(Ze.value[gt]=String(it.discount||0))})},{deep:!0}),e$b.watch(()=>ne.modelValue,lt=>{const it=le(lt);JSON.stringify(it)!==JSON.stringify(ce.value)&&(ce.value=it,Ne(),Pe())},{deep:!0});const xe=e$b.ref(!1),Ce=async lt=>{if(!xe.value){xe.value=!0;try{if(!ue.value){lt.complete();return}await Ve(),ue.value?lt.loaded():lt.complete()}catch(it){console.error("Erro ao carregar produtos:",it),lt.complete()}finally{xe.value=!1}}};function Fe(){typeof ne.onMouseLeave=="function"&&ne.onMouseLeave()}const Ie=lt=>{if(xe.value)return!1;const it=ne.departmentBypass;if(!it)return!1;const gt=Array.isArray(lt==null?void 0:lt.department)?lt.department:[];return gt.length===0?!1:!gt.some(mt=>mt&&mt.id===it)},qe=e$b.ref({query:""}),Ge=e$b.ref(!1),Ze=e$b.ref({}),Xe=e$b.ref({});let Ue={},at;e$b.watch(qe,()=>{clearTimeout(at),at=setTimeout(async()=>{const{query:lt}=qe.value;de.value=1,Ge.value=lt!=null,re.value=!0,await Ve({query:lt}),re.value=!1},500)},{deep:!0});function Je(){ae("generate-proposal")}return(lt,it)=>{const gt=e$b.resolveComponent("Popper"),Et=e$b.resolveComponent("SimpleLoader");return e$b.openBlock(),e$b.createElementBlock("div",{class:"list-products-wrapper",onMouseleave:Fe},[oe.value.length>0&&!Ge.value||Ge.value?(e$b.openBlock(),e$b.createElementBlock("header",_hoisted_1$1o,[me.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_2$1b,[e$b.createElementVNode("section",{class:e$b.normalizeClass(["total-price-badge text-white",{"with-proposal":ee.proposal}])},[e$b.createElementVNode("div",_hoisted_3$12,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(me.value,mt=>(e$b.openBlock(),e$b.createElementBlock("div",{key:mt.currency,class:"currency-badge"},[e$b.createElementVNode("span",_hoisted_4$Y,e$b.toDisplayString(e$b.unref(getCurrencySymbol)(mt.currency)),1),mt.hasDiscount?(e$b.openBlock(),e$b.createBlock(gt,{key:0,class:"discount-popper",hover:!0,placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("main",_hoisted_5$Q,[e$b.createElementVNode("div",_hoisted_6$K,e$b.toDisplayString(mt.currency)+" - Produtos com desconto ("+e$b.toDisplayString(ce.value.filter(je=>{var Qe;return(((Qe=je.product)==null?void 0:Qe.currency)||"BRL")===mt.currency&&je.quantity>0&&je.discount>0}).length)+") ",1),e$b.createElementVNode("ul",_hoisted_7$G,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ce.value.filter(je=>{var Qe;return(((Qe=je.product)==null?void 0:Qe.currency)||"BRL")===mt.currency&&je.quantity>0&&je.discount>0}),je=>(e$b.openBlock(),e$b.createBlock(DiscountProductCard,{key:be(je),item:je,getProductId:be},null,8,["item"]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_8$A,[e$b.createElementVNode("span",_hoisted_9$x,e$b.toDisplayString(e$b.unref(formatCurrency)(mt.originalTotal,mt.currency).replace(/[^\d.,\s]/g,"").trim()),1),it[1]||(it[1]=e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"discount-icon-small",viewBox:"0 0 55 62",fill:"none"},[e$b.createElementVNode("path",{d:"M26.6839 11.1304C28.6291 8.59593 32.6389 9.49368 33.6735 12.6953V12.6953C34.3268 14.7172 36.3132 15.9948 38.2894 15.6568V15.6568C41.3197 15.1384 43.9062 18.2943 42.9019 21.2848L42.6968 21.8954C42.033 23.8721 42.8293 26.1348 44.6 27.3029V27.3029C47.3871 29.1414 47.4599 33.2982 44.7337 34.9412L44.5536 35.0498C42.8092 36.1011 42.0583 38.3046 42.7427 40.3634L42.9237 40.9079C43.9644 44.0383 41.4451 47.0065 38.3496 46.2972V46.2972C36.3456 45.838 34.3946 46.9497 33.7532 48.9162L33.6179 49.3311C32.6312 52.3561 28.7486 52.8621 26.7994 50.2196V50.2196C25.5373 48.5086 23.2813 48.0035 21.5812 49.0513V49.0513C18.9556 50.6695 15.4947 48.5194 15.5032 45.2754L15.5044 44.8305C15.5099 42.7216 14.0337 40.8426 12.0265 40.4037V40.4037C8.92596 39.7259 7.48972 35.872 9.41874 33.4065L9.75425 32.9777C11.0229 31.3561 10.9991 28.9791 9.69678 27.2457L9.56236 27.0668C7.52706 24.3577 8.86928 20.5177 12.0288 20.0105V20.0105C14.036 19.6883 15.4714 17.9253 15.4592 15.7972L15.4555 15.1399C15.437 11.9204 18.8135 10.0995 21.4769 11.8926V11.8926C23.2138 13.062 25.4555 12.731 26.6839 11.1304V11.1304Z",fill:"currentColor"}),e$b.createElementVNode("path",{d:"M21.3849 25.185C20.8649 25.185 20.4649 25.3984 20.1849 25.825C19.9316 26.2117 19.8049 26.7384 19.8049 27.405C19.8049 28.8717 20.3316 29.605 21.3849 29.605C22.4516 29.605 22.9849 28.8717 22.9849 27.405C22.9849 26.765 22.8516 26.2384 22.5849 25.825C22.3049 25.3984 21.9049 25.185 21.3849 25.185ZM21.3849 23.345C22.5849 23.345 23.4983 23.7384 24.1249 24.525C24.6849 25.2317 24.9649 26.1917 24.9649 27.405C24.9649 28.6184 24.6849 29.5717 24.1249 30.265C23.4983 31.065 22.5849 31.465 21.3849 31.465C20.1583 31.465 19.2383 31.065 18.6249 30.265C18.0783 29.5584 17.8049 28.605 17.8049 27.405C17.8049 26.1917 18.0783 25.2317 18.6249 24.525C19.2516 23.7384 20.1716 23.345 21.3849 23.345ZM31.8649 23.105L23.1249 38.865H20.9449L29.6649 23.105H31.8649ZM31.4249 32.365C30.3716 32.365 29.8449 33.105 29.8449 34.585C29.8449 35.2384 29.9783 35.7584 30.2449 36.145C30.5249 36.585 30.9183 36.805 31.4249 36.805C32.4916 36.805 33.0249 36.065 33.0249 34.585C33.0249 33.105 32.4916 32.365 31.4249 32.365ZM31.4249 30.505C32.6383 30.505 33.5583 30.8984 34.1849 31.685C34.7449 32.3917 35.0249 33.3584 35.0249 34.585C35.0249 35.7984 34.7449 36.7517 34.1849 37.445C33.5583 38.2317 32.6383 38.625 31.4249 38.625C30.2249 38.625 29.3116 38.2317 28.6849 37.445C28.1516 36.7517 27.8849 35.7984 27.8849 34.585C27.8849 33.345 28.1516 32.3784 28.6849 31.685C29.3116 30.8984 30.2249 30.505 31.4249 30.505Z",fill:"white"})],-1))])]),_:2},1024)):e$b.createCommentVNode("",!0),e$b.createElementVNode("span",_hoisted_10$u,e$b.toDisplayString(e$b.unref(formatCurrency)(mt.finalTotal,mt.currency).replace(/[^\d.,\s]/g,"").trim()),1)]))),128))]),ee.proposal?(e$b.openBlock(),e$b.createBlock(gt,{key:0,class:"discount-popper",hover:!0,placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("main",_hoisted_11$r,[e$b.createElementVNode("div",_hoisted_12$p,e$b.toDisplayString(ce.value.length===0?"Adicione produtos para gerar proposta comercial":ne.loading?"Gerando proposta...":"Gerar proposta"),1)])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{onClick:Je,disabled:ce.value.length===0||ee.readonly||ne.loading,class:e$b.normalizeClass(["proposal-button",{disabled:ce.value.length===0||ee.readonly||ne.loading}])},[ne.loading?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_14$l,[...it[2]||(it[2]=[e$b.createElementVNode("div",{class:"size-4 animate-spin rounded-full border-2 border-white border-t-transparent"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$j,[it[3]||(it[3]=e$b.createElementVNode("svg",{class:"size-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M9 2.221V7H4.221a2 2 0 0 1 .365-.5L8.5 2.586A2 2 0 0 1 9 2.22ZM11 2v5a2 2 0 0 1-2 2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2 2 2 0 0 0 2 2h12a2 2 0 0 0 2-2 2 2 0 0 0 2-2v-7a2 2 0 0 0-2-2V4a2 2 0 0 0-2-2h-7Zm-6 9a1 1 0 0 0-1 1v5a1 1 0 1 0 2 0v-1h.5a2.5 2.5 0 0 0 0-5H5Zm1.5 3H6v-1h.5a.5.5 0 0 1 0 1Zm4.5-3a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h1.376A2.626 2.626 0 0 0 15 15.375v-1.75A2.626 2.626 0 0 0 12.375 11H11Zm1 5v-3h.375a.626.626 0 0 1 .625.626v1.748a.625.625 0 0 1-.626.626H12Zm5-5a1 1 0 0 0-1 1v5a1 1 0 1 0 2 0v-1h1a1 1 0 1 0 0-2h-1v-1h1a1 1 0 1 0 0-2h-2Z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_16$h,e$b.toDisplayString(ce.value.length),1)]))],10,_hoisted_13$m)]),_:1})):e$b.createCommentVNode("",!0)],2)])):e$b.createCommentVNode("",!0),e$b.withDirectives(e$b.createElementVNode("input",{class:"search-products-input bg-base-200 text-white dark:text-black",type:"text",placeholder:"Buscar...","onUpdate:modelValue":it[0]||(it[0]=mt=>qe.value.query=mt)},null,512),[[e$b.vModelText,qe.value.query]])])):e$b.createCommentVNode("",!0),re.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$b,[e$b.createVNode(Et)])):(e$b.openBlock(),e$b.createElementBlock("main",_hoisted_18$b,[oe.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_19$a,[e$b.createElementVNode("ul",_hoisted_20$a,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ie.value,(mt,je)=>(e$b.openBlock(),e$b.createElementBlock("li",{class:"flex w-full bg-base-300 justify-between items-center py-1.5 relative",key:mt.id},[Ie(mt)?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_21$9,[...it[4]||(it[4]=[e$b.createElementVNode("svg",{class:"size-5 text-white","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"})],-1),e$b.createElementVNode("p",{class:"text-xs text-white/80"},"Este produto não faz parte do seu departamento",-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_22$7,[e$b.createVNode(ProductListItem,{product:mt,quantity:pe(mt),discount:ge(mt)},null,8,["product","quantity","discount"])]),e$b.createElementVNode("section",_hoisted_23$6,[e$b.createElementVNode("div",_hoisted_24$6,[e$b.createElementVNode("button",{disabled:Ie(mt)||ee.readonly,class:"action-list-button bg-base-200",onClick:Qe=>Oe(mt)}," - ",8,_hoisted_25$4),e$b.createElementVNode("p",{class:e$b.normalizeClass(["w-5 text-xs flex items-center justify-center font-semibold font-sans",pe(mt)>0?"text-white dark:text-black":""])},e$b.toDisplayString(pe(mt)),3),e$b.createElementVNode("button",{disabled:Ie(mt)||ee.readonly,class:"action-list-button bg-base-200",onClick:Qe=>De(mt)}," + ",8,_hoisted_26$2)]),pe(mt)>0?(e$b.openBlock(),e$b.createBlock(gt,{key:0,class:"discount-input-popper",hover:!0,arrow:"",placement:"left"},{content:e$b.withCtx(()=>[e$b.createElementVNode("main",_hoisted_27$2,[mt.discountable?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_29$2,[it[6]||(it[6]=e$b.createElementVNode("div",{class:"text-xs"},"Desconto habilitado",-1)),e$b.createElementVNode("div",_hoisted_30$2,[it[5]||(it[5]=e$b.createTextVNode(" Máximo: ",-1)),e$b.createElementVNode("span",_hoisted_31$2,e$b.toDisplayString(mt.max_discount||100)+"%",1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_28$2," Desconto não permitido para este produto "))])]),default:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_32$1,[e$b.createElementVNode("input",{value:Me(mt),onInput:Qe=>ye(mt,Qe),onFocus:Qe=>Se(mt,Qe),onBlur:()=>Le(mt),inputmode:"decimal",type:"text",disabled:!mt.discountable||Ie(mt)||ee.readonly,class:e$b.normalizeClass(["discount-input-compact",{"not-discountable":!mt.discountable}]),placeholder:mt.discountable?"0":"N/A"},null,42,_hoisted_33$1),it[7]||(it[7]=e$b.createElementVNode("span",{class:"discount-symbol"},"%",-1))])]),_:2},1024)):e$b.createCommentVNode("",!0)])]))),128))]),ue.value?(e$b.openBlock(),e$b.createBlock(e$b.unref(Y$1),{key:0,onInfinite:Ce,class:"p-3"},{spinner:e$b.withCtx(()=>[...it[8]||(it[8]=[e$b.createElementVNode("section",{class:"w-full justify-center items-center flex"},[e$b.createElementVNode("div",{class:"size-4 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"})],-1)])]),_:1})):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0),!re.value&&oe.value.length<=0?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_34$1,[it[10]||(it[10]=e$b.createElementVNode("p",{class:"text-gray-200 dark:text-gray-900 text-xs md:text-base font-sans"},"Nenhum item encontrado",-1)),Ge.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_35$1,[...it[9]||(it[9]=[e$b.createTextVNode(" Comece criando seu primeiro na aba ",-1),e$b.createElementVNode("strong",null,"Produtos",-1)])]))])):e$b.createCommentVNode("",!0)]))],32)}}},ListProducts=_export_sfc$1(_sfc_main$1y,[["__scopeId","data-v-401abda7"]]),_hoisted_1$1n=["aria-label"],_hoisted_2$1a={class:"smplay-loader-blocks","aria-hidden":"true"},_hoisted_3$11={key:0,class:"smplay-pixel-label smplay-loader-label"},_hoisted_4$X={key:1,class:"smplay-loader-flavor"},_sfc_main$1x={__name:"PixelLoader",props:{size:{type:String,default:"md"},label:{type:String,default:""},flavor:{type:String,default:""},tone:{type:String,default:"primary",validator:ee=>["primary","current"].includes(ee)}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["smplay-loader",[`smplay-loader--${ee.size}`,ee.tone==="current"?"smplay-loader--current":""]]),role:"status","aria-label":ee.label||"Carregando"},[e$b.createElementVNode("span",_hoisted_2$1a,[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,ae=>e$b.createElementVNode("i",{key:ae,style:e$b.normalizeStyle({"--i":ae-1})},null,4)),64))]),ee.label?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$11,e$b.toDisplayString(ee.label),1)):e$b.createCommentVNode("",!0),ee.flavor?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_4$X,e$b.toDisplayString(ee.flavor),1)):e$b.createCommentVNode("",!0)],10,_hoisted_1$1n))}},PixelLoader=_export_sfc$1(_sfc_main$1x,[["__scopeId","data-v-3a705123"]]),LOADER_PRESETS={inline:{size:"md",tone:"primary",pad:"none",axis:"row"},button:{size:"sm",tone:"current",pad:"none",axis:"row"},block:{size:"lg",tone:"primary",pad:"lg",axis:"column"},overlay:{size:"lg",tone:"primary",pad:"none",axis:"column"},page:{size:"lg",tone:"primary",pad:"lg",axis:"column"}},LOADER_CONTEXTS=Object.keys(LOADER_PRESETS),_hoisted_1$1m=["aria-label"],_hoisted_2$19={key:0,class:"sm-loader-label"},_sfc_main$1w={__name:"Loader",props:{context:{type:String,default:"inline",validator:ee=>LOADER_CONTEXTS.includes(ee)},size:{type:String,default:null,validator:ee=>["xs","sm","md","lg"].includes(ee)},tone:{type:String,default:null,validator:ee=>["primary","current"].includes(ee)},pad:{type:String,default:null,validator:ee=>["none","sm","md","lg"].includes(ee)},label:{type:String,default:""},variant:{type:String,default:"auto",validator:ee=>["auto","plain","pixel"].includes(ee)}},setup(ee){const te=ee,ne=e$b.computed(()=>LOADER_PRESETS[te.context]),ae=e$b.computed(()=>te.size||ne.value.size),re=e$b.computed(()=>te.tone||ne.value.tone),oe=e$b.computed(()=>te.pad||ne.value.pad),ie=e$b.computed(()=>ne.value.axis),le=pinia.getActivePinia()?useMessageUiStore():null,ce=e$b.inject("smPlayEnabled",null),de=e$b.computed(()=>{const me=e$b.unref(ce);return me!=null?!!me:!!(le!=null&&le.smPlayEnabled)}),ue=e$b.computed(()=>te.variant==="auto"?de.value:te.variant==="pixel"),ve=e$b.computed(()=>ae.value==="xs"?"sm":ae.value);return(me,be)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:e$b.normalizeClass(["sm-loader",[`sm-loader--${ee.context}`,`sm-loader--${ae.value}`,`sm-loader--pad-${oe.value}`,`sm-loader--${ie.value}`]]),role:"status","aria-live":"polite","aria-label":ee.label||"Carregando"},[ue.value?(e$b.openBlock(),e$b.createBlock(PixelLoader,{key:0,size:ve.value,label:ee.label,tone:re.value},null,8,["size","label","tone"])):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["sm-loader-ring",re.value==="current"?"sm-loader-ring--current":""]),"aria-hidden":"true"},null,2),ee.label?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$19,e$b.toDisplayString(ee.label),1)):e$b.createCommentVNode("",!0)],64))],10,_hoisted_1$1m))}},Loader=_export_sfc$1(_sfc_main$1w,[["__scopeId","data-v-ec626c94"]]),_sfc_main$1v={__name:"simpleLoader",setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createBlock(Loader,{context:"page",pad:"none"}))}},_hoisted_1$1l={key:0,class:"flex items-center justify-center overflow-hidden h-full"},_hoisted_2$18={class:"segmentation-fields-list"},_hoisted_3$10=["for"],_hoisted_4$W={class:"bool-field-title"},_hoisted_5$P=["id","onUpdate:modelValue"],_hoisted_6$J=["for","title"],_hoisted_7$F=["id","onUpdate:modelValue"],_hoisted_8$z=["id","onUpdate:modelValue"],_hoisted_9$w=["for","title"],_hoisted_10$t={key:2,class:"flex-1 justify-center items-center flex flex-col gap-2 h-full"},_sfc_main$1u={__name:"listSegmentationsFields",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(le(ne.modelValue)),oe=e$b.ref(!1),ie=e$b.ref(null);function le(_e){return JSON.parse(JSON.stringify(_e))}function ce(_e){if(typeof _e=="boolean")return _e;if(typeof _e=="number")return _e===1;if(typeof _e=="string"){const ge=_e.trim().toLowerCase();if(["true","1","yes","y","sim"].includes(ge))return!0;if(["false","0","no","n","nao","não"].includes(ge))return!1}return!1}function de(_e){Array.isArray(_e)&&_e.forEach(ge=>{(ge==null?void 0:ge.type)==="bool"&&(ge.content=ce(ge.content))})}function ue(_e){return _e!=null&&String(_e).trim()!==""}function ve(_e){return _e==="string"?"texto":_e==="float"?"número":_e==="list"?"lista":"Desconhecido"}function me(_e){if(!_e)return;_e.style.height="auto";const ge=parseFloat(window.getComputedStyle(_e).minHeight)||0;_e.style.height=`${Math.max(_e.scrollHeight,ge)}px`}function be(_e){me(_e==null?void 0:_e.target)}function fe(){ie.value&&ie.value.querySelectorAll("textarea.floating-textarea").forEach(_e=>me(_e))}const pe=async()=>{try{oe.value=!0;const _e=await api.get(segmentation_field);re.value=_e.data,de(re.value),await e$b.nextTick(),fe()}catch(_e){console.error("Error fetching segmentation fields:",_e)}finally{oe.value=!1}};return e$b.onMounted(()=>{ne.modelValue.length===0&&pe(),de(re.value),e$b.nextTick(fe)}),e$b.watch(()=>ne.modelValue,_e=>{re.value=le(_e),de(re.value),e$b.nextTick(fe)},{deep:!0}),e$b.watch(re,_e=>{JSON.stringify(_e)!==JSON.stringify(ne.modelValue)&&ae("update:modelValue",le(_e))},{deep:!0}),(_e,ge)=>{const ke=e$b.resolveComponent("SimpleSelect");return oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1l,[e$b.createVNode(_sfc_main$1v)])):re.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,ref_key:"fieldsRoot",ref:ie},[ge[0]||(ge[0]=e$b.createElementVNode("header",{class:"header-segmentation-fields bg-base-200"},[e$b.createElementVNode("p",{class:"text-[13px] font-semibold"},"Campos Personalizados")],-1)),e$b.createElementVNode("div",_hoisted_2$18,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(re.value,$e=>(e$b.openBlock(),e$b.createElementBlock("section",{key:$e.id},[e$b.createElementVNode("div",{class:e$b.normalizeClass(["segmentation-field-row",$e.type==="bool"?"segmentation-field-row--bool":"segmentation-field-row--input"])},[$e.type==="bool"?(e$b.openBlock(),e$b.createElementBlock("label",{key:0,for:"seg-label-"+$e.id,class:"bool-field bg-base-300 @apply shadow shadow-gray-900 dark:shadow-gray-400",title:"verdadeiro/falso"},[e$b.createElementVNode("span",_hoisted_4$W,e$b.toDisplayString($e.name),1),e$b.withDirectives(e$b.createElementVNode("input",{id:"seg-label-"+$e.id,class:"bool-switch-input",type:"checkbox","onUpdate:modelValue":ye=>$e.content=ye},null,8,_hoisted_5$P),[[e$b.vModelCheckbox,$e.content]])],8,_hoisted_3$10)):$e.type==="list"?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[e$b.createElementVNode("label",{for:"seg-label-"+$e.id,class:"field-caption",title:ve($e.type)},e$b.toDisplayString($e.name),9,_hoisted_6$J),e$b.createVNode(ke,{id:"seg-label-"+$e.id,modelValue:$e.content,"onUpdate:modelValue":ye=>$e.content=ye,options:$e.additional_info.list.options.map(ye=>({value:ye,name:ye})),placeholder:"Selecione uma opção",overlay:!0,theme:"bg-base-300 border-base-300"},null,8,["id","modelValue","onUpdate:modelValue","options"])],64)):(e$b.openBlock(),e$b.createElementBlock("div",{key:2,class:e$b.normalizeClass(["floating-control",{"has-value":ue($e.content)}])},[$e.type==="string"?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("textarea",{key:0,id:"seg-label-"+$e.id,class:"floating-input bg-base-300 floating-textarea",placeholder:" ",rows:"1","onUpdate:modelValue":ye=>$e.content=ye,onInput:be},null,40,_hoisted_7$F)),[[e$b.vModelText,$e.content]]):$e.type==="float"?e$b.withDirectives((e$b.openBlock(),e$b.createElementBlock("input",{key:1,id:"seg-label-"+$e.id,class:"floating-input bg-base-300",type:"number",step:"any",placeholder:" ","onUpdate:modelValue":ye=>$e.content=ye},null,8,_hoisted_8$z)),[[e$b.vModelText,$e.content]]):e$b.createCommentVNode("",!0),e$b.createElementVNode("label",{for:"seg-label-"+$e.id,class:"floating-label",title:ve($e.type)},e$b.toDisplayString($e.name),9,_hoisted_9$w)],2))],2)]))),128))])],512)):(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_10$t,[...ge[1]||(ge[1]=[e$b.createElementVNode("p",{class:"text-gray-200 text-xs md:text-base font-sans"}," Nenhum item encontrado ",-1),e$b.createElementVNode("p",{class:"text-gray-200 text-[10px] md:text-xs font-sans"},[e$b.createTextVNode(" Comece criando seu primeiro na aba "),e$b.createElementVNode("strong",null,"Campos Personalizados")],-1)])]))}}},ListSegmentationsFields=_export_sfc$1(_sfc_main$1u,[["__scopeId","data-v-52c2538d"]]),_hoisted_1$1k={class:"wallet-modal-header-content"},_hoisted_2$17={class:"wallet-modal-subtitle"},_hoisted_3$$={class:"wallet-modal-body"},_hoisted_4$V={key:0,class:"wallet-info"},_hoisted_5$O={class:"wallet-info__text"},_hoisted_6$I={key:1,class:"wallet-info"},_hoisted_7$E={class:"wallet-select-group"},_hoisted_8$y={key:0,class:"wallet-select-label"},_hoisted_9$v={key:1,class:"wallet-locked-field bg-base-300"},_hoisted_10$s={class:"wallet-locked-field__value"},_hoisted_11$q={key:3,class:"wallet-warning"},_hoisted_12$o={key:2,class:"wallet-note"},_hoisted_13$l={key:3,class:"wallet-select-group"},_hoisted_14$k={key:0,class:"wallet-select-label"},_hoisted_15$i={key:1,class:"wallet-locked-field bg-base-300"},_hoisted_16$g={class:"wallet-locked-field__value"},_hoisted_17$a={key:2,class:"wallet-locked-field wallet-locked-field--muted bg-base-300"},_hoisted_18$a={key:4,class:"wallet-info wallet-info--neutral"},_hoisted_19$9={class:"wallet-info__text"},_hoisted_20$9={class:"wallet-modal-footer w-full"},_hoisted_21$8=["disabled"],_hoisted_22$6=["disabled"],_hoisted_23$5={key:0,class:"wallet-spinner wallet-spinner--sm"},_hoisted_24$5={key:1},_sfc_main$1t={__name:"walletCreateModal",props:{isOpen:{type:Boolean,default:!1},contactId:{type:[String,Number],default:""},existingWallets:{type:Array,default:()=>[]},currentAttendance:{type:Object,default:()=>null},attendants:{type:Array,default:()=>[]},loggedAttendant:{type:Object,default:()=>null},loggedAttendantId:{type:[String,Number],default:null},hasDepartmentMembership:{type:Function,default:()=>!1},isDepartmentSupervisor:{type:Function,default:()=>!1}},emits:["update:isOpen","saved"],setup(ee,{emit:te}){const ne=ee,ae=te,re=useDepartmentStore(),oe=e$b.ref(!1),ie=e$b.ref([]),le=e$b.ref([]),ce=e$b.computed(()=>ne.existingWallets||[]),de=e$b.computed(()=>{var qe,Ge;return((qe=ne.currentAttendance)==null?void 0:qe.departmentId)??((Ge=ne.currentAttendance)==null?void 0:Ge.department_id)??null}),ue=e$b.computed(()=>{var qe,Ge;return((qe=ne.currentAttendance)==null?void 0:qe.departmentName)??((Ge=ne.currentAttendance)==null?void 0:Ge.department_name)??""});e$b.computed(()=>{var qe,Ge;return((qe=ne.currentAttendance)==null?void 0:qe.attendantName)??((Ge=ne.currentAttendance)==null?void 0:Ge.attendant_name)??""});const ve=e$b.computed(()=>!!de.value),me=e$b.computed(()=>!ne.currentAttendance),be=e$b.computed(()=>{var qe;return((qe=ne.loggedAttendant)==null?void 0:qe.name)||"Atendente não encontrado"}),fe=e$b.computed(()=>re.departments.filter(qe=>(qe==null?void 0:qe.wallets_enabled)!==!0).map(qe=>qe.id)),pe=e$b.computed(()=>le.value.filter(qe=>(qe==null?void 0:qe.wallets_enabled)===!0)),_e=e$b.computed(()=>de.value&&re.departments.find(qe=>String(qe.id)===String(de.value))||null),ge=e$b.computed(()=>{var qe;return((qe=_e.value)==null?void 0:qe.wallets_enabled)===!0}),ke=e$b.computed(()=>{var qe;return ve.value?de.value:((qe=pe.value[0])==null?void 0:qe.id)??null}),$e=e$b.computed(()=>me.value?!0:ne.isDepartmentSupervisor(ke.value)),ye=e$b.computed(()=>{const qe=ke.value;return qe?ce.value.filter(Ge=>String(Ge.department_id)===String(qe)):[]}),Ee=e$b.computed(()=>ye.value.length>0),Se=e$b.computed(()=>{const qe=new Set;return ye.value.forEach(Ge=>{(Ge==null?void 0:Ge.attendant_id)!=null&&qe.add(String(Ge.attendant_id))}),$e.value||(ne.attendants.forEach(Ge=>{String(Ge.id)!==String(ne.loggedAttendantId)&&qe.add(String(Ge.id))}),Ee.value&&ne.loggedAttendantId!=null&&qe.add(String(ne.loggedAttendantId))),Array.from(qe)}),Le=e$b.computed(()=>!ve.value&&!ke.value),Me=e$b.computed(()=>$e.value?ie.value[0]??null:ne.loggedAttendant),De=e$b.computed(()=>{var qe;return((qe=Me.value)==null?void 0:qe.id)??null}),Oe=e$b.computed(()=>String(De.value)===String(ne.loggedAttendantId)),Re=e$b.computed(()=>$e.value?"Neste fluxo, você pode atribuir qualquer atendente do departamento selecionado.":ke.value&&!ne.hasDepartmentMembership(ke.value)?"Você não pertence ao departamento selecionado, então não pode criar carteira nele.":Ee.value?"Este contato já possui um vínculo de carteira nesse departamento.":"Neste fluxo, o atendente responsável deve ser você."),ze=e$b.computed(()=>!$e.value),Ve=e$b.computed(()=>!$e.value&&Ee.value?"Já vinculado no departamento":$e.value?"Já encarteirado":"Somente você"),Ne=e$b.computed(()=>{var Ze;if(!ne.contactId||!Me.value||!ke.value)return!1;const qe=(Ze=Me.value)==null?void 0:Ze.id,Ge=ke.value;return!$e.value&&(!ne.loggedAttendantId||!Oe.value||!ne.hasDepartmentMembership(Ge)||Ee.value)?!1:!ce.value.some(Xe=>String(Xe.attendant_id)===String(qe)&&String(Xe.department_id)===String(Ge))}),Pe=()=>{ie.value=[],le.value=[],oe.value=!1},Be=()=>{if(!ve.value)return;const qe=_e.value;le.value=qe?[qe]:[]},Ae=()=>{$e.value||(ie.value=ne.loggedAttendant?[ne.loggedAttendant]:[])},xe=()=>{ae("update:isOpen",!1)},Ce=qe=>{ie.value=qe},Fe=qe=>{if(le.value=qe,$e.value){ie.value=[];return}Ae()},Ie=async()=>{var Xe,Ue,at;if(!Ne.value||!ne.contactId)return;const qe=(Xe=Me.value)==null?void 0:Xe.id,Ge=ke.value,Ze=contactWalletUrl(ne.contactId);try{oe.value=!0,await api.post(Ze,{attendant_id:qe,department_id:Ge}),notiwind.notify({group:"success",title:"Sucesso",text:"Contato encarteirado com sucesso."},4e3),ae("saved",{attendant_id:qe,department_id:Ge}),xe()}catch(Je){notiwind.notify({group:"error",title:"Falhou",text:((at=(Ue=Je==null?void 0:Je.response)==null?void 0:Ue.data)==null?void 0:at.message)||"Não foi possível encarteirar o contato."},4e3),console.error("Erro ao encarteirar contato:",Je)}finally{oe.value=!1}};return e$b.watch(()=>ne.isOpen,qe=>{if(qe){Be(),Ae();return}Pe()}),e$b.watch(()=>[de.value,re.departments.length],()=>{Be()}),e$b.watch(()=>[$e.value,ne.loggedAttendantId,ne.loggedAttendant],()=>{Ae()}),(qe,Ge)=>{const Ze=e$b.resolveComponent("departSelect"),Xe=e$b.resolveComponent("attendantSelect"),Ue=e$b.resolveComponent("SimpleModal");return e$b.openBlock(),e$b.createBlock(Ue,{size:"md:w-[450px]",isOpen:ee.isOpen,"onUpdate:isOpen":Ge[0]||(Ge[0]=at=>ae("update:isOpen",at))},{header:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_1$1k,[Ge[2]||(Ge[2]=e$b.createElementVNode("div",{class:"wallet-modal-header-icon"},[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 14a3 3 0 0 1 3-3h4a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a3 3 0 0 1-3-3Zm3-1a1 1 0 1 0 0 2h4v-2h-4Z","clip-rule":"evenodd"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.293 3.293a1 1 0 0 1 1.414 0L16.414 6h-2.828l-1.293-1.293a1 1 0 0 1 0-1.414ZM12.414 6 9.707 3.293a1 1 0 0 0-1.414 0L5.586 6h6.828ZM4.586 7l-.056.055A2 2 0 0 0 3 9v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2h-4a5 5 0 0 1 0-10h4a2 2 0 0 0-1.53-1.945L17.414 7H4.586Z","clip-rule":"evenodd"})])],-1)),e$b.createElementVNode("div",null,[Ge[1]||(Ge[1]=e$b.createElementVNode("h2",{class:"wallet-modal-title"},"Encarteirar contato",-1)),e$b.createElementVNode("p",_hoisted_2$17,e$b.toDisplayString(ve.value?"Vincule o contato a um atendente":"Vincule o contato a um atendente e departamento"),1)])])]),body:e$b.withCtx(()=>[e$b.createElementVNode("section",_hoisted_3$$,[ve.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_4$V,[Ge[5]||(Ge[5]=e$b.createElementVNode("p",{class:"wallet-info__title"},"Departamento fixo neste atendimento",-1)),e$b.createElementVNode("p",_hoisted_5$O,[Ge[3]||(Ge[3]=e$b.createTextVNode(" O contato será encarteirado no departamento ",-1)),e$b.createElementVNode("strong",null,e$b.toDisplayString(ue.value||"atual da conversa"),1),Ge[4]||(Ge[4]=e$b.createTextVNode(". Neste fluxo, esse departamento não pode ser alterado. ",-1))]),Ge[6]||(Ge[6]=e$b.createElementVNode("p",{class:"wallet-info__text"}," Depois do vínculo, os atendimentos deste contato que entrarem nesse departamento serão direcionados apenas para o atendente selecionado na carteira. ",-1))])):me.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$I,[...Ge[7]||(Ge[7]=[e$b.createElementVNode("p",{class:"wallet-info__title"},"Departamento definido neste vínculo",-1),e$b.createElementVNode("p",{class:"wallet-info__text"}," Como este vínculo está sendo criado fora de um atendimento, selecione o departamento em que o contato será encarteirado. ",-1),e$b.createElementVNode("p",{class:"wallet-info__text"}," Depois do vínculo, os atendimentos deste contato que entrarem nesse departamento, serão direcionados apenas para o atendente selecionado na carteira. ",-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_7$E,[ve.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("label",_hoisted_8$y," Departamento (com carteiras habilitadas) ")),ve.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_9$v,[Ge[8]||(Ge[8]=e$b.createElementVNode("span",{class:"wallet-locked-field__label"},"Departamento da conversa",-1)),e$b.createElementVNode("strong",_hoisted_10$s,e$b.toDisplayString(ue.value||"Departamento não encontrado"),1)])):(e$b.openBlock(),e$b.createBlock(Ze,{key:2,multiSelect:!1,preselect:!1,variant:"dropdown",maxHeight:"300px",disabledItems:fe.value,disabledReason:"Carteiras não habilitadas",onDepart:Fe},null,8,["disabledItems"])),!ve.value&&le.value.length>0&&pe.value.length===0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$q," O departamento selecionado não possui carteiras habilitadas. ")):e$b.createCommentVNode("",!0)]),ve.value&&!ge.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$o," O departamento atual desta conversa não suporta encarteiramento porque não possui carteiras habilitadas. ")):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$l,[$e.value&&!Le.value?(e$b.openBlock(),e$b.createElementBlock("label",_hoisted_14$k,"Atendente responsável")):e$b.createCommentVNode("",!0),$e.value?Le.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$a,[...Ge[10]||(Ge[10]=[e$b.createElementVNode("p",{class:"wallet-locked-field__value"}," Selecione um departamento para liberar os atendentes ",-1)])])):(e$b.openBlock(),e$b.createBlock(Xe,{key:3,multiSelect:!1,preselect:!1,department:pe.value,disabledItems:Se.value,disabledReason:Ve.value,variant:"dropdown",maxHeight:"210px",onAttend:Ce},null,8,["department","disabledItems","disabledReason"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$i,[Ge[9]||(Ge[9]=e$b.createElementVNode("span",{class:"wallet-locked-field__label"},"Atendente responsável",-1)),e$b.createElementVNode("strong",_hoisted_16$g,e$b.toDisplayString(be.value),1)]))])),ze.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$a,[Ge[11]||(Ge[11]=e$b.createElementVNode("p",{class:"wallet-info__title"},"Permissões deste vínculo",-1)),e$b.createElementVNode("p",_hoisted_19$9,e$b.toDisplayString(Re.value),1)])):e$b.createCommentVNode("",!0)])]),footer:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_20$9,[e$b.createElementVNode("button",{class:"wallet-btn wallet-btn-secondary",disabled:oe.value,onClick:xe}," Cancelar ",8,_hoisted_21$8),e$b.createElementVNode("button",{class:"wallet-btn wallet-btn-primary",disabled:!Ne.value||oe.value,onClick:Ie},[oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_23$5)):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_24$5,"Salvar vínculo"))],8,_hoisted_22$6)])]),_:1},8,["isOpen"])}}},WalletCreateModal=_export_sfc$1(_sfc_main$1t,[["__scopeId","data-v-314a95d9"]]),_hoisted_1$1j={class:"wallet-card__header"},_hoisted_2$16=["title"],_hoisted_3$_={class:"wallet-card__body"},_hoisted_4$U={class:"wallet-card__main"},_hoisted_5$N={class:"wallet-card__avatar"},_hoisted_6$H={class:"wallet-card__info text-start"},_hoisted_7$D=["title"],_hoisted_8$x={class:"wallet-card__actions"},_hoisted_9$u=["disabled"],_hoisted_10$r={class:"wallet-card__modal-content bg-base-200 rounded-b-xl"},_hoisted_11$p={class:"flex flex-col gap-2 p-2"},_hoisted_12$n={class:"wallet-card__modal-preview"},_hoisted_13$k={class:"wallet-card__modal-info-group"},_hoisted_14$j={class:"wallet-card__modal-info-item"},_hoisted_15$h=["title"],_hoisted_16$f={class:"wallet-card__modal-preview-card"},_hoisted_17$9={class:"wallet-card__modal-preview-main -mt-1"},_hoisted_18$9={class:"wallet-card__modal-avatar"},_hoisted_19$8={class:"wallet-card__modal-info text-start"},_hoisted_20$8=["title"],_hoisted_21$7={class:"wallet-card__modal-actions bg-base-300 rounded-b-xl"},_hoisted_22$5=["disabled"],_hoisted_23$4=["disabled"],_hoisted_24$4={key:0},_hoisted_25$3={key:1},_sfc_main$1s={__name:"walletCard",props:{wallet:{type:Object,required:!0},variant:{type:String,default:"default"},showDate:{type:Boolean,default:!0},isRemoving:{type:Boolean,default:!1},canRemove:{type:Boolean,default:!1}},emits:["remove"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.attendantName)||"Atendente nao informado"}),oe=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.attendantPhoto)||null}),ie=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.departmentName)||"Departamento nao informado"}),le=e$b.computed(()=>{var pe;return((pe=ne.wallet)==null?void 0:pe.updatedAt)||null}),ce=pe=>{if(!pe)return null;const _e=new Date(pe);return Number.isNaN(_e.getTime())?null:new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(_e)};e$b.computed(()=>ce(le.value));const de=e$b.computed(()=>{var pe;return ne.canRemove&&!!((pe=ne.wallet)!=null&&pe.departmentId)}),ue=e$b.computed(()=>{const pe=["wallet-card","bg-base-300"];return ne.variant==="primary"&&pe.push("wallet-card--primary"),pe}),ve=e$b.ref(!1),me=()=>{!de.value||ne.isRemoving||(ve.value=!0)},be=()=>{ne.isRemoving||(ve.value=!1)},fe=()=>{!de.value||ne.isRemoving||(ve.value=!1,ae("remove",ne.wallet))};return(pe,_e)=>(e$b.openBlock(),e$b.createElementBlock("article",{class:e$b.normalizeClass(ue.value)},[e$b.createElementVNode("header",_hoisted_1$1j,[_e[0]||(_e[0]=e$b.createElementVNode("p",{class:"wallet-card__label"},"Departamento",-1)),e$b.createElementVNode("p",{class:"wallet-card__department rounded-xl bg-sky-500 px-2 p-1",title:ie.value},e$b.toDisplayString(ie.value),9,_hoisted_2$16)]),_e[8]||(_e[8]=e$b.createElementVNode("hr",{class:"border-none w-[70%] flex mx-auto justify-center bg-base-100/70 rounded-xl h-0.5"},null,-1)),e$b.createElementVNode("div",_hoisted_3$_,[e$b.createElementVNode("div",_hoisted_4$U,[e$b.createElementVNode("div",_hoisted_5$N,[e$b.createVNode(Avatar,{photo:oe.value,name:re.value,size:"fill",class:"size-10"},null,8,["photo","name"])]),e$b.createElementVNode("div",_hoisted_6$H,[e$b.createElementVNode("p",{class:"wallet-card__name",title:re.value},e$b.toDisplayString(re.value),9,_hoisted_7$D),_e[1]||(_e[1]=e$b.createElementVNode("p",{class:"wallet-card__role flex gap-1"},[e$b.createTextVNode(" Responsável "),e$b.createElementVNode("span",{class:"sm:block hidden"},"pelo atendimento")],-1))])]),e$b.createElementVNode("div",_hoisted_8$x,[ne.canRemove?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"wallet-card__remove-btn",disabled:ee.isRemoving||!de.value,onClick:me},e$b.toDisplayString(ee.isRemoving?"Removendo...":"Remover da carteira"),9,_hoisted_9$u)):e$b.createCommentVNode("",!0)])]),e$b.createVNode(e$b.Transition,{name:"fade"},{default:e$b.withCtx(()=>[ve.value?(e$b.openBlock(),e$b.createBlock(MinModal,{key:0,defineWidth:"max-w-sm",onClose:be},{header:e$b.withCtx(()=>[..._e[2]||(_e[2]=[e$b.createElementVNode("div",{class:"wallet-card__modal-header"},[e$b.createElementVNode("div",{class:"wallet-card__modal-icon"},[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0V8Zm-1 7a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H12Z","clip-rule":"evenodd"})])]),e$b.createElementVNode("p",{class:"wallet-card__modal-title"}," Remover atendente da carteira ")],-1)])]),body:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_10$r,[e$b.createElementVNode("section",_hoisted_11$p,[_e[7]||(_e[7]=e$b.createElementVNode("div",{class:"wallet-card__modal-message"},[e$b.createElementVNode("p",{class:"wallet-card__modal-text"}," Você está removendo o responsável por este atendimento neste departamento. Esta ação não pode ser desfeita. ")],-1)),e$b.createElementVNode("div",_hoisted_12$n,[_e[6]||(_e[6]=e$b.createElementVNode("p",{class:"wallet-card__modal-preview-label"}," Informações da remoção: ",-1)),e$b.createElementVNode("div",_hoisted_13$k,[e$b.createElementVNode("div",_hoisted_14$j,[_e[3]||(_e[3]=e$b.createElementVNode("span",{class:"wallet-card__modal-info-label"},"Departamento:",-1)),e$b.createElementVNode("p",{class:"wallet-card__modal-info-value",title:ie.value},e$b.toDisplayString(ie.value),9,_hoisted_15$h)])]),e$b.createElementVNode("div",_hoisted_16$f,[_e[5]||(_e[5]=e$b.createElementVNode("p",{class:"wallet-card__modal-preview-card-label"}," Atendente responsável: ",-1)),e$b.createElementVNode("div",_hoisted_17$9,[e$b.createElementVNode("div",_hoisted_18$9,[e$b.createVNode(Avatar,{photo:oe.value,name:re.value,size:"fill",class:"size-12"},null,8,["photo","name"])]),e$b.createElementVNode("div",_hoisted_19$8,[e$b.createElementVNode("p",{class:"wallet-card__modal-name",title:re.value},e$b.toDisplayString(re.value),9,_hoisted_20$8),_e[4]||(_e[4]=e$b.createElementVNode("p",{class:"wallet-card__modal-role"}," Responsável pelo atendimento ",-1))])])])])]),e$b.createElementVNode("div",_hoisted_21$7,[e$b.createElementVNode("button",{class:"wallet-card__modal-btn wallet-card__modal-btn--cancel",disabled:ee.isRemoving,onClick:be}," Cancelar ",8,_hoisted_22$5),e$b.createElementVNode("button",{class:"wallet-card__modal-btn wallet-card__modal-btn--danger",disabled:ee.isRemoving||!de.value,onClick:fe},[ee.isRemoving?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_25$3,"Removendo...")):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_24$4,"Remover atendente"))],8,_hoisted_23$4)])])]),_:1})):e$b.createCommentVNode("",!0)]),_:1})],2))}},WalletCard=_export_sfc$1(_sfc_main$1s,[["__scopeId","data-v-986d3a33"]]),_hoisted_1$1i={class:"wallet-section"},_hoisted_2$15={class:"wallet-box bg-base-200"},_hoisted_3$Z={class:"wallet-header"},_hoisted_4$T={class:"wallet-header__actions"},_hoisted_5$M=["disabled"],_hoisted_6$G=["disabled"],_hoisted_7$C={key:0,class:"wallet-empty-state"},_hoisted_8$w={key:1,class:"wallet-loading-state"},_hoisted_9$t={key:2,class:"wallet-error-state"},_hoisted_10$q={class:"wallet-error-text"},_hoisted_11$o={key:3,class:"wallet-empty-state"},_hoisted_12$m={key:4,class:"wallet-list"},_sfc_main$1r={__name:"walletSection",props:{contactId:{type:[String,Number],default:""},currentAttendance:{type:Object,default:()=>null},supervisor:{type:Boolean,default:!1},pageState:{type:String,default:"data"}},setup(ee){const te=ee,ne=useAttendantStore(),ae=useDepartmentStore(),re=e$b.ref([]),oe=e$b.ref(!1),ie=e$b.ref(""),le=e$b.ref(null),ce=e$b.ref([]),de=e$b.ref(!1),ue=e$b.computed(()=>{var Be;return((Be=ne.logged_attendant)==null?void 0:Be.call(ne))||null}),ve=e$b.computed(()=>{var Be;return((Be=ue.value)==null?void 0:Be.id)??null}),me=e$b.computed(()=>{var Be;return Array.isArray((Be=ue.value)==null?void 0:Be.department)?ue.value.department:[]}),be=Be=>!Be||!ve.value?null:me.value.find(Ae=>String(Ae==null?void 0:Ae.id)===String(Be))||null,fe=Be=>!!be(Be),pe=Be=>{var Ae;return((Ae=be(Be))==null?void 0:Ae.permission)==="supervisor"},_e=e$b.computed(()=>!te.currentAttendance),ge=Be=>_e.value||pe(Be),ke=Be=>Array.isArray(Be)?Be:Array.isArray(Be==null?void 0:Be.wallet)?Be.wallet:Array.isArray(Be==null?void 0:Be.results)?Be.results:[],$e=(Be,Ae)=>{if(Be!=null&&Be.id)return Be.id;const xe=(Be==null?void 0:Be.attendant_id)||"attendant",Ce=(Be==null?void 0:Be.department_id)||"department";return`${xe}-${Ce}-${Ae}`},ye=Be=>Be?ne.attendants.find(Ae=>String(Ae.id)===String(Be)):null,Ee=Be=>Be?ae.departments.find(Ae=>String(Ae.id)===String(Be)):null,Se=()=>{var Be,Ae,xe,Ce;return te.currentAttendance&&(((Be=te.currentAttendance)==null?void 0:Be.department_id)||((Ae=te.currentAttendance)==null?void 0:Ae.departmentId)||((Ce=(xe=te.currentAttendance)==null?void 0:xe.department)==null?void 0:Ce.id))||null},Le=()=>{const Be=re.value;if(_e.value)return Be;const Ae=Se(),xe=me.value.filter(Ce=>(Ce==null?void 0:Ce.permission)==="supervisor").map(Ce=>String(Ce==null?void 0:Ce.id));if(xe.length>0){const Ce=new Set(xe);return Ae&&Ce.add(String(Ae)),Be.filter(Fe=>Ce.has(String(Fe==null?void 0:Fe.department_id)))}return Ae?Be.filter(Ce=>String(Ce==null?void 0:Ce.department_id)===String(Ae)):[]},Me=e$b.computed(()=>Le().map((Be,Ae)=>{const xe=Be==null?void 0:Be.attendant_id,Ce=Be==null?void 0:Be.department_id,Fe=ye(xe),Ie=Ee(Ce),qe=(Fe==null?void 0:Fe.name)||"Atendente não encontrado",Ge=(Ie==null?void 0:Ie.name)||"Departamento não encontrado",Ze=(Fe==null?void 0:Fe.photo)||null,Xe=(Be==null?void 0:Be.updated_at)||(Be==null?void 0:Be.created_at)||null;return{id:$e(Be,Ae),attendantId:xe,departmentId:Ce,attendantName:qe,attendantPhoto:Ze,departmentName:Ge,updatedAt:Xe,canRemove:ge(Ce)||fe(Ce)&&String(xe)===String(ve.value)}})),De=async()=>{const Be=[];!ne.loaded&&ne.attendants.length===0&&Be.push(ne.fetchAttendants().then(()=>{ne.loaded=!0})),!ae.loaded&&ae.departments.length===0&&Be.push(ae.fetchDepartments().then(()=>{ae.loaded=!0})),Be.length>0&&await Promise.all(Be)},Oe=async({force:Be=!1}={})=>{var xe,Ce;const Ae=te.contactId;if(!Ae){re.value=[],ie.value="",le.value=null;return}if(!(!Be&&le.value===Ae&&ie.value===""))try{oe.value=!0,ie.value="";const[,{data:Fe}]=await Promise.all([De(),api.get(contactWalletUrl(Ae))]);re.value=ke(Fe),le.value=Ae}catch(Fe){ie.value=((Ce=(xe=Fe==null?void 0:Fe.response)==null?void 0:xe.data)==null?void 0:Ce.message)||"Não foi possível carregar as relações de carteira.",console.error("Erro ao buscar carteira do contato:",Fe)}finally{oe.value=!1}},Re=Be=>ce.value.includes(Be),ze=(Be,Ae)=>{if(Be){if(Ae){ce.value.includes(Be)||(ce.value=[...ce.value,Be]);return}ce.value=ce.value.filter(xe=>xe!==Be)}},Ve=()=>{de.value=!0},Ne=Be=>{const Ae=Be==null?void 0:Be.attendant_id,xe=Be==null?void 0:Be.department_id;if(!Ae||!xe)return;const Ce=re.value.findIndex(Fe=>(Fe==null?void 0:Fe.department_id)===xe);if(Ce>=0){re.value=re.value.map((Fe,Ie)=>Ie===Ce?{...Fe,attendant_id:Ae,department_id:xe}:Fe);return}re.value=[...re.value,{attendant_id:Ae,department_id:xe}]},Pe=async Be=>{var Fe,Ie,qe,Ge;const Ae=te.contactId,xe=Be==null?void 0:Be.departmentId,Ce=ge(xe)||fe(xe)&&String(Be==null?void 0:Be.attendantId)===String(ve.value);if(!(!Ae||!xe||Re(xe)||!Ce))try{ze(xe,!0),ie.value="";const Ze=contactWalletUrl(Ae),Xe={department_id:xe,attendant_id:null};try{await api.post(Ze,Xe)}catch(Ue){ie.value=((Ie=(Fe=Ue==null?void 0:Ue.response)==null?void 0:Fe.data)==null?void 0:Ie.message)||"Não foi possível remover o responsável da carteira.",console.error("Erro na requisição para remover da carteira:",Ue);return}re.value=re.value.filter(Ue=>(Ue==null?void 0:Ue.department_id)!==xe)}catch(Ze){ie.value=((Ge=(qe=Ze==null?void 0:Ze.response)==null?void 0:qe.data)==null?void 0:Ge.message)||"Não foi possível remover o responsável da carteira.",console.error("Erro ao remover relação da carteira:",Ze)}finally{ze(xe,!1)}};return e$b.watch(()=>[te.pageState,te.contactId],async([Be,Ae])=>{Be==="wallet"&&Ae&&Oe()},{immediate:!0}),(Be,Ae)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1i,[e$b.createElementVNode("section",_hoisted_2$15,[e$b.createElementVNode("header",_hoisted_3$Z,[Ae[5]||(Ae[5]=e$b.createStaticVNode('<div class="wallet-header__text" data-v-c68e2f8c><div class="wallet-header__icon" data-v-c68e2f8c><svg class="size-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24" data-v-c68e2f8c><path fill-rule="evenodd" d="M12 14a3 3 0 0 1 3-3h4a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a3 3 0 0 1-3-3Zm3-1a1 1 0 1 0 0 2h4v-2h-4Z" clip-rule="evenodd" data-v-c68e2f8c></path><path fill-rule="evenodd" d="M12.293 3.293a1 1 0 0 1 1.414 0L16.414 6h-2.828l-1.293-1.293a1 1 0 0 1 0-1.414ZM12.414 6 9.707 3.293a1 1 0 0 0-1.414 0L5.586 6h6.828ZM4.586 7l-.056.055A2 2 0 0 0 3 9v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2h-4a5 5 0 0 1 0-10h4a2 2 0 0 0-1.53-1.945L17.414 7H4.586Z" clip-rule="evenodd" data-v-c68e2f8c></path></svg></div><div data-v-c68e2f8c><h3 class="wallet-title" data-v-c68e2f8c>Carteira do contato</h3><p class="wallet-subtitle" data-v-c68e2f8c> Atendentes responsáveis por este contato e seus respectivos departamentos </p></div></div>',1)),e$b.createElementVNode("div",_hoisted_4$T,[e$b.createElementVNode("button",{class:"wallet-add-btn",disabled:!te.contactId||oe.value,onClick:Ve},[...Ae[3]||(Ae[3]=[e$b.createElementVNode("svg",{class:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1),e$b.createElementVNode("span",null,"Adicionar",-1)])],8,_hoisted_5$M),e$b.createElementVNode("button",{class:"wallet-refresh-btn",disabled:oe.value||!te.contactId,onClick:Ae[0]||(Ae[0]=xe=>Oe({force:!0}))},[...Ae[4]||(Ae[4]=[e$b.createElementVNode("svg",{class:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),e$b.createElementVNode("span",null,"Atualizar",-1)])],8,_hoisted_6$G)])]),te.contactId?oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_8$w,[...Ae[7]||(Ae[7]=[e$b.createElementVNode("div",{class:"wallet-spinner"},null,-1),e$b.createElementVNode("p",{class:"wallet-loading-text"},"Carregando carteira...",-1)])])):ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_9$t,[Ae[8]||(Ae[8]=e$b.createElementVNode("svg",{class:"wallet-error-icon",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("p",_hoisted_10$q,e$b.toDisplayString(ie.value),1),e$b.createElementVNode("button",{class:"wallet-retry-btn",onClick:Ae[1]||(Ae[1]=xe=>Oe({force:!0}))}," Tentar novamente ")])):Me.value.length===0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$o,[...Ae[9]||(Ae[9]=[e$b.createElementVNode("svg",{class:"wallet-empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})],-1),e$b.createElementVNode("p",{class:"wallet-empty-text"}," Nenhuma relação de carteira encontrada para este contato. ",-1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$m,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Me.value,xe=>(e$b.openBlock(),e$b.createBlock(WalletCard,{key:xe.id,wallet:xe,"is-removing":Re(xe.departmentId),"can-remove":xe.canRemove,onRemove:Pe},null,8,["wallet","is-removing","can-remove"]))),128))])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_7$C,[...Ae[6]||(Ae[6]=[e$b.createElementVNode("svg",{class:"wallet-empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})],-1),e$b.createElementVNode("p",{class:"wallet-empty-text"}," Salve o contato para visualizar e editar a carteira. ",-1)])]))]),e$b.createVNode(WalletCreateModal,{isOpen:de.value,"onUpdate:isOpen":Ae[2]||(Ae[2]=xe=>de.value=xe),"contact-id":te.contactId,"existing-wallets":re.value,"current-attendance":te.currentAttendance,attendants:e$b.unref(ne).attendants,"logged-attendant":ue.value,"logged-attendant-id":ve.value,"has-department-membership":fe,"is-department-supervisor":pe,onSaved:Ne},null,8,["isOpen","contact-id","existing-wallets","current-attendance","attendants","logged-attendant","logged-attendant-id"])]))}},WalletSection=_export_sfc$1(_sfc_main$1r,[["__scopeId","data-v-c68e2f8c"]]),_hoisted_1$1h=["href"],_hoisted_2$14={key:0,class:"size-3 opacity-70 group-hover:opacity-100",viewBox:"0 0 16 16"},_hoisted_3$Y=["id"],_hoisted_4$S=["fill"],_hoisted_5$L={class:"instagram-user group-hover:underline"},_sfc_main$1q={__name:"instagramBadge",props:{instagramUserName:{type:String,required:!0},size:{type:String,default:"small",validator:ee=>["small","medium","large"].includes(ee)},hideSvg:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>({"instagram-badge":!0,"instagram-badge--medium":te.size==="medium","instagram-badge--large":te.size==="large"})),ae=e$b.computed(()=>`ig-grad-${Math.random().toString(36).slice(2,9)}`);return(re,oe)=>ee.instagramUserName?(e$b.openBlock(),e$b.createElementBlock("a",{key:0,target:"_blank",rel:"noopener noreferrer",href:`https://www.instagram.com/${ee.instagramUserName}/`,class:e$b.normalizeClass([ne.value,"group rt-transition"]),onClick:oe[0]||(oe[0]=e$b.withModifiers(()=>{},["stop"]))},[ee.hideSvg?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_2$14,[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:ae.value,x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[...oe[1]||(oe[1]=[e$b.createElementVNode("stop",{offset:"0%",style:{"stop-color":"#fd5949"}},null,-1),e$b.createElementVNode("stop",{offset:"50%",style:{"stop-color":"#d6249f"}},null,-1),e$b.createElementVNode("stop",{offset:"100%",style:{"stop-color":"#285aeb"}},null,-1)])],8,_hoisted_3$Y)]),e$b.createElementVNode("path",{fill:`url(#${ae.value})`,d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},null,8,_hoisted_4$S)])),e$b.createElementVNode("span",_hoisted_5$L," @"+e$b.toDisplayString(ee.instagramUserName),1)],10,_hoisted_1$1h)):e$b.createCommentVNode("",!0)}},InstagramBadge=_export_sfc$1(_sfc_main$1q,[["__scopeId","data-v-d98b827e"]]),_hoisted_1$1g={key:0,class:"telegram-badge group"},_hoisted_2$13={class:"telegram-user"},_sfc_main$1p={__name:"telegramBadge",props:{telegramUserName:{type:String,required:!0}},setup(ee){return(te,ne)=>ee.telegramUserName?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_1$1g,[e$b.createElementVNode("span",_hoisted_2$13,e$b.toDisplayString(ee.telegramUserName),1)])):e$b.createCommentVNode("",!0)}},TelegramBadge=_export_sfc$1(_sfc_main$1p,[["__scopeId","data-v-2a493a9f"]]),_hoisted_1$1f={class:"rounded-md bg-base-200 p-1 shadow-sm transition-shadow duration-200 hover:shadow-md"},_hoisted_2$12={class:"text-start w-full items-center justify-between flex p-1 pb-2"},_hoisted_3$X={class:"bindings-popover"},_hoisted_4$R={class:"bindings-header-row"},_hoisted_5$K={key:0},_hoisted_6$F={class:"bindings-list"},_hoisted_7$B={class:"bindings-card__top"},_hoisted_8$v={class:"bindings-card__instance"},_hoisted_9$s={key:0,class:"bindings-card__username"},_hoisted_10$p={key:0,class:"bindings-card__bsuid-row"},_hoisted_11$n={class:"bindings-card__bsuid-code"},_hoisted_12$l={key:1,class:"bindings-divider"},_hoisted_13$j={key:2},_hoisted_14$i={class:"bindings-platform-title"},_hoisted_15$g={class:"size-3",style:{fill:"url(#ig-grad)"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},_hoisted_16$e={class:"bindings-list"},_hoisted_17$8={class:"bindings-card__top"},_hoisted_18$8={class:"bindings-card__instance"},_hoisted_19$7={key:0,class:"bindings-card__username"},_hoisted_20$7={key:0,class:"bindings-card__bsuid-row"},_hoisted_21$6={class:"bindings-card__bsuid-code"},_hoisted_22$4={key:3,class:"bindings-divider"},_hoisted_23$3={key:4},_hoisted_24$3={class:"bindings-list"},_hoisted_25$2={class:"bindings-card__top"},_hoisted_26$1={class:"bindings-card__instance"},_hoisted_27$1={key:0,class:"bindings-card__username"},_hoisted_28$1={key:0,class:"bindings-card__bsuid-row"},_hoisted_29$1={class:"bindings-card__bsuid-code"},_hoisted_30$1={key:5,class:"bindings-divider"},_hoisted_31$1={key:6},_hoisted_32={class:"bindings-platform-title"},_hoisted_33={class:"size-3",style:{fill:"url(#wc-grad)"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640"},_hoisted_34={class:"bindings-list"},_hoisted_35={class:"bindings-card__top"},_hoisted_36={class:"bindings-card__instance"},_hoisted_37={key:0,class:"bindings-card__bsuid-row"},_hoisted_38={class:"bindings-card__bsuid-code"},_hoisted_39={style:{"border-bottom-right-radius":"0.35rem","border-bottom-left-radius":"0.35rem"},class:"flex w-full relative rounded-md bg-base-300"},_hoisted_40={key:1,class:"text-xs font-medium font-sans py-3 blur-sm select-none"},_hoisted_41={key:0,class:"flex w-full relative rounded-md bg-base-300 mt-1"},_hoisted_42={class:"flex items-center w-full px-1 py-1.5 text-sm"},_hoisted_43={key:1,class:"flex w-full relative rounded-md bg-base-300 mt-1"},_hoisted_44={class:"flex items-center w-full px-1 py-1.5 text-sm"},_hoisted_45={class:"segmentation-fields-container bg-base-200"},_hoisted_46={class:"list-products-container"},_sfc_main$1o={__name:"contactSection",props:e$b.mergeModels({hasCrmPlus:{type:Boolean,default:!1},handlerToggleButtons:{type:Array,default:()=>[]},allProducts:{type:Object,default:()=>({})},departmentBypass:{type:[String,Number,Boolean,Object],default:void 0},currentAttendance:{type:Object,default:()=>null},supervisor:{type:Boolean,default:!1},isLargeScreen:{type:Boolean,default:!0},viewContactNumber:{type:Boolean,default:!1},contactId:{type:[String,Number],default:""},contact:{type:Object,default:()=>null}},{pageState:{type:String,default:"data"},pageStateModifiers:{},telephone:{type:String,default:""},telephoneModifiers:{},country:{type:String,default:"br"},countryModifiers:{},instagramUserName:{type:String,default:""},instagramUserNameModifiers:{},segmentationFields:{type:Array,default:()=>[]},segmentationFieldsModifiers:{},products:{type:Array,default:()=>[]},productsModifiers:{}}),emits:["update:pageState","update:telephone","update:country","update:instagramUserName","update:segmentationFields","update:products"],setup(ee){const te=ee,ne=e$b.useModel(ee,"pageState"),ae=e$b.useModel(ee,"telephone"),re=e$b.useModel(ee,"country"),oe=e$b.useModel(ee,"instagramUserName"),ie=e$b.useModel(ee,"segmentationFields"),le=e$b.useModel(ee,"products"),ce=(_e,ge)=>{const ke=(ge==null?void 0:ge.number)||_e||"",$e=String(ke).replace(/[^\d\s()-]/g,"");ae.value=$e},de=useWhatsappBindings(()=>te.contact),ue=useInstagramBindings(()=>te.contact),ve=useTelegramBindings(()=>te.contact),me=useWebchatBindings(()=>te.contact),be=useHasContactBindings(de,ue,ve,me),fe=e$b.computed(()=>{var _e;return((_e=ve.value[0])==null?void 0:_e.user_name)||""}),pe=e$b.ref(!1);return(_e,ge)=>{const ke=e$b.resolveComponent("Popper"),$e=e$b.resolveComponent("vue-tel-input");return e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[ee.isLargeScreen&&ee.hasCrmPlus?(e$b.openBlock(),e$b.createBlock(ToggleListButtons,{key:0,class:"section-toggle",buttons:te.handlerToggleButtons,modelValue:ne.value,"onUpdate:modelValue":ge[0]||(ge[0]=ye=>ne.value=ye)},null,8,["buttons","modelValue"])):e$b.createCommentVNode("",!0),e$b.withDirectives(e$b.createElementVNode("div",{class:e$b.normalizeClass([te.hasCrmPlus?"pt-1":"pt-0","flex flex-col gap-2 flex-1 min-h-0 px-1.5 overflow-hidden"])},[e$b.createElementVNode("div",_hoisted_1$1f,[e$b.createElementVNode("h1",_hoisted_2$12,[ge[19]||(ge[19]=e$b.createElementVNode("p",{class:"text-xs font-semibold"},"Contatos",-1)),e$b.unref(be)?(e$b.openBlock(),e$b.createBlock(ke,{key:ne.value,class:"dark:popper-light popper-dark",placement:"bottom",offsetDistance:4},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_3$X,[e$b.createElementVNode("div",_hoisted_4$R,[ge[7]||(ge[7]=e$b.createElementVNode("p",{class:"bindings-header"},"IDs por conta conectada",-1)),e$b.createElementVNode("button",{type:"button",class:"bindings-help-btn",title:"O que é o BSUID?",onClick:ge[1]||(ge[1]=e$b.withModifiers(ye=>pe.value=!0,["stop"]))}," ? ")]),e$b.unref(de).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_5$K,[ge[9]||(ge[9]=e$b.createElementVNode("div",{class:"bindings-platform-title"},[e$b.createElementVNode("svg",{class:"size-3 text-emerald-400",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 17 17"},[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})]),e$b.createElementVNode("span",{class:"text-emerald-400"},"WhatsApp")],-1)),e$b.createElementVNode("ul",_hoisted_6$F,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(de),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--wa"},[e$b.createElementVNode("div",_hoisted_7$B,[e$b.createElementVNode("span",_hoisted_8$v,e$b.toDisplayString(ye.instanceName),1),ye.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$s,e$b.toDisplayString(ye.user_name),1)):e$b.createCommentVNode("",!0)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_10$p,[ge[8]||(ge[8]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"BSUID",-1)),e$b.createElementVNode("code",_hoisted_11$n,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0),e$b.unref(de).length&&e$b.unref(ue).length?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_12$l)):e$b.createCommentVNode("",!0),e$b.unref(ue).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_13$j,[e$b.createElementVNode("div",_hoisted_14$i,[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_15$g,[...ge[10]||(ge[10]=[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:"ig-grad",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[e$b.createElementVNode("stop",{offset:"0%","stop-color":"#f58529"}),e$b.createElementVNode("stop",{offset:"40%","stop-color":"#dd2a7b"}),e$b.createElementVNode("stop",{offset:"70%","stop-color":"#8134af"}),e$b.createElementVNode("stop",{offset:"100%","stop-color":"#515bd4"})])],-1),e$b.createElementVNode("path",{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},null,-1)])])),ge[11]||(ge[11]=e$b.createElementVNode("span",{class:"ig-gradient-text"},"Instagram",-1))]),e$b.createElementVNode("ul",_hoisted_16$e,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(ue),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--ig"},[e$b.createElementVNode("div",_hoisted_17$8,[e$b.createElementVNode("span",_hoisted_18$8,e$b.toDisplayString(ye.instanceName),1),ye.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_19$7,"@"+e$b.toDisplayString(ye.user_name),1)):e$b.createCommentVNode("",!0)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_20$7,[ge[12]||(ge[12]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"ID Instagram",-1)),e$b.createElementVNode("code",_hoisted_21$6,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0),e$b.unref(ve).length&&(e$b.unref(de).length||e$b.unref(ue).length)?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_22$4)):e$b.createCommentVNode("",!0),e$b.unref(ve).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_23$3,[ge[14]||(ge[14]=e$b.createElementVNode("div",{class:"bindings-platform-title"},[e$b.createElementVNode("svg",{class:"size-3 text-[#229ED9]",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})]),e$b.createElementVNode("span",{class:"text-[#229ED9]"},"Telegram")],-1)),e$b.createElementVNode("ul",_hoisted_24$3,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(ve),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--tg"},[e$b.createElementVNode("div",_hoisted_25$2,[e$b.createElementVNode("span",_hoisted_26$1,e$b.toDisplayString(ye.instanceName),1),ye.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_27$1,"@"+e$b.toDisplayString(ye.user_name),1)):e$b.createCommentVNode("",!0)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_28$1,[ge[13]||(ge[13]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"Chat ID",-1)),e$b.createElementVNode("code",_hoisted_29$1,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0),e$b.unref(me).length&&(e$b.unref(de).length||e$b.unref(ue).length||e$b.unref(ve).length)?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_30$1)):e$b.createCommentVNode("",!0),e$b.unref(me).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_31$1,[e$b.createElementVNode("div",_hoisted_32,[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_33,[...ge[15]||(ge[15]=[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:"wc-grad",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[e$b.createElementVNode("stop",{offset:"0%","stop-color":"#8b5cf6"}),e$b.createElementVNode("stop",{offset:"50%","stop-color":"#06b6d4"}),e$b.createElementVNode("stop",{offset:"100%","stop-color":"#14b8a6"})])],-1),e$b.createElementVNode("path",{d:"M64 304C64 358.4 83.3 408.6 115.9 448.9L67.1 538.3C65.1 542 64 546.2 64 550.5C64 564.6 75.4 576 89.5 576C93.5 576 97.3 575.4 101 573.9L217.4 524C248.8 536.9 283.5 544 320 544C461.4 544 576 436.5 576 304C576 171.5 461.4 64 320 64C178.6 64 64 171.5 64 304zM158 471.9C167.3 454.8 165.4 433.8 153.2 418.7C127.1 386.4 112 346.8 112 304C112 200.8 202.2 112 320 112C437.8 112 528 200.8 528 304C528 407.2 437.8 496 320 496C289.8 496 261.3 490.1 235.7 479.6C223.8 474.7 210.4 474.8 198.6 479.9L140 504.9L158 471.9zM208 336C225.7 336 240 321.7 240 304C240 286.3 225.7 272 208 272C190.3 272 176 286.3 176 304C176 321.7 190.3 336 208 336zM352 304C352 286.3 337.7 272 320 272C302.3 272 288 286.3 288 304C288 321.7 302.3 336 320 336C337.7 336 352 321.7 352 304zM432 336C449.7 336 464 321.7 464 304C464 286.3 449.7 272 432 272C414.3 272 400 286.3 400 304C400 321.7 414.3 336 432 336z"},null,-1)])])),ge[16]||(ge[16]=e$b.createElementVNode("span",{class:"wc-gradient-text"},"Webchat",-1))]),e$b.createElementVNode("ul",_hoisted_34,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(me),ye=>(e$b.openBlock(),e$b.createElementBlock("li",{key:ye.id,class:"bindings-card bindings-card--wc"},[e$b.createElementVNode("div",_hoisted_35,[e$b.createElementVNode("span",_hoisted_36,e$b.toDisplayString(ye.instanceName),1)]),ye.bsuid?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_37,[ge[17]||(ge[17]=e$b.createElementVNode("span",{class:"bindings-card__bsuid-label"},"ID do Visitante",-1)),e$b.createElementVNode("code",_hoisted_38,e$b.toDisplayString(ye.bsuid),1)])):e$b.createCommentVNode("",!0)]))),128))])])):e$b.createCommentVNode("",!0)])]),default:e$b.withCtx(()=>[ge[18]||(ge[18]=e$b.createElementVNode("button",{type:"button",class:"bindings-info-btn",title:"IDs por conta conectada"},[e$b.createElementVNode("svg",{class:"size-3.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})])],-1))]),_:1})):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",_hoisted_39,[ge[20]||(ge[20]=e$b.createElementVNode("span",{class:"flex justify-center items-center w-8"},[e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"size-4 text-gray-500 ml-1.5",viewBox:"0 0 17 17"},[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})])],-1)),ee.viewContactNumber?(e$b.openBlock(),e$b.createBlock($e,{key:0,class:"z-40 w-full",onCountryChanged:ge[2]||(ge[2]=ye=>re.value=ye.iso2),"onUpdate:modelValue":ce,mode:"national",validCharactersOnly:!0,defaultCountry:re.value||"br",modelValue:ae.value||"",inputOptions:{placeholder:"Coloque seu telefone",showDialCode:!1,required:!1,searchBoxPlaceholder:"Brazil"},dropdownOptions:{showSearchBox:!0,showFlags:!0,searchBoxPlaceholder:"Brazil"}},null,8,["defaultCountry","modelValue"])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_40," +55 00000-0000 "))]),oe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_41,[ge[21]||(ge[21]=e$b.createElementVNode("span",{class:"flex justify-center items-center w-8"},[e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"size-4 text-gray-500 ml-1.5",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 2.25c5.376 0 9.75 4.374 9.75 9.75s-4.374 9.75-9.75 9.75S2.25 17.376 2.25 12 6.624 2.25 12 2.25zm4.875 9.75c0 2.691-2.184 4.875-4.875 4.875s-4.875-2.184-4.875-4.875 2.184-4.875 4.875-4.875 4.875 2.184 4.875 4.875zm-1.906 0c0-1.637-1.332-2.969-2.969-2.969-1.636 0-2.969 1.332-2.969 2.969 0 1.637 1.333 2.969 2.969 2.969 1.637 0 2.969-1.332 2.969-2.969zm2.719-5.25c0 .621-.504 1.125-1.125 1.125s-1.125-.504-1.125-1.125.504-1.125 1.125-1.125 1.125.504 1.125 1.125z"})])],-1)),e$b.createElementVNode("div",_hoisted_42,[e$b.createVNode(InstagramBadge,{"hide-svg":!0,size:"large","instagram-user-name":oe.value},null,8,["instagram-user-name"])])])):e$b.createCommentVNode("",!0),fe.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_43,[ge[22]||(ge[22]=e$b.createElementVNode("span",{class:"flex justify-center items-center w-8"},[e$b.createElementVNode("svg",{class:"size-4 text-gray-500 ml-1.5",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})])],-1)),e$b.createElementVNode("div",_hoisted_44,[e$b.createVNode(TelegramBadge,{"telegram-user-name":fe.value},null,8,["telegram-user-name"])])])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",_hoisted_45,[e$b.createVNode(ListSegmentationsFields,{modelValue:ie.value,"onUpdate:modelValue":ge[3]||(ge[3]=ye=>ie.value=ye)},null,8,["modelValue"])])],2),[[e$b.vShow,ne.value==="data"]]),e$b.withDirectives(e$b.createElementVNode("div",_hoisted_46,[e$b.createVNode(ListProducts,{modelValue:le.value,"onUpdate:modelValue":ge[4]||(ge[4]=ye=>le.value=ye),allProducts:te.allProducts,departmentBypass:te.departmentBypass},null,8,["modelValue","allProducts","departmentBypass"])],512),[[e$b.vShow,ne.value==="products"]]),e$b.withDirectives(e$b.createElementVNode("div",null,[e$b.createVNode(e$b.unref(WalletSection),{"contact-id":te.contactId,contact:te.contact,"current-attendance":te.currentAttendance,supervisor:te.supervisor,"page-state":ne.value},null,8,["contact-id","contact","current-attendance","supervisor","page-state"])],512),[[e$b.vShow,ne.value==="wallet"]]),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(simpleModal,{"is-open":pe.value,"onUpdate:isOpen":ge[6]||(ge[6]=ye=>pe.value=ye),size:"w-max",class:"text-white",header:{title:"O que é o BSUID?",svg:"<svg class='w-5 mr-2 text-blue-400 inline-block' viewBox='0 0 20 20' fill='currentColor'><path fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/></svg>"}},{body:e$b.withCtx(()=>[...ge[23]||(ge[23]=[e$b.createElementVNode("div",{class:"bsuid-help-body"},[e$b.createElementVNode("p",{class:"bsuid-help-intro"},[e$b.createTextVNode(" O "),e$b.createElementVNode("strong",null,"BSUID"),e$b.createTextVNode(" (Business-Scoped User ID) é um identificador único criado pela Meta para cada usuário do WhatsApp ou Instagram, específico para cada portfólio de negócios. ")]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon bsuid-help-icon--blue",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 2a8 8 0 100 16A8 8 0 0010 2zm0 3a1 1 0 011 1v4a1 1 0 11-2 0V6a1 1 0 011-1zm0 8a1 1 0 100 2 1 1 0 000-2z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("O mesmo contato terá um "),e$b.createElementVNode("strong",null,"BSUID diferente para cada instância"),e$b.createTextVNode(" conectada ao sistema, mesmo que seja o mesmo número. Cada instância de negócio enxerga o usuário com seu próprio ID único.")])]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon bsuid-help-icon--green",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("O BSUID é "),e$b.createElementVNode("strong",null,"permanente"),e$b.createTextVNode(" enquanto o usuário não trocar de número de telefone.")])]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("O mesmo vale para o "),e$b.createElementVNode("strong",null,"Instagram"),e$b.createTextVNode(": cada instância terá um BSUID diferente para o mesmo perfil do usuário.")])]),e$b.createElementVNode("div",{class:"bsuid-help-rule"},[e$b.createElementVNode("svg",{class:"bsuid-help-icon bsuid-help-icon--yellow",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("Se um usuário "),e$b.createElementVNode("strong",null,"trocar de número"),e$b.createTextVNode(", o BSUID anterior se tornará inválido e um novo será gerado automaticamente pela Meta.")])]),e$b.createElementVNode("div",{class:"bsuid-help-example"},[e$b.createElementVNode("span",{class:"bsuid-help-example__label"},"Exemplo de BSUID"),e$b.createElementVNode("code",{class:"bsuid-help-example__code"},"BR.13491208655302741918"),e$b.createElementVNode("span",{class:"bsuid-help-example__note"},"Prefixo com o código do país (ISO 3166) + identificador único de até 128 caracteres")])],-1)])]),footer:e$b.withCtx(()=>[e$b.createElementVNode("button",{class:"bsuid-help-close-btn",type:"button",onClick:ge[5]||(ge[5]=ye=>pe.value=!1)}," Entendi ")]),_:1},8,["is-open"])]))],64)}}},ContactSection=_export_sfc$1(_sfc_main$1o,[["__scopeId","data-v-8e4d9bb6"]]),_hoisted_1$1e={class:"outcome-buttons-wrapper"},_sfc_main$1n={__name:"outcomeButton",props:{outcome:{type:String,default:null}},emits:["update:outcome","change"],setup(ee,{emit:te}){const ne=ee,ae=te;async function re(le){const ce=ne.outcome===le?null:le;ae("update:outcome",ce),ae("change",ce)}const oe=e$b.computed(()=>ne.outcome==="won"),ie=e$b.computed(()=>ne.outcome==="lost");return(le,ce)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1e,[e$b.createElementVNode("button",{onClick:ce[0]||(ce[0]=de=>re("won")),class:e$b.normalizeClass([["button_outcome-base",{"button_outcome-active-won":oe.value}],"hover:bg-green-500/40 dark:hover:bg-green-300/40"])},[ce[3]||(ce[3]=e$b.createElementVNode("p",null,"Ganho",-1)),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass([{"svg_outcome-active-won":oe.value},"size-4"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},[...ce[2]||(ce[2]=[e$b.createElementVNode("path",{d:"M3.16666 6.37502C3.74962 6.37502 4.2222 6.85073 4.22222 7.43752V15.9375C4.22222 16.5243 3.74963 17 3.16666 17H1.05555C0.472588 17 0 16.5243 0 15.9375V7.43752C1.50967e-05 6.85073 0.472597 6.37502 1.05555 6.37502H3.16666Z",fill:"CurrentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.48143 1.4454C9.79496 -0.637173 11.5194 0.143216 11.5194 0.143216C13.863 1.75728 13.005 4.80783 12.2832 6.13118H17.4424C19.5307 6.65187 19.0768 8.34354 18.5887 9.12465C19.5056 10.7905 18.4191 11.7716 17.7609 12.0538C18.1175 13.7717 17.0601 14.4178 16.4869 14.5264C16.8944 16.4004 15.5533 16.9564 14.8314 17H10.436C8.49997 16.9999 6.19055 16.1753 5.27777 15.7632V7.368C9.03523 5.6108 9.09933 3.98356 9.48143 1.4454Z",fill:"CurrentColor"},null,-1)])],2))],2),e$b.createElementVNode("button",{onClick:ce[1]||(ce[1]=de=>re("lost")),class:e$b.normalizeClass([["button_outcome-base",{"button_outcome-active-lost":ie.value}],"hover:bg-red-500/40 dark:hover:bg-red-300/40"])},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass([{"svg_outcome-active-lost":ie.value},"size-4 mt-0.8"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 19",fill:"none"},[...ce[4]||(ce[4]=[e$b.createElementVNode("path",{d:"M15.8333 10.625C15.2504 10.625 14.7778 10.1493 14.7778 9.56249L14.7778 1.0625C14.7778 0.475698 15.2504 1.57955e-06 15.8333 1.63051e-06L17.9444 1.81507e-06C18.5274 1.86603e-06 19 0.475698 19 1.0625L19 9.56249C19 10.1493 18.5274 10.625 17.9444 10.625L15.8333 10.625Z",fill:"CurrentColor"},null,-1),e$b.createElementVNode("path",{d:"M9.51857 15.5546C9.20504 17.6372 7.48065 16.8568 7.48065 16.8568C5.13698 15.2427 5.99503 12.1922 6.71681 10.8688L1.55759 10.8688C-0.530671 10.3481 -0.0768444 8.65646 0.411319 7.87535C-0.50562 6.20951 0.580926 5.22844 1.23906 4.94622C0.882549 3.22832 1.93994 2.5822 2.51315 2.47363C2.10564 0.59965 3.44673 0.0436064 4.16864 6.1075e-07L8.56403 9.95007e-07C10.5 0.000138493 12.8095 0.824657 13.7222 1.23682L13.7222 9.632C9.96477 11.3892 9.90067 13.0164 9.51857 15.5546Z",fill:"CurrentColor"},null,-1)])],2)),ce[5]||(ce[5]=e$b.createElementVNode("p",null,"Perdido",-1))],2)]))}},OutcomeButton=_export_sfc$1(_sfc_main$1n,[["__scopeId","data-v-9b7f271f"]]),_hoisted_1$1d=["disabled"],_hoisted_2$11=["onMousemove","onClick"],_sfc_main$1m={__name:"ratingInput",props:{modelValue:{type:Number,default:0},size:{type:Number,default:24},gap:{type:Number,default:4},onRate:{type:Function,default:null},readonly:{type:Boolean,default:!1},starWeight:{type:Number,default:1}},emits:["update:modelValue"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(ne.modelValue),oe=e$b.ref(0),ie=e$b.ref(!1),le=e$b.ref(null);e$b.watch(()=>ne.modelValue,_e=>{re.value=_e});const ce=e$b.computed(()=>oe.value||re.value);function de(_e){const ge=ce.value,ke=(_e-1)*ne.starWeight,$e=_e*ne.starWeight;return ge>=$e?"100%":ge<=ke?"0%":`${(ge-ke)/ne.starWeight*100}%`}function ue(_e,ge){const ke=_e.currentTarget.getBoundingClientRect(),$e=_e.offsetX<ke.width/2;oe.value=(ge-1)*ne.starWeight+($e?ne.starWeight/2:ne.starWeight)}function ve(_e,ge){const ke=_e.currentTarget.getBoundingClientRect(),$e=_e.offsetX<ke.width/2,ye=(ge-1)*ne.starWeight+($e?ne.starWeight/2:ne.starWeight);re.value=re.value===ye?0:ye,ae("update:modelValue",re.value),typeof ne.onRate=="function"&&ne.onRate(re.value)}function me(){ne.readonly||(ie.value=!0)}function be(){ie.value=!1,oe.value=0}function fe(_e){if(!ie.value||!le.value||ne.readonly)return;const ge=_e.touches[0],ke=le.value.getBoundingClientRect(),$e=ge.clientX-ke.left,ye=ne.size+ne.gap,Ee=Math.floor($e/ye)+1;if(Ee>=1&&Ee<=5){const Se=le.value.children[Ee-1];if(Se){const Le=Se.getBoundingClientRect(),Me=ge.clientX-Le.left<Le.width/2;oe.value=(Ee-1)*ne.starWeight+(Me?ne.starWeight/2:ne.starWeight)}}}function pe(){ie.value&&oe.value>0&&(re.value=re.value===oe.value?0:oe.value,ae("update:modelValue",re.value),typeof ne.onRate=="function"&&ne.onRate(re.value)),ie.value=!1,oe.value=0}return(_e,ge)=>(e$b.openBlock(),e$b.createElementBlock("main",{ref_key:"containerRef",ref:le,disabled:ne.readonly,class:"flex select-none",style:e$b.normalizeStyle({gap:`${ee.gap}px`}),onMouseleavePassive:ge[1]||(ge[1]=ke=>!ne.readonly&&(oe.value=0)),onTouchstartPassive:me,onTouchmovePassive:fe,onTouchendPassive:pe,onTouchcancelPassive:be},[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,ke=>e$b.createElementVNode("div",{key:ke,class:e$b.normalizeClass(["relative",{"cursor-pointer":!ne.readonly,"cursor-default":ne.readonly}]),style:e$b.normalizeStyle({width:`${ee.size}px`,height:`${ee.size}px`}),onMousemove:$e=>!ne.readonly&&ue($e,ke),onMouseleave:ge[0]||(ge[0]=$e=>!ne.readonly&&(oe.value=0)),onClick:$e=>!ne.readonly&&ve($e,ke)},[(e$b.openBlock(),e$b.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"absolute top-0 left-0 color-disabled",style:e$b.normalizeStyle({width:`${ee.size}px`,height:`${ee.size}px`})},[...ge[2]||(ge[2]=[e$b.createElementVNode("path",{d:"M13.849 4.22c-.684-1.626-3.014-1.626-3.698 0L8.397 8.387l-4.552.361c-1.775.14-2.495 2.331-1.142 3.477l3.468 2.937-1.06 4.392c-.413 1.713 1.472 3.067 2.992 2.149L12 19.35l3.897 2.354c1.52.918 3.405-.436 2.992-2.15l-1.06-4.39 3.468-2.938c1.353-1.146.633-3.336-1.142-3.477l-4.552-.36-1.754-4.17Z"},null,-1)])],4)),e$b.createElementVNode("div",{class:e$b.normalizeClass(["absolute top-0 left-0 h-full overflow-hidden transition-all duration-150",{"text-primary":!oe.value,"text-hover":oe.value>0}]),style:e$b.normalizeStyle({width:de(ke),height:`${ee.size}px`})},[(e$b.openBlock(),e$b.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",style:e$b.normalizeStyle({width:`${ee.size}px`,height:`${ee.size}px`})},[...ge[3]||(ge[3]=[e$b.createElementVNode("path",{d:"M13.849 4.22c-.684-1.626-3.014-1.626-3.698 0L8.397 8.387l-4.552.361c-1.775.14-2.495 2.331-1.142 3.477l3.468 2.937-1.06 4.392c-.413 1.713 1.472 3.067 2.992 2.149L12 19.35l3.897 2.354c1.52.918 3.405-.436 2.992-2.15l-1.06-4.39 3.468-2.938c1.353-1.146.633-3.336-1.142-3.477l-4.552-.36-1.754-4.17Z"},null,-1)])],4))],6)],46,_hoisted_2$11)),64))],44,_hoisted_1$1d))}},RatingInput=_export_sfc$1(_sfc_main$1m,[["__scopeId","data-v-64a4ed3f"]]),_hoisted_1$1c={class:"client-overview-panel"},_hoisted_2$10={title:"Não é possível alterar a foto do cliente neste momento",class:"client-avatar-area"},_hoisted_3$W={class:"client-avatar-shell"},_hoisted_4$Q={class:"lock-anchor"},_hoisted_5$J={class:"w-[150px] p-1 text-center text-xs"},_hoisted_6$E=["disabled"],_hoisted_7$A={key:0,class:"size-4 text-red-200",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_8$u={key:1,class:"size-4 text-green-200",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_9$r={class:"refresh-avatar"},_hoisted_10$o=["disabled"],_hoisted_11$m={key:0,class:"client-overview-actions"},_hoisted_12$k={class:"client-rating-row"},_hoisted_13$i={key:0,class:"instance-panel"},_hoisted_14$h={class:"instance-panel-actions"},_hoisted_15$f=["disabled"],_sfc_main$1l={__name:"clientOverviewPanel",props:{hasCrmPlus:{type:Boolean,default:!1},name:{type:String,default:""},outcome:{type:String,default:null},rating:{type:[Number,String],default:null},photo:{type:String,default:null},contactId:{type:[Number,String],default:null},blocked:{type:Boolean,default:!1},canBlockContacts:{type:Boolean,default:!0}},emits:["update:outcome","update:rating","update:blocked","update:photo","photo-refresh"],setup(ee,{emit:te}){const ne=ee,ae=te,re=()=>{ae("update:blocked",!ne.blocked)},oe=e$b.ref(!1),ie=e$b.ref(!1),le=e$b.ref(null),ce=e$b.computed(()=>!!ne.contactId&&!oe.value),de=()=>{ce.value&&(ie.value=!ie.value,ie.value||(le.value=null))},ue=async()=>{try{const{data:me}=await api.get(`${contact_url}${ne.contactId}/`);return(me==null?void 0:me.photo)||null}catch{return null}},ve=async()=>{var me,be,fe;if(!(!ce.value||!le.value)){oe.value=!0;try{const{data:pe}=await api.post(contactRefreshAvatarUrl(ne.contactId),{instance:le.value.id}),_e=(pe==null?void 0:pe.photo)||((me=pe==null?void 0:pe.contact)==null?void 0:me.photo)||await ue();_e&&ae("update:photo",_e),ae("photo-refresh",{ok:!0,title:"Foto atualizada",message:(pe==null?void 0:pe.message)||"A foto de perfil do contato foi atualizada com sucesso."}),ie.value=!1,le.value=null}catch(pe){ae("photo-refresh",{ok:!1,title:"Erro ao atualizar",message:((fe=(be=pe==null?void 0:pe.response)==null?void 0:be.data)==null?void 0:fe.message)||"Não foi possível atualizar a foto de perfil do contato."})}finally{oe.value=!1}}};return(me,be)=>{const fe=e$b.resolveComponent("Popper"),pe=e$b.resolveComponent("InstanceSelect");return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$1c,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["client-overview-main",{"client-overview-main--single":!ee.hasCrmPlus}])},[e$b.createElementVNode("div",_hoisted_2$10,[e$b.createElementVNode("div",_hoisted_3$W,[e$b.createVNode(Avatar,{photo:ee.photo,name:ee.name,size:"fill",class:"avatar-client"},null,8,["photo","name"]),e$b.createElementVNode("div",_hoisted_4$Q,[e$b.createVNode(fe,{hover:"",content:ee.canBlockContacts?ee.blocked?"Desbloquear contato":"Bloquear contato":"Sem permissão para esta ação",placement:"right",arrow:""},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_5$J,e$b.toDisplayString(ee.canBlockContacts?ee.blocked?"Desbloquear contato":"Bloquear contato":"Sem permissão para esta ação"),1)]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{disabled:!ee.canBlockContacts,class:e$b.normalizeClass(["lock-button transition-all duration-200",[ee.blocked?"lock-button-blocked":"lock-button-unblocked",ee.canBlockContacts?"lock-button-enabled":"lock-button-disabled"]]),onClick:re},[ee.blocked?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$A,[...be[3]||(be[3]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$u,[...be[4]||(be[4]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M15 7a2 2 0 1 1 4 0v4a1 1 0 1 0 2 0V7a4 4 0 0 0-8 0v3H5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7a2 2 0 0 0-2-2V7Zm-5 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)])]))],10,_hoisted_6$E)]),_:1},8,["content"])]),e$b.createElementVNode("div",_hoisted_9$r,[e$b.createVNode(fe,{hover:"",content:"Atualizar foto de perfil",placement:"right",arrow:""},{content:e$b.withCtx(()=>[...be[5]||(be[5]=[e$b.createElementVNode("div",{class:"w-[150px] p-1 text-center text-xs"},"Atualizar foto de perfil",-1)])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{disabled:!ce.value,class:e$b.normalizeClass(["refresh-avatar-button transition-all duration-200",[ce.value?"refresh-avatar-button-unblocked":"refresh-avatar-button-blocked",ce.value?"lock-button-enabled":"lock-button-disabled",{"refresh-avatar-button-active":ie.value}]]),onClick:de},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4 text-blue-200",{"animate-spin":oe.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...be[6]||(be[6]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.651 7.65a7.131 7.131 0 0 0-12.68 3.15M18.001 4v4h-4m-7.652 8.35a7.13 7.13 0 0 0 12.68-3.15M6 20v-4h4"},null,-1)])],2))],10,_hoisted_10$o)]),_:1})])])]),ee.hasCrmPlus?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$m,[e$b.createVNode(OutcomeButton,{outcome:ee.outcome,"onUpdate:outcome":be[0]||(be[0]=_e=>me.$emit("update:outcome",_e))},null,8,["outcome"]),e$b.createElementVNode("div",_hoisted_12$k,[be[7]||(be[7]=e$b.createElementVNode("p",{class:"client-rating-label"},"Avaliação",-1)),e$b.createVNode(RatingInput,{"model-value":ee.rating||0,size:24,gap:5,"onUpdate:modelValue":be[1]||(be[1]=_e=>me.$emit("update:rating",_e))},null,8,["model-value"])])])):e$b.createCommentVNode("",!0)],2),e$b.createVNode(e$b.Transition,{name:"instance-panel"},{default:e$b.withCtx(()=>[ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$i,[e$b.createElementVNode("header",{class:"instance-panel-header"},[be[9]||(be[9]=e$b.createElementVNode("div",{class:"instance-panel-heading"},[e$b.createElementVNode("p",{class:"instance-panel-title"},"Atualizar foto de perfil"),e$b.createElementVNode("p",{class:"instance-panel-subtitle"},"Escolha a instância que fará a busca")],-1)),e$b.createElementVNode("button",{type:"button",class:"instance-panel-close",onClick:de},[...be[8]||(be[8]=[e$b.createElementVNode("svg",{class:"size-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)])])]),e$b.createVNode(pe,{modelValue:le.value,"onUpdate:modelValue":be[2]||(be[2]=_e=>le.value=_e)},null,8,["modelValue"]),be[11]||(be[11]=e$b.createElementVNode("p",{class:"instance-panel-hint"},[e$b.createElementVNode("svg",{class:"instance-panel-hint-icon size-4",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-2 3a1 1 0 0 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2v-3a1 1 0 0 0-1-1h-1Z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null," A foto mais recente é buscada no canal da instância escolhida. Se o contato tiver WhatsApp e Instagram com fotos diferentes, a imagem salva será a do tipo da instância selecionada aqui, contanto que a instância esteja conectada. ")],-1)),e$b.createElementVNode("div",_hoisted_14$h,[e$b.createElementVNode("button",{type:"button",class:"instance-panel-button",onClick:de},"Cancelar"),e$b.createElementVNode("button",{type:"button",class:"instance-panel-button instance-panel-button--confirm",disabled:!le.value||oe.value,onClick:ve},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4",{"animate-spin":oe.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...be[10]||(be[10]=[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.651 7.65a7.131 7.131 0 0 0-12.68 3.15M18.001 4v4h-4m-7.652 8.35a7.13 7.13 0 0 0 12.68-3.15M6 20v-4h4"},null,-1)])],2)),e$b.createElementVNode("p",null,e$b.toDisplayString(oe.value?"Atualizando":"Atualizar"),1)],8,_hoisted_15$f)])])):e$b.createCommentVNode("",!0)]),_:1})])}}},ClientOverviewPanel=_export_sfc$1(_sfc_main$1l,[["__scopeId","data-v-35180f3e"]]),_hoisted_1$1b={class:"relative shrink-0"},_hoisted_2$$={key:0,class:"truncate text-sm font-medium xl:text-base"},_hoisted_3$V={key:1,class:"merge-card__name"},_hoisted_4$P={key:0,class:"contact-phone rt-transition"},_hoisted_5$I={key:2,class:"conn-btns"},_hoisted_6$D={class:"conn-btn__count"},_hoisted_7$z={class:"stack-popover__list"},_hoisted_8$t={class:"stack-popover__name"},_hoisted_9$q={key:0,class:"stack-popover__username"},_hoisted_10$n={class:"conn-btn__count"},_hoisted_11$l={class:"stack-popover__list"},_hoisted_12$j={class:"stack-popover__name"},_hoisted_13$h={key:0,class:"stack-popover__username"},_hoisted_14$g={class:"conn-btn__count"},_hoisted_15$e={class:"stack-popover__list"},_hoisted_16$d={class:"stack-popover__name"},_hoisted_17$7={key:0,class:"stack-popover__username"},_hoisted_18$7={key:0,class:"flex shrink-0 flex-col items-center gap-2 text-xs xl:text-sm"},_hoisted_19$6={key:0,class:"flex items-center gap-1 opacity-80",title:"Quantidade de produtos vinculados"},_hoisted_20$6={class:"font-semibold"},_hoisted_21$5={key:1,class:"flex items-center gap-1 opacity-80",title:"Nota do contato"},_hoisted_22$3={style:{fill:"#facc15"},class:"size-4",viewBox:"0 0 20 20"},_hoisted_23$2={class:"font-semibold"},_hoisted_24$2={key:2,class:"merge-card__check"},_sfc_main$1k={__name:"contactCard",props:{contact:{type:Object,required:!0},mode:{type:String,default:"merge"},viewNumberPermission:{type:Boolean,default:!1},blockedTooltipText:{type:String,default:"Contato bloqueado - nao e possivel iniciar atendimento"},variant:{type:String,default:"default"},size:{type:String,default:"normal"},showBadge:{type:Boolean,default:!1},badgeText:{type:String,default:""},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1},avatarVariant:{type:String,default:"default"},showStartChat:{type:Boolean,default:!1}},emits:["select"],setup(ee,{emit:te}){const ne=ee,ae=te,re=Ce=>(Ce??"").toString().trim().replace(/\D/g,""),oe=Ce=>(Ce??"").toString().trim(),ie=Ce=>{const Fe=re(Ce);return Fe?Fe.length===11?`(${Fe.slice(0,2)}) ${Fe.slice(2,7)}-${Fe.slice(7)}`:Fe.length===10?`(${Fe.slice(0,2)}) ${Fe.slice(2,6)}-${Fe.slice(6)}`:Fe.length===13&&Fe.startsWith("55")?`+55 (${Fe.slice(2,4)}) ${Fe.slice(4,9)}-${Fe.slice(9)}`:Ce:""},le=e$b.computed(()=>ne.mode==="sidebar"),ce=e$b.computed(()=>{var Ce;return!!((Ce=ne.contact)!=null&&Ce.blocked)}),de=e$b.computed(()=>{var Ce;return!!((Ce=ne.contact)!=null&&Ce.telephone)}),ue=e$b.computed(()=>{var Ce;return!!((Ce=ne.contact)!=null&&Ce.instagram_user_name)});e$b.computed(()=>{var Ce,Fe;return((Fe=(Ce=ne.contact)==null?void 0:Ce.tags)==null?void 0:Fe.length)>0});const ve=e$b.computed(()=>{var Ce;return Array.isArray((Ce=ne.contact)==null?void 0:Ce.products)&&ne.contact.products.length>0}),me=e$b.computed(()=>{var Ce,Fe,Ie;return((Ce=ne.contact)==null?void 0:Ce.rating)!==null&&((Fe=ne.contact)==null?void 0:Fe.rating)!==void 0&&((Ie=ne.contact)==null?void 0:Ie.rating)!==""}),be=e$b.computed(()=>{var Ce;return ie((Ce=ne.contact)==null?void 0:Ce.telephone)}),fe=e$b.computed(()=>{var Ie,qe;const Ce=oe((Ie=ne.contact)==null?void 0:Ie.name);if(Ce)return Ce;const Fe=oe((qe=ne.contact)==null?void 0:qe.telephone);return ne.viewNumberPermission&&Fe?Fe:"Não disponível"}),pe=e$b.computed(()=>{var Ce;return le.value?fe.value:((Ce=ne.contact)==null?void 0:Ce.name)||"Sem nome"});e$b.computed(()=>{var Ie,qe;const Ce=oe((Ie=ne.contact)==null?void 0:Ie.name),Fe=oe((qe=ne.contact)==null?void 0:qe.telephone);return le.value&&ne.viewNumberPermission&&!!Ce&&!!Fe});const _e=e$b.computed(()=>!le.value&&ne.selectable?"button":"div"),ge=e$b.computed(()=>Ve.value||Ne.value||Pe.value),ke=e$b.computed(()=>{const Ce=["merge-card","bg-base-300"];return ne.selectable&&Ce.push("merge-card--selectable"),ne.selected&&Ce.push("merge-card--selected"),ne.variant==="primary"&&Ce.push("merge-card--primary"),ne.variant==="danger"&&Ce.push("merge-card--danger"),ge.value&&Ce.push("merge-card--popover-open"),Ce}),$e=e$b.computed(()=>{const Ce=["group relative flex items-center gap-3 p-3 text-xs transition-all xl:text-sm"];return ce.value?Ce.push("cursor-not-allowed opacity-60"):Ce.push("cursor-pointer hover:bg-base-100/50 dark:hover:bg-sky-300/20"),Ce}),ye=e$b.computed(()=>le.value?$e.value:ke.value),Ee=e$b.computed(()=>{if(le.value&&ce.value)return ne.blockedTooltipText}),Se=e$b.computed(()=>{if(le.value)return"size-12";const Ce=["merge-card__avatar"];return ne.size==="large"&&Ce.push("merge-card__avatar--lg"),ne.avatarVariant==="brand"?Ce.push("merge-card__avatar--brand"):ne.selected?Ce.push("merge-card__avatar--selected"):ne.variant==="primary"?Ce.push("merge-card__avatar--primary"):ne.variant==="danger"&&Ce.push("merge-card__avatar--danger"),Ce}),Le=e$b.computed(()=>le.value?"flex min-w-0 flex-1 flex-col gap-1":"merge-card__info"),Me=()=>{!le.value&&ne.selectable&&ae("select",ne.contact)},De=useWhatsappBindings(()=>ne.contact),Oe=useInstagramBindings(()=>ne.contact),Re=useTelegramBindings(()=>ne.contact),ze=useHasContactBindings(De,Oe,Re),Ve=e$b.ref(!1),Ne=e$b.ref(!1),Pe=e$b.ref(!1),Be=Ce=>{Ce.stopPropagation(),Ve.value=!Ve.value,Ne.value=!1,Pe.value=!1},Ae=Ce=>{Ce.stopPropagation(),Ne.value=!Ne.value,Ve.value=!1,Pe.value=!1},xe=Ce=>{Ce.stopPropagation(),Pe.value=!Pe.value,Ve.value=!1,Ne.value=!1};return(Ce,Fe)=>{const Ie=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(_e.value),{class:e$b.normalizeClass(ye.value),title:Ee.value,onClick:Me,style:e$b.normalizeStyle(`border-radius: ${ne.showStartChat?"0.5rem 0.5rem 0rem 0rem":"0.5rem"};`)},{default:e$b.withCtx(()=>{var qe,Ge;return[e$b.createElementVNode("div",_hoisted_1$1b,[e$b.createVNode(Avatar,{photo:ee.contact.photo,name:ee.contact.name,outcome:le.value?ee.contact.outcome:null,blocked:le.value&&ce.value,size:"fill",class:e$b.normalizeClass(Se.value)},null,8,["photo","name","outcome","blocked","class"])]),e$b.createElementVNode("div",{class:e$b.normalizeClass(Le.value)},[le.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_2$$,e$b.toDisplayString(pe.value),1)):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_3$V,e$b.toDisplayString(pe.value),1)),de.value||ue.value||e$b.unref(ze)?(e$b.openBlock(),e$b.createElementBlock("div",{key:2,class:e$b.normalizeClass(le.value?"contact-inline-meta":"contact-meta-column")},[de.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$P,[(qe=ee.contact)!=null&&qe.country&&((Ge=ee.contact)!=null&&Ge.telephone)?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass([` fi fi-${ee.contact.country.toLowerCase()}`,"text-xs size-[10px]"])},null,2)):e$b.createCommentVNode("",!0),e$b.createTextVNode(" "+e$b.toDisplayString(be.value),1)])):e$b.createCommentVNode("",!0),le.value&&ue.value?(e$b.openBlock(),e$b.createBlock(InstagramBadge,{key:1,"instagram-user-name":ee.contact.instagram_user_name},null,8,["instagram-user-name"])):e$b.createCommentVNode("",!0),!le.value&&e$b.unref(ze)?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_5$I,[e$b.unref(De).length?(e$b.openBlock(),e$b.createBlock(Ie,{key:0,placement:"bottom-start",class:"popper-dark",hover:!0},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:"stack-popover",onClick:Fe[0]||(Fe[0]=e$b.withModifiers(()=>{},["stop"]))},[Fe[5]||(Fe[5]=e$b.createElementVNode("p",{class:"stack-popover__title stack-popover__title--wa"}," WhatsApp ",-1)),e$b.createElementVNode("div",_hoisted_7$z,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(De),Ze=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Ze.id,class:"stack-popover__item stack-popover__item--wa"},[e$b.createElementVNode("span",_hoisted_8$t,e$b.toDisplayString(Ze.instanceName),1),Ze.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$q,e$b.toDisplayString(Ze.user_name),1)):e$b.createCommentVNode("",!0)]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{type:"button",class:"conn-btn conn-btn--wa",onClick:Be},[Fe[3]||(Fe[3]=e$b.createElementVNode("svg",{class:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 17 17"},[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1)),Fe[4]||(Fe[4]=e$b.createElementVNode("span",null,"WhatsApp",-1)),e$b.createElementVNode("span",_hoisted_6$D,e$b.toDisplayString(e$b.unref(De).length),1)])]),_:1})):e$b.createCommentVNode("",!0),e$b.unref(Oe).length?(e$b.openBlock(),e$b.createBlock(Ie,{key:1,placement:"bottom",class:"popper-dark",hover:!0},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:"stack-popover",onClick:Fe[1]||(Fe[1]=e$b.withModifiers(()=>{},["stop"]))},[Fe[8]||(Fe[8]=e$b.createElementVNode("p",{class:"stack-popover__title stack-popover__title--ig"}," Instagram ",-1)),e$b.createElementVNode("div",_hoisted_11$l,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(Oe),Ze=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Ze.id,class:"stack-popover__item stack-popover__item--ig"},[e$b.createElementVNode("span",_hoisted_12$j,e$b.toDisplayString(Ze.instanceName),1),Ze.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_13$h,"@"+e$b.toDisplayString(Ze.user_name),1)):e$b.createCommentVNode("",!0)]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{type:"button",class:"conn-btn conn-btn--ig",onClick:Ae},[Fe[6]||(Fe[6]=e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},[e$b.createElementVNode("defs",null,[e$b.createElementVNode("linearGradient",{id:"ig-conn-grad",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},[e$b.createElementVNode("stop",{offset:"0%","stop-color":"#f58529"}),e$b.createElementVNode("stop",{offset:"40%","stop-color":"#dd2a7b"}),e$b.createElementVNode("stop",{offset:"70%","stop-color":"#8134af"}),e$b.createElementVNode("stop",{offset:"100%","stop-color":"#515bd4"})])]),e$b.createElementVNode("path",{fill:"url(#ig-conn-grad)",d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"})],-1)),Fe[7]||(Fe[7]=e$b.createElementVNode("span",{class:"conn-btn__ig-label"},"Instagram",-1)),e$b.createElementVNode("span",_hoisted_10$n,e$b.toDisplayString(e$b.unref(Oe).length),1)])]),_:1})):e$b.createCommentVNode("",!0),e$b.unref(Re).length?(e$b.openBlock(),e$b.createBlock(Ie,{key:2,placement:"bottom",class:"popper-dark",hover:!0},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:"stack-popover",onClick:Fe[2]||(Fe[2]=e$b.withModifiers(()=>{},["stop"]))},[Fe[11]||(Fe[11]=e$b.createElementVNode("p",{class:"stack-popover__title stack-popover__title--tg"}," Telegram ",-1)),e$b.createElementVNode("div",_hoisted_15$e,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(e$b.unref(Re),Ze=>(e$b.openBlock(),e$b.createElementBlock("div",{key:Ze.id,class:"stack-popover__item stack-popover__item--tg"},[e$b.createElementVNode("span",_hoisted_16$d,e$b.toDisplayString(Ze.instanceName),1),Ze.user_name?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_17$7,"@"+e$b.toDisplayString(Ze.user_name),1)):e$b.createCommentVNode("",!0)]))),128))])])]),default:e$b.withCtx(()=>[e$b.createElementVNode("button",{type:"button",class:"conn-btn conn-btn--tg",onClick:xe},[Fe[9]||(Fe[9]=e$b.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})],-1)),Fe[10]||(Fe[10]=e$b.createElementVNode("span",{class:"conn-btn__tg-label"},"Telegram",-1)),e$b.createElementVNode("span",_hoisted_14$g,e$b.toDisplayString(e$b.unref(Re).length),1)])]),_:1})):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0)],2)):e$b.createCommentVNode("",!0)],2),le.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$7,[ve.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_19$6,[Fe[12]||(Fe[12]=e$b.createElementVNode("svg",{class:"size-4 dark:text-primary_alt","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{fill:"currentColor",d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_20$6,e$b.toDisplayString(ee.contact.products.length),1)])):e$b.createCommentVNode("",!0),me.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_21$5,[(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_22$3,[...Fe[13]||(Fe[13]=[e$b.createElementVNode("path",{d:"M10 15l-5.878 3.09 1.123-6.545L.489 6.91l6.572-.955L10 0l2.939 5.955 6.572.955-4.756 4.635 1.123 6.545z"},null,-1)])])),e$b.createElementVNode("span",_hoisted_23$2,e$b.toDisplayString(ee.contact.rating),1)])):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0),!le.value&&ee.showBadge&&ee.badgeText?(e$b.openBlock(),e$b.createElementBlock("div",{key:1,class:e$b.normalizeClass(["merge-card__badge",[`merge-card__badge--${ee.variant}`]])},e$b.toDisplayString(ee.badgeText),3)):e$b.createCommentVNode("",!0),!le.value&&ee.selectable&&ee.selected?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_24$2,[...Fe[14]||(Fe[14]=[e$b.createElementVNode("svg",{class:"size-5",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)])])):e$b.createCommentVNode("",!0)]}),_:1},8,["class","title","style"])}}},ContactCard=_export_sfc$1(_sfc_main$1k,[["__scopeId","data-v-6cb70be7"]]),_hoisted_1$1a=["checked","disabled"],_hoisted_2$_={class:"checkbox-box"},_hoisted_3$U={key:0,class:"size-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3"},_sfc_main$1j={__name:"MergeConfirmCheckboxSection",props:{confirmed:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["update:confirmed"],setup(ee,{emit:te}){const ne=te,ae=re=>{ne("update:confirmed",re.target.checked)};return(re,oe)=>(e$b.openBlock(),e$b.createElementBlock("label",{class:e$b.normalizeClass(["confirm-checkbox",{"confirm-checkbox--checked":ee.confirmed,"confirm-checkbox--disabled":ee.loading}])},[e$b.createElementVNode("input",{type:"checkbox",checked:ee.confirmed,disabled:ee.loading,class:"sr-only",onChange:ae},null,40,_hoisted_1$1a),e$b.createElementVNode("div",_hoisted_2$_,[ee.confirmed?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_3$U,[...oe[0]||(oe[0]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)])])):e$b.createCommentVNode("",!0)]),oe[1]||(oe[1]=e$b.createElementVNode("div",{class:"checkbox-content"},[e$b.createElementVNode("span",{class:"checkbox-title"},"Confirmo que entendi as consequências"),e$b.createElementVNode("span",{class:"checkbox-desc"},[e$b.createTextVNode(" Esta ação é "),e$b.createElementVNode("strong",null,"irreversível"),e$b.createTextVNode(". O contato selecionado será excluído permanentemente. ")])],-1))],2))}},_sfc_main$1i={},_hoisted_1$19={class:"merge-direction"};function _sfc_render$5(ee,te){return e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$19,[...te[0]||(te[0]=[e$b.createStaticVNode('<div class="merge-direction-line"></div><div class="merge-direction-icon"><svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path></svg></div><div class="merge-direction-line"></div>',3)])])}const MergeDirectionSection=_export_sfc$1(_sfc_main$1i,[["render",_sfc_render$5]]),_hoisted_1$18={key:0,class:"error-message"},_sfc_main$1h={__name:"MergeErrorSection",props:{error:{type:String,default:""}},setup(ee){return(te,ne)=>ee.error?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$18,[ne[0]||(ne[0]=e$b.createElementVNode("svg",{class:"size-4",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",null,e$b.toDisplayString(ee.error),1)])):e$b.createCommentVNode("",!0)}},_hoisted_1$17={key:0,class:"changes-list"},_hoisted_2$Z={class:"change-label"},_hoisted_3$T={class:"change-values"},_hoisted_4$O={class:"change-kept"},_hoisted_5$H={key:0,class:"incorporated-tag"},_hoisted_6$C={key:0,class:"change-discarded"},_hoisted_7$y={class:"discarded-text"},_sfc_main$1g={__name:"FieldChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0},previewContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=ce=>(ce??"").toString().trim(),oe=ce=>re(ce).replace(/\D/g,""),ie=ce=>{const de=oe(ce);return de?de.length===11?`(${de.slice(0,2)}) ${de.slice(2,7)}-${de.slice(7)}`:de.length===10?`(${de.slice(0,2)}) ${de.slice(2,6)}-${de.slice(6)}`:de.length===13&&de.startsWith("55")?`+55 (${de.slice(2,4)}) ${de.slice(4,9)}-${de.slice(9)}`:ce:null},le=e$b.computed(()=>{const ce=ne.parentContact||{},de=ne.childContact||{},ue=ne.previewContact||{};return[{key:"name",label:"Nome"},{key:"telephone",label:"Telefone",format:ie},{key:"instagram_user_name",label:"Instagram"}].map(me=>{const be=re(ce[me.key]),fe=re(de[me.key]),pe=re(ue[me.key]),_e=me.key==="telephone"?oe(be):be.toLowerCase(),ge=me.key==="telephone"?oe(fe):fe.toLowerCase(),ke=me.key==="telephone"?oe(pe):pe.toLowerCase(),$e=_e===ke&&be,ye=ge===ke&&fe&&!$e,Ee=$e?fe:ye?be:null,Se=me.format||(Le=>Le);return{key:me.key,label:me.label,finalValue:pe?Se(pe):null,discardedValue:Ee&&Ee!==pe?Se(Ee):null,fromChild:ye,hasChange:_e!==ge}}).filter(me=>me.hasChange)});return e$b.watchEffect(()=>{ae("changes-count",le.value.length)}),(ce,de)=>le.value.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$17,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(le.value,ue=>(e$b.openBlock(),e$b.createElementBlock("div",{key:ue.key,class:"change-item"},[e$b.createElementVNode("span",_hoisted_2$Z,e$b.toDisplayString(ue.label),1),e$b.createElementVNode("div",_hoisted_3$T,[e$b.createElementVNode("span",_hoisted_4$O,[de[0]||(de[0]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)),e$b.createTextVNode(" "+e$b.toDisplayString(ue.finalValue||"—")+" ",1),ue.fromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$H,"incorporado")):e$b.createCommentVNode("",!0)]),ue.discardedValue?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$C,[de[1]||(de[1]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_7$y,e$b.toDisplayString(ue.discardedValue),1)])):e$b.createCommentVNode("",!0)])]))),128))])):e$b.createCommentVNode("",!0)}},_hoisted_1$16={key:0,class:"array-changes-section"},_hoisted_2$Y={class:"array-changes-header"},_hoisted_3$S={class:"array-changes-count"},_hoisted_4$N={class:"products-list"},_sfc_main$1f={__name:"ProductsChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.computed(()=>{var be,fe;const ie=((be=ne.parentContact)==null?void 0:be.products)||[],le=((fe=ne.childContact)==null?void 0:fe.products)||[],ce=new Set(ie.map(pe=>{var _e;return((_e=pe.product)==null?void 0:_e.id)||pe.id})),de=ie,ue=le.filter(pe=>{var _e;return!ce.has(((_e=pe.product)==null?void 0:_e.id)||pe.id)}),ve=ue.length>0,me=ie.length+ue.length;return{hasChanges:ve,keptFromParent:de,incorporatedFromChild:ue,total:me}});return e$b.watchEffect(()=>{ae("changes-count",oe.value.hasChanges?1:0)}),(ie,le)=>oe.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$16,[e$b.createElementVNode("div",_hoisted_2$Y,[le[2]||(le[2]=e$b.createElementVNode("svg",{class:"size-3.5",viewBox:"0 0 24 24",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M4 19v2c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-2H4Z"}),e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M9 3c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v3c0 .55228-.4477 1-1 1h-2v1h2c.5096 0 .9376.38314.9939.88957L19.8951 17H4.10498l.90116-8.11043C5.06241 8.38314 5.49047 8 6.00002 8H12V7h-2c-.55228 0-1-.44772-1-1V3Z","clip-rule":"evenodd"})],-1)),le[3]||(le[3]=e$b.createElementVNode("span",{class:"array-changes-title"},"Produtos",-1)),e$b.createElementVNode("span",_hoisted_3$S," +"+e$b.toDisplayString(oe.value.incorporatedFromChild.length)+" incorporado"+e$b.toDisplayString(oe.value.incorporatedFromChild.length>1?"s":""),1),e$b.createElementVNode("button",{class:"expand-button",type:"button",onClick:le[0]||(le[0]=ce=>re.value=!re.value)},[e$b.createTextVNode(e$b.toDisplayString(re.value?"Ocultar":`Ver todos (${oe.value.total})`)+" ",1),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3",{"rotate-180":re.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...le[1]||(le[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),e$b.createElementVNode("div",_hoisted_4$N,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(oe.value.incorporatedFromChild,ce=>{var de;return e$b.openBlock(),e$b.createElementBlock("div",{key:((de=ce.product)==null?void 0:de.id)||ce.id,class:"product-wrapper product-wrapper--incorporated"},[e$b.createVNode(ProductListItem,{product:ce,quantity:ce.quantity||1,discount:ce.discount||0,incorporated:!0},null,8,["product","quantity","discount"])])}),128)),re.value?(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,{key:0},e$b.renderList(oe.value.keptFromParent,ce=>{var de;return e$b.openBlock(),e$b.createElementBlock("div",{key:((de=ce.product)==null?void 0:de.id)||ce.id,class:"product-wrapper"},[e$b.createVNode(ProductListItem,{product:ce,quantity:ce.quantity||1,discount:ce.discount||0},null,8,["product","quantity","discount"])])}),128)):e$b.createCommentVNode("",!0)])])):e$b.createCommentVNode("",!0)}},_hoisted_1$15={key:0,class:"array-changes-section"},_hoisted_2$X={class:"array-changes-header"},_hoisted_3$R={class:"array-changes-count"},_hoisted_4$M={key:0,class:"segmentation-changes-list"},_hoisted_5$G={class:"segmentation-field-name"},_hoisted_6$B={class:"segmentation-change-values"},_hoisted_7$x={class:"change-kept"},_hoisted_8$s={key:0,class:"incorporated-tag"},_hoisted_9$p={key:0,class:"change-discarded"},_hoisted_10$m={class:"discarded-text"},_sfc_main$1e={__name:"SegmentationChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=ue=>(ue??"").toString().trim(),ie=ue=>ue==null||oe(ue)==="",le=ue=>{if(!ue)return"";if(ue.type==="bool"){if(typeof ue.content=="boolean")return ue.content?"true":"false";const ve=oe(ue.content).toLowerCase();return ve?ve==="true"?"true":"false":""}return ue.type==="list"&&Array.isArray(ue.content)?ue.content.map(ve=>oe(ve)).join("|"):oe(ue.content)},ce=ue=>ie(ue==null?void 0:ue.content)?"—":ue.type==="bool"?le(ue)==="true"?"Verdadeiro":"Falso":ue.type==="list"?ue.content:ue.content||"—",de=e$b.computed(()=>{var _e,ge;const ue=((_e=ne.parentContact)==null?void 0:_e.segmentation_fields)||[],ve=((ge=ne.childContact)==null?void 0:ge.segmentation_fields)||[],me=new Map(ue.map(ke=>[ke.id,ke])),be=new Map(ve.map(ke=>[ke.id,ke])),fe=new Set([...me.keys(),...be.keys()]),pe=[];return fe.forEach(ke=>{const $e=me.get(ke),ye=be.get(ke),Ee=le($e),Se=le(ye),Le=!ie($e==null?void 0:$e.content),Me=!ie(ye==null?void 0:ye.content);if(Ee!==Se&&(Le||Me)){const De=Le||!Me?$e:ye,Oe=!Le&&Me,Re=ce(De),ze=Oe?$e:ye,Ve=ze&&!ie(ze.content)&&le(ze)!==le(De)?ce(ze):null;pe.push({id:De.id,name:De.name,finalValue:Re,discardedValue:Ve,incorporatedFromChild:!!Oe})}}),{hasChanges:pe.length>0,changes:pe}});return e$b.watchEffect(()=>{ae("changes-count",de.value.changes.length)}),(ue,ve)=>de.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$15,[e$b.createElementVNode("div",_hoisted_2$X,[ve[2]||(ve[2]=e$b.createElementVNode("svg",{class:"size-3.5",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M3 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z","clip-rule":"evenodd"})],-1)),ve[3]||(ve[3]=e$b.createElementVNode("span",{class:"array-changes-title"},"Campos Personalizados",-1)),e$b.createElementVNode("span",_hoisted_3$R,e$b.toDisplayString(de.value.changes.length)+" alteraç"+e$b.toDisplayString(de.value.changes.length>1?"ões":"ão"),1),e$b.createElementVNode("button",{class:"expand-button",type:"button",onClick:ve[0]||(ve[0]=me=>re.value=!re.value)},[e$b.createTextVNode(e$b.toDisplayString(re.value?"Ocultar":"Ver detalhes")+" ",1),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3",{"rotate-180":re.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...ve[1]||(ve[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),re.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_4$M,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(de.value.changes,me=>(e$b.openBlock(),e$b.createElementBlock("div",{key:me.id,class:"segmentation-change-item"},[e$b.createElementVNode("span",_hoisted_5$G,e$b.toDisplayString(me.name),1),e$b.createElementVNode("div",_hoisted_6$B,[e$b.createElementVNode("span",_hoisted_7$x,[ve[4]||(ve[4]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)),e$b.createTextVNode(" "+e$b.toDisplayString(me.finalValue)+" ",1),me.incorporatedFromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$s," incorporado ")):e$b.createCommentVNode("",!0)]),me.discardedValue?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$p,[ve[5]||(ve[5]=e$b.createElementVNode("svg",{class:"size-3",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_10$m,e$b.toDisplayString(me.discardedValue||"—"),1)])):e$b.createCommentVNode("",!0)])]))),128))])):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0)}},_hoisted_1$14={key:0,class:"array-changes-section"},_hoisted_2$W={class:"array-changes-header"},_hoisted_3$Q={class:"array-changes-count"},_hoisted_4$L={class:"tags-list"},_hoisted_5$F={class:"tag-name"},_hoisted_6$A={class:"tag-name"},_sfc_main$1d={__name:"TagsChangesSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0}},emits:["changes-count"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.ref(!1),oe=e$b.computed(()=>{var be,fe;const ie=((be=ne.parentContact)==null?void 0:be.tags)||[],le=((fe=ne.childContact)==null?void 0:fe.tags)||[],ce=new Set(ie.map(pe=>pe.id)),de=ie,ue=le.filter(pe=>!ce.has(pe.id)),ve=ue.length>0,me=ie.length+ue.length;return{hasChanges:ve,keptFromParent:de,incorporatedFromChild:ue,total:me}});return e$b.watchEffect(()=>{ae("changes-count",oe.value.hasChanges?1:0)}),(ie,le)=>oe.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$14,[e$b.createElementVNode("div",_hoisted_2$W,[le[2]||(le[2]=e$b.createElementVNode("svg",{class:"size-3.5",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"})],-1)),le[3]||(le[3]=e$b.createElementVNode("span",{class:"array-changes-title"},"Etiquetas",-1)),e$b.createElementVNode("span",_hoisted_3$Q," +"+e$b.toDisplayString(oe.value.incorporatedFromChild.length)+" incorporada"+e$b.toDisplayString(oe.value.incorporatedFromChild.length>1?"s":""),1),e$b.createElementVNode("button",{class:"expand-button",type:"button",onClick:le[0]||(le[0]=ce=>re.value=!re.value)},[e$b.createTextVNode(e$b.toDisplayString(re.value?"Ocultar":`Ver todas (${oe.value.total})`)+" ",1),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3",{"rotate-180":re.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...le[1]||(le[1]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),e$b.createElementVNode("div",_hoisted_4$L,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(oe.value.incorporatedFromChild,ce=>(e$b.openBlock(),e$b.createElementBlock("span",{key:ce.id,class:"tag-item tag-item--incorporated",style:e$b.normalizeStyle({backgroundColor:`${ce.color}20`,borderColor:`${ce.color}40`})},[e$b.createElementVNode("span",{class:"tag-color",style:e$b.normalizeStyle({backgroundColor:ce.color})},null,4),e$b.createElementVNode("span",_hoisted_5$F,e$b.toDisplayString(ce.name),1),le[4]||(le[4]=e$b.createElementVNode("span",{class:"incorporated-badge"},"+",-1))],4))),128)),re.value?(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,{key:0},e$b.renderList(oe.value.keptFromParent,ce=>(e$b.openBlock(),e$b.createElementBlock("span",{key:ce.id,class:"tag-item",style:e$b.normalizeStyle({backgroundColor:`${ce.color}20`,borderColor:`${ce.color}40`})},[e$b.createElementVNode("span",{class:"tag-color",style:e$b.normalizeStyle({backgroundColor:ce.color})},null,4),e$b.createElementVNode("span",_hoisted_6$A,e$b.toDisplayString(ce.name),1)],4))),128)):e$b.createCommentVNode("",!0)])])):e$b.createCommentVNode("",!0)}},_hoisted_1$13={class:"contact-section contact-section--result"},_hoisted_2$V={class:"section-header section-header--result"},_hoisted_3$P={key:0,class:"changes-badge"},_hoisted_4$K={class:"contact-card-wrapper contact-card-wrapper--result"},_hoisted_5$E={class:"array-changes-header"},_hoisted_6$z={key:0,class:"array-changes-count"},_hoisted_7$w={class:"ml-auto flex items-center gap-1.5"},_hoisted_8$r={class:"connections-result-list"},_hoisted_9$o={class:"conn-side conn-side--left"},_hoisted_10$l={key:0,class:"conn-icon conn-icon--wa",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 17 17"},_hoisted_11$k={key:1,class:"conn-icon conn-icon--ig",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},_hoisted_12$i={key:2,class:"conn-icon conn-icon--tg",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},_hoisted_13$g={class:"conn-instance"},_hoisted_14$f={class:"conn-side conn-side--right"},_hoisted_15$d={key:0,class:"incorporated-tag"},_hoisted_16$c={key:1,class:"conn-username"},_sfc_main$1c={__name:"MergeResultSection",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0},mergePreview:{type:Object,default:null}},setup(ee){const te=ee,ne=e$b.computed(()=>{var _e,ge,ke,$e,ye,Ee,Se,Le,Me,De,Oe,Re,ze,Ve,Ne,Pe;const me=te.mergePreview||{name:((_e=te.parentContact)==null?void 0:_e.name)||((ge=te.childContact)==null?void 0:ge.name),telephone:((ke=te.parentContact)==null?void 0:ke.telephone)||(($e=te.childContact)==null?void 0:$e.telephone),whatsapp_id:((ye=te.parentContact)==null?void 0:ye.whatsapp_id)||((Ee=te.childContact)==null?void 0:Ee.whatsapp_id),instagram_user_name:((Se=te.parentContact)==null?void 0:Se.instagram_user_name)||((Le=te.childContact)==null?void 0:Le.instagram_user_name)},be=[...((Me=te.parentContact)==null?void 0:Me.whatsapp_infos)||[],...((De=te.childContact)==null?void 0:De.whatsapp_infos)||[]],fe=[...((Oe=te.parentContact)==null?void 0:Oe.instagram_infos)||[],...((Re=te.childContact)==null?void 0:Re.instagram_infos)||[]],pe=[...((ze=te.parentContact)==null?void 0:ze.telegram_infos)||[],...((Ve=te.childContact)==null?void 0:Ve.telegram_infos)||[]];return{...me,photo:me.photo||((Ne=te.parentContact)==null?void 0:Ne.photo)||((Pe=te.childContact)==null?void 0:Pe.photo),whatsapp_infos:be,instagram_infos:fe,telegram_infos:pe}}),ae=e$b.ref(0),re=e$b.ref(0),oe=e$b.ref(0),ie=e$b.ref(0),le=e$b.ref(!1),ce=e$b.ref(!1),de=e$b.computed(()=>{var ke,$e,ye,Ee,Se,Le;const me=(((ke=te.parentContact)==null?void 0:ke.whatsapp_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`pwa-${De}`,platform:"whatsapp",instanceName:Me.instance,userName:Me.whatsapp_user_name||"",fromChild:!1})),be=((($e=te.childContact)==null?void 0:$e.whatsapp_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`cwa-${De}`,platform:"whatsapp",instanceName:Me.instance,userName:Me.whatsapp_user_name||"",fromChild:!0})),fe=(((ye=te.parentContact)==null?void 0:ye.instagram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`pig-${De}`,platform:"instagram",instanceName:Me.instance,userName:Me.instagram_user_name||"",fromChild:!1})),pe=(((Ee=te.childContact)==null?void 0:Ee.instagram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`cig-${De}`,platform:"instagram",instanceName:Me.instance,userName:Me.instagram_user_name||"",fromChild:!0})),_e=(((Se=te.parentContact)==null?void 0:Se.telegram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`ptg-${De}`,platform:"telegram",instanceName:Me.instance,userName:Me.telegram_user_name||"",fromChild:!1})),ge=(((Le=te.childContact)==null?void 0:Le.telegram_infos)||[]).filter(Me=>Me==null?void 0:Me.instance).map((Me,De)=>({id:Me.id||`ctg-${De}`,platform:"telegram",instanceName:Me.instance,userName:Me.telegram_user_name||"",fromChild:!0}));return[...me,...be,...fe,...pe,..._e,...ge]}),ue=e$b.computed(()=>de.value.filter(me=>me.fromChild).length),ve=e$b.computed(()=>ae.value+re.value+oe.value+ie.value+ue.value);return(me,be)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("section",_hoisted_1$13,[e$b.createElementVNode("header",_hoisted_2$V,[be[8]||(be[8]=e$b.createStaticVNode('<div class="section-header-content"><div class="section-icon section-icon--result"><svg class="size-4" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg></div><div><span class="section-title">Resultado da mesclagem</span><span class="section-subtitle"> Este será o contato final após a operação </span></div></div>',1)),ve.value>0?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$P,e$b.toDisplayString(ve.value)+" alteraç"+e$b.toDisplayString(ve.value>1?"ões":"ão"),1)):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("div",_hoisted_4$K,[e$b.createVNode(ContactCard,{contact:ne.value,variant:"primary","show-details":!0},null,8,["contact"])]),e$b.createVNode(_sfc_main$1g,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,"preview-contact":ne.value,onChangesCount:be[0]||(be[0]=fe=>ae.value=fe)},null,8,["parent-contact","child-contact","preview-contact"]),de.value.length?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:"array-changes-section cursor-pointer",onClick:be[2]||(be[2]=fe=>le.value=!le.value)},[e$b.createElementVNode("div",_hoisted_5$E,[be[10]||(be[10]=e$b.createElementVNode("span",{class:"array-changes-title"},"Conexões",-1)),ue.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_6$z," +"+e$b.toDisplayString(ue.value)+" incorporada"+e$b.toDisplayString(ue.value>1?"s":""),1)):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_7$w,[e$b.createElementVNode("button",{class:"connections-help-btn",type:"button",onClick:be[1]||(be[1]=e$b.withModifiers(fe=>ce.value=!0,["stop"]))}," ? "),(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-3 transition-transform duration-200",{"rotate-180":le.value}]),viewBox:"0 0 20 20",fill:"currentColor"},[...be[9]||(be[9]=[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))])]),e$b.withDirectives(e$b.createElementVNode("div",_hoisted_8$r,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(de.value,fe=>(e$b.openBlock(),e$b.createElementBlock("div",{key:fe.id,class:e$b.normalizeClass(["connection-result-item",{"connection-result-item--new":fe.fromChild}])},[e$b.createElementVNode("div",_hoisted_9$o,[fe.platform==="whatsapp"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_10$l,[...be[11]||(be[11]=[e$b.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)])])):fe.platform==="instagram"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_11$k,[...be[12]||(be[12]=[e$b.createElementVNode("path",{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$i,[...be[13]||(be[13]=[e$b.createElementVNode("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"},null,-1)])]))]),e$b.createElementVNode("span",_hoisted_13$g,e$b.toDisplayString(fe.instanceName),1),e$b.createElementVNode("div",_hoisted_14$f,[fe.fromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_15$d,"incorporado")):e$b.createCommentVNode("",!0),fe.userName?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$c,e$b.toDisplayString(fe.userName),1)):e$b.createCommentVNode("",!0)])],2))),128))],512),[[e$b.vShow,le.value]])])):e$b.createCommentVNode("",!0),e$b.createVNode(_sfc_main$1d,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:be[3]||(be[3]=fe=>re.value=fe)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1f,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:be[4]||(be[4]=fe=>oe.value=fe)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1e,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:be[5]||(be[5]=fe=>ie.value=fe)},null,8,["parent-contact","child-contact"])]),(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{to:"body"},[e$b.createVNode(simpleModal,{"is-open":ce.value,"onUpdate:isOpen":be[7]||(be[7]=fe=>ce.value=fe),size:"w-max",class:"text-white",header:{title:"Sobre as Conexões",svg:"<svg class='w-5 mr-1 text-blue-400 inline-block' viewBox='0 0 20 20' fill='currentColor'><path fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/></svg>"}},{body:e$b.withCtx(()=>[...be[14]||(be[14]=[e$b.createElementVNode("div",{class:"connections-help-body"},[e$b.createElementVNode("p",{class:"connections-help-intro"},[e$b.createTextVNode(" As "),e$b.createElementVNode("strong",null,"conexões"),e$b.createTextVNode(" representam os canais de comunicação vinculados ao contato, como números de WhatsApp ou contas do Instagram associados a instâncias do sistema. ")]),e$b.createElementVNode("div",{class:"connections-help-rule"},[e$b.createElementVNode("svg",{class:"connections-help-rule-icon",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("Todas as conexões de "),e$b.createElementVNode("em",null,"ambos"),e$b.createTextVNode(" os contatos são preservadas no contato final, nenhuma é perdida na mesclagem.")])]),e$b.createElementVNode("div",{class:"connections-help-rule"},[e$b.createElementVNode("svg",{class:"connections-help-rule-icon connections-help-rule-icon--green",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM14 11a1 1 0 011 1v1h1a1 1 0 110 2h-1v1a1 1 0 11-2 0v-1h-1a1 1 0 110-2h1v-1a1 1 0 011-1z"})]),e$b.createElementVNode("span",null,[e$b.createTextVNode("Conexões marcadas como "),e$b.createElementVNode("span",{class:"connections-help-badge"},"incorporado"),e$b.createTextVNode(" pertencem ao contato secundário, que será apagado após a mesclagem.")])]),e$b.createElementVNode("div",{class:"connections-help-rule"},[e$b.createElementVNode("svg",{class:"connections-help-rule-icon",viewBox:"0 0 20 20",fill:"currentColor"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})]),e$b.createElementVNode("span",null,"Se houver conexões duplicadas entre os dois contatos, ambas continuarão existindo — revise-as após a mesclagem, se necessário.")])],-1)])]),footer:e$b.withCtx(()=>[e$b.createElementVNode("button",{class:"connections-help-close-btn",type:"button",onClick:be[6]||(be[6]=fe=>ce.value=!1)}," Entendi ")]),_:1},8,["is-open"])]))],64))}},_hoisted_1$12={class:"contact-section contact-section--remove"},_hoisted_2$U={class:"contact-card-wrapper"},_sfc_main$1b={__name:"RemoveContactSection",props:{childContact:{type:Object,required:!0}},setup(ee){return(te,ne)=>(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$12,[ne[0]||(ne[0]=e$b.createStaticVNode('<header class="section-header section-header--remove"><div class="section-header-content"><div class="section-icon section-icon--remove"><svg class="size-4" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg></div><div><span class="section-title">Contato duplicado</span><span class="section-subtitle">Este contato será excluído permanentemente</span></div></div></header>',1)),e$b.createElementVNode("div",_hoisted_2$U,[e$b.createVNode(ContactCard,{contact:ee.childContact,size:"medium",variant:"danger"},null,8,["contact"])])]))}},_hoisted_1$11={class:"confirmation-panel"},_sfc_main$1a={__name:"MergeConfirmationPanel",props:{parentContact:{type:Object,required:!0},childContact:{type:Object,required:!0},mergeValidation:{type:Object,required:!0},mergePreview:{type:Object,default:null},confirmed:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:confirmed"],setup(ee,{emit:te}){const ne=te,ae=re=>{ne("update:confirmed",re)};return(re,oe)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$11,[e$b.createVNode(_sfc_main$1b,{"child-contact":ee.childContact},null,8,["child-contact"]),e$b.createVNode(MergeDirectionSection),e$b.createVNode(_sfc_main$1c,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,"merge-preview":ee.mergePreview},null,8,["parent-contact","child-contact","merge-preview"]),e$b.createVNode(_sfc_main$1j,{confirmed:ee.confirmed,loading:ee.loading,"onUpdate:confirmed":ae},null,8,["confirmed","loading"]),e$b.createVNode(_sfc_main$1h,{error:ee.error},null,8,["error"])]))}},normalizeString=ee=>(ee??"").toString().trim(),normalizeDigits=ee=>normalizeString(ee).replace(/\D/g,""),parseWhatsAppId=ee=>{const te=normalizeString(ee);return te?te.endsWith("@c.us")?{type:"jid",value:te.replace("@c.us","")}:te.endsWith("@lid")?{type:"lid",value:te.replace("@lid","")}:{type:null,value:null}:{type:null,value:null}},extractJid=ee=>{const te=parseWhatsAppId(ee);return te.type==="jid"?te.value:null},extractLid=ee=>{const te=parseWhatsAppId(ee);return te.type==="lid"?te.value:null},removeBrazilCountryCode=ee=>ee.startsWith("55")&&ee.length>=12?ee.slice(2):ee,splitBrazilianPhone=ee=>{const te=removeBrazilCountryCode(normalizeDigits(ee));return te.length<10?null:{areaCode:te.slice(0,2),localNumber:te.slice(2),normalized:te}},compareTelephones=(ee,te)=>{const ne=removeBrazilCountryCode(normalizeDigits(ee)),ae=removeBrazilCountryCode(normalizeDigits(te));if(!ne||!ae)return{isCompatible:!0,isSame:ne===ae,isNineDigitVariant:!1,normalizedParent:ne,normalizedChild:ae};if(ne===ae)return{isCompatible:!0,isSame:!0,isNineDigitVariant:!1,normalizedParent:ne,normalizedChild:ae};const re=splitBrazilianPhone(ee),oe=splitBrazilianPhone(te);if(!re||!oe||re.areaCode!==oe.areaCode)return{isCompatible:!1,isSame:!1,isNineDigitVariant:!1,normalizedParent:ne,normalizedChild:ae};const ie=re.localNumber.length===9&&oe.localNumber.length===8&&re.localNumber.startsWith("9")&&re.localNumber.slice(1)===oe.localNumber,le=oe.localNumber.length===9&&re.localNumber.length===8&&oe.localNumber.startsWith("9")&&oe.localNumber.slice(1)===re.localNumber,ce=ie||le;return{isCompatible:ce,isSame:!1,isNineDigitVariant:ce,normalizedParent:ne,normalizedChild:ae}},resolveMergedTelephone=(ee,te,ne)=>{var oe,ie;const ae=normalizeString(ee==null?void 0:ee.telephone),re=normalizeString(te==null?void 0:te.telephone);if(!ae&&!re)return"";if(!ae)return re;if(!re)return ae;if(ne!=null&&ne.isNineDigitVariant){const le=((oe=ne.normalizedParent)==null?void 0:oe.length)||0;if((((ie=ne.normalizedChild)==null?void 0:ie.length)||0)>le)return re}return ae},validateContactMerge=(ee,te)=>{if(!ee||!te)return{canMerge:!1,reasons:[],mergeableFields:[],phoneComparison:null};const ne=[],ae=[],re=normalizeString(ee.telephone),oe=normalizeString(te.telephone),ie=!!re,le=!!oe,ce=extractJid(ee.whatsapp_id),de=extractJid(te.whatsapp_id),ue=extractLid(ee.whatsapp_id),ve=extractLid(te.whatsapp_id);let me=null;return ie&&le&&(me=compareTelephones(re,oe),me.isCompatible?me.isNineDigitVariant&&ae.push("telephone"):ne.push("Os telefones são diferentes e não são variação de 9º dígito")),(ie&&!le||!ie&&le)&&(ue&&ve&&ue!==ve&&ne.push("WhatsApp LID diferente entre os contatos"),ce&&de&&ce!==de&&ne.push("WhatsApp JID diferente entre os contatos")),ce&&de&&ce===de&&ae.push("whatsapp_jid"),ue&&ve&&ue===ve&&ae.push("whatsapp_lid"),{canMerge:ne.length===0,reasons:ne,mergeableFields:ae,phoneComparison:me}},generateMergePreview=(ee,te,ne)=>{if(!ee||!te)return null;const ae=extractJid(ee.whatsapp_id),re=extractJid(te.whatsapp_id),oe=extractLid(ee.whatsapp_id),ie=extractLid(te.whatsapp_id);let le=ee.whatsapp_id||te.whatsapp_id;ae||re?le=`${ae||re}@c.us`:(oe||ie)&&(le=`${oe||ie}@lid`);const ce=ee.tags||[],de=te.tags||[],ue=new Map;ce.forEach(ye=>ue.set(ye.id,ye)),de.forEach(ye=>{ue.has(ye.id)||ue.set(ye.id,ye)});const ve=Array.from(ue.values()),me=ee.products||[],be=te.products||[],fe=new Map;me.forEach(ye=>fe.set(ye.id,ye)),be.forEach(ye=>{fe.has(ye.id)||fe.set(ye.id,ye)});const pe=Array.from(fe.values()),_e=ee.segmentation_fields||[],ge=te.segmentation_fields||[],ke=new Map;_e.forEach(ye=>ke.set(ye.id,{...ye})),ge.forEach(ye=>{if(ke.has(ye.id)){const Ee=ke.get(ye.id),Se=normalizeString(Ee.content),Le=normalizeString(ye.content);!Se&&Le&&ke.set(ye.id,{...Ee,content:ye.content,content_id:ye.content_id})}else ke.set(ye.id,{...ye})});const $e=Array.from(ke.values());return{name:normalizeString(ee.name)||normalizeString(te.name),telephone:resolveMergedTelephone(ee,te,ne),whatsapp_id:le,instagram_user_name:normalizeString(ee.instagram_user_name)||normalizeString(te.instagram_user_name),tags:ve,products:pe,segmentation_fields:$e}};function useContactSearch(ee){const te=e$b.ref(""),ne=e$b.ref([]),ae=e$b.ref(!1),re=e$b.ref(1),oe=e$b.ref(null),ie=e$b.ref(0);let le=null,ce=0;const de=(be={})=>{const fe=new URLSearchParams;return Object.entries(be).forEach(([pe,_e])=>{_e!=null&&_e!==""&&fe.append(pe,_e)}),`${contact_url}?${fe.toString()}`},ue=async(be=!1)=>{const fe=++ce;be&&(re.value=1,ne.value=[],oe.value=null,ie.value++),ae.value=!0;try{const pe=await api.get(de({page:re.value,query:te.value||void 0}));if(fe!==ce)return;const _e=pe==null?void 0:pe.data,ge=Array.isArray(_e)?_e:Array.isArray(_e==null?void 0:_e.results)?_e.results:[];oe.value=(_e==null?void 0:_e.next)||null;const ke=normalizeString((ee==null?void 0:ee.value)||ee),$e=ge.filter(ye=>{const Ee=normalizeString(ye==null?void 0:ye.id);return Ee&&Ee!==ke});be||re.value===1?ne.value=$e:ne.value=[...ne.value,...$e]}catch(pe){if(fe!==ce)return;console.error("Erro ao buscar contatos:",pe),ne.value=be?[]:ne.value}finally{fe===ce&&(ae.value=!1)}},ve=async be=>{if(!oe.value){be.complete();return}re.value++;try{await ue(!1),oe.value?be.loaded():be.complete()}catch(fe){console.error("Erro ao carregar mais contatos:",fe),be.complete()}},me=()=>{te.value="",ne.value=[],re.value=1,oe.value=null,ce++,clearTimeout(le)};return e$b.watch(te,()=>{clearTimeout(le),le=setTimeout(()=>{ue(!0)},350)}),e$b.onUnmounted(()=>{clearTimeout(le),ce++}),{searchTerm:te,candidates:ne,candidatesLoading:ae,page:re,nextPage:oe,infiniteKey:ie,fetchCandidates:ue,loadMoreCandidates:ve,resetSearch:me}}const _hoisted_1$10={key:0,class:"merge-overlay"},_hoisted_2$T={class:"merge-modal bg-base-200"},_hoisted_3$O={class:"merge-header bg-base-300"},_hoisted_4$J={class:"merge-header-content"},_hoisted_5$D={class:"merge-subtitle"},_hoisted_6$y=["disabled"],_hoisted_7$v={class:"step-indicator"},_hoisted_8$q={class:"step-circle"},_hoisted_9$n={key:0},_hoisted_10$k={key:1},_hoisted_11$j={class:"merge-content"},_hoisted_12$h={class:"current-contact-section"},_hoisted_13$f={class:"search-section"},_hoisted_14$e={class:"search-box bg-base-300"},_hoisted_15$c={key:0,class:"search-spinner"},_hoisted_16$b={key:1,class:"empty-state"},_hoisted_17$6={key:2,class:"loading-state"},_hoisted_18$6={key:0,class:"validation-warning"},_hoisted_19$5={class:"warning-content"},_hoisted_20$5={class:"warning-list"},_hoisted_21$4={key:1,class:"merge-info"},_hoisted_22$2={class:"info-content"},_hoisted_23$1={class:"info-list"},_hoisted_24$1={key:0},_hoisted_25$1={key:1},_hoisted_26={key:2},_hoisted_27={class:"merge-footer bg-base-300"},_hoisted_28=["disabled"],_hoisted_29=["disabled"],_hoisted_30=["disabled"],_hoisted_31=["disabled"],_sfc_main$19={__name:"contactMergeModal",props:{isOpen:{type:Boolean,default:!1},currentContact:{type:Object,default:()=>({})},mergeContacts:{type:Function,default:null}},emits:["close","merged"],setup(ee,{emit:te}){const ne=ee,ae=te,{searchTerm:re,candidates:oe,candidatesLoading:ie,nextPage:le,infiniteKey:ce,fetchCandidates:de,loadMoreCandidates:ue,resetSearch:ve}=useContactSearch(()=>{var Ae;return(Ae=ne.currentContact)==null?void 0:Ae.id}),me=e$b.ref("select"),be=e$b.ref(!1),fe=e$b.ref(""),pe=e$b.ref(!1),_e=e$b.ref(null),ge=Ae=>JSON.parse(JSON.stringify(e$b.toRaw(Ae??{}))),ke=Ae=>{const xe=ge(Ae);return delete xe.__mergeKey,xe},$e=e$b.computed(()=>ne.currentContact),ye=e$b.computed(()=>_e.value),Ee=e$b.computed(()=>!!_e.value),Se=e$b.computed(()=>validateContactMerge($e.value,ye.value)),Le=e$b.computed(()=>generateMergePreview($e.value,ye.value,Se.value.phoneComparison)),Me=e$b.computed(()=>Ee.value&&Se.value.canMerge),De=e$b.computed(()=>Se.value.canMerge&&pe.value&&!be.value&&Ee.value),Oe=e$b.computed(()=>oe.value.filter(Ae=>{var xe;return Ae.id!==((xe=$e.value)==null?void 0:xe.id)})),Re=()=>{me.value="select",fe.value="",pe.value=!1,be.value=!1,_e.value=null,ve()},ze=({force:Ae=!1}={})=>{be.value&&!Ae||(Re(),ae("close"))},Ve=Ae=>{var xe;((xe=_e.value)==null?void 0:xe.id)===Ae.id?_e.value=null:_e.value=ge(Ae)},Ne=()=>{Me.value&&(me.value="confirm")},Pe=()=>{me.value="select",pe.value=!1,fe.value=""},Be=async()=>{if(!De.value)return;const Ae={parentId:$e.value.id??null,childId:ye.value.id??null,parentContact:ke($e.value),childContact:ke(ye.value),mergeableFields:[...Se.value.mergeableFields],mergedPreview:Le.value?{...Le.value}:null};try{be.value=!0,fe.value="";let xe=null;if(typeof ne.mergeContacts=="function"){const Ce=await ne.mergeContacts(Ae);xe=(Ce==null?void 0:Ce.object)??null}ae("merged",{...Ae,contact:xe}),ze({force:!0})}catch(xe){fe.value=(xe==null?void 0:xe.message)||"Não foi possível concluir a mesclagem de contatos."}finally{be.value=!1}};return e$b.watch(()=>ne.isOpen,Ae=>{Ae&&(Re(),de(!0))}),(Ae,xe)=>(e$b.openBlock(),e$b.createBlock(e$b.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e$b.withCtx(()=>[ee.isOpen?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$10,[e$b.createElementVNode("div",_hoisted_2$T,[e$b.createElementVNode("header",_hoisted_3$O,[e$b.createElementVNode("div",_hoisted_4$J,[xe[3]||(xe[3]=e$b.createElementVNode("div",{class:"merge-header-icon"},[e$b.createElementVNode("svg",{class:"size-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H6Zm7.25-2.095c.478-.86.75-1.85.75-2.905a5.973 5.973 0 0 0-.75-2.906 4 4 0 1 1 0 5.811ZM15.466 20c.34-.588.535-1.271.535-2v-1a5.978 5.978 0 0 0-1.528-4H18a4 4 0 0 1 4 4v1a2 2 0 0 1-2 2h-4.535Z","clip-rule":"evenodd"})])],-1)),e$b.createElementVNode("div",null,[xe[2]||(xe[2]=e$b.createElementVNode("h2",{class:"merge-title"},"Mesclar Contatos",-1)),e$b.createElementVNode("p",_hoisted_5$D,e$b.toDisplayString(me.value==="select"?"Selecione o contato para mesclar":"Confirme a mesclagem"),1)])]),e$b.createElementVNode("button",{class:"merge-close-btn",disabled:be.value,onClick:ze},[...xe[4]||(xe[4]=[e$b.createElementVNode("svg",{class:"size-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,_hoisted_6$y)]),e$b.createElementVNode("div",_hoisted_7$v,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:me.value==="select",completed:me.value==="confirm"}])},[e$b.createElementVNode("div",_hoisted_8$q,[me.value==="confirm"?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$n,"✓")):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_10$k,"1"))]),xe[5]||(xe[5]=e$b.createElementVNode("span",{class:"step-label"},"Selecionar",-1))],2),e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-line",{active:me.value==="confirm"}])},null,2),e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:me.value==="confirm"}])},[...xe[6]||(xe[6]=[e$b.createElementVNode("div",{class:"step-circle"},"2",-1),e$b.createElementVNode("span",{class:"step-label"},"Confirmar",-1)])],2)]),e$b.createElementVNode("div",_hoisted_11$j,[me.value==="select"?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[e$b.createElementVNode("div",_hoisted_12$h,[xe[7]||(xe[7]=e$b.createElementVNode("p",{class:"section-label"},"Contato Principal (será mantido)",-1)),e$b.createVNode(ContactCard,{contact:ee.currentContact,variant:"primary","show-badge":!0,"badge-text":"Principal","show-details":!0},null,8,["contact"])]),e$b.createElementVNode("div",_hoisted_13$f,[xe[10]||(xe[10]=e$b.createElementVNode("p",{class:"section-label"}," Selecione o contato a ser mesclado (será removido) ",-1)),e$b.createElementVNode("div",_hoisted_14$e,[xe[9]||(xe[9]=e$b.createElementVNode("svg",{class:"search-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),e$b.withDirectives(e$b.createElementVNode("input",{"onUpdate:modelValue":xe[0]||(xe[0]=Ce=>e$b.isRef(re)?re.value=Ce:null),placeholder:"Buscar por nome ou telefone...",class:"search-input ring-0 focus:ring-0 bg-base-300"},null,512),[[e$b.vModelText,e$b.unref(re)]]),e$b.unref(ie)&&Ae.page===1?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_15$c,[...xe[8]||(xe[8]=[e$b.createElementVNode("div",{class:"spinner"},null,-1)])])):e$b.createCommentVNode("",!0)])]),(e$b.openBlock(),e$b.createElementBlock("div",{class:"candidates-list",key:e$b.unref(ce)},[Oe.value.length>0?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Oe.value,Ce=>{var Fe;return e$b.openBlock(),e$b.createBlock(ContactCard,{key:Ce.id,contact:Ce,selectable:!0,selected:((Fe=_e.value)==null?void 0:Fe.id)===Ce.id,"show-details":!0,onSelect:Ve},null,8,["contact","selected"])}),128)),e$b.unref(le)?(e$b.openBlock(),e$b.createBlock(e$b.unref(Y$1),{key:0,onInfinite:e$b.unref(ue),class:"infinite-loader"},{spinner:e$b.withCtx(()=>[...xe[11]||(xe[11]=[e$b.createElementVNode("div",{class:"infinite-spinner"},[e$b.createElementVNode("div",{class:"spinner"}),e$b.createElementVNode("span",null,"Carregando mais contatos...")],-1)])]),complete:e$b.withCtx(()=>[...xe[12]||(xe[12]=[e$b.createElementVNode("span",null,null,-1)])]),_:1},8,["onInfinite"])):e$b.createCommentVNode("",!0)],64)):e$b.unref(ie)?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$6,[...xe[14]||(xe[14]=[e$b.createElementVNode("div",{class:"spinner spinner--lg"},null,-1),e$b.createElementVNode("span",null,"Buscando contatos...",-1)])])):(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_16$b,[...xe[13]||(xe[13]=[e$b.createElementVNode("svg",{class:"empty-icon",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})],-1),e$b.createElementVNode("p",{class:"empty-text"},"Nenhum contato encontrado",-1),e$b.createElementVNode("p",{class:"empty-hint"}," Tente buscar por outro nome ou telefone ",-1)])]))])),Ee.value&&!Se.value.canMerge?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_18$6,[xe[16]||(xe[16]=e$b.createElementVNode("svg",{class:"warning-icon",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("div",_hoisted_19$5,[xe[15]||(xe[15]=e$b.createElementVNode("p",{class:"warning-title"},"Mesclagem não permitida",-1)),e$b.createElementVNode("ul",_hoisted_20$5,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(Se.value.reasons,(Ce,Fe)=>(e$b.openBlock(),e$b.createElementBlock("li",{key:Fe},e$b.toDisplayString(Ce),1))),128))])])])):e$b.createCommentVNode("",!0),Ee.value&&Se.value.canMerge&&Se.value.mergeableFields.length>0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_21$4,[xe[18]||(xe[18]=e$b.createElementVNode("svg",{class:"info-icon",fill:"currentColor",viewBox:"0 0 20 20"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("div",_hoisted_22$2,[xe[17]||(xe[17]=e$b.createElementVNode("p",{class:"info-title"},"Mesclagem permitida",-1)),e$b.createElementVNode("ul",_hoisted_23$1,[Se.value.mergeableFields.includes("telephone")?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_24$1," Telefones são variação de 9º dígito - será mantido o com 9 dígitos ")):e$b.createCommentVNode("",!0),Se.value.mergeableFields.includes("whatsapp_jid")?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_25$1," WhatsApp JID é o mesmo em ambos os contatos ")):e$b.createCommentVNode("",!0),Se.value.mergeableFields.includes("whatsapp_lid")?(e$b.openBlock(),e$b.createElementBlock("li",_hoisted_26," WhatsApp LID é o mesmo em ambos os contatos ")):e$b.createCommentVNode("",!0)])])])):e$b.createCommentVNode("",!0)],64)):me.value==="confirm"?(e$b.openBlock(),e$b.createBlock(_sfc_main$1a,{key:1,"parent-contact":$e.value,"child-contact":ye.value,"merge-validation":Se.value,"merge-preview":Le.value,confirmed:pe.value,loading:be.value,error:fe.value,"onUpdate:confirmed":xe[1]||(xe[1]=Ce=>pe.value=Ce)},null,8,["parent-contact","child-contact","merge-validation","merge-preview","confirmed","loading","error"])):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("footer",_hoisted_27,[me.value==="confirm"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"btn-secondary",disabled:be.value,onClick:Pe},[...xe[19]||(xe[19]=[e$b.createElementVNode("svg",{class:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1),e$b.createTextVNode(" Voltar ",-1)])],8,_hoisted_28)):(e$b.openBlock(),e$b.createElementBlock("button",{key:1,class:"btn-secondary",disabled:be.value,onClick:ze}," Cancelar ",8,_hoisted_29)),me.value==="select"?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,class:"btn-primary",disabled:!Me.value,onClick:Ne},[...xe[20]||(xe[20]=[e$b.createTextVNode(" Continuar ",-1),e$b.createElementVNode("svg",{class:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"})],-1)])],8,_hoisted_30)):(e$b.openBlock(),e$b.createElementBlock("button",{key:3,class:"btn-primary",disabled:!De.value,onClick:Be},[be.value?(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:0},[xe[21]||(xe[21]=e$b.createElementVNode("div",{class:"spinner spinner--sm spinner--white"},null,-1)),xe[22]||(xe[22]=e$b.createTextVNode(" Mesclando... ",-1))],64)):(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,{key:1},[xe[23]||(xe[23]=e$b.createElementVNode("svg",{class:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})],-1)),xe[24]||(xe[24]=e$b.createTextVNode(" Confirmar Mesclagem ",-1))],64))],8,_hoisted_31))])])])):e$b.createCommentVNode("",!0)]),_:1}))}},ContactMergeModal=_export_sfc$1(_sfc_main$19,[["__scopeId","data-v-d61138e7"]]),_hoisted_1$$={class:"modal-form-container-wrapper"},_hoisted_2$S={class:"modal_responsive"},_hoisted_3$N={style:{"min-height":"100%"},class:"flex min-h-full items-center justify-center text-center"},_hoisted_4$I={class:"modal-form-container"},_hoisted_5$C={class:"modal-form-header bg-base-300"},_hoisted_6$x={class:"flex items-center gap-2"},_hoisted_7$u={class:"flex flex-col items-start"},_hoisted_8$p={class:"text-lg"},_hoisted_9$m={key:0,class:"id-label-clients"},_hoisted_10$j={class:"flex items-center gap-2"},_hoisted_11$i=["disabled"],_hoisted_12$g={key:1,class:"w-full"},_hoisted_13$e={key:2,class:"modal-form-left-column-body"},_hoisted_14$d={class:"w-full"},_hoisted_15$b={class:"flex w-full flex-col gap-2"},_hoisted_16$a={class:"flex items-center justify-between px-1"},_hoisted_17$5={key:0,class:"flex size-full flex-col gap-2"},_hoisted_18$5={class:"flex items-center justify-between px-1"},_hoisted_19$4={class:"flex size-full min-h-0 flex-col rounded-lg bg-base-300"},_hoisted_20$4={key:3,class:"right-column bg-base-300"},_hoisted_21$3={key:0,class:"right-column bg-base-300"},_hoisted_22$1={class:"modal-form-end-button bg-base-300"},_hoisted_23=["disabled"],_hoisted_24={key:0,class:"size-4 animate-spin rounded-full border-4 border-solid border-t-transparent text-white"},_hoisted_25={key:1,class:"text-xs font-semibold"},_sfc_main$18={__name:"clientsForm",props:{form:{type:Object,default:()=>({tags:[],country:"BR",name:"",photo:null,raw_telephone:"",telephone:"",instagram_user_name:"",whatsapp_id:"",whatsapp_jid:"",whatsapp_lid:null,rating:null,outcome:null,created_at:"",updated_at:"",client:"",segmentation_fields:[],products:[],notes:"",blocked:!1})},save:{type:Function,default:()=>{}},hasCrmPlus:{type:Boolean,default:!1},canBlockContacts:{type:Boolean,default:!0},allProducts:{type:Object,default:()=>{}},allTags:{type:Object,default:()=>{}},departmentBypass:{type:String,default:""},currentAttendance:{type:Object,default:()=>null},supervisor:{type:Boolean,default:!1},canMergeContacts:{type:Boolean,default:!1},isDev:{type:Boolean,default:!1}},emits:["close","save","merge","photo-updated","photo-refresh"],setup(ee,{emit:te}){const ne=te,ae=e$b.ref("data"),re=ee,oe=e$b.reactive({...re.form}),ie=e$b.ref(!1),le=e$b.ref(!1),ce=e$b.ref(null),de=ze=>{oe.photo=ze,ne("photo-updated",{id:oe.id,photo:ze})},ue=e$b.ref([{title:"Nome",info:!1,type:"text",placeholder:"Digite o nome do contato",empty:e$b.computed(()=>le.value?le.value.some(ze=>ze.startsWith("name")):!1),data:e$b.computed({get:()=>oe.name,set:ze=>oe.name=ze})},{title:"Descrição",info:"Descreva o produto para facilitar a identificação",type:"textArea",placeholder:"Automatize fluxos de trabalho com integração rápida e segura entre sistemas.",empty:!1,data:e$b.computed({get:()=>oe.notes,set:ze=>oe.notes=ze})}]),ve=e$b.computed(()=>re.form.mode==="edit"?"Editar cliente":"Adicionar Novo Cliente"),me=ze=>{var Ne;const Ve=[];return(Ne=ze.name)!=null&&Ne.trim()||Ve.push("name"),Ve};e$b.computed(()=>le.value?le.value.some(ze=>ze.startsWith("telephone")):!1);const be=e$b.ref(!1),fe=e$b.computed(()=>re.canMergeContacts?oe.id?"ready":"missing-contact-id":"no-permission"),pe=e$b.computed(()=>fe.value==="ready"),_e=e$b.computed(()=>fe.value==="no-permission"?"Você não tem permissão para mesclar contatos.":fe.value==="missing-contact-id"?"Salve o contato para habilitar a mesclagem.":"Mescla contatos para unificar histórico e informações."),ge=()=>{const ze=fe.value==="no-permission";notiwind.notify({group:ze?"error":"info",title:ze?"Sem permissão":"Ação indisponível",text:ze?"Você não tem permissão para mesclar contatos.":"Salve o contato antes de iniciar a mesclagem."},3e3)},ke=()=>{if(!pe.value){ge();return}be.value=!0},$e=()=>{be.value=!1},ye=ze=>{ne("merge",{...ze,removedContactId:ze.childId}),$e()},Ee=async ze=>{var Ve;if(!pe.value)throw ge(),new Error("Fluxo de mesclagem bloqueado.");try{return(await api.post("/v1/api/contacts/contact/merge/",{contact_father:ze.parentId,contact_children:ze.childId,force:!0})).data}catch(Ne){throw console.error("Erro ao mesclar contatos:",Ne),((Ve=Ne.response)==null?void 0:Ve.data)||new Error("Ocorreu um erro ao mesclar os contatos.")}},Se=async()=>{try{if(ie.value=!0,le.value=me(oe),le.value.length>0)return;ce.value=JSON.parse(JSON.stringify(oe)),await re.save(ce.value)}catch(ze){console.error(ze)}finally{ie.value=!1}};e$b.watch(()=>re.form,ze=>{Object.assign(oe,e$b.toRaw(ze))},{immediate:!0});const Le=e$b.ref(window.innerWidth),Me=()=>{Le.value=window.innerWidth};e$b.onMounted(()=>{window.addEventListener("resize",Me)}),e$b.onUnmounted(()=>{window.removeEventListener("resize",Me)});const De=e$b.computed(()=>Le.value>=640);e$b.watch(De,(ze,Ve)=>{Ve?ae.value="contact":!Ve&&ze&&(ae.value="data")},{immediate:!0});const Oe=[{label:"Informações",value:"data"},{label:"Produtos",value:"products",disabled:re.form.status==="screening"||re.form.status==="finished",get disabledReason(){if(re.form.status==="screening")return"Este recurso não está disponível para conversas em leads.";if(re.form.status==="finished")return"Este recurso não está disponível para conversas finalizadas."}},{label:"Carteira",value:"wallet",disabled:!oe.id||re.form.status==="screening"||re.form.status==="finished",get disabledReason(){if(!oe.id)return"Salve o contato para habilitar a carteira.";if(re.form.status==="screening")return"Este recurso não está disponível para conversas em leads.";if(re.form.status==="finished")return"Este recurso não está disponível para conversas finalizadas."}}],Re=e$b.computed(()=>{const ze={label:"Contato",value:"contact"},Ve=Oe.filter(Ne=>Ne.value!=="contact");return re.hasCrmPlus?De.value?[...Ve]:[ze,...Ve]:[ze,...Ve.filter(Ne=>Ne.value!=="products"&&Ne.value!=="wallet")]});return(ze,Ve)=>{var Pe,Be,Ae;const Ne=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$$,[Ve[28]||(Ve[28]=e$b.createElementVNode("div",{class:"modal-form-background"},null,-1)),e$b.createElementVNode("div",_hoisted_2$S,[e$b.createElementVNode("div",_hoisted_3$N,[e$b.createElementVNode("div",_hoisted_4$I,[e$b.createElementVNode("div",{class:e$b.normalizeClass([{noCrmPlus:!ee.hasCrmPlus},"clients-form-background shadow-card relative rounded-2xl bg-base-200"])},[e$b.createElementVNode("div",_hoisted_5$C,[e$b.createElementVNode("span",_hoisted_6$x,[Ve[22]||(Ve[22]=e$b.createElementVNode("svg",{class:"size-6 text-green-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-4Z","clip-rule":"evenodd"})],-1)),e$b.createElementVNode("span",_hoisted_7$u,[e$b.createElementVNode("p",_hoisted_8$p,e$b.toDisplayString(ve.value),1),oe.id?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_9$m,"ID: "+e$b.toDisplayString(oe.id),1)):e$b.createCommentVNode("",!0)])]),e$b.createElementVNode("section",_hoisted_10$j,[e$b.createVNode(Ne,{hover:"",content:_e.value,placement:"bottom"},{default:e$b.withCtx(()=>[e$b.createElementVNode("div",{class:e$b.normalizeClass(["inline-flex",{"cursor-not-allowed":!pe.value}])},[e$b.createElementVNode("button",{class:"button-merge-clients",disabled:!pe.value,onClick:ke}," Mesclar contatos ",8,_hoisted_11$i)],2)]),_:1},8,["content"]),e$b.createElementVNode("button",{class:"rounded-md bg-base-200 p-1.5 transition hover:bg-base-100",onClick:Ve[0]||(Ve[0]=xe=>ne("close"))},[...Ve[23]||(Ve[23]=[e$b.createElementVNode("svg",{class:"size-4 text-white dark:text-black","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)])])])]),e$b.createElementVNode("div",{class:e$b.normalizeClass([De.value?"grid grid-cols-2":"flex","modal-form-body"])},[e$b.createElementVNode("section",{class:e$b.normalizeClass([De.value?"p-2":"p-1.5","left-column"])},[De.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createBlock(ToggleListButtons,{key:0,modelValue:ae.value,"onUpdate:modelValue":Ve[1]||(Ve[1]=xe=>ae.value=xe),buttons:Re.value},null,8,["modelValue","buttons"])),De.value||ae.value==="contact"?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_12$g,[e$b.createVNode(ClientOverviewPanel,{"has-crm-plus":ee.hasCrmPlus,outcome:oe.outcome,rating:oe.rating,photo:oe.photo,name:oe.name,blocked:oe.blocked,"can-block-contacts":ee.canBlockContacts,"contact-id":oe.id,"onUpdate:outcome":Ve[2]||(Ve[2]=xe=>oe.outcome=xe),"onUpdate:rating":Ve[3]||(Ve[3]=xe=>oe.rating=xe),"onUpdate:blocked":Ve[4]||(Ve[4]=xe=>oe.blocked=xe),"onUpdate:photo":de,onPhotoRefresh:Ve[5]||(Ve[5]=xe=>ne("photo-refresh",xe))},null,8,["has-crm-plus","outcome","rating","photo","name","blocked","can-block-contacts","contact-id"])])):e$b.createCommentVNode("",!0),De.value||ae.value==="contact"?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$e,[e$b.createElementVNode("div",_hoisted_14$d,[e$b.createVNode(PrimaryInput,{content:ue.value[0],"onUpdate:content":Ve[6]||(Ve[6]=xe=>ue.value[0].data=xe.data)},null,8,["content"])]),e$b.createElementVNode("div",_hoisted_15$b,[e$b.createElementVNode("header",_hoisted_16$a,[Ve[25]||(Ve[25]=e$b.createElementVNode("p",{class:"text-left text-[13px] font-semibold"},"Escolha suas etiquetas",-1)),e$b.createVNode(Ne,{hover:"",content:"Etiquetas atribuídas ao cliente",placement:"top"},{default:e$b.withCtx(()=>[...Ve[24]||(Ve[24]=[e$b.createElementVNode("svg",{class:"size-4 text-white dark:text-black",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})],-1)])]),_:1})]),e$b.createVNode(SelectMultipleTags,{modelValue:oe.tags,"onUpdate:modelValue":Ve[7]||(Ve[7]=xe=>oe.tags=xe),overlay:!0,"all-tags":ee.allTags},null,8,["modelValue","all-tags"])]),ee.hasCrmPlus?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_17$5,[e$b.createElementVNode("header",_hoisted_18$5,[Ve[27]||(Ve[27]=e$b.createElementVNode("p",{class:"text-left text-[13px] font-semibold"},"Anotações sobre o cliente",-1)),e$b.createVNode(Ne,{hover:"",content:"Anotações adicionais sobre o cliente",placement:"top"},{default:e$b.withCtx(()=>[...Ve[26]||(Ve[26]=[e$b.createElementVNode("svg",{class:"size-4 text-white dark:text-black",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.408-5.5a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2h-.01ZM10 10a1 1 0 1 0 0 2h1v3h-1a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2h-1v-4a1 1 0 0 0-1-1h-2Z"})],-1)])]),_:1})]),e$b.createElementVNode("div",_hoisted_19$4,[e$b.withDirectives(e$b.createElementVNode("textarea",{"onUpdate:modelValue":Ve[8]||(Ve[8]=xe=>oe.notes=xe),class:"form-text-area min-h-0 flex-1 bg-base-300",maxlength:"1000","aria-label":"Anotações do cliente"},null,512),[[e$b.vModelText,oe.notes]]),e$b.createElementVNode("div",{class:e$b.normalizeClass(["mb-1 mr-1 rounded-md bg-base-300 px-1 text-right text-[10px]",((Pe=oe.notes)==null?void 0:Pe.length)>900?"text-red-500":((Be=oe.notes)==null?void 0:Be.length)>700?"text-yellow-500":"text-gray-400"])},e$b.toDisplayString(((Ae=oe.notes)==null?void 0:Ae.length)||0)+"/1000 ",3)])])):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0),!De.value&&ae.value!=="contact"?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_20$4,[e$b.createVNode(ContactSection,{"page-state":ae.value,"onUpdate:pageState":Ve[9]||(Ve[9]=xe=>ae.value=xe),telephone:oe.telephone,"onUpdate:telephone":Ve[10]||(Ve[10]=xe=>oe.telephone=xe),country:oe.country,"onUpdate:country":Ve[11]||(Ve[11]=xe=>oe.country=xe),"instagram-user-name":oe.instagram_user_name,"onUpdate:instagramUserName":Ve[12]||(Ve[12]=xe=>oe.instagram_user_name=xe),"segmentation-fields":oe.segmentation_fields,"onUpdate:segmentationFields":Ve[13]||(Ve[13]=xe=>oe.segmentation_fields=xe),products:oe.products,"onUpdate:products":Ve[14]||(Ve[14]=xe=>oe.products=xe),"view-contact-number":oe.viewContactNumber,"has-crm-plus":ee.hasCrmPlus,"handler-toggle-buttons":Re.value,"all-products":ee.allProducts,"department-bypass":ee.departmentBypass,"current-attendance":ee.currentAttendance,supervisor:re.supervisor,"is-large-screen":De.value,"contact-id":oe.id,contact:oe},null,8,["page-state","telephone","country","instagram-user-name","segmentation-fields","products","view-contact-number","has-crm-plus","handler-toggle-buttons","all-products","department-bypass","current-attendance","supervisor","is-large-screen","contact-id","contact"])])):e$b.createCommentVNode("",!0)],2),De.value?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_21$3,[e$b.createVNode(ContactSection,{"page-state":ae.value,"onUpdate:pageState":Ve[15]||(Ve[15]=xe=>ae.value=xe),telephone:oe.telephone,"onUpdate:telephone":Ve[16]||(Ve[16]=xe=>oe.telephone=xe),country:oe.country,"onUpdate:country":Ve[17]||(Ve[17]=xe=>oe.country=xe),"instagram-user-name":oe.instagram_user_name,"onUpdate:instagramUserName":Ve[18]||(Ve[18]=xe=>oe.instagram_user_name=xe),"segmentation-fields":oe.segmentation_fields,"onUpdate:segmentationFields":Ve[19]||(Ve[19]=xe=>oe.segmentation_fields=xe),products:oe.products,"onUpdate:products":Ve[20]||(Ve[20]=xe=>oe.products=xe),"view-contact-number":oe.viewContactNumber,"has-crm-plus":ee.hasCrmPlus,"handler-toggle-buttons":Re.value,"all-products":ee.allProducts,"department-bypass":ee.departmentBypass,"current-attendance":ee.currentAttendance,supervisor:re.supervisor,"is-large-screen":De.value,"contact-id":oe.id,contact:oe},null,8,["page-state","telephone","country","instagram-user-name","segmentation-fields","products","view-contact-number","has-crm-plus","handler-toggle-buttons","all-products","department-bypass","current-attendance","supervisor","is-large-screen","contact-id","contact"])])):e$b.createCommentVNode("",!0)],2),e$b.createElementVNode("div",_hoisted_22$1,[e$b.createElementVNode("button",{disabled:ie.value,class:"button-save-clients",onClick:Ve[21]||(Ve[21]=xe=>Se())},[ie.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_24)):(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_25,"Salvar"))],8,_hoisted_23)]),e$b.createVNode(e$b.unref(ContactMergeModal),{"is-open":be.value,"current-contact":oe,"merge-contacts":Ee,onClose:$e,onMerged:ye},null,8,["is-open","current-contact"])],2)])])])])}}},ClientsForm=_export_sfc$1(_sfc_main$18,[["__scopeId","data-v-085f8937"]]),_hoisted_1$_={class:"sm-tag-list"},_hoisted_2$R={class:"sm-tag-list__popper-text"},_hoisted_3$M={class:"sm-tag-list__overflow"},_hoisted_4$H={key:1,class:"sm-tag-list__empty"},_sfc_main$17={__name:"TagList",props:{tags:{type:Array,default:()=>[]},max:{type:Number,default:0},size:{type:String,default:"sm"},variant:{type:String,default:"name"},removable:{type:Boolean,default:!1},maxWidth:{type:String,default:null},emptyText:{type:String,default:""}},emits:["remove"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>ne.tags||[]),oe=e$b.computed(()=>ne.max>0?re.value.slice(0,ne.max):re.value),ie=e$b.computed(()=>Math.max(0,re.value.length-oe.value.length)),le=(ce,de)=>(ce==null?void 0:ce.id)??(ce==null?void 0:ce.name)??de;return(ce,de)=>{const ue=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createElementBlock("section",_hoisted_1$_,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(oe.value,(ve,me)=>(e$b.openBlock(),e$b.createBlock(ue,{key:le(ve,me),hover:"",arrow:"",placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("p",_hoisted_2$R,e$b.toDisplayString(ve.name),1)]),default:e$b.withCtx(()=>[e$b.createVNode(TagChip,{tag:ve,size:ee.size,variant:ee.variant,removable:ee.removable,"max-width":ee.maxWidth,onRemove:de[0]||(de[0]=be=>ae("remove",be))},null,8,["tag","size","variant","removable","max-width"])]),_:2},1024))),128)),ie.value?(e$b.openBlock(),e$b.createBlock(ue,{key:0,hover:"",arrow:"",placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("section",_hoisted_3$M,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.tags,(ve,me)=>(e$b.openBlock(),e$b.createBlock(TagChip,{key:le(ve,me),tag:ve,size:ee.size,"max-width":"12rem"},null,8,["tag","size"]))),128))])]),default:e$b.withCtx(()=>[e$b.createVNode(TagChip,{tag:{name:`+${ie.value}`},size:ee.size,"aria-label":"Mais etiquetas"},null,8,["tag","size"])]),_:1})):e$b.createCommentVNode("",!0),!re.value.length&&ee.emptyText?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_4$H,e$b.toDisplayString(ee.emptyText),1)):e$b.createCommentVNode("",!0)])}}},TagList=_export_sfc$1(_sfc_main$17,[["__scopeId","data-v-f7154dbb"]]),_sfc_main$16={__name:"tagView",props:{clients:{type:Object,required:!0}},setup(ee){const te=ee,ne=e$b.computed(()=>{var ae;return((ae=te.clients)==null?void 0:ae.tags)||[]});return(ae,re)=>(e$b.openBlock(),e$b.createBlock(TagList,{class:"justify-center",tags:ne.value,max:4,size:"xs",variant:"initial","empty-text":"-"},null,8,["tags"]))}},_sfc_main$15={__name:"floating-dev",setup(ee){const te=e$b.ref(!1),ne=e$b.ref({x:30,y:30}),ae=e$b.ref({x:0,y:0}),re=e$b.ref(!1),oe=e$b.ref(null),ie=e$b.ref(null),le=e$b.ref({vertical:"bottom",horizontal:"right"}),ce=e$b.computed(()=>({position:"fixed",left:`${ne.value.x}px`,top:`${ne.value.y}px`,zIndex:1e3,cursor:re.value?"grabbing":"grab"})),de=e$b.computed(()=>{const pe={position:"absolute",background:"#fff",borderRadius:"10px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2)",width:"280px",maxWidth:"90vw",zIndex:1001};return le.value.vertical==="top"?pe.bottom="60px":pe.top="60px",le.value.horizontal==="left"?pe.right="0":pe.left="0",pe});async function ue(){if(te.value){te.value=!1;return}te.value=!0,await e$b.nextTick(),ve()}function ve(){if(!oe.value||!ie.value)return;const pe=oe.value.getBoundingClientRect(),_e=ie.value.offsetWidth,ge=ie.value.offsetHeight,ke={top:pe.top,bottom:window.innerHeight-(pe.top+pe.height),left:pe.left,right:window.innerWidth-(pe.left+pe.width)};le.value.vertical=ke.bottom<ge&&ke.top>ge?"top":"bottom",le.value.horizontal=ke.right<_e&&ke.left>_e?"left":"right"}function me(pe){re.value=!0;const _e=pe.type.includes("touch")?pe.touches[0]:pe;ae.value={x:_e.clientX-ne.value.x,y:_e.clientY-ne.value.y},document.addEventListener("mousemove",be),document.addEventListener("mouseup",fe),document.addEventListener("touchmove",be),document.addEventListener("touchend",fe)}function be(pe){if(!re.value)return;const _e=pe.type.includes("touch")?pe.touches[0]:pe,ge=_e.clientX-ae.value.x,ke=_e.clientY-ae.value.y,$e=window.innerWidth-oe.value.offsetWidth,ye=window.innerHeight-oe.value.offsetHeight;ne.value.x=Math.min(Math.max(0,ge),$e),ne.value.y=Math.min(Math.max(0,ke),ye)}function fe(){re.value=!1,document.removeEventListener("mousemove",be),document.removeEventListener("mouseup",fe),document.removeEventListener("touchmove",be),document.removeEventListener("touchend",fe)}return e$b.onBeforeUnmount(fe),(pe,_e)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:"floating-widget",style:e$b.normalizeStyle(ce.value),ref_key:"widgetRef",ref:oe,onMousedown:me,onTouchstart:me},[e$b.createElementVNode("button",{class:"floating-button",onClick:e$b.withModifiers(ue,["stop"]),"aria-label":"Abrir painel flutuante"},[..._e[0]||(_e[0]=[e$b.createElementVNode("svg",{class:"floating-button-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[e$b.createElementVNode("path",{d:"M370 378c28.89 23.52 46 46.07 46 86M142 378c-28.89 23.52-46 46.06-46 86M384 208c28.89-23.52 32-56.07 32-96M128 206c-28.89-23.52-32-54.06-32-94M464 288.13h-80M128 288.13H48M256 192v256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),e$b.createElementVNode("path",{d:"M256 448h0c-70.4 0-128-57.6-128-128v-96.07c0-65.07 57.6-96 128-96h0c70.4 0 128 25.6 128 96V320c0 70.4-57.6 128-128 128z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),e$b.createElementVNode("path",{d:"M179.43 143.52a49.08 49.08 0 01-3.43-15.73A80 80 0 01255.79 48h.42A80 80 0 01336 127.79a41.91 41.91 0 01-3.12 14.3",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"})],-1)])]),e$b.createVNode(e$b.Transition,{name:"fade"},{default:e$b.withCtx(()=>[te.value?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:"floating-panel",ref_key:"panelRef",ref:ie,style:e$b.normalizeStyle(de.value)},[e$b.renderSlot(pe.$slots,"default",{},()=>[_e[1]||(_e[1]=e$b.createElementVNode("p",{style:{"text-align":"center","font-size":"0.9rem"}}," Adicione seu conteúdo aqui 👇 ",-1))],!0)],4)):e$b.createCommentVNode("",!0)]),_:3})],36))}},FloatingDev=_export_sfc$1(_sfc_main$15,[["__scopeId","data-v-9a761c09"]]),_hoisted_1$Z={class:"unlock-hint"},_hoisted_2$Q={class:"flex items-center gap-2.5"},_hoisted_3$L={key:0,class:"grid shrink-0 place-items-center"},_hoisted_4$G={class:"min-w-0 flex-1"},_hoisted_5$B={class:"mt-1.5 text-[13px] font-bold leading-tight"},_hoisted_6$w={class:"requirement-block"},_hoisted_7$t={class:"block-label"},_hoisted_8$o={key:0,class:"mt-2"},_hoisted_9$l={class:"flex items-baseline justify-between text-[11px]"},_hoisted_10$i={class:"font-bold tabular-nums text-base-content/80"},_hoisted_11$h={key:0,class:"font-medium text-base-content/45"},_hoisted_12$f={class:"font-black tabular-nums text-base-content/55"},_hoisted_13$d=["aria-valuenow"],_hoisted_14$c={key:0,class:"mt-1 text-[10px] font-semibold text-base-content/45"},_hoisted_15$a={key:1,class:"mt-1.5 text-[11px] leading-snug text-base-content/55"},_hoisted_16$9={key:0,class:"flex flex-wrap items-center gap-1.5 text-[10px]"},_sfc_main$14={__name:"UnlockHint",props:{eyebrow:{type:String,default:""},eyebrowClass:{type:String,default:""},name:{type:String,default:""},blockLabel:{type:String,default:"Como desbloquear"},text:{type:String,default:""},textClass:{type:String,default:""},note:{type:String,default:""},unit:{type:String,default:""},progress:{type:Object,default:null},barClass:{type:String,default:""},pills:{type:Array,default:()=>[]},status:{type:Object,default:null}},setup(ee){function te(ne){return Number(ne).toLocaleString("pt-BR")}return(ne,ae)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$Z,[e$b.createElementVNode("header",_hoisted_2$Q,[ne.$slots.piece?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$L,[e$b.renderSlot(ne.$slots,"piece",{},void 0,!0)])):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_4$G,[ee.eyebrow?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["block text-[9px] font-black uppercase leading-none tracking-[0.12em]",ee.eyebrowClass||"text-base-content/55"])},e$b.toDisplayString(ee.eyebrow),3)):e$b.createCommentVNode("",!0),e$b.renderSlot(ne.$slots,"name",{},()=>[e$b.createElementVNode("p",_hoisted_5$B,e$b.toDisplayString(ee.name),1)],!0)])]),e$b.createElementVNode("section",_hoisted_6$w,[e$b.createElementVNode("p",_hoisted_7$t,e$b.toDisplayString(ee.blockLabel),1),e$b.renderSlot(ne.$slots,"requirement",{},()=>[e$b.createElementVNode("p",{class:e$b.normalizeClass(["requirement-text",ee.textClass])},e$b.toDisplayString(ee.text),3)],!0),ee.progress?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_8$o,[e$b.createElementVNode("div",_hoisted_9$l,[e$b.createElementVNode("span",_hoisted_10$i,[e$b.createTextVNode(e$b.toDisplayString(te(ee.progress.current))+" / "+e$b.toDisplayString(te(ee.progress.target))+" ",1),ee.unit?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_11$h,e$b.toDisplayString(ee.unit),1)):e$b.createCommentVNode("",!0)]),e$b.createElementVNode("span",_hoisted_12$f,e$b.toDisplayString(ee.progress.pct)+"%",1)]),e$b.createElementVNode("div",{class:"progress-track",role:"progressbar","aria-valuenow":ee.progress.pct,"aria-valuemin":"0","aria-valuemax":"100"},[e$b.createElementVNode("span",{class:e$b.normalizeClass(["progress-fill smplay-blocks",ee.barClass||"progress-fill--default"]),style:e$b.normalizeStyle({width:`${ee.progress.pct}%`})},null,6)],8,_hoisted_13$d),ee.progress.remaining?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_14$c," Faltam "+e$b.toDisplayString(te(ee.progress.remaining))+" "+e$b.toDisplayString(ee.unit),1)):e$b.createCommentVNode("",!0)])):ee.note?(e$b.openBlock(),e$b.createElementBlock("p",_hoisted_15$a,e$b.toDisplayString(ee.note),1)):e$b.createCommentVNode("",!0)]),ee.pills.length||ee.status?(e$b.openBlock(),e$b.createElementBlock("footer",_hoisted_16$9,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(ee.pills,re=>(e$b.openBlock(),e$b.createElementBlock("span",{key:re.label,class:e$b.normalizeClass(["foot-pill",re.class])},e$b.toDisplayString(re.label),3))),128)),ee.status?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:e$b.normalizeClass(["ml-auto inline-flex items-center gap-1 font-bold",ee.status.class||"text-base-content/45"])},[ae[0]||(ae[0]=e$b.createElementVNode("span",{class:"status-dot","aria-hidden":"true"},null,-1)),e$b.createTextVNode(" "+e$b.toDisplayString(ee.status.label),1)],2)):e$b.createCommentVNode("",!0)])):e$b.createCommentVNode("",!0)]))}},UnlockHint=_export_sfc$1(_sfc_main$14,[["__scopeId","data-v-d3868b77"]]),_sfc_main$13={__name:"AchievementRequirements",props:{achievement:{type:Object,required:!0},unlocked:{type:Boolean,default:!1},unlockedAt:{type:[String,Number,Date],default:null},secretHidden:{type:Boolean,default:!1}},setup(ee){const te=ee,ne=e$b.computed(()=>RARITIES[te.achievement.rarity]||RARITIES.common),ae=e$b.computed(()=>te.achievement.rarity==="secret"),re=e$b.computed(()=>te.secretHidden||ae.value?null:describeAchievementRequirement(te.achievement)),oe=e$b.computed(()=>{var be;return te.unlocked?null:((be=re.value)==null?void 0:be.progress)??null}),ie=e$b.computed(()=>{var be;return!te.unlocked&&((be=re.value)==null?void 0:be.scope)==="season"}),le=e$b.computed(()=>{const be=Number(te.achievement.xp);return Number.isFinite(be)&&be>0?be:null}),ce=e$b.computed(()=>{if(!te.unlockedAt)return"";const be=new Date(te.unlockedAt);return Number.isNaN(be.getTime())?"":be.toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})}),de=e$b.computed(()=>re.value?re.value.text:ae.value?te.achievement.hint?`"${te.achievement.hint}"`:"Sem dica.":te.achievement.description||"Requisito não revelado."),ue=e$b.computed(()=>re.value?"":ae.value?"italic":te.achievement.description?"":"text-base-content/55"),ve=e$b.computed(()=>{const be=[];if(le.value&&be.push({label:`+${le.value.toLocaleString("pt-BR")} XP`,class:"font-black tracking-[0.02em] text-warning"}),ie.value){const fe=re.value.seasonName;be.push(fe?{label:`${fe}`,class:"font-bold text-sky-300 dark:text-sky-700"}:{label:re.value.scopeLabel,class:"text-warning/80"})}return be}),me=e$b.computed(()=>te.unlocked?{label:ce.value?`Desbloqueada em ${ce.value}`:"Desbloqueada",class:"text-success"}:null);return(be,fe)=>{var pe;return e$b.openBlock(),e$b.createBlock(UnlockHint,{class:"achievement-requirements",eyebrow:ee.secretHidden?"Desconhecida":ne.value.label,"eyebrow-class":ee.secretHidden?"":ne.value.text,name:ee.secretHidden?"???":ee.achievement.name||"Sem nome","block-label":ae.value?"Dica":"Como desbloquear",text:de.value,"text-class":ue.value,unit:((pe=re.value)==null?void 0:pe.unit)||"",progress:oe.value,"bar-class":`${ne.value.bar} bg-gradient-to-r`,pills:ve.value,status:me.value},{piece:e$b.withCtx(()=>[e$b.createVNode(AchievementBadge,{achievement:ee.achievement,size:"md","secret-hidden":ee.secretHidden},null,8,["achievement","secret-hidden"])]),_:1},8,["eyebrow","eyebrow-class","name","block-label","text","text-class","unit","progress","bar-class","pills","status"])}}};function holdersCount(ee){if(ee==null||ee==="")return null;const te=Number(ee);return Number.isFinite(te)&&te>=0?Math.trunc(te):null}function holdersLabel(ee){const te=holdersCount(ee);return te===null?"":te===0?"Ninguém possui":`${te.toLocaleString("pt-BR")} ${te===1?"possui":"possuem"}`}const _hoisted_1$Y=["title"],_hoisted_2$P={class:"truncate"},_sfc_main$12={__name:"HoldersCount",props:{count:{type:[Number,String],default:null},iconClass:{type:String,default:"size-3.5"}},setup(ee){const te=ee,ne=e$b.computed(()=>holdersLabel(te.count));return(ae,re)=>ne.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"holders-count inline-flex items-center gap-1 text-base-content/50",title:`${ne.value} este item`},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["shrink-0",ee.iconClass]),fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},[...re[0]||(re[0]=[e$b.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H6Zm7.25-2.095c.478-.86.75-1.85.75-2.905a5.973 5.973 0 0 0-.75-2.906 4 4 0 1 1 0 5.811ZM15.466 20c.34-.588.535-1.271.535-2v-1a5.978 5.978 0 0 0-1.528-4H18a4 4 0 0 1 4 4v1a2 2 0 0 1-2 2h-4.535Z"},null,-1)])],2)),e$b.createElementVNode("span",_hoisted_2$P,e$b.toDisplayString(ne.value),1)],8,_hoisted_1$Y)):e$b.createCommentVNode("",!0)}},ownerId=e$b.ref(null),open=e$b.ref(!1),panelStyle=e$b.ref({}),placement=e$b.ref("top");let openTimer=null,closeTimer=null,releaseTimer=null,seq=0;const DEFAULTS={width:330,estimatedHeight:250,gap:8,viewportPadding:8};function place(ee,te){const ne=ee==null?void 0:ee.getBoundingClientRect();if(!ne)return;const ae=e$b.unref(te.viewportPadding??DEFAULTS.viewportPadding),re=Math.min(e$b.unref(te.width??DEFAULTS.width),window.innerWidth-ae*2),oe=e$b.unref(te.gap??DEFAULTS.gap),ie=window.innerWidth-re-ae,le=Math.max(ae,Math.min(ne.left+ne.width/2-re/2,ie)),ce=ne.top>=e$b.unref(te.estimatedHeight??DEFAULTS.estimatedHeight)+oe+ae;placement.value=ce?"top":"bottom",panelStyle.value={left:`${le}px`,width:`${re}px`,...ce?{bottom:`${window.innerHeight-ne.top+oe}px`}:{top:`${ne.bottom+oe}px`}},open.value=!0}function clearTimers(){window.clearTimeout(openTimer),window.clearTimeout(closeTimer),window.clearTimeout(releaseTimer),openTimer=closeTimer=releaseTimer=null}function useHoverPanel(ee={}){const{enabled:te=!0,delay:ne=240,closeDelay:ae=110,leaveDuration:re=180}=ee,oe=++seq,ie=e$b.ref(null),le=e$b.computed(()=>ownerId.value===oe),ce=e$b.computed(()=>ownerId.value===oe&&open.value);function de(){e$b.unref(te)&&(clearTimers(),!(ownerId.value===oe&&open.value)&&(ownerId.value=oe,open.value=!1,openTimer=window.setTimeout(()=>{openTimer=null,place(ie.value,ee)},Math.max(0,e$b.unref(ne)))))}function ue(){if(ownerId.value===oe){if(window.clearTimeout(openTimer),openTimer=null,!open.value){ownerId.value=null;return}window.clearTimeout(closeTimer),closeTimer=window.setTimeout(()=>{open.value=!1,releaseTimer=window.setTimeout(()=>{ownerId.value===oe&&(ownerId.value=null)},re)},e$b.unref(ae))}}function ve(){ownerId.value===oe&&(clearTimers(),open.value=!1,ownerId.value=null)}return e$b.onBeforeUnmount(ve),{triggerRef:ie,mounted:le,open:ce,panelStyle,placement,scheduleOpen:de,scheduleClose:ue,closeNow:ve}}const _hoisted_1$X={class:"relative flex items-start gap-2.5"},_hoisted_2$O={class:"min-w-0 flex-1"},_hoisted_3$K={key:0,class:"mb-0.5 flex items-center gap-1.5"},_hoisted_4$F={class:"truncate text-[14px] font-medium leading-tight tracking-[-0.015em] text-base-content"},_hoisted_5$A=["title"],_hoisted_6$v=["aria-label"],_hoisted_7$s=["title"],_hoisted_8$n={class:"meta-row relative mt-2 border-t pt-2"},_hoisted_9$k={class:"flex flex-wrap items-center gap-1.5 text-[11px]"},_hoisted_10$h={key:0,class:"xp-pill bg-warning/10 text-warning inline-flex items-center rounded-md px-1.5 py-1 font-black tracking-[0.02em]"},_hoisted_11$g=["disabled","aria-pressed","aria-label"],_hoisted_12$e={key:0,class:"size-3.5 animate-spin",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true"},_hoisted_13$c={key:1,class:"size-3.5",fill:"none",stroke:"currentColor","stroke-width":"2.6",viewBox:"0 0 24 24","aria-hidden":"true"},_hoisted_14$b={key:2,class:"size-3.5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},_hoisted_15$9={key:3,class:"state-label text-success ml-auto inline-flex items-center gap-1"},_hoisted_16$8={key:4,class:"state-label text-success ml-auto inline-flex items-center gap-1"},_hoisted_17$4={key:5,class:"state-label ml-auto inline-flex items-center gap-1 text-base-content/50"},_hoisted_18$4={class:"sm-hover-panel-face"},_sfc_main$11={__name:"AchievementCard",props:{achievement:{type:Object,required:!0},mode:{type:String,default:"catalog"},unlocked:{type:Boolean,default:!1},unlockedAt:{type:[String,Number,Date],default:null},removable:{type:Boolean,default:!1},equippable:{type:Boolean,default:!1},equipped:{type:Boolean,default:!1},equipping:{type:Boolean,default:!1},hoverRequirements:{type:Boolean,default:!1},hoverDelay:{type:Number,default:240}},emits:["remove","equip"],setup(ee,{emit:te}){const ne=ee,ae=te,re=e$b.computed(()=>RARITIES[ne.achievement.rarity]||RARITIES.common),oe=e$b.computed(()=>ne.mode==="attendant"),ie=e$b.computed(()=>oe.value&&!ne.unlocked),le=e$b.computed(()=>ne.equippable&&oe.value&&ne.unlocked);function ce(){ne.equipping||ae("equip",ne.equipped?null:ne.achievement.id)}const de=e$b.computed(()=>ne.achievement.rarity==="secret"),ue=e$b.computed(()=>ie.value&&de.value),ve=e$b.computed(()=>ue.value?"???":ne.achievement.name||"Sem nome"),me=e$b.computed(()=>de.value),be=e$b.computed(()=>ne.mode==="catalog"&&ne.achievement.status===!1),fe=e$b.computed(()=>`rarity-${ne.achievement.rarity||"common"}`),pe=e$b.computed(()=>{const{accentRgb:Pe,glow:Be}=re.value;return Pe?{"--rarity":Pe,"--rarity-glow":Be}:{}}),_e=e$b.computed(()=>{const Pe=re.value.accentRgb;return Pe?{"--panel-accent":`rgb(${Pe})`}:{}}),ge=e$b.computed(()=>ne.achievement.status===!1);function ke(Pe){return Number(Pe).toLocaleString("pt-BR")}const $e=e$b.computed(()=>ne.mode==="catalog"&&holdersCount(ne.achievement.holders)!==null),ye=e$b.computed(()=>ne.hoverRequirements),Ee=e$b.computed(()=>ne.hoverDelay),{triggerRef:Se,mounted:Le,open:Me,panelStyle:De,placement:Oe,scheduleOpen:Re,scheduleClose:ze,closeNow:Ve}=useHoverPanel({enabled:ye,delay:Ee}),Ne=e$b.computed(()=>{if(!ne.unlockedAt)return"";const Pe=new Date(ne.unlockedAt);return Number.isNaN(Pe.getTime())?"":Pe.toLocaleDateString("pt-BR",{day:"2-digit",month:"short",year:"numeric"})});return(Pe,Be)=>(e$b.openBlock(),e$b.createElementBlock("article",{ref_key:"triggerRef",ref:Se,class:e$b.normalizeClass([[fe.value,{"is-locked":ie.value,"is-inactive":ge.value,"is-equipped":ee.equipped}],"plate achievement-card relative flex flex-col p-2.5"]),style:e$b.normalizeStyle(pe.value),onMouseenter:Be[3]||(Be[3]=(...Ae)=>e$b.unref(Re)&&e$b.unref(Re)(...Ae)),onMouseleave:Be[4]||(Be[4]=(...Ae)=>e$b.unref(ze)&&e$b.unref(ze)(...Ae)),onClick:Be[5]||(Be[5]=(...Ae)=>e$b.unref(Ve)&&e$b.unref(Ve)(...Ae))},[e$b.createElementVNode("div",_hoisted_1$X,[e$b.createVNode(AchievementBadge,{achievement:ee.achievement,size:"md","secret-hidden":ue.value},null,8,["achievement","secret-hidden"]),e$b.createElementVNode("div",_hoisted_2$O,[be.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_3$K,[...Be[6]||(Be[6]=[e$b.createElementVNode("span",{class:"rarity-chip shrink-0 rounded-full bg-base-200 px-1.5 py-0.5 text-[9px] font-black uppercase tracking-[0.12em] text-base-content/50"}," Inativa ",-1)])])):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_4$F,e$b.toDisplayString(ve.value),1),de.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("p",{key:1,class:"mt-0.5 truncate text-[11px] leading-snug text-base-content/60",title:ee.achievement.description},e$b.toDisplayString(ee.achievement.description||"Descreva como desbloquear"),9,_hoisted_5$A))]),ee.removable&&ee.mode==="catalog"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,type:"button",class:"remove-button hover:bg-error/10 hover:text-error focus-visible:outline-error -mr-1 -mt-1 flex size-7 shrink-0 items-center justify-center rounded-lg text-base-content/40 transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","aria-label":`Excluir conquista ${ee.achievement.name}`,onClick:Be[0]||(Be[0]=Ae=>ae("remove",ee.achievement.id))},[...Be[7]||(Be[7]=[e$b.createElementVNode("svg",{class:"size-3.5",fill:"none",stroke:"currentColor","stroke-width":"2.2",viewBox:"0 0 24 24"},[e$b.createElementVNode("path",{"stroke-linecap":"round",d:"M6 6l12 12M18 6 6 18"})],-1)])],8,_hoisted_6$v)):e$b.createCommentVNode("",!0)]),me.value?(e$b.openBlock(),e$b.createElementBlock("p",{key:0,class:"hint-row relative mt-1.5 truncate px-1.5 py-1 text-[11px] italic leading-tight text-base-content/55",title:`Dica: ${ee.achievement.hint}`},' Dica: "'+e$b.toDisplayString(ee.achievement.hint||"...")+'" ',9,_hoisted_7$s)):e$b.createCommentVNode("",!0),e$b.createElementVNode("div",_hoisted_8$n,[e$b.createElementVNode("div",_hoisted_9$k,[ue.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_10$h," +"+e$b.toDisplayString(ke(ee.achievement.xp))+" XP ",1)),$e.value?(e$b.openBlock(),e$b.createBlock(_sfc_main$12,{key:1,count:ee.achievement.holders,class:"state-label ml-auto"},null,8,["count"])):e$b.createCommentVNode("",!0),le.value?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,type:"button",disabled:ee.equipping,"aria-pressed":ee.equipped,"aria-label":ee.equipped?`Remover destaque de ${ee.achievement.name}`:`Destacar ${ee.achievement.name}`,class:e$b.normalizeClass(["equip-button ml-auto inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11px] font-bold uppercase tracking-[0.04em] ring-1 transition disabled:cursor-wait disabled:opacity-70",ee.equipped?"bg-primary/15 text-primary ring-primary/30":"bg-base-200/70 text-base-content/60 ring-transparent hover:bg-primary/10 hover:text-primary"]),onClick:ce},[ee.equipping?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_12$e,[...Be[8]||(Be[8]=[e$b.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e$b.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4Z"},null,-1)])])):ee.equipped?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_13$c,[...Be[9]||(Be[9]=[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5 13 4 4L19 7"},null,-1)])])):(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_14$b,[...Be[10]||(Be[10]=[e$b.createElementVNode("path",{d:"M12 2.5l2.6 5.9 6.4.6-4.8 4.3 1.4 6.3L12 16.9 6.4 19.6l1.4-6.3L3 9l6.4-.6L12 2.5Z"},null,-1)])])),e$b.createTextVNode(" "+e$b.toDisplayString(ee.equipping?"...":ee.equipped?"Destacado":"Destacar"),1)],10,_hoisted_11$g)):Ne.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_15$9,[Be[11]||(Be[11]=e$b.createElementVNode("span",{class:"status-dot","aria-hidden":"true"},null,-1)),e$b.createTextVNode(" "+e$b.toDisplayString(Ne.value),1)])):ee.unlocked?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$8,[...Be[12]||(Be[12]=[e$b.createElementVNode("span",{class:"status-dot","aria-hidden":"true"},null,-1),e$b.createTextVNode(" Desbloqueada",-1)])])):ie.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_17$4,[...Be[13]||(Be[13]=[e$b.createElementVNode("svg",{class:"size-3",fill:"none",stroke:"currentColor","stroke-width":"2.2",viewBox:"0 0 24 24","aria-hidden":"true"},[e$b.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 10V7a5 5 0 0 1 10 0v3M6 10h12v10H6V10Z"})],-1),e$b.createTextVNode(" Bloqueada ",-1)])])):e$b.createCommentVNode("",!0)])]),e$b.unref(Le)?(e$b.openBlock(),e$b.createBlock(e$b.Teleport,{key:1,to:"body"},[e$b.createVNode(e$b.Transition,{name:"sm-hover-panel"},{default:e$b.withCtx(()=>[e$b.unref(Me)?(e$b.openBlock(),e$b.createElementBlock("div",{key:0,class:e$b.normalizeClass(["sm-hover-panel achievement-hint",`sm-hover-panel--${e$b.unref(Oe)}`]),style:e$b.normalizeStyle([e$b.unref(De),_e.value]),onMouseenter:Be[1]||(Be[1]=(...Ae)=>e$b.unref(Re)&&e$b.unref(Re)(...Ae)),onMouseleave:Be[2]||(Be[2]=(...Ae)=>e$b.unref(ze)&&e$b.unref(ze)(...Ae))},[e$b.createElementVNode("div",_hoisted_18$4,[e$b.createVNode(_sfc_main$13,{achievement:ee.achievement,unlocked:ee.unlocked,"unlocked-at":ee.unlockedAt,"secret-hidden":ue.value},null,8,["achievement","unlocked","unlocked-at","secret-hidden"])])],38)):e$b.createCommentVNode("",!0)]),_:1})])):e$b.createCommentVNode("",!0)],38))}},AchievementCard=_export_sfc$1(_sfc_main$11,[["__scopeId","data-v-ff831b67"]]);pinia.defineStore("debug",{state:()=>({message:"Debug store initialized"}),actions:{logMessage(){console.log(this.message)}}});let sdkLoaded$1=!1,sdkLoadPromise$1=null,sdkFailed=!1;const TOKEN_TIMEOUT_MS=5e3;function timeoutAfter(ee){return new Promise((te,ne)=>setTimeout(()=>ne(new Error("timeout")),ee))}function invalidateSdk(ee){sdkLoaded$1=!1,sdkFailed=!0,ee&&console.warn("AWS WAF SDK indisponivel:",ee)}async function requestToken(){try{return await Promise.race([window.AwsWafIntegration.getToken(),timeoutAfter(TOKEN_TIMEOUT_MS)])||""}catch{return""}}function useAwsWafSdk({integrationUrl:ee,apiKey:te}){return console.log("Iniciando integração com AWS WAF SDK"),{name:"aws-waf",async loadSdk(){if(!(sdkFailed||sdkLoaded$1||!ee))return sdkLoadPromise$1||(sdkLoadPromise$1=new Promise(ne=>{const ae=document.createElement("script");ae.src=`${ee}/jsapi.js`,ae.defer=!0,ae.onload=()=>{console.log("AWS WAF SDK carregado com sucesso"),sdkLoaded$1=!0,ne()},ae.onerror=re=>{console.log("Erro ao carregar AWS WAF SDK:",re),invalidateSdk(re),ne()},document.head.appendChild(ae)}),sdkLoadPromise$1)},async getInvisibleToken(){var ne;return sdkFailed||typeof((ne=window.AwsWafIntegration)==null?void 0:ne.getToken)!="function"?"":await requestToken()},renderCaptcha(ne,{onSuccess:ae,onError:re}){var ie;if(sdkFailed){re(new Error("AWS WAF SDK indisponível (bloqueado pelo navegador)"));return}const oe=document.getElementById(ne);if(!oe||typeof((ie=window.AwsWafCaptcha)==null?void 0:ie.renderCaptcha)!="function"){invalidateSdk("AWS WAF captcha indisponivel para renderizacao"),re(new Error("AWS WAF captcha indisponível para renderização"));return}oe.innerHTML="";try{window.AwsWafCaptcha.renderCaptcha(oe,{apiKey:te,onSuccess:(...le)=>{ae(...le)},onError:le=>{invalidateSdk(le),re(le)},dynamicWidth:!1,disableLanguageSelector:!0,skipTitle:!0})}catch(le){invalidateSdk(le),re(le)}},isReady:()=>sdkLoaded$1&&!sdkFailed}}let sdkLoaded=!1,sdkLoadPromise=null,invisibleWidgetId=null;function useGoogleSdk({siteKey:ee,siteKeyVisible:te}={}){console.log("Iniciando integração com Google reCAPTCHA SDK");const ne=()=>{var ae;return(ae=window.grecaptcha)==null?void 0:ae.enterprise};return{name:"google-recaptcha",async loadSdk(){if(!(sdkLoaded||!ee))return sdkLoadPromise||(sdkLoadPromise=new Promise(ae=>{const re=document.createElement("script");re.src="https://www.google.com/recaptcha/enterprise.js?render=explicit",re.defer=!0,re.onload=()=>{window.grecaptcha.enterprise.ready(()=>{const oe=document.createElement("div");oe.id="__recaptcha_invisible",oe.style.display="none",document.body.appendChild(oe),invisibleWidgetId=window.grecaptcha.enterprise.render(oe,{sitekey:ee,size:"invisible"}),console.log("Google reCAPTCHA SDK carregado com sucesso"),sdkLoaded=!0,ae()})},re.onerror=oe=>{console.log("Erro ao carregar o Google reCAPTCHA SDK:",oe),sdkLoadPromise=null,ae()},document.head.appendChild(re)}),sdkLoadPromise)},async getInvisibleToken(){const ae=ne();if(!ae||!ee)return"";try{return await ae.execute(invisibleWidgetId,{action:"login"})}catch{return""}},renderCaptcha(ae,{onSuccess:re,onError:oe}){const ie=ne(),le=document.getElementById(ae);if(!le||!ie){oe(new Error("Google reCAPTCHA indisponível para renderização"));return}le.innerHTML="";const ce=te||ee;try{ie.render(le,{sitekey:ce,callback:re,"error-callback":oe})}catch(de){oe(de)}},isReady:()=>sdkLoaded}}const sdkInitializers={awswaf:ee=>useAwsWafSdk(ee),"aws-waf":ee=>useAwsWafSdk(ee),google:ee=>useGoogleSdk(ee),"google-recaptcha":ee=>useGoogleSdk(ee)};let _activeProvider=null;function setupSdkConfig({provider:ee,...te}){const ne=String(ee||"").trim().toLowerCase(),ae=sdkInitializers[ne];if(!ae){console.error("Provedor de SDK não suportado:",ee),_activeProvider=null;return}_activeProvider=ae(te)}function getActiveProvider(){return _activeProvider}const DELAY_MAP={1:0,2:0,3:1e3,4:3e3,5:5e3},MAX_DELAY=5e3;function useCaptchaProtection(){const ee=e$b.ref(0),te=e$b.ref(""),ne=e$b.ref(!1),ae=e$b.ref(0),re=e$b.ref(!1),oe=e$b.ref(!1),ie=e$b.ref(!1),le=e$b.ref(!1);let ce=null;const de=e$b.computed(()=>DELAY_MAP[ee.value]??MAX_DELAY),ue=e$b.computed(()=>!!_activeProvider&&le.value);async function ve(){_activeProvider&&(await _activeProvider.loadSdk(),le.value=_activeProvider.isReady())}async function me(){if(!_activeProvider)return"";await ve();try{const ke=await _activeProvider.getInvisibleToken();return le.value=_activeProvider.isReady()&&!!ke,te.value=ke,ke}catch(ke){return le.value=!1,console.warn("[Captcha] Falha ao obter token invisível:",ke),""}}function be(ke){return new Promise(async($e,ye)=>{if(!_activeProvider){ye(new Error("Captcha provider não configurado"));return}if(await ve(),!_activeProvider.isReady()){ye(new Error("Captcha SDK não está pronto"));return}_activeProvider.renderCaptcha(ke,{onSuccess:Ee=>{if(le.value=_activeProvider.isReady(),!Ee){ye(new Error("Captcha retornou token vazio"));return}te.value=Ee,re.value=!0,$e(Ee)},onError:Ee=>{le.value=_activeProvider.isReady(),ye(Ee)}})})}function fe(ke,{requiresVisibleCaptcha:$e=!1,userBlocked:ye=!1}={}){ee.value=ke,re.value=!1,oe.value=$e,ie.value=ye;const Ee=de.value;Ee>0&&_e(Ee)}function pe(){ee.value=0,re.value=!1,oe.value=!1,ie.value=!1,ne.value=!1,ae.value=0,ce&&(clearInterval(ce),ce=null)}function _e(ke){ne.value=!0,ae.value=Math.ceil(ke/1e3),ce&&clearInterval(ce),ce=setInterval(()=>{ae.value--,ae.value<=0&&(ne.value=!1,ce&&(clearInterval(ce),ce=null))},1e3)}function ge(){ce&&(clearInterval(ce),ce=null)}return{attempts:e$b.readonly(ee),captchaToken:e$b.readonly(te),isDelayActive:e$b.readonly(ne),delayRemaining:e$b.readonly(ae),captchaSolved:e$b.readonly(re),sdkReady:e$b.readonly(le),isUserBlocked:e$b.readonly(ie),requiredDelay:de,captchaEnabled:ue,loadSdk:ve,getInvisibleToken:me,renderVisibleCaptcha:be,setAttempts:fe,resetOnSuccess:pe,cleanup:ge}}const v$2="5.12.1",fr=30,ip=0,op=90,w$2=500,h$2=500,nm="Error",ddd=0,assets=[],layers=[{ddd:0,ind:1,ty:3,nm:"Ctrl-X",sr:1,ks:{o:{a:0,k:0,ix:11},r:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[-90]},{t:35,s:[0]}],ix:10,x:`var $bm_rt;
|
|
224
224
|
var n, n, t, t, v, amp, freq, decay;
|
|
225
225
|
$bm_rt = n = 0;
|
|
226
226
|
if (numKeys > 0) {
|