@dcodegroup-au/page-builder 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(Ye,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(Ye=typeof globalThis<"u"?globalThis:Ye||self,d(Ye.PageBuilder={},Ye.Vue))})(this,function(Ye,d){"use strict";var Dy=Object.defineProperty;var Uy=(Ye,d,Kn)=>d in Ye?Dy(Ye,d,{enumerable:!0,configurable:!0,writable:!0,value:Kn}):Ye[d]=Kn;var Ee=(Ye,d,Kn)=>Uy(Ye,typeof d!="symbol"?d+"":d,Kn);const Kn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Kc(n,e){return d.openBlock(),d.createElementBlock("svg",Kn,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18 6-6-6-6"},null,-1)]))}const Po={render:Kc},Xc={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Yc(n,e){return d.openBlock(),d.createElementBlock("svg",Xc,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9 6 6 6-6"},null,-1)]))}const Zc={render:Yc},es=(n,e)=>{const t=n.__vccOpts||n;for(const[r,s]of e)t[r]=s;return t},Qc={};function Jc(n,e){return e[0]||(e[0]=d.createStaticVNode('<div class="text-lg pb-6 font-semibold text-gray-900 border-b border-gray-200">Instruction</div><div class="flex flex-col gap-3 py-6 text-gray-600"><div class="font-semibold text-gray-900">Modules</div><p>Modules are fixed and for internal reference only, and admin users cannot make the following changes:</p><ul class="list-inside list-disc pl-3"><li>Edit the title of any module (e.g., &quot;Hero header&quot;).</li><li>Change the order of the modules.</li><li>Add new module.</li></ul><p>For any changes at the module level, please contact the development team.</p></div><div class="flex flex-col gap-3 py-6 text-gray-600"><div class="font-semibold text-gray-900">Edit sub-modules or edit nested items</div><p>Click any sub-module to edit its settings and any nested items within it.</p></div>',3))}const eu=es(Qc,[["render",Jc]]),tu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function nu(n,e){return d.openBlock(),d.createElementBlock("svg",tu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v14m-7-7h14"},null,-1)]))}const Fo={render:nu},Mo={data:{required:!0,type:Object},sites:{required:!0,type:Array}};function ru(n={}){return{title:"New slide",description:"New description",public:!1,featured_image:"",primary_button:{show:!1,label:"",type:"site-content",link_to:"",is_new_tab:!1,...n.primary_button||{}},secondary_button:{show:!1,label:"",type:"site-content",link_to:"",is_new_tab:!1,...n.secondary_button||{}},...n}}function su(n={}){return{title:"New link",link_to:"",open_in_new_tab:!0,type:"site-content",...n||{}}}const iu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function ou(n,e){return d.openBlock(),d.createElementBlock("svg",iu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2M19 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2M5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2"},null,-1)]))}const au={render:ou},lu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function cu(n,e){return d.openBlock(),d.createElementBlock("svg",lu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 6v-.8c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C14.48 2 13.92 2 12.8 2h-1.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C8 3.52 8 4.08 8 5.2V6m2 5.5v5m4-5v5M3 6h18m-2 0v11.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C16.72 22 15.88 22 14.2 22H9.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C5 19.72 5 18.88 5 17.2V6"},null,-1)]))}const Do={render:cu},uu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function fu(n,e){return d.openBlock(),d.createElementBlock("svg",uu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m2.5 21.5 5.55-2.134c.354-.137.532-.205.698-.294q.221-.12.42-.274c.149-.115.283-.25.552-.518L21 7a2.828 2.828 0 1 0-4-4L5.72 14.28c-.269.268-.403.403-.519.552a3 3 0 0 0-.273.42c-.089.166-.157.344-.294.699zm0 0 2.058-5.351c.147-.383.221-.575.347-.662a.5.5 0 0 1 .38-.08c.15.028.295.173.585.463l2.26 2.26c.29.29.435.434.464.585a.5.5 0 0 1-.08.38c-.089.126-.28.2-.663.347z"},null,-1)]))}const du={render:fu},hu={beforeMount:(n,e)=>{n.clickOutsideEvent=t=>{n===t.target||n.contains(t.target)||e.value()},document.addEventListener("click",n.clickOutsideEvent)},unmounted:n=>{document.removeEventListener("click",n.clickOutsideEvent)}},pu={class:"relative z-50"},gu={key:0,class:"absolute -left-60 top-6 w-[240px] rounded-lg border border-gray-200 bg-white"},Uo=Object.assign({directives:{clickOutside:hu}},{__name:"ActionMenu",props:{enableEdit:{type:Boolean,default:!1}},emits:["removeItem"],setup(n,{emit:e}){const t=d.ref(!1),r=e,s=()=>{t.value&&(t.value=!1)},a=()=>{r("removeItem"),t.value=!1},o=()=>{r("editItem"),t.value=!1};return(c,i)=>{const l=d.resolveDirective("click-outside");return d.withDirectives((d.openBlock(),d.createElementBlock("div",pu,[d.createVNode(d.unref(au),{onClick:i[0]||(i[0]=u=>t.value=!t.value),class:"w-5 cursor-pointer text-gray-600"}),t.value?(d.openBlock(),d.createElementBlock("div",gu,[n.enableEdit?(d.openBlock(),d.createElementBlock("a",{key:0,class:"flex items-center gap-2 p-2.5 cursor-pointer h-[48px] w-full hover:bg-gray-100",onClick:o},[d.createVNode(d.unref(du),{class:"w-5"}),i[1]||(i[1]=d.createTextVNode(" Edit "))])):d.createCommentVNode("",!0),d.createElementVNode("a",{class:d.normalizeClass(["flex items-center gap-2 p-2.5 cursor-pointer h-[48px] w-full hover:bg-gray-100",{"hover:rounded-lg":!n.enableEdit}]),onClick:a},[d.createVNode(d.unref(Do),{class:"w-5"}),i[2]||(i[2]=d.createTextVNode(" Delete "))],2)])):d.createCommentVNode("",!0)])),[[l,s]])}}}),mu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function vu(n,e){return d.openBlock(),d.createElementBlock("svg",mu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"},null,-1)]))}const yu={render:vu},bu={key:0,class:"fixed min-w-[400px] left-1/2 top-1/2 z-50 flex max-h-screen -translate-x-1/2 -translate-y-1/2 transform flex-col rounded-xl border-tertiary-500 bg-white"},xu={class:"p-6 flex justify-between flex-col"},Eu={class:"flex justify-between"},wu={class:"p-2 rounded-full border-8 border-error-50 bg-error-100 text-error-600"},Au={class:"text-lg font-semibold text-gray-900 pb-2 pt-4"},Su={class:"text-sm text-gray-600 pb-4"},Tu={class:"flex justify-between space-x-xsSpace pt-xsSpace gap-4"},Nu=["textContent"],Ou=["textContent"],jo=es(d.defineComponent({__name:"VModal",props:{entity:{type:String,required:!0},callback:{type:Function,required:!1,default:()=>{}}},setup(n,{expose:e}){const t=n,r=d.ref(!1),s=d.reactive({cancelTitle:null,confirmTitle:null,scrollable:!0,data:null}),a=d.computed(()=>s.cancelTitle?s.cancelTitle:"Cancel"),o=d.computed(()=>s.confirmTitle?s.confirmTitle:"Delete"),c=u=>{r.value=!0,s.data=u},i=()=>{r.value=!1},l=async()=>{t.callback(s.data),r.value=!1};return e({open:c,close:i}),(u,h)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([{"-open":r.value},"v-modal"])},[d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[r.value?(d.openBlock(),d.createElementBlock("div",bu,[d.renderSlot(u.$slots,"default",{},()=>[d.createElementVNode("div",{class:d.normalizeClass(["relative min-h-[260px] overflow-y-auto flex",{"overflow-y-visible":!u.scrollable}])},[d.createElementVNode("div",xu,[d.createElementVNode("div",null,[d.createElementVNode("div",Eu,[d.createElementVNode("span",wu,[d.createVNode(d.unref(Do),{class:"w-6 h-6"})]),d.createVNode(d.unref(yu),{class:"w-6 h-6 text-gray-400 hover:bg-gray-100 rounded-md cursor-pointer",onClick:i})]),d.createElementVNode("h4",Au,"Delete this "+d.toDisplayString(n.entity)+"?",1),d.createElementVNode("p",Su,"Do you want to delete this "+d.toDisplayString(n.entity)+"? This action cannot be undone.",1)]),d.createElementVNode("div",Tu,[d.createElementVNode("a",{onClick:i,class:"w-1/2 py-[9px] rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer",textContent:d.toDisplayString(a.value)},null,8,Nu),d.createElementVNode("a",{onClick:d.withModifiers(l,["prevent"]),class:"w-1/2 py-[9px] rounded-full shadow-xs text-md font-semibold text-white bg-error-600 hover:bg-error-700 border border-error-600 text-center cursor-pointer",textContent:d.toDisplayString(o.value)},null,8,Ou)])])],2)],!0)])):d.createCommentVNode("",!0)]),_:3})],2))}}),[["__scopeId","data-v-0ca1257f"]]),Cu={class:"flex justify-between pb-2"},Ru={class:"text-lg font-semibold text-gray-900"},Iu={class:"flex flex-col gap-4"},Lu={class:"text-gray-600 border-b border-gray-200 pb-4 text-sm"},ku={class:"flex flex-col gap-3"},Bu={class:"flex justify-between"},Pu={class:"flex flex-col gap-1"},Fu={class:"text-sm text-gray-600"},Mu=["disabled"],Du={class:"flex flex-col gap-3"},Uu=["onClick"],ju={class:"flex flex-1 flex-col"},$u={class:"text-xs text-gray-600"},Vu={class:"text-sm font-medium text-gray-900"},_u={__name:"VSliders",props:{...Mo},emits:["update"],setup(n,{emit:e}){const t=e,r=n,s=d.ref(r.data.component),a=d.ref(null),o=d.ref(JSON.parse(window.localStorage.getItem("openSlideStates")));o.value||(o.value={},s.value.data.forEach((f,m)=>{o.value[m]=!1}),console.log(o),window.localStorage.setItem("openSlideStates",JSON.stringify(o.value)));const c=f=>{Object.keys(o.value).forEach(m=>{o.value[m]=!1}),o.value[f]=!o.value[f],window.localStorage.setItem("openSlideStates",JSON.stringify(o.value))},i=()=>{s.value.data.push(ru()),t("update",s.value)},l=f=>{var m;(m=a==null?void 0:a.value)==null||m.open(f)},u=f=>{s.value.data.splice(f,1),t("update",s.value)},h=(f,m)=>{var g,v,x,T;f.hasOwnProperty("edit_url")&&(window.location.href=f.edit_url),window.location.href=`/admin/pages/${(v=(g=r==null?void 0:r.data)==null?void 0:g.page)==null?void 0:v.id}/sections/${(x=r==null?void 0:r.data)==null?void 0:x.sectionIndex}/components/${(T=r==null?void 0:r.data)==null?void 0:T.componentIndex}/slides/${m}`};return(f,m)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",Cu,[d.createElementVNode("p",Ru,d.toDisplayString(s.value.name),1)]),d.createElementVNode("div",Iu,[d.createElementVNode("div",Lu,d.toDisplayString(s.value.supportive_text),1),d.createElementVNode("div",ku,[d.createElementVNode("div",Bu,[d.createElementVNode("div",Pu,[m[0]||(m[0]=d.createElementVNode("div",{class:"font-semibold text-gray-900"},"Sliders",-1)),d.createElementVNode("div",Fu,"This slider can contain up to "+d.toDisplayString(s.value.max_items)+" slides",1)]),d.createElementVNode("div",null,[d.createElementVNode("button",{disabled:s.value.data.length>=s.value.max_items,onClick:i,type:"button",class:d.normalizeClass(["text-sm cursor-pointer flex items-center justify-center gap-1 rounded-[99px] border border-brand-600 bg-brand-500 px-3.5 py-2 font-semibold text-white hover:bg-brand-600",{"border-gray-100 bg-gray-100 !text-gray-400 hover:bg-gray-100":s.value.data.length>=s.value.max_items}])},[d.createVNode(d.unref(Fo),{class:"h-5 w-5"}),m[1]||(m[1]=d.createElementVNode("span",null,"Add",-1))],10,Mu)])]),d.createElementVNode("div",Du,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value.data,(g,v)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["flex items-center gap-4 px-2 py-1 hover:bg-gray-100 rounded-lg",{"bg-gray-200 hover:bg-gray-200":o.value[v]}])},[d.createElementVNode("div",{class:"flex flex-1 cursor-pointer items-center justify-between relative",onClick:x=>c(v)},[d.createElementVNode("div",ju,[d.createElementVNode("div",$u," Slider #"+d.toDisplayString(v+1),1),d.createElementVNode("div",Vu,d.toDisplayString(g.title),1)]),d.createVNode(Uo,{onRemoveItem:x=>l(v),"enable-edit":!0,onEditItem:x=>h(g,v)},null,8,["onRemoveItem","onEditItem"])],8,Uu)],2))),256))])])]),d.createVNode(jo,{ref_key:"modalRef",ref:a,entity:"slide",callback:u},null,512)],64))}},qu=["for"],zu={key:0,class:"v-field-label inline-block mb-2"},Hu={key:0},Gu={key:1,class:"absolute right-0 -bottom-6 text-sm text-gray-600 font-normal"},Wu={key:2,class:"absolute left-0 -bottom-6 text-sm text-gray-600 font-normal"},Xn={__name:"InputWrapper",props:{field:{type:String,required:!0},labelText:{type:String,default:""},value:{type:[String,Number],default:""},limit:{type:Number,default:null},showCount:{type:Boolean,default:!1},darkTheme:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1}},setup(n){return(e,t)=>{var r;return d.openBlock(),d.createElementBlock("label",{for:n.field,class:"block space-y-2xsSpace text-sm font-medium leading-none text-gray-700 relative"},[n.labelText||e.$slots.label?(d.openBlock(),d.createElementBlock("span",zu,[e.$slots.label?d.renderSlot(e.$slots,"label",{key:0}):(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[d.createTextVNode(d.toDisplayString(n.labelText)+" ",1),n.isRequired?(d.openBlock(),d.createElementBlock("span",Hu," *")):d.createCommentVNode("",!0)],64))])):d.createCommentVNode("",!0),d.renderSlot(e.$slots,"default"),n.limit?(d.openBlock(),d.createElementBlock("span",Gu,d.toDisplayString((r=n.value)==null?void 0:r.length)+"/"+d.toDisplayString(n.limit)+" characters ",1)):d.createCommentVNode("",!0),n.showCount?(d.openBlock(),d.createElementBlock("span",Wu," Word count: "+d.toDisplayString(n.value),1)):d.createCommentVNode("",!0)],8,qu)}}},Ku={class:"flex items-center gap-2"},Xu=["aria-checked"],Yu={key:0,class:"text-sm text-gray-700 font-medium"},ts={__name:"VToggle",props:{modelValue:{type:[Number,Boolean]},title:{type:String},isDisabled:{type:Boolean},small:{type:Boolean},ring:{type:Boolean}},emits:"update:modelValue",setup(n,{emit:e}){const t=n,r=e,s=d.computed(()=>({"!bg-brand-700 hover:!bg-brand-700":t.modelValue,"!h-3 !w-6":t.small,"focus:outline-none focus:ring-2 focus:ring-brand-700 focus:ring-offset-2":t.ring!==!1})),a=()=>{t.isDisabled||r("update:modelValue",!t.modelValue)};return(o,c)=>(d.openBlock(),d.createElementBlock("div",Ku,[d.createElementVNode("button",{type:"button",class:d.normalizeClass(["relative inline-flex h-5 w-10 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-gray-100 transition-colors duration-200 ease-in-out",s.value]),role:"switch","aria-checked":n.modelValue,onClick:a},[d.createElementVNode("span",{"aria-hidden":"true",class:d.normalizeClass(["pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",{"translate-x-5":n.modelValue,"translate-x-0":!n.modelValue,"!translate-x-3":n.small&&n.modelValue,"!h-2 !w-2":n.small}])},null,2)],10,Xu),n.title?(d.openBlock(),d.createElementBlock("span",Yu,d.toDisplayString(n.title),1)):d.createCommentVNode("",!0)]))}},Zu={class:"flex flex-col gap-2"},Qu=["value"],Ju={__name:"SiteContent",props:d.mergeModels({sites:{type:Object,required:!0},errors:{type:Object,required:!1,default:()=>({})}},{url:{},urlModifiers:{}}),emits:["update:url"],setup(n){const e=d.useModel(n,"url");return(t,r)=>(d.openBlock(),d.createElementBlock("div",Zu,[r[1]||(r[1]=d.createElementVNode("label",{class:"text-sm font-medium text-gray-700"},"Select a page from the site*",-1)),d.withDirectives(d.createElementVNode("select",{"onUpdate:modelValue":r[0]||(r[0]=s=>e.value=s),name:"url"},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.sites,s=>(d.openBlock(),d.createElementBlock("option",{value:s.href},d.toDisplayString(s.name),9,Qu))),256))],512),[[d.vModelSelect,e.value]])]))}},ef={__name:"ExternalPage",props:{url:{},urlModifiers:{}},emits:["update:url"],setup(n){const e=d.useModel(n,"url");return(t,r)=>(d.openBlock(),d.createBlock(Xn,{"is-vertical":"",field:"title","label-text":"URL *",class:"w-full"},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>e.value=s),name:"title",type:"text",placeholder:"Enter your url",class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,e.value]])]),_:1}))}},tf={class:"flex flex-col gap-5"},nf={key:0,class:"text-sm text-gray-700 font-medium py-2"},rf={class:"text-sm flex items-center gap-6 font-medium text-gray-700"},sf={class:"flex items-center gap-2 cursor-pointer"},of=["name","value","disabled"],af={class:"flex flex-col gap-2"},lf=["value"],cf={class:"flex items-center gap-2"},Qs={__name:"LinkedTo",props:d.mergeModels({label:{type:Object,required:!1},sites:{type:Object,required:!0},name:{type:String,required:!0},options:{type:Array,required:!1,default:["site-content","external-page"]}},{type:{default:"site-content"},typeModifiers:{},url:{},urlModifiers:{},openInNewTab:{},openInNewTabModifiers:{}}),emits:["update:type","update:url","update:openInNewTab"],setup(n){const e=d.useModel(n,"type"),t=d.useModel(n,"url"),r=d.useModel(n,"openInNewTab"),s=o=>o.split("-").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(" "),a=o=>({"site-content":Ju,"external-page":ef})[o]||null;return(o,c)=>(d.openBlock(),d.createElementBlock("div",tf,[d.createElementVNode("div",null,[n.label?(d.openBlock(),d.createElementBlock("p",nf,d.toDisplayString(n.label),1)):d.createCommentVNode("",!0),d.createElementVNode("div",rf,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.options,i=>(d.openBlock(),d.createElementBlock("label",sf,[d.withDirectives(d.createElementVNode("input",{name:n.name,type:"radio",value:i,"onUpdate:modelValue":c[0]||(c[0]=l=>e.value=l),class:"checked:bg-brand-600 hover:bg-brand-600 checked:hover:bg-brand-600 focus:bg-brand-600 focus:ring-brand-600 focus:checked:bg-brand-600 rounded-full",disabled:i==="form"},null,8,of),[[d.vModelRadio,e.value]]),d.createElementVNode("span",null,d.toDisplayString(s(i)),1)]))),256))])]),d.createElementVNode("div",af,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(a(e.value)),{url:t.value,"onUpdate:url":c[1]||(c[1]=i=>t.value=i),sites:n.sites},null,40,["url","sites"])),d.createElementVNode("input",{type:"hidden",name:"url",value:t.value},null,8,lf)]),d.createElementVNode("div",cf,[d.createVNode(ts,{class:"mb-1",name:"open_in_new_tab",modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=i=>r.value=i),title:"Open in a new tab"},null,8,["modelValue"])])]))}},uf={class:"flex justify-between pb-2"},ff={class:"flex justify-between w-full py-1"},df={class:"text-lg font-semibold text-gray-900"},hf={class:"text-sm text-gray-600 mt-1"},pf={class:"flex flex-col gap-3"},gf={class:"flex items-center justify-between"},mf={class:"text-lg font-semibold text-gray-900"},vf={class:"relative flex items-end"},yf={class:"flex flex-col gap-6"},bf={class:"flex flex-col gap-1.5"},xf=["onUpdate:modelValue"],Ef={__name:"VLinks",props:{...Mo},emits:["update"],setup(n,{emit:e}){const t=e,r=n,s=d.ref(r.data.component),a=d.ref(null),o=d.ref(null),c=d.ref(null);function i(){s.value.data.length>=s.value.max_items||(s.value.data.push(su()),d.nextTick(()=>{o.value&&o.value.scrollIntoView({behavior:"smooth"})}),t("update",s.value))}const l=h=>{var f;c.value=h,(f=a==null?void 0:a.value)==null||f.open(h)},u=h=>{s.value.data.splice(h,1),t("update",s.value)};return(h,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",uf,[d.createElementVNode("div",ff,[d.createElementVNode("div",null,[d.createElementVNode("p",df,d.toDisplayString(s.value.name),1),d.createElementVNode("p",hf,d.toDisplayString(s.value.supportive_text),1)]),d.createElementVNode("div",null,[d.createElementVNode("a",{onClick:i,class:d.normalizeClass(["text-sm cursor-pointer flex items-center justify-center gap-1 rounded-[99px] border border-brand-600 bg-brand-500 px-3.5 py-2 font-semibold text-white hover:bg-brand-600",{"border-gray-100 bg-gray-100 !text-gray-400 hover:bg-gray-100":s.value.data.length>=s.value.max_items}])},[d.createVNode(d.unref(Fo),{class:"h-5 w-5"}),f[0]||(f[0]=d.createElementVNode("span",null,"Add",-1))],2)])])]),d.createElementVNode("div",pf,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value.data,(m,g)=>(d.openBlock(),d.createElementBlock("div",{class:"flex flex-col gap-4 rounded-xl px-6 py-4 bg-gray-200",key:g,ref_for:!0,ref:g===s.value.data.length-1?v=>o.value=v:null},[d.createElementVNode("div",gf,[d.createElementVNode("div",mf," Link #"+d.toDisplayString(g+1),1),d.createElementVNode("div",vf,[d.createVNode(Uo,{onRemoveItem:v=>l(g)},null,8,["onRemoveItem"])])]),d.createElementVNode("div",yf,[d.createElementVNode("div",bf,[d.createVNode(Xn,{"is-vertical":"",field:"title","label-text":"Title *",class:"w-full mb-4",value:m.title,limit:20},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":v=>m.title=v,name:"title",type:"text",placeholder:"Title",maxlength:20,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,8,xf),[[d.vModelText,m.title]])]),_:2},1032,["value"]),d.createVNode(Qs,{label:"Linked to",name:`link_${g+1}`,type:m.type,"onUpdate:type":v=>m.type=v,url:m.link_to,"onUpdate:url":v=>m.link_to=v,openInNewTab:m.open_in_new_tab,"onUpdate:openInNewTab":v=>m.open_in_new_tab=v,sites:h.sites},null,8,["name","type","onUpdate:type","url","onUpdate:url","openInNewTab","onUpdate:openInNewTab","sites"])])])]))),128))]),d.createVNode(jo,{ref_key:"modalRef",ref:a,entity:"link",callback:u},null,512)],64))}},wf={class:"flex gap-4 px-6 overflow-auto"},Af={class:"flex w-[356px] flex-col gap-2"},Sf={class:"border-b border-gray-200 pb-2"},Tf=["onClick"],Nf={class:"text-lg font-semibold text-brand-800"},Of={class:"relative flex items-center gap-3"},Cf={class:"cursor-pointer"},Rf={key:0,class:"flex flex-col gap-2"},If=["onClick"],Lf={class:"flex flex-col"},kf={class:"text-sm font-medium text-gray-900"},Bf={class:"flex items-center justify-between gap-3 px-[10px]"},Pf={class:"flex h-full flex-1 flex-col rounded-xl bg-gray-50 px-6 py-5 mb-20"},Ff={class:"flex justify-between space-x-xsSpace pt-xsSpace gap-4 fixed bottom-0 w-full bg-gray-200 py-2 px-6"},Mf={__name:"PageBuilder",props:{modelValue:{required:!0,type:Object},sites:{type:Array,default:()=>[{href:"/admin",name:"Site 1"},{href:"/login",name:"Site 2"}]}},emits:["save","close"],setup(n,{emit:e}){var f;const t=e,r=n,s=d.ref(JSON.parse(window.localStorage.getItem("pageBuilderOpenStates"))),a=d.ref(((f=r.modelValue)==null?void 0:f.sections)??[]);let o=d.ref(null);const c=d.ref({sliders:d.markRaw(_u),links:d.markRaw(Ef)});s.value||(s.value={},a.value.forEach((m,g)=>{s.value[g]=!0}),window.localStorage.setItem("pageBuilderOpenStates",JSON.stringify(s.value)));const i=(m,g,v)=>{o.value={page:r.modelValue,component:g,componentIndex:v,sectionIndex:m}},l=()=>{t("close",r.modelValue)},u=()=>{t("save",r.modelValue)},h=d.computed(()=>{var m,g,v,x;return(g=(m=o.value)==null?void 0:m.component)!=null&&g.type?c.value[(x=(v=o.value)==null?void 0:v.component)==null?void 0:x.type]:""});return(m,g)=>{var v,x;return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",wf,[d.createElementVNode("div",Af,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.modelValue.sections,(T,S)=>(d.openBlock(),d.createElementBlock("div",Sf,[d.createElementVNode("div",{onClick:I=>s.value[S]=!s.value[S],class:"flex cursor-pointer items-center justify-between px-2 py-4"},[d.createElementVNode("span",Nf,d.toDisplayString(T.title),1),d.createElementVNode("div",Of,[d.createElementVNode("div",Cf,[s.value[S]?(d.openBlock(),d.createBlock(d.unref(Zc),{key:1,class:"h-5 w-5"})):(d.openBlock(),d.createBlock(d.unref(Po),{key:0,class:"h-5 w-5"}))])])],8,Tf),s.value[S]?(d.openBlock(),d.createElementBlock("div",Rf,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(T.components,(I,F)=>{var M,z;return d.openBlock(),d.createElementBlock("div",{onClick:X=>i(S,I,F),class:d.normalizeClass(["flex cursor-pointer items-center justify-between rounded-lg py-1.5 pl-6 pr-2 hover:bg-gray-100",{"bg-gray-200 hover:bg-gray-200":((M=d.unref(o))==null?void 0:M.sectionIndex)===S&&((z=d.unref(o))==null?void 0:z.componentIndex)===F}])},[d.createElementVNode("div",Lf,[g[0]||(g[0]=d.createElementVNode("div",{class:"text-xs text-gray-600"},"Sub-module",-1)),d.createElementVNode("div",kf,d.toDisplayString(I.name),1)]),d.createElementVNode("div",Bf,[d.createVNode(d.unref(Po),{class:"h-5 w-5"})])],10,If)}),256))])):d.createCommentVNode("",!0)]))),256))]),d.createElementVNode("div",Pf,[d.unref(o)?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(eu,{key:0})),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(h.value),{key:((v=d.unref(o))==null?void 0:v.sectionIndex)+((x=d.unref(o))==null?void 0:x.componentIndex),data:d.unref(o),sites:n.sites,onUpdate:m.update},null,40,["data","sites","onUpdate"]))])]),d.renderSlot(m.$slots,"default",{},()=>[d.createElementVNode("div",Ff,[d.createElementVNode("a",{onClick:l,class:"w-[200px] py-[9px] bg-white rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer"}," Cancel "),d.createElementVNode("a",{onClick:d.withModifiers(u,["prevent"]),class:"w-full py-[9px] rounded-full shadow-xs text-md font-semibold text-white bg-brand-600 hover:bg-brand-700 border border-brand-600 text-center cursor-pointer"},"Save changes")])])])}}},Df={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Uf(n,e){return d.openBlock(),d.createElementBlock("svg",Df,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 17 17 7m0 0H7m10 0v10"},null,-1)]))}const $o={render:Uf};/**
1
+ (function(Ye,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(Ye=typeof globalThis<"u"?globalThis:Ye||self,d(Ye.PageBuilder={},Ye.Vue))})(this,function(Ye,d){"use strict";var Dy=Object.defineProperty;var Uy=(Ye,d,Kn)=>d in Ye?Dy(Ye,d,{enumerable:!0,configurable:!0,writable:!0,value:Kn}):Ye[d]=Kn;var Ee=(Ye,d,Kn)=>Uy(Ye,typeof d!="symbol"?d+"":d,Kn);const Kn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Kc(n,e){return d.openBlock(),d.createElementBlock("svg",Kn,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18 6-6-6-6"},null,-1)]))}const Po={render:Kc},Xc={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Yc(n,e){return d.openBlock(),d.createElementBlock("svg",Xc,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9 6 6 6-6"},null,-1)]))}const Zc={render:Yc},es=(n,e)=>{const t=n.__vccOpts||n;for(const[r,s]of e)t[r]=s;return t},Qc={};function Jc(n,e){return e[0]||(e[0]=d.createStaticVNode('<div class="text-lg pb-6 font-semibold text-gray-900 border-b border-gray-200">Instruction</div><div class="flex flex-col gap-3 py-6 text-gray-600"><div class="font-semibold text-gray-900">Modules</div><p>Modules are fixed and for internal reference only, and admin users cannot make the following changes:</p><ul class="list-inside list-disc pl-3"><li>Edit the title of any module (e.g., &quot;Hero header&quot;).</li><li>Change the order of the modules.</li><li>Add new module.</li></ul><p>For any changes at the module level, please contact the development team.</p></div><div class="flex flex-col gap-3 py-6 text-gray-600"><div class="font-semibold text-gray-900">Edit sub-modules or edit nested items</div><p>Click any sub-module to edit its settings and any nested items within it.</p></div>',3))}const eu=es(Qc,[["render",Jc]]),tu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function nu(n,e){return d.openBlock(),d.createElementBlock("svg",tu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v14m-7-7h14"},null,-1)]))}const Fo={render:nu},Mo={data:{required:!0,type:Object},sites:{required:!0,type:Array}};function ru(n={}){return{title:"New slide",description:"New description",public:!1,featured_image:"",primary_button:{show:!1,label:"",type:"site-content",link_to:"",is_new_tab:!1,...n.primary_button||{}},secondary_button:{show:!1,label:"",type:"site-content",link_to:"",is_new_tab:!1,...n.secondary_button||{}},...n}}function su(n={}){return{title:"New link",link_to:"",open_in_new_tab:!0,type:"site-content",...n||{}}}const iu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function ou(n,e){return d.openBlock(),d.createElementBlock("svg",iu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2M19 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2M5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2"},null,-1)]))}const au={render:ou},lu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function cu(n,e){return d.openBlock(),d.createElementBlock("svg",lu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 6v-.8c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C14.48 2 13.92 2 12.8 2h-1.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C8 3.52 8 4.08 8 5.2V6m2 5.5v5m4-5v5M3 6h18m-2 0v11.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C16.72 22 15.88 22 14.2 22H9.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C5 19.72 5 18.88 5 17.2V6"},null,-1)]))}const Do={render:cu},uu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function fu(n,e){return d.openBlock(),d.createElementBlock("svg",uu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m2.5 21.5 5.55-2.134c.354-.137.532-.205.698-.294q.221-.12.42-.274c.149-.115.283-.25.552-.518L21 7a2.828 2.828 0 1 0-4-4L5.72 14.28c-.269.268-.403.403-.519.552a3 3 0 0 0-.273.42c-.089.166-.157.344-.294.699zm0 0 2.058-5.351c.147-.383.221-.575.347-.662a.5.5 0 0 1 .38-.08c.15.028.295.173.585.463l2.26 2.26c.29.29.435.434.464.585a.5.5 0 0 1-.08.38c-.089.126-.28.2-.663.347z"},null,-1)]))}const du={render:fu},hu={beforeMount:(n,e)=>{n.clickOutsideEvent=t=>{n===t.target||n.contains(t.target)||e.value()},document.addEventListener("click",n.clickOutsideEvent)},unmounted:n=>{document.removeEventListener("click",n.clickOutsideEvent)}},pu={class:"relative z-50"},gu={key:0,class:"absolute -left-60 top-6 w-[240px] rounded-lg border border-gray-200 bg-white text-sm"},Uo=Object.assign({directives:{clickOutside:hu}},{__name:"ActionMenu",props:{enableEdit:{type:Boolean,default:!1}},emits:["removeItem"],setup(n,{emit:e}){const t=d.ref(!1),r=e,s=()=>{t.value&&(t.value=!1)},a=()=>{r("removeItem"),t.value=!1},o=()=>{r("editItem"),t.value=!1};return(c,i)=>{const l=d.resolveDirective("click-outside");return d.withDirectives((d.openBlock(),d.createElementBlock("div",pu,[d.createElementVNode("div",{class:"cursor-pointer text-gray-600 rounded-full hover:bg-gray-50 p-2.5 block",onClick:i[0]||(i[0]=u=>t.value=!t.value)},[d.createVNode(d.unref(au),{class:"w-5"})]),t.value?(d.openBlock(),d.createElementBlock("div",gu,[n.enableEdit?(d.openBlock(),d.createElementBlock("a",{key:0,class:"flex items-center gap-2 px-2.5 cursor-pointer h-[48px] w-auto hover:bg-gray-100 rounded-lg m-1.5 text-gray-700",onClick:o},[d.createVNode(d.unref(du),{class:"w-4 text-gray-500"}),i[1]||(i[1]=d.createElementVNode("span",{class:"font-medium"}," Edit ",-1))])):d.createCommentVNode("",!0),d.createElementVNode("a",{class:"flex items-center gap-2 px-2.5 cursor-pointer h-[48px] w-auto hover:bg-gray-100 rounded-lg m-1.5 text-gray-700",onClick:a},[d.createVNode(d.unref(Do),{class:"w-4 text-gray-500"}),i[2]||(i[2]=d.createElementVNode("span",{class:"font-medium"}," Delete ",-1))])])):d.createCommentVNode("",!0)])),[[l,s]])}}}),mu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function vu(n,e){return d.openBlock(),d.createElementBlock("svg",mu,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"},null,-1)]))}const yu={render:vu},bu={key:0,class:"fixed min-w-[400px] left-1/2 top-1/2 z-50 flex max-h-screen -translate-x-1/2 -translate-y-1/2 transform flex-col rounded-xl border-tertiary-500 bg-white"},xu={class:"p-6 flex justify-between flex-col"},Eu={class:"flex justify-between"},wu={class:"p-2 rounded-full border-8 border-error-50 bg-error-100 text-error-600"},Au={class:"text-lg font-semibold text-gray-900 pb-2 pt-4"},Su={class:"text-sm text-gray-600 pb-4"},Tu={class:"flex justify-between space-x-xsSpace pt-xsSpace gap-4"},Nu=["textContent"],Ou=["textContent"],jo=es(d.defineComponent({__name:"VModal",props:{entity:{type:String,required:!0},callback:{type:Function,required:!1,default:()=>{}}},setup(n,{expose:e}){const t=n,r=d.ref(!1),s=d.reactive({cancelTitle:null,confirmTitle:null,scrollable:!0,data:null}),a=d.computed(()=>s.cancelTitle?s.cancelTitle:"Cancel"),o=d.computed(()=>s.confirmTitle?s.confirmTitle:"Delete"),c=u=>{r.value=!0,s.data=u},i=()=>{r.value=!1},l=async()=>{t.callback(s.data),r.value=!1};return e({open:c,close:i}),(u,h)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([{"-open":r.value},"v-modal"])},[d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[r.value?(d.openBlock(),d.createElementBlock("div",bu,[d.renderSlot(u.$slots,"default",{},()=>[d.createElementVNode("div",{class:d.normalizeClass(["relative min-h-[260px] overflow-y-auto flex",{"overflow-y-visible":!u.scrollable}])},[d.createElementVNode("div",xu,[d.createElementVNode("div",null,[d.createElementVNode("div",Eu,[d.createElementVNode("span",wu,[d.createVNode(d.unref(Do),{class:"w-6 h-6"})]),d.createVNode(d.unref(yu),{class:"w-6 h-6 text-gray-400 hover:bg-gray-100 rounded-md cursor-pointer",onClick:i})]),d.createElementVNode("h4",Au,"Delete this "+d.toDisplayString(n.entity)+"?",1),d.createElementVNode("p",Su,"Do you want to delete this "+d.toDisplayString(n.entity)+"? This action cannot be undone.",1)]),d.createElementVNode("div",Tu,[d.createElementVNode("a",{onClick:i,class:"w-1/2 py-[9px] rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer",textContent:d.toDisplayString(a.value)},null,8,Nu),d.createElementVNode("a",{onClick:d.withModifiers(l,["prevent"]),class:"w-1/2 py-[9px] rounded-full shadow-xs text-md font-semibold text-white bg-error-600 hover:bg-error-700 border border-error-600 text-center cursor-pointer",textContent:d.toDisplayString(o.value)},null,8,Ou)])])],2)],!0)])):d.createCommentVNode("",!0)]),_:3})],2))}}),[["__scopeId","data-v-0ca1257f"]]),Cu={class:"flex justify-between pb-2"},Ru={class:"text-lg font-semibold text-gray-900"},Iu={class:"flex flex-col gap-4"},Lu={class:"text-gray-600 border-b border-gray-200 pb-4 text-sm"},ku={class:"flex flex-col gap-3"},Bu={class:"flex justify-between"},Pu={class:"flex flex-col gap-1"},Fu={class:"text-sm text-gray-600"},Mu=["disabled"],Du={class:"flex flex-col gap-3"},Uu=["onClick"],ju=["onClick"],$u={class:"text-xs text-gray-600"},Vu={class:"text-sm font-medium text-gray-900"},_u={__name:"VSliders",props:{...Mo},emits:["update"],setup(n,{emit:e}){const t=e,r=n,s=d.ref(r.data.component),a=d.ref(null),o=d.ref(JSON.parse(window.localStorage.getItem("openSlideStates")));o.value||(o.value={},s.value.data.forEach((f,m)=>{o.value[m]=!1}),window.localStorage.setItem("openSlideStates",JSON.stringify(o.value)));const c=f=>{Object.keys(o.value).forEach(m=>{o.value[m]=!1}),o.value[f]=!o.value[f],window.localStorage.setItem("openSlideStates",JSON.stringify(o.value))},i=()=>{s.value.data.push(ru()),t("update",s.value)},l=f=>{var m;(m=a==null?void 0:a.value)==null||m.open(f)},u=f=>{s.value.data.splice(f,1),t("update",s.value)},h=(f,m)=>{var g,v,x,T;f.hasOwnProperty("edit_url")&&(window.location.href=f.edit_url),window.location.href=`/admin/pages/${(v=(g=r==null?void 0:r.data)==null?void 0:g.page)==null?void 0:v.id}/sections/${(x=r==null?void 0:r.data)==null?void 0:x.sectionIndex}/components/${(T=r==null?void 0:r.data)==null?void 0:T.componentIndex}/slides/${m}`};return(f,m)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",Cu,[d.createElementVNode("p",Ru,d.toDisplayString(s.value.name),1)]),d.createElementVNode("div",Iu,[d.createElementVNode("div",Lu,d.toDisplayString(s.value.supportive_text),1),d.createElementVNode("div",ku,[d.createElementVNode("div",Bu,[d.createElementVNode("div",Pu,[m[0]||(m[0]=d.createElementVNode("div",{class:"font-semibold text-gray-900"},"Sliders",-1)),d.createElementVNode("div",Fu,"This slider can contain up to "+d.toDisplayString(s.value.max_items)+" slides",1)]),d.createElementVNode("div",null,[d.createElementVNode("button",{disabled:s.value.data.length>=s.value.max_items,onClick:i,type:"button",class:d.normalizeClass(["text-sm cursor-pointer flex items-center justify-center gap-1 rounded-[99px] border border-brand-600 bg-brand-500 px-3.5 py-2 font-semibold text-white hover:bg-brand-600",{"border-gray-100 bg-gray-100 !text-gray-400 hover:bg-gray-100":s.value.data.length>=s.value.max_items}])},[d.createVNode(d.unref(Fo),{class:"h-5 w-5"}),m[1]||(m[1]=d.createElementVNode("span",null,"Add",-1))],10,Mu)])]),d.createElementVNode("div",Du,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value.data,(g,v)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["flex items-center gap-4 px-2 py-1 hover:bg-gray-100 rounded-lg",{"bg-gray-200 hover:bg-gray-200":o.value[v]}])},[d.createElementVNode("div",{class:"flex flex-1 items-center justify-between relative",onClick:x=>{c(v)}},[d.createElementVNode("div",{class:"flex flex-1 flex-col cursor-pointer",onClick:x=>h(g,v)},[d.createElementVNode("div",$u," Slider #"+d.toDisplayString(v+1),1),d.createElementVNode("div",Vu,d.toDisplayString(g.title),1)],8,ju),d.createVNode(Uo,{onRemoveItem:x=>l(v),"enable-edit":!0,onEditItem:x=>h(g,v)},null,8,["onRemoveItem","onEditItem"])],8,Uu)],2))),256))])])]),d.createVNode(jo,{ref_key:"modalRef",ref:a,entity:"slide",callback:u},null,512)],64))}},qu=["for"],zu={key:0,class:"v-field-label inline-block mb-2"},Hu={key:0},Gu={key:1,class:"absolute right-0 -bottom-6 text-sm text-gray-600 font-normal"},Wu={key:2,class:"absolute left-0 -bottom-6 text-sm text-gray-600 font-normal"},Xn={__name:"InputWrapper",props:{field:{type:String,required:!0},labelText:{type:String,default:""},value:{type:[String,Number],default:""},limit:{type:Number,default:null},showCount:{type:Boolean,default:!1},darkTheme:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1}},setup(n){return(e,t)=>{var r;return d.openBlock(),d.createElementBlock("label",{for:n.field,class:"block space-y-2xsSpace text-sm font-medium leading-none text-gray-700 relative"},[n.labelText||e.$slots.label?(d.openBlock(),d.createElementBlock("span",zu,[e.$slots.label?d.renderSlot(e.$slots,"label",{key:0}):(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[d.createTextVNode(d.toDisplayString(n.labelText)+" ",1),n.isRequired?(d.openBlock(),d.createElementBlock("span",Hu," *")):d.createCommentVNode("",!0)],64))])):d.createCommentVNode("",!0),d.renderSlot(e.$slots,"default"),n.limit?(d.openBlock(),d.createElementBlock("span",Gu,d.toDisplayString((r=n.value)==null?void 0:r.length)+"/"+d.toDisplayString(n.limit)+" characters ",1)):d.createCommentVNode("",!0),n.showCount?(d.openBlock(),d.createElementBlock("span",Wu," Word count: "+d.toDisplayString(n.value),1)):d.createCommentVNode("",!0)],8,qu)}}},Ku={class:"flex items-center gap-2"},Xu=["aria-checked"],Yu={key:0,class:"text-sm text-gray-700 font-medium"},ts={__name:"VToggle",props:{modelValue:{type:[Number,Boolean]},title:{type:String},isDisabled:{type:Boolean},small:{type:Boolean},ring:{type:Boolean}},emits:"update:modelValue",setup(n,{emit:e}){const t=n,r=e,s=d.computed(()=>({"!bg-brand-700 hover:!bg-brand-700":t.modelValue,"!h-3 !w-6":t.small,"focus:outline-none focus:ring-2 focus:ring-brand-700 focus:ring-offset-2":t.ring!==!1})),a=()=>{t.isDisabled||r("update:modelValue",!t.modelValue)};return(o,c)=>(d.openBlock(),d.createElementBlock("div",Ku,[d.createElementVNode("button",{type:"button",class:d.normalizeClass(["relative inline-flex h-5 w-10 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-gray-100 transition-colors duration-200 ease-in-out",s.value]),role:"switch","aria-checked":n.modelValue,onClick:a},[d.createElementVNode("span",{"aria-hidden":"true",class:d.normalizeClass(["pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",{"translate-x-5":n.modelValue,"translate-x-0":!n.modelValue,"!translate-x-3":n.small&&n.modelValue,"!h-2 !w-2":n.small}])},null,2)],10,Xu),n.title?(d.openBlock(),d.createElementBlock("span",Yu,d.toDisplayString(n.title),1)):d.createCommentVNode("",!0)]))}},Zu={class:"flex flex-col gap-2"},Qu=["value"],Ju={__name:"SiteContent",props:d.mergeModels({sites:{type:Object,required:!0},errors:{type:Object,required:!1,default:()=>({})}},{url:{},urlModifiers:{}}),emits:["update:url"],setup(n){const e=d.useModel(n,"url");return(t,r)=>(d.openBlock(),d.createElementBlock("div",Zu,[r[1]||(r[1]=d.createElementVNode("label",{class:"text-sm font-medium text-gray-700"},"Select a page from the site*",-1)),d.withDirectives(d.createElementVNode("select",{"onUpdate:modelValue":r[0]||(r[0]=s=>e.value=s),name:"url"},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.sites,s=>(d.openBlock(),d.createElementBlock("option",{value:s.href},d.toDisplayString(s.name),9,Qu))),256))],512),[[d.vModelSelect,e.value]])]))}},ef={__name:"ExternalPage",props:{url:{},urlModifiers:{}},emits:["update:url"],setup(n){const e=d.useModel(n,"url");return(t,r)=>(d.openBlock(),d.createBlock(Xn,{"is-vertical":"",field:"title","label-text":"URL *",class:"w-full"},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>e.value=s),name:"title",type:"text",placeholder:"Enter your url",class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,e.value]])]),_:1}))}},tf={class:"flex flex-col gap-5"},nf={key:0,class:"text-sm text-gray-700 font-medium py-2"},rf={class:"text-sm flex items-center gap-6 font-medium text-gray-700"},sf={class:"flex items-center gap-2 cursor-pointer"},of=["name","value","disabled"],af={class:"flex flex-col gap-2"},lf=["value"],cf={class:"flex items-center gap-2"},Qs={__name:"LinkedTo",props:d.mergeModels({label:{type:Object,required:!1},sites:{type:Object,required:!0},name:{type:String,required:!0},options:{type:Array,required:!1,default:["site-content","external-page"]}},{type:{default:"site-content"},typeModifiers:{},url:{},urlModifiers:{},openInNewTab:{},openInNewTabModifiers:{}}),emits:["update:type","update:url","update:openInNewTab"],setup(n){const e=d.useModel(n,"type"),t=d.useModel(n,"url"),r=d.useModel(n,"openInNewTab"),s=o=>o.split("-").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(" "),a=o=>({"site-content":Ju,"external-page":ef})[o]||null;return(o,c)=>(d.openBlock(),d.createElementBlock("div",tf,[d.createElementVNode("div",null,[n.label?(d.openBlock(),d.createElementBlock("p",nf,d.toDisplayString(n.label),1)):d.createCommentVNode("",!0),d.createElementVNode("div",rf,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.options,i=>(d.openBlock(),d.createElementBlock("label",sf,[d.withDirectives(d.createElementVNode("input",{name:n.name,type:"radio",value:i,"onUpdate:modelValue":c[0]||(c[0]=l=>e.value=l),class:"checked:bg-brand-600 hover:bg-brand-600 checked:hover:bg-brand-600 focus:bg-brand-600 focus:ring-brand-600 focus:checked:bg-brand-600 rounded-full",disabled:i==="form"},null,8,of),[[d.vModelRadio,e.value]]),d.createElementVNode("span",null,d.toDisplayString(s(i)),1)]))),256))])]),d.createElementVNode("div",af,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(a(e.value)),{url:t.value,"onUpdate:url":c[1]||(c[1]=i=>t.value=i),sites:n.sites},null,40,["url","sites"])),d.createElementVNode("input",{type:"hidden",name:"url",value:t.value},null,8,lf)]),d.createElementVNode("div",cf,[d.createVNode(ts,{class:"mb-1",name:"open_in_new_tab",modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=i=>r.value=i),title:"Open in a new tab"},null,8,["modelValue"])])]))}},uf={class:"flex justify-between pb-2"},ff={class:"flex justify-between w-full py-1"},df={class:"text-lg font-semibold text-gray-900"},hf={class:"text-sm text-gray-600 mt-1"},pf={class:"flex flex-col gap-3"},gf={class:"flex items-center justify-between"},mf={class:"text-lg font-semibold text-gray-900"},vf={class:"relative flex items-end"},yf={class:"flex flex-col gap-6"},bf={class:"flex flex-col gap-1.5"},xf=["onUpdate:modelValue"],Ef={__name:"VLinks",props:{...Mo},emits:["update"],setup(n,{emit:e}){const t=e,r=n,s=d.ref(r.data.component),a=d.ref(null),o=d.ref(null),c=d.ref(null);function i(){s.value.data.length>=s.value.max_items||(s.value.data.push(su()),d.nextTick(()=>{o.value&&o.value.scrollIntoView({behavior:"smooth"})}),t("update",s.value))}const l=h=>{var f;c.value=h,(f=a==null?void 0:a.value)==null||f.open(h)},u=h=>{s.value.data.splice(h,1),t("update",s.value)};return(h,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",uf,[d.createElementVNode("div",ff,[d.createElementVNode("div",null,[d.createElementVNode("p",df,d.toDisplayString(s.value.name),1),d.createElementVNode("p",hf,d.toDisplayString(s.value.supportive_text),1)]),d.createElementVNode("div",null,[d.createElementVNode("a",{onClick:i,class:d.normalizeClass(["text-sm cursor-pointer flex items-center justify-center gap-1 rounded-[99px] border border-brand-600 bg-brand-500 px-3.5 py-2 font-semibold text-white hover:bg-brand-600",{"border-gray-100 bg-gray-100 !text-gray-400 hover:bg-gray-100":s.value.data.length>=s.value.max_items}])},[d.createVNode(d.unref(Fo),{class:"h-5 w-5"}),f[0]||(f[0]=d.createElementVNode("span",null,"Add",-1))],2)])])]),d.createElementVNode("div",pf,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value.data,(m,g)=>(d.openBlock(),d.createElementBlock("div",{class:"flex flex-col gap-4 rounded-xl px-6 py-4 bg-gray-200",key:g,ref_for:!0,ref:g===s.value.data.length-1?v=>o.value=v:null},[d.createElementVNode("div",gf,[d.createElementVNode("div",mf," Link #"+d.toDisplayString(g+1),1),d.createElementVNode("div",vf,[d.createVNode(Uo,{onRemoveItem:v=>l(g)},null,8,["onRemoveItem"])])]),d.createElementVNode("div",yf,[d.createElementVNode("div",bf,[d.createVNode(Xn,{"is-vertical":"",field:"title","label-text":"Title *",class:"w-full mb-4",value:m.title,limit:20},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":v=>m.title=v,name:"title",type:"text",placeholder:"Title",maxlength:20,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,8,xf),[[d.vModelText,m.title]])]),_:2},1032,["value"]),d.createVNode(Qs,{label:"Linked to",name:`link_${g+1}`,type:m.type,"onUpdate:type":v=>m.type=v,url:m.link_to,"onUpdate:url":v=>m.link_to=v,openInNewTab:m.open_in_new_tab,"onUpdate:openInNewTab":v=>m.open_in_new_tab=v,sites:h.sites},null,8,["name","type","onUpdate:type","url","onUpdate:url","openInNewTab","onUpdate:openInNewTab","sites"])])])]))),128))]),d.createVNode(jo,{ref_key:"modalRef",ref:a,entity:"link",callback:u},null,512)],64))}},wf={class:"flex gap-4 px-6 overflow-auto"},Af={class:"flex w-[356px] flex-col gap-2"},Sf={class:"border-b border-gray-200 pb-2"},Tf=["onClick"],Nf={class:"text-lg font-semibold text-brand-800"},Of={class:"relative flex items-center gap-3"},Cf={class:"cursor-pointer"},Rf={key:0,class:"flex flex-col gap-2"},If=["onClick"],Lf={class:"flex flex-col"},kf={class:"text-sm font-medium text-gray-900"},Bf={class:"flex items-center justify-between gap-3 px-[10px]"},Pf={class:"flex h-full flex-1 flex-col rounded-xl bg-gray-50 px-6 py-5 mb-20"},Ff={class:"flex justify-between space-x-xsSpace pt-xsSpace gap-4 fixed bottom-0 w-full bg-gray-200 py-2 px-6"},Mf={__name:"PageBuilder",props:{modelValue:{required:!0,type:Object},sites:{type:Array,default:()=>[{href:"/admin",name:"Site 1"},{href:"/login",name:"Site 2"}]}},emits:["save","close"],setup(n,{emit:e}){var f;const t=e,r=n,s=d.ref(JSON.parse(window.localStorage.getItem("pageBuilderOpenStates"))),a=d.ref(((f=r.modelValue)==null?void 0:f.sections)??[]);let o=d.ref(null);const c=d.ref({sliders:d.markRaw(_u),links:d.markRaw(Ef)});s.value||(s.value={},a.value.forEach((m,g)=>{s.value[g]=!0}),window.localStorage.setItem("pageBuilderOpenStates",JSON.stringify(s.value)));const i=(m,g,v)=>{o.value={page:r.modelValue,component:g,componentIndex:v,sectionIndex:m}},l=()=>{t("close",r.modelValue)},u=()=>{t("save",r.modelValue)},h=d.computed(()=>{var m,g,v,x;return(g=(m=o.value)==null?void 0:m.component)!=null&&g.type?c.value[(x=(v=o.value)==null?void 0:v.component)==null?void 0:x.type]:""});return(m,g)=>{var v,x;return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",wf,[d.createElementVNode("div",Af,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.modelValue.sections,(T,S)=>(d.openBlock(),d.createElementBlock("div",Sf,[d.createElementVNode("div",{onClick:I=>s.value[S]=!s.value[S],class:"flex cursor-pointer items-center justify-between px-2 py-4"},[d.createElementVNode("span",Nf,d.toDisplayString(T.title),1),d.createElementVNode("div",Of,[d.createElementVNode("div",Cf,[s.value[S]?(d.openBlock(),d.createBlock(d.unref(Zc),{key:1,class:"h-5 w-5"})):(d.openBlock(),d.createBlock(d.unref(Po),{key:0,class:"h-5 w-5"}))])])],8,Tf),s.value[S]?(d.openBlock(),d.createElementBlock("div",Rf,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(T.components,(I,F)=>{var M,z;return d.openBlock(),d.createElementBlock("div",{onClick:X=>i(S,I,F),class:d.normalizeClass(["flex cursor-pointer items-center justify-between rounded-lg py-1.5 pl-6 pr-2 hover:bg-gray-100",{"bg-gray-200 hover:bg-gray-200":((M=d.unref(o))==null?void 0:M.sectionIndex)===S&&((z=d.unref(o))==null?void 0:z.componentIndex)===F}])},[d.createElementVNode("div",Lf,[g[0]||(g[0]=d.createElementVNode("div",{class:"text-xs text-gray-600"},"Sub-module",-1)),d.createElementVNode("div",kf,d.toDisplayString(I.name),1)]),d.createElementVNode("div",Bf,[d.createVNode(d.unref(Po),{class:"h-5 w-5"})])],10,If)}),256))])):d.createCommentVNode("",!0)]))),256))]),d.createElementVNode("div",Pf,[d.unref(o)?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(eu,{key:0})),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(h.value),{key:((v=d.unref(o))==null?void 0:v.sectionIndex)+((x=d.unref(o))==null?void 0:x.componentIndex),data:d.unref(o),sites:n.sites,onUpdate:m.update},null,40,["data","sites","onUpdate"]))])]),d.renderSlot(m.$slots,"default",{},()=>[d.createElementVNode("div",Ff,[d.createElementVNode("a",{onClick:l,class:"w-[200px] py-[9px] bg-white rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer"}," Cancel "),d.createElementVNode("a",{onClick:d.withModifiers(u,["prevent"]),class:"w-full py-[9px] rounded-full shadow-xs text-md font-semibold text-white bg-brand-600 hover:bg-brand-700 border border-brand-600 text-center cursor-pointer"},"Save changes")])])])}}},Df={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Uf(n,e){return d.openBlock(),d.createElementBlock("svg",Df,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 17 17 7m0 0H7m10 0v10"},null,-1)]))}const $o={render:Uf};/**
2
2
  * Vue 3 Carousel 0.15.1
3
3
  * (c) 2025
4
4
  * @license MIT
@@ -40,19 +40,19 @@ ${xs(this.code(e,t))}
40
40
  `);if(e.length()>0&&n.nextSibling){let r=n.nextSibling;for(;r!=null;){if(Tn(r,t))return e.insert(`
41
41
  `);const s=t.query(r);if(s&&s.prototype instanceof Bt)return e.insert(`
42
42
  `);r=r.firstChild}}}return e}function Yv(n,e,t){var a;const r={},s=n.style||{};return s.fontStyle==="italic"&&(r.italic=!0),s.textDecoration==="underline"&&(r.underline=!0),s.textDecoration==="line-through"&&(r.strike=!0),((a=s.fontWeight)!=null&&a.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce((o,c)=>{let[i,l]=c;return $n(o,i,l,t)},e),parseFloat(s.textIndent||0)>0?new Te().insert(" ").concat(e):e}function Zv(n,e,t){var s,a;const r=((s=n.parentElement)==null?void 0:s.tagName)==="TABLE"?n.parentElement:(a=n.parentElement)==null?void 0:a.parentElement;if(r!=null){const c=Array.from(r.querySelectorAll("tr")).indexOf(n)+1;return $n(e,"table",c,t)}return e}function Qv(n,e,t){var s;let r=n.data;if(((s=n.parentElement)==null?void 0:s.tagName)==="O:P")return e.insert(r.trim());if(!jl(n)){if(r.trim().length===0&&r.includes(`
43
- `)&&!_v(n,t))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(n.previousSibling==null&&n.parentElement!=null&&Tn(n.parentElement,t)||n.previousSibling instanceof Element&&Tn(n.previousSibling,t))&&(r=r.replace(/^ /,"")),(n.nextSibling==null&&n.parentElement!=null&&Tn(n.parentElement,t)||n.nextSibling instanceof Element&&Tn(n.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class Vl extends zt{constructor(t,r){super(t,r);Ee(this,"lastRecorded",0);Ee(this,"ignoreChange",!1);Ee(this,"stack",{undo:[],redo:[]});Ee(this,"currentRange",null);this.quill.on(le.events.EDITOR_CHANGE,(s,a,o,c)=>{s===le.events.SELECTION_CHANGE?a&&c!==le.sources.SILENT&&(this.currentRange=a):s===le.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||c===le.sources.USER?this.record(a,o):this.transform(a)),this.currentRange=Wi(this.currentRange,a))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;const s=this.stack[t].pop();if(!s)return;const a=this.quill.getContents(),o=s.delta.invert(a);this.stack[r].push({delta:o,range:Wi(s.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,le.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let s=t.invert(r),a=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const c=this.stack.undo.pop();c&&(s=s.compose(c.delta),a=c.range)}else this.lastRecorded=o;s.length()!==0&&(this.stack.undo.push({delta:s,range:a}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){_l(this.stack.undo,t),_l(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,le.sources.USER);else{const r=e1(this.quill.scroll,t.delta);this.quill.setSelection(r,le.sources.USER)}}}Ee(Vl,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function _l(n,e){let t=e;for(let r=n.length-1;r>=0;r-=1){const s=n[r];n[r]={delta:t.transform(s.delta,!0),range:s.range&&Wi(s.range,t)},t=s.delta.transform(t),n[r].delta.length()===0&&n.splice(r,1)}}function Jv(n,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
44
- `):t.attributes!=null?Object.keys(t.attributes).some(r=>n.query(r,Ne.BLOCK)!=null):!1}function e1(n,e){const t=e.reduce((s,a)=>s+(a.delete||0),0);let r=e.length()-t;return Jv(n,e)&&(r-=1),r}function Wi(n,e){if(!n)return n;const t=e.transformPosition(n.index),r=e.transformPosition(n.index+n.length);return{index:t,length:r-t}}class ql extends zt{constructor(e,t){super(e,t),e.root.addEventListener("drop",r=>{var o;r.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const c=document.caretPositionFromPoint(r.clientX,r.clientY);s=document.createRange(),s.setStart(c.offsetNode,c.offset),s.setEnd(c.offsetNode,c.offset)}const a=s&&e.selection.normalizeNative(s);if(a){const c=e.selection.normalizedToRange(a);(o=r.dataTransfer)!=null&&o.files&&this.upload(c,r.dataTransfer.files)}})}upload(e,t){const r=[];Array.from(t).forEach(s=>{var a;s&&((a=this.options.mimetypes)!=null&&a.includes(s.type))&&r.push(s)}),r.length>0&&this.options.handler.call(this,e,r)}}ql.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,e){if(!this.quill.scroll.query("image"))return;const t=e.map(r=>new Promise(s=>{const a=new FileReader;a.onload=()=>{s(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{const s=r.reduce((a,o)=>a.insert({image:o}),new Te().retain(n.index).delete(n.length));this.quill.updateContents(s,Se.sources.USER),this.quill.setSelection(n.index+r.length,Se.sources.SILENT)})}};const t1=["insertText","insertReplacementText"];class n1 extends zt{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||e.on(le.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){zi({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const r=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new Te().retain(e.index).insert(t,r),le.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,le.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!t1.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const r=r1(e);if(r==null)return;const s=this.quill.selection.normalizeNative(t),a=s?this.quill.selection.normalizedToRange(s):null;a&&this.replaceText(a,r)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function r1(n){var e;return typeof n.data=="string"?n.data:(e=n.dataTransfer)!=null&&e.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const s1=/Mac/i.test(navigator.platform),i1=100,o1=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||s1&&n.key==="a"&&n.ctrlKey===!0);class a1 extends zt{constructor(t,r){super(t,r);Ee(this,"isListening",!1);Ee(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:s,event:a}=r;if(!(s instanceof Vt)||!s.uiNode)return!0;const o=getComputedStyle(s.domNode).direction==="rtl";return o&&a.key!=="ArrowRight"||!o&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),le.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&o1(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+i1,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const s=this.quill.scroll.find(r.startContainer);if(!(s instanceof Vt)||!s.uiNode)return;const a=document.createRange();a.setStartAfter(s.uiNode),a.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(a)}}le.register({"blots/block":ht,"blots/block/embed":Bt,"blots/break":_t,"blots/container":Un,"blots/cursor":sr,"blots/embed":Fi,"blots/inline":tn,"blots/scroll":lr,"blots/text":qt,"modules/clipboard":Ul,"modules/history":Vl,"modules/keyboard":Ss,"modules/uploader":ql,"modules/input":n1,"modules/uiNode":a1});class l1 extends $t{add(e,t){let r=0;if(t==="+1"||t==="-1"){const s=this.value(e)||0;r=t==="+1"?s+1:s-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(e),!0):super.add(e,r.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const c1=new l1("indent","ql-indent",{scope:Ne.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Ki extends ht{}Ee(Ki,"blotName","blockquote"),Ee(Ki,"tagName","blockquote");class Xi extends ht{static formats(e){return this.tagName.indexOf(e.tagName)+1}}Ee(Xi,"blotName","header"),Ee(Xi,"tagName",["H1","H2","H3","H4","H5","H6"]);class Fr extends Un{}Fr.blotName="list-container",Fr.tagName="OL";class Mr extends ht{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){le.register(Fr)}constructor(e,t){super(e,t);const r=t.ownerDocument.createElement("span"),s=a=>{if(!e.isEnabled())return;const o=this.statics.formats(t,e);o==="checked"?(this.format("list","unchecked"),a.preventDefault()):o==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",s),r.addEventListener("touchstart",s),this.attachUI(r)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Mr.blotName="list",Mr.tagName="LI",Fr.allowedChildren=[Mr],Mr.requiredContainer=Fr;class Dr extends tn{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Ee(Dr,"blotName","bold"),Ee(Dr,"tagName",["STRONG","B"]);class Yi extends Dr{}Ee(Yi,"blotName","italic"),Ee(Yi,"tagName",["EM","I"]);class Nn extends tn{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return zl(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}Ee(Nn,"blotName","link"),Ee(Nn,"tagName","A"),Ee(Nn,"SANITIZED_URL","about:blank"),Ee(Nn,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function zl(n,e){const t=document.createElement("a");t.href=n;const r=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(r)>-1}class Zi extends tn{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}Ee(Zi,"blotName","script"),Ee(Zi,"tagName",["SUB","SUP"]);class Qi extends Dr{}Ee(Qi,"blotName","strike"),Ee(Qi,"tagName",["S","STRIKE"]);class Ji extends tn{}Ee(Ji,"blotName","underline"),Ee(Ji,"tagName","U");class Os extends Fi{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}Ee(Os,"blotName","formula"),Ee(Os,"className","ql-formula"),Ee(Os,"tagName","SPAN");const Hl=["alt","height","width"];class eo extends Rt{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Hl.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return zl(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){Hl.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Ee(eo,"blotName","image"),Ee(eo,"tagName","IMG");const Gl=["height","width"];class Cs extends Bt{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Gl.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static sanitize(e){return Nn.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Gl.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}Ee(Cs,"blotName","video"),Ee(Cs,"className","ql-video"),Ee(Cs,"tagName","IFRAME");const Ur=new $t("code-token","hljs",{scope:Ne.INLINE});class hn extends tn{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(vt.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,r){super(e,t,r),Ur.add(this.domNode,r)}format(e,t){e!==hn.blotName?super.format(e,t):t?Ur.add(this.domNode,t):(Ur.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Ur.value(this.domNode)||this.unwrap()}}hn.blotName="code-token",hn.className="ql-token";class Ft extends vt{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),hn.blotName,!1),super.replaceWith(e,t)}}class jr extends jn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Ft.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(e,t)}))}formatAt(e,t,r,s){r===Ft.blotName&&(this.forceNext=!0),super.formatAt(e,t,r,s)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
43
+ `)&&!_v(n,t))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(n.previousSibling==null&&n.parentElement!=null&&Tn(n.parentElement,t)||n.previousSibling instanceof Element&&Tn(n.previousSibling,t))&&(r=r.replace(/^ /,"")),(n.nextSibling==null&&n.parentElement!=null&&Tn(n.parentElement,t)||n.nextSibling instanceof Element&&Tn(n.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class Vl extends zt{constructor(t,r){super(t,r);Ee(this,"lastRecorded",0);Ee(this,"ignoreChange",!1);Ee(this,"stack",{undo:[],redo:[]});Ee(this,"currentRange",null);this.quill.on(le.events.EDITOR_CHANGE,(s,a,o,c)=>{s===le.events.SELECTION_CHANGE?a&&c!==le.sources.SILENT&&(this.currentRange=a):s===le.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||c===le.sources.USER?this.record(a,o):this.transform(a)),this.currentRange=Wi(this.currentRange,a))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;const s=this.stack[t].pop();if(!s)return;const a=this.quill.getContents(),o=s.delta.invert(a);this.stack[r].push({delta:o,range:Wi(s.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,le.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let s=t.invert(r),a=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const c=this.stack.undo.pop();c&&(s=s.compose(c.delta),a=c.range)}else this.lastRecorded=o;s.length()!==0&&(this.stack.undo.push({delta:s,range:a}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){_l(this.stack.undo,t),_l(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,le.sources.USER);else{const r=e0(this.quill.scroll,t.delta);this.quill.setSelection(r,le.sources.USER)}}}Ee(Vl,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function _l(n,e){let t=e;for(let r=n.length-1;r>=0;r-=1){const s=n[r];n[r]={delta:t.transform(s.delta,!0),range:s.range&&Wi(s.range,t)},t=s.delta.transform(t),n[r].delta.length()===0&&n.splice(r,1)}}function Jv(n,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
44
+ `):t.attributes!=null?Object.keys(t.attributes).some(r=>n.query(r,Ne.BLOCK)!=null):!1}function e0(n,e){const t=e.reduce((s,a)=>s+(a.delete||0),0);let r=e.length()-t;return Jv(n,e)&&(r-=1),r}function Wi(n,e){if(!n)return n;const t=e.transformPosition(n.index),r=e.transformPosition(n.index+n.length);return{index:t,length:r-t}}class ql extends zt{constructor(e,t){super(e,t),e.root.addEventListener("drop",r=>{var o;r.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const c=document.caretPositionFromPoint(r.clientX,r.clientY);s=document.createRange(),s.setStart(c.offsetNode,c.offset),s.setEnd(c.offsetNode,c.offset)}const a=s&&e.selection.normalizeNative(s);if(a){const c=e.selection.normalizedToRange(a);(o=r.dataTransfer)!=null&&o.files&&this.upload(c,r.dataTransfer.files)}})}upload(e,t){const r=[];Array.from(t).forEach(s=>{var a;s&&((a=this.options.mimetypes)!=null&&a.includes(s.type))&&r.push(s)}),r.length>0&&this.options.handler.call(this,e,r)}}ql.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,e){if(!this.quill.scroll.query("image"))return;const t=e.map(r=>new Promise(s=>{const a=new FileReader;a.onload=()=>{s(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{const s=r.reduce((a,o)=>a.insert({image:o}),new Te().retain(n.index).delete(n.length));this.quill.updateContents(s,Se.sources.USER),this.quill.setSelection(n.index+r.length,Se.sources.SILENT)})}};const t0=["insertText","insertReplacementText"];class n0 extends zt{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||e.on(le.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){zi({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const r=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new Te().retain(e.index).insert(t,r),le.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,le.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!t0.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const r=r0(e);if(r==null)return;const s=this.quill.selection.normalizeNative(t),a=s?this.quill.selection.normalizedToRange(s):null;a&&this.replaceText(a,r)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function r0(n){var e;return typeof n.data=="string"?n.data:(e=n.dataTransfer)!=null&&e.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const s0=/Mac/i.test(navigator.platform),i0=100,o0=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||s0&&n.key==="a"&&n.ctrlKey===!0);class a0 extends zt{constructor(t,r){super(t,r);Ee(this,"isListening",!1);Ee(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:s,event:a}=r;if(!(s instanceof Vt)||!s.uiNode)return!0;const o=getComputedStyle(s.domNode).direction==="rtl";return o&&a.key!=="ArrowRight"||!o&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),le.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&o0(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+i0,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const s=this.quill.scroll.find(r.startContainer);if(!(s instanceof Vt)||!s.uiNode)return;const a=document.createRange();a.setStartAfter(s.uiNode),a.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(a)}}le.register({"blots/block":ht,"blots/block/embed":Bt,"blots/break":_t,"blots/container":Un,"blots/cursor":sr,"blots/embed":Fi,"blots/inline":tn,"blots/scroll":lr,"blots/text":qt,"modules/clipboard":Ul,"modules/history":Vl,"modules/keyboard":Ss,"modules/uploader":ql,"modules/input":n0,"modules/uiNode":a0});class l0 extends $t{add(e,t){let r=0;if(t==="+1"||t==="-1"){const s=this.value(e)||0;r=t==="+1"?s+1:s-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(e),!0):super.add(e,r.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const c0=new l0("indent","ql-indent",{scope:Ne.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Ki extends ht{}Ee(Ki,"blotName","blockquote"),Ee(Ki,"tagName","blockquote");class Xi extends ht{static formats(e){return this.tagName.indexOf(e.tagName)+1}}Ee(Xi,"blotName","header"),Ee(Xi,"tagName",["H1","H2","H3","H4","H5","H6"]);class Fr extends Un{}Fr.blotName="list-container",Fr.tagName="OL";class Mr extends ht{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){le.register(Fr)}constructor(e,t){super(e,t);const r=t.ownerDocument.createElement("span"),s=a=>{if(!e.isEnabled())return;const o=this.statics.formats(t,e);o==="checked"?(this.format("list","unchecked"),a.preventDefault()):o==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",s),r.addEventListener("touchstart",s),this.attachUI(r)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Mr.blotName="list",Mr.tagName="LI",Fr.allowedChildren=[Mr],Mr.requiredContainer=Fr;class Dr extends tn{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Ee(Dr,"blotName","bold"),Ee(Dr,"tagName",["STRONG","B"]);class Yi extends Dr{}Ee(Yi,"blotName","italic"),Ee(Yi,"tagName",["EM","I"]);class Nn extends tn{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return zl(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}Ee(Nn,"blotName","link"),Ee(Nn,"tagName","A"),Ee(Nn,"SANITIZED_URL","about:blank"),Ee(Nn,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function zl(n,e){const t=document.createElement("a");t.href=n;const r=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(r)>-1}class Zi extends tn{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}Ee(Zi,"blotName","script"),Ee(Zi,"tagName",["SUB","SUP"]);class Qi extends Dr{}Ee(Qi,"blotName","strike"),Ee(Qi,"tagName",["S","STRIKE"]);class Ji extends tn{}Ee(Ji,"blotName","underline"),Ee(Ji,"tagName","U");class Os extends Fi{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}Ee(Os,"blotName","formula"),Ee(Os,"className","ql-formula"),Ee(Os,"tagName","SPAN");const Hl=["alt","height","width"];class eo extends Rt{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Hl.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return zl(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){Hl.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Ee(eo,"blotName","image"),Ee(eo,"tagName","IMG");const Gl=["height","width"];class Cs extends Bt{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Gl.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static sanitize(e){return Nn.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Gl.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}Ee(Cs,"blotName","video"),Ee(Cs,"className","ql-video"),Ee(Cs,"tagName","IFRAME");const Ur=new $t("code-token","hljs",{scope:Ne.INLINE});class hn extends tn{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(vt.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,r){super(e,t,r),Ur.add(this.domNode,r)}format(e,t){e!==hn.blotName?super.format(e,t):t?Ur.add(this.domNode,t):(Ur.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Ur.value(this.domNode)||this.unwrap()}}hn.blotName="code-token",hn.className="ql-token";class Ft extends vt{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),hn.blotName,!1),super.replaceWith(e,t)}}class jr extends jn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Ft.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(e,t)}))}formatAt(e,t,r,s){r===Ft.blotName&&(this.forceNext=!0),super.formatAt(e,t,r,s)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
45
45
  `)}
46
46
  `,a=Ft.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const o=this.children.reduce((i,l)=>i.concat(dl(l,!1)),new Te),c=e(s,a);o.diff(c).reduce((i,l)=>{let{retain:u,attributes:h}=l;return u?(h&&Object.keys(h).forEach(f=>{[Ft.blotName,hn.blotName].includes(f)&&this.formatAt(i,u,f,h[f])}),i+u):i},0)}this.cachedText=s,this.forceNext=!1}}html(e,t){const[r]=this.children.find(e);return`<pre data-language="${r?Ft.formats(r.domNode):"plain"}">
47
47
  ${xs(this.code(e,t))}
48
- </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=Ft.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}jr.allowedChildren=[Ft],Ft.requiredContainer=jr,Ft.allowedChildren=[hn,sr,qt,_t];const u1=(n,e,t)=>{if(typeof n.versionString=="string"){const r=n.versionString.split(".")[0];if(parseInt(r,10)>=11)return n.highlight(t,{language:e}).value}return n.highlight(e,t).value};class Wl extends zt{static register(){le.register(hn,!0),le.register(Ft,!0),le.register(jr,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,s)=>{let{key:a}=s;return r[a]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(le.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof jr))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:s,label:a}=r;const o=t.ownerDocument.createElement("option");o.textContent=a,o.setAttribute("value",s),t.appendChild(o)}),t.addEventListener("change",()=>{e.format(Ft.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=Ft.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(le.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(le.sources.USER);const r=this.quill.getSelection();(e==null?this.quill.scroll.descendants(jr):[e]).forEach(a=>{a.highlight(this.highlightBlot,t)}),this.quill.update(le.sources.SILENT),r!=null&&this.quill.setSelection(r,le.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return xs(e).split(`
48
+ </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=Ft.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}jr.allowedChildren=[Ft],Ft.requiredContainer=jr,Ft.allowedChildren=[hn,sr,qt,_t];const u0=(n,e,t)=>{if(typeof n.versionString=="string"){const r=n.versionString.split(".")[0];if(parseInt(r,10)>=11)return n.highlight(t,{language:e}).value}return n.highlight(e,t).value};class Wl extends zt{static register(){le.register(hn,!0),le.register(Ft,!0),le.register(jr,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,s)=>{let{key:a}=s;return r[a]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(le.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof jr))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:s,label:a}=r;const o=t.ownerDocument.createElement("option");o.textContent=a,o.setAttribute("value",s),t.appendChild(o)}),t.addEventListener("change",()=>{e.format(Ft.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=Ft.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(le.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(le.sources.USER);const r=this.quill.getSelection();(e==null?this.quill.scroll.descendants(jr):[e]).forEach(a=>{a.highlight(this.highlightBlot,t)}),this.quill.update(le.sources.SILENT),r!=null&&this.quill.setSelection(r,le.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return xs(e).split(`
49
49
  `).reduce((s,a,o)=>(o!==0&&s.insert(`
50
- `,{[vt.blotName]:t}),s.insert(a)),new Te);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(vt.className),r.innerHTML=u1(this.options.hljs,t,e),Hi(this.quill.scroll,r,[(s,a)=>{const o=Ur.value(s);return o?a.compose(new Te().retain(a.length(),{[hn.blotName]:o})):a}],[(s,a)=>s.data.split(`
50
+ `,{[vt.blotName]:t}),s.insert(a)),new Te);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(vt.className),r.innerHTML=u0(this.options.hljs,t,e),Hi(this.quill.scroll,r,[(s,a)=>{const o=Ur.value(s);return o?a.compose(new Te().retain(a.length(),{[hn.blotName]:o})):a}],[(s,a)=>s.data.split(`
51
51
  `).reduce((o,c,i)=>(i!==0&&o.insert(`
52
- `,{[vt.blotName]:t}),o.insert(c)),a)],new WeakMap)}}Wl.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Xr=class Xr extends ht{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",to()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Xr.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Ee(Xr,"blotName","table"),Ee(Xr,"tagName","TD");let Gt=Xr;class pn extends Un{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===t.table&&e.table===r.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const r=t.formats(),s=t.next.formats();if(r.table!==s.table){const a=this.splitAfter(t);a&&a.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Ee(pn,"blotName","table-row"),Ee(pn,"tagName","TR");class nn extends Un{}Ee(nn,"blotName","table-body"),Ee(nn,"tagName","TBODY");class cr extends Un{balanceCells(){const e=this.descendants(pn),t=e.reduce((r,s)=>Math.max(s.children.length,r),0);e.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let s;r.children.head!=null&&(s=Gt.formats(r.children.head.domNode));const a=this.scroll.create(Gt.blotName,s);r.appendChild(a),a.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(nn);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e);s!=null&&s.remove()})}insertColumn(e){const[t]=this.descendant(nn);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e),a=Gt.formats(r.children.head.domNode),o=this.scroll.create(Gt.blotName,a);r.insertBefore(o,s)})}insertRow(e){const[t]=this.descendant(nn);if(t==null||t.children.head==null)return;const r=to(),s=this.scroll.create(pn.blotName);t.children.head.children.forEach(()=>{const o=this.scroll.create(Gt.blotName,r);s.appendChild(o)});const a=t.children.at(e);t.insertBefore(s,a)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Ee(cr,"blotName","table-container"),Ee(cr,"tagName","TABLE"),cr.allowedChildren=[nn],nn.requiredContainer=cr,nn.allowedChildren=[pn],pn.requiredContainer=nn,pn.allowedChildren=[Gt],Gt.requiredContainer=pn;function to(){return`row-${Math.random().toString(36).slice(2,6)}`}class f1 extends zt{static register(){le.register(Gt),le.register(pn),le.register(nn),le.register(cr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(cr).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(le.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(le.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(le.sources.USER),this.quill.setSelection(t,le.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,r]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==Gt.blotName)return[null,null,null,-1];const s=t.parent;return[s.parent.parent,s,t,r]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[r,s,a]=this.getTable(t);if(a==null)return;const o=a.cellOffset();r.insertColumn(o+e),this.quill.update(le.sources.USER);let c=s.rowOffset();e===0&&(c+=1),this.quill.setSelection(t.index+c,t.length,le.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[r,s,a]=this.getTable(t);if(a==null)return;const o=s.rowOffset();r.insertRow(o+e),this.quill.update(le.sources.USER),e>0?this.quill.setSelection(t,le.sources.SILENT):this.quill.setSelection(t.index+s.children.length,t.length,le.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const r=this.quill.getSelection();if(r==null)return;const s=new Array(e).fill(0).reduce(a=>{const o=new Array(t).fill(`
53
- `).join("");return a.insert(o,{table:to()})},new Te().retain(r.index));this.quill.updateContents(s,le.sources.USER),this.quill.setSelection(r.index,le.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(le.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(le.events.TEXT_CHANGE,(r,s,a)=>{a===le.sources.USER&&this.balanceTables()}),!0):!1)})}}const Kl=fn("quill:toolbar");class no extends zt{constructor(e,t){var r,s;if(super(e,t),Array.isArray(this.options.container)){const a=document.createElement("div");a.setAttribute("role","toolbar"),d1(a,this.options.container),(s=(r=e.container)==null?void 0:r.parentNode)==null||s.insertBefore(a,e.container),this.container=a}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Kl.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(a=>{var c;const o=(c=this.options.handlers)==null?void 0:c[a];o&&this.addHandler(a,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(a=>{this.attach(a)}),this.quill.on(le.events.EDITOR_CHANGE,()=>{const[a]=this.quill.selection.getRange();this.update(a)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Kl.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,s=>{let a;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const c=e.options[e.selectedIndex];c.hasAttribute("selected")?a=!1:a=c.value||!1}else e.classList.contains("ql-active")?a=!1:a=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof Rt){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new Te().retain(o.index).delete(o.length).insert({[t]:a}),le.sources.USER)}else this.quill.format(t,a,le.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[s,a]=r;if(a.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[s]==null)o=a.querySelector("option[selected]");else if(!Array.isArray(t[s])){let c=t[s];typeof c=="string"&&(c=c.replace(/"/g,'\\"')),o=a.querySelector(`option[value="${c}"]`)}o==null?(a.value="",a.selectedIndex=-1):o.selected=!0}else if(e==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){const o=t[s],c=o===a.getAttribute("value")||o!=null&&o.toString()===a.getAttribute("value")||o==null&&!a.getAttribute("value");a.classList.toggle("ql-active",c),a.setAttribute("aria-pressed",c.toString())}else{const o=t[s]!=null;a.classList.toggle("ql-active",o),a.setAttribute("aria-pressed",o.toString())}})}}no.DEFAULTS={};function Xl(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function d1(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")Xl(r,s);else{const a=Object.keys(s)[0],o=s[a];Array.isArray(o)?h1(r,a,o):Xl(r,a,o)}}),n.appendChild(r)})}function h1(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(s=>{const a=document.createElement("option");s!==!1?a.setAttribute("value",String(s)):a.setAttribute("selected","selected"),r.appendChild(a)}),n.appendChild(r)}no.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Ne.INLINE)!=null&&this.quill.format(t,!1,le.sources.USER)})}else this.quill.removeFormat(n.index,n.length,le.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",le.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,le.sources.USER),this.quill.format("direction",n,le.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let s=n==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,le.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,le.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,le.sources.USER):this.quill.format("list","unchecked",le.sources.USER):this.quill.format("list",n,le.sources.USER)}}};const p1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',g1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',m1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',v1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',y1='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',b1='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',x1='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',E1='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Yl='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',$r={align:{"":p1,center:g1,right:m1,justify:v1},background:y1,blockquote:b1,bold:x1,clean:E1,code:Yl,"code-block":Yl,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},w1='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Zl=0;function Ql(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class Rs{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Ql(this.label,"aria-expanded"),Ql(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=w1,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Zl}`,Zl+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class Jl extends Rs{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const r=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class ec extends Rs{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const A1=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class tc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,A1(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect();let o=0;if(a.right>s.right&&(o=s.right-a.right,this.root.style.left=`${t+o}px`),a.left<s.left&&(o=s.left-a.left,this.root.style.left=`${t+o}px`),a.bottom>s.bottom){const c=a.bottom-a.top,i=e.bottom-e.top+c;this.root.style.top=`${r-i}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const S1=[!1,"center","right","justify"],T1=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],N1=[!1,"serif","monospace"],O1=["1","2","3",!1],C1=["small",!1,"large","huge"];class Vr extends or{constructor(e,t){super(e,t);const r=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(s.target)||a.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{const o=r.value||"";o!=null&&t[a][o]&&(r.innerHTML=t[a][o])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&_r(s,S1),typeof t.align=="object"))return new ec(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const a=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&_r(s,T1,a==="background"?"#ffffff":"#000000"),new Jl(s,t[a])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?_r(s,N1):s.classList.contains("ql-header")?_r(s,O1):s.classList.contains("ql-size")&&_r(s,C1)),new Rs(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(Se.events.EDITOR_CHANGE,r)}}Vr.DEFAULTS=wn({},or.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nc extends tc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,Se.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,Se.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=R1(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,Se.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Se.sources.USER),this.quill.setSelection(r+2,Se.sources.USER)}break}}this.textbox.value="",this.hide()}}function R1(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function _r(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const s=document.createElement("option");r===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),n.appendChild(s)})}const I1=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class rc extends nc{constructor(e,t){super(e,t),this.quill.on(Se.events.EDITOR_CHANGE,(r,s,a,o)=>{if(r===Se.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&o===Se.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const c=this.quill.getLines(s.index,s.length);if(c.length===1){const i=this.quill.getBounds(s);i!=null&&this.position(i)}else{const i=c[c.length-1],l=this.quill.getIndex(i),u=Math.min(i.length()-1,s.index+s.length-l),h=this.quill.getBounds(new Dn(l,u));h!=null&&this.position(h)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Se.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}Ee(rc,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class sc extends Vr{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=I1),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new rc(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),$r),this.buildPickers(e.container.querySelectorAll("select"),$r))}}sc.DEFAULTS=wn({},Vr.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,le.sources.USER)}}}}});const L1=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class ic extends nc{constructor(){super(...arguments);Ee(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Se.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Se.events.SELECTION_CHANGE,(t,r,s)=>{if(t!=null){if(t.length===0&&s===Se.sources.USER){const[a,o]=this.quill.scroll.descendant(Nn,t.index);if(a!=null){this.linkRange=new Dn(t.index-o,a.length());const c=Nn.formats(a.domNode);this.preview.textContent=c,this.preview.setAttribute("href",c),this.show();const i=this.quill.getBounds(this.linkRange);i!=null&&this.position(i);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Ee(ic,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class oc extends Vr{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=L1),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),$r),this.buildPickers(e.container.querySelectorAll("select"),$r),this.tooltip=new ic(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}oc.DEFAULTS=wn({},Vr.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,le.sources.USER)}}}}}),le.register({"attributors/attribute/direction":Nl,"attributors/class/align":Al,"attributors/class/background":bv,"attributors/class/color":yv,"attributors/class/direction":Ol,"attributors/class/font":Il,"attributors/class/size":kl,"attributors/style/align":Sl,"attributors/style/background":$i,"attributors/style/color":ji,"attributors/style/direction":Cl,"attributors/style/font":Ll,"attributors/style/size":Bl},!0),le.register({"formats/align":Al,"formats/direction":Ol,"formats/indent":c1,"formats/background":$i,"formats/color":ji,"formats/font":Il,"formats/size":kl,"formats/blockquote":Ki,"formats/code-block":vt,"formats/header":Xi,"formats/list":Mr,"formats/bold":Dr,"formats/code":Vi,"formats/italic":Yi,"formats/link":Nn,"formats/script":Zi,"formats/strike":Qi,"formats/underline":Ji,"formats/formula":Os,"formats/image":eo,"formats/video":Cs,"modules/syntax":Wl,"modules/table":f1,"modules/toolbar":no,"themes/bubble":sc,"themes/snow":oc,"ui/icons":$r,"ui/picker":Rs,"ui/icon-picker":ec,"ui/color-picker":Jl,"ui/tooltip":tc},!0);const k1={name:"QuillEditor",props:{modelValue:{type:String,default:""},options:{type:Object,default:()=>({theme:"snow",placeholder:"Start typing...",modules:{toolbar:[[{font:[]},{size:[]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{script:"sub"},{script:"super"}],[{header:1},{header:2},"blockquote","code-block"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}],[{direction:"rtl"},{align:[]}],["link","image","video","formula"],["clean"]]}})}},emits:["update:modelValue"],setup(n,{emit:e}){const t=d.ref(null);let r=null;return d.onMounted(()=>{r=new le(t.value,n.options),r.root.innerHTML=n.modelValue,r.on("text-change",()=>{e("update:modelValue",r.root.innerHTML)})}),d.watch(()=>n.modelValue,s=>{r&&r.root.innerHTML!==s&&(r.root.innerHTML=s)}),d.onBeforeUnmount(()=>{r=null}),{editorContainer:t}}},B1={class:"q-editor"},P1={ref:"editorContainer"};function F1(n,e,t,r,s,a){return d.openBlock(),d.createElementBlock("div",B1,[d.createElementVNode("div",P1,null,512)])}const M1=es(k1,[["render",F1]]),D1={class:"rounded-xl bg-gray-50 px-6 py-5"},U1={key:0,class:"pb-5"},j1={class:"text-lg font-semibold text-gray-900"},$1={key:0,class:"text-sm text-gray-600"},qr={__name:"Card",props:{title:{type:String,default:""},supporting_text:{type:String,default:""}},setup(n){return(e,t)=>(d.openBlock(),d.createElementBlock("div",D1,[n.title?(d.openBlock(),d.createElementBlock("div",U1,[d.createElementVNode("div",j1,d.toDisplayString(n.title),1),n.supporting_text?(d.openBlock(),d.createElementBlock("div",$1,d.toDisplayString(n.supporting_text),1)):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.renderSlot(e.$slots,"default")]))}};function ac(n,e){return function(){return n.apply(e,arguments)}}const{toString:V1}=Object.prototype,{getPrototypeOf:ro}=Object,{iterator:Is,toStringTag:lc}=Symbol,Ls=(n=>e=>{const t=V1.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Wt=n=>(n=n.toLowerCase(),e=>Ls(e)===n),ks=n=>e=>typeof e===n,{isArray:ur}=Array,zr=ks("undefined");function _1(n){return n!==null&&!zr(n)&&n.constructor!==null&&!zr(n.constructor)&&Tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cc=Wt("ArrayBuffer");function q1(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&cc(n.buffer),e}const z1=ks("string"),Tt=ks("function"),uc=ks("number"),Bs=n=>n!==null&&typeof n=="object",H1=n=>n===!0||n===!1,Ps=n=>{if(Ls(n)!=="object")return!1;const e=ro(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lc in n)&&!(Is in n)},G1=Wt("Date"),W1=Wt("File"),K1=Wt("Blob"),X1=Wt("FileList"),Y1=n=>Bs(n)&&Tt(n.pipe),Z1=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Tt(n.append)&&((e=Ls(n))==="formdata"||e==="object"&&Tt(n.toString)&&n.toString()==="[object FormData]"))},Q1=Wt("URLSearchParams"),[J1,e0,t0,n0]=["ReadableStream","Request","Response","Headers"].map(Wt),r0=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hr(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,s;if(typeof n!="object"&&(n=[n]),ur(n))for(r=0,s=n.length;r<s;r++)e.call(null,n[r],r,n);else{const a=t?Object.getOwnPropertyNames(n):Object.keys(n),o=a.length;let c;for(r=0;r<o;r++)c=a[r],e.call(null,n[c],c,n)}}function fc(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,s;for(;r-- >0;)if(s=t[r],e===s.toLowerCase())return s;return null}const Vn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dc=n=>!zr(n)&&n!==Vn;function so(){const{caseless:n}=dc(this)&&this||{},e={},t=(r,s)=>{const a=n&&fc(e,s)||s;Ps(e[a])&&Ps(r)?e[a]=so(e[a],r):Ps(r)?e[a]=so({},r):ur(r)?e[a]=r.slice():e[a]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Hr(arguments[r],t);return e}const s0=(n,e,t,{allOwnKeys:r}={})=>(Hr(e,(s,a)=>{t&&Tt(s)?n[a]=ac(s,t):n[a]=s},{allOwnKeys:r}),n),i0=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),o0=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},a0=(n,e,t,r)=>{let s,a,o;const c={};if(e=e||{},n==null)return e;do{for(s=Object.getOwnPropertyNames(n),a=s.length;a-- >0;)o=s[a],(!r||r(o,n,e))&&!c[o]&&(e[o]=n[o],c[o]=!0);n=t!==!1&&ro(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},l0=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},c0=n=>{if(!n)return null;if(ur(n))return n;let e=n.length;if(!uc(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},u0=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&ro(Uint8Array)),f0=(n,e)=>{const r=(n&&n[Is]).call(n);let s;for(;(s=r.next())&&!s.done;){const a=s.value;e.call(n,a[0],a[1])}},d0=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},h0=Wt("HTMLFormElement"),p0=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,s){return r.toUpperCase()+s}),hc=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),g0=Wt("RegExp"),pc=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Hr(t,(s,a)=>{let o;(o=e(s,a,n))!==!1&&(r[a]=o||s)}),Object.defineProperties(n,r)},m0=n=>{pc(n,(e,t)=>{if(Tt(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Tt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},v0=(n,e)=>{const t={},r=s=>{s.forEach(a=>{t[a]=!0})};return ur(n)?r(n):r(String(n).split(e)),t},y0=()=>{},b0=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function x0(n){return!!(n&&Tt(n.append)&&n[lc]==="FormData"&&n[Is])}const E0=n=>{const e=new Array(10),t=(r,s)=>{if(Bs(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const a=ur(r)?[]:{};return Hr(r,(o,c)=>{const i=t(o,s+1);!zr(i)&&(a[c]=i)}),e[s]=void 0,a}}return r};return t(n,0)},w0=Wt("AsyncFunction"),A0=n=>n&&(Bs(n)||Tt(n))&&Tt(n.then)&&Tt(n.catch),gc=((n,e)=>n?setImmediate:e?((t,r)=>(Vn.addEventListener("message",({source:s,data:a})=>{s===Vn&&a===t&&r.length&&r.shift()()},!1),s=>{r.push(s),Vn.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Tt(Vn.postMessage)),S0=typeof queueMicrotask<"u"?queueMicrotask.bind(Vn):typeof process<"u"&&process.nextTick||gc,ee={isArray:ur,isArrayBuffer:cc,isBuffer:_1,isFormData:Z1,isArrayBufferView:q1,isString:z1,isNumber:uc,isBoolean:H1,isObject:Bs,isPlainObject:Ps,isReadableStream:J1,isRequest:e0,isResponse:t0,isHeaders:n0,isUndefined:zr,isDate:G1,isFile:W1,isBlob:K1,isRegExp:g0,isFunction:Tt,isStream:Y1,isURLSearchParams:Q1,isTypedArray:u0,isFileList:X1,forEach:Hr,merge:so,extend:s0,trim:r0,stripBOM:i0,inherits:o0,toFlatObject:a0,kindOf:Ls,kindOfTest:Wt,endsWith:l0,toArray:c0,forEachEntry:f0,matchAll:d0,isHTMLForm:h0,hasOwnProperty:hc,hasOwnProp:hc,reduceDescriptors:pc,freezeMethods:m0,toObjectSet:v0,toCamelCase:p0,noop:y0,toFiniteNumber:b0,findKey:fc,global:Vn,isContextDefined:dc,isSpecCompliantForm:x0,toJSONObject:E0,isAsyncFn:w0,isThenable:A0,setImmediate:gc,asap:S0,isIterable:n=>n!=null&&Tt(n[Is])};function Me(n,e,t,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}ee.inherits(Me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const mc=Me.prototype,vc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{vc[n]={value:n}}),Object.defineProperties(Me,vc),Object.defineProperty(mc,"isAxiosError",{value:!0}),Me.from=(n,e,t,r,s,a)=>{const o=Object.create(mc);return ee.toFlatObject(n,o,function(i){return i!==Error.prototype},c=>c!=="isAxiosError"),Me.call(o,n.message,e,t,r,s),o.cause=n,o.name=n.name,a&&Object.assign(o,a),o};const T0=null;function io(n){return ee.isPlainObject(n)||ee.isArray(n)}function yc(n){return ee.endsWith(n,"[]")?n.slice(0,-2):n}function bc(n,e,t){return n?n.concat(e).map(function(s,a){return s=yc(s),!t&&a?"["+s+"]":s}).join(t?".":""):e}function N0(n){return ee.isArray(n)&&!n.some(io)}const O0=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)});function Fs(n,e,t){if(!ee.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=ee.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,x){return!ee.isUndefined(x[v])});const r=t.metaTokens,s=t.visitor||u,a=t.dots,o=t.indexes,i=(t.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(s))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(ee.isDate(g))return g.toISOString();if(!i&&ee.isBlob(g))throw new Me("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(g)||ee.isTypedArray(g)?i&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,v,x){let T=g;if(g&&!x&&typeof g=="object"){if(ee.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(ee.isArray(g)&&N0(g)||(ee.isFileList(g)||ee.endsWith(v,"[]"))&&(T=ee.toArray(g)))return v=yc(v),T.forEach(function(I,F){!(ee.isUndefined(I)||I===null)&&e.append(o===!0?bc([v],F,a):o===null?v:v+"[]",l(I))}),!1}return io(g)?!0:(e.append(bc(x,v,a),l(g)),!1)}const h=[],f=Object.assign(O0,{defaultVisitor:u,convertValue:l,isVisitable:io});function m(g,v){if(!ee.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(g),ee.forEach(g,function(T,S){(!(ee.isUndefined(T)||T===null)&&s.call(e,T,ee.isString(S)?S.trim():S,v,f))===!0&&m(T,v?v.concat(S):[S])}),h.pop()}}if(!ee.isObject(n))throw new TypeError("data must be an object");return m(n),e}function xc(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function oo(n,e){this._pairs=[],n&&Fs(n,this,e)}const Ec=oo.prototype;Ec.append=function(e,t){this._pairs.push([e,t])},Ec.toString=function(e){const t=e?function(r){return e.call(this,r,xc)}:xc;return this._pairs.map(function(s){return t(s[0])+"="+t(s[1])},"").join("&")};function C0(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wc(n,e,t){if(!e)return n;const r=t&&t.encode||C0;ee.isFunction(t)&&(t={serialize:t});const s=t&&t.serialize;let a;if(s?a=s(e,t):a=ee.isURLSearchParams(e)?e.toString():new oo(e,t).toString(r),a){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Ac{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Sc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},R0={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:oo,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ao=typeof window<"u"&&typeof document<"u",lo=typeof navigator=="object"&&navigator||void 0,I0=ao&&(!lo||["ReactNative","NativeScript","NS"].indexOf(lo.product)<0),L0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",k0=ao&&window.location.href||"http://localhost",yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ao,hasStandardBrowserEnv:I0,hasStandardBrowserWebWorkerEnv:L0,navigator:lo,origin:k0},Symbol.toStringTag,{value:"Module"})),...R0};function B0(n,e){return Fs(n,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,r,s,a){return yt.isNode&&ee.isBuffer(t)?(this.append(r,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function P0(n){return ee.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function F0(n){const e={},t=Object.keys(n);let r;const s=t.length;let a;for(r=0;r<s;r++)a=t[r],e[a]=n[a];return e}function Tc(n){function e(t,r,s,a){let o=t[a++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),i=a>=t.length;return o=!o&&ee.isArray(s)?s.length:o,i?(ee.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!ee.isObject(s[o]))&&(s[o]=[]),e(t,r,s[o],a)&&ee.isArray(s[o])&&(s[o]=F0(s[o])),!c)}if(ee.isFormData(n)&&ee.isFunction(n.entries)){const t={};return ee.forEachEntry(n,(r,s)=>{e(P0(r),s,t,0)}),t}return null}function M0(n,e,t){if(ee.isString(n))try{return(e||JSON.parse)(n),ee.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Gr={transitional:Sc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",s=r.indexOf("application/json")>-1,a=ee.isObject(e);if(a&&ee.isHTMLForm(e)&&(e=new FormData(e)),ee.isFormData(e))return s?JSON.stringify(Tc(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return B0(e,this.formSerializer).toString();if((c=ee.isFileList(e))||r.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return Fs(c?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||s?(t.setContentType("application/json",!1),M0(e)):e}],transformResponse:[function(e){const t=this.transitional||Gr.transitional,r=t&&t.forcedJSONParsing,s=this.responseType==="json";if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(r&&!this.responseType||s)){const o=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(o)throw c.name==="SyntaxError"?Me.from(c,Me.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],n=>{Gr.headers[n]={}});const D0=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),U0=n=>{const e={};let t,r,s;return n&&n.split(`
54
- `).forEach(function(o){s=o.indexOf(":"),t=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!t||e[t]&&D0[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Nc=Symbol("internals");function Wr(n){return n&&String(n).trim().toLowerCase()}function Ms(n){return n===!1||n==null?n:ee.isArray(n)?n.map(Ms):String(n)}function j0(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const $0=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function co(n,e,t,r,s){if(ee.isFunction(r))return r.call(this,e,t);if(s&&(e=t),!!ee.isString(e)){if(ee.isString(r))return e.indexOf(r)!==-1;if(ee.isRegExp(r))return r.test(e)}}function V0(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function _0(n,e){const t=ee.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(s,a,o){return this[r].call(this,e,s,a,o)},configurable:!0})})}let Nt=class{constructor(e){e&&this.set(e)}set(e,t,r){const s=this;function a(c,i,l){const u=Wr(i);if(!u)throw new Error("header name must be a non-empty string");const h=ee.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||i]=Ms(c))}const o=(c,i)=>ee.forEach(c,(l,u)=>a(l,u,i));if(ee.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ee.isString(e)&&(e=e.trim())&&!$0(e))o(U0(e),t);else if(ee.isObject(e)&&ee.isIterable(e)){let c={},i,l;for(const u of e){if(!ee.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(i=c[l])?ee.isArray(i)?[...i,u[1]]:[i,u[1]]:u[1]}o(c,t)}else e!=null&&a(t,e,r);return this}get(e,t){if(e=Wr(e),e){const r=ee.findKey(this,e);if(r){const s=this[r];if(!t)return s;if(t===!0)return j0(s);if(ee.isFunction(t))return t.call(this,s,r);if(ee.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Wr(e),e){const r=ee.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||co(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let s=!1;function a(o){if(o=Wr(o),o){const c=ee.findKey(r,o);c&&(!t||co(r,r[c],c,t))&&(delete r[c],s=!0)}}return ee.isArray(e)?e.forEach(a):a(e),s}clear(e){const t=Object.keys(this);let r=t.length,s=!1;for(;r--;){const a=t[r];(!e||co(this,this[a],a,e,!0))&&(delete this[a],s=!0)}return s}normalize(e){const t=this,r={};return ee.forEach(this,(s,a)=>{const o=ee.findKey(r,a);if(o){t[o]=Ms(s),delete t[a];return}const c=e?V0(a):String(a).trim();c!==a&&delete t[a],t[c]=Ms(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ee.forEach(this,(r,s)=>{r!=null&&r!==!1&&(t[s]=e&&ee.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
55
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Nc]=this[Nc]={accessors:{}}).accessors,s=this.prototype;function a(o){const c=Wr(o);r[c]||(_0(s,o),r[c]=!0)}return ee.isArray(e)?e.forEach(a):a(e),this}};Nt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(Nt.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),ee.freezeMethods(Nt);function uo(n,e){const t=this||Gr,r=e||t,s=Nt.from(r.headers);let a=r.data;return ee.forEach(n,function(c){a=c.call(t,a,s.normalize(),e?e.status:void 0)}),s.normalize(),a}function Oc(n){return!!(n&&n.__CANCEL__)}function fr(n,e,t){Me.call(this,n??"canceled",Me.ERR_CANCELED,e,t),this.name="CanceledError"}ee.inherits(fr,Me,{__CANCEL__:!0});function Cc(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new Me("Request failed with status code "+t.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function q0(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function z0(n,e){n=n||10;const t=new Array(n),r=new Array(n);let s=0,a=0,o;return e=e!==void 0?e:1e3,function(i){const l=Date.now(),u=r[a];o||(o=l),t[s]=i,r[s]=l;let h=a,f=0;for(;h!==s;)f+=t[h++],h=h%n;if(s=(s+1)%n,s===a&&(a=(a+1)%n),l-o<e)return;const m=u&&l-u;return m?Math.round(f*1e3/m):void 0}}function H0(n,e){let t=0,r=1e3/e,s,a;const o=(l,u=Date.now())=>{t=u,s=null,a&&(clearTimeout(a),a=null),n.apply(null,l)};return[(...l)=>{const u=Date.now(),h=u-t;h>=r?o(l,u):(s=l,a||(a=setTimeout(()=>{a=null,o(s)},r-h)))},()=>s&&o(s)]}const Ds=(n,e,t=3)=>{let r=0;const s=z0(50,250);return H0(a=>{const o=a.loaded,c=a.lengthComputable?a.total:void 0,i=o-r,l=s(i),u=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:i,rate:l||void 0,estimated:l&&c&&u?(c-o)/l:void 0,event:a,lengthComputable:c!=null,[e?"download":"upload"]:!0};n(h)},t)},Rc=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Ic=n=>(...e)=>ee.asap(()=>n(...e)),G0=yt.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,yt.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,W0=yt.hasStandardBrowserEnv?{write(n,e,t,r,s,a){const o=[n+"="+encodeURIComponent(e)];ee.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),ee.isString(r)&&o.push("path="+r),ee.isString(s)&&o.push("domain="+s),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function K0(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function X0(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Lc(n,e,t){let r=!K0(e);return n&&(r||t==!1)?X0(n,e):e}const kc=n=>n instanceof Nt?{...n}:n;function _n(n,e){e=e||{};const t={};function r(l,u,h,f){return ee.isPlainObject(l)&&ee.isPlainObject(u)?ee.merge.call({caseless:f},l,u):ee.isPlainObject(u)?ee.merge({},u):ee.isArray(u)?u.slice():u}function s(l,u,h,f){if(ee.isUndefined(u)){if(!ee.isUndefined(l))return r(void 0,l,h,f)}else return r(l,u,h,f)}function a(l,u){if(!ee.isUndefined(u))return r(void 0,u)}function o(l,u){if(ee.isUndefined(u)){if(!ee.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,h){if(h in e)return r(l,u);if(h in n)return r(void 0,l)}const i={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u,h)=>s(kc(l),kc(u),h,!0)};return ee.forEach(Object.keys(Object.assign({},n,e)),function(u){const h=i[u]||s,f=h(n[u],e[u],u);ee.isUndefined(f)&&h!==c||(t[u]=f)}),t}const Bc=n=>{const e=_n({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:a,headers:o,auth:c}=e;e.headers=o=Nt.from(o),e.url=wc(Lc(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let i;if(ee.isFormData(t)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((i=o.getContentType())!==!1){const[l,...u]=i?i.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(yt.hasStandardBrowserEnv&&(r&&ee.isFunction(r)&&(r=r(e)),r||r!==!1&&G0(e.url))){const l=s&&a&&W0.read(a);l&&o.set(s,l)}return e},Y0=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(t,r){const s=Bc(n);let a=s.data;const o=Nt.from(s.headers).normalize();let{responseType:c,onUploadProgress:i,onDownloadProgress:l}=s,u,h,f,m,g;function v(){m&&m(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(s.method.toUpperCase(),s.url,!0),x.timeout=s.timeout;function T(){if(!x)return;const I=Nt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),M={data:!c||c==="text"||c==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:I,config:n,request:x};Cc(function(X){t(X),v()},function(X){r(X),v()},M),x=null}"onloadend"in x?x.onloadend=T:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(T)},x.onabort=function(){x&&(r(new Me("Request aborted",Me.ECONNABORTED,n,x)),x=null)},x.onerror=function(){r(new Me("Network Error",Me.ERR_NETWORK,n,x)),x=null},x.ontimeout=function(){let F=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const M=s.transitional||Sc;s.timeoutErrorMessage&&(F=s.timeoutErrorMessage),r(new Me(F,M.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,n,x)),x=null},a===void 0&&o.setContentType(null),"setRequestHeader"in x&&ee.forEach(o.toJSON(),function(F,M){x.setRequestHeader(M,F)}),ee.isUndefined(s.withCredentials)||(x.withCredentials=!!s.withCredentials),c&&c!=="json"&&(x.responseType=s.responseType),l&&([f,g]=Ds(l,!0),x.addEventListener("progress",f)),i&&x.upload&&([h,m]=Ds(i),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(u=I=>{x&&(r(!I||I.type?new fr(null,n,x):I),x.abort(),x=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const S=q0(s.url);if(S&&yt.protocols.indexOf(S)===-1){r(new Me("Unsupported protocol "+S+":",Me.ERR_BAD_REQUEST,n));return}x.send(a||null)})},Z0=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,s;const a=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof Me?u:new fr(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,a(new Me(`timeout ${e} of ms exceeded`,Me.ETIMEDOUT))},e);const c=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),n=null)};n.forEach(l=>l.addEventListener("abort",a));const{signal:i}=r;return i.unsubscribe=()=>ee.asap(c),i}},Q0=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,s;for(;r<t;)s=r+e,yield n.slice(r,s),r=s},J0=async function*(n,e){for await(const t of ey(n))yield*Q0(t,e)},ey=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Pc=(n,e,t,r)=>{const s=J0(n,e);let a=0,o,c=i=>{o||(o=!0,r&&r(i))};return new ReadableStream({async pull(i){try{const{done:l,value:u}=await s.next();if(l){c(),i.close();return}let h=u.byteLength;if(t){let f=a+=h;t(f)}i.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(i){return c(i),s.return()}},{highWaterMark:2})},Us=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fc=Us&&typeof ReadableStream=="function",ty=Us&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Mc=(n,...e)=>{try{return!!n(...e)}catch{return!1}},ny=Fc&&Mc(()=>{let n=!1;const e=new Request(yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Dc=64*1024,fo=Fc&&Mc(()=>ee.isReadableStream(new Response("").body)),js={stream:fo&&(n=>n.body)};Us&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!js[e]&&(js[e]=ee.isFunction(n[e])?t=>t[e]():(t,r)=>{throw new Me(`Response type '${e}' is not supported`,Me.ERR_NOT_SUPPORT,r)})})})(new Response);const ry=async n=>{if(n==null)return 0;if(ee.isBlob(n))return n.size;if(ee.isSpecCompliantForm(n))return(await new Request(yt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(n)||ee.isArrayBuffer(n))return n.byteLength;if(ee.isURLSearchParams(n)&&(n=n+""),ee.isString(n))return(await ty(n)).byteLength},sy=async(n,e)=>{const t=ee.toFiniteNumber(n.getContentLength());return t??ry(e)},ho={http:T0,xhr:Y0,fetch:Us&&(async n=>{let{url:e,method:t,data:r,signal:s,cancelToken:a,timeout:o,onDownloadProgress:c,onUploadProgress:i,responseType:l,headers:u,withCredentials:h="same-origin",fetchOptions:f}=Bc(n);l=l?(l+"").toLowerCase():"text";let m=Z0([s,a&&a.toAbortSignal()],o),g;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(i&&ny&&t!=="get"&&t!=="head"&&(x=await sy(u,r))!==0){let M=new Request(e,{method:"POST",body:r,duplex:"half"}),z;if(ee.isFormData(r)&&(z=M.headers.get("content-type"))&&u.setContentType(z),M.body){const[X,H]=Rc(x,Ds(Ic(i)));r=Pc(M.body,Dc,X,H)}}ee.isString(h)||(h=h?"include":"omit");const T="credentials"in Request.prototype;g=new Request(e,{...f,signal:m,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:T?h:void 0});let S=await fetch(g);const I=fo&&(l==="stream"||l==="response");if(fo&&(c||I&&v)){const M={};["status","statusText","headers"].forEach(re=>{M[re]=S[re]});const z=ee.toFiniteNumber(S.headers.get("content-length")),[X,H]=c&&Rc(z,Ds(Ic(c),!0))||[];S=new Response(Pc(S.body,Dc,X,()=>{H&&H(),v&&v()}),M)}l=l||"text";let F=await js[ee.findKey(js,l)||"text"](S,n);return!I&&v&&v(),await new Promise((M,z)=>{Cc(M,z,{data:F,headers:Nt.from(S.headers),status:S.status,statusText:S.statusText,config:n,request:g})})}catch(T){throw v&&v(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new Me("Network Error",Me.ERR_NETWORK,n,g),{cause:T.cause||T}):Me.from(T,T&&T.code,n,g)}})};ee.forEach(ho,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Uc=n=>`- ${n}`,iy=n=>ee.isFunction(n)||n===null||n===!1,jc={getAdapter:n=>{n=ee.isArray(n)?n:[n];const{length:e}=n;let t,r;const s={};for(let a=0;a<e;a++){t=n[a];let o;if(r=t,!iy(t)&&(r=ho[(o=String(t)).toLowerCase()],r===void 0))throw new Me(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,i])=>`adapter ${c} `+(i===!1?"is not supported by the environment":"is not available in the build"));let o=e?a.length>1?`since :
52
+ `,{[vt.blotName]:t}),o.insert(c)),a)],new WeakMap)}}Wl.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Xr=class Xr extends ht{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",to()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Xr.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Ee(Xr,"blotName","table"),Ee(Xr,"tagName","TD");let Gt=Xr;class pn extends Un{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===t.table&&e.table===r.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const r=t.formats(),s=t.next.formats();if(r.table!==s.table){const a=this.splitAfter(t);a&&a.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Ee(pn,"blotName","table-row"),Ee(pn,"tagName","TR");class nn extends Un{}Ee(nn,"blotName","table-body"),Ee(nn,"tagName","TBODY");class cr extends Un{balanceCells(){const e=this.descendants(pn),t=e.reduce((r,s)=>Math.max(s.children.length,r),0);e.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let s;r.children.head!=null&&(s=Gt.formats(r.children.head.domNode));const a=this.scroll.create(Gt.blotName,s);r.appendChild(a),a.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(nn);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e);s!=null&&s.remove()})}insertColumn(e){const[t]=this.descendant(nn);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e),a=Gt.formats(r.children.head.domNode),o=this.scroll.create(Gt.blotName,a);r.insertBefore(o,s)})}insertRow(e){const[t]=this.descendant(nn);if(t==null||t.children.head==null)return;const r=to(),s=this.scroll.create(pn.blotName);t.children.head.children.forEach(()=>{const o=this.scroll.create(Gt.blotName,r);s.appendChild(o)});const a=t.children.at(e);t.insertBefore(s,a)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Ee(cr,"blotName","table-container"),Ee(cr,"tagName","TABLE"),cr.allowedChildren=[nn],nn.requiredContainer=cr,nn.allowedChildren=[pn],pn.requiredContainer=nn,pn.allowedChildren=[Gt],Gt.requiredContainer=pn;function to(){return`row-${Math.random().toString(36).slice(2,6)}`}class f0 extends zt{static register(){le.register(Gt),le.register(pn),le.register(nn),le.register(cr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(cr).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(le.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(le.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(le.sources.USER),this.quill.setSelection(t,le.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,r]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==Gt.blotName)return[null,null,null,-1];const s=t.parent;return[s.parent.parent,s,t,r]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[r,s,a]=this.getTable(t);if(a==null)return;const o=a.cellOffset();r.insertColumn(o+e),this.quill.update(le.sources.USER);let c=s.rowOffset();e===0&&(c+=1),this.quill.setSelection(t.index+c,t.length,le.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[r,s,a]=this.getTable(t);if(a==null)return;const o=s.rowOffset();r.insertRow(o+e),this.quill.update(le.sources.USER),e>0?this.quill.setSelection(t,le.sources.SILENT):this.quill.setSelection(t.index+s.children.length,t.length,le.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const r=this.quill.getSelection();if(r==null)return;const s=new Array(e).fill(0).reduce(a=>{const o=new Array(t).fill(`
53
+ `).join("");return a.insert(o,{table:to()})},new Te().retain(r.index));this.quill.updateContents(s,le.sources.USER),this.quill.setSelection(r.index,le.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(le.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(le.events.TEXT_CHANGE,(r,s,a)=>{a===le.sources.USER&&this.balanceTables()}),!0):!1)})}}const Kl=fn("quill:toolbar");class no extends zt{constructor(e,t){var r,s;if(super(e,t),Array.isArray(this.options.container)){const a=document.createElement("div");a.setAttribute("role","toolbar"),d0(a,this.options.container),(s=(r=e.container)==null?void 0:r.parentNode)==null||s.insertBefore(a,e.container),this.container=a}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Kl.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(a=>{var c;const o=(c=this.options.handlers)==null?void 0:c[a];o&&this.addHandler(a,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(a=>{this.attach(a)}),this.quill.on(le.events.EDITOR_CHANGE,()=>{const[a]=this.quill.selection.getRange();this.update(a)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Kl.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,s=>{let a;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const c=e.options[e.selectedIndex];c.hasAttribute("selected")?a=!1:a=c.value||!1}else e.classList.contains("ql-active")?a=!1:a=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof Rt){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new Te().retain(o.index).delete(o.length).insert({[t]:a}),le.sources.USER)}else this.quill.format(t,a,le.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[s,a]=r;if(a.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[s]==null)o=a.querySelector("option[selected]");else if(!Array.isArray(t[s])){let c=t[s];typeof c=="string"&&(c=c.replace(/"/g,'\\"')),o=a.querySelector(`option[value="${c}"]`)}o==null?(a.value="",a.selectedIndex=-1):o.selected=!0}else if(e==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){const o=t[s],c=o===a.getAttribute("value")||o!=null&&o.toString()===a.getAttribute("value")||o==null&&!a.getAttribute("value");a.classList.toggle("ql-active",c),a.setAttribute("aria-pressed",c.toString())}else{const o=t[s]!=null;a.classList.toggle("ql-active",o),a.setAttribute("aria-pressed",o.toString())}})}}no.DEFAULTS={};function Xl(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function d0(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")Xl(r,s);else{const a=Object.keys(s)[0],o=s[a];Array.isArray(o)?h0(r,a,o):Xl(r,a,o)}}),n.appendChild(r)})}function h0(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(s=>{const a=document.createElement("option");s!==!1?a.setAttribute("value",String(s)):a.setAttribute("selected","selected"),r.appendChild(a)}),n.appendChild(r)}no.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Ne.INLINE)!=null&&this.quill.format(t,!1,le.sources.USER)})}else this.quill.removeFormat(n.index,n.length,le.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",le.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,le.sources.USER),this.quill.format("direction",n,le.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let s=n==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,le.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,le.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,le.sources.USER):this.quill.format("list","unchecked",le.sources.USER):this.quill.format("list",n,le.sources.USER)}}};const p0='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',g0='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',m0='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',v0='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',y0='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',b0='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',x0='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',E0='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Yl='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',$r={align:{"":p0,center:g0,right:m0,justify:v0},background:y0,blockquote:b0,bold:x0,clean:E0,code:Yl,"code-block":Yl,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},w0='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Zl=0;function Ql(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class Rs{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Ql(this.label,"aria-expanded"),Ql(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=w0,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Zl}`,Zl+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class Jl extends Rs{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const r=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class ec extends Rs{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const A0=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class tc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,A0(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect();let o=0;if(a.right>s.right&&(o=s.right-a.right,this.root.style.left=`${t+o}px`),a.left<s.left&&(o=s.left-a.left,this.root.style.left=`${t+o}px`),a.bottom>s.bottom){const c=a.bottom-a.top,i=e.bottom-e.top+c;this.root.style.top=`${r-i}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const S0=[!1,"center","right","justify"],T0=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],N0=[!1,"serif","monospace"],O0=["1","2","3",!1],C0=["small",!1,"large","huge"];class Vr extends or{constructor(e,t){super(e,t);const r=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(s.target)||a.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{const o=r.value||"";o!=null&&t[a][o]&&(r.innerHTML=t[a][o])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&_r(s,S0),typeof t.align=="object"))return new ec(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const a=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&_r(s,T0,a==="background"?"#ffffff":"#000000"),new Jl(s,t[a])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?_r(s,N0):s.classList.contains("ql-header")?_r(s,O0):s.classList.contains("ql-size")&&_r(s,C0)),new Rs(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(Se.events.EDITOR_CHANGE,r)}}Vr.DEFAULTS=wn({},or.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nc extends tc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,Se.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,Se.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=R0(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,Se.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Se.sources.USER),this.quill.setSelection(r+2,Se.sources.USER)}break}}this.textbox.value="",this.hide()}}function R0(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function _r(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const s=document.createElement("option");r===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),n.appendChild(s)})}const I0=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class rc extends nc{constructor(e,t){super(e,t),this.quill.on(Se.events.EDITOR_CHANGE,(r,s,a,o)=>{if(r===Se.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&o===Se.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const c=this.quill.getLines(s.index,s.length);if(c.length===1){const i=this.quill.getBounds(s);i!=null&&this.position(i)}else{const i=c[c.length-1],l=this.quill.getIndex(i),u=Math.min(i.length()-1,s.index+s.length-l),h=this.quill.getBounds(new Dn(l,u));h!=null&&this.position(h)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Se.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}Ee(rc,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class sc extends Vr{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=I0),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new rc(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),$r),this.buildPickers(e.container.querySelectorAll("select"),$r))}}sc.DEFAULTS=wn({},Vr.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,le.sources.USER)}}}}});const L0=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class ic extends nc{constructor(){super(...arguments);Ee(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Se.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Se.events.SELECTION_CHANGE,(t,r,s)=>{if(t!=null){if(t.length===0&&s===Se.sources.USER){const[a,o]=this.quill.scroll.descendant(Nn,t.index);if(a!=null){this.linkRange=new Dn(t.index-o,a.length());const c=Nn.formats(a.domNode);this.preview.textContent=c,this.preview.setAttribute("href",c),this.show();const i=this.quill.getBounds(this.linkRange);i!=null&&this.position(i);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Ee(ic,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class oc extends Vr{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=L0),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),$r),this.buildPickers(e.container.querySelectorAll("select"),$r),this.tooltip=new ic(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}oc.DEFAULTS=wn({},Vr.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,le.sources.USER)}}}}}),le.register({"attributors/attribute/direction":Nl,"attributors/class/align":Al,"attributors/class/background":bv,"attributors/class/color":yv,"attributors/class/direction":Ol,"attributors/class/font":Il,"attributors/class/size":kl,"attributors/style/align":Sl,"attributors/style/background":$i,"attributors/style/color":ji,"attributors/style/direction":Cl,"attributors/style/font":Ll,"attributors/style/size":Bl},!0),le.register({"formats/align":Al,"formats/direction":Ol,"formats/indent":c0,"formats/background":$i,"formats/color":ji,"formats/font":Il,"formats/size":kl,"formats/blockquote":Ki,"formats/code-block":vt,"formats/header":Xi,"formats/list":Mr,"formats/bold":Dr,"formats/code":Vi,"formats/italic":Yi,"formats/link":Nn,"formats/script":Zi,"formats/strike":Qi,"formats/underline":Ji,"formats/formula":Os,"formats/image":eo,"formats/video":Cs,"modules/syntax":Wl,"modules/table":f0,"modules/toolbar":no,"themes/bubble":sc,"themes/snow":oc,"ui/icons":$r,"ui/picker":Rs,"ui/icon-picker":ec,"ui/color-picker":Jl,"ui/tooltip":tc},!0);const k0={name:"QuillEditor",props:{modelValue:{type:String,default:""},options:{type:Object,default:()=>({theme:"snow",placeholder:"Start typing...",modules:{toolbar:[[{font:[]},{size:[]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{script:"sub"},{script:"super"}],[{header:1},{header:2},"blockquote","code-block"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}],[{direction:"rtl"},{align:[]}],["link","image","video","formula"],["clean"]]}})}},emits:["update:modelValue"],setup(n,{emit:e}){const t=d.ref(null);let r=null;return d.onMounted(()=>{r=new le(t.value,n.options),r.root.innerHTML=n.modelValue,r.on("text-change",()=>{e("update:modelValue",r.root.innerHTML)})}),d.watch(()=>n.modelValue,s=>{r&&r.root.innerHTML!==s&&(r.root.innerHTML=s)}),d.onBeforeUnmount(()=>{r=null}),{editorContainer:t}}},B0={class:"q-editor"},P0={ref:"editorContainer"};function F0(n,e,t,r,s,a){return d.openBlock(),d.createElementBlock("div",B0,[d.createElementVNode("div",P0,null,512)])}const M0=es(k0,[["render",F0]]),D0={class:"rounded-xl bg-gray-50 px-6 py-5"},U0={key:0,class:"pb-5"},j0={class:"text-lg font-semibold text-gray-900"},$0={key:0,class:"text-sm text-gray-600"},qr={__name:"Card",props:{title:{type:String,default:""},supporting_text:{type:String,default:""}},setup(n){return(e,t)=>(d.openBlock(),d.createElementBlock("div",D0,[n.title?(d.openBlock(),d.createElementBlock("div",U0,[d.createElementVNode("div",j0,d.toDisplayString(n.title),1),n.supporting_text?(d.openBlock(),d.createElementBlock("div",$0,d.toDisplayString(n.supporting_text),1)):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.renderSlot(e.$slots,"default")]))}};function ac(n,e){return function(){return n.apply(e,arguments)}}const{toString:V0}=Object.prototype,{getPrototypeOf:ro}=Object,{iterator:Is,toStringTag:lc}=Symbol,Ls=(n=>e=>{const t=V0.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Wt=n=>(n=n.toLowerCase(),e=>Ls(e)===n),ks=n=>e=>typeof e===n,{isArray:ur}=Array,zr=ks("undefined");function _0(n){return n!==null&&!zr(n)&&n.constructor!==null&&!zr(n.constructor)&&Tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cc=Wt("ArrayBuffer");function q0(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&cc(n.buffer),e}const z0=ks("string"),Tt=ks("function"),uc=ks("number"),Bs=n=>n!==null&&typeof n=="object",H0=n=>n===!0||n===!1,Ps=n=>{if(Ls(n)!=="object")return!1;const e=ro(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lc in n)&&!(Is in n)},G0=Wt("Date"),W0=Wt("File"),K0=Wt("Blob"),X0=Wt("FileList"),Y0=n=>Bs(n)&&Tt(n.pipe),Z0=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Tt(n.append)&&((e=Ls(n))==="formdata"||e==="object"&&Tt(n.toString)&&n.toString()==="[object FormData]"))},Q0=Wt("URLSearchParams"),[J0,e1,t1,n1]=["ReadableStream","Request","Response","Headers"].map(Wt),r1=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hr(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,s;if(typeof n!="object"&&(n=[n]),ur(n))for(r=0,s=n.length;r<s;r++)e.call(null,n[r],r,n);else{const a=t?Object.getOwnPropertyNames(n):Object.keys(n),o=a.length;let c;for(r=0;r<o;r++)c=a[r],e.call(null,n[c],c,n)}}function fc(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,s;for(;r-- >0;)if(s=t[r],e===s.toLowerCase())return s;return null}const Vn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dc=n=>!zr(n)&&n!==Vn;function so(){const{caseless:n}=dc(this)&&this||{},e={},t=(r,s)=>{const a=n&&fc(e,s)||s;Ps(e[a])&&Ps(r)?e[a]=so(e[a],r):Ps(r)?e[a]=so({},r):ur(r)?e[a]=r.slice():e[a]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Hr(arguments[r],t);return e}const s1=(n,e,t,{allOwnKeys:r}={})=>(Hr(e,(s,a)=>{t&&Tt(s)?n[a]=ac(s,t):n[a]=s},{allOwnKeys:r}),n),i1=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),o1=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},a1=(n,e,t,r)=>{let s,a,o;const c={};if(e=e||{},n==null)return e;do{for(s=Object.getOwnPropertyNames(n),a=s.length;a-- >0;)o=s[a],(!r||r(o,n,e))&&!c[o]&&(e[o]=n[o],c[o]=!0);n=t!==!1&&ro(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},l1=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},c1=n=>{if(!n)return null;if(ur(n))return n;let e=n.length;if(!uc(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},u1=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&ro(Uint8Array)),f1=(n,e)=>{const r=(n&&n[Is]).call(n);let s;for(;(s=r.next())&&!s.done;){const a=s.value;e.call(n,a[0],a[1])}},d1=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},h1=Wt("HTMLFormElement"),p1=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,s){return r.toUpperCase()+s}),hc=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),g1=Wt("RegExp"),pc=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Hr(t,(s,a)=>{let o;(o=e(s,a,n))!==!1&&(r[a]=o||s)}),Object.defineProperties(n,r)},m1=n=>{pc(n,(e,t)=>{if(Tt(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Tt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},v1=(n,e)=>{const t={},r=s=>{s.forEach(a=>{t[a]=!0})};return ur(n)?r(n):r(String(n).split(e)),t},y1=()=>{},b1=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function x1(n){return!!(n&&Tt(n.append)&&n[lc]==="FormData"&&n[Is])}const E1=n=>{const e=new Array(10),t=(r,s)=>{if(Bs(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const a=ur(r)?[]:{};return Hr(r,(o,c)=>{const i=t(o,s+1);!zr(i)&&(a[c]=i)}),e[s]=void 0,a}}return r};return t(n,0)},w1=Wt("AsyncFunction"),A1=n=>n&&(Bs(n)||Tt(n))&&Tt(n.then)&&Tt(n.catch),gc=((n,e)=>n?setImmediate:e?((t,r)=>(Vn.addEventListener("message",({source:s,data:a})=>{s===Vn&&a===t&&r.length&&r.shift()()},!1),s=>{r.push(s),Vn.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Tt(Vn.postMessage)),S1=typeof queueMicrotask<"u"?queueMicrotask.bind(Vn):typeof process<"u"&&process.nextTick||gc,ee={isArray:ur,isArrayBuffer:cc,isBuffer:_0,isFormData:Z0,isArrayBufferView:q0,isString:z0,isNumber:uc,isBoolean:H0,isObject:Bs,isPlainObject:Ps,isReadableStream:J0,isRequest:e1,isResponse:t1,isHeaders:n1,isUndefined:zr,isDate:G0,isFile:W0,isBlob:K0,isRegExp:g1,isFunction:Tt,isStream:Y0,isURLSearchParams:Q0,isTypedArray:u1,isFileList:X0,forEach:Hr,merge:so,extend:s1,trim:r1,stripBOM:i1,inherits:o1,toFlatObject:a1,kindOf:Ls,kindOfTest:Wt,endsWith:l1,toArray:c1,forEachEntry:f1,matchAll:d1,isHTMLForm:h1,hasOwnProperty:hc,hasOwnProp:hc,reduceDescriptors:pc,freezeMethods:m1,toObjectSet:v1,toCamelCase:p1,noop:y1,toFiniteNumber:b1,findKey:fc,global:Vn,isContextDefined:dc,isSpecCompliantForm:x1,toJSONObject:E1,isAsyncFn:w1,isThenable:A1,setImmediate:gc,asap:S1,isIterable:n=>n!=null&&Tt(n[Is])};function Me(n,e,t,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}ee.inherits(Me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const mc=Me.prototype,vc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{vc[n]={value:n}}),Object.defineProperties(Me,vc),Object.defineProperty(mc,"isAxiosError",{value:!0}),Me.from=(n,e,t,r,s,a)=>{const o=Object.create(mc);return ee.toFlatObject(n,o,function(i){return i!==Error.prototype},c=>c!=="isAxiosError"),Me.call(o,n.message,e,t,r,s),o.cause=n,o.name=n.name,a&&Object.assign(o,a),o};const T1=null;function io(n){return ee.isPlainObject(n)||ee.isArray(n)}function yc(n){return ee.endsWith(n,"[]")?n.slice(0,-2):n}function bc(n,e,t){return n?n.concat(e).map(function(s,a){return s=yc(s),!t&&a?"["+s+"]":s}).join(t?".":""):e}function N1(n){return ee.isArray(n)&&!n.some(io)}const O1=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)});function Fs(n,e,t){if(!ee.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=ee.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,x){return!ee.isUndefined(x[v])});const r=t.metaTokens,s=t.visitor||u,a=t.dots,o=t.indexes,i=(t.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(s))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(ee.isDate(g))return g.toISOString();if(!i&&ee.isBlob(g))throw new Me("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(g)||ee.isTypedArray(g)?i&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,v,x){let T=g;if(g&&!x&&typeof g=="object"){if(ee.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(ee.isArray(g)&&N1(g)||(ee.isFileList(g)||ee.endsWith(v,"[]"))&&(T=ee.toArray(g)))return v=yc(v),T.forEach(function(I,F){!(ee.isUndefined(I)||I===null)&&e.append(o===!0?bc([v],F,a):o===null?v:v+"[]",l(I))}),!1}return io(g)?!0:(e.append(bc(x,v,a),l(g)),!1)}const h=[],f=Object.assign(O1,{defaultVisitor:u,convertValue:l,isVisitable:io});function m(g,v){if(!ee.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(g),ee.forEach(g,function(T,S){(!(ee.isUndefined(T)||T===null)&&s.call(e,T,ee.isString(S)?S.trim():S,v,f))===!0&&m(T,v?v.concat(S):[S])}),h.pop()}}if(!ee.isObject(n))throw new TypeError("data must be an object");return m(n),e}function xc(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function oo(n,e){this._pairs=[],n&&Fs(n,this,e)}const Ec=oo.prototype;Ec.append=function(e,t){this._pairs.push([e,t])},Ec.toString=function(e){const t=e?function(r){return e.call(this,r,xc)}:xc;return this._pairs.map(function(s){return t(s[0])+"="+t(s[1])},"").join("&")};function C1(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wc(n,e,t){if(!e)return n;const r=t&&t.encode||C1;ee.isFunction(t)&&(t={serialize:t});const s=t&&t.serialize;let a;if(s?a=s(e,t):a=ee.isURLSearchParams(e)?e.toString():new oo(e,t).toString(r),a){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Ac{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Sc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},R1={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:oo,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ao=typeof window<"u"&&typeof document<"u",lo=typeof navigator=="object"&&navigator||void 0,I1=ao&&(!lo||["ReactNative","NativeScript","NS"].indexOf(lo.product)<0),L1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",k1=ao&&window.location.href||"http://localhost",yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ao,hasStandardBrowserEnv:I1,hasStandardBrowserWebWorkerEnv:L1,navigator:lo,origin:k1},Symbol.toStringTag,{value:"Module"})),...R1};function B1(n,e){return Fs(n,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,r,s,a){return yt.isNode&&ee.isBuffer(t)?(this.append(r,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function P1(n){return ee.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function F1(n){const e={},t=Object.keys(n);let r;const s=t.length;let a;for(r=0;r<s;r++)a=t[r],e[a]=n[a];return e}function Tc(n){function e(t,r,s,a){let o=t[a++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),i=a>=t.length;return o=!o&&ee.isArray(s)?s.length:o,i?(ee.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!ee.isObject(s[o]))&&(s[o]=[]),e(t,r,s[o],a)&&ee.isArray(s[o])&&(s[o]=F1(s[o])),!c)}if(ee.isFormData(n)&&ee.isFunction(n.entries)){const t={};return ee.forEachEntry(n,(r,s)=>{e(P1(r),s,t,0)}),t}return null}function M1(n,e,t){if(ee.isString(n))try{return(e||JSON.parse)(n),ee.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Gr={transitional:Sc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",s=r.indexOf("application/json")>-1,a=ee.isObject(e);if(a&&ee.isHTMLForm(e)&&(e=new FormData(e)),ee.isFormData(e))return s?JSON.stringify(Tc(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return B1(e,this.formSerializer).toString();if((c=ee.isFileList(e))||r.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return Fs(c?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||s?(t.setContentType("application/json",!1),M1(e)):e}],transformResponse:[function(e){const t=this.transitional||Gr.transitional,r=t&&t.forcedJSONParsing,s=this.responseType==="json";if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(r&&!this.responseType||s)){const o=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(o)throw c.name==="SyntaxError"?Me.from(c,Me.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],n=>{Gr.headers[n]={}});const D1=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),U1=n=>{const e={};let t,r,s;return n&&n.split(`
54
+ `).forEach(function(o){s=o.indexOf(":"),t=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!t||e[t]&&D1[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Nc=Symbol("internals");function Wr(n){return n&&String(n).trim().toLowerCase()}function Ms(n){return n===!1||n==null?n:ee.isArray(n)?n.map(Ms):String(n)}function j1(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const $1=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function co(n,e,t,r,s){if(ee.isFunction(r))return r.call(this,e,t);if(s&&(e=t),!!ee.isString(e)){if(ee.isString(r))return e.indexOf(r)!==-1;if(ee.isRegExp(r))return r.test(e)}}function V1(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function _1(n,e){const t=ee.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(s,a,o){return this[r].call(this,e,s,a,o)},configurable:!0})})}let Nt=class{constructor(e){e&&this.set(e)}set(e,t,r){const s=this;function a(c,i,l){const u=Wr(i);if(!u)throw new Error("header name must be a non-empty string");const h=ee.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||i]=Ms(c))}const o=(c,i)=>ee.forEach(c,(l,u)=>a(l,u,i));if(ee.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ee.isString(e)&&(e=e.trim())&&!$1(e))o(U1(e),t);else if(ee.isObject(e)&&ee.isIterable(e)){let c={},i,l;for(const u of e){if(!ee.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(i=c[l])?ee.isArray(i)?[...i,u[1]]:[i,u[1]]:u[1]}o(c,t)}else e!=null&&a(t,e,r);return this}get(e,t){if(e=Wr(e),e){const r=ee.findKey(this,e);if(r){const s=this[r];if(!t)return s;if(t===!0)return j1(s);if(ee.isFunction(t))return t.call(this,s,r);if(ee.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Wr(e),e){const r=ee.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||co(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let s=!1;function a(o){if(o=Wr(o),o){const c=ee.findKey(r,o);c&&(!t||co(r,r[c],c,t))&&(delete r[c],s=!0)}}return ee.isArray(e)?e.forEach(a):a(e),s}clear(e){const t=Object.keys(this);let r=t.length,s=!1;for(;r--;){const a=t[r];(!e||co(this,this[a],a,e,!0))&&(delete this[a],s=!0)}return s}normalize(e){const t=this,r={};return ee.forEach(this,(s,a)=>{const o=ee.findKey(r,a);if(o){t[o]=Ms(s),delete t[a];return}const c=e?V1(a):String(a).trim();c!==a&&delete t[a],t[c]=Ms(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ee.forEach(this,(r,s)=>{r!=null&&r!==!1&&(t[s]=e&&ee.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
55
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Nc]=this[Nc]={accessors:{}}).accessors,s=this.prototype;function a(o){const c=Wr(o);r[c]||(_1(s,o),r[c]=!0)}return ee.isArray(e)?e.forEach(a):a(e),this}};Nt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(Nt.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),ee.freezeMethods(Nt);function uo(n,e){const t=this||Gr,r=e||t,s=Nt.from(r.headers);let a=r.data;return ee.forEach(n,function(c){a=c.call(t,a,s.normalize(),e?e.status:void 0)}),s.normalize(),a}function Oc(n){return!!(n&&n.__CANCEL__)}function fr(n,e,t){Me.call(this,n??"canceled",Me.ERR_CANCELED,e,t),this.name="CanceledError"}ee.inherits(fr,Me,{__CANCEL__:!0});function Cc(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new Me("Request failed with status code "+t.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function q1(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function z1(n,e){n=n||10;const t=new Array(n),r=new Array(n);let s=0,a=0,o;return e=e!==void 0?e:1e3,function(i){const l=Date.now(),u=r[a];o||(o=l),t[s]=i,r[s]=l;let h=a,f=0;for(;h!==s;)f+=t[h++],h=h%n;if(s=(s+1)%n,s===a&&(a=(a+1)%n),l-o<e)return;const m=u&&l-u;return m?Math.round(f*1e3/m):void 0}}function H1(n,e){let t=0,r=1e3/e,s,a;const o=(l,u=Date.now())=>{t=u,s=null,a&&(clearTimeout(a),a=null),n.apply(null,l)};return[(...l)=>{const u=Date.now(),h=u-t;h>=r?o(l,u):(s=l,a||(a=setTimeout(()=>{a=null,o(s)},r-h)))},()=>s&&o(s)]}const Ds=(n,e,t=3)=>{let r=0;const s=z1(50,250);return H1(a=>{const o=a.loaded,c=a.lengthComputable?a.total:void 0,i=o-r,l=s(i),u=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:i,rate:l||void 0,estimated:l&&c&&u?(c-o)/l:void 0,event:a,lengthComputable:c!=null,[e?"download":"upload"]:!0};n(h)},t)},Rc=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Ic=n=>(...e)=>ee.asap(()=>n(...e)),G1=yt.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,yt.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,W1=yt.hasStandardBrowserEnv?{write(n,e,t,r,s,a){const o=[n+"="+encodeURIComponent(e)];ee.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),ee.isString(r)&&o.push("path="+r),ee.isString(s)&&o.push("domain="+s),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function K1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function X1(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Lc(n,e,t){let r=!K1(e);return n&&(r||t==!1)?X1(n,e):e}const kc=n=>n instanceof Nt?{...n}:n;function _n(n,e){e=e||{};const t={};function r(l,u,h,f){return ee.isPlainObject(l)&&ee.isPlainObject(u)?ee.merge.call({caseless:f},l,u):ee.isPlainObject(u)?ee.merge({},u):ee.isArray(u)?u.slice():u}function s(l,u,h,f){if(ee.isUndefined(u)){if(!ee.isUndefined(l))return r(void 0,l,h,f)}else return r(l,u,h,f)}function a(l,u){if(!ee.isUndefined(u))return r(void 0,u)}function o(l,u){if(ee.isUndefined(u)){if(!ee.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,h){if(h in e)return r(l,u);if(h in n)return r(void 0,l)}const i={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u,h)=>s(kc(l),kc(u),h,!0)};return ee.forEach(Object.keys(Object.assign({},n,e)),function(u){const h=i[u]||s,f=h(n[u],e[u],u);ee.isUndefined(f)&&h!==c||(t[u]=f)}),t}const Bc=n=>{const e=_n({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:a,headers:o,auth:c}=e;e.headers=o=Nt.from(o),e.url=wc(Lc(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let i;if(ee.isFormData(t)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((i=o.getContentType())!==!1){const[l,...u]=i?i.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(yt.hasStandardBrowserEnv&&(r&&ee.isFunction(r)&&(r=r(e)),r||r!==!1&&G1(e.url))){const l=s&&a&&W1.read(a);l&&o.set(s,l)}return e},Y1=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(t,r){const s=Bc(n);let a=s.data;const o=Nt.from(s.headers).normalize();let{responseType:c,onUploadProgress:i,onDownloadProgress:l}=s,u,h,f,m,g;function v(){m&&m(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(s.method.toUpperCase(),s.url,!0),x.timeout=s.timeout;function T(){if(!x)return;const I=Nt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),M={data:!c||c==="text"||c==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:I,config:n,request:x};Cc(function(X){t(X),v()},function(X){r(X),v()},M),x=null}"onloadend"in x?x.onloadend=T:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(T)},x.onabort=function(){x&&(r(new Me("Request aborted",Me.ECONNABORTED,n,x)),x=null)},x.onerror=function(){r(new Me("Network Error",Me.ERR_NETWORK,n,x)),x=null},x.ontimeout=function(){let F=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const M=s.transitional||Sc;s.timeoutErrorMessage&&(F=s.timeoutErrorMessage),r(new Me(F,M.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,n,x)),x=null},a===void 0&&o.setContentType(null),"setRequestHeader"in x&&ee.forEach(o.toJSON(),function(F,M){x.setRequestHeader(M,F)}),ee.isUndefined(s.withCredentials)||(x.withCredentials=!!s.withCredentials),c&&c!=="json"&&(x.responseType=s.responseType),l&&([f,g]=Ds(l,!0),x.addEventListener("progress",f)),i&&x.upload&&([h,m]=Ds(i),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(u=I=>{x&&(r(!I||I.type?new fr(null,n,x):I),x.abort(),x=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const S=q1(s.url);if(S&&yt.protocols.indexOf(S)===-1){r(new Me("Unsupported protocol "+S+":",Me.ERR_BAD_REQUEST,n));return}x.send(a||null)})},Z1=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,s;const a=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof Me?u:new fr(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,a(new Me(`timeout ${e} of ms exceeded`,Me.ETIMEDOUT))},e);const c=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),n=null)};n.forEach(l=>l.addEventListener("abort",a));const{signal:i}=r;return i.unsubscribe=()=>ee.asap(c),i}},Q1=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,s;for(;r<t;)s=r+e,yield n.slice(r,s),r=s},J1=async function*(n,e){for await(const t of ey(n))yield*Q1(t,e)},ey=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Pc=(n,e,t,r)=>{const s=J1(n,e);let a=0,o,c=i=>{o||(o=!0,r&&r(i))};return new ReadableStream({async pull(i){try{const{done:l,value:u}=await s.next();if(l){c(),i.close();return}let h=u.byteLength;if(t){let f=a+=h;t(f)}i.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(i){return c(i),s.return()}},{highWaterMark:2})},Us=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fc=Us&&typeof ReadableStream=="function",ty=Us&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Mc=(n,...e)=>{try{return!!n(...e)}catch{return!1}},ny=Fc&&Mc(()=>{let n=!1;const e=new Request(yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Dc=64*1024,fo=Fc&&Mc(()=>ee.isReadableStream(new Response("").body)),js={stream:fo&&(n=>n.body)};Us&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!js[e]&&(js[e]=ee.isFunction(n[e])?t=>t[e]():(t,r)=>{throw new Me(`Response type '${e}' is not supported`,Me.ERR_NOT_SUPPORT,r)})})})(new Response);const ry=async n=>{if(n==null)return 0;if(ee.isBlob(n))return n.size;if(ee.isSpecCompliantForm(n))return(await new Request(yt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(n)||ee.isArrayBuffer(n))return n.byteLength;if(ee.isURLSearchParams(n)&&(n=n+""),ee.isString(n))return(await ty(n)).byteLength},sy=async(n,e)=>{const t=ee.toFiniteNumber(n.getContentLength());return t??ry(e)},ho={http:T1,xhr:Y1,fetch:Us&&(async n=>{let{url:e,method:t,data:r,signal:s,cancelToken:a,timeout:o,onDownloadProgress:c,onUploadProgress:i,responseType:l,headers:u,withCredentials:h="same-origin",fetchOptions:f}=Bc(n);l=l?(l+"").toLowerCase():"text";let m=Z1([s,a&&a.toAbortSignal()],o),g;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(i&&ny&&t!=="get"&&t!=="head"&&(x=await sy(u,r))!==0){let M=new Request(e,{method:"POST",body:r,duplex:"half"}),z;if(ee.isFormData(r)&&(z=M.headers.get("content-type"))&&u.setContentType(z),M.body){const[X,H]=Rc(x,Ds(Ic(i)));r=Pc(M.body,Dc,X,H)}}ee.isString(h)||(h=h?"include":"omit");const T="credentials"in Request.prototype;g=new Request(e,{...f,signal:m,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:T?h:void 0});let S=await fetch(g);const I=fo&&(l==="stream"||l==="response");if(fo&&(c||I&&v)){const M={};["status","statusText","headers"].forEach(re=>{M[re]=S[re]});const z=ee.toFiniteNumber(S.headers.get("content-length")),[X,H]=c&&Rc(z,Ds(Ic(c),!0))||[];S=new Response(Pc(S.body,Dc,X,()=>{H&&H(),v&&v()}),M)}l=l||"text";let F=await js[ee.findKey(js,l)||"text"](S,n);return!I&&v&&v(),await new Promise((M,z)=>{Cc(M,z,{data:F,headers:Nt.from(S.headers),status:S.status,statusText:S.statusText,config:n,request:g})})}catch(T){throw v&&v(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new Me("Network Error",Me.ERR_NETWORK,n,g),{cause:T.cause||T}):Me.from(T,T&&T.code,n,g)}})};ee.forEach(ho,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Uc=n=>`- ${n}`,iy=n=>ee.isFunction(n)||n===null||n===!1,jc={getAdapter:n=>{n=ee.isArray(n)?n:[n];const{length:e}=n;let t,r;const s={};for(let a=0;a<e;a++){t=n[a];let o;if(r=t,!iy(t)&&(r=ho[(o=String(t)).toLowerCase()],r===void 0))throw new Me(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,i])=>`adapter ${c} `+(i===!1?"is not supported by the environment":"is not available in the build"));let o=e?a.length>1?`since :
56
56
  `+a.map(Uc).join(`
57
57
  `):" "+Uc(a[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:ho};function po(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new fr(null,n)}function $c(n){return po(n),n.headers=Nt.from(n.headers),n.data=uo.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),jc.getAdapter(n.adapter||Gr.adapter)(n).then(function(r){return po(n),r.data=uo.call(n,n.transformResponse,r),r.headers=Nt.from(r.headers),r},function(r){return Oc(r)||(po(n),r&&r.response&&(r.response.data=uo.call(n,n.transformResponse,r.response),r.response.headers=Nt.from(r.response.headers))),Promise.reject(r)})}const Vc="1.9.0",$s={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{$s[n]=function(r){return typeof r===n||"a"+(e<1?"n ":" ")+n}});const _c={};$s.transitional=function(e,t,r){function s(a,o){return"[Axios v"+Vc+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,c)=>{if(e===!1)throw new Me(s(o," has been removed"+(t?" in "+t:"")),Me.ERR_DEPRECATED);return t&&!_c[o]&&(_c[o]=!0,console.warn(s(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,o,c):!0}},$s.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function oy(n,e,t){if(typeof n!="object")throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let s=r.length;for(;s-- >0;){const a=r[s],o=e[a];if(o){const c=n[a],i=c===void 0||o(c,a,n);if(i!==!0)throw new Me("option "+a+" must be "+i,Me.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Me("Unknown option "+a,Me.ERR_BAD_OPTION)}}const Vs={assertOptions:oy,validators:$s},rn=Vs.validators;let qn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ac,response:new Ac}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
58
58
  `+a):r.stack=a}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=_n(this.defaults,t);const{transitional:r,paramsSerializer:s,headers:a}=t;r!==void 0&&Vs.assertOptions(r,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean)},!1),s!=null&&(ee.isFunction(s)?t.paramsSerializer={serialize:s}:Vs.assertOptions(s,{encode:rn.function,serialize:rn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Vs.assertOptions(t,{baseUrl:rn.spelling("baseURL"),withXsrfToken:rn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&ee.merge(a.common,a[t.method]);a&&ee.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),t.headers=Nt.concat(o,a);const c=[];let i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(i=i&&v.synchronous,c.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let u,h=0,f;if(!i){const g=[$c.bind(this),void 0];for(g.unshift.apply(g,c),g.push.apply(g,l),f=g.length,u=Promise.resolve(t);h<f;)u=u.then(g[h++],g[h++]);return u}f=c.length;let m=t;for(h=0;h<f;){const g=c[h++],v=c[h++];try{m=g(m)}catch(x){v.call(this,x);break}}try{u=$c.call(this,m)}catch(g){return Promise.reject(g)}for(h=0,f=l.length;h<f;)u=u.then(l[h++],l[h++]);return u}getUri(e){e=_n(this.defaults,e);const t=Lc(e.baseURL,e.url,e.allowAbsoluteUrls);return wc(t,e.params,e.paramsSerializer)}};ee.forEach(["delete","get","head","options"],function(e){qn.prototype[e]=function(t,r){return this.request(_n(r||{},{method:e,url:t,data:(r||{}).data}))}}),ee.forEach(["post","put","patch"],function(e){function t(r){return function(a,o,c){return this.request(_n(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}qn.prototype[e]=t(),qn.prototype[e+"Form"]=t(!0)});let ay=class Wc{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const o=new Promise(c=>{r.subscribe(c),a=c}).then(s);return o.cancel=function(){r.unsubscribe(a)},o},e(function(a,o,c){r.reason||(r.reason=new fr(a,o,c),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Wc(function(s){e=s}),cancel:e}}};function ly(n){return function(t){return n.apply(null,t)}}function cy(n){return ee.isObject(n)&&n.isAxiosError===!0}const go={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(go).forEach(([n,e])=>{go[e]=n});function qc(n){const e=new qn(n),t=ac(qn.prototype.request,e);return ee.extend(t,qn.prototype,e,{allOwnKeys:!0}),ee.extend(t,e,null,{allOwnKeys:!0}),t.create=function(s){return qc(_n(n,s))},t}const nt=qc(Gr);nt.Axios=qn,nt.CanceledError=fr,nt.CancelToken=ay,nt.isCancel=Oc,nt.VERSION=Vc,nt.toFormData=Fs,nt.AxiosError=Me,nt.Cancel=nt.CanceledError,nt.all=function(e){return Promise.all(e)},nt.spread=ly,nt.isAxiosError=cy,nt.mergeConfig=_n,nt.AxiosHeaders=Nt,nt.formToJSON=n=>Tc(ee.isHTMLForm(n)?new FormData(n):n),nt.getAdapter=jc.getAdapter,nt.HttpStatusCode=go,nt.default=nt;const{Axios:Ob,AxiosError:Cb,CanceledError:Rb,isCancel:Ib,CancelToken:Lb,VERSION:kb,all:Bb,Cancel:Pb,isAxiosError:Fb,spread:Mb,toFormData:Db,AxiosHeaders:Ub,HttpStatusCode:jb,formToJSON:$b,getAdapter:Vb,mergeConfig:_b}=nt;var mo={exports:{}},zc;function uy(){return zc||(zc=1,function(n,e){(function(r,s){n.exports=s()})(self,function(){return function(){var t={3099:function(o){o.exports=function(c){if(typeof c!="function")throw TypeError(String(c)+" is not a function");return c}},6077:function(o,c,i){var l=i(111);o.exports=function(u){if(!l(u)&&u!==null)throw TypeError("Can't set "+String(u)+" as a prototype");return u}},1223:function(o,c,i){var l=i(5112),u=i(30),h=i(3070),f=l("unscopables"),m=Array.prototype;m[f]==null&&h.f(m,f,{configurable:!0,value:u(null)}),o.exports=function(g){m[f][g]=!0}},1530:function(o,c,i){var l=i(8710).charAt;o.exports=function(u,h,f){return h+(f?l(u,h).length:1)}},5787:function(o){o.exports=function(c,i,l){if(!(c instanceof i))throw TypeError("Incorrect "+(l?l+" ":"")+"invocation");return c}},9670:function(o,c,i){var l=i(111);o.exports=function(u){if(!l(u))throw TypeError(String(u)+" is not an object");return u}},4019:function(o){o.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},260:function(o,c,i){var l=i(4019),u=i(9781),h=i(7854),f=i(111),m=i(6656),g=i(648),v=i(8880),x=i(1320),T=i(3070).f,S=i(9518),I=i(7674),F=i(5112),M=i(9711),z=h.Int8Array,X=z&&z.prototype,H=h.Uint8ClampedArray,re=H&&H.prototype,G=z&&S(z),E=X&&S(X),P=Object.prototype,O=P.isPrototypeOf,_=F("toStringTag"),j=M("TYPED_ARRAY_TAG"),$=l&&!!I&&g(h.opera)!=="Opera",K=!1,q,J={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},te={BigInt64Array:8,BigUint64Array:8},ge=function(N){if(!f(N))return!1;var R=g(N);return R==="DataView"||m(J,R)||m(te,R)},me=function(ye){if(!f(ye))return!1;var N=g(ye);return m(J,N)||m(te,N)},ve=function(ye){if(me(ye))return ye;throw TypeError("Target is not a typed array")},xe=function(ye){if(I){if(O.call(G,ye))return ye}else for(var N in J)if(m(J,q)){var R=h[N];if(R&&(ye===R||O.call(R,ye)))return ye}throw TypeError("Target is not a typed array constructor")},he=function(ye,N,R){if(u){if(R)for(var w in J){var C=h[w];C&&m(C.prototype,ye)&&delete C.prototype[ye]}(!E[ye]||R)&&x(E,ye,R?N:$&&X[ye]||N)}},Oe=function(ye,N,R){var w,C;if(u){if(I){if(R)for(w in J)C=h[w],C&&m(C,ye)&&delete C[ye];if(!G[ye]||R)try{return x(G,ye,R?N:$&&z[ye]||N)}catch{}else return}for(w in J)C=h[w],C&&(!C[ye]||R)&&x(C,ye,N)}};for(q in J)h[q]||($=!1);if((!$||typeof G!="function"||G===Function.prototype)&&(G=function(){throw TypeError("Incorrect invocation")},$))for(q in J)h[q]&&I(h[q],G);if((!$||!E||E===P)&&(E=G.prototype,$))for(q in J)h[q]&&I(h[q].prototype,E);if($&&S(re)!==E&&I(re,E),u&&!m(E,_)){K=!0,T(E,_,{get:function(){return f(this)?this[j]:void 0}});for(q in J)h[q]&&v(h[q],j,q)}o.exports={NATIVE_ARRAY_BUFFER_VIEWS:$,TYPED_ARRAY_TAG:K&&j,aTypedArray:ve,aTypedArrayConstructor:xe,exportTypedArrayMethod:he,exportTypedArrayStaticMethod:Oe,isView:ge,isTypedArray:me,TypedArray:G,TypedArrayPrototype:E}},3331:function(o,c,i){var l=i(7854),u=i(9781),h=i(4019),f=i(8880),m=i(2248),g=i(7293),v=i(5787),x=i(9958),T=i(7466),S=i(7067),I=i(1179),F=i(9518),M=i(7674),z=i(8006).f,X=i(3070).f,H=i(1285),re=i(8003),G=i(9909),E=G.get,P=G.set,O="ArrayBuffer",_="DataView",j="prototype",$="Wrong length",K="Wrong index",q=l[O],J=q,te=l[_],ge=te&&te[j],me=Object.prototype,ve=l.RangeError,xe=I.pack,he=I.unpack,Oe=function(Q){return[Q&255]},ye=function(Q){return[Q&255,Q>>8&255]},N=function(Q){return[Q&255,Q>>8&255,Q>>16&255,Q>>24&255]},R=function(Q){return Q[3]<<24|Q[2]<<16|Q[1]<<8|Q[0]},w=function(Q){return xe(Q,23,4)},C=function(Q){return xe(Q,52,8)},y=function(Q,ne){X(Q[j],ne,{get:function(){return E(this)[ne]}})},b=function(Q,ne,oe,de){var we=S(oe),De=E(Q);if(we+ne>De.byteLength)throw ve(K);var Ge=E(De.buffer).bytes,je=we+De.byteOffset,Be=Ge.slice(je,je+ne);return de?Be:Be.reverse()},L=function(Q,ne,oe,de,we,De){var Ge=S(oe),je=E(Q);if(Ge+ne>je.byteLength)throw ve(K);for(var Be=E(je.buffer).bytes,$e=Ge+je.byteOffset,rt=de(+we),it=0;it<ne;it++)Be[$e+it]=rt[De?it:ne-it-1]};if(!h)J=function(ne){v(this,J,O);var oe=S(ne);P(this,{bytes:H.call(new Array(oe),0),byteLength:oe}),u||(this.byteLength=oe)},te=function(ne,oe,de){v(this,te,_),v(ne,J,_);var we=E(ne).byteLength,De=x(oe);if(De<0||De>we)throw ve("Wrong offset");if(de=de===void 0?we-De:T(de),De+de>we)throw ve($);P(this,{buffer:ne,byteLength:de,byteOffset:De}),u||(this.buffer=ne,this.byteLength=de,this.byteOffset=De)},u&&(y(J,"byteLength"),y(te,"buffer"),y(te,"byteLength"),y(te,"byteOffset")),m(te[j],{getInt8:function(ne){return b(this,1,ne)[0]<<24>>24},getUint8:function(ne){return b(this,1,ne)[0]},getInt16:function(ne){var oe=b(this,2,ne,arguments.length>1?arguments[1]:void 0);return(oe[1]<<8|oe[0])<<16>>16},getUint16:function(ne){var oe=b(this,2,ne,arguments.length>1?arguments[1]:void 0);return oe[1]<<8|oe[0]},getInt32:function(ne){return R(b(this,4,ne,arguments.length>1?arguments[1]:void 0))},getUint32:function(ne){return R(b(this,4,ne,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(ne){return he(b(this,4,ne,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(ne){return he(b(this,8,ne,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(ne,oe){L(this,1,ne,Oe,oe)},setUint8:function(ne,oe){L(this,1,ne,Oe,oe)},setInt16:function(ne,oe){L(this,2,ne,ye,oe,arguments.length>2?arguments[2]:void 0)},setUint16:function(ne,oe){L(this,2,ne,ye,oe,arguments.length>2?arguments[2]:void 0)},setInt32:function(ne,oe){L(this,4,ne,N,oe,arguments.length>2?arguments[2]:void 0)},setUint32:function(ne,oe){L(this,4,ne,N,oe,arguments.length>2?arguments[2]:void 0)},setFloat32:function(ne,oe){L(this,4,ne,w,oe,arguments.length>2?arguments[2]:void 0)},setFloat64:function(ne,oe){L(this,8,ne,C,oe,arguments.length>2?arguments[2]:void 0)}});else{if(!g(function(){q(1)})||!g(function(){new q(-1)})||g(function(){return new q,new q(1.5),new q(NaN),q.name!=O})){J=function(ne){return v(this,J),new q(S(ne))};for(var B=J[j]=q[j],U=z(q),V=0,W;U.length>V;)(W=U[V++])in J||f(J,W,q[W]);B.constructor=J}M&&F(ge)!==me&&M(ge,me);var Z=new te(new J(2)),Y=ge.setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),(Z.getInt8(0)||!Z.getInt8(1))&&m(ge,{setInt8:function(ne,oe){Y.call(this,ne,oe<<24>>24)},setUint8:function(ne,oe){Y.call(this,ne,oe<<24>>24)}},{unsafe:!0})}re(J,O),re(te,_),o.exports={ArrayBuffer:J,DataView:te}},1048:function(o,c,i){var l=i(7908),u=i(1400),h=i(7466),f=Math.min;o.exports=[].copyWithin||function(g,v){var x=l(this),T=h(x.length),S=u(g,T),I=u(v,T),F=arguments.length>2?arguments[2]:void 0,M=f((F===void 0?T:u(F,T))-I,T-S),z=1;for(I<S&&S<I+M&&(z=-1,I+=M-1,S+=M-1);M-- >0;)I in x?x[S]=x[I]:delete x[S],S+=z,I+=z;return x}},1285:function(o,c,i){var l=i(7908),u=i(1400),h=i(7466);o.exports=function(m){for(var g=l(this),v=h(g.length),x=arguments.length,T=u(x>1?arguments[1]:void 0,v),S=x>2?arguments[2]:void 0,I=S===void 0?v:u(S,v);I>T;)g[T++]=m;return g}},8533:function(o,c,i){var l=i(2092).forEach,u=i(9341),h=u("forEach");o.exports=h?[].forEach:function(m){return l(this,m,arguments.length>1?arguments[1]:void 0)}},8457:function(o,c,i){var l=i(9974),u=i(7908),h=i(3411),f=i(7659),m=i(7466),g=i(6135),v=i(1246);o.exports=function(T){var S=u(T),I=typeof this=="function"?this:Array,F=arguments.length,M=F>1?arguments[1]:void 0,z=M!==void 0,X=v(S),H=0,re,G,E,P,O,_;if(z&&(M=l(M,F>2?arguments[2]:void 0,2)),X!=null&&!(I==Array&&f(X)))for(P=X.call(S),O=P.next,G=new I;!(E=O.call(P)).done;H++)_=z?h(P,M,[E.value,H],!0):E.value,g(G,H,_);else for(re=m(S.length),G=new I(re);re>H;H++)_=z?M(S[H],H):S[H],g(G,H,_);return G.length=H,G}},1318:function(o,c,i){var l=i(5656),u=i(7466),h=i(1400),f=function(m){return function(g,v,x){var T=l(g),S=u(T.length),I=h(x,S),F;if(m&&v!=v){for(;S>I;)if(F=T[I++],F!=F)return!0}else for(;S>I;I++)if((m||I in T)&&T[I]===v)return m||I||0;return!m&&-1}};o.exports={includes:f(!0),indexOf:f(!1)}},2092:function(o,c,i){var l=i(9974),u=i(8361),h=i(7908),f=i(7466),m=i(5417),g=[].push,v=function(x){var T=x==1,S=x==2,I=x==3,F=x==4,M=x==6,z=x==7,X=x==5||M;return function(H,re,G,E){for(var P=h(H),O=u(P),_=l(re,G,3),j=f(O.length),$=0,K=E||m,q=T?K(H,j):S||z?K(H,0):void 0,J,te;j>$;$++)if((X||$ in O)&&(J=O[$],te=_(J,$,P),x))if(T)q[$]=te;else if(te)switch(x){case 3:return!0;case 5:return J;case 6:return $;case 2:g.call(q,J)}else switch(x){case 4:return!1;case 7:g.call(q,J)}return M?-1:I||F?F:q}};o.exports={forEach:v(0),map:v(1),filter:v(2),some:v(3),every:v(4),find:v(5),findIndex:v(6),filterOut:v(7)}},6583:function(o,c,i){var l=i(5656),u=i(9958),h=i(7466),f=i(9341),m=Math.min,g=[].lastIndexOf,v=!!g&&1/[1].lastIndexOf(1,-0)<0,x=f("lastIndexOf"),T=v||!x;o.exports=T?function(I){if(v)return g.apply(this,arguments)||0;var F=l(this),M=h(F.length),z=M-1;for(arguments.length>1&&(z=m(z,u(arguments[1]))),z<0&&(z=M+z);z>=0;z--)if(z in F&&F[z]===I)return z||0;return-1}:g},1194:function(o,c,i){var l=i(7293),u=i(5112),h=i(7392),f=u("species");o.exports=function(m){return h>=51||!l(function(){var g=[],v=g.constructor={};return v[f]=function(){return{foo:1}},g[m](Boolean).foo!==1})}},9341:function(o,c,i){var l=i(7293);o.exports=function(u,h){var f=[][u];return!!f&&l(function(){f.call(null,h||function(){throw 1},1)})}},3671:function(o,c,i){var l=i(3099),u=i(7908),h=i(8361),f=i(7466),m=function(g){return function(v,x,T,S){l(x);var I=u(v),F=h(I),M=f(I.length),z=g?M-1:0,X=g?-1:1;if(T<2)for(;;){if(z in F){S=F[z],z+=X;break}if(z+=X,g?z<0:M<=z)throw TypeError("Reduce of empty array with no initial value")}for(;g?z>=0:M>z;z+=X)z in F&&(S=x(S,F[z],z,I));return S}};o.exports={left:m(!1),right:m(!0)}},5417:function(o,c,i){var l=i(111),u=i(3157),h=i(5112),f=h("species");o.exports=function(m,g){var v;return u(m)&&(v=m.constructor,typeof v=="function"&&(v===Array||u(v.prototype))?v=void 0:l(v)&&(v=v[f],v===null&&(v=void 0))),new(v===void 0?Array:v)(g===0?0:g)}},3411:function(o,c,i){var l=i(9670),u=i(9212);o.exports=function(h,f,m,g){try{return g?f(l(m)[0],m[1]):f(m)}catch(v){throw u(h),v}}},7072:function(o,c,i){var l=i(5112),u=l("iterator"),h=!1;try{var f=0,m={next:function(){return{done:!!f++}},return:function(){h=!0}};m[u]=function(){return this},Array.from(m,function(){throw 2})}catch{}o.exports=function(g,v){if(!v&&!h)return!1;var x=!1;try{var T={};T[u]=function(){return{next:function(){return{done:x=!0}}}},g(T)}catch{}return x}},4326:function(o){var c={}.toString;o.exports=function(i){return c.call(i).slice(8,-1)}},648:function(o,c,i){var l=i(1694),u=i(4326),h=i(5112),f=h("toStringTag"),m=u(function(){return arguments}())=="Arguments",g=function(v,x){try{return v[x]}catch{}};o.exports=l?u:function(v){var x,T,S;return v===void 0?"Undefined":v===null?"Null":typeof(T=g(x=Object(v),f))=="string"?T:m?u(x):(S=u(x))=="Object"&&typeof x.callee=="function"?"Arguments":S}},9920:function(o,c,i){var l=i(6656),u=i(3887),h=i(1236),f=i(3070);o.exports=function(m,g){for(var v=u(g),x=f.f,T=h.f,S=0;S<v.length;S++){var I=v[S];l(m,I)||x(m,I,T(g,I))}}},8544:function(o,c,i){var l=i(7293);o.exports=!l(function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype})},4994:function(o,c,i){var l=i(3383).IteratorPrototype,u=i(30),h=i(9114),f=i(8003),m=i(7497),g=function(){return this};o.exports=function(v,x,T){var S=x+" Iterator";return v.prototype=u(l,{next:h(1,T)}),f(v,S,!1,!0),m[S]=g,v}},8880:function(o,c,i){var l=i(9781),u=i(3070),h=i(9114);o.exports=l?function(f,m,g){return u.f(f,m,h(1,g))}:function(f,m,g){return f[m]=g,f}},9114:function(o){o.exports=function(c,i){return{enumerable:!(c&1),configurable:!(c&2),writable:!(c&4),value:i}}},6135:function(o,c,i){var l=i(7593),u=i(3070),h=i(9114);o.exports=function(f,m,g){var v=l(m);v in f?u.f(f,v,h(0,g)):f[v]=g}},654:function(o,c,i){var l=i(2109),u=i(4994),h=i(9518),f=i(7674),m=i(8003),g=i(8880),v=i(1320),x=i(5112),T=i(1913),S=i(7497),I=i(3383),F=I.IteratorPrototype,M=I.BUGGY_SAFARI_ITERATORS,z=x("iterator"),X="keys",H="values",re="entries",G=function(){return this};o.exports=function(E,P,O,_,j,$,K){u(O,P,_);var q=function(N){if(N===j&&ve)return ve;if(!M&&N in ge)return ge[N];switch(N){case X:return function(){return new O(this,N)};case H:return function(){return new O(this,N)};case re:return function(){return new O(this,N)}}return function(){return new O(this)}},J=P+" Iterator",te=!1,ge=E.prototype,me=ge[z]||ge["@@iterator"]||j&&ge[j],ve=!M&&me||q(j),xe=P=="Array"&&ge.entries||me,he,Oe,ye;if(xe&&(he=h(xe.call(new E)),F!==Object.prototype&&he.next&&(!T&&h(he)!==F&&(f?f(he,F):typeof he[z]!="function"&&g(he,z,G)),m(he,J,!0,!0),T&&(S[J]=G))),j==H&&me&&me.name!==H&&(te=!0,ve=function(){return me.call(this)}),(!T||K)&&ge[z]!==ve&&g(ge,z,ve),S[P]=ve,j)if(Oe={values:q(H),keys:$?ve:q(X),entries:q(re)},K)for(ye in Oe)(M||te||!(ye in ge))&&v(ge,ye,Oe[ye]);else l({target:P,proto:!0,forced:M||te},Oe);return Oe}},9781:function(o,c,i){var l=i(7293);o.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},317:function(o,c,i){var l=i(7854),u=i(111),h=l.document,f=u(h)&&u(h.createElement);o.exports=function(m){return f?h.createElement(m):{}}},8324:function(o){o.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(o,c,i){var l=i(5005);o.exports=l("navigator","userAgent")||""},7392:function(o,c,i){var l=i(7854),u=i(8113),h=l.process,f=h&&h.versions,m=f&&f.v8,g,v;m?(g=m.split("."),v=g[0]+g[1]):u&&(g=u.match(/Edge\/(\d+)/),(!g||g[1]>=74)&&(g=u.match(/Chrome\/(\d+)/),g&&(v=g[1]))),o.exports=v&&+v},748:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(o,c,i){var l=i(7854),u=i(1236).f,h=i(8880),f=i(1320),m=i(3505),g=i(9920),v=i(4705);o.exports=function(x,T){var S=x.target,I=x.global,F=x.stat,M,z,X,H,re,G;if(I?z=l:F?z=l[S]||m(S,{}):z=(l[S]||{}).prototype,z)for(X in T){if(re=T[X],x.noTargetGet?(G=u(z,X),H=G&&G.value):H=z[X],M=v(I?X:S+(F?".":"#")+X,x.forced),!M&&H!==void 0){if(typeof re==typeof H)continue;g(re,H)}(x.sham||H&&H.sham)&&h(re,"sham",!0),f(z,X,re,x)}}},7293:function(o){o.exports=function(c){try{return!!c()}catch{return!0}}},7007:function(o,c,i){i(4916);var l=i(1320),u=i(7293),h=i(5112),f=i(2261),m=i(8880),g=h("species"),v=!u(function(){var F=/./;return F.exec=function(){var M=[];return M.groups={a:"7"},M},"".replace(F,"$<a>")!=="7"}),x=function(){return"a".replace(/./,"$0")==="$0"}(),T=h("replace"),S=function(){return/./[T]?/./[T]("a","$0")==="":!1}(),I=!u(function(){var F=/(?:)/,M=F.exec;F.exec=function(){return M.apply(this,arguments)};var z="ab".split(F);return z.length!==2||z[0]!=="a"||z[1]!=="b"});o.exports=function(F,M,z,X){var H=h(F),re=!u(function(){var j={};return j[H]=function(){return 7},""[F](j)!=7}),G=re&&!u(function(){var j=!1,$=/a/;return F==="split"&&($={},$.constructor={},$.constructor[g]=function(){return $},$.flags="",$[H]=/./[H]),$.exec=function(){return j=!0,null},$[H](""),!j});if(!re||!G||F==="replace"&&!(v&&x&&!S)||F==="split"&&!I){var E=/./[H],P=z(H,""[F],function(j,$,K,q,J){return $.exec===f?re&&!J?{done:!0,value:E.call($,K,q)}:{done:!0,value:j.call(K,$,q)}:{done:!1}},{REPLACE_KEEPS_$0:x,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:S}),O=P[0],_=P[1];l(String.prototype,F,O),l(RegExp.prototype,H,M==2?function(j,$){return _.call(j,this,$)}:function(j){return _.call(j,this)})}X&&m(RegExp.prototype[H],"sham",!0)}},9974:function(o,c,i){var l=i(3099);o.exports=function(u,h,f){if(l(u),h===void 0)return u;switch(f){case 0:return function(){return u.call(h)};case 1:return function(m){return u.call(h,m)};case 2:return function(m,g){return u.call(h,m,g)};case 3:return function(m,g,v){return u.call(h,m,g,v)}}return function(){return u.apply(h,arguments)}}},5005:function(o,c,i){var l=i(857),u=i(7854),h=function(f){return typeof f=="function"?f:void 0};o.exports=function(f,m){return arguments.length<2?h(l[f])||h(u[f]):l[f]&&l[f][m]||u[f]&&u[f][m]}},1246:function(o,c,i){var l=i(648),u=i(7497),h=i(5112),f=h("iterator");o.exports=function(m){if(m!=null)return m[f]||m["@@iterator"]||u[l(m)]}},8554:function(o,c,i){var l=i(9670),u=i(1246);o.exports=function(h){var f=u(h);if(typeof f!="function")throw TypeError(String(h)+" is not iterable");return l(f.call(h))}},647:function(o,c,i){var l=i(7908),u=Math.floor,h="".replace,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;o.exports=function(g,v,x,T,S,I){var F=x+g.length,M=T.length,z=m;return S!==void 0&&(S=l(S),z=f),h.call(I,z,function(X,H){var re;switch(H.charAt(0)){case"$":return"$";case"&":return g;case"`":return v.slice(0,x);case"'":return v.slice(F);case"<":re=S[H.slice(1,-1)];break;default:var G=+H;if(G===0)return X;if(G>M){var E=u(G/10);return E===0?X:E<=M?T[E-1]===void 0?H.charAt(1):T[E-1]+H.charAt(1):X}re=T[G-1]}return re===void 0?"":re})}},7854:function(o,c,i){var l=function(u){return u&&u.Math==Math&&u};o.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof i.g=="object"&&i.g)||function(){return this}()||Function("return this")()},6656:function(o){var c={}.hasOwnProperty;o.exports=function(i,l){return c.call(i,l)}},3501:function(o){o.exports={}},490:function(o,c,i){var l=i(5005);o.exports=l("document","documentElement")},4664:function(o,c,i){var l=i(9781),u=i(7293),h=i(317);o.exports=!l&&!u(function(){return Object.defineProperty(h("div"),"a",{get:function(){return 7}}).a!=7})},1179:function(o){var c=Math.abs,i=Math.pow,l=Math.floor,u=Math.log,h=Math.LN2,f=function(g,v,x){var T=new Array(x),S=x*8-v-1,I=(1<<S)-1,F=I>>1,M=v===23?i(2,-24)-i(2,-77):0,z=g<0||g===0&&1/g<0?1:0,X=0,H,re,G;for(g=c(g),g!=g||g===1/0?(re=g!=g?1:0,H=I):(H=l(u(g)/h),g*(G=i(2,-H))<1&&(H--,G*=2),H+F>=1?g+=M/G:g+=M*i(2,1-F),g*G>=2&&(H++,G/=2),H+F>=I?(re=0,H=I):H+F>=1?(re=(g*G-1)*i(2,v),H=H+F):(re=g*i(2,F-1)*i(2,v),H=0));v>=8;T[X++]=re&255,re/=256,v-=8);for(H=H<<v|re,S+=v;S>0;T[X++]=H&255,H/=256,S-=8);return T[--X]|=z*128,T},m=function(g,v){var x=g.length,T=x*8-v-1,S=(1<<T)-1,I=S>>1,F=T-7,M=x-1,z=g[M--],X=z&127,H;for(z>>=7;F>0;X=X*256+g[M],M--,F-=8);for(H=X&(1<<-F)-1,X>>=-F,F+=v;F>0;H=H*256+g[M],M--,F-=8);if(X===0)X=1-I;else{if(X===S)return H?NaN:z?-1/0:1/0;H=H+i(2,v),X=X-I}return(z?-1:1)*H*i(2,X-v)};o.exports={pack:f,unpack:m}},8361:function(o,c,i){var l=i(7293),u=i(4326),h="".split;o.exports=l(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return u(f)=="String"?h.call(f,""):Object(f)}:Object},9587:function(o,c,i){var l=i(111),u=i(7674);o.exports=function(h,f,m){var g,v;return u&&typeof(g=f.constructor)=="function"&&g!==m&&l(v=g.prototype)&&v!==m.prototype&&u(h,v),h}},2788:function(o,c,i){var l=i(5465),u=Function.toString;typeof l.inspectSource!="function"&&(l.inspectSource=function(h){return u.call(h)}),o.exports=l.inspectSource},9909:function(o,c,i){var l=i(8536),u=i(7854),h=i(111),f=i(8880),m=i(6656),g=i(5465),v=i(6200),x=i(3501),T=u.WeakMap,S,I,F,M=function(P){return F(P)?I(P):S(P,{})},z=function(P){return function(O){var _;if(!h(O)||(_=I(O)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return _}};if(l){var X=g.state||(g.state=new T),H=X.get,re=X.has,G=X.set;S=function(P,O){return O.facade=P,G.call(X,P,O),O},I=function(P){return H.call(X,P)||{}},F=function(P){return re.call(X,P)}}else{var E=v("state");x[E]=!0,S=function(P,O){return O.facade=P,f(P,E,O),O},I=function(P){return m(P,E)?P[E]:{}},F=function(P){return m(P,E)}}o.exports={set:S,get:I,has:F,enforce:M,getterFor:z}},7659:function(o,c,i){var l=i(5112),u=i(7497),h=l("iterator"),f=Array.prototype;o.exports=function(m){return m!==void 0&&(u.Array===m||f[h]===m)}},3157:function(o,c,i){var l=i(4326);o.exports=Array.isArray||function(h){return l(h)=="Array"}},4705:function(o,c,i){var l=i(7293),u=/#|\.prototype\./,h=function(x,T){var S=m[f(x)];return S==v?!0:S==g?!1:typeof T=="function"?l(T):!!T},f=h.normalize=function(x){return String(x).replace(u,".").toLowerCase()},m=h.data={},g=h.NATIVE="N",v=h.POLYFILL="P";o.exports=h},111:function(o){o.exports=function(c){return typeof c=="object"?c!==null:typeof c=="function"}},1913:function(o){o.exports=!1},7850:function(o,c,i){var l=i(111),u=i(4326),h=i(5112),f=h("match");o.exports=function(m){var g;return l(m)&&((g=m[f])!==void 0?!!g:u(m)=="RegExp")}},9212:function(o,c,i){var l=i(9670);o.exports=function(u){var h=u.return;if(h!==void 0)return l(h.call(u)).value}},3383:function(o,c,i){var l=i(7293),u=i(9518),h=i(8880),f=i(6656),m=i(5112),g=i(1913),v=m("iterator"),x=!1,T=function(){return this},S,I,F;[].keys&&(F=[].keys(),"next"in F?(I=u(u(F)),I!==Object.prototype&&(S=I)):x=!0);var M=S==null||l(function(){var z={};return S[v].call(z)!==z});M&&(S={}),(!g||M)&&!f(S,v)&&h(S,v,T),o.exports={IteratorPrototype:S,BUGGY_SAFARI_ITERATORS:x}},7497:function(o){o.exports={}},133:function(o,c,i){var l=i(7293);o.exports=!!Object.getOwnPropertySymbols&&!l(function(){return!String(Symbol())})},590:function(o,c,i){var l=i(7293),u=i(5112),h=i(1913),f=u("iterator");o.exports=!l(function(){var m=new URL("b?a=1&b=2&c=3","http://a"),g=m.searchParams,v="";return m.pathname="c%20d",g.forEach(function(x,T){g.delete("b"),v+=T+x}),h&&!m.toJSON||!g.sort||m.href!=="http://a/c%20d?a=1&c=3"||g.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!g[f]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||v!=="a1c3"||new URL("http://x",void 0).host!=="x"})},8536:function(o,c,i){var l=i(7854),u=i(2788),h=l.WeakMap;o.exports=typeof h=="function"&&/native code/.test(u(h))},1574:function(o,c,i){var l=i(9781),u=i(7293),h=i(1956),f=i(5181),m=i(5296),g=i(7908),v=i(8361),x=Object.assign,T=Object.defineProperty;o.exports=!x||u(function(){if(l&&x({b:1},x(T({},"a",{enumerable:!0,get:function(){T(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},I={},F=Symbol(),M="abcdefghijklmnopqrst";return S[F]=7,M.split("").forEach(function(z){I[z]=z}),x({},S)[F]!=7||h(x({},I)).join("")!=M})?function(I,F){for(var M=g(I),z=arguments.length,X=1,H=f.f,re=m.f;z>X;)for(var G=v(arguments[X++]),E=H?h(G).concat(H(G)):h(G),P=E.length,O=0,_;P>O;)_=E[O++],(!l||re.call(G,_))&&(M[_]=G[_]);return M}:x},30:function(o,c,i){var l=i(9670),u=i(6048),h=i(748),f=i(3501),m=i(490),g=i(317),v=i(6200),x=">",T="<",S="prototype",I="script",F=v("IE_PROTO"),M=function(){},z=function(E){return T+I+x+E+T+"/"+I+x},X=function(E){E.write(z("")),E.close();var P=E.parentWindow.Object;return E=null,P},H=function(){var E=g("iframe"),P="java"+I+":",O;return E.style.display="none",m.appendChild(E),E.src=String(P),O=E.contentWindow.document,O.open(),O.write(z("document.F=Object")),O.close(),O.F},re,G=function(){try{re=document.domain&&new ActiveXObject("htmlfile")}catch{}G=re?X(re):H();for(var E=h.length;E--;)delete G[S][h[E]];return G()};f[F]=!0,o.exports=Object.create||function(P,O){var _;return P!==null?(M[S]=l(P),_=new M,M[S]=null,_[F]=P):_=G(),O===void 0?_:u(_,O)}},6048:function(o,c,i){var l=i(9781),u=i(3070),h=i(9670),f=i(1956);o.exports=l?Object.defineProperties:function(g,v){h(g);for(var x=f(v),T=x.length,S=0,I;T>S;)u.f(g,I=x[S++],v[I]);return g}},3070:function(o,c,i){var l=i(9781),u=i(4664),h=i(9670),f=i(7593),m=Object.defineProperty;c.f=l?m:function(v,x,T){if(h(v),x=f(x,!0),h(T),u)try{return m(v,x,T)}catch{}if("get"in T||"set"in T)throw TypeError("Accessors not supported");return"value"in T&&(v[x]=T.value),v}},1236:function(o,c,i){var l=i(9781),u=i(5296),h=i(9114),f=i(5656),m=i(7593),g=i(6656),v=i(4664),x=Object.getOwnPropertyDescriptor;c.f=l?x:function(S,I){if(S=f(S),I=m(I,!0),v)try{return x(S,I)}catch{}if(g(S,I))return h(!u.f.call(S,I),S[I])}},8006:function(o,c,i){var l=i(6324),u=i(748),h=u.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(m){return l(m,h)}},5181:function(o,c){c.f=Object.getOwnPropertySymbols},9518:function(o,c,i){var l=i(6656),u=i(7908),h=i(6200),f=i(8544),m=h("IE_PROTO"),g=Object.prototype;o.exports=f?Object.getPrototypeOf:function(v){return v=u(v),l(v,m)?v[m]:typeof v.constructor=="function"&&v instanceof v.constructor?v.constructor.prototype:v instanceof Object?g:null}},6324:function(o,c,i){var l=i(6656),u=i(5656),h=i(1318).indexOf,f=i(3501);o.exports=function(m,g){var v=u(m),x=0,T=[],S;for(S in v)!l(f,S)&&l(v,S)&&T.push(S);for(;g.length>x;)l(v,S=g[x++])&&(~h(T,S)||T.push(S));return T}},1956:function(o,c,i){var l=i(6324),u=i(748);o.exports=Object.keys||function(f){return l(f,u)}},5296:function(o,c){var i={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,u=l&&!i.call({1:2},1);c.f=u?function(f){var m=l(this,f);return!!m&&m.enumerable}:i},7674:function(o,c,i){var l=i(9670),u=i(6077);o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var h=!1,f={},m;try{m=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,m.call(f,[]),h=f instanceof Array}catch{}return function(v,x){return l(v),u(x),h?m.call(v,x):v.__proto__=x,v}}():void 0)},288:function(o,c,i){var l=i(1694),u=i(648);o.exports=l?{}.toString:function(){return"[object "+u(this)+"]"}},3887:function(o,c,i){var l=i(5005),u=i(8006),h=i(5181),f=i(9670);o.exports=l("Reflect","ownKeys")||function(g){var v=u.f(f(g)),x=h.f;return x?v.concat(x(g)):v}},857:function(o,c,i){var l=i(7854);o.exports=l},2248:function(o,c,i){var l=i(1320);o.exports=function(u,h,f){for(var m in h)l(u,m,h[m],f);return u}},1320:function(o,c,i){var l=i(7854),u=i(8880),h=i(6656),f=i(3505),m=i(2788),g=i(9909),v=g.get,x=g.enforce,T=String(String).split("String");(o.exports=function(S,I,F,M){var z=M?!!M.unsafe:!1,X=M?!!M.enumerable:!1,H=M?!!M.noTargetGet:!1,re;if(typeof F=="function"&&(typeof I=="string"&&!h(F,"name")&&u(F,"name",I),re=x(F),re.source||(re.source=T.join(typeof I=="string"?I:""))),S===l){X?S[I]=F:f(I,F);return}else z?!H&&S[I]&&(X=!0):delete S[I];X?S[I]=F:u(S,I,F)})(Function.prototype,"toString",function(){return typeof this=="function"&&v(this).source||m(this)})},7651:function(o,c,i){var l=i(4326),u=i(2261);o.exports=function(h,f){var m=h.exec;if(typeof m=="function"){var g=m.call(h,f);if(typeof g!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return g}if(l(h)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return u.call(h,f)}},2261:function(o,c,i){var l=i(7066),u=i(2999),h=RegExp.prototype.exec,f=String.prototype.replace,m=h,g=function(){var S=/a/,I=/b*/g;return h.call(S,"a"),h.call(I,"a"),S.lastIndex!==0||I.lastIndex!==0}(),v=u.UNSUPPORTED_Y||u.BROKEN_CARET,x=/()??/.exec("")[1]!==void 0,T=g||x||v;T&&(m=function(I){var F=this,M,z,X,H,re=v&&F.sticky,G=l.call(F),E=F.source,P=0,O=I;return re&&(G=G.replace("y",""),G.indexOf("g")===-1&&(G+="g"),O=String(I).slice(F.lastIndex),F.lastIndex>0&&(!F.multiline||F.multiline&&I[F.lastIndex-1]!==`
@@ -62,4 +62,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
62
62
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,L=!1,B;return{s:function(){w=N[Symbol.iterator]()},n:function(){var V=w.next();return b=V.done,V},e:function(V){L=!0,B=V},f:function(){try{!b&&w.return!=null&&w.return()}finally{if(L)throw B}}}}function x(N,R){if(N){if(typeof N=="string")return T(N,R);var w=Object.prototype.toString.call(N).slice(8,-1);if(w==="Object"&&N.constructor&&(w=N.constructor.name),w==="Map"||w==="Set")return Array.from(N);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return T(N,R)}}function T(N,R){(R==null||R>N.length)&&(R=N.length);for(var w=0,C=new Array(R);w<R;w++)C[w]=N[w];return C}var S={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(R,w,C){if(C)return{dzuuid:C.file.upload.uuid,dzchunkindex:C.index,dztotalfilesize:C.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:C.file.upload.totalChunkCount,dzchunkbyteoffset:C.index*this.options.chunkSize}},accept:function(R,w){return w()},chunksUploaded:function(R,w){w()},fallback:function(){var R;this.element.className="".concat(this.element.className," dz-browser-not-supported");var w=v(this.element.getElementsByTagName("div")),C;try{for(w.s();!(C=w.n()).done;){var y=C.value;if(/(^| )dz-message($| )/.test(y.className)){R=y,y.className="dz-message";break}}}catch(L){w.e(L)}finally{w.f()}R||(R=q.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(R));var b=R.getElementsByTagName("span")[0];return b&&(b.textContent!=null?b.textContent=this.options.dictFallbackMessage:b.innerText!=null&&(b.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(R,w,C,y){var b={srcX:0,srcY:0,srcWidth:R.width,srcHeight:R.height},L=R.width/R.height;w==null&&C==null?(w=b.srcWidth,C=b.srcHeight):w==null?w=C*L:C==null&&(C=w/L),w=Math.min(w,b.srcWidth),C=Math.min(C,b.srcHeight);var B=w/C;if(b.srcWidth>w||b.srcHeight>C)if(y==="crop")L>B?(b.srcHeight=R.height,b.srcWidth=b.srcHeight*B):(b.srcWidth=R.width,b.srcHeight=b.srcWidth/B);else if(y==="contain")L>B?C=w/L:w=C*L;else throw new Error("Unknown resizeMethod '".concat(y,"'"));return b.srcX=(R.width-b.srcWidth)/2,b.srcY=(R.height-b.srcHeight)/2,b.trgWidth=w,b.trgHeight=C,b},transformFile:function(R,w){return(this.options.resizeWidth||this.options.resizeHeight)&&R.type.match(/image.*/)?this.resizeImage(R,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,w):w(R)},previewTemplate:g,drop:function(R){return this.element.classList.remove("dz-drag-hover")},dragstart:function(R){},dragend:function(R){return this.element.classList.remove("dz-drag-hover")},dragenter:function(R){return this.element.classList.add("dz-drag-hover")},dragover:function(R){return this.element.classList.add("dz-drag-hover")},dragleave:function(R){return this.element.classList.remove("dz-drag-hover")},paste:function(R){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(R){var w=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){R.previewElement=q.createElement(this.options.previewTemplate.trim()),R.previewTemplate=R.previewElement,this.previewsContainer.appendChild(R.previewElement);var C=v(R.previewElement.querySelectorAll("[data-dz-name]")),y;try{for(C.s();!(y=C.n()).done;){var b=y.value;b.textContent=R.name}}catch(Y){C.e(Y)}finally{C.f()}var L=v(R.previewElement.querySelectorAll("[data-dz-size]")),B;try{for(L.s();!(B=L.n()).done;)b=B.value,b.innerHTML=this.filesize(R.size)}catch(Y){L.e(Y)}finally{L.f()}this.options.addRemoveLinks&&(R._removeLink=q.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),R.previewElement.appendChild(R._removeLink));var U=function(Q){return Q.preventDefault(),Q.stopPropagation(),R.status===q.UPLOADING?q.confirm(w.options.dictCancelUploadConfirmation,function(){return w.removeFile(R)}):w.options.dictRemoveFileConfirmation?q.confirm(w.options.dictRemoveFileConfirmation,function(){return w.removeFile(R)}):w.removeFile(R)},V=v(R.previewElement.querySelectorAll("[data-dz-remove]")),W;try{for(V.s();!(W=V.n()).done;){var Z=W.value;Z.addEventListener("click",U)}}catch(Y){V.e(Y)}finally{V.f()}}},removedfile:function(R){return R.previewElement!=null&&R.previewElement.parentNode!=null&&R.previewElement.parentNode.removeChild(R.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(R,w){if(R.previewElement){R.previewElement.classList.remove("dz-file-preview");var C=v(R.previewElement.querySelectorAll("[data-dz-thumbnail]")),y;try{for(C.s();!(y=C.n()).done;){var b=y.value;b.alt=R.name,b.src=w}}catch(L){C.e(L)}finally{C.f()}return setTimeout(function(){return R.previewElement.classList.add("dz-image-preview")},1)}},error:function(R,w){if(R.previewElement){R.previewElement.classList.add("dz-error"),typeof w!="string"&&w.error&&(w=w.error);var C=v(R.previewElement.querySelectorAll("[data-dz-errormessage]")),y;try{for(C.s();!(y=C.n()).done;){var b=y.value;b.textContent=w}}catch(L){C.e(L)}finally{C.f()}}},errormultiple:function(){},processing:function(R){if(R.previewElement&&(R.previewElement.classList.add("dz-processing"),R._removeLink))return R._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(R,w,C){if(R.previewElement){var y=v(R.previewElement.querySelectorAll("[data-dz-uploadprogress]")),b;try{for(y.s();!(b=y.n()).done;){var L=b.value;L.nodeName==="PROGRESS"?L.value=w:L.style.width="".concat(w,"%")}}catch(B){y.e(B)}finally{y.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(R){if(R.previewElement)return R.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(R){return this.emit("error",R,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(R){if(R._removeLink&&(R._removeLink.innerHTML=this.options.dictRemoveFile),R.previewElement)return R.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},I=S;function F(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F=function(w){return typeof w}:F=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},F(N)}function M(N,R){var w;if(typeof Symbol>"u"||N[Symbol.iterator]==null){if(Array.isArray(N)||(w=z(N))||N&&typeof N.length=="number"){w&&(N=w);var C=0,y=function(){};return{s:y,n:function(){return C>=N.length?{done:!0}:{done:!1,value:N[C++]}},e:function(V){throw V},f:y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
63
63
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,L=!1,B;return{s:function(){w=N[Symbol.iterator]()},n:function(){var V=w.next();return b=V.done,V},e:function(V){L=!0,B=V},f:function(){try{!b&&w.return!=null&&w.return()}finally{if(L)throw B}}}}function z(N,R){if(N){if(typeof N=="string")return X(N,R);var w=Object.prototype.toString.call(N).slice(8,-1);if(w==="Object"&&N.constructor&&(w=N.constructor.name),w==="Map"||w==="Set")return Array.from(N);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return X(N,R)}}function X(N,R){(R==null||R>N.length)&&(R=N.length);for(var w=0,C=new Array(R);w<R;w++)C[w]=N[w];return C}function H(N,R){if(!(N instanceof R))throw new TypeError("Cannot call a class as a function")}function re(N,R){for(var w=0;w<R.length;w++){var C=R[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(N,C.key,C)}}function G(N,R,w){return R&&re(N.prototype,R),w&&re(N,w),N}function E(N,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(R&&R.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),R&&P(N,R)}function P(N,R){return P=Object.setPrototypeOf||function(C,y){return C.__proto__=y,C},P(N,R)}function O(N){var R=$();return function(){var C=K(N),y;if(R){var b=K(this).constructor;y=Reflect.construct(C,arguments,b)}else y=C.apply(this,arguments);return _(this,y)}}function _(N,R){return R&&(F(R)==="object"||typeof R=="function")?R:j(N)}function j(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function $(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function K(N){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},K(N)}var q=function(N){E(w,N);var R=O(w);function w(C,y){var b;H(this,w),b=R.call(this);var L,B;if(b.element=C,b.version=w.version,b.clickableElements=[],b.listeners=[],b.files=[],typeof b.element=="string"&&(b.element=document.querySelector(b.element)),!b.element||b.element.nodeType==null)throw new Error("Invalid dropzone element.");if(b.element.dropzone)throw new Error("Dropzone already attached.");w.instances.push(j(b)),b.element.dropzone=j(b);var U=(B=w.optionsForElement(b.element))!=null?B:{};if(b.options=w.extend({},I,U,y??{}),b.options.previewTemplate=b.options.previewTemplate.replace(/\n*/g,""),b.options.forceFallback||!w.isBrowserSupported())return _(b,b.options.fallback.call(j(b)));if(b.options.url==null&&(b.options.url=b.element.getAttribute("action")),!b.options.url)throw new Error("No URL provided.");if(b.options.acceptedFiles&&b.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(b.options.uploadMultiple&&b.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return b.options.acceptedMimeTypes&&(b.options.acceptedFiles=b.options.acceptedMimeTypes,delete b.options.acceptedMimeTypes),b.options.renameFilename!=null&&(b.options.renameFile=function(V){return b.options.renameFilename.call(j(b),V.name,V)}),typeof b.options.method=="string"&&(b.options.method=b.options.method.toUpperCase()),(L=b.getExistingFallback())&&L.parentNode&&L.parentNode.removeChild(L),b.options.previewsContainer!==!1&&(b.options.previewsContainer?b.previewsContainer=w.getElement(b.options.previewsContainer,"previewsContainer"):b.previewsContainer=b.element),b.options.clickable&&(b.options.clickable===!0?b.clickableElements=[b.element]:b.clickableElements=w.getElements(b.options.clickable,"clickable")),b.init(),b}return G(w,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(y){return y.accepted}).map(function(y){return y})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(y){return!y.accepted}).map(function(y){return y})}},{key:"getFilesWithStatus",value:function(y){return this.files.filter(function(b){return b.status===y}).map(function(b){return b})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(w.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(w.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(w.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(y){return y.status===w.UPLOADING||y.status===w.QUEUED}).map(function(y){return y})}},{key:"init",value:function(){var y=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(w.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var b=function Z(){y.hiddenFileInput&&y.hiddenFileInput.parentNode.removeChild(y.hiddenFileInput),y.hiddenFileInput=document.createElement("input"),y.hiddenFileInput.setAttribute("type","file"),(y.options.maxFiles===null||y.options.maxFiles>1)&&y.hiddenFileInput.setAttribute("multiple","multiple"),y.hiddenFileInput.className="dz-hidden-input",y.options.acceptedFiles!==null&&y.hiddenFileInput.setAttribute("accept",y.options.acceptedFiles),y.options.capture!==null&&y.hiddenFileInput.setAttribute("capture",y.options.capture),y.hiddenFileInput.setAttribute("tabindex","-1"),y.hiddenFileInput.style.visibility="hidden",y.hiddenFileInput.style.position="absolute",y.hiddenFileInput.style.top="0",y.hiddenFileInput.style.left="0",y.hiddenFileInput.style.height="0",y.hiddenFileInput.style.width="0",w.getElement(y.options.hiddenInputContainer,"hiddenInputContainer").appendChild(y.hiddenFileInput),y.hiddenFileInput.addEventListener("change",function(){var Y=y.hiddenFileInput.files;if(Y.length){var Q=M(Y),ne;try{for(Q.s();!(ne=Q.n()).done;){var oe=ne.value;y.addFile(oe)}}catch(de){Q.e(de)}finally{Q.f()}}y.emit("addedfiles",Y),Z()})};b()}this.URL=window.URL!==null?window.URL:window.webkitURL;var L=M(this.events),B;try{for(L.s();!(B=L.n()).done;){var U=B.value;this.on(U,this.options[U])}}catch(Z){L.e(Z)}finally{L.f()}this.on("uploadprogress",function(){return y.updateTotalUploadProgress()}),this.on("removedfile",function(){return y.updateTotalUploadProgress()}),this.on("canceled",function(Z){return y.emit("complete",Z)}),this.on("complete",function(Z){if(y.getAddedFiles().length===0&&y.getUploadingFiles().length===0&&y.getQueuedFiles().length===0)return setTimeout(function(){return y.emit("queuecomplete")},0)});var V=function(Y){if(Y.dataTransfer.types){for(var Q=0;Q<Y.dataTransfer.types.length;Q++)if(Y.dataTransfer.types[Q]==="Files")return!0}return!1},W=function(Y){if(V(Y))return Y.stopPropagation(),Y.preventDefault?Y.preventDefault():Y.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(Y){return y.emit("dragstart",Y)},dragenter:function(Y){return W(Y),y.emit("dragenter",Y)},dragover:function(Y){var Q;try{Q=Y.dataTransfer.effectAllowed}catch{}return Y.dataTransfer.dropEffect=Q==="move"||Q==="linkMove"?"move":"copy",W(Y),y.emit("dragover",Y)},dragleave:function(Y){return y.emit("dragleave",Y)},drop:function(Y){return W(Y),y.drop(Y)},dragend:function(Y){return y.emit("dragend",Y)}}}],this.clickableElements.forEach(function(Z){return y.listeners.push({element:Z,events:{click:function(Q){return(Z!==y.element||Q.target===y.element||w.elementInside(Q.target,y.element.querySelector(".dz-message")))&&y.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,w.instances.splice(w.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var y,b=0,L=0,B=this.getActiveFiles();if(B.length){var U=M(this.getActiveFiles()),V;try{for(U.s();!(V=U.n()).done;){var W=V.value;b+=W.upload.bytesSent,L+=W.upload.total}}catch(Z){U.e(Z)}finally{U.f()}y=100*b/L}else y=100;return this.emit("totaluploadprogress",y,L,b)}},{key:"_getParamName",value:function(y){return typeof this.options.paramName=="function"?this.options.paramName(y):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(y,"]"):"")}},{key:"_renameFile",value:function(y){return typeof this.options.renameFile!="function"?y.name:this.options.renameFile(y)}},{key:"getFallbackForm",value:function(){var y,b;if(y=this.getExistingFallback())return y;var L='<div class="dz-fallback">';this.options.dictFallbackText&&(L+="<p>".concat(this.options.dictFallbackText,"</p>")),L+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var B=w.createElement(L);return this.element.tagName!=="FORM"?(b=w.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),b.appendChild(B)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),b??B}},{key:"getExistingFallback",value:function(){for(var y=function(W){var Z=M(W),Y;try{for(Z.s();!(Y=Z.n()).done;){var Q=Y.value;if(/(^| )fallback($| )/.test(Q.className))return Q}}catch(ne){Z.e(ne)}finally{Z.f()}},b=0,L=["div","form"];b<L.length;b++){var B=L[b],U;if(U=y(this.element.getElementsByTagName(B)))return U}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(y){return function(){var b=[];for(var L in y.events){var B=y.events[L];b.push(y.element.addEventListener(L,B,!1))}return b}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(y){return function(){var b=[];for(var L in y.events){var B=y.events[L];b.push(y.element.removeEventListener(L,B,!1))}return b}()})}},{key:"disable",value:function(){var y=this;return this.clickableElements.forEach(function(b){return b.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(b){return y.cancelUpload(b)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(y){return y.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(y){var b=0,L="b";if(y>0){for(var B=["tb","gb","mb","kb","b"],U=0;U<B.length;U++){var V=B[U],W=Math.pow(this.options.filesizeBase,4-U)/10;if(y>=W){b=y/Math.pow(this.options.filesizeBase,4-U),L=V;break}}b=Math.round(10*b)/10}return"<strong>".concat(b,"</strong> ").concat(this.options.dictFileSizeUnits[L])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(y){if(y.dataTransfer){this.emit("drop",y);for(var b=[],L=0;L<y.dataTransfer.files.length;L++)b[L]=y.dataTransfer.files[L];if(b.length){var B=y.dataTransfer.items;B&&B.length&&B[0].webkitGetAsEntry!=null?this._addFilesFromItems(B):this.handleFiles(b)}this.emit("addedfiles",b)}}},{key:"paste",value:function(y){if(he(y!=null?y.clipboardData:void 0,function(L){return L.items})!=null){this.emit("paste",y);var b=y.clipboardData.items;if(b.length)return this._addFilesFromItems(b)}}},{key:"handleFiles",value:function(y){var b=M(y),L;try{for(b.s();!(L=b.n()).done;){var B=L.value;this.addFile(B)}}catch(U){b.e(U)}finally{b.f()}}},{key:"_addFilesFromItems",value:function(y){var b=this;return function(){var L=[],B=M(y),U;try{for(B.s();!(U=B.n()).done;){var V=U.value,W;V.webkitGetAsEntry!=null&&(W=V.webkitGetAsEntry())?W.isFile?L.push(b.addFile(V.getAsFile())):W.isDirectory?L.push(b._addFilesFromDirectory(W,W.name)):L.push(void 0):V.getAsFile!=null&&(V.kind==null||V.kind==="file")?L.push(b.addFile(V.getAsFile())):L.push(void 0)}}catch(Z){B.e(Z)}finally{B.f()}return L}()}},{key:"_addFilesFromDirectory",value:function(y,b){var L=this,B=y.createReader(),U=function(Z){return Oe(console,"log",function(Y){return Y.log(Z)})},V=function W(){return B.readEntries(function(Z){if(Z.length>0){var Y=M(Z),Q;try{for(Y.s();!(Q=Y.n()).done;){var ne=Q.value;ne.isFile?ne.file(function(oe){if(!(L.options.ignoreHiddenFiles&&oe.name.substring(0,1)==="."))return oe.fullPath="".concat(b,"/").concat(oe.name),L.addFile(oe)}):ne.isDirectory&&L._addFilesFromDirectory(ne,"".concat(b,"/").concat(ne.name))}}catch(oe){Y.e(oe)}finally{Y.f()}W()}return null},U)};return V()}},{key:"accept",value:function(y,b){this.options.maxFilesize&&y.size>this.options.maxFilesize*1024*1024?b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(y.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):w.isValidFile(y,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",y)):this.options.accept.call(this,y,b):b(this.options.dictInvalidFileType)}},{key:"addFile",value:function(y){var b=this;y.upload={uuid:w.uuidv4(),progress:0,total:y.size,bytesSent:0,filename:this._renameFile(y)},this.files.push(y),y.status=w.ADDED,this.emit("addedfile",y),this._enqueueThumbnail(y),this.accept(y,function(L){L?(y.accepted=!1,b._errorProcessing([y],L)):(y.accepted=!0,b.options.autoQueue&&b.enqueueFile(y)),b._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(y){var b=M(y),L;try{for(b.s();!(L=b.n()).done;){var B=L.value;this.enqueueFile(B)}}catch(U){b.e(U)}finally{b.f()}return null}},{key:"enqueueFile",value:function(y){var b=this;if(y.status===w.ADDED&&y.accepted===!0){if(y.status=w.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return b.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(y){var b=this;if(this.options.createImageThumbnails&&y.type.match(/image.*/)&&y.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(y),setTimeout(function(){return b._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var y=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var b=this._thumbnailQueue.shift();return this.createThumbnail(b,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(L){return y.emit("thumbnail",b,L),y._processingThumbnail=!1,y._processThumbnailQueue()})}}},{key:"removeFile",value:function(y){if(y.status===w.UPLOADING&&this.cancelUpload(y),this.files=J(this.files,y),this.emit("removedfile",y),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(y){y==null&&(y=!1);var b=M(this.files.slice()),L;try{for(b.s();!(L=b.n()).done;){var B=L.value;(B.status!==w.UPLOADING||y)&&this.removeFile(B)}}catch(U){b.e(U)}finally{b.f()}return null}},{key:"resizeImage",value:function(y,b,L,B,U){var V=this;return this.createThumbnail(y,b,L,B,!0,function(W,Z){if(Z==null)return U(y);var Y=V.options.resizeMimeType;Y==null&&(Y=y.type);var Q=Z.toDataURL(Y,V.options.resizeQuality);return(Y==="image/jpeg"||Y==="image/jpg")&&(Q=ve.restore(y.dataURL,Q)),U(w.dataURItoBlob(Q))})}},{key:"createThumbnail",value:function(y,b,L,B,U,V){var W=this,Z=new FileReader;Z.onload=function(){if(y.dataURL=Z.result,y.type==="image/svg+xml"){V!=null&&V(Z.result);return}W.createThumbnailFromUrl(y,b,L,B,U,V)},Z.readAsDataURL(y)}},{key:"displayExistingFile",value:function(y,b,L,B){var U=this,V=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",y),this.emit("complete",y),!V)this.emit("thumbnail",y,b),L&&L();else{var W=function(Y){U.emit("thumbnail",y,Y),L&&L()};y.dataURL=b,this.createThumbnailFromUrl(y,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,W,B)}}},{key:"createThumbnailFromUrl",value:function(y,b,L,B,U,V,W){var Z=this,Y=document.createElement("img");return W&&(Y.crossOrigin=W),U=getComputedStyle(document.body).imageOrientation=="from-image"?!1:U,Y.onload=function(){var Q=function(oe){return oe(1)};return typeof EXIF<"u"&&EXIF!==null&&U&&(Q=function(oe){return EXIF.getData(Y,function(){return oe(EXIF.getTag(this,"Orientation"))})}),Q(function(ne){y.width=Y.width,y.height=Y.height;var oe=Z.options.resize.call(Z,y,b,L,B),de=document.createElement("canvas"),we=de.getContext("2d");switch(de.width=oe.trgWidth,de.height=oe.trgHeight,ne>4&&(de.width=oe.trgHeight,de.height=oe.trgWidth),ne){case 2:we.translate(de.width,0),we.scale(-1,1);break;case 3:we.translate(de.width,de.height),we.rotate(Math.PI);break;case 4:we.translate(0,de.height),we.scale(1,-1);break;case 5:we.rotate(.5*Math.PI),we.scale(1,-1);break;case 6:we.rotate(.5*Math.PI),we.translate(0,-de.width);break;case 7:we.rotate(.5*Math.PI),we.translate(de.height,-de.width),we.scale(-1,1);break;case 8:we.rotate(-.5*Math.PI),we.translate(-de.height,0);break}me(we,Y,oe.srcX!=null?oe.srcX:0,oe.srcY!=null?oe.srcY:0,oe.srcWidth,oe.srcHeight,oe.trgX!=null?oe.trgX:0,oe.trgY!=null?oe.trgY:0,oe.trgWidth,oe.trgHeight);var De=de.toDataURL("image/png");if(V!=null)return V(De,de)})},V!=null&&(Y.onerror=V),Y.src=y.dataURL}},{key:"processQueue",value:function(){var y=this.options.parallelUploads,b=this.getUploadingFiles().length,L=b;if(!(b>=y)){var B=this.getQueuedFiles();if(B.length>0){if(this.options.uploadMultiple)return this.processFiles(B.slice(0,y-b));for(;L<y;){if(!B.length)return;this.processFile(B.shift()),L++}}}}},{key:"processFile",value:function(y){return this.processFiles([y])}},{key:"processFiles",value:function(y){var b=M(y),L;try{for(b.s();!(L=b.n()).done;){var B=L.value;B.processing=!0,B.status=w.UPLOADING,this.emit("processing",B)}}catch(U){b.e(U)}finally{b.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",y),this.uploadFiles(y)}},{key:"_getFilesWithXhr",value:function(y){return this.files.filter(function(b){return b.xhr===y}).map(function(b){return b})}},{key:"cancelUpload",value:function(y){if(y.status===w.UPLOADING){var b=this._getFilesWithXhr(y.xhr),L=M(b),B;try{for(L.s();!(B=L.n()).done;){var U=B.value;U.status=w.CANCELED}}catch(Y){L.e(Y)}finally{L.f()}typeof y.xhr<"u"&&y.xhr.abort();var V=M(b),W;try{for(V.s();!(W=V.n()).done;){var Z=W.value;this.emit("canceled",Z)}}catch(Y){V.e(Y)}finally{V.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",b)}else(y.status===w.ADDED||y.status===w.QUEUED)&&(y.status=w.CANCELED,this.emit("canceled",y),this.options.uploadMultiple&&this.emit("canceledmultiple",[y]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(y){if(typeof y=="function"){for(var b=arguments.length,L=new Array(b>1?b-1:0),B=1;B<b;B++)L[B-1]=arguments[B];return y.apply(this,L)}return y}},{key:"uploadFile",value:function(y){return this.uploadFiles([y])}},{key:"uploadFiles",value:function(y){var b=this;this._transformFiles(y,function(L){if(b.options.chunking){var B=L[0];y[0].upload.chunked=b.options.chunking&&(b.options.forceChunking||B.size>b.options.chunkSize),y[0].upload.totalChunkCount=Math.ceil(B.size/b.options.chunkSize)}if(y[0].upload.chunked){var U=y[0],V=L[0];U.upload.chunks=[];var W=function(){for(var oe=0;U.upload.chunks[oe]!==void 0;)oe++;if(!(oe>=U.upload.totalChunkCount)){var de=oe*b.options.chunkSize,we=Math.min(de+b.options.chunkSize,V.size),De={name:b._getParamName(0),data:V.webkitSlice?V.webkitSlice(de,we):V.slice(de,we),filename:U.upload.filename,chunkIndex:oe};U.upload.chunks[oe]={file:U,index:oe,dataBlock:De,status:w.UPLOADING,progress:0,retries:0},b._uploadData(y,[De])}};if(U.upload.finishedChunkUpload=function(ne,oe){var de=!0;ne.status=w.SUCCESS,ne.dataBlock=null,ne.xhr=null;for(var we=0;we<U.upload.totalChunkCount;we++){if(U.upload.chunks[we]===void 0)return W();U.upload.chunks[we].status!==w.SUCCESS&&(de=!1)}de&&b.options.chunksUploaded(U,function(){b._finished(y,oe,null)})},b.options.parallelChunkUploads)for(var Z=0;Z<U.upload.totalChunkCount;Z++)W();else W()}else{for(var Y=[],Q=0;Q<y.length;Q++)Y[Q]={name:b._getParamName(Q),data:L[Q],filename:y[Q].upload.filename};b._uploadData(y,Y)}})}},{key:"_getChunk",value:function(y,b){for(var L=0;L<y.upload.totalChunkCount;L++)if(y.upload.chunks[L]!==void 0&&y.upload.chunks[L].xhr===b)return y.upload.chunks[L]}},{key:"_uploadData",value:function(y,b){var L=this,B=new XMLHttpRequest,U=M(y),V;try{for(U.s();!(V=U.n()).done;){var W=V.value;W.xhr=B}}catch(Pe){U.e(Pe)}finally{U.f()}y[0].upload.chunked&&(y[0].upload.chunks[b[0].chunkIndex].xhr=B);var Z=this.resolveOption(this.options.method,y),Y=this.resolveOption(this.options.url,y);B.open(Z,Y,!0);var Q=this.resolveOption(this.options.timeout,y);Q&&(B.timeout=this.resolveOption(this.options.timeout,y)),B.withCredentials=!!this.options.withCredentials,B.onload=function(Pe){L._finishedUploading(y,B,Pe)},B.ontimeout=function(){L._handleUploadError(y,B,"Request timedout after ".concat(L.options.timeout/1e3," seconds"))},B.onerror=function(){L._handleUploadError(y,B)};var ne=B.upload!=null?B.upload:B;ne.onprogress=function(Pe){return L._updateFilesUploadProgress(y,B,Pe)};var oe={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&w.extend(oe,this.options.headers);for(var de in oe){var we=oe[de];we&&B.setRequestHeader(de,we)}var De=new FormData;if(this.options.params){var Ge=this.options.params;typeof Ge=="function"&&(Ge=Ge.call(this,y,B,y[0].upload.chunked?this._getChunk(y[0],B):null));for(var je in Ge){var Be=Ge[je];if(Array.isArray(Be))for(var $e=0;$e<Be.length;$e++)De.append(je,Be[$e]);else De.append(je,Be)}}var rt=M(y),it;try{for(rt.s();!(it=rt.n()).done;){var Dt=it.value;this.emit("sending",Dt,B,De)}}catch(Pe){rt.e(Pe)}finally{rt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",y,B,De),this._addFormElementData(De);for(var bt=0;bt<b.length;bt++){var _e=b[bt];De.append(_e.name,_e.data,_e.filename)}this.submitRequest(B,De,y)}},{key:"_transformFiles",value:function(y,b){for(var L=this,B=[],U=0,V=function(Y){L.options.transformFile.call(L,y[Y],function(Q){B[Y]=Q,++U===y.length&&b(B)})},W=0;W<y.length;W++)V(W)}},{key:"_addFormElementData",value:function(y){if(this.element.tagName==="FORM"){var b=M(this.element.querySelectorAll("input, textarea, select, button")),L;try{for(b.s();!(L=b.n()).done;){var B=L.value,U=B.getAttribute("name"),V=B.getAttribute("type");if(V&&(V=V.toLowerCase()),!(typeof U>"u"||U===null))if(B.tagName==="SELECT"&&B.hasAttribute("multiple")){var W=M(B.options,!0),Z;try{for(W.s();!(Z=W.n()).done;){var Y=Z.value;Y.selected&&y.append(U,Y.value)}}catch(Q){W.e(Q)}finally{W.f()}}else(!V||V!=="checkbox"&&V!=="radio"||B.checked)&&y.append(U,B.value)}}catch(Q){b.e(Q)}finally{b.f()}}}},{key:"_updateFilesUploadProgress",value:function(y,b,L){if(y[0].upload.chunked){var W=y[0],Z=this._getChunk(W,b);L?(Z.progress=100*L.loaded/L.total,Z.total=L.total,Z.bytesSent=L.loaded):(Z.progress=100,Z.bytesSent=Z.total),W.upload.progress=0,W.upload.total=0,W.upload.bytesSent=0;for(var Y=0;Y<W.upload.totalChunkCount;Y++)W.upload.chunks[Y]&&typeof W.upload.chunks[Y].progress<"u"&&(W.upload.progress+=W.upload.chunks[Y].progress,W.upload.total+=W.upload.chunks[Y].total,W.upload.bytesSent+=W.upload.chunks[Y].bytesSent);W.upload.progress=W.upload.progress/W.upload.totalChunkCount,this.emit("uploadprogress",W,W.upload.progress,W.upload.bytesSent)}else{var B=M(y),U;try{for(B.s();!(U=B.n()).done;){var V=U.value;V.upload.total&&V.upload.bytesSent&&V.upload.bytesSent==V.upload.total||(L?(V.upload.progress=100*L.loaded/L.total,V.upload.total=L.total,V.upload.bytesSent=L.loaded):(V.upload.progress=100,V.upload.bytesSent=V.upload.total),this.emit("uploadprogress",V,V.upload.progress,V.upload.bytesSent))}}catch(Q){B.e(Q)}finally{B.f()}}}},{key:"_finishedUploading",value:function(y,b,L){var B;if(y[0].status!==w.CANCELED&&b.readyState===4){if(b.responseType!=="arraybuffer"&&b.responseType!=="blob"&&(B=b.responseText,b.getResponseHeader("content-type")&&~b.getResponseHeader("content-type").indexOf("application/json")))try{B=JSON.parse(B)}catch(U){L=U,B="Invalid JSON response from server."}this._updateFilesUploadProgress(y,b),200<=b.status&&b.status<300?y[0].upload.chunked?y[0].upload.finishedChunkUpload(this._getChunk(y[0],b),B):this._finished(y,B,L):this._handleUploadError(y,b,B)}}},{key:"_handleUploadError",value:function(y,b,L){if(y[0].status!==w.CANCELED){if(y[0].upload.chunked&&this.options.retryChunks){var B=this._getChunk(y[0],b);if(B.retries++<this.options.retryChunksLimit){this._uploadData(y,[B.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(y,L||this.options.dictResponseError.replace("{{statusCode}}",b.status),b)}}},{key:"submitRequest",value:function(y,b,L){if(y.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}y.send(b)}},{key:"_finished",value:function(y,b,L){var B=M(y),U;try{for(B.s();!(U=B.n()).done;){var V=U.value;V.status=w.SUCCESS,this.emit("success",V,b,L),this.emit("complete",V)}}catch(W){B.e(W)}finally{B.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",y,b,L),this.emit("completemultiple",y)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(y,b,L){var B=M(y),U;try{for(B.s();!(U=B.n()).done;){var V=U.value;V.status=w.ERROR,this.emit("error",V,b,L),this.emit("complete",V)}}catch(W){B.e(W)}finally{B.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",y,b,L),this.emit("completemultiple",y)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=f,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(y){for(var b=arguments.length,L=new Array(b>1?b-1:0),B=1;B<b;B++)L[B-1]=arguments[B];for(var U=0,V=L;U<V.length;U++){var W=V[U];for(var Z in W){var Y=W[Z];y[Z]=Y}}return y}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(y){var b=Math.random()*16|0,L=y==="x"?b:b&3|8;return L.toString(16)})}}]),w}(f);q.initClass(),q.version="5.9.3",q.options={},q.optionsForElement=function(N){if(N.getAttribute("id"))return q.options[te(N.getAttribute("id"))]},q.instances=[],q.forElement=function(N){if(typeof N=="string"&&(N=document.querySelector(N)),(N!=null?N.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return N.dropzone},q.autoDiscover=!0,q.discover=function(){var N;if(document.querySelectorAll)N=document.querySelectorAll(".dropzone");else{N=[];var R=function(C){return function(){var y=[],b=M(C),L;try{for(b.s();!(L=b.n()).done;){var B=L.value;/(^| )dropzone($| )/.test(B.className)?y.push(N.push(B)):y.push(void 0)}}catch(U){b.e(U)}finally{b.f()}return y}()};R(document.getElementsByTagName("div")),R(document.getElementsByTagName("form"))}return function(){var w=[],C=M(N),y;try{for(C.s();!(y=C.n()).done;){var b=y.value;q.optionsForElement(b)!==!1?w.push(new q(b)):w.push(void 0)}}catch(L){C.e(L)}finally{C.f()}return w}()},q.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],q.isBrowserSupported=function(){var N=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))N=!1;else{q.blacklistedBrowsers!==void 0&&(q.blockedBrowsers=q.blacklistedBrowsers);var R=M(q.blockedBrowsers),w;try{for(R.s();!(w=R.n()).done;){var C=w.value;if(C.test(navigator.userAgent)){N=!1;continue}}}catch(y){R.e(y)}finally{R.f()}}else N=!1;return N},q.dataURItoBlob=function(N){for(var R=atob(N.split(",")[1]),w=N.split(",")[0].split(":")[1].split(";")[0],C=new ArrayBuffer(R.length),y=new Uint8Array(C),b=0,L=R.length,B=0<=L;B?b<=L:b>=L;B?b++:b--)y[b]=R.charCodeAt(b);return new Blob([C],{type:w})};var J=function(R,w){return R.filter(function(C){return C!==w}).map(function(C){return C})},te=function(R){return R.replace(/[\-_](\w)/g,function(w){return w.charAt(1).toUpperCase()})};q.createElement=function(N){var R=document.createElement("div");return R.innerHTML=N,R.childNodes[0]},q.elementInside=function(N,R){if(N===R)return!0;for(;N=N.parentNode;)if(N===R)return!0;return!1},q.getElement=function(N,R){var w;if(typeof N=="string"?w=document.querySelector(N):N.nodeType!=null&&(w=N),w==null)throw new Error("Invalid `".concat(R,"` option provided. Please provide a CSS selector or a plain HTML element."));return w},q.getElements=function(N,R){var w,C;if(N instanceof Array){C=[];try{var y=M(N,!0),b;try{for(y.s();!(b=y.n()).done;)w=b.value,C.push(this.getElement(w,R))}catch(U){y.e(U)}finally{y.f()}}catch{C=null}}else if(typeof N=="string"){C=[];var L=M(document.querySelectorAll(N)),B;try{for(L.s();!(B=L.n()).done;)w=B.value,C.push(w)}catch(U){L.e(U)}finally{L.f()}}else N.nodeType!=null&&(C=[N]);if(C==null||!C.length)throw new Error("Invalid `".concat(R,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return C},q.confirm=function(N,R,w){if(window.confirm(N))return R();if(w!=null)return w()},q.isValidFile=function(N,R){if(!R)return!0;R=R.split(",");var w=N.type,C=w.replace(/\/.*$/,""),y=M(R),b;try{for(y.s();!(b=y.n()).done;){var L=b.value;if(L=L.trim(),L.charAt(0)==="."){if(N.name.toLowerCase().indexOf(L.toLowerCase(),N.name.length-L.length)!==-1)return!0}else if(/\/\*$/.test(L)){if(C===L.replace(/\/.*$/,""))return!0}else if(w===L)return!0}}catch(B){y.e(B)}finally{y.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(N){return this.each(function(){return new q(this,N)})}),q.ADDED="added",q.QUEUED="queued",q.ACCEPTED=q.QUEUED,q.UPLOADING="uploading",q.PROCESSING=q.UPLOADING,q.CANCELED="canceled",q.ERROR="error",q.SUCCESS="success";var ge=function(R){R.naturalWidth;var w=R.naturalHeight,C=document.createElement("canvas");C.width=1,C.height=w;var y=C.getContext("2d");y.drawImage(R,0,0);for(var b=y.getImageData(1,0,1,w),L=b.data,B=0,U=w,V=w;V>B;){var W=L[(V-1)*4+3];W===0?U=V:B=V,V=U+B>>1}var Z=V/w;return Z===0?1:Z},me=function(R,w,C,y,b,L,B,U,V,W){var Z=ge(w);return R.drawImage(w,C,y,b,L,B,U,V,W/Z)},ve=function(){function N(){H(this,N)}return G(N,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(w){for(var C="",y=void 0,b=void 0,L="",B=void 0,U=void 0,V=void 0,W="",Z=0;y=w[Z++],b=w[Z++],L=w[Z++],B=y>>2,U=(y&3)<<4|b>>4,V=(b&15)<<2|L>>6,W=L&63,isNaN(b)?V=W=64:isNaN(L)&&(W=64),C=C+this.KEY_STR.charAt(B)+this.KEY_STR.charAt(U)+this.KEY_STR.charAt(V)+this.KEY_STR.charAt(W),y=b=L="",B=U=V=W="",Z<w.length;);return C}},{key:"restore",value:function(w,C){if(!w.match("data:image/jpeg;base64,"))return C;var y=this.decode64(w.replace("data:image/jpeg;base64,","")),b=this.slice2Segments(y),L=this.exifManipulation(C,b);return"data:image/jpeg;base64,".concat(this.encode64(L))}},{key:"exifManipulation",value:function(w,C){var y=this.getExifArray(C),b=this.insertExif(w,y),L=new Uint8Array(b);return L}},{key:"getExifArray",value:function(w){for(var C=void 0,y=0;y<w.length;){if(C=w[y],C[0]===255&C[1]===225)return C;y++}return[]}},{key:"insertExif",value:function(w,C){var y=w.replace("data:image/jpeg;base64,",""),b=this.decode64(y),L=b.indexOf(255,3),B=b.slice(0,L),U=b.slice(L),V=B;return V=V.concat(C),V=V.concat(U),V}},{key:"slice2Segments",value:function(w){for(var C=0,y=[];;){var b;if(w[C]===255&w[C+1]===218)break;if(w[C]===255&w[C+1]===216)C+=2;else{b=w[C+2]*256+w[C+3];var L=C+b+2,B=w.slice(C,L);y.push(B),C=L}if(C>w.length)break}return y}},{key:"decode64",value:function(w){var C=void 0,y=void 0,b="",L=void 0,B=void 0,U=void 0,V="",W=0,Z=[],Y=/[^A-Za-z0-9\+\/\=]/g;for(Y.exec(w)&&console.warn(`There were invalid base64 characters in the input text.
64
64
  Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
65
- Expect errors in decoding.`),w=w.replace(/[^A-Za-z0-9\+\/\=]/g,"");L=this.KEY_STR.indexOf(w.charAt(W++)),B=this.KEY_STR.indexOf(w.charAt(W++)),U=this.KEY_STR.indexOf(w.charAt(W++)),V=this.KEY_STR.indexOf(w.charAt(W++)),C=L<<2|B>>4,y=(B&15)<<4|U>>2,b=(U&3)<<6|V,Z.push(C),U!==64&&Z.push(y),V!==64&&Z.push(b),C=y=b="",L=B=U=V="",W<w.length;);return Z}}]),N}();ve.initClass();var xe=function(R,w){var C=!1,y=!0,b=R.document,L=b.documentElement,B=b.addEventListener?"addEventListener":"attachEvent",U=b.addEventListener?"removeEventListener":"detachEvent",V=b.addEventListener?"":"on",W=function Y(Q){if(!(Q.type==="readystatechange"&&b.readyState!=="complete")&&((Q.type==="load"?R:b)[U](V+Q.type,Y,!1),!C&&(C=!0)))return w.call(R,Q.type||Q)},Z=function Y(){try{L.doScroll("left")}catch{setTimeout(Y,50);return}return W("poll")};if(b.readyState!=="complete"){if(b.createEventObject&&L.doScroll){try{y=!R.frameElement}catch{}y&&Z()}return b[B](V+"DOMContentLoaded",W,!1),b[B](V+"readystatechange",W,!1),R[B](V+"load",W,!1)}};q._autoDiscoverFunction=function(){if(q.autoDiscover)return q.discover()},xe(window,q._autoDiscoverFunction);function he(N,R){return typeof N<"u"&&N!==null?R(N):void 0}function Oe(N,R,w){if(typeof N<"u"&&N!==null&&typeof N[R]=="function")return w(N,R)}window.Dropzone=q;var ye=q}(),a}()})}(mo)),mo.exports}var fy=uy();const vo=Ti(fy),dy={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function hy(n,e){return d.openBlock(),d.createElementBlock("svg",dy,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 16 4-4m0 0 4 4m-4-4v9m8-4.257A5.5 5.5 0 0 0 16.5 7a.62.62 0 0 1-.534-.302 7.5 7.5 0 1 0-11.78 9.096"},null,-1)]))}const py={render:hy},gy={class:"file-upload"},my=["name","value"],vy={key:0,class:"preview"},yy={class:"file-upload-preview"},by=["src"],xy={key:1,class:"preview"},Ey={class:"file-upload-preview"},wy=["src","title"],Ay=["href"],Sy={class:"file-upload-title"},Ty={class:"file-upload-file-remove"},Ny={class:"relative"},Oy={class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4 rounded-lg flex flex-col justify-center items-center w-full"},Cy={__name:"FileUpload",props:{name:{type:String,required:!1},modelValue:{type:[String,Object],default:null},submitEndpoint:{type:String,required:!1},deleteEndpoint:{type:String,required:!1},formData:{type:Object,default:null},csrf:{type:String,required:!1}},emits:["update:modelValue"],setup(n,{emit:e}){vo.autoDiscover=!1;const t=n,r=d.ref([]),s=d.ref(vo),a=d.ref(null),o=d.computed(()=>JSON.stringify(r)),c=l=>["image/gif","image/jpeg","image/png","image/tiff"].includes(l),i=l=>{nt.delete(t.deleteEndpoint+"?"+l.id).then(()=>{r.value=null}).catch(console.error)};return d.onMounted(()=>{var u;a.value=t.formData;const l=t.csrf;s.value=new vo(s.value,{url:(t==null?void 0:t.submitEndpoint)+"?"+((u=a.value)==null?void 0:u.id),addRemoveLinks:!0,maxFiles:1,sending:(h,f,m)=>{m.append("_token",l),m.append("field",t.name)},success:(h,f)=>{h.value=f},complete:h=>{var f;(f=s.value)==null||f.removeFile(h)}}),r.value=t.modelValue}),(l,u)=>(d.openBlock(),d.createElementBlock("div",gy,[d.createElementVNode("input",{type:"hidden",name:n.name,value:o.value},null,8,my),n.modelValue?(d.openBlock(),d.createElementBlock("div",vy,[u[1]||(u[1]=d.createTextVNode(" @todo handle upload here ")),d.createElementVNode("span",yy,[d.createElementVNode("img",{class:"img rounded-lg",src:n.modelValue,title:"Image"},null,8,by)])])):r.value&&r.value.length?(d.openBlock(),d.createElementBlock("div",xy,[d.createElementVNode("span",Ey,[c(r.value.mime_type)?(d.openBlock(),d.createElementBlock("img",{key:0,class:"img",src:r.value.url,title:r.value.file_name},null,8,wy)):d.createCommentVNode("",!0)]),d.createElementVNode("a",{href:r.value.url,target:"_blank",class:"link"},[d.createElementVNode("div",Sy,d.toDisplayString(r.value.file_name),1)],8,Ay),d.createElementVNode("a",Ty,[d.createElementVNode("i",{class:"fal fa-times",onClick:u[0]||(u[0]=h=>i(r.value))})])])):d.createCommentVNode("",!0),d.withDirectives(d.createElementVNode("div",Ny,[d.createElementVNode("div",{class:"dropzone border border-dashed rounded-lg z-10 h-[200px] w-full cursor-pointer relative",ref_key:"dropzone",ref:s},null,512),d.createElementVNode("div",Oy,[d.createElementVNode("div",null,[d.createVNode(d.unref(py),{class:"w-6 h-6"})]),u[2]||(u[2]=d.createElementVNode("div",{class:"text-sm text-center"},[d.createElementVNode("p",null,[d.createElementVNode("span",{class:"text-brand-900"},"Click to upload"),d.createElementVNode("span",null," or drag and drop")]),d.createElementVNode("span",null,"(max. 20MB)")],-1))])],512),[[d.vShow,!n.modelValue]])]))}},Ry={class:"flex items-start gap-4 px-6 pt-4"},Iy={class:"flex flex-1 flex-col gap-4"},Ly={class:"flex flex-col gap-8"},ky={class:"flex flex-col gap-8"},By={class:"flex flex-col gap-4"},Py={class:"flex w-full max-w-[356px] flex-col gap-4"},Fy={class:"flex justify-between space-x-xsSpace pt-xsSpace gap-4 sticky bottom-0 w-full bg-gray-200 py-2 px-6"},My={__name:"SlideEdit",props:{slide:{type:Object,required:!0},saveEndpoint:{type:String,required:!1},cancelEndpoint:{type:String,required:!1},sites:{type:Object,required:!0}},emits:["update"],setup(n,{emit:e}){const t=e,r=n,s=d.ref({public:r.slide.public,description:r.slide.description,featured_image:r.slide.featured_image,primary_button:r.slide.primary_button,secondary_button:r.slide.secondary_button,title:r.slide.title}),a=()=>{t("update",s.value),r.saveEndpoint&&nt.post(r.saveEndpoint,s.value).then(()=>{r.cancelEndpoint&&(window.location.href=r.cancelEndpoint)})},o=()=>{t("close",s.value),r.cancelEndpoint&&(window.location.href=r.cancelEndpoint)},c=d.computed(()=>s.value.description.replace(/<[^>]*>/g," ").trim().split(/\s+/).filter(u=>u.length>0).length);return(i,l)=>(d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",Ry,[d.createElementVNode("div",Iy,[d.createVNode(qr,{title:"Description"},{default:d.withCtx(()=>[d.createElementVNode("div",Ly,[d.createVNode(Xn,{"is-vertical":"",field:"title","label-text":"Title *",class:"w-full",value:s.value.title,limit:51},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>s.value.title=u),name:"title",type:"text",placeholder:"Title",maxlength:51,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,s.value.title]])]),_:1},8,["value"]),d.createVNode(Xn,{"is-vertical":"",field:"description","label-text":"Description *",class:"w-full mb-4",value:c.value,"show-count":!0},{default:d.withCtx(()=>[d.createVNode(M1,{modelValue:s.value.description,"onUpdate:modelValue":l[1]||(l[1]=u=>s.value.description=u)},null,8,["modelValue"])]),_:1},8,["value"])])]),_:1}),d.createVNode(qr,{title:"Primary button"},{default:d.withCtx(()=>[d.createElementVNode("div",ky,[d.createVNode(ts,{name:"show",modelValue:s.value.primary_button.show,"onUpdate:modelValue":l[2]||(l[2]=u=>s.value.primary_button.show=u),title:"Show Button"},null,8,["modelValue"]),d.createVNode(Xn,{"is-vertical":"",field:"primary_button.label","label-text":"Button Label *",class:"w-full mb-4",value:s.value.primary_button.label,limit:20},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":l[3]||(l[3]=u=>s.value.primary_button.label=u),name:"primary_button.label",type:"text",placeholder:"Label",maxlength:20,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,s.value.primary_button.label]])]),_:1},8,["value"]),d.createVNode(Qs,{name:"primary",type:s.value.primary_button.type,"onUpdate:type":l[4]||(l[4]=u=>s.value.primary_button.type=u),url:s.value.primary_button.url,"onUpdate:url":l[5]||(l[5]=u=>s.value.primary_button.url=u),openInNewTab:s.value.primary_button.open_in_new_tab,"onUpdate:openInNewTab":l[6]||(l[6]=u=>s.value.primary_button.open_in_new_tab=u),sites:n.sites},null,8,["type","url","openInNewTab","sites"])])]),_:1}),d.createVNode(qr,{title:"Secondary button"},{default:d.withCtx(()=>[d.createElementVNode("div",By,[d.createVNode(ts,{name:"show",modelValue:s.value.secondary_button.show,"onUpdate:modelValue":l[7]||(l[7]=u=>s.value.secondary_button.show=u),title:"Show Button"},null,8,["modelValue"]),s.value.secondary_button.show?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createVNode(Xn,{"is-vertical":"",field:"secondary_button.label","label-text":"Button Label *",class:"w-full mb-4",value:s.value.secondary_button.label,limit:20},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":l[8]||(l[8]=u=>s.value.secondary_button.label=u),name:"secondary_button.label",type:"text",placeholder:"Label",maxlength:20,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,s.value.secondary_button.label]])]),_:1},8,["value"]),d.createVNode(Qs,{name:"secondary",type:s.value.secondary_button.type,"onUpdate:type":l[9]||(l[9]=u=>s.value.secondary_button.type=u),url:s.value.secondary_button.url,"onUpdate:url":l[10]||(l[10]=u=>s.value.secondary_button.url=u),openInNewTab:s.value.secondary_button.open_in_new_tab,"onUpdate:openInNewTab":l[11]||(l[11]=u=>s.value.secondary_button.open_in_new_tab=u),sites:n.sites},null,8,["type","url","openInNewTab","sites"])],64)):d.createCommentVNode("",!0)])]),_:1})]),d.createElementVNode("div",Py,[d.createVNode(qr,{title:"Visibility",supporting_text:"Toggle off if you'd like to hide this item"},{default:d.withCtx(()=>[d.createVNode(ts,{modelValue:s.value.public,"onUpdate:modelValue":l[12]||(l[12]=u=>s.value.public=u),name:"public",label:"Public"},null,8,["modelValue"])]),_:1}),d.createVNode(qr,{title:"Featured Image",supporting_text:"Recommended dimension: 1200*1060px"},{default:d.withCtx(()=>[d.createVNode(Cy,{name:"image",modelValue:s.value.featured_image,"onUpdate:modelValue":l[13]||(l[13]=u=>s.value.featured_image=u)},null,8,["modelValue"])]),_:1})])]),d.renderSlot(i.$slots,"default",{},()=>[d.createElementVNode("div",Fy,[d.createElementVNode("a",{onClick:o,class:"w-[200px] py-[9px] bg-white rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer"}," Cancel "),d.createElementVNode("a",{onClick:d.withModifiers(a,["prevent"]),class:"w-full py-[9px] rounded-full shadow-xs text-md font-semibold text-white bg-brand-600 hover:bg-brand-700 border border-brand-600 text-center cursor-pointer"},"Save changes")])])]))}};Ye.PageBuilder=Mf,Ye.PageRender=Ed,Ye.SlideEdit=My,Object.defineProperty(Ye,Symbol.toStringTag,{value:"Module"})});
65
+ Expect errors in decoding.`),w=w.replace(/[^A-Za-z0-9\+\/\=]/g,"");L=this.KEY_STR.indexOf(w.charAt(W++)),B=this.KEY_STR.indexOf(w.charAt(W++)),U=this.KEY_STR.indexOf(w.charAt(W++)),V=this.KEY_STR.indexOf(w.charAt(W++)),C=L<<2|B>>4,y=(B&15)<<4|U>>2,b=(U&3)<<6|V,Z.push(C),U!==64&&Z.push(y),V!==64&&Z.push(b),C=y=b="",L=B=U=V="",W<w.length;);return Z}}]),N}();ve.initClass();var xe=function(R,w){var C=!1,y=!0,b=R.document,L=b.documentElement,B=b.addEventListener?"addEventListener":"attachEvent",U=b.addEventListener?"removeEventListener":"detachEvent",V=b.addEventListener?"":"on",W=function Y(Q){if(!(Q.type==="readystatechange"&&b.readyState!=="complete")&&((Q.type==="load"?R:b)[U](V+Q.type,Y,!1),!C&&(C=!0)))return w.call(R,Q.type||Q)},Z=function Y(){try{L.doScroll("left")}catch{setTimeout(Y,50);return}return W("poll")};if(b.readyState!=="complete"){if(b.createEventObject&&L.doScroll){try{y=!R.frameElement}catch{}y&&Z()}return b[B](V+"DOMContentLoaded",W,!1),b[B](V+"readystatechange",W,!1),R[B](V+"load",W,!1)}};q._autoDiscoverFunction=function(){if(q.autoDiscover)return q.discover()},xe(window,q._autoDiscoverFunction);function he(N,R){return typeof N<"u"&&N!==null?R(N):void 0}function Oe(N,R,w){if(typeof N<"u"&&N!==null&&typeof N[R]=="function")return w(N,R)}window.Dropzone=q;var ye=q}(),a}()})}(mo)),mo.exports}var fy=uy();const vo=Ti(fy),dy={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function hy(n,e){return d.openBlock(),d.createElementBlock("svg",dy,e[0]||(e[0]=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 16 4-4m0 0 4 4m-4-4v9m8-4.257A5.5 5.5 0 0 0 16.5 7a.62.62 0 0 1-.534-.302 7.5 7.5 0 1 0-11.78 9.096"},null,-1)]))}const py={render:hy},gy={class:"file-upload"},my=["name","value"],vy={key:0,class:"preview"},yy={class:"file-upload-preview"},by=["src"],xy={key:1,class:"preview"},Ey={class:"file-upload-preview"},wy=["src","title"],Ay=["href"],Sy={class:"file-upload-title"},Ty={class:"file-upload-file-remove"},Ny={class:"relative"},Oy={class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4 rounded-lg flex flex-col justify-center items-center w-full"},Cy={__name:"FileUpload",props:{name:{type:String,required:!1},modelValue:{type:[String,Object],default:null},submitEndpoint:{type:String,required:!1},deleteEndpoint:{type:String,required:!1},formData:{type:Object,default:null},csrf:{type:String,required:!1}},emits:["update:modelValue"],setup(n,{emit:e}){vo.autoDiscover=!1;const t=n,r=d.ref([]),s=d.ref(vo),a=d.ref(null),o=d.computed(()=>JSON.stringify(r)),c=l=>["image/gif","image/jpeg","image/png","image/tiff"].includes(l),i=l=>{nt.delete(t.deleteEndpoint+"?"+l.id).then(()=>{r.value=null}).catch(console.error)};return d.onMounted(()=>{var u;a.value=t.formData;const l=t.csrf;s.value=new vo(s.value,{url:(t==null?void 0:t.submitEndpoint)+"?"+((u=a.value)==null?void 0:u.id),addRemoveLinks:!0,maxFiles:1,sending:(h,f,m)=>{m.append("_token",l),m.append("field",t.name)},success:(h,f)=>{h.value=f},complete:h=>{var f;(f=s.value)==null||f.removeFile(h)}}),r.value=t.modelValue}),(l,u)=>(d.openBlock(),d.createElementBlock("div",gy,[d.createElementVNode("input",{type:"hidden",name:n.name,value:o.value},null,8,my),n.modelValue?(d.openBlock(),d.createElementBlock("div",vy,[u[1]||(u[1]=d.createTextVNode(" @todo handle upload here ")),d.createElementVNode("span",yy,[d.createElementVNode("img",{class:"img rounded-lg",src:n.modelValue,title:"Image"},null,8,by)])])):r.value&&r.value.length?(d.openBlock(),d.createElementBlock("div",xy,[d.createElementVNode("span",Ey,[c(r.value.mime_type)?(d.openBlock(),d.createElementBlock("img",{key:0,class:"img",src:r.value.url,title:r.value.file_name},null,8,wy)):d.createCommentVNode("",!0)]),d.createElementVNode("a",{href:r.value.url,target:"_blank",class:"link"},[d.createElementVNode("div",Sy,d.toDisplayString(r.value.file_name),1)],8,Ay),d.createElementVNode("a",Ty,[d.createElementVNode("i",{class:"fal fa-times",onClick:u[0]||(u[0]=h=>i(r.value))})])])):d.createCommentVNode("",!0),d.withDirectives(d.createElementVNode("div",Ny,[d.createElementVNode("div",{class:"dropzone border border-dashed rounded-lg z-10 h-[200px] w-full cursor-pointer relative",ref_key:"dropzone",ref:s},null,512),d.createElementVNode("div",Oy,[d.createElementVNode("div",null,[d.createVNode(d.unref(py),{class:"w-6 h-6"})]),u[2]||(u[2]=d.createElementVNode("div",{class:"text-sm text-center"},[d.createElementVNode("p",null,[d.createElementVNode("span",{class:"text-brand-900"},"Click to upload"),d.createElementVNode("span",null," or drag and drop")]),d.createElementVNode("span",null,"(max. 20MB)")],-1))])],512),[[d.vShow,!n.modelValue]])]))}},Ry={class:"flex items-start gap-4 px-6 pt-4"},Iy={class:"flex flex-1 flex-col gap-4"},Ly={class:"flex flex-col gap-8"},ky={class:"flex flex-col gap-8"},By={class:"flex flex-col gap-4"},Py={class:"flex w-full max-w-[356px] flex-col gap-4"},Fy={class:"flex justify-between space-x-xsSpace pt-xsSpace gap-4 sticky bottom-0 w-full bg-gray-200 py-2 px-6"},My={__name:"SlideEdit",props:{slide:{type:Object,required:!0},saveEndpoint:{type:String,required:!1},cancelEndpoint:{type:String,required:!1},sites:{type:Object,required:!0}},emits:["update"],setup(n,{emit:e}){const t=e,r=n,s=d.ref({public:r.slide.public,description:r.slide.description,featured_image:r.slide.featured_image,primary_button:r.slide.primary_button,secondary_button:r.slide.secondary_button,title:r.slide.title}),a=()=>{t("update",s.value),r.saveEndpoint&&nt.post(r.saveEndpoint,s.value).then(()=>{r.cancelEndpoint&&(window.location.href=r.cancelEndpoint)})},o=()=>{t("close",s.value),r.cancelEndpoint&&(window.location.href=r.cancelEndpoint)},c=d.computed(()=>s.value.description.replace(/<[^>]*>/g," ").trim().split(/\s+/).filter(u=>u.length>0).length);return(i,l)=>(d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",Ry,[d.createElementVNode("div",Iy,[d.createVNode(qr,{title:"Description"},{default:d.withCtx(()=>[d.createElementVNode("div",Ly,[d.createVNode(Xn,{"is-vertical":"",field:"title","label-text":"Title *",class:"w-full",value:s.value.title,limit:51},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>s.value.title=u),name:"title",type:"text",placeholder:"Title",maxlength:51,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,s.value.title]])]),_:1},8,["value"]),d.createVNode(Xn,{"is-vertical":"",field:"description","label-text":"Description *",class:"w-full mb-4",value:c.value,"show-count":!0},{default:d.withCtx(()=>[d.createVNode(M0,{modelValue:s.value.description,"onUpdate:modelValue":l[1]||(l[1]=u=>s.value.description=u)},null,8,["modelValue"])]),_:1},8,["value"])])]),_:1}),d.createVNode(qr,{title:"Primary button"},{default:d.withCtx(()=>[d.createElementVNode("div",ky,[d.createVNode(ts,{name:"show",modelValue:s.value.primary_button.show,"onUpdate:modelValue":l[2]||(l[2]=u=>s.value.primary_button.show=u),title:"Show Button"},null,8,["modelValue"]),d.createVNode(Xn,{"is-vertical":"",field:"primary_button.label","label-text":"Button Label *",class:"w-full mb-4",value:s.value.primary_button.label,limit:20},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":l[3]||(l[3]=u=>s.value.primary_button.label=u),name:"primary_button.label",type:"text",placeholder:"Label",maxlength:20,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,s.value.primary_button.label]])]),_:1},8,["value"]),d.createVNode(Qs,{name:"primary",type:s.value.primary_button.type,"onUpdate:type":l[4]||(l[4]=u=>s.value.primary_button.type=u),url:s.value.primary_button.url,"onUpdate:url":l[5]||(l[5]=u=>s.value.primary_button.url=u),openInNewTab:s.value.primary_button.open_in_new_tab,"onUpdate:openInNewTab":l[6]||(l[6]=u=>s.value.primary_button.open_in_new_tab=u),sites:n.sites},null,8,["type","url","openInNewTab","sites"])])]),_:1}),d.createVNode(qr,{title:"Secondary button"},{default:d.withCtx(()=>[d.createElementVNode("div",By,[d.createVNode(ts,{name:"show",modelValue:s.value.secondary_button.show,"onUpdate:modelValue":l[7]||(l[7]=u=>s.value.secondary_button.show=u),title:"Show Button"},null,8,["modelValue"]),s.value.secondary_button.show?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createVNode(Xn,{"is-vertical":"",field:"secondary_button.label","label-text":"Button Label *",class:"w-full mb-4",value:s.value.secondary_button.label,limit:20},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":l[8]||(l[8]=u=>s.value.secondary_button.label=u),name:"secondary_button.label",type:"text",placeholder:"Label",maxlength:20,class:"border-1 border-solid border-gray-300 rounded-lg bg-white w-full"},null,512),[[d.vModelText,s.value.secondary_button.label]])]),_:1},8,["value"]),d.createVNode(Qs,{name:"secondary",type:s.value.secondary_button.type,"onUpdate:type":l[9]||(l[9]=u=>s.value.secondary_button.type=u),url:s.value.secondary_button.url,"onUpdate:url":l[10]||(l[10]=u=>s.value.secondary_button.url=u),openInNewTab:s.value.secondary_button.open_in_new_tab,"onUpdate:openInNewTab":l[11]||(l[11]=u=>s.value.secondary_button.open_in_new_tab=u),sites:n.sites},null,8,["type","url","openInNewTab","sites"])],64)):d.createCommentVNode("",!0)])]),_:1})]),d.createElementVNode("div",Py,[d.createVNode(qr,{title:"Visibility",supporting_text:"Toggle off if you'd like to hide this item"},{default:d.withCtx(()=>[d.createVNode(ts,{modelValue:s.value.public,"onUpdate:modelValue":l[12]||(l[12]=u=>s.value.public=u),name:"public",label:"Public"},null,8,["modelValue"])]),_:1}),d.createVNode(qr,{title:"Featured Image",supporting_text:"Recommended dimension: 1200*1060px"},{default:d.withCtx(()=>[d.createVNode(Cy,{name:"image",modelValue:s.value.featured_image,"onUpdate:modelValue":l[13]||(l[13]=u=>s.value.featured_image=u)},null,8,["modelValue"])]),_:1})])]),d.renderSlot(i.$slots,"default",{},()=>[d.createElementVNode("div",Fy,[d.createElementVNode("a",{onClick:o,class:"w-[200px] py-[9px] bg-white rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer"}," Cancel "),d.createElementVNode("a",{onClick:d.withModifiers(a,["prevent"]),class:"w-full py-[9px] rounded-full shadow-xs text-md font-semibold text-white bg-brand-600 hover:bg-brand-700 border border-brand-600 text-center cursor-pointer"},"Save changes")])])]))}};Ye.PageBuilder=Mf,Ye.PageRender=Ed,Ye.SlideEdit=My,Object.defineProperty(Ye,Symbol.toStringTag,{value:"Module"})});