sm-click-library-ui 0.0.611-dev.53 → 0.0.611-dev.55

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.
@@ -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$1m={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$m={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(ke=>({value:String(ke.id),label:ke.name}))}}),pe.push({key:"actions",label:"Ações",width:"w-44",cellClass:"whitespace-nowrap"}),pe});async function be(){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[ve,_e]of Object.entries(ce.value))Array.isArray(_e)?_e.length&&pe.set(ve,_e.join(",")):_e!=null&&_e!==""&&pe.append(ve,_e);if(ae.extraParams)for(const[ve,_e]of Object.entries(ae.extraParams))Array.isArray(_e)?_e.forEach($e=>pe.append(ve,$e)):_e!=null&&_e!==""&&pe.append(ve,_e);const{data:ke}=await api.get(`${templateUrl}?${pe.toString()}`);re.value=ke.results,le.value=ke.count}catch{re.value=[],le.value=0}finally{oe.value=!1}}function fe(pe){ce.value=pe,ie.value=1,be()}function ge(pe){ie.value=pe,be()}e$b.watch(()=>[ae.instanceId,ae.departmentId,ae.extraParams],()=>{ie.value=1,be()},{deep:!0}),e$b.onMounted(()=>{be(),ae.showDepartments&&!de.loaded&&de.fetchDepartments()});function me(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:be}),(pe,ke)=>{const ve=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":ge,"onUpdate:filters":fe},e$b.createSlots({"empty-action":e$b.withCtx(()=>[e$b.renderSlot(pe.$slots,"empty-action",{},void 0,!0)]),"cell-name":e$b.withCtx(({row:_e})=>[e$b.createElementVNode("span",{title:_e.name,class:"block truncate text-left max-w-64 whitespace-nowrap font-medium text-sm"},e$b.toDisplayString(_e.name),9,_hoisted_1$2x)]),"cell-category":e$b.withCtx(({row:_e})=>[e$b.createElementVNode("div",_hoisted_3$1_,[e$b.createVNode(_sfc_main$2M,{category:_e.category},null,8,["category"])])]),"cell-status":e$b.withCtx(({row:_e})=>{var $e,ye,Ee,Se,Le,Ae,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=_e.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=_e.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=_e.status)==null?void 0:Ee.toLowerCase())==="rejected"||((Se=_e.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=_e.status)==null?void 0:Le.toLowerCase())==="pending"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_6$1v,[...ke[0]||(ke[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)])])):((Ae=_e.status)==null?void 0:Ae.toLowerCase())==="rejected"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$1m,[...ke[1]||(ke[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=_e.status)==null?void 0:De.toLowerCase())==="approved"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1e,[...ke[2]||(ke[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=_e.status)==null?void 0:Oe.toLowerCase())==="pending_deletion"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_9$18,[...ke[3]||(ke[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(me(_e.status)),1)],2)])]}),"cell-actions":e$b.withCtx(({row:_e})=>{var $e,ye;return[e$b.createElementVNode("main",_hoisted_18$r,[e$b.createVNode(ve,{placement:"left",class:"preview-popper"},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_19$m,[e$b.createElementVNode("div",_hoisted_20$m,[e$b.createElementVNode("p",_hoisted_21$i,e$b.toDisplayString(_e.name),1)]),e$b.renderSlot(pe.$slots,"preview",{template:_e},()=>[ke[5]||(ke[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(()=>[ke[6]||(ke[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=_e.status)==null?void 0:$e.toLowerCase())!=="approved",class:e$b.normalizeClass(["action-btn group",((ye=_e.status)==null?void 0:ye.toLowerCase())==="approved"?"action-btn-success":"action-btn-danger"]),onClick:Ee=>pe.$emit("send",_e)},[...ke[7]||(ke[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",_e)},[...ke[8]||(ke[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",_e)},[...ke[9]||(ke[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",_e)},[...ke[10]||(ke[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:_e},void 0,!0)]}),_:2},[ee.showLang?{name:"cell-lang",fn:e$b.withCtx(({row:_e})=>[e$b.createElementVNode("span",_hoisted_2$2e,e$b.toDisplayString(_e.lang),1)]),key:"0"}:void 0,ee.showDepartments?{name:"cell-department",fn:e$b.withCtx(({row:_e})=>[e$b.createElementVNode("div",_hoisted_11$V,[e$b.createVNode(ve,{placement:"top",arrow:!1,class:"tip-popper"},{content:e$b.withCtx(()=>{var $e;return[e$b.createElementVNode("section",_hoisted_12$Q,[ke[4]||(ke[4]=e$b.createElementVNode("div",{class:"text-sm font-semibold text-slate-100 pb-2"}," Departamentos ",-1)),(($e=_e.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(_e.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=_e.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,be,fe,ge)=>(ue.addEventListener(be,fe,ge),()=>ue.removeEventListener(be,fe,ge)),ce=e$b.watch(()=>[unrefElement(te),toValue(re)],([ue,be])=>{if(ie(),!ue)return;const fe=isObject(be)?{...be}:be;oe.push(...ne.flatMap(ge=>ae.map(me=>le(ue,ge,me,fe))))},{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(fe=>fe.addEventListener("click",noop)),ae.document.documentElement.addEventListener("click",noop));let le=!0;const ce=fe=>re.some(ge=>{if(typeof ge=="string")return Array.from(ae.document.querySelectorAll(ge)).some(me=>me===fe.target||fe.composedPath().includes(me));{const me=unrefElement(ge);return me&&(fe.target===me||fe.composedPath().includes(me))}}),ue=[useEventListener$1(ae,"click",fe=>{const ge=unrefElement(ee);if(!(!ge||ge===fe.target||fe.composedPath().includes(ge))){if(fe.detail===0&&(le=!ce(fe)),!le){le=!0;return}te(fe)}},{passive:!0,capture:oe}),useEventListener$1(ae,"pointerdown",fe=>{const ge=unrefElement(ee);le=!ce(fe)&&!!(ge&&!fe.composedPath().includes(ge))},{passive:!0}),ie&&useEventListener$1(ae,"blur",fe=>{setTimeout(()=>{var ge;const me=unrefElement(ee);((ge=ae.document.activeElement)==null?void 0:ge.tagName)==="IFRAME"&&!(me!=null&&me.contains(ae.document.activeElement))&&te(fe)},0)})].filter(Boolean);return()=>ue.forEach(fe=>fe())}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$1l={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$1l,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$1k={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$1k,[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,be,fe,ge,me,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((fe=(be=te.ring)==null?void 0:be.colors)==null?void 0:fe[1],DEFAULT_COLORS[1]),color((me=(ge=te.ring)==null?void 0:ge.colors)==null?void 0:me[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,be)=>{const fe={variant:"none",enabled:!1};return{...ue,[be]:ce.includes(be)?clone(te[be]):{...fe,colors:clone(te[be].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$1j={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)),be=e$b.computed(()=>ae.value.placement==="behind"?[!1]:[!0,!1]);function fe($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 ge=e$b.computed(()=>!ie.value&&re.value.enabled&&re.value.variant!=="none"),me=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:ke,paused:ve}=useOffscreenPause(()=>te.pauseOffscreen),_e=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":"",ve.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:ke,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}`:"",_e.value]]),style:e$b.normalizeStyle(pe.value),"aria-hidden":"true"},[ge.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)])])):ge.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))])):ge.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(be.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(fe("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(fe("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(fe("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(fe("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(fe("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$1j,[(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(fe("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(me.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$1i={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$1i))])),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 be;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??((be=ee.unlocked)==null?void 0:be.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.",icon:"📊",rarity:"rare",metric:"season_points",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.",icon:"😎",rarity:"secret",hint:"Um número muito específico.",metric:"season_points",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=be=>Number(be).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=(be,fe,ge)=>{const me=be==="achievement"?findAchievement(ge):findCosmetic(be,ge);return me?typeof fe!="object"?me:{...me,...fe,...fe.rarity==null&&me.rarity?{rarity:me.rarity}:{}}:typeof fe=="object"?fe: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$1h={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)||""}),be=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}),fe=e$b.computed(()=>{if(!ne.attendant)return null;const Ue=resolveAttendantGamification(ne.attendant);return Ue.frame||Ue.title||Ue.achievement||!be.value?Ue:resolveAttendantGamification(be.value)}),ge=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)}),me=e$b.computed(()=>!!ne.attendant&&ge.value&&resolveSmPlayEnabled(be.value||ne.attendant)),pe=e$b.computed(()=>{var Ue;return ne.frame!==void 0?ne.frame:me.value?(Ue=fe.value)==null?void 0:Ue.frame:null}),ke=e$b.computed(()=>{var Ue;return ne.level!==null?ne.level:me.value?(Ue=fe.value)==null?void 0:Ue.level:null}),ve=e$b.computed(()=>avatarInitials(de.value)),_e=e$b.computed(()=>ne.fallback==="initials"&&!!ve.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),Ae=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 Ae.value&&((at=(Ue=Ee.value)==null?void 0:Ue.ornament)==null?void 0:at.variant)||""}),Ie=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)`}),Me=e$b.computed(()=>{var lt;if(ne.size==="fill"&&!Le.value)return"0px";const Ue=Ae.value?.72:De.value?1.4:1,at=Ae.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":Ae.value?"transparent":Se.value,boxShadow:Be.value,"--sm-frame-width":Me.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":Me.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}`),Re=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"||Ie.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"||Ie.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&&lt.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)},[Ae.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))])):_e.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$1q,e$b.toDisplayString(ve.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$1h,[...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&&ke.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(ke.value),1)],4)):e$b.createCommentVNode("",!0),Re.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:2,class:e$b.normalizeClass(["sm-avatar-channel",`sm-avatar-channel--${Re.value}`]),title:e$b.unref(channelLabel)(ee.channel)},[e$b.createVNode(ChannelIcon,{channel:Re.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$1g={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$l={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(Ie){return Ie?Array.isArray(Ie)?Ie:[Ie]:[]}function ce(Ie){const ze=(Ie??"").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)}`:Ie}function de(Ie){return typeof Ie=="string"?Ie:[Ie.street,Ie.city,Ie.state,Ie.zip,Ie.country].filter(Boolean).join(", ")}function ue(Ie){const ze=/^(\d{4})-(\d{2})-(\d{2})/.exec(Ie||"");return ze?`${ze[3]}/${ze[2]}/${ze[1]}`:Ie}function be(Ie){const ze=Ie||{};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 fe=e$b.computed(()=>{const Ie=le(ne.contacts);return(Ie.length?Ie:[ne.contact]).map(be)}),ge=e$b.computed(()=>fe.value.length>1),me=e$b.computed(()=>fe.value[0]),pe=e$b.computed(()=>fe.value.slice(0,3)),ke=e$b.computed(()=>{if(!ge.value)return me.value.name;const Ie=fe.value.length-1;return Ie===1?`${me.value.name} e 1 outro contato`:`${me.value.name} e ${Ie} outros contatos`}),ve=e$b.computed(()=>{if(ge.value)return`${fe.value.length} contatos`;const Ie=me.value;return Ie.phones.length?ce(Ie.phones[0]):Ie.org||Ie.title||""}),_e=e$b.computed(()=>{const Ie=me.value;return Ie.phones.length>1||Ie.emails.length>0||Ie.urls.length>0||Ie.addresses.length>0||!!Ie.birthday||!!Ie.title||!!Ie.org}),$e=e$b.computed(()=>ge.value||_e.value),ye=e$b.computed(()=>({title:ge.value?`${fe.value.length} contatos`:me.value.name,svg:ge.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 Ie=me.value,ze=[],Ve=(Ne,Pe,Be,Me={})=>{Be&&ze.push({id:`${Ne}-${ze.length}`,icon:Ee[Ne],label:Pe,value:Be,...Me})};return Ie.phones.forEach(Ne=>Ve("phone","Telefone",ce(Ne))),Ie.emails.forEach(Ne=>Ve("email",Ne.type||"E-mail",Ne.email)),Ie.addresses.forEach(Ne=>Ve("addr","Endereço",de(Ne))),Ie.urls.forEach(Ne=>Ve("url",Ne.type||"Site",Ne.url,{link:Ne.url})),Ve("birthday","Aniversário",Ie.birthday&&ue(Ie.birthday)),ze}),Le=e$b.computed(()=>[me.value.title,me.value.org].filter(Boolean).join(" · "));function Ae(){$e.value&&(re.value=!0)}function De(Ie){re.value=!1,ae("start-chat",Ie)}async function Oe(Ie,ze){if(Ie)try{await navigator.clipboard.writeText(Ie),oe.value=ze,ie&&clearTimeout(ie),ie=setTimeout(()=>{oe.value=""},1500)}catch(Ve){console.error("Falha ao copiar:",Ve)}}return(Ie,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(Ae,["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(ke.value),1),ve.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$1y,e$b.toDisplayString(ve.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"])),ge.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",me.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(()=>[ge.value?(e$b.openBlock(),e$b.createElementBlock("ul",_hoisted_7$1g,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(fe.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:me.value.photo||"",name:me.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(me.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$l,[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&&!ge.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(me.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,be=.01,fe=.01,ge=!1,me={},pe=null,ke={},ve={},_e={},$e=0,ye=0,Ee=r$7.Loop,Se=c$5.Easings.Linear;const Le=new Map;function Ae(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,Ae("start",ke,ve)}function Ie(){if(ee=i$a.Completed,_e={},Ae("end",ke),ee===i$a.Completed)if(ne<$e){if(ne++,Ee===r$7.Reverse){const Ve=Object.assign({},me);me=Object.assign({},ve),ve=Ve}De(ye)}else ne=0;return ze}const ze={getState:function(){return ee},easing:function(Ve){return re=Ve,te=o$9.Ease,_e={},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:Me,friction:xe,restDelta:Ce,restSpeed:Fe,maxSpeed:Re,clamp:qe}=Object.assign(Object.assign({},Ne),Ve);return ie=Pe,le=Be,ce=Me,de=xe,fe=Ce,be=Fe,ue=Re,ge=qe,_e={},ze},isRunning:function(){return ee===i$a.Running},isSpring:function(){return te===o$9.Spring},from:function(Ve){return ke=Object.assign({},Ve),ze},to:function(Ve){return ve=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(Me=>Me!==Be)),ze},start:function(Ve){return n$9(ke,ve)||(ee=i$a.Initializing,me=Object.assign({},ke),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,Ae("pause",ke)),ze},end:Ie,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 Me=Ee===r$7.Reverse?Se:re;for(const xe in ke)ke[xe]=me[xe]+(ve[xe]-me[xe])*Me(Ne)}if(te===o$9.Spring){const Me=.001*Ve;let xe=0;for(const Ce in ke){const Fe=ve[Ce];let Re=ke[Ce];if(typeof Fe!="number"||isNaN(Fe)||typeof Re!="number"||isNaN(Re))continue;if(Math.abs(Fe-Re)<=fe){ke[Ce]=Fe,_e[Ce]=0;continue}_e[Ce]||(typeof ie=="object"&&typeof ie[Ce]=="number"?_e[Ce]=ie[Ce]:_e[Ce]=typeof ie=="number"?ie:0);let qe=_e[Ce];qe=t$8(-1*Math.abs(ue),qe,Math.abs(ue));const Ge=qe*le*de;qe+=((Re>Fe?-1:1)*(Math.abs(Fe-Re)*ce)-Ge)/le*Me,Re+=qe*Me;const Ze=ke[Ce]>Fe?Re<Fe:Re>Fe;let Xe=Math.abs(qe)<be&&Math.abs(Fe-Re)<=fe;ge&&Ze&&(Xe=!0),Xe?(Re=Fe,qe=0):xe++,ke[Ce]=Re,_e[Ce]=qe}Pe=!xe}const Be=Object.assign({},ve);return Ae("step",ke,me,ve,Ne),Pe&&ee===i$a.Running&&n$9(ve,Be)&&(ee=i$a.Completed,Ie()),ze},getStartValues:function(){return me},getCurrentValues:function(){return ke},getCurrentVelocities:function(){return _e},getEndValues:function(){return ve},destroy:function(){ee=i$a.Destroyed,pe&&(clearTimeout(pe),pe=null),me=ke=ve={},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,be=!1,fe=!1,ge=0,me=0,pe=0,ke=0,ve=0,_e=0,$e=0,ye=0,Ee=0,Se=[],Le=0,Ae=0;const De=new Map;function Oe(Ce){const Fe=c$4(le),Re=c$4(ce),qe=Fe&&Re?Fe/Re: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:ke,offsetX:ve,offsetY:_e,velocityX:$e,velocityY:ye,velocity:Ge,angle:Ee,axis:re,scale:qe,center:ae};for(const Xe of De.get(Ce)||[])Xe(Ze)}function Ie(Ce){const Fe=Date.now();if(Se=Se.filter(Re=>!Re.ts||Re.ts>Fe-100),Ce&&Se.push(Ce),$e=0,ye=0,Se.length>3){const Re=Se[0],qe=Se[Se.length-1];if(Re&&qe){const Ge=qe.x-Re.x,Ze=qe.y-Re.y,Xe=Re.ts&&qe.ts?qe.ts-Re.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],Re=oe.ignore.join(",");if(Fe.matches(Re)||Fe.closest(Re))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=[],me=le.length,ae=i$9(le),me===1&&(de=!1,ue=!1,be=!1),me&&Ie(i$9(le));const qe=Date.now(),Ge=qe-(ge||qe);fe=Ge>0&&Ge<=250&&me===1,ge=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 Re=i$9(ce),qe=i$9(n$8(Ce));if(Ie(qe),me=le.length,ae=qe,ce.length===le.length?(pe=qe.x-Re.x,ke=qe.y-Re.y):(pe=0,ke=0),ie.length){const Ge=i$9(ie);ve=qe.x-Ge.x,_e=qe.y-Ge.y}if(le.length>1){const Ge=c$4(le),Ze=c$4(ce);Math.abs(Ge-Ze)>=.1&&(be=!0,Oe("pinch"))}de||(de=Math.abs(ve)>oe.panThreshold||Math.abs(_e)>oe.panThreshold,de&&(d$4=!1,clearTimeout(Ae),Ae=0,Ee=Math.abs(180*Math.atan2(_e,ve)/Math.PI),re=Ee>45&&Ee<135?"y":"x",ie=[...le],ce=[...le],ve=0,_e=0,pe=0,ke=0,(Fe=window.getSelection())===null||Fe===void 0||Fe.removeAllRanges(),Oe("panstart"))),de&&(pe||ke)&&Oe("pan"),Oe("move")}function Ne(Ce){if(ne=Ce,!ie.length)return;const Fe=o$8(Ce),Re=s$b(Ce);if(me=Fe.length,ae=i$9(Re),Re.length&&Ie(i$9(Re)),ce=[...le],le=[...Fe],ie=[...Fe],me>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||be||(Oe("tap"),fe?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,fe=!1,me=0,Se=[],le=[],ce=[],ie=[],pe=0,ke=0,ve=0,_e=0,$e=0,ye=0,Ee=0,re=void 0,window.removeEventListener("mousemove",Ve),window.removeEventListener("mouseup",Ne),window.removeEventListener("blur",Pe),d$4||Ae||(Ae=setTimeout(()=>{d$4=!0,Ae=0},100))}function Me(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",Me,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(Re,qe){De.set(Re,[...De.get(Re)||[],qe])}(Ce,Fe),xe},off:function(Ce,Fe){return De.has(Ce)&&De.set(Ce,De.get(Ce).filter(Re=>Re!==Fe)),xe},isPointerDown:()=>me>0,destroy:function(){clearTimeout(Le),clearTimeout(Ae),Ae=0,ee&&(ee.removeEventListener("click",Me,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,be=0,fe=Object.assign(Object.assign({},x$2),te),ge={},me=Object.assign({},y$5),pe=Object.assign({},y$5);const ke=[];function ve(We){let Ke=fe[We];return Ke&&typeof Ke=="function"?Ke(tt):Ke}function _e(){return ee&&ee.parentElement&&ae&&be===3}const $e=new Map;function ye(We,...Ke){const nt=[...$e.get(We)||[]];fe.on&&nt.push(fe.on[We]);for(const ht of nt)ht&&ht instanceof Function&&ht(tt,...Ke);We!=="*"&&ye("*",We,...Ke)}function Ee(We){if(!_e())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=ve("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=Me(),Lt=Re();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(ve("clickAction"),wt),ve("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(ve("dblClickAction"),wt)):w$6=setTimeout(()=>{Xe(ve("singleClickAction"),wt)},250)}}function Le(We){if(ue=We,!_e()||!Ne()||me.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 Ae(){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(Ae(),p$3(re)&&(!re.complete||!re.naturalWidth))return be=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(!_e())return void(ce==null||ce.end());if(me=Object.assign(Object.assign({},y$5),ht),Ne()||!ve("bounds")||je()||pe.scale>me.scale||pe.scale<xe())return void Ue();const st=qe(pe.scale);let ft=!1,yt=!1,wt=!1,Tt=!1;me.x<st.x[0]&&(ft=!0),me.x>st.x[1]&&(yt=!0),me.y<st.y[0]&&(Tt=!0),me.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(me).to(pe).start(),Ue()}).on("end",()=>{le!=null&&le.isPointerDown()||Ge(),ce!=null&&ce.isRunning()||(Ze(),ye("animationEnd"))}),function(){const ht=ve("gestures");if(!ht||!ie||!re)return;let st=!1;le=f$4(ie,ht).on("start",ft=>{if(!ve("gestures")||!ce||!_e()||Ne())return;const yt=ft.srcEvent;(me.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}),ke.push(()=>{ie==null||ie.removeEventListener("wheel",Ee,{passive:!1})})),ee==null||ee.addEventListener("click",Se),document==null||document.addEventListener("mousemove",Le),ke.push(()=>{ee==null||ee.removeEventListener("click",Se),document==null||document.removeEventListener("mousemove",Le)});const nt=Oe();me=Object.assign({},nt),pe=Object.assign({},nt),be=3,Ue(),Ze(),ye("ready"),requestAnimationFrame(()=>{Ae(),ie&&(ie.style.visibility="")})}function Oe(){const We=Object.assign({},ve("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 Ie(){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=ve("width"),Ke=ve("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=Ie();return{width:We.width,height:We.height}}function Ne(){return ve("panMode")==="mousemove"&&matchMedia("(hover: hover)").matches}function Pe(We){const Ke=ue||ve("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=ve("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=Ie(),{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=ve("minScale"),wt=ve("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 Me(){return Be("min")}function xe(){return Be("base")}function Ce(){return Be("cover")}function Fe(){return Be("full")}function Re(){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=Ie(),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=ve("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(!_e()||!ve("bounds")||!ce)return;const We=Me(),Ke=Re(),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(me).to(pe).start()):Ue()}function Ze(We){var Ke;if(!_e())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=!_e();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&&_e())||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:me.scale);const yt=ce.getCurrentVelocities(),wt=Ie(),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,Re()));break;case v$6.ZoomOut:st.scale=st.scale*(Ke.scale||.5),Tt||(st.scale=Math.max(st.scale,Me()));break;case v$6.ToggleCover:It=[xe(),Ce()];break;case v$6.ToggleFull:It=[xe(),Fe()];break;case v$6.ToggleMax:It=[xe(),Re()];break;case v$6.IterateZoom:It=[xe(),Fe(),Re()];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(me.angle!==void 0&&Math.abs(me.angle)>=360&&(st.angle-=360*Math.floor(me.angle/360),me.angle-=360*Math.floor(me.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(Me()*(Tt?.8:1),st.scale,Re()*(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&&ve("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(me,st))me=Object.assign({},st),pe=Object.assign({},st),ce.end(),Ue(),Ze();else{if(n$9(pe,st))return;ce.from(me).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}=me,rt=1/Fe(),kt=Rt,$t=Xt,Pt=me.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=ve("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(),Re()];break;case v$6.IterateZoom:ht=[xe(),Fe(),Re()];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(Me(),nt,Re()),nt}function Je(){return!!(_e()&&at()>pe.scale)}function lt(){return!!(_e()&&at()<pe.scale)}function it(){return!!(_e()&&pe.scale>Me())}function gt(){return!!(_e()&&pe.scale<Re())}function Et(){return!!(_e()&&pe.scale<Fe())}function mt(){return!(!(_e()&&Qe()&&le)||Ne())}function je(){return!(!_e()||!(le!=null&&le.isPointerDown())||Ne())}function Qe(){return!!(_e()&&pe.scale>xe())}function ut(){return!!(_e()&&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(ge))We==null||We.destroy(tt);for(const We of ke)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,me=Object.assign({},y$5),pe=Object.assign({},y$5),ce==null||ce.destroy(),ce=void 0,le==null||le.destroy(),le=void 0,be=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 fe},getPlugins:function(){return ge},getScale:Be,getStartPosition:Oe,getState:function(){return be},getTransform:function(We){return We===!0?pe:me},getTween:function(){return ce},getViewport:function(){return ie},getWrapper:function(){return ae},init:function(){return be=0,ye("init"),function(){for(const[We,Ke]of Object.entries(Object.assign(Object.assign({},ne),fe.plugins||{})))if(We&&!ge[We]&&Ke instanceof Function){const nt=Ke();nt.init(tt),ge[We]=nt}ye("initPlugins")}(),function(){const We=Object.assign(Object.assign({},x$2.classes),ve("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",ve("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(()=>{_e()&&(We=We||requestAnimationFrame(()=>{_e()&&(Ze(),Ge(),ye("refresh")),We=null}))}),de.observe(ae),ke.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(be=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=ve("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),ke.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=ve("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),be={},fe=null,ge=null,me=!1,pe=!1,ke=!1,ve=!1,_e="height",$e=0,ye=!0,Ee=0,Se=0,Le=0,Ae=0,De="*",Oe=[],Ie=[];const ze=new Set;let Ve=[],Ne=[],Pe=0,Be=0,Me=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 Re(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!=="*"&&Re("*",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,Re("init"),function(){for(const[Ct,Nt]of Object.entries(Object.assign(Object.assign({},ne),ue.plugins||{})))if(Ct&&!be[Ct]&&Nt instanceof Function){const rt=Nt();rt.init(It,E$3),be[Ct]=rt}Re("initPlugins")}(),function(){if(!fe)return;const Ct=xe("classes")||{};s$a(fe,Ct.container);const Nt=xe("style");if(Nt&&t$7(Nt))for(const[rt,kt]of Object.entries(Nt))fe.style.setProperty(rt,kt);ge=fe.querySelector(`.${Ct.viewport}`),ge||(ge=document.createElement("div"),s$a(ge,Ct.viewport),ge.append(...e$4(fe,`.${Ct.slide}`)),fe.insertAdjacentElement("afterbegin",ge)),fe.carousel=It,Re("initLayout")}(),function(){if(!ge)return;const Ct=xe("classes")||{};Oe=[],[...e$4(ge,`.${Ct.slide}`)].forEach(Nt=>{if(Nt.parentElement){const rt=Qe(Object.assign({el:Nt,isVirtual:!1},Nt.dataset||{}));Re("createSlide",rt),Oe.push(rt)}}),tt();for(const Nt of Oe)Re("addSlide",Nt);je(xe("slides"));for(const Nt of Oe){const rt=Nt.el;(rt==null?void 0:rt.parentElement)===ge&&(s$a(rt,ue.classes.slide),s$a(rt,Nt.class),wt(Nt),Re("attachSlideEl",Nt))}Re("initSlides")}(),We(),ce=1,s$a(fe,(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>Ae)?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,Ae)}).start():ye||(ye=!0,Re("settle")))}),Ze(),function(){if(!fe||!ge)return;fe.addEventListener("click",st,{passive:!1}),document.addEventListener("mousemove",Ge);const Ct=ge.getBoundingClientRect();if(Pe=Ct.height,Be=Ct.width,!oe){let Nt=null;oe=new ResizeObserver(()=>{Nt||(Nt=requestAnimationFrame(()=>{(function(){if(ce!==1||!ge)return;const rt=Ne.length,kt=ge.getBoundingClientRect(),$t=kt.height,Pt=kt.width;rt>1&&(ve&&Math.abs($t-Pe)<.5||!ve&&Math.abs(Pt-Be)<.5)||(We(),Ze(),Pe=$t,Be=Pt,ve&&!$t||!ve&&!Pt||fe&&ge&&(rt===Ne.length&&(ae!=null&&ae.isPointerDown())||(xe("dragFree")&&(pe||$e>Le&&$e<Ae)?(Ue(),Lt()):Tt(Ee,{transition:!1}))))})(),Nt=null}))}),oe.observe(ge)}}(),Re("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&&ge&&(ae=f$4(ge,et).on("start",ct=>{var bt,_t;if(!re)return;const{srcEvent:St}=ct;ve&&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)[_e]||0)*(ke&&!ve?1:-1)),nt(),pe||($e<Le||$e>Ae)&&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,Ae)}).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"&&ve||Ct==="x"&&!ve)&&(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"&&!ve||Ct==="x"&&ve||Nt&&n$a(Nt)&&(Ct!=="x"||ve))return;const $t=ke&&!ve?1:-1;let Pt=ve?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>=Ae&&Pt*$t>0&&(Ot=Math.max(.01,1-(Math.abs(1/gt()*Math.abs(Ft-Ae))||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)===(ve?"y":"x")&&s$a(ge,"is-dragging")}).on("panend",()=>{s$9(ge,"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"&&!ve);ve&&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=ke&&!ve?1:-1;if(Pt||(Zt+=Ht*(Ot?5:1)*an),!pe&&(Ht*an<=0&&Zt<Le||Ht*an>=0&&Zt>Ae)){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,Ae+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=be.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,Re("settle")));if(!Ot&&!(!((_t=be.Autoscroll)===null||_t===void 0)&&_t.isEnabled())&&(!ct.offsetX&&!ct.offsetY||Ct==="y"&&!ve||Ct==="x"&&ve))return void Tt(Ee,{transition:"tween"});let rn=lt(Zt);Math.abs(Ht)>10&&rn===Ee&&(rn+=Ht>0?ke&&!ve?1:-1:ke&&!ve?-1:1),Tt(rn,{transition:"tween",tween:{velocity:-1*Ht}})}).init())}(),s$8(ge,"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,Ie=[...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(),Re("change",Ee,ie))}function at(){var et,ct;if(!fe)return;for(const St of fe.querySelectorAll("[data-carousel-index]"))St.innerHTML=Ee+"";for(const St of fe.querySelectorAll("[data-carousel-page]"))St.innerHTML=Ee+1+"";for(const St of fe.querySelectorAll("[data-carousel-pages]"))St.innerHTML=Ne.length+"";for(const St of fe.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 fe.querySelectorAll("[data-carousel-go-prev]"))St.toggleAttribute("aria-disabled",!Rt()),Rt()?St.removeAttribute("tabindex"):St.setAttribute("tabindex","-1");for(const St of fe.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 fe.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 Me}function gt(){let et=0;return ge&&(ge.childElementCount||(ge.style.display="grid"),et=ge.getBoundingClientRect()[_e]||0,ge.style.display=""),et}function Et(et=!0){return Ie.length?Ie.reduce((ct,bt)=>ct+bt.dim,0)+(Ie.length-(pe&&et?0:1))*Me:0}function mt(et){const ct=Et(),bt=gt();if(!ct||!ge||!bt)return[];const _t=[];et=et===void 0?$e:et,pe&&(et-=Math.floor(et/ct)*ct||0);let St=0,Ct=0;if(me){const rt=ge.getBoundingClientRect();St=Math.abs(rt[ve?"top":"left"]),Ct=Math.abs(window[ve?"innerHeight":"innerWidth"]-rt[ve?"bottom":"right"])}let Nt=0;for(let rt of Ie){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+Me}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")),Re("createSlide",St),bt.push(St)}Oe.splice(ct===void 0?Oe.length:ct,0,...bt),tt();for(const _t of bt)Re("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),Re("contentReady",et))}function dt(et){if(!ge||!et)return;let ct=et.el;if(ct){if(ct.setAttribute("index",et.index+""),ct.parentElement!==ge){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}ge.insertBefore(ct,bt&&ge.contains(bt)?bt:null),Re("attachSlideEl",et)}return Je(et),ct}}function pt(et){const ct=et==null?void 0:et.el;ct&&(ct.remove(),Ke(ct),Re("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(!fe||!ge)return;ke=xe("rtl"),ve=xe("vertical"),_e=ve?"height":"width";const Ct=xe("classes");if(s$8(fe,Ct.isLTR,!ke),s$8(fe,Ct.isRTL,ke),s$8(fe,Ct.isHorizontal,!ve),s$8(fe,Ct.isVertical,ve),s$8(fe,Ct.hasAdaptiveHeight,xe("adaptiveHeight")),!gt())return;const Nt=window.getComputedStyle(ge);me=Nt.getPropertyValue("overflow-"+(ve?"y":"x"))==="visible",Me=ge&&parseFloat(Nt.getPropertyValue("--f-carousel-gap"))||0;const rt=function(){let kt=0;if(ge){let $t=document.createElement("div");$t.style.display="block",s$a($t,ue.classes.slide),ge.appendChild($t),kt=$t.getBoundingClientRect()[_e],$t.remove(),$t=void 0}return kt}();for(const kt of Ie){const $t=kt.el;let Pt=0;if(!kt.isVirtual&&$t&&n$b($t)){let Ft=!1;$t.parentElement&&$t.parentElement===ge||(ge.appendChild($t),Ft=!0),Pt=$t.getBoundingClientRect()[_e],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(me){const Pt=ge.getBoundingClientRect();$t+=Pt.left,$t+=Pt.right-Pt.width}for(let Pt=0;Pt<Ie.length;Pt++){const Ft=((ct=Ie[Pt])===null||ct===void 0?void 0:ct.dim)+Me;if(kt-Ft<$t&&kt-Ft-$t<Ft){pe=!1;break}}}(function(){var kt;if(!fe)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 Ie)(!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+Me,Ht++;const Zt=xe("center"),an=xe("fill");let rn=0;for(const Bt of Ne){Bt.dim=(Bt.slides.length-1)*Me;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+Me}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,Ae=((_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,Re("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(!ge)return;const et=ze.size>0;for(const ct of Ie)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(fe,"in-transition"),!ye&&Math.abs(It.getPosition(!0)-Se)<.5&&(ye=!0,Re("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 Re("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(!fe||!re)return;const Nt=Ne.length;if(!Nt||function($t,Pt){var Ft,Ot,Ht,Zt;if(!(fe&&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),ke&&(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(fe,"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(),Re("change",Ee,ie)),Lt(),void(ye||(ye=!0,Re("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,Re("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(!fe||!ge)return;Ve=mt();const ct=new Set,bt=[],_t=Ne[Ee],St=ue.setTransform;let Ct;for(const Nt of Ie){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)}}ge&&Ct&&(ge.style.height=`${Ct}px`),[...e$4(ge,`.${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=ve?0:ke?-1*Pt:Pt,Ot=ve?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)`:""}),Re("render",bt)}function Gt(){fe==null||fe.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="",ge&&!ge.contains(ct)&&ge.appendChild(ct)))}for(const et of Object.values(be))et==null||et.destroy();be={},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(fe,ct);s$9(ge,"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 Re("destroy"),window.removeEventListener("resize",qe),Gt(),Fe.clear(),fe=null,Ne=[],Oe=[],ue=Object.assign({},h$5),be={},Ie=[],le=void 0,De="*",ce=2,It},emit:Re,filter:function(et="*"){return Xe(et),We(),$e=t$8(Le,$e,Ae),Lt(),Re("filter",et),It},getContainer:function(){return fe},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 be},getPosition:Dt,getSlides:function(){return Oe},getState:function(){return ce},getTotalSlideDim:Et,getTween:function(){return re},getViewport:function(){return ge},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),fe=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 ke},isSettled:function(){return ye},isVertical:function(){return ve},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&&(Re("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,Ae),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),Re("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$1m={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$m={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(ke=>({value:String(ke.id),label:ke.name}))}}),pe.push({key:"actions",label:"Ações",width:"w-44",cellClass:"whitespace-nowrap"}),pe});async function be(){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[ve,_e]of Object.entries(ce.value))Array.isArray(_e)?_e.length&&pe.set(ve,_e.join(",")):_e!=null&&_e!==""&&pe.append(ve,_e);if(ae.extraParams)for(const[ve,_e]of Object.entries(ae.extraParams))Array.isArray(_e)?_e.forEach($e=>pe.append(ve,$e)):_e!=null&&_e!==""&&pe.append(ve,_e);const{data:ke}=await api.get(`${templateUrl}?${pe.toString()}`);re.value=ke.results,le.value=ke.count}catch{re.value=[],le.value=0}finally{oe.value=!1}}function fe(pe){ce.value=pe,ie.value=1,be()}function ge(pe){ie.value=pe,be()}e$b.watch(()=>[ae.instanceId,ae.departmentId,ae.extraParams],()=>{ie.value=1,be()},{deep:!0}),e$b.onMounted(()=>{be(),ae.showDepartments&&!de.loaded&&de.fetchDepartments()});function me(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:be}),(pe,ke)=>{const ve=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":ge,"onUpdate:filters":fe},e$b.createSlots({"empty-action":e$b.withCtx(()=>[e$b.renderSlot(pe.$slots,"empty-action",{},void 0,!0)]),"cell-name":e$b.withCtx(({row:_e})=>[e$b.createElementVNode("span",{title:_e.name,class:"block truncate text-left max-w-64 whitespace-nowrap font-medium text-sm"},e$b.toDisplayString(_e.name),9,_hoisted_1$2x)]),"cell-category":e$b.withCtx(({row:_e})=>[e$b.createElementVNode("div",_hoisted_3$1_,[e$b.createVNode(_sfc_main$2M,{category:_e.category},null,8,["category"])])]),"cell-status":e$b.withCtx(({row:_e})=>{var $e,ye,Ee,Se,Le,Ae,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=_e.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=_e.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=_e.status)==null?void 0:Ee.toLowerCase())==="rejected"||((Se=_e.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=_e.status)==null?void 0:Le.toLowerCase())==="pending"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_6$1v,[...ke[0]||(ke[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)])])):((Ae=_e.status)==null?void 0:Ae.toLowerCase())==="rejected"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_7$1m,[...ke[1]||(ke[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=_e.status)==null?void 0:De.toLowerCase())==="approved"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_8$1e,[...ke[2]||(ke[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=_e.status)==null?void 0:Oe.toLowerCase())==="pending_deletion"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_9$18,[...ke[3]||(ke[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(me(_e.status)),1)],2)])]}),"cell-actions":e$b.withCtx(({row:_e})=>{var $e,ye;return[e$b.createElementVNode("main",_hoisted_18$r,[e$b.createVNode(ve,{placement:"left",class:"preview-popper"},{content:e$b.withCtx(()=>[e$b.createElementVNode("div",_hoisted_19$m,[e$b.createElementVNode("div",_hoisted_20$m,[e$b.createElementVNode("p",_hoisted_21$i,e$b.toDisplayString(_e.name),1)]),e$b.renderSlot(pe.$slots,"preview",{template:_e},()=>[ke[5]||(ke[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(()=>[ke[6]||(ke[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=_e.status)==null?void 0:$e.toLowerCase())!=="approved",class:e$b.normalizeClass(["action-btn group",((ye=_e.status)==null?void 0:ye.toLowerCase())==="approved"?"action-btn-success":"action-btn-danger"]),onClick:Ee=>pe.$emit("send",_e)},[...ke[7]||(ke[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",_e)},[...ke[8]||(ke[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",_e)},[...ke[9]||(ke[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",_e)},[...ke[10]||(ke[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:_e},void 0,!0)]}),_:2},[ee.showLang?{name:"cell-lang",fn:e$b.withCtx(({row:_e})=>[e$b.createElementVNode("span",_hoisted_2$2e,e$b.toDisplayString(_e.lang),1)]),key:"0"}:void 0,ee.showDepartments?{name:"cell-department",fn:e$b.withCtx(({row:_e})=>[e$b.createElementVNode("div",_hoisted_11$V,[e$b.createVNode(ve,{placement:"top",arrow:!1,class:"tip-popper"},{content:e$b.withCtx(()=>{var $e;return[e$b.createElementVNode("section",_hoisted_12$Q,[ke[4]||(ke[4]=e$b.createElementVNode("div",{class:"text-sm font-semibold text-slate-100 pb-2"}," Departamentos ",-1)),(($e=_e.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(_e.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=_e.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,be,fe,ge)=>(ue.addEventListener(be,fe,ge),()=>ue.removeEventListener(be,fe,ge)),ce=e$b.watch(()=>[unrefElement(te),toValue(re)],([ue,be])=>{if(ie(),!ue)return;const fe=isObject(be)?{...be}:be;oe.push(...ne.flatMap(ge=>ae.map(me=>le(ue,ge,me,fe))))},{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(fe=>fe.addEventListener("click",noop)),ae.document.documentElement.addEventListener("click",noop));let le=!0;const ce=fe=>re.some(ge=>{if(typeof ge=="string")return Array.from(ae.document.querySelectorAll(ge)).some(me=>me===fe.target||fe.composedPath().includes(me));{const me=unrefElement(ge);return me&&(fe.target===me||fe.composedPath().includes(me))}}),ue=[useEventListener$1(ae,"click",fe=>{const ge=unrefElement(ee);if(!(!ge||ge===fe.target||fe.composedPath().includes(ge))){if(fe.detail===0&&(le=!ce(fe)),!le){le=!0;return}te(fe)}},{passive:!0,capture:oe}),useEventListener$1(ae,"pointerdown",fe=>{const ge=unrefElement(ee);le=!ce(fe)&&!!(ge&&!fe.composedPath().includes(ge))},{passive:!0}),ie&&useEventListener$1(ae,"blur",fe=>{setTimeout(()=>{var ge;const me=unrefElement(ee);((ge=ae.document.activeElement)==null?void 0:ge.tagName)==="IFRAME"&&!(me!=null&&me.contains(ae.document.activeElement))&&te(fe)},0)})].filter(Boolean);return()=>ue.forEach(fe=>fe())}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$1l={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$1l,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$1k={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$1k,[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,be,fe,ge,me,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((fe=(be=te.ring)==null?void 0:be.colors)==null?void 0:fe[1],DEFAULT_COLORS[1]),color((me=(ge=te.ring)==null?void 0:ge.colors)==null?void 0:me[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,be)=>{const fe={variant:"none",enabled:!1};return{...ue,[be]:ce.includes(be)?clone(te[be]):{...fe,colors:clone(te[be].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$1j={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)),be=e$b.computed(()=>ae.value.placement==="behind"?[!1]:[!0,!1]);function fe($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 ge=e$b.computed(()=>!ie.value&&re.value.enabled&&re.value.variant!=="none"),me=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:ke,paused:ve}=useOffscreenPause(()=>te.pauseOffscreen),_e=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":"",ve.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:ke,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}`:"",_e.value]]),style:e$b.normalizeStyle(pe.value),"aria-hidden":"true"},[ge.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)])])):ge.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))])):ge.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(be.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(fe("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(fe("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(fe("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(fe("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(fe("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$1j,[(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(fe("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(me.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$1i={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$1i))])),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 seasonRef(ee){const te=ee&&typeof ee=="object"?ee.id:ee,ne=te==null||te===""?null:String(te);return ne?{id:ne,name:String((ee==null?void 0:ee.name)??"").trim()}:null}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"?seasonRef(ee.season):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"&&!seasonRef(ee.season)&&(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(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,requirement:ne,...ae}=createCustomAchievement(ee),{season:re,...oe}=ne;return{...ae,requirement:{...oe,season_id:(re==null?void 0:re.id)??null}}}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 be;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=seasonRef(te.season),le=(ie==null?void 0:ie.name)||null,ce=ee.progress??((be=ee.unlocked)==null?void 0:be.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.",icon:"📊",rarity:"rare",metric:"season_points",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.",icon:"😎",rarity:"secret",hint:"Um número muito específico.",metric:"season_points",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=be=>Number(be).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=(be,fe,ge)=>{const me=be==="achievement"?findAchievement(ge):findCosmetic(be,ge);return me?typeof fe!="object"?me:{...me,...fe,...fe.rarity==null&&me.rarity?{rarity:me.rarity}:{}}:typeof fe=="object"?fe: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$1h={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)||""}),be=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}),fe=e$b.computed(()=>{if(!ne.attendant)return null;const Ue=resolveAttendantGamification(ne.attendant);return Ue.frame||Ue.title||Ue.achievement||!be.value?Ue:resolveAttendantGamification(be.value)}),ge=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)}),me=e$b.computed(()=>!!ne.attendant&&ge.value&&resolveSmPlayEnabled(be.value||ne.attendant)),pe=e$b.computed(()=>{var Ue;return ne.frame!==void 0?ne.frame:me.value?(Ue=fe.value)==null?void 0:Ue.frame:null}),ke=e$b.computed(()=>{var Ue;return ne.level!==null?ne.level:me.value?(Ue=fe.value)==null?void 0:Ue.level:null}),ve=e$b.computed(()=>avatarInitials(de.value)),_e=e$b.computed(()=>ne.fallback==="initials"&&!!ve.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),Ae=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 Ae.value&&((at=(Ue=Ee.value)==null?void 0:Ue.ornament)==null?void 0:at.variant)||""}),Ie=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)`}),Me=e$b.computed(()=>{var lt;if(ne.size==="fill"&&!Le.value)return"0px";const Ue=Ae.value?.72:De.value?1.4:1,at=Ae.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":Ae.value?"transparent":Se.value,boxShadow:Be.value,"--sm-frame-width":Me.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":Me.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}`),Re=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"||Ie.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"||Ie.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&&lt.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)},[Ae.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))])):_e.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_6$1q,e$b.toDisplayString(ve.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$1h,[...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&&ke.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(ke.value),1)],4)):e$b.createCommentVNode("",!0),Re.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:2,class:e$b.normalizeClass(["sm-avatar-channel",`sm-avatar-channel--${Re.value}`]),title:e$b.unref(channelLabel)(ee.channel)},[e$b.createVNode(ChannelIcon,{channel:Re.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$1g={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$l={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(Ie){return Ie?Array.isArray(Ie)?Ie:[Ie]:[]}function ce(Ie){const ze=(Ie??"").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)}`:Ie}function de(Ie){return typeof Ie=="string"?Ie:[Ie.street,Ie.city,Ie.state,Ie.zip,Ie.country].filter(Boolean).join(", ")}function ue(Ie){const ze=/^(\d{4})-(\d{2})-(\d{2})/.exec(Ie||"");return ze?`${ze[3]}/${ze[2]}/${ze[1]}`:Ie}function be(Ie){const ze=Ie||{};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 fe=e$b.computed(()=>{const Ie=le(ne.contacts);return(Ie.length?Ie:[ne.contact]).map(be)}),ge=e$b.computed(()=>fe.value.length>1),me=e$b.computed(()=>fe.value[0]),pe=e$b.computed(()=>fe.value.slice(0,3)),ke=e$b.computed(()=>{if(!ge.value)return me.value.name;const Ie=fe.value.length-1;return Ie===1?`${me.value.name} e 1 outro contato`:`${me.value.name} e ${Ie} outros contatos`}),ve=e$b.computed(()=>{if(ge.value)return`${fe.value.length} contatos`;const Ie=me.value;return Ie.phones.length?ce(Ie.phones[0]):Ie.org||Ie.title||""}),_e=e$b.computed(()=>{const Ie=me.value;return Ie.phones.length>1||Ie.emails.length>0||Ie.urls.length>0||Ie.addresses.length>0||!!Ie.birthday||!!Ie.title||!!Ie.org}),$e=e$b.computed(()=>ge.value||_e.value),ye=e$b.computed(()=>({title:ge.value?`${fe.value.length} contatos`:me.value.name,svg:ge.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 Ie=me.value,ze=[],Ve=(Ne,Pe,Be,Me={})=>{Be&&ze.push({id:`${Ne}-${ze.length}`,icon:Ee[Ne],label:Pe,value:Be,...Me})};return Ie.phones.forEach(Ne=>Ve("phone","Telefone",ce(Ne))),Ie.emails.forEach(Ne=>Ve("email",Ne.type||"E-mail",Ne.email)),Ie.addresses.forEach(Ne=>Ve("addr","Endereço",de(Ne))),Ie.urls.forEach(Ne=>Ve("url",Ne.type||"Site",Ne.url,{link:Ne.url})),Ve("birthday","Aniversário",Ie.birthday&&ue(Ie.birthday)),ze}),Le=e$b.computed(()=>[me.value.title,me.value.org].filter(Boolean).join(" · "));function Ae(){$e.value&&(re.value=!0)}function De(Ie){re.value=!1,ae("start-chat",Ie)}async function Oe(Ie,ze){if(Ie)try{await navigator.clipboard.writeText(Ie),oe.value=ze,ie&&clearTimeout(ie),ie=setTimeout(()=>{oe.value=""},1500)}catch(Ve){console.error("Falha ao copiar:",Ve)}}return(Ie,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(Ae,["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(ke.value),1),ve.value?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_5$1y,e$b.toDisplayString(ve.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"])),ge.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",me.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(()=>[ge.value?(e$b.openBlock(),e$b.createElementBlock("ul",_hoisted_7$1g,[(e$b.openBlock(!0),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(fe.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:me.value.photo||"",name:me.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(me.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$l,[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&&!ge.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(me.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,be=.01,fe=.01,ge=!1,me={},pe=null,ke={},ve={},_e={},$e=0,ye=0,Ee=r$7.Loop,Se=c$5.Easings.Linear;const Le=new Map;function Ae(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,Ae("start",ke,ve)}function Ie(){if(ee=i$a.Completed,_e={},Ae("end",ke),ee===i$a.Completed)if(ne<$e){if(ne++,Ee===r$7.Reverse){const Ve=Object.assign({},me);me=Object.assign({},ve),ve=Ve}De(ye)}else ne=0;return ze}const ze={getState:function(){return ee},easing:function(Ve){return re=Ve,te=o$9.Ease,_e={},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:Me,friction:xe,restDelta:Ce,restSpeed:Fe,maxSpeed:Re,clamp:qe}=Object.assign(Object.assign({},Ne),Ve);return ie=Pe,le=Be,ce=Me,de=xe,fe=Ce,be=Fe,ue=Re,ge=qe,_e={},ze},isRunning:function(){return ee===i$a.Running},isSpring:function(){return te===o$9.Spring},from:function(Ve){return ke=Object.assign({},Ve),ze},to:function(Ve){return ve=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(Me=>Me!==Be)),ze},start:function(Ve){return n$9(ke,ve)||(ee=i$a.Initializing,me=Object.assign({},ke),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,Ae("pause",ke)),ze},end:Ie,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 Me=Ee===r$7.Reverse?Se:re;for(const xe in ke)ke[xe]=me[xe]+(ve[xe]-me[xe])*Me(Ne)}if(te===o$9.Spring){const Me=.001*Ve;let xe=0;for(const Ce in ke){const Fe=ve[Ce];let Re=ke[Ce];if(typeof Fe!="number"||isNaN(Fe)||typeof Re!="number"||isNaN(Re))continue;if(Math.abs(Fe-Re)<=fe){ke[Ce]=Fe,_e[Ce]=0;continue}_e[Ce]||(typeof ie=="object"&&typeof ie[Ce]=="number"?_e[Ce]=ie[Ce]:_e[Ce]=typeof ie=="number"?ie:0);let qe=_e[Ce];qe=t$8(-1*Math.abs(ue),qe,Math.abs(ue));const Ge=qe*le*de;qe+=((Re>Fe?-1:1)*(Math.abs(Fe-Re)*ce)-Ge)/le*Me,Re+=qe*Me;const Ze=ke[Ce]>Fe?Re<Fe:Re>Fe;let Xe=Math.abs(qe)<be&&Math.abs(Fe-Re)<=fe;ge&&Ze&&(Xe=!0),Xe?(Re=Fe,qe=0):xe++,ke[Ce]=Re,_e[Ce]=qe}Pe=!xe}const Be=Object.assign({},ve);return Ae("step",ke,me,ve,Ne),Pe&&ee===i$a.Running&&n$9(ve,Be)&&(ee=i$a.Completed,Ie()),ze},getStartValues:function(){return me},getCurrentValues:function(){return ke},getCurrentVelocities:function(){return _e},getEndValues:function(){return ve},destroy:function(){ee=i$a.Destroyed,pe&&(clearTimeout(pe),pe=null),me=ke=ve={},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,be=!1,fe=!1,ge=0,me=0,pe=0,ke=0,ve=0,_e=0,$e=0,ye=0,Ee=0,Se=[],Le=0,Ae=0;const De=new Map;function Oe(Ce){const Fe=c$4(le),Re=c$4(ce),qe=Fe&&Re?Fe/Re: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:ke,offsetX:ve,offsetY:_e,velocityX:$e,velocityY:ye,velocity:Ge,angle:Ee,axis:re,scale:qe,center:ae};for(const Xe of De.get(Ce)||[])Xe(Ze)}function Ie(Ce){const Fe=Date.now();if(Se=Se.filter(Re=>!Re.ts||Re.ts>Fe-100),Ce&&Se.push(Ce),$e=0,ye=0,Se.length>3){const Re=Se[0],qe=Se[Se.length-1];if(Re&&qe){const Ge=qe.x-Re.x,Ze=qe.y-Re.y,Xe=Re.ts&&qe.ts?qe.ts-Re.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],Re=oe.ignore.join(",");if(Fe.matches(Re)||Fe.closest(Re))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=[],me=le.length,ae=i$9(le),me===1&&(de=!1,ue=!1,be=!1),me&&Ie(i$9(le));const qe=Date.now(),Ge=qe-(ge||qe);fe=Ge>0&&Ge<=250&&me===1,ge=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 Re=i$9(ce),qe=i$9(n$8(Ce));if(Ie(qe),me=le.length,ae=qe,ce.length===le.length?(pe=qe.x-Re.x,ke=qe.y-Re.y):(pe=0,ke=0),ie.length){const Ge=i$9(ie);ve=qe.x-Ge.x,_e=qe.y-Ge.y}if(le.length>1){const Ge=c$4(le),Ze=c$4(ce);Math.abs(Ge-Ze)>=.1&&(be=!0,Oe("pinch"))}de||(de=Math.abs(ve)>oe.panThreshold||Math.abs(_e)>oe.panThreshold,de&&(d$4=!1,clearTimeout(Ae),Ae=0,Ee=Math.abs(180*Math.atan2(_e,ve)/Math.PI),re=Ee>45&&Ee<135?"y":"x",ie=[...le],ce=[...le],ve=0,_e=0,pe=0,ke=0,(Fe=window.getSelection())===null||Fe===void 0||Fe.removeAllRanges(),Oe("panstart"))),de&&(pe||ke)&&Oe("pan"),Oe("move")}function Ne(Ce){if(ne=Ce,!ie.length)return;const Fe=o$8(Ce),Re=s$b(Ce);if(me=Fe.length,ae=i$9(Re),Re.length&&Ie(i$9(Re)),ce=[...le],le=[...Fe],ie=[...Fe],me>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||be||(Oe("tap"),fe?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,fe=!1,me=0,Se=[],le=[],ce=[],ie=[],pe=0,ke=0,ve=0,_e=0,$e=0,ye=0,Ee=0,re=void 0,window.removeEventListener("mousemove",Ve),window.removeEventListener("mouseup",Ne),window.removeEventListener("blur",Pe),d$4||Ae||(Ae=setTimeout(()=>{d$4=!0,Ae=0},100))}function Me(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",Me,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(Re,qe){De.set(Re,[...De.get(Re)||[],qe])}(Ce,Fe),xe},off:function(Ce,Fe){return De.has(Ce)&&De.set(Ce,De.get(Ce).filter(Re=>Re!==Fe)),xe},isPointerDown:()=>me>0,destroy:function(){clearTimeout(Le),clearTimeout(Ae),Ae=0,ee&&(ee.removeEventListener("click",Me,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,be=0,fe=Object.assign(Object.assign({},x$2),te),ge={},me=Object.assign({},y$5),pe=Object.assign({},y$5);const ke=[];function ve(We){let Ke=fe[We];return Ke&&typeof Ke=="function"?Ke(tt):Ke}function _e(){return ee&&ee.parentElement&&ae&&be===3}const $e=new Map;function ye(We,...Ke){const nt=[...$e.get(We)||[]];fe.on&&nt.push(fe.on[We]);for(const ht of nt)ht&&ht instanceof Function&&ht(tt,...Ke);We!=="*"&&ye("*",We,...Ke)}function Ee(We){if(!_e())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=ve("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=Me(),Lt=Re();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(ve("clickAction"),wt),ve("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(ve("dblClickAction"),wt)):w$6=setTimeout(()=>{Xe(ve("singleClickAction"),wt)},250)}}function Le(We){if(ue=We,!_e()||!Ne()||me.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 Ae(){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(Ae(),p$3(re)&&(!re.complete||!re.naturalWidth))return be=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(!_e())return void(ce==null||ce.end());if(me=Object.assign(Object.assign({},y$5),ht),Ne()||!ve("bounds")||je()||pe.scale>me.scale||pe.scale<xe())return void Ue();const st=qe(pe.scale);let ft=!1,yt=!1,wt=!1,Tt=!1;me.x<st.x[0]&&(ft=!0),me.x>st.x[1]&&(yt=!0),me.y<st.y[0]&&(Tt=!0),me.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(me).to(pe).start(),Ue()}).on("end",()=>{le!=null&&le.isPointerDown()||Ge(),ce!=null&&ce.isRunning()||(Ze(),ye("animationEnd"))}),function(){const ht=ve("gestures");if(!ht||!ie||!re)return;let st=!1;le=f$4(ie,ht).on("start",ft=>{if(!ve("gestures")||!ce||!_e()||Ne())return;const yt=ft.srcEvent;(me.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}),ke.push(()=>{ie==null||ie.removeEventListener("wheel",Ee,{passive:!1})})),ee==null||ee.addEventListener("click",Se),document==null||document.addEventListener("mousemove",Le),ke.push(()=>{ee==null||ee.removeEventListener("click",Se),document==null||document.removeEventListener("mousemove",Le)});const nt=Oe();me=Object.assign({},nt),pe=Object.assign({},nt),be=3,Ue(),Ze(),ye("ready"),requestAnimationFrame(()=>{Ae(),ie&&(ie.style.visibility="")})}function Oe(){const We=Object.assign({},ve("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 Ie(){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=ve("width"),Ke=ve("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=Ie();return{width:We.width,height:We.height}}function Ne(){return ve("panMode")==="mousemove"&&matchMedia("(hover: hover)").matches}function Pe(We){const Ke=ue||ve("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=ve("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=Ie(),{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=ve("minScale"),wt=ve("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 Me(){return Be("min")}function xe(){return Be("base")}function Ce(){return Be("cover")}function Fe(){return Be("full")}function Re(){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=Ie(),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=ve("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(!_e()||!ve("bounds")||!ce)return;const We=Me(),Ke=Re(),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(me).to(pe).start()):Ue()}function Ze(We){var Ke;if(!_e())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=!_e();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&&_e())||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:me.scale);const yt=ce.getCurrentVelocities(),wt=Ie(),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,Re()));break;case v$6.ZoomOut:st.scale=st.scale*(Ke.scale||.5),Tt||(st.scale=Math.max(st.scale,Me()));break;case v$6.ToggleCover:It=[xe(),Ce()];break;case v$6.ToggleFull:It=[xe(),Fe()];break;case v$6.ToggleMax:It=[xe(),Re()];break;case v$6.IterateZoom:It=[xe(),Fe(),Re()];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(me.angle!==void 0&&Math.abs(me.angle)>=360&&(st.angle-=360*Math.floor(me.angle/360),me.angle-=360*Math.floor(me.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(Me()*(Tt?.8:1),st.scale,Re()*(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&&ve("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(me,st))me=Object.assign({},st),pe=Object.assign({},st),ce.end(),Ue(),Ze();else{if(n$9(pe,st))return;ce.from(me).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}=me,rt=1/Fe(),kt=Rt,$t=Xt,Pt=me.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=ve("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(),Re()];break;case v$6.IterateZoom:ht=[xe(),Fe(),Re()];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(Me(),nt,Re()),nt}function Je(){return!!(_e()&&at()>pe.scale)}function lt(){return!!(_e()&&at()<pe.scale)}function it(){return!!(_e()&&pe.scale>Me())}function gt(){return!!(_e()&&pe.scale<Re())}function Et(){return!!(_e()&&pe.scale<Fe())}function mt(){return!(!(_e()&&Qe()&&le)||Ne())}function je(){return!(!_e()||!(le!=null&&le.isPointerDown())||Ne())}function Qe(){return!!(_e()&&pe.scale>xe())}function ut(){return!!(_e()&&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(ge))We==null||We.destroy(tt);for(const We of ke)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,me=Object.assign({},y$5),pe=Object.assign({},y$5),ce==null||ce.destroy(),ce=void 0,le==null||le.destroy(),le=void 0,be=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 fe},getPlugins:function(){return ge},getScale:Be,getStartPosition:Oe,getState:function(){return be},getTransform:function(We){return We===!0?pe:me},getTween:function(){return ce},getViewport:function(){return ie},getWrapper:function(){return ae},init:function(){return be=0,ye("init"),function(){for(const[We,Ke]of Object.entries(Object.assign(Object.assign({},ne),fe.plugins||{})))if(We&&!ge[We]&&Ke instanceof Function){const nt=Ke();nt.init(tt),ge[We]=nt}ye("initPlugins")}(),function(){const We=Object.assign(Object.assign({},x$2.classes),ve("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",ve("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(()=>{_e()&&(We=We||requestAnimationFrame(()=>{_e()&&(Ze(),Ge(),ye("refresh")),We=null}))}),de.observe(ae),ke.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(be=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=ve("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),ke.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=ve("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),be={},fe=null,ge=null,me=!1,pe=!1,ke=!1,ve=!1,_e="height",$e=0,ye=!0,Ee=0,Se=0,Le=0,Ae=0,De="*",Oe=[],Ie=[];const ze=new Set;let Ve=[],Ne=[],Pe=0,Be=0,Me=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 Re(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!=="*"&&Re("*",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,Re("init"),function(){for(const[Ct,Nt]of Object.entries(Object.assign(Object.assign({},ne),ue.plugins||{})))if(Ct&&!be[Ct]&&Nt instanceof Function){const rt=Nt();rt.init(It,E$3),be[Ct]=rt}Re("initPlugins")}(),function(){if(!fe)return;const Ct=xe("classes")||{};s$a(fe,Ct.container);const Nt=xe("style");if(Nt&&t$7(Nt))for(const[rt,kt]of Object.entries(Nt))fe.style.setProperty(rt,kt);ge=fe.querySelector(`.${Ct.viewport}`),ge||(ge=document.createElement("div"),s$a(ge,Ct.viewport),ge.append(...e$4(fe,`.${Ct.slide}`)),fe.insertAdjacentElement("afterbegin",ge)),fe.carousel=It,Re("initLayout")}(),function(){if(!ge)return;const Ct=xe("classes")||{};Oe=[],[...e$4(ge,`.${Ct.slide}`)].forEach(Nt=>{if(Nt.parentElement){const rt=Qe(Object.assign({el:Nt,isVirtual:!1},Nt.dataset||{}));Re("createSlide",rt),Oe.push(rt)}}),tt();for(const Nt of Oe)Re("addSlide",Nt);je(xe("slides"));for(const Nt of Oe){const rt=Nt.el;(rt==null?void 0:rt.parentElement)===ge&&(s$a(rt,ue.classes.slide),s$a(rt,Nt.class),wt(Nt),Re("attachSlideEl",Nt))}Re("initSlides")}(),We(),ce=1,s$a(fe,(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>Ae)?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,Ae)}).start():ye||(ye=!0,Re("settle")))}),Ze(),function(){if(!fe||!ge)return;fe.addEventListener("click",st,{passive:!1}),document.addEventListener("mousemove",Ge);const Ct=ge.getBoundingClientRect();if(Pe=Ct.height,Be=Ct.width,!oe){let Nt=null;oe=new ResizeObserver(()=>{Nt||(Nt=requestAnimationFrame(()=>{(function(){if(ce!==1||!ge)return;const rt=Ne.length,kt=ge.getBoundingClientRect(),$t=kt.height,Pt=kt.width;rt>1&&(ve&&Math.abs($t-Pe)<.5||!ve&&Math.abs(Pt-Be)<.5)||(We(),Ze(),Pe=$t,Be=Pt,ve&&!$t||!ve&&!Pt||fe&&ge&&(rt===Ne.length&&(ae!=null&&ae.isPointerDown())||(xe("dragFree")&&(pe||$e>Le&&$e<Ae)?(Ue(),Lt()):Tt(Ee,{transition:!1}))))})(),Nt=null}))}),oe.observe(ge)}}(),Re("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&&ge&&(ae=f$4(ge,et).on("start",ct=>{var bt,_t;if(!re)return;const{srcEvent:St}=ct;ve&&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)[_e]||0)*(ke&&!ve?1:-1)),nt(),pe||($e<Le||$e>Ae)&&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,Ae)}).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"&&ve||Ct==="x"&&!ve)&&(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"&&!ve||Ct==="x"&&ve||Nt&&n$a(Nt)&&(Ct!=="x"||ve))return;const $t=ke&&!ve?1:-1;let Pt=ve?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>=Ae&&Pt*$t>0&&(Ot=Math.max(.01,1-(Math.abs(1/gt()*Math.abs(Ft-Ae))||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)===(ve?"y":"x")&&s$a(ge,"is-dragging")}).on("panend",()=>{s$9(ge,"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"&&!ve);ve&&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=ke&&!ve?1:-1;if(Pt||(Zt+=Ht*(Ot?5:1)*an),!pe&&(Ht*an<=0&&Zt<Le||Ht*an>=0&&Zt>Ae)){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,Ae+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=be.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,Re("settle")));if(!Ot&&!(!((_t=be.Autoscroll)===null||_t===void 0)&&_t.isEnabled())&&(!ct.offsetX&&!ct.offsetY||Ct==="y"&&!ve||Ct==="x"&&ve))return void Tt(Ee,{transition:"tween"});let rn=lt(Zt);Math.abs(Ht)>10&&rn===Ee&&(rn+=Ht>0?ke&&!ve?1:-1:ke&&!ve?-1:1),Tt(rn,{transition:"tween",tween:{velocity:-1*Ht}})}).init())}(),s$8(ge,"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,Ie=[...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(),Re("change",Ee,ie))}function at(){var et,ct;if(!fe)return;for(const St of fe.querySelectorAll("[data-carousel-index]"))St.innerHTML=Ee+"";for(const St of fe.querySelectorAll("[data-carousel-page]"))St.innerHTML=Ee+1+"";for(const St of fe.querySelectorAll("[data-carousel-pages]"))St.innerHTML=Ne.length+"";for(const St of fe.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 fe.querySelectorAll("[data-carousel-go-prev]"))St.toggleAttribute("aria-disabled",!Rt()),Rt()?St.removeAttribute("tabindex"):St.setAttribute("tabindex","-1");for(const St of fe.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 fe.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 Me}function gt(){let et=0;return ge&&(ge.childElementCount||(ge.style.display="grid"),et=ge.getBoundingClientRect()[_e]||0,ge.style.display=""),et}function Et(et=!0){return Ie.length?Ie.reduce((ct,bt)=>ct+bt.dim,0)+(Ie.length-(pe&&et?0:1))*Me:0}function mt(et){const ct=Et(),bt=gt();if(!ct||!ge||!bt)return[];const _t=[];et=et===void 0?$e:et,pe&&(et-=Math.floor(et/ct)*ct||0);let St=0,Ct=0;if(me){const rt=ge.getBoundingClientRect();St=Math.abs(rt[ve?"top":"left"]),Ct=Math.abs(window[ve?"innerHeight":"innerWidth"]-rt[ve?"bottom":"right"])}let Nt=0;for(let rt of Ie){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+Me}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")),Re("createSlide",St),bt.push(St)}Oe.splice(ct===void 0?Oe.length:ct,0,...bt),tt();for(const _t of bt)Re("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),Re("contentReady",et))}function dt(et){if(!ge||!et)return;let ct=et.el;if(ct){if(ct.setAttribute("index",et.index+""),ct.parentElement!==ge){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}ge.insertBefore(ct,bt&&ge.contains(bt)?bt:null),Re("attachSlideEl",et)}return Je(et),ct}}function pt(et){const ct=et==null?void 0:et.el;ct&&(ct.remove(),Ke(ct),Re("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(!fe||!ge)return;ke=xe("rtl"),ve=xe("vertical"),_e=ve?"height":"width";const Ct=xe("classes");if(s$8(fe,Ct.isLTR,!ke),s$8(fe,Ct.isRTL,ke),s$8(fe,Ct.isHorizontal,!ve),s$8(fe,Ct.isVertical,ve),s$8(fe,Ct.hasAdaptiveHeight,xe("adaptiveHeight")),!gt())return;const Nt=window.getComputedStyle(ge);me=Nt.getPropertyValue("overflow-"+(ve?"y":"x"))==="visible",Me=ge&&parseFloat(Nt.getPropertyValue("--f-carousel-gap"))||0;const rt=function(){let kt=0;if(ge){let $t=document.createElement("div");$t.style.display="block",s$a($t,ue.classes.slide),ge.appendChild($t),kt=$t.getBoundingClientRect()[_e],$t.remove(),$t=void 0}return kt}();for(const kt of Ie){const $t=kt.el;let Pt=0;if(!kt.isVirtual&&$t&&n$b($t)){let Ft=!1;$t.parentElement&&$t.parentElement===ge||(ge.appendChild($t),Ft=!0),Pt=$t.getBoundingClientRect()[_e],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(me){const Pt=ge.getBoundingClientRect();$t+=Pt.left,$t+=Pt.right-Pt.width}for(let Pt=0;Pt<Ie.length;Pt++){const Ft=((ct=Ie[Pt])===null||ct===void 0?void 0:ct.dim)+Me;if(kt-Ft<$t&&kt-Ft-$t<Ft){pe=!1;break}}}(function(){var kt;if(!fe)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 Ie)(!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+Me,Ht++;const Zt=xe("center"),an=xe("fill");let rn=0;for(const Bt of Ne){Bt.dim=(Bt.slides.length-1)*Me;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+Me}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,Ae=((_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,Re("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(!ge)return;const et=ze.size>0;for(const ct of Ie)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(fe,"in-transition"),!ye&&Math.abs(It.getPosition(!0)-Se)<.5&&(ye=!0,Re("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 Re("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(!fe||!re)return;const Nt=Ne.length;if(!Nt||function($t,Pt){var Ft,Ot,Ht,Zt;if(!(fe&&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),ke&&(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(fe,"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(),Re("change",Ee,ie)),Lt(),void(ye||(ye=!0,Re("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,Re("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(!fe||!ge)return;Ve=mt();const ct=new Set,bt=[],_t=Ne[Ee],St=ue.setTransform;let Ct;for(const Nt of Ie){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)}}ge&&Ct&&(ge.style.height=`${Ct}px`),[...e$4(ge,`.${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=ve?0:ke?-1*Pt:Pt,Ot=ve?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)`:""}),Re("render",bt)}function Gt(){fe==null||fe.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="",ge&&!ge.contains(ct)&&ge.appendChild(ct)))}for(const et of Object.values(be))et==null||et.destroy();be={},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(fe,ct);s$9(ge,"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 Re("destroy"),window.removeEventListener("resize",qe),Gt(),Fe.clear(),fe=null,Ne=[],Oe=[],ue=Object.assign({},h$5),be={},Ie=[],le=void 0,De="*",ce=2,It},emit:Re,filter:function(et="*"){return Xe(et),We(),$e=t$8(Le,$e,Ae),Lt(),Re("filter",et),It},getContainer:function(){return fe},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 be},getPosition:Dt,getSlides:function(){return Oe},getState:function(){return ce},getTotalSlideDim:Et,getTween:function(){return re},getViewport:function(){return ge},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),fe=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 ke},isSettled:function(){return ye},isVertical:function(){return ve},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&&(Re("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,Ae),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),Re("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,be){const fe=ee==null?void 0:ee.getOptions().Zoomable;let ge=(t$7(fe)?Object.assign(Object.assign({},a$7),fe):a$7)[ue];return ge&&typeof ge=="function"&&be?ge(be):ge}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 be of ue){const fe=be.panzoomRef;fe&&((ee==null?void 0:ee.getPage().slides)||[]).indexOf(be)<0&&fe.execute(v$6.ZoomTo,Object.assign({},fe.getStartPosition()))}}function re(ue,be){const fe=be.target;fe&&!be.defaultPrevented&&fe.dataset.panzoomAction&&de(fe.dataset.panzoomAction)}function oe(ue,be){const fe=be.el;if(!ee||!fe||be.panzoomRef)return;const ge=be.src||be.lazySrc||"",me=be.alt||be.caption||`Image #${be.index}`,pe=be.srcset||be.lazySrcset||"",ke=be.sizes||be.lazySizes||"";if(ge&&t$9(ge)&&!be.html&&(!be.type||be.type==="image")){be.type="image",be.thumbSrc=be.thumbSrc||ge;let Ee=te("tpl",be);Ee=n$7(Ee,"{{src}}",ge+""),Ee=n$7(Ee,"{{srcset}}",pe+""),Ee=n$7(Ee,"{{sizes}}",ke+""),fe.insertAdjacentHTML("afterbegin",Ee)}const ve=fe.querySelector(".f-panzoom__content");if(!ve)return;ve.setAttribute("alt",me+"");const _e=be.width&&be.width!=="auto"?parseFloat(be.width+""):"auto",$e=be.height&&be.height!=="auto"?parseFloat(be.height+""):"auto",ye=E$4(fe,Object.assign({width:_e,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"&&(be.state=0),Se==="loaded"&&(be.state=1),Se==="error"&&(be.state=2,ee==null||ee.showError(be,"{{IMAGE_ERROR}}")),ee.emit(`panzoom:${Se}`,be,...Le),Se==="ready"&&ee.emit("contentReady",be),be.index===(ee==null?void 0:ee.getPageIndex())&&ce())}),be.panzoomRef=ye}function ie(ue,be){be.panzoomRef&&(be.panzoomRef.destroy(),be.panzoomRef=void 0)}function le(ue,be){const fe=be.panzoomRef;if(fe)switch(fe.getState()){case 0:fe.init();break;case 3:fe.execute(v$6.ZoomTo,Object.assign(Object.assign({},fe.getStartPosition()),{velocity:0}))}}function ce(){var ue,be;const fe=(ee==null?void 0:ee.getContainer())||void 0,ge=(be=(ue=ee==null?void 0:ee.getPage())===null||ue===void 0?void 0:ue.slides[0])===null||be===void 0?void 0:be.panzoomRef;if(fe)if(ge)ge.updateControls(fe);else for(const me of fe.querySelectorAll("[data-panzoom-action]")||[])me.setAttribute("aria-disabled",""),me.setAttribute("tabindex","-1")}function de(ue,...be){var fe;(fe=ee==null?void 0:ee.getPage().slides[0].panzoomRef)===null||fe===void 0||fe.execute(ue,...be)}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 ge=ee==null?void 0:ee.getOptions().Sync;return t$7(ge)?Object.assign(Object.assign({},e$2),ge):e$2}function ae(ge){var me,pe,ke;ee&&ge&&(te=ge,ee.getOptions().classes=Object.assign(Object.assign({},ee.getOptions().classes),{isSelected:""}),ee.getOptions().initialSlide=((pe=(me=te.getPage())===null||me===void 0?void 0:me.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&&((ke=ee.getViewport())===null||ke===void 0||ke.addEventListener("mouseover",de)),function(){!ee||!te||(ee.on("ready",oe),ee.on("refresh",ue),te.on("change",le),te.on("filter",be))}())}function re(){const ge=ne().target;ee&&ge&&ae(ge)}function oe(){fe()}function ie(){var ge;if(ee&&te){const me=((ge=ee.getPage())===null||ge===void 0?void 0:ge.slides)||[],pe=te.getPageIndex(me[0].index||0);pe>-1&&te.goTo(pe,ee.hasNavigated()?void 0:{tween:!1,transition:!1}),fe()}}function le(){var ge;if(ee&&te){const me=ee.getPageIndex(((ge=te.getPage())===null||ge===void 0?void 0:ge.slides[0].index)||0);me>-1&&ee.goTo(me,te.hasNavigated()?void 0:{tween:!1,transition:!1}),fe()}}function ce(ge,me){var pe;if(!ee||!te||!((pe=ee.getTween())===null||pe===void 0)&&pe.isRunning())return;const ke=ee==null?void 0:ee.getOptions().classes.slide;if(!ke)return;const ve=ke?me.target.closest(`.${ke}`):null;if(ve){const _e=parseInt(ve.getAttribute("index")||"")||0,$e=te.getPageIndex(_e);te.goTo($e)}}function de(ge){ee&&ce(0,ge)}function ue(){var ge;if(ee&&te){const me=ee.getPageIndex(((ge=te.getPage())===null||ge===void 0?void 0:ge.slides[0].index)||0);me>-1&&ee.goTo(me,{tween:!1,transition:!1}),fe()}}function be(ge,me){ee&&te&&(ee.filter(me),le())}function fe(){var ge,me,pe;if(!te)return;const ke=((me=(ge=te.getPage())===null||ge===void 0?void 0:ge.slides[0])===null||me===void 0?void 0:me.index)||0;for(const ve of(ee==null?void 0:ee.getSlides())||[])(pe=ve.el)===null||pe===void 0||pe.classList.toggle("is-selected",ve.index===ke)}return{init:function(ge){ee=ge,ee.on("initSlides",re)},destroy:function(){var ge;ee==null||ee.off("ready",oe),ee==null||ee.off("refresh",ue),ee==null||ee.off("change",ie),ee==null||ee.off("click",ce),(ge=ee==null?void 0:ee.getViewport())===null||ge===void 0||ge.removeEventListener("mouseover",de),te==null||te.off("change",le),te==null||te.off("filter",be),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,be=de.dataset.lazySrcset,fe=de.dataset.lazySizes,ge=de.dataset.lazyBg,me=(de instanceof HTMLImageElement||de instanceof HTMLSourceElement)&&(ue||be),pe=de instanceof HTMLElement&&ge;if(!me&&!pe)continue;const ke=ue||be||ge;if(ke){if(me&&ke){const ve=(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)),ve||ee==null||ee.emit("lazyLoad:loaded",re,de,ke)}),de.addEventListener("error",()=>{ee==null||ee.hideLoading(re),s$9(de,n$6),s$a(de,l$7),ve||ee==null||ee.emit("lazyLoad:error",re,de,ke)}),de.classList.add("f-lazyload"),de.classList.add(n$6),ve||ee==null||ee.emit("lazyLoad:load",re,de,ke),ue&&(de.src=ue),be&&(de.srcset=be),fe&&(de.sizes=fe)}else pe&&(document.body.contains(de)||(document.createElement("img").src=ge),de.style.backgroundImage=`url('${ge}')`);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,be=!1;for(const ve of ee.getSlides())ve.panzoomRef&&(ue=!0),(ve.downloadSrc||ve.type==="image"&&ve.src)&&(be=!0);const fe=((re=ee.getPlugins().Thumbs)===null||re===void 0?void 0:re.isEnabled())||!1,ge=de&&ee.getPlugins().Autoplay||!1,me=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"),ke=r$5({},s$4,ne("items"));for(const ve of["left","middle","right"]){const _e=pe[ve]||[],$e=document.createElement("div");$e.classList.add("f-carousel__toolbar__column"),$e.classList.add(`is-${ve}`);for(const ye of _e){let Ee;if(t$9(ye)){if(ye==="counter"&&!de||ye==="autoplay"&&!ge||v$5[ye]&&!ue||ye==="fullscreen"&&!me||ye==="thumbs"&&!fe||ye==="download"&&!be)continue;Ee=ke[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",Ae=>{Ae.preventDefault(),Ae.stopPropagation(),typeof Ee.click=="function"&&ee&&Ee.click(ee,Ae)}),$e.append(Le))}}te.append($e)}if(te.childElementCount){if(ce&&te.classList.add("is-absolute"),!te.parentElement){const ve=ne("parentEl");ve?ve.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 Ae of Le)if(Ae.state===0)return!0;return!1}())return;(function(){var Se,Le,Ae,De;if(!ee||(be(),!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=((Ae=ee.getPages()[0])===null||Ae===void 0?void 0:Ae.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 Ie=ie("timeout")||1e3;oe.style.animationDuration=`${Ie}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",ve);const Se=ee==null?void 0:ee.getContainer();Se&&ie("pauseOnHover")&&matchMedia("(hover: hover)").matches&&(Se.addEventListener("mouseenter",_e,!1),Se.addEventListener("mouseleave",$e,!1)),ee.on("change",pe),ee.on("settle",ke),ee.on("contentReady",ge),ee.on("panzoom:touchStart",ue),ee.on("panzoom:wheel",ue),ee.isSettled()&&ce()}function ue(){var Ee;if(le(),be(),ee){if(ne){ee.emit("autoplay:end"),(Ee=ee.getTween())===null||Ee===void 0||Ee.off("start",ve);const Se=ee.getContainer();Se&&(Se.classList.remove("has-autoplay"),Se.removeEventListener("mouseenter",_e,!1),Se.removeEventListener("mouseleave",$e,!1))}ee.off("change",pe),ee.off("settle",ke),ee.off("contentReady",ge),ee.off("panzoom:touchStart",ue),ee.off("panzoom:wheel",ue)}ne=!1,ae=!1}function be(){oe&&(oe.remove(),oe=null)}function fe(){ee&&ee.getPages().length>1&&ie("autoStart")&&de()}function ge(){ce()}function me(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():(be(),le())}function ke(){ce()}function ve(){le(),be()}function _e(){re=!0,ne&&(be(),le())}function $e(){re=!1,ne&&!ae&&(ee!=null&&ee.isSettled())&&ce()}const ye={init:function(Ee){ee=Ee,ee.on("ready",fe),ee.on("click",me)},destroy:function(){ue(),ee==null||ee.off("ready",fe),ee==null||ee.off("click",me),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 be(){return ce("type")==="scrollable"}function fe(){const Ve=[],Ne=(ee==null?void 0:ee.getSlides())||[];for(const Pe of Ne)Ve.push({index:Pe.index,class:Pe.thumbClass,html:ge(Pe)});return Ve}function ge(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 me(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 Me=Pe.nextElementSibling;Me!=null&&Me.classList.contains(Be.container)&&(ne=Me)}if(!ne){ne=document.createElement("div");const Me=ce("parentEl");Me?Me.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 ke(){if(!ne||!be())return;ae=document.createElement("div"),s$a(ae,"f-thumbs__viewport");let Ve="";for(const Ne of fe())typeof(Ne.html||"")=="string"&&(Ve+=me(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 ve(){var Ve;if(!a$5||!ee||!ne||be()||te)return;const Ne=fe();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 Me=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")}(),Me=4*(oe-ie)),Be&&Be.getTotalSlideDim()<=Be.getViewportDim()-Me?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,Me)=>{const xe=Me.target;if(xe){const Ce=xe.matches("button")?xe:xe.firstElementChild;Ce&&Ce.matches("button")&&(Me.preventDefault(),Ce.focus({preventScroll:!0}))}}),s$a(ee.getContainer(),"has-thumbs"),ze()}function _e(){de()&&ce("showOnStart")&&(pe(),ke())}function $e(){var Ve;de()&&(ve(),ee==null||ee.on("addSlide",Le),ee==null||ee.on("removeSlide",Ae),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),Ie(!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(),Me=ee.getPageIndex()||0,xe=ee.getPageProgress()||0;if(!(ee&&Be&&Be[Me]&&Pe))return;const Ce=Pe.isRunning()?Pe.getCurrentValues().pos:te.getPosition();if(Ce===void 0)return;let Fe=Be[Me].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,Ie()}function Le(Ve,Ne){const Pe={html:ge(Ne)};if(te)te.add(Pe,Ne.index);else if(ae){const Be=e$9(me(Pe));if(Be){ae.append(Be);const Me=Be.querySelector("img");Me&&(re==null||re.observe(Me))}}}function Ae(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),ke(),ve()),ne&&ne.classList.toggle("is-hidden"))}function Oe(){Ie()}function Ie(Ve=!1){if(!ee||!ae||!be())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(),Me=Pe.getBoundingClientRect(),xe=Pe.offsetTop-ae.offsetTop-.5*Be.height+.5*Me.height,Ce=Pe.scrollLeft-ae.scrollLeft-.5*Be.width+.5*Me.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 Me=ee.getPageProgress(Pe.index)||0;Me=Math.max(-1,Math.min(1,Me)),Me>-1&&Me<1&&(Ne+=.5*oe*(1-Math.abs(Me))),Me=Math.round(1e4*Me)/1e4,Ne=Math.round(1e4*Ne)/1e4,Be.style.setProperty("--progress",`${Math.abs(Me)}`),Be.style.setProperty("--shift",`${ee!=null&&ee.isRTL()?-1*Ne:Ne}px`),Me>-1&&Me<1&&(Ne+=.5*oe*(1-Math.abs(Me)))}}return{init:function(Ve,Ne){a$5=Ne,ee=Ve,ee.on("ready",$e),ee.on("initSlides",_e),ee.on("change",Se)},destroy:function(){var Ve,Ne;be()&&(ee==null||ee.emit("thumbs:destroy")),ee==null||ee.off("ready",$e),ee==null||ee.off("initSlides",_e),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 be=ee==null?void 0:ee.getOptions().Html;return t$7(be)?Object.assign(Object.assign({},a$4),be):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}}">
@@ -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]=be=>oe.value=be),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]=be=>oe.value=be),placeholder:re.placeholder},null,10,_hoisted_7$J)),[[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$I={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},be=()=>{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}},fe=e$b.computed(()=>ne.multiple?Array.isArray(ne.modelValue)&&ne.modelValue.length>0:ne.options.some($e=>$e.value===ne.modelValue)),ge=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}),me=e$b.computed(()=>ne.iconPlaceholder||ne.icon||null);e$b.watch(re,async $e=>{$e&&(await e$b.nextTick(),be(),requestAnimationFrame(be))});const pe=[];e$b.onMounted(()=>{if(document.addEventListener("mousedown",de),ne.teleportTo||ne.overlay){const $e=()=>{re.value&&be()};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 ke=$e=>ne.multiple&&Array.isArray(ne.modelValue)?ne.modelValue.includes($e):ne.modelValue===$e,ve=$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},_e=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",fe.value?"":"opacity-80"])},[fe.value&&ge.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"flex-shrink-0",innerHTML:ge.value},null,8,_hoisted_1$1s)):!fe.value&&me.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"flex-shrink-0",innerHTML:me.value},null,8,_hoisted_2$1f)):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_3$16,e$b.toDisplayString(_e.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([ke(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=>ve(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$I,e$b.toDisplayString(Ee.name),1)]),ke(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([ke(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=>ve(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)]),ke(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([ke(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=>ve(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)]),ke(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$H={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$H,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$G={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$G,[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$F={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=Re(lt),je=Re(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),be=e$b.ref(null),fe=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&&lt.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 ge(lt){var it;return((it=lt==null?void 0:lt.product)==null?void 0:it.id)??(lt==null?void 0:lt.id)}const me=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=ge(it);gt!=null&&(lt[gt]=it.quantity)}),lt}),pe=lt=>me.value[lt.id]||0,ke=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=ge(it);gt!=null&&(lt[gt]=it.discount||0)}),lt}),ve=lt=>ke.value[lt.id]||0,_e=(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||Re(lt)||!lt.discountable)return;const gt=lt.max_discount||100,Et=_e(it,gt),mt=ce.value.find(je=>ge(je)===lt.id);mt&&(mt.discount=Et)},ye=(lt,it)=>{if(ne.readonly||Re(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=ve(lt);Ze.value[it]=String(je);return}const Et=lt.max_discount||100,mt=_e(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},Ae=lt=>{const it=lt.id;return Xe.value[it]?(Ze.value[it]??String(ve(lt))).replace(".",","):String(ve(lt)).replace(".",",")},De=lt=>{if(ne.readonly||Re(lt))return;const it=ce.value.find(gt=>ge(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||Re(lt))return;const it=ce.value.find(gt=>ge(gt)===lt.id);it&&(it.quantity>0?it.quantity--:it.quantity=0)},Ie=(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(Ie(crm_products,{page:de.value,...lt})),{results:gt,next:Et,previous:mt}=it;if(ue.value=Et,be.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=>ge(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=ge(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=ge(lt);it&&!Ze.value[it]&&(Ze.value[it]=String(lt.discount||0))})}let Be=!1;async function Me(){var it;if(Be)return;Be=!0;const lt=Array.isArray(ne.allProducts)?ne.allProducts:(it=ne.allProducts)==null?void 0:it.results;lt&&lt.length>0?(oe.value=lt,ue.value=!Array.isArray(ne.allProducts)&&ne.allProducts.next||null,be.value=!Array.isArray(ne.allProducts)&&ne.allProducts.previous||null,de.value=2):await Ve(),Ne(),Pe()}e$b.onMounted(Me),e$b.watch(ie,lt=>{lt.forEach(it=>{if(it&&it.id&&!Ze.value[it.id]){const gt=ce.value.find(mt=>ge(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=ge(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 Re=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,[fe.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(fe.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$F,[(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:ge(je),item:je,getProductId:ge},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},[Re(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:ve(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:Re(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:Re(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:Ae(mt),onInput:Qe=>ye(mt,Qe),onFocus:Qe=>Se(mt,Qe),onBlur:()=>Le(mt),inputmode:"decimal",type:"text",disabled:!mt.discountable||Re(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 fe=e$b.unref(ce);return fe!=null?!!fe:!!(le!=null&&le.smPlayEnabled)}),ue=e$b.computed(()=>te.variant==="auto"?de.value:te.variant==="pixel"),be=e$b.computed(()=>ae.value==="xs"?"sm":ae.value);return(fe,ge)=>(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:be.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$E=["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(ke){return JSON.parse(JSON.stringify(ke))}function ce(ke){if(typeof ke=="boolean")return ke;if(typeof ke=="number")return ke===1;if(typeof ke=="string"){const ve=ke.trim().toLowerCase();if(["true","1","yes","y","sim"].includes(ve))return!0;if(["false","0","no","n","nao","não"].includes(ve))return!1}return!1}function de(ke){Array.isArray(ke)&&ke.forEach(ve=>{(ve==null?void 0:ve.type)==="bool"&&(ve.content=ce(ve.content))})}function ue(ke){return ke!=null&&String(ke).trim()!==""}function be(ke){return ke==="string"?"texto":ke==="float"?"número":ke==="list"?"lista":"Desconhecido"}function fe(ke){if(!ke)return;ke.style.height="auto";const ve=parseFloat(window.getComputedStyle(ke).minHeight)||0;ke.style.height=`${Math.max(ke.scrollHeight,ve)}px`}function ge(ke){fe(ke==null?void 0:ke.target)}function me(){ie.value&&ie.value.querySelectorAll("textarea.floating-textarea").forEach(ke=>fe(ke))}const pe=async()=>{try{oe.value=!0;const ke=await api.get(segmentation_field);re.value=ke.data,de(re.value),await e$b.nextTick(),me()}catch(ke){console.error("Error fetching segmentation fields:",ke)}finally{oe.value=!1}};return e$b.onMounted(()=>{ne.modelValue.length===0&&pe(),de(re.value),e$b.nextTick(me)}),e$b.watch(()=>ne.modelValue,ke=>{re.value=le(ke),de(re.value),e$b.nextTick(me)},{deep:!0}),e$b.watch(re,ke=>{JSON.stringify(ke)!==JSON.stringify(ne.modelValue)&&ae("update:modelValue",le(ke))},{deep:!0}),(ke,ve)=>{const _e=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},[ve[0]||(ve[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:be($e.type)},e$b.toDisplayString($e.name),9,_hoisted_6$J),e$b.createVNode(_e,{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:ge},null,40,_hoisted_7$E)),[[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:be($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,[...ve[1]||(ve[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$D={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 be=e$b.computed(()=>!!de.value),fe=e$b.computed(()=>!ne.currentAttendance),ge=e$b.computed(()=>{var qe;return((qe=ne.loggedAttendant)==null?void 0:qe.name)||"Atendente não encontrado"}),me=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)),ke=e$b.computed(()=>de.value&&re.departments.find(qe=>String(qe.id)===String(de.value))||null),ve=e$b.computed(()=>{var qe;return((qe=ke.value)==null?void 0:qe.wallets_enabled)===!0}),_e=e$b.computed(()=>{var qe;return be.value?de.value:((qe=pe.value[0])==null?void 0:qe.id)??null}),$e=e$b.computed(()=>fe.value?!0:ne.isDepartmentSupervisor(_e.value)),ye=e$b.computed(()=>{const qe=_e.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(()=>!be.value&&!_e.value),Ae=e$b.computed(()=>$e.value?ie.value[0]??null:ne.loggedAttendant),De=e$b.computed(()=>{var qe;return((qe=Ae.value)==null?void 0:qe.id)??null}),Oe=e$b.computed(()=>String(De.value)===String(ne.loggedAttendantId)),Ie=e$b.computed(()=>$e.value?"Neste fluxo, você pode atribuir qualquer atendente do departamento selecionado.":_e.value&&!ne.hasDepartmentMembership(_e.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||!Ae.value||!_e.value)return!1;const qe=(Ze=Ae.value)==null?void 0:Ze.id,Ge=_e.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(!be.value)return;const qe=ke.value;le.value=qe?[qe]:[]},Me=()=>{$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}Me()},Re=async()=>{var Xe,Ue,at;if(!Ne.value||!ne.contactId)return;const qe=(Xe=Ae.value)==null?void 0:Xe.id,Ge=_e.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(),Me();return}Pe()}),e$b.watch(()=>[de.value,re.departments.length],()=>{Be()}),e$b.watch(()=>[$e.value,ne.loggedAttendantId,ne.loggedAttendant],()=>{Me()}),(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(be.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$$,[be.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))])):fe.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$D,[be.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("label",_hoisted_8$y," Departamento (com carteiras habilitadas) ")),be.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:me.value,disabledReason:"Carteiras não habilitadas",onDepart:Fe},null,8,["disabledItems"])),!be.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)]),be.value&&!ve.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(ge.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(Ie.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:Re},[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$C=["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 ke=new Date(pe);return Number.isNaN(ke.getTime())?null:new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(ke)};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}),be=e$b.ref(!1),fe=()=>{!de.value||ne.isRemoving||(be.value=!0)},ge=()=>{ne.isRemoving||(be.value=!1)},me=()=>{!de.value||ne.isRemoving||(be.value=!1,ae("remove",ne.wallet))};return(pe,ke)=>(e$b.openBlock(),e$b.createElementBlock("article",{class:e$b.normalizeClass(ue.value)},[e$b.createElementVNode("header",_hoisted_1$1j,[ke[0]||(ke[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)]),ke[8]||(ke[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$C),ke[1]||(ke[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:fe},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(()=>[be.value?(e$b.openBlock(),e$b.createBlock(MinModal,{key:0,defineWidth:"max-w-sm",onClose:ge},{header:e$b.withCtx(()=>[...ke[2]||(ke[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,[ke[7]||(ke[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,[ke[6]||(ke[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,[ke[3]||(ke[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,[ke[5]||(ke[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),ke[4]||(ke[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:ge}," 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:me},[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$B={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}),be=e$b.computed(()=>{var Be;return((Be=ue.value)==null?void 0:Be.id)??null}),fe=e$b.computed(()=>{var Be;return Array.isArray((Be=ue.value)==null?void 0:Be.department)?ue.value.department:[]}),ge=Be=>!Be||!be.value?null:fe.value.find(Me=>String(Me==null?void 0:Me.id)===String(Be))||null,me=Be=>!!ge(Be),pe=Be=>{var Me;return((Me=ge(Be))==null?void 0:Me.permission)==="supervisor"},ke=e$b.computed(()=>!te.currentAttendance),ve=Be=>ke.value||pe(Be),_e=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,Me)=>{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}-${Me}`},ye=Be=>Be?ne.attendants.find(Me=>String(Me.id)===String(Be)):null,Ee=Be=>Be?ae.departments.find(Me=>String(Me.id)===String(Be)):null,Se=()=>{var Be,Me,xe,Ce;return te.currentAttendance&&(((Be=te.currentAttendance)==null?void 0:Be.department_id)||((Me=te.currentAttendance)==null?void 0:Me.departmentId)||((Ce=(xe=te.currentAttendance)==null?void 0:xe.department)==null?void 0:Ce.id))||null},Le=()=>{const Be=re.value;if(ke.value)return Be;const Me=Se(),xe=fe.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 Me&&Ce.add(String(Me)),Be.filter(Fe=>Ce.has(String(Fe==null?void 0:Fe.department_id)))}return Me?Be.filter(Ce=>String(Ce==null?void 0:Ce.department_id)===String(Me)):[]},Ae=e$b.computed(()=>Le().map((Be,Me)=>{const xe=Be==null?void 0:Be.attendant_id,Ce=Be==null?void 0:Be.department_id,Fe=ye(xe),Re=Ee(Ce),qe=(Fe==null?void 0:Fe.name)||"Atendente não encontrado",Ge=(Re==null?void 0:Re.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,Me),attendantId:xe,departmentId:Ce,attendantName:qe,attendantPhoto:Ze,departmentName:Ge,updatedAt:Xe,canRemove:ve(Ce)||me(Ce)&&String(xe)===String(be.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 Me=te.contactId;if(!Me){re.value=[],ie.value="",le.value=null;return}if(!(!Be&&le.value===Me&&ie.value===""))try{oe.value=!0,ie.value="";const[,{data:Fe}]=await Promise.all([De(),api.get(contactWalletUrl(Me))]);re.value=_e(Fe),le.value=Me}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}},Ie=Be=>ce.value.includes(Be),ze=(Be,Me)=>{if(Be){if(Me){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 Me=Be==null?void 0:Be.attendant_id,xe=Be==null?void 0:Be.department_id;if(!Me||!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,Re)=>Re===Ce?{...Fe,attendant_id:Me,department_id:xe}:Fe);return}re.value=[...re.value,{attendant_id:Me,department_id:xe}]},Pe=async Be=>{var Fe,Re,qe,Ge;const Me=te.contactId,xe=Be==null?void 0:Be.departmentId,Ce=ve(xe)||me(xe)&&String(Be==null?void 0:Be.attendantId)===String(be.value);if(!(!Me||!xe||Ie(xe)||!Ce))try{ze(xe,!0),ie.value="";const Ze=contactWalletUrl(Me),Xe={department_id:xe,attendant_id:null};try{await api.post(Ze,Xe)}catch(Ue){ie.value=((Re=(Fe=Ue==null?void 0:Ue.response)==null?void 0:Fe.data)==null?void 0:Re.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,Me])=>{Be==="wallet"&&Me&&Oe()},{immediate:!0}),(Be,Me)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1i,[e$b.createElementVNode("section",_hoisted_2$15,[e$b.createElementVNode("header",_hoisted_3$Z,[Me[5]||(Me[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},[...Me[3]||(Me[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:Me[0]||(Me[0]=xe=>Oe({force:!0}))},[...Me[4]||(Me[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,[...Me[7]||(Me[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,[Me[8]||(Me[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:Me[1]||(Me[1]=xe=>Oe({force:!0}))}," Tentar novamente ")])):Ae.value.length===0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$o,[...Me[9]||(Me[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(Ae.value,xe=>(e$b.openBlock(),e$b.createBlock(WalletCard,{key:xe.id,wallet:xe,"is-removing":Ie(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$B,[...Me[6]||(Me[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":Me[2]||(Me[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":be.value,"has-department-membership":me,"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$A={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=(ke,ve)=>{const _e=(ve==null?void 0:ve.number)||ke||"",$e=String(_e).replace(/[^\d\s()-]/g,"");ae.value=$e},de=useWhatsappBindings(()=>te.contact),ue=useInstagramBindings(()=>te.contact),be=useTelegramBindings(()=>te.contact),fe=useWebchatBindings(()=>te.contact),ge=useHasContactBindings(de,ue,be,fe),me=e$b.computed(()=>{var ke;return((ke=be.value[0])==null?void 0:ke.user_name)||""}),pe=e$b.ref(!1);return(ke,ve)=>{const _e=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":ve[0]||(ve[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,[ve[19]||(ve[19]=e$b.createElementVNode("p",{class:"text-xs font-semibold"},"Contatos",-1)),e$b.unref(ge)?(e$b.openBlock(),e$b.createBlock(_e,{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,[ve[7]||(ve[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:ve[1]||(ve[1]=e$b.withModifiers(ye=>pe.value=!0,["stop"]))}," ? ")]),e$b.unref(de).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_5$K,[ve[9]||(ve[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$A,[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,[ve[8]||(ve[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,[...ve[10]||(ve[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)])])),ve[11]||(ve[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,[ve[12]||(ve[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(be).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(be).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_23$3,[ve[14]||(ve[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(be),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,[ve[13]||(ve[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(fe).length&&(e$b.unref(de).length||e$b.unref(ue).length||e$b.unref(be).length)?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_30$1)):e$b.createCommentVNode("",!0),e$b.unref(fe).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,[...ve[15]||(ve[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)])])),ve[16]||(ve[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(fe),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,[ve[17]||(ve[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(()=>[ve[18]||(ve[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,[ve[20]||(ve[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:ve[2]||(ve[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,[ve[21]||(ve[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),me.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_43,[ve[22]||(ve[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":me.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":ve[3]||(ve[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":ve[4]||(ve[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":ve[6]||(ve[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(()=>[...ve[23]||(ve[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:ve[5]||(ve[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,ke=>{re.value=ke});const ce=e$b.computed(()=>oe.value||re.value);function de(ke){const ve=ce.value,_e=(ke-1)*ne.starWeight,$e=ke*ne.starWeight;return ve>=$e?"100%":ve<=_e?"0%":`${(ve-_e)/ne.starWeight*100}%`}function ue(ke,ve){const _e=ke.currentTarget.getBoundingClientRect(),$e=ke.offsetX<_e.width/2;oe.value=(ve-1)*ne.starWeight+($e?ne.starWeight/2:ne.starWeight)}function be(ke,ve){const _e=ke.currentTarget.getBoundingClientRect(),$e=ke.offsetX<_e.width/2,ye=(ve-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 fe(){ne.readonly||(ie.value=!0)}function ge(){ie.value=!1,oe.value=0}function me(ke){if(!ie.value||!le.value||ne.readonly)return;const ve=ke.touches[0],_e=le.value.getBoundingClientRect(),$e=ve.clientX-_e.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(),Ae=ve.clientX-Le.left<Le.width/2;oe.value=(Ee-1)*ne.starWeight+(Ae?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(ke,ve)=>(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:ve[1]||(ve[1]=_e=>!ne.readonly&&(oe.value=0)),onTouchstartPassive:fe,onTouchmovePassive:me,onTouchendPassive:pe,onTouchcancelPassive:ge},[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,_e=>e$b.createElementVNode("div",{key:_e,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,_e),onMouseleave:ve[0]||(ve[0]=$e=>!ne.readonly&&(oe.value=0)),onClick:$e=>!ne.readonly&&be($e,_e)},[(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`})},[...ve[2]||(ve[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(_e),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`})},[...ve[3]||(ve[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$z={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"],HIDDEN_INSTANCES_HINT="Instâncias de Webchat, de API oficial ou desconectadas não aparecem aqui.",_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=["webchat","whatsapp-api-official"],ie=e$b.ref(!1),le=e$b.ref(!1),ce=e$b.ref(null),de=e$b.computed(()=>!!ne.contactId&&!ie.value),ue=()=>{de.value&&(le.value=!le.value,le.value||(ce.value=null))},be=async()=>{try{const{data:ge}=await api.get(`${contact_url}${ne.contactId}/`);return(ge==null?void 0:ge.photo)||null}catch{return null}},fe=async()=>{var ge,me,pe;if(!(!de.value||!ce.value)){ie.value=!0;try{const{data:ke}=await api.post(contactRefreshAvatarUrl(ne.contactId),{instance:ce.value.id}),ve=(ke==null?void 0:ke.photo)||((ge=ke==null?void 0:ke.contact)==null?void 0:ge.photo)||await be();ve&&ae("update:photo",ve),ae("photo-refresh",{ok:!0,title:"Foto atualizada",message:(ke==null?void 0:ke.message)||"A foto de perfil do contato foi atualizada com sucesso."}),le.value=!1,ce.value=null}catch(ke){ae("photo-refresh",{ok:!1,title:"Erro ao atualizar",message:((pe=(me=ke==null?void 0:ke.response)==null?void 0:me.data)==null?void 0:pe.message)||"Não foi possível atualizar a foto de perfil do contato."})}finally{ie.value=!1}}};return(ge,me)=>{const pe=e$b.resolveComponent("Popper"),ke=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(pe,{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$z,[...me[3]||(me[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,[...me[4]||(me[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(pe,{hover:"",content:"Atualizar foto de perfil",placement:"right",arrow:""},{content:e$b.withCtx(()=>[...me[5]||(me[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:!de.value,class:e$b.normalizeClass(["refresh-avatar-button transition-all duration-200",[de.value?"refresh-avatar-button-unblocked":"refresh-avatar-button-blocked",de.value?"lock-button-enabled":"lock-button-disabled",{"refresh-avatar-button-active":le.value}]]),onClick:ue},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4 text-blue-200",{"animate-spin":ie.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...me[6]||(me[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":me[0]||(me[0]=ve=>ge.$emit("update:outcome",ve))},null,8,["outcome"]),e$b.createElementVNode("div",_hoisted_12$k,[me[7]||(me[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":me[1]||(me[1]=ve=>ge.$emit("update:rating",ve))},null,8,["model-value"])])])):e$b.createCommentVNode("",!0)],2),e$b.createVNode(e$b.Transition,{name:"instance-panel"},{default:e$b.withCtx(()=>[le.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$i,[e$b.createElementVNode("header",{class:"instance-panel-header"},[me[9]||(me[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:ue},[...me[8]||(me[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(ke,{modelValue:ce.value,"onUpdate:modelValue":me[2]||(me[2]=ve=>ce.value=ve),type_deny_list:oe,hint:HIDDEN_INSTANCES_HINT,only_connected:""},null,8,["modelValue"]),me[11]||(me[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:ue},"Cancelar"),e$b.createElementVNode("button",{type:"button",class:"instance-panel-button instance-panel-button--confirm",disabled:!ce.value||ie.value,onClick:fe},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4",{"animate-spin":ie.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...me[10]||(me[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(ie.value?"Atualizando":"Atualizar"),1)],8,_hoisted_15$f)])])):e$b.createCommentVNode("",!0)]),_:1})])}}},ClientOverviewPanel=_export_sfc$1(_sfc_main$1l,[["__scopeId","data-v-c222083d"]]),_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$y={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 be=e$b.computed(()=>{var Ce;return Array.isArray((Ce=ne.contact)==null?void 0:Ce.products)&&ne.contact.products.length>0}),fe=e$b.computed(()=>{var Ce,Fe,Re;return((Ce=ne.contact)==null?void 0:Ce.rating)!==null&&((Fe=ne.contact)==null?void 0:Fe.rating)!==void 0&&((Re=ne.contact)==null?void 0:Re.rating)!==""}),ge=e$b.computed(()=>{var Ce;return ie((Ce=ne.contact)==null?void 0:Ce.telephone)}),me=e$b.computed(()=>{var Re,qe;const Ce=oe((Re=ne.contact)==null?void 0:Re.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?me.value:((Ce=ne.contact)==null?void 0:Ce.name)||"Sem nome"});e$b.computed(()=>{var Re,qe;const Ce=oe((Re=ne.contact)==null?void 0:Re.name),Fe=oe((qe=ne.contact)==null?void 0:qe.telephone);return le.value&&ne.viewNumberPermission&&!!Ce&&!!Fe});const ke=e$b.computed(()=>!le.value&&ne.selectable?"button":"div"),ve=e$b.computed(()=>Ve.value||Ne.value||Pe.value),_e=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"),ve.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:_e.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"),Ae=()=>{!le.value&&ne.selectable&&ae("select",ne.contact)},De=useWhatsappBindings(()=>ne.contact),Oe=useInstagramBindings(()=>ne.contact),Ie=useTelegramBindings(()=>ne.contact),ze=useHasContactBindings(De,Oe,Ie),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},Me=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 Re=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(ke.value),{class:e$b.normalizeClass(ye.value),title:Ee.value,onClick:Ae,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(ge.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(Re,{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$y,[(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(Re,{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:Me},[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(Ie).length?(e$b.openBlock(),e$b.createBlock(Re,{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(Ie),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(Ie).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,[be.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),fe.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$x={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(fe=>{const ge=re(ce[fe.key]),me=re(de[fe.key]),pe=re(ue[fe.key]),ke=fe.key==="telephone"?oe(ge):ge.toLowerCase(),ve=fe.key==="telephone"?oe(me):me.toLowerCase(),_e=fe.key==="telephone"?oe(pe):pe.toLowerCase(),$e=ke===_e&&ge,ye=ve===_e&&me&&!$e,Ee=$e?me:ye?ge:null,Se=fe.format||(Le=>Le);return{key:fe.key,label:fe.label,finalValue:pe?Se(pe):null,discardedValue:Ee&&Ee!==pe?Se(Ee):null,fromChild:ye,hasChange:ke!==ve}}).filter(fe=>fe.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$x,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 ge,me;const ie=((ge=ne.parentContact)==null?void 0:ge.products)||[],le=((me=ne.childContact)==null?void 0:me.products)||[],ce=new Set(ie.map(pe=>{var ke;return((ke=pe.product)==null?void 0:ke.id)||pe.id})),de=ie,ue=le.filter(pe=>{var ke;return!ce.has(((ke=pe.product)==null?void 0:ke.id)||pe.id)}),be=ue.length>0,fe=ie.length+ue.length;return{hasChanges:be,keptFromParent:de,incorporatedFromChild:ue,total:fe}});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$w={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 be=oe(ue.content).toLowerCase();return be?be==="true"?"true":"false":""}return ue.type==="list"&&Array.isArray(ue.content)?ue.content.map(be=>oe(be)).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 ke,ve;const ue=((ke=ne.parentContact)==null?void 0:ke.segmentation_fields)||[],be=((ve=ne.childContact)==null?void 0:ve.segmentation_fields)||[],fe=new Map(ue.map(_e=>[_e.id,_e])),ge=new Map(be.map(_e=>[_e.id,_e])),me=new Set([...fe.keys(),...ge.keys()]),pe=[];return me.forEach(_e=>{const $e=fe.get(_e),ye=ge.get(_e),Ee=le($e),Se=le(ye),Le=!ie($e==null?void 0:$e.content),Ae=!ie(ye==null?void 0:ye.content);if(Ee!==Se&&(Le||Ae)){const De=Le||!Ae?$e:ye,Oe=!Le&&Ae,Ie=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:Ie,discardedValue:Ve,incorporatedFromChild:!!Oe})}}),{hasChanges:pe.length>0,changes:pe}});return e$b.watchEffect(()=>{ae("changes-count",de.value.changes.length)}),(ue,be)=>de.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$15,[e$b.createElementVNode("div",_hoisted_2$X,[be[2]||(be[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)),be[3]||(be[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:be[0]||(be[0]=fe=>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"},[...be[1]||(be[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,fe=>(e$b.openBlock(),e$b.createElementBlock("div",{key:fe.id,class:"segmentation-change-item"},[e$b.createElementVNode("span",_hoisted_5$G,e$b.toDisplayString(fe.name),1),e$b.createElementVNode("div",_hoisted_6$B,[e$b.createElementVNode("span",_hoisted_7$w,[be[4]||(be[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(fe.finalValue)+" ",1),fe.incorporatedFromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$s," incorporado ")):e$b.createCommentVNode("",!0)]),fe.discardedValue?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$p,[be[5]||(be[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(fe.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 ge,me;const ie=((ge=ne.parentContact)==null?void 0:ge.tags)||[],le=((me=ne.childContact)==null?void 0:me.tags)||[],ce=new Set(ie.map(pe=>pe.id)),de=ie,ue=le.filter(pe=>!ce.has(pe.id)),be=ue.length>0,fe=ie.length+ue.length;return{hasChanges:be,keptFromParent:de,incorporatedFromChild:ue,total:fe}});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$v={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 ke,ve,_e,$e,ye,Ee,Se,Le,Ae,De,Oe,Ie,ze,Ve,Ne,Pe;const fe=te.mergePreview||{name:((ke=te.parentContact)==null?void 0:ke.name)||((ve=te.childContact)==null?void 0:ve.name),telephone:((_e=te.parentContact)==null?void 0:_e.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)},ge=[...((Ae=te.parentContact)==null?void 0:Ae.whatsapp_infos)||[],...((De=te.childContact)==null?void 0:De.whatsapp_infos)||[]],me=[...((Oe=te.parentContact)==null?void 0:Oe.instagram_infos)||[],...((Ie=te.childContact)==null?void 0:Ie.instagram_infos)||[]],pe=[...((ze=te.parentContact)==null?void 0:ze.telegram_infos)||[],...((Ve=te.childContact)==null?void 0:Ve.telegram_infos)||[]];return{...fe,photo:fe.photo||((Ne=te.parentContact)==null?void 0:Ne.photo)||((Pe=te.childContact)==null?void 0:Pe.photo),whatsapp_infos:ge,instagram_infos:me,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 _e,$e,ye,Ee,Se,Le;const fe=(((_e=te.parentContact)==null?void 0:_e.whatsapp_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`pwa-${De}`,platform:"whatsapp",instanceName:Ae.instance,userName:Ae.whatsapp_user_name||"",fromChild:!1})),ge=((($e=te.childContact)==null?void 0:$e.whatsapp_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`cwa-${De}`,platform:"whatsapp",instanceName:Ae.instance,userName:Ae.whatsapp_user_name||"",fromChild:!0})),me=(((ye=te.parentContact)==null?void 0:ye.instagram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`pig-${De}`,platform:"instagram",instanceName:Ae.instance,userName:Ae.instagram_user_name||"",fromChild:!1})),pe=(((Ee=te.childContact)==null?void 0:Ee.instagram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`cig-${De}`,platform:"instagram",instanceName:Ae.instance,userName:Ae.instagram_user_name||"",fromChild:!0})),ke=(((Se=te.parentContact)==null?void 0:Se.telegram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`ptg-${De}`,platform:"telegram",instanceName:Ae.instance,userName:Ae.telegram_user_name||"",fromChild:!1})),ve=(((Le=te.childContact)==null?void 0:Le.telegram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`ctg-${De}`,platform:"telegram",instanceName:Ae.instance,userName:Ae.telegram_user_name||"",fromChild:!0}));return[...fe,...ge,...me,...pe,...ke,...ve]}),ue=e$b.computed(()=>de.value.filter(fe=>fe.fromChild).length),be=e$b.computed(()=>ae.value+re.value+oe.value+ie.value+ue.value);return(fe,ge)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("section",_hoisted_1$13,[e$b.createElementVNode("header",_hoisted_2$V,[ge[8]||(ge[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)),be.value>0?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$P,e$b.toDisplayString(be.value)+" alteraç"+e$b.toDisplayString(be.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:ge[0]||(ge[0]=me=>ae.value=me)},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:ge[2]||(ge[2]=me=>le.value=!le.value)},[e$b.createElementVNode("div",_hoisted_5$E,[ge[10]||(ge[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$v,[e$b.createElementVNode("button",{class:"connections-help-btn",type:"button",onClick:ge[1]||(ge[1]=e$b.withModifiers(me=>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"},[...ge[9]||(ge[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,me=>(e$b.openBlock(),e$b.createElementBlock("div",{key:me.id,class:e$b.normalizeClass(["connection-result-item",{"connection-result-item--new":me.fromChild}])},[e$b.createElementVNode("div",_hoisted_9$o,[me.platform==="whatsapp"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_10$l,[...ge[11]||(ge[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)])])):me.platform==="instagram"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_11$k,[...ge[12]||(ge[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,[...ge[13]||(ge[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(me.instanceName),1),e$b.createElementVNode("div",_hoisted_14$f,[me.fromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_15$d,"incorporado")):e$b.createCommentVNode("",!0),me.userName?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$c,e$b.toDisplayString(me.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:ge[3]||(ge[3]=me=>re.value=me)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1f,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:ge[4]||(ge[4]=me=>oe.value=me)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1e,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:ge[5]||(ge[5]=me=>ie.value=me)},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":ge[7]||(ge[7]=me=>ce.value=me),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(()=>[...ge[14]||(ge[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:ge[6]||(ge[6]=me=>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),be=extractLid(te.whatsapp_id);let fe=null;return ie&&le&&(fe=compareTelephones(re,oe),fe.isCompatible?fe.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&&be&&ue!==be&&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&&be&&ue===be&&ae.push("whatsapp_lid"),{canMerge:ne.length===0,reasons:ne,mergeableFields:ae,phoneComparison:fe}},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 be=Array.from(ue.values()),fe=ee.products||[],ge=te.products||[],me=new Map;fe.forEach(ye=>me.set(ye.id,ye)),ge.forEach(ye=>{me.has(ye.id)||me.set(ye.id,ye)});const pe=Array.from(me.values()),ke=ee.segmentation_fields||[],ve=te.segmentation_fields||[],_e=new Map;ke.forEach(ye=>_e.set(ye.id,{...ye})),ve.forEach(ye=>{if(_e.has(ye.id)){const Ee=_e.get(ye.id),Se=normalizeString(Ee.content),Le=normalizeString(ye.content);!Se&&Le&&_e.set(ye.id,{...Ee,content:ye.content,content_id:ye.content_id})}else _e.set(ye.id,{...ye})});const $e=Array.from(_e.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:be,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=(ge={})=>{const me=new URLSearchParams;return Object.entries(ge).forEach(([pe,ke])=>{ke!=null&&ke!==""&&me.append(pe,ke)}),`${contact_url}?${me.toString()}`},ue=async(ge=!1)=>{const me=++ce;ge&&(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(me!==ce)return;const ke=pe==null?void 0:pe.data,ve=Array.isArray(ke)?ke:Array.isArray(ke==null?void 0:ke.results)?ke.results:[];oe.value=(ke==null?void 0:ke.next)||null;const _e=normalizeString((ee==null?void 0:ee.value)||ee),$e=ve.filter(ye=>{const Ee=normalizeString(ye==null?void 0:ye.id);return Ee&&Ee!==_e});ge||re.value===1?ne.value=$e:ne.value=[...ne.value,...$e]}catch(pe){if(me!==ce)return;console.error("Erro ao buscar contatos:",pe),ne.value=ge?[]:ne.value}finally{me===ce&&(ae.value=!1)}},be=async ge=>{if(!oe.value){ge.complete();return}re.value++;try{await ue(!1),oe.value?ge.loaded():ge.complete()}catch(me){console.error("Erro ao carregar mais contatos:",me),ge.complete()}},fe=()=>{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:be,resetSearch:fe}}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$u={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:be}=useContactSearch(()=>{var Me;return(Me=ne.currentContact)==null?void 0:Me.id}),fe=e$b.ref("select"),ge=e$b.ref(!1),me=e$b.ref(""),pe=e$b.ref(!1),ke=e$b.ref(null),ve=Me=>JSON.parse(JSON.stringify(e$b.toRaw(Me??{}))),_e=Me=>{const xe=ve(Me);return delete xe.__mergeKey,xe},$e=e$b.computed(()=>ne.currentContact),ye=e$b.computed(()=>ke.value),Ee=e$b.computed(()=>!!ke.value),Se=e$b.computed(()=>validateContactMerge($e.value,ye.value)),Le=e$b.computed(()=>generateMergePreview($e.value,ye.value,Se.value.phoneComparison)),Ae=e$b.computed(()=>Ee.value&&Se.value.canMerge),De=e$b.computed(()=>Se.value.canMerge&&pe.value&&!ge.value&&Ee.value),Oe=e$b.computed(()=>oe.value.filter(Me=>{var xe;return Me.id!==((xe=$e.value)==null?void 0:xe.id)})),Ie=()=>{fe.value="select",me.value="",pe.value=!1,ge.value=!1,ke.value=null,be()},ze=({force:Me=!1}={})=>{ge.value&&!Me||(Ie(),ae("close"))},Ve=Me=>{var xe;((xe=ke.value)==null?void 0:xe.id)===Me.id?ke.value=null:ke.value=ve(Me)},Ne=()=>{Ae.value&&(fe.value="confirm")},Pe=()=>{fe.value="select",pe.value=!1,me.value=""},Be=async()=>{if(!De.value)return;const Me={parentId:$e.value.id??null,childId:ye.value.id??null,parentContact:_e($e.value),childContact:_e(ye.value),mergeableFields:[...Se.value.mergeableFields],mergedPreview:Le.value?{...Le.value}:null};try{ge.value=!0,me.value="";let xe=null;if(typeof ne.mergeContacts=="function"){const Ce=await ne.mergeContacts(Me);xe=(Ce==null?void 0:Ce.object)??null}ae("merged",{...Me,contact:xe}),ze({force:!0})}catch(xe){me.value=(xe==null?void 0:xe.message)||"Não foi possível concluir a mesclagem de contatos."}finally{ge.value=!1}};return e$b.watch(()=>ne.isOpen,Me=>{Me&&(Ie(),de(!0))}),(Me,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(fe.value==="select"?"Selecione o contato para mesclar":"Confirme a mesclagem"),1)])]),e$b.createElementVNode("button",{class:"merge-close-btn",disabled:ge.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$u,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:fe.value==="select",completed:fe.value==="confirm"}])},[e$b.createElementVNode("div",_hoisted_8$q,[fe.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:fe.value==="confirm"}])},null,2),e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:fe.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,[fe.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)&&Me.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=ke.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)):fe.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:ge.value,error:me.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,[fe.value==="confirm"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"btn-secondary",disabled:ge.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:ge.value,onClick:ze}," Cancelar ",8,_hoisted_29)),fe.value==="select"?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,class:"btn-primary",disabled:!Ae.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},[ge.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$t={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})}]),be=e$b.computed(()=>re.form.mode==="edit"?"Editar cliente":"Adicionar Novo Cliente"),fe=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 ge=e$b.ref(!1),me=e$b.computed(()=>re.canMergeContacts?oe.id?"ready":"missing-contact-id":"no-permission"),pe=e$b.computed(()=>me.value==="ready"),ke=e$b.computed(()=>me.value==="no-permission"?"Você não tem permissão para mesclar contatos.":me.value==="missing-contact-id"?"Salve o contato para habilitar a mesclagem.":"Mescla contatos para unificar histórico e informações."),ve=()=>{const ze=me.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)},_e=()=>{if(!pe.value){ve();return}ge.value=!0},$e=()=>{ge.value=!1},ye=ze=>{ne("merge",{...ze,removedContactId:ze.childId}),$e()},Ee=async ze=>{var Ve;if(!pe.value)throw ve(),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=fe(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),Ae=()=>{Le.value=window.innerWidth};e$b.onMounted(()=>{window.addEventListener("resize",Ae)}),e$b.onUnmounted(()=>{window.removeEventListener("resize",Ae)});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."}}],Ie=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,Me;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$t,[e$b.createElementVNode("p",_hoisted_8$p,e$b.toDisplayString(be.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:ke.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:_e}," 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:Ie.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(((Me=oe.notes)==null?void 0:Me.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":Ie.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":Ie.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":ge.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,(be,fe)=>(e$b.openBlock(),e$b.createBlock(ue,{key:le(be,fe),hover:"",arrow:"",placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("p",_hoisted_2$R,e$b.toDisplayString(be.name),1)]),default:e$b.withCtx(()=>[e$b.createVNode(TagChip,{tag:be,size:ee.size,variant:ee.variant,removable:ee.removable,"max-width":ee.maxWidth,onRemove:de[0]||(de[0]=ge=>ae("remove",ge))},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,(be,fe)=>(e$b.openBlock(),e$b.createBlock(TagChip,{key:le(be,fe),tag:be,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(),be()}function be(){if(!oe.value||!ie.value)return;const pe=oe.value.getBoundingClientRect(),ke=ie.value.offsetWidth,ve=ie.value.offsetHeight,_e={top:pe.top,bottom:window.innerHeight-(pe.top+pe.height),left:pe.left,right:window.innerWidth-(pe.left+pe.width)};le.value.vertical=_e.bottom<ve&&_e.top>ve?"top":"bottom",le.value.horizontal=_e.right<ke&&_e.left>ke?"left":"right"}function fe(pe){re.value=!0;const ke=pe.type.includes("touch")?pe.touches[0]:pe;ae.value={x:ke.clientX-ne.value.x,y:ke.clientY-ne.value.y},document.addEventListener("mousemove",ge),document.addEventListener("mouseup",me),document.addEventListener("touchmove",ge),document.addEventListener("touchend",me)}function ge(pe){if(!re.value)return;const ke=pe.type.includes("touch")?pe.touches[0]:pe,ve=ke.clientX-ae.value.x,_e=ke.clientY-ae.value.y,$e=window.innerWidth-oe.value.offsetWidth,ye=window.innerHeight-oe.value.offsetHeight;ne.value.x=Math.min(Math.max(0,ve),$e),ne.value.y=Math.min(Math.max(0,_e),ye)}function me(){re.value=!1,document.removeEventListener("mousemove",ge),document.removeEventListener("mouseup",me),document.removeEventListener("touchmove",ge),document.removeEventListener("touchend",me)}return e$b.onBeforeUnmount(me),(pe,ke)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:"floating-widget",style:e$b.normalizeStyle(ce.value),ref_key:"widgetRef",ref:oe,onMousedown:fe,onTouchstart:fe},[e$b.createElementVNode("button",{class:"floating-button",onClick:e$b.withModifiers(ue,["stop"]),"aria-label":"Abrir painel flutuante"},[...ke[0]||(ke[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",{},()=>[ke[1]||(ke[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$s={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$s,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 ge;return te.unlocked?null:((ge=re.value)==null?void 0:ge.progress)??null}),ie=e$b.computed(()=>{var ge;return!te.unlocked&&((ge=re.value)==null?void 0:ge.scope)==="season"}),le=e$b.computed(()=>{const ge=Number(te.achievement.xp);return Number.isFinite(ge)&&ge>0?ge:null}),ce=e$b.computed(()=>{if(!te.unlockedAt)return"";const ge=new Date(te.unlockedAt);return Number.isNaN(ge.getTime())?"":ge.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"),be=e$b.computed(()=>{const ge=[];if(le.value&&ge.push({label:`+${le.value.toLocaleString("pt-BR")} XP`,class:"font-black tracking-[0.02em] text-warning"}),ie.value){const me=re.value.seasonName;ge.push(me?{label:`${me}`,class:"font-bold text-sky-300 dark:text-sky-700"}:{label:re.value.scopeLabel,class:"text-warning/80"})}return ge}),fe=e$b.computed(()=>te.unlocked?{label:ce.value?`Desbloqueada em ${ce.value}`:"Desbloqueada",class:"text-success"}:null);return(ge,me)=>{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:be.value,status:fe.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 be(){ownerId.value===oe&&(clearTimers(),open.value=!1,ownerId.value=null)}return e$b.onBeforeUnmount(be),{triggerRef:ie,mounted:le,open:ce,panelStyle,placement,scheduleOpen:de,scheduleClose:ue,closeNow:be}}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$r=["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),be=e$b.computed(()=>ue.value?"???":ne.achievement.name||"Sem nome"),fe=e$b.computed(()=>de.value),ge=e$b.computed(()=>ne.mode==="catalog"&&ne.achievement.status===!1),me=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}:{}}),ke=e$b.computed(()=>{const Pe=re.value.accentRgb;return Pe?{"--panel-accent":`rgb(${Pe})`}:{}}),ve=e$b.computed(()=>ne.achievement.status===!1);function _e(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:Ae,panelStyle:De,placement:Oe,scheduleOpen:Ie,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([[me.value,{"is-locked":ie.value,"is-inactive":ve.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]=(...Me)=>e$b.unref(Ie)&&e$b.unref(Ie)(...Me)),onMouseleave:Be[4]||(Be[4]=(...Me)=>e$b.unref(ze)&&e$b.unref(ze)(...Me)),onClick:Be[5]||(Be[5]=(...Me)=>e$b.unref(Ve)&&e$b.unref(Ve)(...Me))},[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,[ge.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(be.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]=Me=>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)]),fe.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$r)):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(_e(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(Ae)?(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),ke.value]),onMouseenter:Be[1]||(Be[1]=(...Me)=>e$b.unref(Ie)&&e$b.unref(Ie)(...Me)),onMouseleave:Be[2]||(Be[2]=(...Me)=>e$b.unref(ze)&&e$b.unref(ze)(...Me))},[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 be(){_activeProvider&&(await _activeProvider.loadSdk(),le.value=_activeProvider.isReady())}async function fe(){if(!_activeProvider)return"";await be();try{const _e=await _activeProvider.getInvisibleToken();return le.value=_activeProvider.isReady()&&!!_e,te.value=_e,_e}catch(_e){return le.value=!1,console.warn("[Captcha] Falha ao obter token invisível:",_e),""}}function ge(_e){return new Promise(async($e,ye)=>{if(!_activeProvider){ye(new Error("Captcha provider não configurado"));return}if(await be(),!_activeProvider.isReady()){ye(new Error("Captcha SDK não está pronto"));return}_activeProvider.renderCaptcha(_e,{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 me(_e,{requiresVisibleCaptcha:$e=!1,userBlocked:ye=!1}={}){ee.value=_e,re.value=!1,oe.value=$e,ie.value=ye;const Ee=de.value;Ee>0&&ke(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 ke(_e){ne.value=!0,ae.value=Math.ceil(_e/1e3),ce&&clearInterval(ce),ce=setInterval(()=>{ae.value--,ae.value<=0&&(ne.value=!1,ce&&(clearInterval(ce),ce=null))},1e3)}function ve(){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:be,getInvisibleToken:fe,renderVisibleCaptcha:ge,setAttempts:me,resetOnSuccess:pe,cleanup:ve}}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]=be=>oe.value=be),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]=be=>oe.value=be),placeholder:re.placeholder},null,10,_hoisted_7$J)),[[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$I={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},be=()=>{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}},fe=e$b.computed(()=>ne.multiple?Array.isArray(ne.modelValue)&&ne.modelValue.length>0:ne.options.some($e=>$e.value===ne.modelValue)),ge=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}),me=e$b.computed(()=>ne.iconPlaceholder||ne.icon||null);e$b.watch(re,async $e=>{$e&&(await e$b.nextTick(),be(),requestAnimationFrame(be))});const pe=[];e$b.onMounted(()=>{if(document.addEventListener("mousedown",de),ne.teleportTo||ne.overlay){const $e=()=>{re.value&&be()};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 ke=$e=>ne.multiple&&Array.isArray(ne.modelValue)?ne.modelValue.includes($e):ne.modelValue===$e,ve=$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},_e=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",fe.value?"":"opacity-80"])},[fe.value&&ge.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:0,class:"flex-shrink-0",innerHTML:ge.value},null,8,_hoisted_1$1s)):!fe.value&&me.value?(e$b.openBlock(),e$b.createElementBlock("span",{key:1,class:"flex-shrink-0",innerHTML:me.value},null,8,_hoisted_2$1f)):e$b.createCommentVNode("",!0),e$b.createElementVNode("p",_hoisted_3$16,e$b.toDisplayString(_e.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([ke(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=>ve(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$I,e$b.toDisplayString(Ee.name),1)]),ke(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([ke(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=>ve(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)]),ke(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([ke(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=>ve(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)]),ke(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$H={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$H,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$G={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$G,[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$F={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=Re(lt),je=Re(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),be=e$b.ref(null),fe=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&&lt.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 ge(lt){var it;return((it=lt==null?void 0:lt.product)==null?void 0:it.id)??(lt==null?void 0:lt.id)}const me=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=ge(it);gt!=null&&(lt[gt]=it.quantity)}),lt}),pe=lt=>me.value[lt.id]||0,ke=e$b.computed(()=>{const lt={};return ce.value.forEach(it=>{const gt=ge(it);gt!=null&&(lt[gt]=it.discount||0)}),lt}),ve=lt=>ke.value[lt.id]||0,_e=(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||Re(lt)||!lt.discountable)return;const gt=lt.max_discount||100,Et=_e(it,gt),mt=ce.value.find(je=>ge(je)===lt.id);mt&&(mt.discount=Et)},ye=(lt,it)=>{if(ne.readonly||Re(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=ve(lt);Ze.value[it]=String(je);return}const Et=lt.max_discount||100,mt=_e(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},Ae=lt=>{const it=lt.id;return Xe.value[it]?(Ze.value[it]??String(ve(lt))).replace(".",","):String(ve(lt)).replace(".",",")},De=lt=>{if(ne.readonly||Re(lt))return;const it=ce.value.find(gt=>ge(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||Re(lt))return;const it=ce.value.find(gt=>ge(gt)===lt.id);it&&(it.quantity>0?it.quantity--:it.quantity=0)},Ie=(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(Ie(crm_products,{page:de.value,...lt})),{results:gt,next:Et,previous:mt}=it;if(ue.value=Et,be.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=>ge(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=ge(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=ge(lt);it&&!Ze.value[it]&&(Ze.value[it]=String(lt.discount||0))})}let Be=!1;async function Me(){var it;if(Be)return;Be=!0;const lt=Array.isArray(ne.allProducts)?ne.allProducts:(it=ne.allProducts)==null?void 0:it.results;lt&&lt.length>0?(oe.value=lt,ue.value=!Array.isArray(ne.allProducts)&&ne.allProducts.next||null,be.value=!Array.isArray(ne.allProducts)&&ne.allProducts.previous||null,de.value=2):await Ve(),Ne(),Pe()}e$b.onMounted(Me),e$b.watch(ie,lt=>{lt.forEach(it=>{if(it&&it.id&&!Ze.value[it.id]){const gt=ce.value.find(mt=>ge(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=ge(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 Re=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,[fe.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(fe.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$F,[(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:ge(je),item:je,getProductId:ge},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},[Re(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:ve(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:Re(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:Re(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:Ae(mt),onInput:Qe=>ye(mt,Qe),onFocus:Qe=>Se(mt,Qe),onBlur:()=>Le(mt),inputmode:"decimal",type:"text",disabled:!mt.discountable||Re(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 fe=e$b.unref(ce);return fe!=null?!!fe:!!(le!=null&&le.smPlayEnabled)}),ue=e$b.computed(()=>te.variant==="auto"?de.value:te.variant==="pixel"),be=e$b.computed(()=>ae.value==="xs"?"sm":ae.value);return(fe,ge)=>(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:be.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$E=["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(ke){return JSON.parse(JSON.stringify(ke))}function ce(ke){if(typeof ke=="boolean")return ke;if(typeof ke=="number")return ke===1;if(typeof ke=="string"){const ve=ke.trim().toLowerCase();if(["true","1","yes","y","sim"].includes(ve))return!0;if(["false","0","no","n","nao","não"].includes(ve))return!1}return!1}function de(ke){Array.isArray(ke)&&ke.forEach(ve=>{(ve==null?void 0:ve.type)==="bool"&&(ve.content=ce(ve.content))})}function ue(ke){return ke!=null&&String(ke).trim()!==""}function be(ke){return ke==="string"?"texto":ke==="float"?"número":ke==="list"?"lista":"Desconhecido"}function fe(ke){if(!ke)return;ke.style.height="auto";const ve=parseFloat(window.getComputedStyle(ke).minHeight)||0;ke.style.height=`${Math.max(ke.scrollHeight,ve)}px`}function ge(ke){fe(ke==null?void 0:ke.target)}function me(){ie.value&&ie.value.querySelectorAll("textarea.floating-textarea").forEach(ke=>fe(ke))}const pe=async()=>{try{oe.value=!0;const ke=await api.get(segmentation_field);re.value=ke.data,de(re.value),await e$b.nextTick(),me()}catch(ke){console.error("Error fetching segmentation fields:",ke)}finally{oe.value=!1}};return e$b.onMounted(()=>{ne.modelValue.length===0&&pe(),de(re.value),e$b.nextTick(me)}),e$b.watch(()=>ne.modelValue,ke=>{re.value=le(ke),de(re.value),e$b.nextTick(me)},{deep:!0}),e$b.watch(re,ke=>{JSON.stringify(ke)!==JSON.stringify(ne.modelValue)&&ae("update:modelValue",le(ke))},{deep:!0}),(ke,ve)=>{const _e=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},[ve[0]||(ve[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:be($e.type)},e$b.toDisplayString($e.name),9,_hoisted_6$J),e$b.createVNode(_e,{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:ge},null,40,_hoisted_7$E)),[[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:be($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,[...ve[1]||(ve[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$D={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 be=e$b.computed(()=>!!de.value),fe=e$b.computed(()=>!ne.currentAttendance),ge=e$b.computed(()=>{var qe;return((qe=ne.loggedAttendant)==null?void 0:qe.name)||"Atendente não encontrado"}),me=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)),ke=e$b.computed(()=>de.value&&re.departments.find(qe=>String(qe.id)===String(de.value))||null),ve=e$b.computed(()=>{var qe;return((qe=ke.value)==null?void 0:qe.wallets_enabled)===!0}),_e=e$b.computed(()=>{var qe;return be.value?de.value:((qe=pe.value[0])==null?void 0:qe.id)??null}),$e=e$b.computed(()=>fe.value?!0:ne.isDepartmentSupervisor(_e.value)),ye=e$b.computed(()=>{const qe=_e.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(()=>!be.value&&!_e.value),Ae=e$b.computed(()=>$e.value?ie.value[0]??null:ne.loggedAttendant),De=e$b.computed(()=>{var qe;return((qe=Ae.value)==null?void 0:qe.id)??null}),Oe=e$b.computed(()=>String(De.value)===String(ne.loggedAttendantId)),Ie=e$b.computed(()=>$e.value?"Neste fluxo, você pode atribuir qualquer atendente do departamento selecionado.":_e.value&&!ne.hasDepartmentMembership(_e.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||!Ae.value||!_e.value)return!1;const qe=(Ze=Ae.value)==null?void 0:Ze.id,Ge=_e.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(!be.value)return;const qe=ke.value;le.value=qe?[qe]:[]},Me=()=>{$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}Me()},Re=async()=>{var Xe,Ue,at;if(!Ne.value||!ne.contactId)return;const qe=(Xe=Ae.value)==null?void 0:Xe.id,Ge=_e.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(),Me();return}Pe()}),e$b.watch(()=>[de.value,re.departments.length],()=>{Be()}),e$b.watch(()=>[$e.value,ne.loggedAttendantId,ne.loggedAttendant],()=>{Me()}),(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(be.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$$,[be.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))])):fe.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$D,[be.value?e$b.createCommentVNode("",!0):(e$b.openBlock(),e$b.createElementBlock("label",_hoisted_8$y," Departamento (com carteiras habilitadas) ")),be.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:me.value,disabledReason:"Carteiras não habilitadas",onDepart:Fe},null,8,["disabledItems"])),!be.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)]),be.value&&!ve.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(ge.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(Ie.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:Re},[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$C=["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 ke=new Date(pe);return Number.isNaN(ke.getTime())?null:new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(ke)};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}),be=e$b.ref(!1),fe=()=>{!de.value||ne.isRemoving||(be.value=!0)},ge=()=>{ne.isRemoving||(be.value=!1)},me=()=>{!de.value||ne.isRemoving||(be.value=!1,ae("remove",ne.wallet))};return(pe,ke)=>(e$b.openBlock(),e$b.createElementBlock("article",{class:e$b.normalizeClass(ue.value)},[e$b.createElementVNode("header",_hoisted_1$1j,[ke[0]||(ke[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)]),ke[8]||(ke[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$C),ke[1]||(ke[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:fe},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(()=>[be.value?(e$b.openBlock(),e$b.createBlock(MinModal,{key:0,defineWidth:"max-w-sm",onClose:ge},{header:e$b.withCtx(()=>[...ke[2]||(ke[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,[ke[7]||(ke[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,[ke[6]||(ke[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,[ke[3]||(ke[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,[ke[5]||(ke[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),ke[4]||(ke[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:ge}," 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:me},[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$B={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}),be=e$b.computed(()=>{var Be;return((Be=ue.value)==null?void 0:Be.id)??null}),fe=e$b.computed(()=>{var Be;return Array.isArray((Be=ue.value)==null?void 0:Be.department)?ue.value.department:[]}),ge=Be=>!Be||!be.value?null:fe.value.find(Me=>String(Me==null?void 0:Me.id)===String(Be))||null,me=Be=>!!ge(Be),pe=Be=>{var Me;return((Me=ge(Be))==null?void 0:Me.permission)==="supervisor"},ke=e$b.computed(()=>!te.currentAttendance),ve=Be=>ke.value||pe(Be),_e=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,Me)=>{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}-${Me}`},ye=Be=>Be?ne.attendants.find(Me=>String(Me.id)===String(Be)):null,Ee=Be=>Be?ae.departments.find(Me=>String(Me.id)===String(Be)):null,Se=()=>{var Be,Me,xe,Ce;return te.currentAttendance&&(((Be=te.currentAttendance)==null?void 0:Be.department_id)||((Me=te.currentAttendance)==null?void 0:Me.departmentId)||((Ce=(xe=te.currentAttendance)==null?void 0:xe.department)==null?void 0:Ce.id))||null},Le=()=>{const Be=re.value;if(ke.value)return Be;const Me=Se(),xe=fe.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 Me&&Ce.add(String(Me)),Be.filter(Fe=>Ce.has(String(Fe==null?void 0:Fe.department_id)))}return Me?Be.filter(Ce=>String(Ce==null?void 0:Ce.department_id)===String(Me)):[]},Ae=e$b.computed(()=>Le().map((Be,Me)=>{const xe=Be==null?void 0:Be.attendant_id,Ce=Be==null?void 0:Be.department_id,Fe=ye(xe),Re=Ee(Ce),qe=(Fe==null?void 0:Fe.name)||"Atendente não encontrado",Ge=(Re==null?void 0:Re.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,Me),attendantId:xe,departmentId:Ce,attendantName:qe,attendantPhoto:Ze,departmentName:Ge,updatedAt:Xe,canRemove:ve(Ce)||me(Ce)&&String(xe)===String(be.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 Me=te.contactId;if(!Me){re.value=[],ie.value="",le.value=null;return}if(!(!Be&&le.value===Me&&ie.value===""))try{oe.value=!0,ie.value="";const[,{data:Fe}]=await Promise.all([De(),api.get(contactWalletUrl(Me))]);re.value=_e(Fe),le.value=Me}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}},Ie=Be=>ce.value.includes(Be),ze=(Be,Me)=>{if(Be){if(Me){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 Me=Be==null?void 0:Be.attendant_id,xe=Be==null?void 0:Be.department_id;if(!Me||!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,Re)=>Re===Ce?{...Fe,attendant_id:Me,department_id:xe}:Fe);return}re.value=[...re.value,{attendant_id:Me,department_id:xe}]},Pe=async Be=>{var Fe,Re,qe,Ge;const Me=te.contactId,xe=Be==null?void 0:Be.departmentId,Ce=ve(xe)||me(xe)&&String(Be==null?void 0:Be.attendantId)===String(be.value);if(!(!Me||!xe||Ie(xe)||!Ce))try{ze(xe,!0),ie.value="";const Ze=contactWalletUrl(Me),Xe={department_id:xe,attendant_id:null};try{await api.post(Ze,Xe)}catch(Ue){ie.value=((Re=(Fe=Ue==null?void 0:Ue.response)==null?void 0:Fe.data)==null?void 0:Re.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,Me])=>{Be==="wallet"&&Me&&Oe()},{immediate:!0}),(Be,Me)=>(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$1i,[e$b.createElementVNode("section",_hoisted_2$15,[e$b.createElementVNode("header",_hoisted_3$Z,[Me[5]||(Me[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},[...Me[3]||(Me[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:Me[0]||(Me[0]=xe=>Oe({force:!0}))},[...Me[4]||(Me[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,[...Me[7]||(Me[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,[Me[8]||(Me[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:Me[1]||(Me[1]=xe=>Oe({force:!0}))}," Tentar novamente ")])):Ae.value.length===0?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_11$o,[...Me[9]||(Me[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(Ae.value,xe=>(e$b.openBlock(),e$b.createBlock(WalletCard,{key:xe.id,wallet:xe,"is-removing":Ie(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$B,[...Me[6]||(Me[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":Me[2]||(Me[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":be.value,"has-department-membership":me,"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$A={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=(ke,ve)=>{const _e=(ve==null?void 0:ve.number)||ke||"",$e=String(_e).replace(/[^\d\s()-]/g,"");ae.value=$e},de=useWhatsappBindings(()=>te.contact),ue=useInstagramBindings(()=>te.contact),be=useTelegramBindings(()=>te.contact),fe=useWebchatBindings(()=>te.contact),ge=useHasContactBindings(de,ue,be,fe),me=e$b.computed(()=>{var ke;return((ke=be.value[0])==null?void 0:ke.user_name)||""}),pe=e$b.ref(!1);return(ke,ve)=>{const _e=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":ve[0]||(ve[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,[ve[19]||(ve[19]=e$b.createElementVNode("p",{class:"text-xs font-semibold"},"Contatos",-1)),e$b.unref(ge)?(e$b.openBlock(),e$b.createBlock(_e,{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,[ve[7]||(ve[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:ve[1]||(ve[1]=e$b.withModifiers(ye=>pe.value=!0,["stop"]))}," ? ")]),e$b.unref(de).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_5$K,[ve[9]||(ve[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$A,[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,[ve[8]||(ve[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,[...ve[10]||(ve[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)])])),ve[11]||(ve[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,[ve[12]||(ve[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(be).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(be).length?(e$b.openBlock(),e$b.createElementBlock("section",_hoisted_23$3,[ve[14]||(ve[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(be),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,[ve[13]||(ve[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(fe).length&&(e$b.unref(de).length||e$b.unref(ue).length||e$b.unref(be).length)?(e$b.openBlock(),e$b.createElementBlock("hr",_hoisted_30$1)):e$b.createCommentVNode("",!0),e$b.unref(fe).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,[...ve[15]||(ve[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)])])),ve[16]||(ve[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(fe),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,[ve[17]||(ve[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(()=>[ve[18]||(ve[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,[ve[20]||(ve[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:ve[2]||(ve[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,[ve[21]||(ve[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),me.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_43,[ve[22]||(ve[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":me.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":ve[3]||(ve[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":ve[4]||(ve[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":ve[6]||(ve[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(()=>[...ve[23]||(ve[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:ve[5]||(ve[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,ke=>{re.value=ke});const ce=e$b.computed(()=>oe.value||re.value);function de(ke){const ve=ce.value,_e=(ke-1)*ne.starWeight,$e=ke*ne.starWeight;return ve>=$e?"100%":ve<=_e?"0%":`${(ve-_e)/ne.starWeight*100}%`}function ue(ke,ve){const _e=ke.currentTarget.getBoundingClientRect(),$e=ke.offsetX<_e.width/2;oe.value=(ve-1)*ne.starWeight+($e?ne.starWeight/2:ne.starWeight)}function be(ke,ve){const _e=ke.currentTarget.getBoundingClientRect(),$e=ke.offsetX<_e.width/2,ye=(ve-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 fe(){ne.readonly||(ie.value=!0)}function ge(){ie.value=!1,oe.value=0}function me(ke){if(!ie.value||!le.value||ne.readonly)return;const ve=ke.touches[0],_e=le.value.getBoundingClientRect(),$e=ve.clientX-_e.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(),Ae=ve.clientX-Le.left<Le.width/2;oe.value=(Ee-1)*ne.starWeight+(Ae?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(ke,ve)=>(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:ve[1]||(ve[1]=_e=>!ne.readonly&&(oe.value=0)),onTouchstartPassive:fe,onTouchmovePassive:me,onTouchendPassive:pe,onTouchcancelPassive:ge},[(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,e$b.renderList(5,_e=>e$b.createElementVNode("div",{key:_e,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,_e),onMouseleave:ve[0]||(ve[0]=$e=>!ne.readonly&&(oe.value=0)),onClick:$e=>!ne.readonly&&be($e,_e)},[(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`})},[...ve[2]||(ve[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(_e),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`})},[...ve[3]||(ve[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$z={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"],HIDDEN_INSTANCES_HINT="Instâncias de Webchat, de API oficial ou desconectadas não aparecem aqui.",_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=["webchat","whatsapp-api-official"],ie=e$b.ref(!1),le=e$b.ref(!1),ce=e$b.ref(null),de=e$b.computed(()=>!!ne.contactId&&!ie.value),ue=()=>{de.value&&(le.value=!le.value,le.value||(ce.value=null))},be=async()=>{try{const{data:ge}=await api.get(`${contact_url}${ne.contactId}/`);return(ge==null?void 0:ge.photo)||null}catch{return null}},fe=async()=>{var ge,me,pe;if(!(!de.value||!ce.value)){ie.value=!0;try{const{data:ke}=await api.post(contactRefreshAvatarUrl(ne.contactId),{instance:ce.value.id}),ve=(ke==null?void 0:ke.photo)||((ge=ke==null?void 0:ke.contact)==null?void 0:ge.photo)||await be(),_e=!!ve&&ve!==ne.photo;_e&&ae("update:photo",ve),ae("photo-refresh",_e?{level:"success",title:"Foto atualizada",message:(ke==null?void 0:ke.message)||"A foto de perfil do contato foi atualizada com sucesso."}:{level:"info",title:"Nenhuma foto nova",message:(ke==null?void 0:ke.message)||"Não encontramos uma foto de perfil nova para este contato nesta instância."}),le.value=!1,ce.value=null}catch(ke){ae("photo-refresh",{level:"error",title:"Erro ao atualizar",message:((pe=(me=ke==null?void 0:ke.response)==null?void 0:me.data)==null?void 0:pe.message)||"Não foi possível atualizar a foto de perfil do contato."})}finally{ie.value=!1}}};return(ge,me)=>{const pe=e$b.resolveComponent("Popper"),ke=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(pe,{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$z,[...me[3]||(me[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,[...me[4]||(me[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(pe,{hover:"",content:"Atualizar foto de perfil",placement:"right",arrow:""},{content:e$b.withCtx(()=>[...me[5]||(me[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:!de.value,class:e$b.normalizeClass(["refresh-avatar-button transition-all duration-200",[de.value?"refresh-avatar-button-unblocked":"refresh-avatar-button-blocked",de.value?"lock-button-enabled":"lock-button-disabled",{"refresh-avatar-button-active":le.value}]]),onClick:ue},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4 text-blue-200",{"animate-spin":ie.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...me[6]||(me[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":me[0]||(me[0]=ve=>ge.$emit("update:outcome",ve))},null,8,["outcome"]),e$b.createElementVNode("div",_hoisted_12$k,[me[7]||(me[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":me[1]||(me[1]=ve=>ge.$emit("update:rating",ve))},null,8,["model-value"])])])):e$b.createCommentVNode("",!0)],2),e$b.createVNode(e$b.Transition,{name:"instance-panel"},{default:e$b.withCtx(()=>[le.value?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_13$i,[e$b.createElementVNode("header",{class:"instance-panel-header"},[me[9]||(me[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:ue},[...me[8]||(me[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(ke,{modelValue:ce.value,"onUpdate:modelValue":me[2]||(me[2]=ve=>ce.value=ve),type_deny_list:oe,hint:HIDDEN_INSTANCES_HINT,only_connected:""},null,8,["modelValue"]),me[11]||(me[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:ue},"Cancelar"),e$b.createElementVNode("button",{type:"button",class:"instance-panel-button instance-panel-button--confirm",disabled:!ce.value||ie.value,onClick:fe},[(e$b.openBlock(),e$b.createElementBlock("svg",{class:e$b.normalizeClass(["size-4",{"animate-spin":ie.value}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...me[10]||(me[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(ie.value?"Atualizando":"Atualizar"),1)],8,_hoisted_15$f)])])):e$b.createCommentVNode("",!0)]),_:1})])}}},ClientOverviewPanel=_export_sfc$1(_sfc_main$1l,[["__scopeId","data-v-0a2e250a"]]),_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$y={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 be=e$b.computed(()=>{var Ce;return Array.isArray((Ce=ne.contact)==null?void 0:Ce.products)&&ne.contact.products.length>0}),fe=e$b.computed(()=>{var Ce,Fe,Re;return((Ce=ne.contact)==null?void 0:Ce.rating)!==null&&((Fe=ne.contact)==null?void 0:Fe.rating)!==void 0&&((Re=ne.contact)==null?void 0:Re.rating)!==""}),ge=e$b.computed(()=>{var Ce;return ie((Ce=ne.contact)==null?void 0:Ce.telephone)}),me=e$b.computed(()=>{var Re,qe;const Ce=oe((Re=ne.contact)==null?void 0:Re.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?me.value:((Ce=ne.contact)==null?void 0:Ce.name)||"Sem nome"});e$b.computed(()=>{var Re,qe;const Ce=oe((Re=ne.contact)==null?void 0:Re.name),Fe=oe((qe=ne.contact)==null?void 0:qe.telephone);return le.value&&ne.viewNumberPermission&&!!Ce&&!!Fe});const ke=e$b.computed(()=>!le.value&&ne.selectable?"button":"div"),ve=e$b.computed(()=>Ve.value||Ne.value||Pe.value),_e=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"),ve.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:_e.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"),Ae=()=>{!le.value&&ne.selectable&&ae("select",ne.contact)},De=useWhatsappBindings(()=>ne.contact),Oe=useInstagramBindings(()=>ne.contact),Ie=useTelegramBindings(()=>ne.contact),ze=useHasContactBindings(De,Oe,Ie),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},Me=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 Re=e$b.resolveComponent("Popper");return e$b.openBlock(),e$b.createBlock(e$b.resolveDynamicComponent(ke.value),{class:e$b.normalizeClass(ye.value),title:Ee.value,onClick:Ae,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(ge.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(Re,{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$y,[(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(Re,{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:Me},[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(Ie).length?(e$b.openBlock(),e$b.createBlock(Re,{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(Ie),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(Ie).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,[be.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),fe.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$x={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(fe=>{const ge=re(ce[fe.key]),me=re(de[fe.key]),pe=re(ue[fe.key]),ke=fe.key==="telephone"?oe(ge):ge.toLowerCase(),ve=fe.key==="telephone"?oe(me):me.toLowerCase(),_e=fe.key==="telephone"?oe(pe):pe.toLowerCase(),$e=ke===_e&&ge,ye=ve===_e&&me&&!$e,Ee=$e?me:ye?ge:null,Se=fe.format||(Le=>Le);return{key:fe.key,label:fe.label,finalValue:pe?Se(pe):null,discardedValue:Ee&&Ee!==pe?Se(Ee):null,fromChild:ye,hasChange:ke!==ve}}).filter(fe=>fe.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$x,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 ge,me;const ie=((ge=ne.parentContact)==null?void 0:ge.products)||[],le=((me=ne.childContact)==null?void 0:me.products)||[],ce=new Set(ie.map(pe=>{var ke;return((ke=pe.product)==null?void 0:ke.id)||pe.id})),de=ie,ue=le.filter(pe=>{var ke;return!ce.has(((ke=pe.product)==null?void 0:ke.id)||pe.id)}),be=ue.length>0,fe=ie.length+ue.length;return{hasChanges:be,keptFromParent:de,incorporatedFromChild:ue,total:fe}});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$w={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 be=oe(ue.content).toLowerCase();return be?be==="true"?"true":"false":""}return ue.type==="list"&&Array.isArray(ue.content)?ue.content.map(be=>oe(be)).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 ke,ve;const ue=((ke=ne.parentContact)==null?void 0:ke.segmentation_fields)||[],be=((ve=ne.childContact)==null?void 0:ve.segmentation_fields)||[],fe=new Map(ue.map(_e=>[_e.id,_e])),ge=new Map(be.map(_e=>[_e.id,_e])),me=new Set([...fe.keys(),...ge.keys()]),pe=[];return me.forEach(_e=>{const $e=fe.get(_e),ye=ge.get(_e),Ee=le($e),Se=le(ye),Le=!ie($e==null?void 0:$e.content),Ae=!ie(ye==null?void 0:ye.content);if(Ee!==Se&&(Le||Ae)){const De=Le||!Ae?$e:ye,Oe=!Le&&Ae,Ie=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:Ie,discardedValue:Ve,incorporatedFromChild:!!Oe})}}),{hasChanges:pe.length>0,changes:pe}});return e$b.watchEffect(()=>{ae("changes-count",de.value.changes.length)}),(ue,be)=>de.value.hasChanges?(e$b.openBlock(),e$b.createElementBlock("div",_hoisted_1$15,[e$b.createElementVNode("div",_hoisted_2$X,[be[2]||(be[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)),be[3]||(be[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:be[0]||(be[0]=fe=>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"},[...be[1]||(be[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,fe=>(e$b.openBlock(),e$b.createElementBlock("div",{key:fe.id,class:"segmentation-change-item"},[e$b.createElementVNode("span",_hoisted_5$G,e$b.toDisplayString(fe.name),1),e$b.createElementVNode("div",_hoisted_6$B,[e$b.createElementVNode("span",_hoisted_7$w,[be[4]||(be[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(fe.finalValue)+" ",1),fe.incorporatedFromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_8$s," incorporado ")):e$b.createCommentVNode("",!0)]),fe.discardedValue?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_9$p,[be[5]||(be[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(fe.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 ge,me;const ie=((ge=ne.parentContact)==null?void 0:ge.tags)||[],le=((me=ne.childContact)==null?void 0:me.tags)||[],ce=new Set(ie.map(pe=>pe.id)),de=ie,ue=le.filter(pe=>!ce.has(pe.id)),be=ue.length>0,fe=ie.length+ue.length;return{hasChanges:be,keptFromParent:de,incorporatedFromChild:ue,total:fe}});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$v={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 ke,ve,_e,$e,ye,Ee,Se,Le,Ae,De,Oe,Ie,ze,Ve,Ne,Pe;const fe=te.mergePreview||{name:((ke=te.parentContact)==null?void 0:ke.name)||((ve=te.childContact)==null?void 0:ve.name),telephone:((_e=te.parentContact)==null?void 0:_e.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)},ge=[...((Ae=te.parentContact)==null?void 0:Ae.whatsapp_infos)||[],...((De=te.childContact)==null?void 0:De.whatsapp_infos)||[]],me=[...((Oe=te.parentContact)==null?void 0:Oe.instagram_infos)||[],...((Ie=te.childContact)==null?void 0:Ie.instagram_infos)||[]],pe=[...((ze=te.parentContact)==null?void 0:ze.telegram_infos)||[],...((Ve=te.childContact)==null?void 0:Ve.telegram_infos)||[]];return{...fe,photo:fe.photo||((Ne=te.parentContact)==null?void 0:Ne.photo)||((Pe=te.childContact)==null?void 0:Pe.photo),whatsapp_infos:ge,instagram_infos:me,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 _e,$e,ye,Ee,Se,Le;const fe=(((_e=te.parentContact)==null?void 0:_e.whatsapp_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`pwa-${De}`,platform:"whatsapp",instanceName:Ae.instance,userName:Ae.whatsapp_user_name||"",fromChild:!1})),ge=((($e=te.childContact)==null?void 0:$e.whatsapp_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`cwa-${De}`,platform:"whatsapp",instanceName:Ae.instance,userName:Ae.whatsapp_user_name||"",fromChild:!0})),me=(((ye=te.parentContact)==null?void 0:ye.instagram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`pig-${De}`,platform:"instagram",instanceName:Ae.instance,userName:Ae.instagram_user_name||"",fromChild:!1})),pe=(((Ee=te.childContact)==null?void 0:Ee.instagram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`cig-${De}`,platform:"instagram",instanceName:Ae.instance,userName:Ae.instagram_user_name||"",fromChild:!0})),ke=(((Se=te.parentContact)==null?void 0:Se.telegram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`ptg-${De}`,platform:"telegram",instanceName:Ae.instance,userName:Ae.telegram_user_name||"",fromChild:!1})),ve=(((Le=te.childContact)==null?void 0:Le.telegram_infos)||[]).filter(Ae=>Ae==null?void 0:Ae.instance).map((Ae,De)=>({id:Ae.id||`ctg-${De}`,platform:"telegram",instanceName:Ae.instance,userName:Ae.telegram_user_name||"",fromChild:!0}));return[...fe,...ge,...me,...pe,...ke,...ve]}),ue=e$b.computed(()=>de.value.filter(fe=>fe.fromChild).length),be=e$b.computed(()=>ae.value+re.value+oe.value+ie.value+ue.value);return(fe,ge)=>(e$b.openBlock(),e$b.createElementBlock(e$b.Fragment,null,[e$b.createElementVNode("section",_hoisted_1$13,[e$b.createElementVNode("header",_hoisted_2$V,[ge[8]||(ge[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)),be.value>0?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_3$P,e$b.toDisplayString(be.value)+" alteraç"+e$b.toDisplayString(be.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:ge[0]||(ge[0]=me=>ae.value=me)},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:ge[2]||(ge[2]=me=>le.value=!le.value)},[e$b.createElementVNode("div",_hoisted_5$E,[ge[10]||(ge[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$v,[e$b.createElementVNode("button",{class:"connections-help-btn",type:"button",onClick:ge[1]||(ge[1]=e$b.withModifiers(me=>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"},[...ge[9]||(ge[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,me=>(e$b.openBlock(),e$b.createElementBlock("div",{key:me.id,class:e$b.normalizeClass(["connection-result-item",{"connection-result-item--new":me.fromChild}])},[e$b.createElementVNode("div",_hoisted_9$o,[me.platform==="whatsapp"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_10$l,[...ge[11]||(ge[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)])])):me.platform==="instagram"?(e$b.openBlock(),e$b.createElementBlock("svg",_hoisted_11$k,[...ge[12]||(ge[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,[...ge[13]||(ge[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(me.instanceName),1),e$b.createElementVNode("div",_hoisted_14$f,[me.fromChild?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_15$d,"incorporado")):e$b.createCommentVNode("",!0),me.userName?(e$b.openBlock(),e$b.createElementBlock("span",_hoisted_16$c,e$b.toDisplayString(me.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:ge[3]||(ge[3]=me=>re.value=me)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1f,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:ge[4]||(ge[4]=me=>oe.value=me)},null,8,["parent-contact","child-contact"]),e$b.createVNode(_sfc_main$1e,{"parent-contact":ee.parentContact,"child-contact":ee.childContact,onChangesCount:ge[5]||(ge[5]=me=>ie.value=me)},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":ge[7]||(ge[7]=me=>ce.value=me),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(()=>[...ge[14]||(ge[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:ge[6]||(ge[6]=me=>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),be=extractLid(te.whatsapp_id);let fe=null;return ie&&le&&(fe=compareTelephones(re,oe),fe.isCompatible?fe.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&&be&&ue!==be&&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&&be&&ue===be&&ae.push("whatsapp_lid"),{canMerge:ne.length===0,reasons:ne,mergeableFields:ae,phoneComparison:fe}},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 be=Array.from(ue.values()),fe=ee.products||[],ge=te.products||[],me=new Map;fe.forEach(ye=>me.set(ye.id,ye)),ge.forEach(ye=>{me.has(ye.id)||me.set(ye.id,ye)});const pe=Array.from(me.values()),ke=ee.segmentation_fields||[],ve=te.segmentation_fields||[],_e=new Map;ke.forEach(ye=>_e.set(ye.id,{...ye})),ve.forEach(ye=>{if(_e.has(ye.id)){const Ee=_e.get(ye.id),Se=normalizeString(Ee.content),Le=normalizeString(ye.content);!Se&&Le&&_e.set(ye.id,{...Ee,content:ye.content,content_id:ye.content_id})}else _e.set(ye.id,{...ye})});const $e=Array.from(_e.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:be,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=(ge={})=>{const me=new URLSearchParams;return Object.entries(ge).forEach(([pe,ke])=>{ke!=null&&ke!==""&&me.append(pe,ke)}),`${contact_url}?${me.toString()}`},ue=async(ge=!1)=>{const me=++ce;ge&&(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(me!==ce)return;const ke=pe==null?void 0:pe.data,ve=Array.isArray(ke)?ke:Array.isArray(ke==null?void 0:ke.results)?ke.results:[];oe.value=(ke==null?void 0:ke.next)||null;const _e=normalizeString((ee==null?void 0:ee.value)||ee),$e=ve.filter(ye=>{const Ee=normalizeString(ye==null?void 0:ye.id);return Ee&&Ee!==_e});ge||re.value===1?ne.value=$e:ne.value=[...ne.value,...$e]}catch(pe){if(me!==ce)return;console.error("Erro ao buscar contatos:",pe),ne.value=ge?[]:ne.value}finally{me===ce&&(ae.value=!1)}},be=async ge=>{if(!oe.value){ge.complete();return}re.value++;try{await ue(!1),oe.value?ge.loaded():ge.complete()}catch(me){console.error("Erro ao carregar mais contatos:",me),ge.complete()}},fe=()=>{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:be,resetSearch:fe}}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$u={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:be}=useContactSearch(()=>{var Me;return(Me=ne.currentContact)==null?void 0:Me.id}),fe=e$b.ref("select"),ge=e$b.ref(!1),me=e$b.ref(""),pe=e$b.ref(!1),ke=e$b.ref(null),ve=Me=>JSON.parse(JSON.stringify(e$b.toRaw(Me??{}))),_e=Me=>{const xe=ve(Me);return delete xe.__mergeKey,xe},$e=e$b.computed(()=>ne.currentContact),ye=e$b.computed(()=>ke.value),Ee=e$b.computed(()=>!!ke.value),Se=e$b.computed(()=>validateContactMerge($e.value,ye.value)),Le=e$b.computed(()=>generateMergePreview($e.value,ye.value,Se.value.phoneComparison)),Ae=e$b.computed(()=>Ee.value&&Se.value.canMerge),De=e$b.computed(()=>Se.value.canMerge&&pe.value&&!ge.value&&Ee.value),Oe=e$b.computed(()=>oe.value.filter(Me=>{var xe;return Me.id!==((xe=$e.value)==null?void 0:xe.id)})),Ie=()=>{fe.value="select",me.value="",pe.value=!1,ge.value=!1,ke.value=null,be()},ze=({force:Me=!1}={})=>{ge.value&&!Me||(Ie(),ae("close"))},Ve=Me=>{var xe;((xe=ke.value)==null?void 0:xe.id)===Me.id?ke.value=null:ke.value=ve(Me)},Ne=()=>{Ae.value&&(fe.value="confirm")},Pe=()=>{fe.value="select",pe.value=!1,me.value=""},Be=async()=>{if(!De.value)return;const Me={parentId:$e.value.id??null,childId:ye.value.id??null,parentContact:_e($e.value),childContact:_e(ye.value),mergeableFields:[...Se.value.mergeableFields],mergedPreview:Le.value?{...Le.value}:null};try{ge.value=!0,me.value="";let xe=null;if(typeof ne.mergeContacts=="function"){const Ce=await ne.mergeContacts(Me);xe=(Ce==null?void 0:Ce.object)??null}ae("merged",{...Me,contact:xe}),ze({force:!0})}catch(xe){me.value=(xe==null?void 0:xe.message)||"Não foi possível concluir a mesclagem de contatos."}finally{ge.value=!1}};return e$b.watch(()=>ne.isOpen,Me=>{Me&&(Ie(),de(!0))}),(Me,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(fe.value==="select"?"Selecione o contato para mesclar":"Confirme a mesclagem"),1)])]),e$b.createElementVNode("button",{class:"merge-close-btn",disabled:ge.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$u,[e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:fe.value==="select",completed:fe.value==="confirm"}])},[e$b.createElementVNode("div",_hoisted_8$q,[fe.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:fe.value==="confirm"}])},null,2),e$b.createElementVNode("div",{class:e$b.normalizeClass(["step-item",{active:fe.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,[fe.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)&&Me.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=ke.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)):fe.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:ge.value,error:me.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,[fe.value==="confirm"?(e$b.openBlock(),e$b.createElementBlock("button",{key:0,class:"btn-secondary",disabled:ge.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:ge.value,onClick:ze}," Cancelar ",8,_hoisted_29)),fe.value==="select"?(e$b.openBlock(),e$b.createElementBlock("button",{key:2,class:"btn-primary",disabled:!Ae.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},[ge.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$t={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})}]),be=e$b.computed(()=>re.form.mode==="edit"?"Editar cliente":"Adicionar Novo Cliente"),fe=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 ge=e$b.ref(!1),me=e$b.computed(()=>re.canMergeContacts?oe.id?"ready":"missing-contact-id":"no-permission"),pe=e$b.computed(()=>me.value==="ready"),ke=e$b.computed(()=>me.value==="no-permission"?"Você não tem permissão para mesclar contatos.":me.value==="missing-contact-id"?"Salve o contato para habilitar a mesclagem.":"Mescla contatos para unificar histórico e informações."),ve=()=>{const ze=me.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)},_e=()=>{if(!pe.value){ve();return}ge.value=!0},$e=()=>{ge.value=!1},ye=ze=>{ne("merge",{...ze,removedContactId:ze.childId}),$e()},Ee=async ze=>{var Ve;if(!pe.value)throw ve(),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=fe(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),Ae=()=>{Le.value=window.innerWidth};e$b.onMounted(()=>{window.addEventListener("resize",Ae)}),e$b.onUnmounted(()=>{window.removeEventListener("resize",Ae)});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."}}],Ie=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,Me;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$t,[e$b.createElementVNode("p",_hoisted_8$p,e$b.toDisplayString(be.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:ke.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:_e}," 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:Ie.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(((Me=oe.notes)==null?void 0:Me.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":Ie.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":Ie.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":ge.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,(be,fe)=>(e$b.openBlock(),e$b.createBlock(ue,{key:le(be,fe),hover:"",arrow:"",placement:"top"},{content:e$b.withCtx(()=>[e$b.createElementVNode("p",_hoisted_2$R,e$b.toDisplayString(be.name),1)]),default:e$b.withCtx(()=>[e$b.createVNode(TagChip,{tag:be,size:ee.size,variant:ee.variant,removable:ee.removable,"max-width":ee.maxWidth,onRemove:de[0]||(de[0]=ge=>ae("remove",ge))},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,(be,fe)=>(e$b.openBlock(),e$b.createBlock(TagChip,{key:le(be,fe),tag:be,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(),be()}function be(){if(!oe.value||!ie.value)return;const pe=oe.value.getBoundingClientRect(),ke=ie.value.offsetWidth,ve=ie.value.offsetHeight,_e={top:pe.top,bottom:window.innerHeight-(pe.top+pe.height),left:pe.left,right:window.innerWidth-(pe.left+pe.width)};le.value.vertical=_e.bottom<ve&&_e.top>ve?"top":"bottom",le.value.horizontal=_e.right<ke&&_e.left>ke?"left":"right"}function fe(pe){re.value=!0;const ke=pe.type.includes("touch")?pe.touches[0]:pe;ae.value={x:ke.clientX-ne.value.x,y:ke.clientY-ne.value.y},document.addEventListener("mousemove",ge),document.addEventListener("mouseup",me),document.addEventListener("touchmove",ge),document.addEventListener("touchend",me)}function ge(pe){if(!re.value)return;const ke=pe.type.includes("touch")?pe.touches[0]:pe,ve=ke.clientX-ae.value.x,_e=ke.clientY-ae.value.y,$e=window.innerWidth-oe.value.offsetWidth,ye=window.innerHeight-oe.value.offsetHeight;ne.value.x=Math.min(Math.max(0,ve),$e),ne.value.y=Math.min(Math.max(0,_e),ye)}function me(){re.value=!1,document.removeEventListener("mousemove",ge),document.removeEventListener("mouseup",me),document.removeEventListener("touchmove",ge),document.removeEventListener("touchend",me)}return e$b.onBeforeUnmount(me),(pe,ke)=>(e$b.openBlock(),e$b.createElementBlock("div",{class:"floating-widget",style:e$b.normalizeStyle(ce.value),ref_key:"widgetRef",ref:oe,onMousedown:fe,onTouchstart:fe},[e$b.createElementVNode("button",{class:"floating-button",onClick:e$b.withModifiers(ue,["stop"]),"aria-label":"Abrir painel flutuante"},[...ke[0]||(ke[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",{},()=>[ke[1]||(ke[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$s={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$s,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 ge;return te.unlocked?null:((ge=re.value)==null?void 0:ge.progress)??null}),ie=e$b.computed(()=>{var ge;return!te.unlocked&&((ge=re.value)==null?void 0:ge.scope)==="season"}),le=e$b.computed(()=>{const ge=Number(te.achievement.xp);return Number.isFinite(ge)&&ge>0?ge:null}),ce=e$b.computed(()=>{if(!te.unlockedAt)return"";const ge=new Date(te.unlockedAt);return Number.isNaN(ge.getTime())?"":ge.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"),be=e$b.computed(()=>{const ge=[];if(le.value&&ge.push({label:`+${le.value.toLocaleString("pt-BR")} XP`,class:"font-black tracking-[0.02em] text-warning"}),ie.value){const me=re.value.seasonName;ge.push(me?{label:`${me}`,class:"font-bold text-sky-300 dark:text-sky-700"}:{label:re.value.scopeLabel,class:"text-warning/80"})}return ge}),fe=e$b.computed(()=>te.unlocked?{label:ce.value?`Desbloqueada em ${ce.value}`:"Desbloqueada",class:"text-success"}:null);return(ge,me)=>{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:be.value,status:fe.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 be(){ownerId.value===oe&&(clearTimers(),open.value=!1,ownerId.value=null)}return e$b.onBeforeUnmount(be),{triggerRef:ie,mounted:le,open:ce,panelStyle,placement,scheduleOpen:de,scheduleClose:ue,closeNow:be}}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$r=["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),be=e$b.computed(()=>ue.value?"???":ne.achievement.name||"Sem nome"),fe=e$b.computed(()=>de.value),ge=e$b.computed(()=>ne.mode==="catalog"&&ne.achievement.status===!1),me=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}:{}}),ke=e$b.computed(()=>{const Pe=re.value.accentRgb;return Pe?{"--panel-accent":`rgb(${Pe})`}:{}}),ve=e$b.computed(()=>ne.achievement.status===!1);function _e(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:Ae,panelStyle:De,placement:Oe,scheduleOpen:Ie,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([[me.value,{"is-locked":ie.value,"is-inactive":ve.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]=(...Me)=>e$b.unref(Ie)&&e$b.unref(Ie)(...Me)),onMouseleave:Be[4]||(Be[4]=(...Me)=>e$b.unref(ze)&&e$b.unref(ze)(...Me)),onClick:Be[5]||(Be[5]=(...Me)=>e$b.unref(Ve)&&e$b.unref(Ve)(...Me))},[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,[ge.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(be.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]=Me=>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)]),fe.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$r)):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(_e(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(Ae)?(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),ke.value]),onMouseenter:Be[1]||(Be[1]=(...Me)=>e$b.unref(Ie)&&e$b.unref(Ie)(...Me)),onMouseleave:Be[2]||(Be[2]=(...Me)=>e$b.unref(ze)&&e$b.unref(ze)(...Me))},[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 be(){_activeProvider&&(await _activeProvider.loadSdk(),le.value=_activeProvider.isReady())}async function fe(){if(!_activeProvider)return"";await be();try{const _e=await _activeProvider.getInvisibleToken();return le.value=_activeProvider.isReady()&&!!_e,te.value=_e,_e}catch(_e){return le.value=!1,console.warn("[Captcha] Falha ao obter token invisível:",_e),""}}function ge(_e){return new Promise(async($e,ye)=>{if(!_activeProvider){ye(new Error("Captcha provider não configurado"));return}if(await be(),!_activeProvider.isReady()){ye(new Error("Captcha SDK não está pronto"));return}_activeProvider.renderCaptcha(_e,{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 me(_e,{requiresVisibleCaptcha:$e=!1,userBlocked:ye=!1}={}){ee.value=_e,re.value=!1,oe.value=$e,ie.value=ye;const Ee=de.value;Ee>0&&ke(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 ke(_e){ne.value=!0,ae.value=Math.ceil(_e/1e3),ce&&clearInterval(ce),ce=setInterval(()=>{ae.value--,ae.value<=0&&(ne.value=!1,ce&&(clearInterval(ce),ce=null))},1e3)}function ve(){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:be,getInvisibleToken:fe,renderVisibleCaptcha:ge,setAttempts:me,resetOnSuccess:pe,cleanup:ve}}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) {