var uf=Object.defineProperty;var cf=(e,t,a)=>t in e?uf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Re=(e,t,a)=>cf(e,typeof t!="symbol"?t+"":t,a);import{r as B,c as E,o as r,w as d,a as n,u as A,b as k,d as o,e as h,f as R,t as f,F as H,g as ae,h as T,i as Ie,j as kt,k as zt,l as N,m as ka,n as ie,p as la,q as Ne,s as xn,T as Gl,v as be,x as xe,y as Nr,z as xa,A as _l,B as Sl,C as Af,D as ya,E as Cl,G as ra,H as pf,I as jl,J as gn,K as vl,L as Xo,M as ff,N as Bc,V as kc,O as Ss,P as mf,Q as Kr,R as Ma,S as Gt,U as Vl,W as hf,X as _f,Y as vf,Z as Gs,_ as gf,$ as yf,a0 as bf,a1 as Gr,a2 as wf}from"./chunks/vue.esm-bundler.js?ver=1.5.3";import{u as ll,a as sl,o as xc,c as Cf,b as Bf}from"./chunks/vue-router.js?ver=1.5.3";import{_ as J,a as Yt}from"./chunks/DynamicIcon.js?ver=1.5.3";import{T as Fs,_ as $s,a as jr,F as Co,b as Za,B as fa,P as Vn,c as Sc,d as kf,e as xf,m as Sf}from"./chunks/Badge.js?ver=1.5.3";import{t as u,a as Zt,A as je,p as Bo}from"./chunks/Translator.js?ver=1.5.3";import{_ as bt,P as nl}from"./chunks/Empty.js?ver=1.5.3";import{_ as zr,a as Ia,b as Fc,c as $c,L as qr,d as Jo,O as Ec,e as Zo,P as Yr,C as Yl}from"./chunks/OrderCustomerInformation.js?ver=1.5.3";import{_ as Nt,p as Sn}from"./chunks/UserCan.js?ver=1.5.3";import{C as et}from"./chunks/CurrencyFormatter.js?ver=1.5.3";import{_ as Na,a as Wr,b as Xr,c as Ff,S as Uc,d as Ic,e as $f,A as Qc,f as Dc}from"./chunks/CancelSubscription.js?ver=1.5.3";import{_ as Ba,C as Qe,a as Ce,b as ke}from"./chunks/CardBody.js?ver=1.5.3";import{_ as at}from"./chunks/_plugin-vue_export-helper.js?ver=1.5.3";import{S as Ot}from"./chunks/Storage.js?ver=1.5.3";import{c as Ef,h as Xs,a as ar,g as Vc,f as Uf,b as ks,$ as rl,d as If}from"./chunks/common.js?ver=1.5.3";import{I as Ze}from"./chunks/IconButton.js?ver=1.5.3";import{M as ol}from"./chunks/Model.js?ver=1.5.3";import{R as ce}from"./chunks/Rest.js?ver=1.5.3";import{d as lt,g as Qf}from"./chunks/dayjs.min.js?ver=1.5.3";import{a as ei,E as Ja,m as Df,b as dl,d as gs,i as al,c as Vf,s as Tc,e as ko,f as Jr,r as Zr,g as Mc,p as Ed,w as Tf,h as ti,l as Mf,j as qs,k as Lf,n as Rf,o as xo,t as Of,q as Hf,u as Pf,v as Nf,x as Kf,y as Gf,z as jf,A as zf}from"./chunks/index.js?ver=1.5.3";import{n as Y}from"./chunks/Notify.js?ver=1.5.3";import{_ as va}from"./chunks/Animation.js?ver=1.5.3";import{_ as Wl,T as Ve,m as Pa,a as Rl,i as ea,r as qf,L as lr,b as Lc,d as Rc,c as Oc}from"./chunks/dateShortCuts.js?ver=1.5.3";import{S as Qa,_ as Da,u as ps,a as Yf,b as Wf,c as Xf}from"./chunks/countries.js?ver=1.5.3";import{u as fs,L as pa,_ as ai}from"./chunks/NotFound.js?ver=1.5.3";import{A as cs}from"./chunks/Asset.js?ver=1.5.3";import{E as Jf}from"./chunks/index2.js?ver=1.5.3";import{S as da}from"./chunks/Str.js?ver=1.5.3";import{A as rt}from"./chunks/Arr.js?ver=1.5.3";import{C as hs,V as Js,_ as oa,c as Fn,a as ho,b as Zf,d as em}from"./chunks/AttrGroups.js?ver=1.5.3";import{U as Zs}from"./chunks/Url.js?ver=1.5.3";import{u as li,t as Hc}from"./chunks/timezone.js?ver=1.5.3";import{e as $n,i as ed,U as td,p as tm}from"./chunks/Utils.js?ver=1.5.3";import{_ as an,P as Pc}from"./chunks/ProductVariationSelector.js?ver=1.5.3";import{f as _a,a as am,p as lm,b as sm,g as nm,c as om,d as im}from"./chunks/productService.js?ver=1.5.3";import{B as So}from"./chunks/BundleProducts.js?ver=1.5.3";import{E as Ud}from"./chunks/index3.js?ver=1.5.3";import{T as Id}from"./chunks/TransitionAccordion.js?ver=1.5.3";import{_ as Nc}from"./chunks/FileUploaderDialog.js?ver=1.5.3";import{E as Qs,v as rm,i as dm}from"./chunks/defaults.js?ver=1.5.3";import um from"./chunks/Screenshot.js?ver=1.5.3";import{u as cm}from"./chunks/useElementPlusComponents.js?ver=1.5.3";import"./chunks/AddressComponent2.js?ver=1.5.3";import"./chunks/index4.js?ver=1.5.3";class Am extends Fs{getTabs(){return{}}getToggleableColumns(){return[{label:u("Lifetime Value (LTV)"),value:"ltv"},{label:u("Customer Since"),value:"customer_since"},{label:u("Last Purchase Date"),value:"last_purchase_date"}]}getSortableColumns(){return[{label:u("Customer ID"),value:"id"},{label:u("Name"),value:"first_name"},{label:u("Purchases"),value:"purchase_count"},{label:u("Lifetime Value (LTV)"),value:"ltv"},{label:u("Last Purchase Date"),value:"last_purchase_date"},{label:u("Customer Since"),value:"created_at"}]}getSearchHint(){return u("Search by, #ID, First Name, Last Name and Email")}getFetchUrl(){return"customers"}parseResponse(t){return t.customers}getTableName(){return"customers"}}function Kc(e){return Am.init(e)}const pm={class:"table-cell"},fm={class:"fct-product-info-card w-full"},mm={class:"fct-product-info-media"},hm={class:"fct-product-info-details grow-0 shrink-0 basis-[calc(100%-52px)]",style:{overflow:"hidden"}},_m={class:"fct-product-info-name flex flex-col items-start gap-3"},vm={class:"table-cell"},gm={class:"table-cell"},ym={class:"table-cell"},bm={class:"table-cell"};const wm={__name:"CustomersLoader",props:{nextPageCount:{type:Number,default:0},customerTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=Array.from({length:t.nextPageCount},(l,s)=>s+1);return(l,s)=>{const i=B("el-table-column"),c=B("el-skeleton-item"),p=B("el-table"),m=B("el-skeleton");return r(),E(m,{animated:""},{template:d(()=>[n(p,{data:A(a),class:"w-full compact-table responsive"},{empty:d(()=>s[0]||(s[0]=[])),default:d(()=>[k("",!0),n(i,{label:l.$t("Customer"),width:"300"},{default:d(()=>[o("div",pm,[o("div",fm,[o("div",mm,[n(c,{varient:"image",class:"w-10 h-10.5 rounded-full flex-none"})]),o("div",hm,[o("div",_m,[n(c,{varient:"p",class:"max-w-[190px]"}),n(c,{varient:"p",class:"max-w-[100px]"})])])])])]),_:1},8,["label"]),n(i,{label:l.$t("Address"),width:"300"},{default:d(()=>[o("div",vm,[n(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),n(i,{label:l.$t("Purchases"),width:"150"},{default:d(()=>[o("div",gm,[n(c,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),e.customerTable.isColumnVisible("last_purchase_date")?(r(),E(i,{key:1,label:l.$t("Last Purchase Date"),width:"200"},{default:d(()=>[o("div",ym,[n(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),e.customerTable.isColumnVisible("customer_since")?(r(),E(i,{key:2,label:l.$t("Customer Since"),width:"150"},{default:d(()=>[o("div",bm,[n(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),(e.customerTable.isColumnVisible("actions"),k("",!0))]),_:1},8,["data"])]),_:1})}}},Cm={key:0,class:"fct-customer-card"},Bm={class:"fct-customer-avatar"},km=["src"],xm={class:"fct-customer-details"},Sm={class:"fct-customer-name"},Fm={class:"fct-customer-id"},$m={class:"fct-customer-email"},Em=["innerHTML"],Um={key:1},Im={__name:"CustomersTable",props:{table:{type:Object,required:!0}},setup(e){return(t,a)=>{const l=B("el-table-column"),s=B("el-table");return r(),E(s,{data:e.table.getTableData(),class:"w-full compact-table"},{empty:d(()=>[n(bt,{icon:"Empty/ListView","has-dark":!0,text:A(u)("No customer found!")},null,8,["text"])]),default:d(()=>[k("",!0),n(l,{label:A(u)("Customer"),width:"300"},{default:d(i=>{var c;return[n(Ba,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>{var p,m,_,g,y;return[(p=i.row)!=null&&p.id?(r(),h("div",Cm,[o("div",Bm,[o("span",null,[o("img",{src:(m=i.row)==null?void 0:m.photo,alt:"avatar"},null,8,km)])]),o("div",xm,[o("div",Sm,[R(f(((_=i.row)==null?void 0:_.full_name)||A(u)("No Name"))+" ",1),o("span",Fm,"#"+f(A(Zt)((g=i.row)==null?void 0:g.id)),1)]),o("div",$m,f((y=i.row)==null?void 0:y.email),1)])])):k("",!0)]}),_:2},1032,["to"])]}),_:1},8,["label"]),n(l,{label:A(u)("Address"),width:"300"},{default:d(i=>{var c;return[n(Ba,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[R(f(t.getOrderAddress(i.row)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),n(l,{label:A(u)("Purchases"),width:90},{default:d(i=>{var c;return[n(Ba,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[R(f(A(Zt)(i.row.purchase_count)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),e.table.isColumnVisible("ltv")?(r(),E(l,{key:1,label:A(u)("LTV"),width:100},{default:d(i=>{var c;return[n(Ba,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[o("span",{innerHTML:A(et).formatNumber(i.row.ltv,!0,!1)},null,8,Em)]),_:2},1032,["to"])]}),_:1},8,["label"])):k("",!0),e.table.isColumnVisible("last_purchase_date")?(r(),E(l,{key:2,label:A(u)("Last Purchase Date"),width:"200"},{default:d(i=>{var c;return[n(Ba,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[i.row.last_purchase_date?(r(),E(Na,{key:0,"date-time":i.row.last_purchase_date},null,8,["date-time"])):(r(),h("span",Um,"---"))]),_:2},1032,["to"])]}),_:1},8,["label"])):k("",!0),e.table.isColumnVisible("customer_since")?(r(),E(l,{key:3,label:A(u)("Customer Since"),width:"150"},{default:d(i=>{var c;return[n(Ba,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[n(Na,{"date-time":i.row.created_at},null,8,["date-time"])]),_:2},1032,["to"])]}),_:1},8,["label"])):k("",!0)]),_:1},8,["data"])}}},Qm={class:"fct-customer-table-mobile-wrap"},Dm=["onClick"],Vm={class:"fct-customer-table-mobile-header"},Tm={key:0,class:"fct-customer-table-customer-col fct-customer-card"},Mm={class:"fct-customer-avatar"},Lm=["src"],Rm={class:"fct-customer-details"},Om={class:"fct-customer-name"},Hm={class:"fct-customer-id"},Pm={class:"fct-customer-email"},Nm={class:"fct-customer-table-purchases-col"},Km={class:"fct-customer-table-mobile-body"},Gm={class:"fct-customer-table-mobile-body-list"},jm={key:0,class:"fct-customer-table-ltv-col"},zm={class:"label"},qm=["innerHTML"],Ym={key:1,class:"fct-customer-table-last-purchase-date-col"},Wm={class:"label"},Xm={class:"value"},Jm={key:2,class:"fct-customer-table-customer-since-col"},Zm={class:"label"},eh={class:"value"},th={class:"fct-customer-table-mobile-footer"},ah={class:"fct-customer-table-address-col"},lh={key:0,class:"py-6 text-center"},sh={__name:"CustomersTableMobile",props:{table:{type:Object,required:!0},emptyText:{type:String,default:u("No customers found.")}},setup(e){return(t,a)=>(r(),h("div",Qm,[(r(!0),h(H,null,ae(e.table.getTableData(),(l,s)=>(r(),h("div",{key:l.id,class:"fct-customer-table-mobile-row",onClick:i=>t.$router.push({name:"view_customer",params:{customer_id:l.id}})},[o("div",Vm,[l!=null&&l.id?(r(),h("div",Tm,[o("div",Mm,[o("img",{src:l==null?void 0:l.photo,alt:"avatar"},null,8,Lm)]),o("div",Rm,[o("div",Om,[R(f((l==null?void 0:l.full_name)||A(u)("No Name"))+" ",1),o("span",Hm,"#"+f(l==null?void 0:l.id),1)]),o("div",Pm,f(l==null?void 0:l.email),1)])])):k("",!0),o("div",Nm,f(l.purchase_count)+" "+f(l.purchase_count>1?A(u)("Purchases"):A(u)("Purchase")),1)]),o("div",Km,[o("ul",Gm,[e.table.isColumnVisible("ltv")?(r(),h("li",jm,[o("div",zm,f(A(u)("LTV:")),1),o("div",{class:"value",innerHTML:A(et).formatNumber(l.ltv,!0,!1)},null,8,qm)])):k("",!0),e.table.isColumnVisible("last_purchase_date")?(r(),h("li",Ym,[o("div",Wm,f(A(u)("Last Purchase Date:")),1),o("div",Xm,[n(Na,{"date-time":l.last_purchase_date},null,8,["date-time"])])])):k("",!0),e.table.isColumnVisible("customer_since")?(r(),h("li",Jm,[o("div",Zm,f(A(u)("Customer Since:")),1),o("div",eh,[n(Na,{"date-time":l.created_at},null,8,["date-time"])])])):k("",!0)])]),o("div",th,[o("div",ah,[n(J,{name:"LocationPin"}),R(" "+f(t.getOrderAddress(l)),1)])])],8,Dm))),128)),e.table.getTableData().length===0?(r(),h("div",lh,[n(bt,{icon:"Empty/Order","has-dark":"",text:e.emptyText},null,8,["text"])])):k("",!0)]))}},nh={},oh={class:"px-4 py-3"},ih={class:"flex items-center justify-between mb-3"},rh={class:"flex items-center justify-between mb-3"},dh={class:"flex items-center justify-between mb-3"},uh={class:"flex items-center justify-between mb-3"};function ch(e,t){const a=B("el-skeleton-item"),l=B("el-skeleton");return r(),E(l,{animated:""},{template:d(()=>[o("div",oh,[o("div",ih,[n(a,{varient:"p",class:"w-1/2"}),n(a,{varient:"p",class:"w-[100px]"})]),o("div",rh,[n(a,{varient:"p",class:"w-[50px]"}),n(a,{varient:"p",class:"w-[80px]"})]),o("div",dh,[n(a,{varient:"p",class:"w-[120px]"}),n(a,{varient:"p",class:"w-[100px]"})]),o("div",uh,[n(a,{varient:"p",class:"w-[100px]"}),n(a,{varient:"p",class:"w-[100px]"})]),n(a,{varient:"p",class:"w-[230px]"})])]),_:1})}const Ah=at(nh,[["render",ch]]),ph={class:"fct-all-customers-page fct-layout-width"},fh={class:"fct-all-customers-wrap"},mh={key:1},hh={__name:"AllCustomers",setup(e){const t=Kc(),a=T({showModal:!1,action:"create",title:u("Create New Customer"),customer:{}}),l=T(!1),s=()=>{l.value=window.innerWidth<768};return Ie(()=>{s(),window.addEventListener("resize",s)}),kt(()=>{window.removeEventListener("resize",s)}),(i,c)=>{const p=B("el-button");return r(),h("div",ph,[n(Nt,{permission:"customers/manage"},{default:d(()=>[n(nl,{title:A(u)("Customers")},{action:d(()=>[n(p,{type:"primary",onClick:c[0]||(c[0]=m=>a.value.showModal=!0)},{default:d(()=>[R(f(A(u)("Add Customer")),1)]),_:1})]),_:1},8,["title"])]),_:1}),n(Nt,{permission:"customers/view"},{default:d(()=>[o("div",fh,[n($s,{table:A(t),"has-mobile-slot":!0},{mobile:d(()=>[A(t).isLoading()?(r(),E(Ah,{key:0})):k("",!0),n(sh,{table:A(t)},null,8,["table"])]),default:d(()=>[A(t).isLoading()?(r(),E(wm,{key:0,customerTable:A(t),"next-page-count":A(t).nextPageCount},null,8,["customerTable","next-page-count"])):(r(),h("div",mh,[n(Im,{table:A(t)},null,8,["table"])]))]),_:1},8,["table"])])]),_:1}),n(Nt,{permission:"customers/manage"},{default:d(()=>[n(zr,{"onUpdate:customerModal":c[1]||(c[1]=()=>{a.value.showModal=!1,a.value.customer={},A(t).fetch()}),customerModalInfos:a.value,customer_id:a.value.customer_id,customer:a.value.customer,onCloseModal:c[2]||(c[2]=m=>a.value.showModal=!1)},null,8,["customerModalInfos","customer_id","customer"])]),_:1})])}}};class _h extends Fs{getTabs(){return{all:u("All"),completed:u("Completed"),processing:u("Processing"),"on-hold":u("On Hold"),paid:u("Paid"),subscription:u("Subscription"),renewal:u("Renewal"),refunded:u("Refunded"),partially_refunded:u("Partially Refunded"),upgraded_from:{title:u("Upgraded From"),description:u("Orders upgraded from another order")},upgraded_to:{title:u("Upgraded To"),description:u("Orders upgraded to another order")}}}getToggleableColumns(){return[{label:u("Customer"),value:"customer"},{label:u("Items"),value:"order_items"},{label:u("Order Status"),value:"status"},{label:u("Order Type"),value:"type"},{label:u("Actions"),value:"actions"}]}getSortableColumns(){return[{label:u("Order ID"),value:"id"},{label:u("Total"),value:"total_amount"},{label:u("Payment Status"),value:"payment_status"},{label:u("Order Status"),value:"status"}]}getSearchHint(){return u("Search by invoice no, customer name, or customer email.")}getFetchUrl(){return"orders"}parseResponse(t){return t.orders}getTableName(){return"order_table"}with(){return["customer.primary_billing_address","order_items"]}}function Gc(e){return _h.init(e)}const vh={class:"fct-order-stats-card"},gh={class:"fct-order-stats-card-head"},yh={class:"fct-order-stats-card-head-content"},bh={class:"text"},wh={key:0,class:"value"},Ch={class:"fct-order-stats-card-body"},Bh={key:0,class:"change-wrap"},kh={key:0,class:"change-title"},xh={key:1,class:"change-title"},Sh={key:1,class:"change-wrap"},Fh={class:"change-title"},$h={__name:"StatCard",props:{direction:String,stat:Object,statRanges:Object,currentRange:String|Number,statKey:String|Number,loading:Boolean},setup(e){const t=zt().ctx,a=e,l=N(()=>{switch(a.statKey){case"total_orders":return"warning";case"paid_orders":return"blue";case"total_paid_order_items":return"danger";case"total_paid_amounts":return"secondary";default:return"info"}}),s=N(()=>c.value===0?"":c.value>0?"success":"danger"),i=m=>m.is_cents?t.formatNumber(m.current_count):Zt(m.current_count),c=N(()=>{let m=Ef(a.stat.current_count,a.stat.compare_count)??0;return m===""?0:m}),p=N(()=>a.statRanges[a.currentRange].label);return(m,_)=>{const g=B("el-skeleton"),y=B("el-skeleton-item");return r(),h("div",vh,[o("div",gh,[n(Ze,{size:"large",bg:l.value,soft:""},{default:d(()=>[ka(m.$slots,"icon")]),_:3},8,["bg"]),o("div",yh,[n(g,{loading:e.loading,animated:"",rows:0},null,8,["loading"]),o("span",bh,f(e.stat.title),1),e.loading?k("",!0):(r(),h("div",wh,f(i(e.stat)),1))])]),o("div",Ch,[n(g,{loading:e.loading,animated:""},{template:d(()=>[n(y,{variant:"p",class:"w-1/2 h-4"})]),_:1},8,["loading"]),!e.loading&&e.currentRange!=="all_time"?(r(),h("div",Bh,[o("span",{class:ie("change "+s.value)},[c.value!==0?(r(),E(J,{key:0,name:c.value>0?"CaretUp":"CaretDown"},null,8,["name"])):k("",!0),R(" "+f(c.value===0?m.$t("Same as previous"):Math.abs(c.value)+"%"),1)],2),c.value>0?(r(),h("span",kh,f(A(u)("More than %s",p.value==="Today"?m.$t("Yesterday"):m.$t(p.value))),1)):c.value<0?(r(),h("span",xh,f(A(u)("Less than %s",p.value==="Today"?m.$t("Yesterday"):m.$t(p.value))),1)):k("",!0)])):k("",!0),!e.loading&&e.currentRange==="all_time"?(r(),h("div",Sh,[o("span",Fh,f(m.$t("All Time")),1)])):k("",!0)])])}}},Eh={name:"CardFooter"},Uh={class:"fct-card-footer"};function Ih(e,t,a,l,s,i){return r(),h("div",Uh,[ka(e.$slots,"default")])}const ad=at(Eh,[["render",Ih]]);class jc{constructor(){Re(this,"_attributes",{})}attribute(t,a){return this._attributes[t]=a,this}setAttribute(t){return this._attributes=typeof t=="object"?t:this._attributes,this}}class rs{static install(t,a,l={},s=!1){const i=new a(...Object.values(l));Object.keys(i).forEach(c=>{(s||!t.hasOwnProperty(c))&&(t[c]=i[c])}),Object.getOwnPropertyNames(a.prototype).forEach(c=>{c!=="constructor"&&typeof i[c]=="function"&&(s||typeof t[c]!="function")&&(t[c]=i[c].bind(t))})}}class Qh extends ol{constructor(){super(...arguments);Re(this,"data",{salesGrowthChart:[],countryHeatMap:[],fluctuations:[],dashBoardStats:[],recentOrders:[],recentActivities:[],topSoldProducts:[],currencySign:je.get("shop.currency_sign"),isBusy:{recentActivities:!1,fluctuations:!1,dashBoardStats:!1,recentOrders:!1,countryHeatMap:!1,salesGrowthChart:!0,topSoldProducts:!0}})}get controllerKey(){return"ReportingController"}beforeInit(){}makeRequest(a,l,s,i){this.data.isBusy[i]=!0,typeof l!="object"&&(l={});const c=ce.get(`reports/${a}`,l);return this.resolvePromiseResponse(c,s,i),c}resolvePromiseResponse(a,l=null,s=null){a.then(i=>{s==null||l==null||(this.data[s]=i[l])}).catch(i=>{}).finally(()=>{this.data.isBusy[s]=!1})}getDashboardStats(a={}){return this.makeRequest("dashboard-stats",a,"dashBoardStats","dashBoardStats")}getSalesGrowthChart(a={}){return this.makeRequest("sales-growth-chart",a,"salesGrowthChart","salesGrowthChart")}getCountryHeatMap(a={}){return this.makeRequest("country-heat-map",a,"countryHeatMap","countryHeatMap")}getRecentOrders(a={}){return this.makeRequest("get-recent-orders",a,"recentOrders","recentOrders")}getRecentActivities(a={}){return this.makeRequest("get-recent-activities",a,"recentActivities","recentActivities")}getSummary(a={}){return this.makeRequest("get-dashboard-summary",a,"summaryData","summaryData")}getTopSoldProducts(a={}){return this.makeRequest("fetch-top-sold-products",a,"topSoldProducts","topSoldProducts")}}const Ga=Qh.init(),Dh={},Vh={class:"fct-order-stats-row"},Th={class:"p-4 bg-gray-25 rounded dark:bg-primary-500"},Mh={class:"flex items-center gap-2 mb-3"},Lh={class:"right flex flex-col flex-1 gap-2"};function Rh(e,t){const a=B("el-skeleton-item"),l=B("el-skeleton");return r(),h("div",Vh,[(r(),h(H,null,ae(4,s=>n(l,{animated:"",key:s},{template:d(()=>[o("div",Th,[o("div",Mh,[n(a,{variant:"p",class:"rounded w-10 h-10 block"}),o("div",Lh,[n(a,{variant:"p",class:"rounded w-4/5 block"}),n(a,{variant:"p",class:"rounded w-1/2 block"})])]),o("div",null,[n(a,{variant:"p",class:"rounded w-2/3 block"})])])]),_:2},1024)),64))])}const Oh=at(Dh,[["render",Rh]]),Hh={class:"fct-order-stats-wrap"},Ph={class:"fct-order-stats-actions flex items-center gap-2.5"},Nh={class:"fct-order-stats-body"},Kh={key:1,class:"fct-order-stats-row"},Gh={class:"flex justify-end mt-2"},jh=Object.assign({name:"OrderStatBar"},{__name:"OrderStatBar",setup(e){const t=T(Ot.get("order_stat_collapse",!1)),a=T(""),l=zt().ctx,s=T(!1),i=T(!0),c=T(!1),p=T("-7 days"),m=ll(),_=T({"-0 days":{label:u("Today"),desc:u("Compared to yesterday")},"-7 days":{label:u("Last 7 days"),desc:u("Compared to the previous 7 days")},"-30 days":{label:u("Last 30 days"),desc:u("Compared to the previous 30 days")},this_month:{label:u("This Month"),desc:u("Compared to the previous Month")},all_time:{label:u("All Time"),desc:u("See All time Sales Stat")}}),g=async v=>{if(p.value!==v)try{p.value=v,a.value="collapse",t.value===!0&&(t.value=!1,Ot.set("order_stat_collapse",t.value)),await Promise.all([l.Storage().set("order_quick_stat_bar_range",p.value),y()])}catch{}},y=()=>{c.value=!1,i.value=!0;const v={"-0 days":[lt().startOf("day").format("YYYY-MM-DD"),lt().endOf("day").format("YYYY-MM-DD")],"-7 days":[lt().subtract(7,"days").startOf("day").format("YYYY-MM-DD"),lt().endOf("day").format("YYYY-MM-DD")],"-30 days":[lt().subtract(30,"days").startOf("day").format("YYYY-MM-DD"),lt().endOf("day").format("YYYY-MM-DD")],this_month:[lt().startOf("month").format("YYYY-MM-DD"),lt().endOf("day").format("YYYY-MM-DD")],all_time:[null,null]},[C,w]=v[p.value]||[lt().startOf("month"),lt().endOf("day")],b={startDate:C,endDate:w,paymentStatus:"all"};Ga.getDashboardStats({params:{...b}}).then(()=>{s.value=Ga.data.dashBoardStats}).catch(x=>{}).finally(()=>{i.value=!1})};return Ie(()=>{p.value=Ot.get("order_quick_stat_bar_range","-0 days");let v=Ot.get("order_quick_stat_bar_collapse_item");a.value=v===null?"collapse":v,y()}),(v,C)=>{const w=B("el-button");return r(),h("div",Hh,[n(ke,null,{default:d(()=>[n(Qe,{title:A(u)("Order Stats Overview"),border_bottom:""},{action:d(()=>[o("div",Ph,[n(jr,{class:"hide-animation-on-mobile"},{default:d(()=>[(r(!0),h(H,null,ae(_.value,(b,x)=>(r(),E(Co,{title:`${A(u)("Order Stats Overview of")} ${b.label}`,tabindex:"0",key:x,onClick:$=>g(x),class:ie(x===p.value?"active":"")},{default:d(()=>[R(f(b.label),1)]),_:2},1032,["title","onClick","class"]))),128))]),_:1})])]),_:1},8,["title"]),n(Ce,null,{default:d(()=>[o("div",Nh,[i.value?(r(),E(Oh,{key:0})):(r(),h("div",Kh,[(r(!0),h(H,null,ae(s.value,(b,x)=>(r(),h("div",{key:x,class:"fct-order-stats-col cursor-pointer",onClick:C[0]||(C[0]=$=>A(m).push({name:"reports_orders"}))},[(r(),E($h,{key:x,stat:b,"current-range":p.value,"stat-ranges":_.value,loading:i.value,"stat-key":x},{icon:d(()=>[n(J,{name:b.icon},null,8,["name"])]),_:2},1032,["stat","current-range","stat-ranges","loading","stat-key"]))]))),128))])),o("div",Gh,[n(w,{text:"",class:"underline-link-button",onClick:C[1]||(C[1]=b=>A(m).push({name:"reports_orders"}))},{default:d(()=>[R(f(A(u)("See Full Report")),1)]),_:1})])])]),_:1})]),_:1})])}}}),zh={class:"table-cell"},qh={class:"table-cell"},Yh={class:"table-cell"},Wh={class:"table-cell"},Xh={class:"table-cell items-center gap-1"},Jh={class:"table-cell"},Zh={class:"table-cell"},e_={class:"table-cell"},t_={__name:"OrdersLoader",props:{nextPageCount:{type:Number,default:0},orderTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=s=>t.orderTable.columns.includes(s),l=Array.from({length:t.nextPageCount},(s,i)=>i+1);return(s,i)=>{const c=B("el-table-column"),p=B("el-skeleton-item"),m=B("el-table"),_=B("el-skeleton");return r(),E(_,{animated:""},{template:d(()=>[n(m,{data:A(l),class:"w-full compact-table responsive"},{empty:d(()=>i[0]||(i[0]=[])),default:d(()=>[k("",!0),n(c,{label:s.$t("# Date"),width:140},{default:d(()=>[o("div",zh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),a("customer")?(r(),E(c,{key:1,width:"100",label:s.$t("Customer")},{default:d(()=>[o("div",qh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),a("order_items")?(r(),E(c,{key:2,label:s.$t("Items"),width:"250"},{default:d(()=>[o("div",Yh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),n(c,{width:"100",label:s.$t("Total")},{default:d(()=>[o("div",Wh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),n(c,{width:"150",label:s.$t("Payment Status")},{default:d(()=>[o("div",Xh,[n(p,{varient:"p",class:"w-4/5"}),n(p,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),a("status")?(r(),E(c,{key:3,width:"150",label:s.$t("Status")},{default:d(()=>[o("div",Jh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),a("type")?(r(),E(c,{key:4,width:"110",label:s.$t("Order Type")},{default:d(()=>[o("div",Zh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),a("actions")?(r(),E(c,{key:5,width:"60",label:""},{default:d(()=>[o("div",e_,[n(p,{varient:"p",class:"w-3/5"})])]),_:1})):k("",!0)]),_:1},8,["data"])]),_:1})}}},a_={},l_={class:"px-4 py-3"},s_={class:"grid grid-cols-3 gap-5 mt-5"};function n_(e,t){const a=B("el-skeleton-item"),l=B("el-skeleton");return r(),E(l,{animated:""},{template:d(()=>[o("div",l_,[(r(),h(H,null,ae(2,s=>o("div",{key:s,class:"flex items-center justify-between mb-3"},[n(a,{varient:"p",class:"w-1/2"}),n(a,{varient:"p",class:"w-[100px]"})])),64)),o("div",s_,[(r(),h(H,null,ae(3,s=>o("div",{key:s},[n(a,{varient:"p",class:"w-1/2"}),n(a,{varient:"p",class:"w-[100px]"})])),64))])])]),_:1})}const o_=at(a_,[["render",n_]]),i_={class:"fct-all-orders-page fct-layout-width"},r_={class:"fct-delete-test-orders-content"},d_={if:"deleteTestOrdersProgressTitle",class:"fct-delete-test-orders-title"},u_={class:"fct-delete-test-orders-meta"},c_={class:"fct-delete-test-orders-text"},A_={key:0,class:"fct-delete-test-orders-loading"},p_={class:"fct-test-orders-loading-content"},f_={class:"fct-loading-bars"},m_=["id"],h_={class:"fct-delete-test-orders-percentage"},__={class:"fct-delete-test-orders-stats"},v_={class:"fct-delete-test-orders-stat-row"},g_={class:"fct-delete-test-orders-stat-label"},y_={class:"fct-delete-test-orders-stat-value"},b_={class:"fct-delete-test-orders-stat-row"},w_={class:"fct-delete-test-orders-stat-label"},C_={class:"fct-delete-test-orders-stat-value is-success"},B_={class:"fct-delete-test-orders-stat-row"},k_={class:"fct-delete-test-orders-stat-label"},x_={class:"fct-delete-test-orders-stat-value is-danger"},S_={key:1,class:"fct-delete-test-orders-message"},F_={key:0,class:"dialog-footer"},$_={class:"fct-all-orders-wrap"},E_={__name:"AllOrders",setup(e){const t=Gc({instance:zt()}),a=T(!1),l=T(!1),s=T(!1),i=T(!1),c=T({total:0,processed:0,deleted:0,failed:0}),p=T(""),m=N(()=>c.value.total?Math.min(100,Math.round(c.value.processed/c.value.total*100)):0),_=N(()=>{if(!c.value.total)return"";const $=Math.min(c.value.processed,c.value.total);return s.value?u("Deleting %1$s of %2$s Test Orders",$,c.value.total):u("Deleted %1$s of %2$s Test Orders",$,c.value.total)}),g=N(()=>c.value.total?s.value?u("Deleting... %s%",m.value):u("Completed"):""),y=()=>{l.value=window.innerWidth<768},v=()=>{c.value={total:0,processed:0,deleted:0,failed:0},p.value=""},C=$=>{$==="show_order_stats"&&(Ot.set("show_order_stats",!a.value),a.value=!a.value),$==="show_delete_bulk_action"&&t.showBulkDeleteAction(!0),$==="hide_delete_bulk_action"&&t.showBulkDeleteAction(!1),$==="delete_test_orders"&&w()},w=async()=>{var $,M;if(!s.value){try{await Ja.confirm(u("Are you sure you want to delete all test orders? This action cannot be undone."),u("Confirm Delete!"),{confirmButtonText:u("Delete"),cancelButtonText:u("Cancel"),cancelButtonClass:"el-button--small",confirmButtonClass:"el-button--small",type:"warning"})}catch{return}s.value=!0,i.value=!0,v();try{let F=0,S=0,D=0;for(;;){const V=await ce.post("orders/do-bulk-action",{action:"delete_test_orders",last_order_id:F}),Q=V||{};if(S=S||Number(Q.total_count||0),D+=Number(Q.batch_count||0),c.value={total:S,processed:D,deleted:c.value.deleted+Number(Q.deleted_count||0),failed:c.value.failed+Number(Q.failed_count||0)},p.value=Q.has_more?u("Processed %1$s of %2$s test orders...",Math.min(D,S),S):(V==null?void 0:V.message)||"",!Q.has_more)break;F=Number(Q.last_attempted_order_id||0),await new Promise(U=>setTimeout(U,100))}if(!c.value.total){i.value=!1,Y.info(u("No test orders found to delete"));return}const I=c.value.failed?u("Deleted %1$s test orders. %2$s test orders could not be deleted.",c.value.deleted,c.value.failed):u("Deleted %s test orders successfully",c.value.deleted);p.value=I,Y.success(I),t.fetch()}catch(F){p.value=(($=F==null?void 0:F.data)==null?void 0:$.message)||u("Failed to delete test orders"),Y.error(((M=F==null?void 0:F.data)==null?void 0:M.message)||u("Failed to delete test orders"))}finally{s.value=!1}}},b=()=>{i.value=!1},x=()=>{const $=Ot.get("show_order_stats");$&&(a.value=$)};return Ie(()=>{x(),y(),window.addEventListener("resize",y)}),kt(()=>{window.removeEventListener("resize",y)}),($,M)=>{const F=B("el-icon"),S=B("el-button"),D=B("el-dropdown-item"),I=B("el-dropdown-menu"),V=B("el-dropdown"),Q=B("el-tag"),U=B("el-progress"),O=B("el-dialog");return r(),h("div",i_,[n(nl,{title:A(u)("Orders")},{action:d(()=>[n(Nt,{permission:["reports/view","orders/manage"]},{default:d(()=>[n(V,{trigger:"click","popper-class":"fct-dropdown",onCommand:C,placement:"bottom-end"},{dropdown:d(()=>[n(I,null,{default:d(()=>[n(Nt,{permission:"reports/view"},{default:d(()=>[n(D,{command:"show_order_stats"},{default:d(()=>[a.value?(r(),h(H,{key:1},[n(J,{name:"EyeOff"}),R(" "+f(A(u)("Hide Order Stats")),1)],64)):(r(),h(H,{key:0},[n(J,{name:"Eye"}),R(" "+f(A(u)("Show Order Stats")),1)],64))]),_:1}),A(t).data.showDeleteBulkAction?k("",!0):(r(),E(D,{key:0,command:"show_delete_bulk_action"},{default:d(()=>[n(J,{name:"Eye"}),R(" "+f(A(u)("Show Bulk Actions")),1)]),_:1})),A(t).data.showDeleteBulkAction?(r(),E(D,{key:1,command:"hide_delete_bulk_action"},{default:d(()=>[n(J,{name:"EyeOff"}),R(" "+f(A(u)("Hide Bulk Actions")),1)]),_:1})):k("",!0)]),_:1}),n(Nt,{permission:"orders/manage"},{default:d(()=>[n(D,{command:"delete_test_orders",disabled:s.value,class:"item-destructive"},{default:d(()=>[n(J,{name:"Delete"}),R(" "+f(s.value?A(u)("Deleting Test Orders..."):A(u)("Delete Test Orders")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),default:d(()=>[n(S,null,{default:d(()=>[R(f(A(u)("More actions"))+" ",1),n(F,null,{default:d(()=>[n(A(ei))]),_:1})]),_:1})]),_:1})]),_:1}),n(Nt,{permission:"orders/create"},{default:d(()=>[n(S,{tag:"router-link",type:"primary",to:{name:"add_order"}},{default:d(()=>[R(f(A(u)("Create Order")),1)]),_:1})]),_:1})]),_:1},8,["title"]),n(O,{modelValue:i.value,"onUpdate:modelValue":M[0]||(M[0]=L=>i.value=L),title:A(u)("Delete Test Orders"),"append-to-body":!0,"close-on-click-modal":!1,"show-close":!0,"close-on-press-escape":!0,onClose:b,class:"fct-delete-test-orders-modal"},{footer:d(()=>[s.value?k("",!0):(r(),h("div",F_,[n(S,{type:"primary",onClick:b},{default:d(()=>[R(f(A(u)("Done")),1)]),_:1})]))]),default:d(()=>[o("div",r_,[o("div",d_,f(_.value),1),o("div",u_,[o("div",c_,f(s.value?A(u)("You can close this — deletion will continue in the background"):A(u)("Test order deletion completed.")),1),g.value?(r(),E(Q,{key:0,type:"success",class:ie(["fct-delete-test-orders-status",{"is-complete":!s.value}])},{default:d(()=>[R(f(g.value),1)]),_:1},8,["class"])):k("",!0)]),s.value?(r(),h("div",A_,[o("div",p_,[o("div",f_,[(r(),h(H,null,ae(8,L=>o("div",{key:L,class:"bar-block",id:`bar-block-${L+1}`},null,8,m_)),64))]),R(" "+f(A(u)("Deleting...")),1)]),o("span",h_,f(m.value)+"% ",1)])):k("",!0),n(va,{visible:s.value,fade:"",duration:300},{default:d(()=>[n(U,{percentage:m.value,"stroke-width":6,striped:"","striped-flow":"","show-text":!1,status:s.value?void 0:"success",class:"fct-delete-test-orders-progress"},null,8,["percentage","status"])]),_:1},8,["visible"]),o("div",__,[o("div",v_,[M[1]||(M[1]=o("span",{class:"fct-delete-test-orders-stat-icon"},[o("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{opacity:"0.4",d:"M13.66 1.1333C13.3741 1.09487 13.0575 1.0716 12.7083 1.05762V1.66146V1.70461C12.7083 2.25782 12.7084 2.73471 12.6567 3.11653C12.6017 3.52616 12.4775 3.91865 12.1592 4.23714C11.8409 4.55563 11.4483 4.68009 11.0383 4.73518C10.6566 4.78653 10.18 4.78649 9.62663 4.78646H9.58329H8.74996H8.70662C8.15333 4.78649 7.67666 4.78653 7.29499 4.73518C6.88499 4.68009 6.49249 4.55563 6.17416 4.23714C5.85583 3.91865 5.73166 3.52616 5.67666 3.11653C5.62333 2.72482 5.625 2.23304 5.625 1.66146V1.05762C5.27583 1.0716 4.95917 1.09487 4.67333 1.1333C3.92333 1.23414 3.2925 1.45038 2.79083 1.95198C2.28917 2.45358 2.07249 3.08503 1.97166 3.83513C1.87499 4.55588 1.875 5.47186 1.875 6.60774V13.3818C1.875 14.5178 1.87499 15.4337 1.97166 16.1544C2.07249 16.9046 2.28917 17.536 2.79083 18.0376C3.2925 18.5392 3.92333 18.7554 4.67333 18.8563C5.39417 18.9532 6.31 18.9532 7.44667 18.9531H10.8866C11.0791 18.9532 11.2641 18.9519 11.4433 18.9515C11.2358 18.5378 11.0666 18.3449 10.9875 18.2671C10.18 18.0578 9.58329 17.3269 9.58329 16.4539C9.58329 15.4184 10.4225 14.5789 11.4583 14.5789C11.6941 14.5789 11.9733 14.6359 12.1158 14.6766C12.31 14.7322 12.52 14.8165 12.7383 14.9346C13.1533 14.298 13.6958 13.5629 14.3133 12.9367C14.8741 12.3678 15.5933 11.7846 16.4583 11.432V6.60774C16.4583 5.47186 16.4583 4.55588 16.3616 3.83513C16.2608 3.08503 16.0441 2.45358 15.5425 1.95198C15.0408 1.45038 14.41 1.23414 13.66 1.1333Z",fill:"#017EF3"}),o("path",{d:"M17.012 12.3361C17.4462 12.1825 17.922 12.4094 18.0753 12.8431C18.2295 13.2768 18.002 13.753 17.5687 13.9068C17.1453 14.0568 16.6945 14.3786 16.2395 14.8393C15.7912 15.2944 15.3778 15.845 15.022 16.3897C14.6687 16.9317 14.3828 17.4519 14.1853 17.8374C14.087 18.0296 13.9387 18.3456 13.8879 18.4534C13.7587 18.7501 13.4695 18.9462 13.1453 18.9548C12.822 18.9633 12.5228 18.7836 12.3778 18.4942C12.0112 17.7597 11.6821 17.4672 11.5154 17.3564C11.4421 17.3074 11.3937 17.2895 11.3762 17.284C10.9537 17.2435 10.6237 16.8878 10.6237 16.4548C10.6237 15.9945 10.997 15.6214 11.457 15.6214C11.5645 15.6214 11.7428 15.6547 11.8287 15.6792C12.002 15.7287 12.2112 15.8173 12.4403 15.9698C12.6295 16.0958 12.8245 16.2633 13.0228 16.48C13.1945 16.1726 13.3971 15.8302 13.6271 15.4782C14.0187 14.8772 14.5003 14.2296 15.0528 13.6691C15.6003 13.1143 16.2595 12.6028 17.012 12.3361ZM9.16532 11.8714C9.51032 11.8714 9.79032 12.1513 9.79032 12.4964C9.79032 12.8416 9.51032 13.1214 9.16532 13.1214H5.83203C5.48703 13.1214 5.20703 12.8416 5.20703 12.4964C5.20703 12.1513 5.48703 11.8714 5.83203 11.8714H9.16532ZM12.4987 8.53809C12.8437 8.53809 13.1237 8.81793 13.1237 9.16309C13.1237 9.50826 12.8437 9.78809 12.4987 9.78809H5.83203C5.48703 9.78809 5.20703 9.50826 5.20703 9.16309C5.20703 8.81793 5.48703 8.53809 5.83203 8.53809H12.4987ZM11.457 1.0389V1.66309C11.457 2.26994 11.4562 2.66228 11.417 2.95134C11.3803 3.22242 11.3212 3.3074 11.2737 3.35498C11.2262 3.40256 11.1412 3.46176 10.8704 3.49821C10.5812 3.53706 10.1887 3.53809 9.58199 3.53809H8.74866C8.14203 3.53809 7.74952 3.53706 7.46036 3.49821C7.18952 3.46176 7.10453 3.40256 7.05703 3.35498C7.00953 3.3074 6.95036 3.22242 6.9137 2.95134C6.87453 2.66228 6.8737 2.26994 6.8737 1.66309V1.0389C7.05786 1.03839 7.24786 1.03808 7.44536 1.03809H10.8853C11.0828 1.03808 11.2728 1.03839 11.457 1.0389Z",fill:"#017EF3"})])],-1)),o("span",g_,f(A(u)("Processed")),1),o("span",y_,f(c.value.processed)+" / "+f(c.value.total),1)]),o("div",b_,[M[2]||(M[2]=o("span",{class:"fct-delete-test-orders-stat-icon"},[o("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{opacity:"0.4",d:"M16.9433 13.0463C16.88 14.0913 16.8292 14.9197 16.725 15.5813C16.6183 16.2605 16.4475 16.8263 16.1067 17.3205C15.7942 17.773 15.3917 18.1547 14.9258 18.4413C14.4158 18.7555 13.8467 18.8922 13.1692 18.958H8.06417C7.38667 18.8922 6.81667 18.7547 6.30667 18.4405C5.84 18.153 5.4375 17.7705 5.125 17.3172C4.78417 16.8222 4.61417 16.2563 4.50833 15.5763C4.405 14.913 4.355 14.083 4.2925 13.0372L3.75 3.95801H17.5L16.9433 13.0463Z",fill:"#189877"}),o("path",{d:"M11.7488 1.06879C12.2196 1.11046 12.6621 1.25462 13.043 1.53796C13.3238 1.74712 13.5188 2.00379 13.6855 2.28212C13.8405 2.53962 13.9963 2.86046 14.173 3.22462L14.528 3.95879H18.1263C18.5863 3.95879 18.9596 4.33129 18.9596 4.79212C18.9596 5.25212 18.5863 5.62546 18.1263 5.62546H3.1263C2.6663 5.62546 2.29297 5.25212 2.29297 4.79212C2.29297 4.33129 2.6663 3.95879 3.1263 3.95879H6.8013L7.09797 3.30796C7.26964 2.93046 7.4213 2.59796 7.5738 2.33129C7.73797 2.04296 7.93214 1.77629 8.21714 1.55796C8.6013 1.26296 9.05297 1.11379 9.53464 1.06962C9.86213 1.03962 10.193 1.04046 10.5221 1.04129C10.5571 1.04129 10.5913 1.04212 10.6263 1.04212C10.6605 1.04212 10.6955 1.04212 10.7288 1.04212C11.1138 1.04212 11.4605 1.04296 11.7488 1.06879ZM8.63297 3.95879H12.6763C12.4871 3.56879 12.3663 3.32212 12.2571 3.13962C12.0963 2.87296 11.9046 2.75546 11.6005 2.72879C11.3846 2.70962 11.103 2.70879 10.6555 2.70879C10.1963 2.70879 9.90714 2.70962 9.68547 2.72962C9.3738 2.75796 9.17964 2.87962 9.0213 3.15712C8.91714 3.33879 8.80464 3.58212 8.63297 3.95879Z",fill:"#189877"})])],-1)),o("span",w_,f(A(u)("Deleted")),1),o("span",C_,f(c.value.deleted),1)]),o("div",B_,[M[3]||(M[3]=o("span",{class:"fct-delete-test-orders-stat-icon"},[o("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{opacity:"0.4",d:"M10.0013 1.04004C14.9488 1.04004 18.9596 5.05082 18.9596 9.99833C18.9596 14.9459 14.9488 18.9567 10.0013 18.9567C5.0538 18.9567 1.04297 14.9459 1.04297 9.99833C1.04297 9.54867 1.40778 9.18392 1.85677 9.18375C2.30677 9.18375 2.6722 9.54858 2.6722 9.99833C2.6722 14.0463 5.95297 17.3282 10.0013 17.3282C14.0496 17.3282 17.3304 14.0463 17.3304 9.99833C17.3304 5.95037 14.0496 2.66846 10.0013 2.66846C9.55138 2.66846 9.18764 2.30434 9.18747 1.85466C9.18747 1.40488 9.5513 1.04004 10.0013 1.04004ZM2.80566 4.66634C3.08066 4.35891 3.55043 4.30436 3.89209 4.55241C4.25514 4.81714 4.33519 5.32656 4.07031 5.69011L3.90674 5.92448C3.53507 6.47876 3.23784 7.08712 3.02784 7.73356C2.88857 8.16094 2.42904 8.39483 2.00163 8.25602C1.57424 8.11701 1.33924 7.65747 1.47835 7.22982C1.77169 6.32508 2.20608 5.48362 2.75358 4.73145L2.80566 4.66634ZM7.3125 1.45345C7.71574 1.36659 8.12817 1.59791 8.25814 1.9987C8.39722 2.42644 8.16233 2.88598 7.73486 3.02491L7.46061 3.12011C6.82564 3.35476 6.23137 3.67519 5.69222 4.06738L5.62224 4.11214C5.26557 4.32003 4.80286 4.22905 4.55453 3.88835C4.29044 3.52472 4.37034 3.01452 4.73356 2.74984L5.02084 2.55046C5.69734 2.09692 6.44048 1.7332 7.23194 1.47624L7.3125 1.45345Z",fill:"#F04438"}),o("path",{d:"M11.9754 6.85201C12.3029 6.58506 12.7854 6.6039 13.0904 6.90897C13.3954 7.21407 13.4145 7.69657 13.147 8.02388L13.0904 8.08736L11.1787 9.99808L13.0895 11.9089L13.147 11.9724C13.4137 12.2997 13.3945 12.7823 13.0895 13.0873C12.7845 13.3923 12.302 13.4113 11.9745 13.1442L11.9112 13.0873L10.0012 11.1765L8.09122 13.0873C7.76538 13.4127 7.23789 13.4127 6.91289 13.0873C6.58706 12.7619 6.58706 12.2344 6.91289 11.9089L8.82288 9.99808L6.91206 8.08736L6.85456 8.02388C6.58789 7.69657 6.60706 7.21407 6.91206 6.90897C7.21706 6.6039 7.69955 6.58506 8.02705 6.85201L8.09039 6.90897L10.0012 8.81975L11.912 6.90897L11.9754 6.85201Z",fill:"#F04438"})])],-1)),o("span",k_,f(A(u)("Failed")),1),o("span",x_,f(c.value.failed),1)])]),p.value&&!s.value?(r(),h("p",S_,f(p.value),1)):k("",!0)])]),_:1},8,["modelValue","title"]),n(Nt,{permission:"reports/view"},{default:d(()=>[a.value?(r(),E(jh,{key:0})):k("",!0)]),_:1}),n(Nt,{permission:"orders/view"},{default:d(()=>[o("div",$_,[n($s,{table:A(t),classicTabStyle:!0,hasMobileSlot:!0},{mobile:d(()=>[A(t).isLoading()?(r(),E(o_,{key:0})):k("",!0),A(t).isLoading()?k("",!0):(r(),E(Xr,{key:1,table:A(t),orders:A(t).getTableData(),columns:A(t).data.columns,"empty-text":A(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),default:d(()=>[A(t).isLoading()?(r(),E(t_,{key:0,orderTable:A(t),"next-page-count":A(t).nextPageCount},null,8,["orderTable","next-page-count"])):(r(),E(Wr,{key:1,table:A(t),orders:A(t).getTableData(),columns:A(t).data.columns,"empty-text":A(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),_:1},8,["table"])])]),_:1})])}}},U_={class:"setting-wrap"},I_={class:"setting-wrap-inner"},Q_={class:"setting-confirmation-content"},D_={class:"custom-wp-editor-wrapper"},V_={class:"setting-save-action"},T_={__name:"InvoicePacking",setup(e){const t=T([]),a=T([]),l=T(!1),s=T(!1);fs().onSave(()=>{_()});const c=T([u("Invoice Template"),u("Packing Slip Template"),u("Delivery Slip Template"),u("Shipping Slip Template"),u("Dispatch Slip Template")]),p=()=>{l.value=!0,ce.get("templates/print-templates").then(g=>{t.value=g.templates,l.value=!1}).catch(g=>{Y.error(g)}).finally(()=>{l.value=!1})},m=()=>{l.value=!0,ce.get("settings/confirmation/shortcode",{}).then(g=>{a.value=g.data}).catch(g=>{Y.error(g)}).finally(()=>{l.value=!1})},_=()=>{s.value=!0,ce.put("templates/print-templates",{templates:t.value}).then(g=>{Y.success(g.message)}).catch(g=>{Y.error(g)}).finally(()=>{s.value=!1})};return Ie(()=>{p(),m()}),(g,y)=>{const v=B("el-skeleton");return B("el-button"),r(),h("div",U_,[n(Qa,{heading:A(u)("Invoice & Packing"),"show-save-button":!1},null,8,["heading"]),o("div",I_,[n(Da),n(Za,{class:"mb-5",type:"information",content:A(u)("It will be available soon!")},null,8,["content"]),l.value?(r(!0),h(H,{key:0},ae(c.value,(C,w)=>(r(),E(ke,{key:w},{default:d(()=>[n(Qe,{title:C,border_bottom:""},null,8,["title"]),n(Ce,null,{default:d(()=>[n(v,{animated:"",rows:6})]),_:1})]),_:2},1024))),128)):k("",!0),!l.value&&t.value.length>0?(r(),h(H,{key:1},[(r(!0),h(H,null,ae(t.value,(C,w)=>(r(),E(ke,{key:w},{default:d(()=>[n(Qe,{title:C.title+" (Under Development)",border_bottom:""},null,8,["title"]),n(Ce,null,{default:d(()=>[o("div",Q_,[o("div",D_,[n(Wl,{"short-codes":a.value,modelValue:C.content,"onUpdate:modelValue":b=>C.content=b,onUpdate:b=>{C.content=b}},null,8,["short-codes","modelValue","onUpdate:modelValue","onUpdate"])])])]),_:2},1024)]),_:2},1024))),128)),o("div",V_,[k("",!0)])],64)):k("",!0)])])}}},M_={class:"fct-pdf-pro-gate"},L_={class:"fct-pdf-pro-gate-inner"},R_={class:"fct-pdf-pro-heading"},O_={class:"fct-pdf-pro-icon"},H_={class:"fct-pdf-pro-label"},P_={class:"fct-pdf-pro-badge"},N_={class:"fct-pdf-pro-desc"},K_={__name:"PdfTemplateProGate",setup(e){return(t,a)=>{const l=B("el-button");return r(),h("div",M_,[o("div",L_,[o("div",R_,[o("div",O_,[n(J,{name:"Crown"})]),o("span",H_,f(A(u)("PDF Templates")),1),o("span",P_,f(A(u)("Pro")),1)]),o("p",N_,f(A(u)("Customizable PDF receipts, invoices, and e-invoices with ZUGFeRD support.")),1),n(l,{type:"primary",size:"small",tag:"a",href:"https://fluentcart.com/pricing/",target:"_blank"},{default:d(()=>[n(J,{name:"Crown"}),R(" "+f(A(u)("Upgrade to Pro")),1)]),_:1})])])}}},G_=at(K_,[["__scopeId","data-v-83e6a503"]]),j_={__name:"PdfTemplateRoute",setup(e){const t=je.get("app_config.isProActive");return(a,l)=>{const s=B("router-view");return A(t)?(r(),E(s,{key:1})):(r(),E(G_,{key:0}))}}},z_={class:"setting-wrap"},q_={class:"setting-wrap-inner"},Y_={class:"flex gap-5"},W_={class:"flex flex-col items-center justify-center py-12 text-center"},X_={class:"text-lg font-semibold mb-2 text-system-dark dark:text-gray-200"},J_={class:"text-sm text-system-mid dark:text-gray-400 mb-6 max-w-md"},Z_={class:"fct-pdf-template-desc"},ev={class:"fct-pdf-template-grid"},tv={class:"fct-pdf-template-preview"},av={class:"fct-pdf-template-preview-placeholder"},lv={class:"fct-pdf-placeholder-text"},sv={class:"fct-pdf-template-overlay"},nv={class:"fct-pdf-template-footer"},ov={class:"fct-pdf-template-name-row"},iv={class:"fct-pdf-template-title"},rv={key:0,class:"fct-pdf-badge fct-pdf-badge--default"},dv={__name:"PdfTemplateIndex",setup(e){const t=ll(),a=T(!0),l=T(!1),s=T({}),i=T(!1),c=T(""),p=T(!1),m=T(""),_=T(null),g=T(!1),y=T(!1),v=je.get("app_config.isProActive"),C=()=>{a.value=!0,ce.get("settings/pdf-templates/receipt").then(F=>{s.value=F.templates||{},l.value=F.has_fluent_pdf||!1,_.value=F.addon_info||null}).catch(F=>{var S;Y.error(((S=F.data)==null?void 0:S.message)||u("Failed to load templates"))}).finally(()=>{a.value=!1})},w=()=>{if(_.value){if(!v&&_.value.repo_link){window.open(_.value.repo_link,"_blank","noopener,noreferrer");return}g.value=!0,ce.post("settings/modules/plugin-addons/install",{plugin_slug:_.value.plugin_slug,source_type:_.value.source_type||"wordpress",source_link:_.value.source_link||"",asset_path:_.value.asset_path||""}).then(F=>{Y.success(F.message||u("Plugin installed successfully")),setTimeout(()=>{window.location.reload()},500)}).catch(F=>{var S;Y.error(((S=F.data)==null?void 0:S.message)||u("Failed to install plugin"))}).finally(()=>{g.value=!1})}},b=()=>{_.value&&(y.value=!0,ce.post("settings/modules/plugin-addons/activate",{plugin_file:_.value.plugin_file}).then(F=>{Y.success(F.message||u("Plugin activated successfully")),setTimeout(()=>{window.location.reload()},500)}).catch(F=>{var S;Y.error(((S=F.data)==null?void 0:S.message)||u("Failed to activate plugin"))}).finally(()=>{y.value=!1}))},x=()=>{c.value="",i.value=!0},$=()=>{if(!c.value.trim()){Y.error(u("Please enter a template name"));return}p.value=!0,ce.post("settings/pdf-templates/create",{title:c.value.trim()}).then(F=>{i.value=!1,Y.success(F.message||u("Template created")),F.slug?t.push({name:"edit-pdf-template",params:{template:F.slug}}):C()}).catch(F=>{var S;Y.error(((S=F.data)==null?void 0:S.message)||u("Failed to create template"))}).finally(()=>{p.value=!1})},M=F=>{m.value=F,ce.delete("settings/pdf-templates/delete/"+F).then(S=>{Y.success(S.message||u("Template deleted")),C()}).catch(S=>{var D;Y.error(((D=S.data)==null?void 0:D.message)||u("Failed to delete template"))}).finally(()=>{m.value=""})};return Ie(()=>{C()}),(F,S)=>{const D=B("el-button"),I=B("el-skeleton-item"),V=B("el-skeleton"),Q=B("el-popconfirm"),U=B("el-input"),O=B("el-form-item"),L=B("el-form"),P=B("el-dialog");return r(),h("div",z_,[n(Qa,{heading:A(u)("PDF Templates"),"show-save-button":!1},la({_:2},[l.value?{name:"action",fn:d(()=>[n(D,{type:"primary",size:"small",onClick:x},{default:d(()=>[R(f(A(u)("Add Template")),1)]),_:1})]),key:"0"}:void 0]),1032,["heading"]),o("div",q_,[n(Da),a.value?(r(),E(ke,{key:0},{default:d(()=>[n(Ce,null,{default:d(()=>[n(V,{animated:""},{template:d(()=>[n(I,{variant:"text",class:"w-[300px] mb-4"}),o("div",Y_,[n(I,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}}),n(I,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}})])]),_:1})]),_:1})]),_:1})):k("",!0),!a.value&&!l.value&&_.value?(r(),E(ke,{key:1},{default:d(()=>[n(Ce,null,{default:d(()=>[o("div",W_,[S[3]||(S[3]=o("svg",{class:"mb-4",width:"48",height:"48",viewBox:"0 0 32 32",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[o("path",{d:"M8 2C6.9 2 6 2.9 6 4v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10l-8-8H8z"}),o("path",{d:"M18 2v8h8"}),o("path",{d:"M12 18h8M12 22h6"})],-1)),o("h3",X_,f(A(u)("Fluent PDF Required")),1),o("p",J_,f(A(u)("To use PDF receipt templates, you need to install and activate the Fluent PDF plugin.")),1),_.value.is_installed?_.value.is_installed&&!_.value.is_active?(r(),E(D,{key:1,type:"success",loading:y.value,onClick:b},{default:d(()=>[R(f(A(u)("Activate Plugin")),1)]),_:1},8,["loading"])):k("",!0):(r(),E(D,{key:0,type:"primary",loading:g.value,onClick:w},{default:d(()=>[R(f(A(v)?A(u)("Install & Activate"):A(u)("Download")),1)]),_:1},8,["loading"]))])]),_:1})]),_:1})):k("",!0),!a.value&&l.value?(r(),E(ke,{key:2},{default:d(()=>[n(Ce,null,{default:d(()=>[o("p",Z_,f(A(u)("Customize PDF templates for email attachments. Select which template to attach in each email notification's settings.")),1),o("div",ev,[(r(!0),h(H,null,ae(s.value,(j,G)=>(r(),h("div",{key:G,class:"fct-pdf-template-card"},[o("div",tv,[o("div",av,[S[4]||(S[4]=o("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",stroke:"#525866","stroke-width":"1.2"},[o("path",{d:"M8 2C6.9 2 6 2.9 6 4v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10l-8-8H8z"}),o("path",{d:"M18 2v8h8"}),o("path",{d:"M12 18h8M12 22h6"})],-1)),o("span",lv,f(j.title||A(u)("Receipt Template")),1)]),o("div",sv,[n(D,{type:"primary",size:"small",tag:"router-link",to:{name:"edit-pdf-template",params:{template:G}}},{default:d(()=>[R(f(A(u)("Edit Template")),1)]),_:2},1032,["to"])])]),o("div",nv,[o("div",ov,[o("span",iv,f(j.title||G),1),j.is_default?(r(),h("span",rv,f(A(u)("Built-in")),1)):k("",!0)]),j.is_default?k("",!0):(r(),E(Q,{key:0,title:A(u)("Delete this template?"),"confirm-button-text":A(u)("Delete"),"cancel-button-text":A(u)("Cancel"),"confirm-button-type":"danger",onConfirm:q=>M(G)},{reference:d(()=>[n(D,{type:"danger",size:"small",text:"",loading:m.value===G,class:"fct-pdf-delete-btn"},{default:d(()=>S[5]||(S[5]=[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("path",{d:"M3 6h18"}),o("path",{d:"M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"})],-1)])),_:2,__:[5]},1032,["loading"])]),_:2},1032,["title","confirm-button-text","cancel-button-text","onConfirm"]))])]))),128))])]),_:1})]),_:1})):k("",!0)]),n(P,{modelValue:i.value,"onUpdate:modelValue":S[2]||(S[2]=j=>i.value=j),title:A(u)("Add Custom Template"),width:"420px","close-on-click-modal":!1,"append-to-body":!0},{footer:d(()=>[n(D,{onClick:S[1]||(S[1]=j=>i.value=!1)},{default:d(()=>[R(f(A(u)("Cancel")),1)]),_:1}),n(D,{type:"primary",onClick:$,loading:p.value},{default:d(()=>[R(f(A(u)("Create")),1)]),_:1},8,["loading"])]),default:d(()=>[n(L,{onSubmit:Ne($,["prevent"]),"label-position":"top"},{default:d(()=>[n(O,{label:A(u)("Template Name")},{default:d(()=>[n(U,{modelValue:c.value,"onUpdate:modelValue":S[0]||(S[0]=j=>c.value=j),placeholder:A(u)("e.g. Custom Invoice"),autofocus:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1},8,["modelValue","title"])])}}},uv={name:"EmailBodySkeleton",props:{showLoadingBadge:{type:Boolean,default:!1}}},cv={class:"fct-email-body-skeleton"},Av={class:"fct-email-body-skeleton__page"},pv={key:0,class:"fct-ebs__badge"},fv={class:"fct-ebs__badge-text"};function mv(e,t,a,l,s,i){return r(),h("div",cv,[o("div",Av,[t[3]||(t[3]=xn('
',9)),a.showLoadingBadge?(r(),h("div",pv,[t[0]||(t[0]=o("span",{class:"fct-ebs__dot"},null,-1)),t[1]||(t[1]=o("span",{class:"fct-ebs__dot"},null,-1)),t[2]||(t[2]=o("span",{class:"fct-ebs__dot"},null,-1)),o("span",fv,f(e.$t("Loading block editor…")),1)])):k("",!0)])])}const sr=at(uv,[["render",mv]]),hv={name:"NewEditorFrame",components:{EmailBodySkeleton:sr},props:{editorPath:{type:String,default:"/editor"},modelValue:{type:String,default:""},editorParams:{type:Object,default:()=>({})},frameHeight:{type:String,default:"500px"},documentTitle:{type:String,default:""}},emits:["update:modelValue","titleUpdated","contentUpdated","editorFullscreenToggle","featuredMediaUpdated","previewRequest","autosaveState"],data(){return{editorData:{content:""},editorFrame:null,editorOrigin:null,dataSent:!1,isFailing:!1,iframeReady:!1,pendingDataSend:!1,sendRetries:0,editorReadyReceived:!1,editorContentReady:!1,isFullscreen:!1,_timers:[]}},computed:{editorFailed(){return!this.dataSent&&this.isFailing&&!this.editorReadyReceived}},mounted(){this._setTimeout(()=>{this.editorReadyReceived||(this.isFailing=!0)},3e4),this.editorData.content=this.modelValue,this.editorData.title=this.documentTitle,this.createEditorIframe(),window.addEventListener("message",this.handleEditorMessage)},beforeUnmount(){this._timers.forEach(e=>clearTimeout(e)),this._timers=[],window.removeEventListener("message",this.handleEditorMessage),this.isFullscreen&&this.toggleFullScreen(!1),this.editorFrame&&(this.editorFrame.onload=null,this.$refs.iframeContainer.removeChild(this.editorFrame),this.editorFrame=null)},methods:{_setTimeout(e,t){const a=setTimeout(e,t);return this._timers.push(a),a},createEditorIframe(){this.editorFrame=document.createElement("iframe");let e=this.appVars.fct_editor_frame;if(this.editorParams){const t=new URLSearchParams(this.editorParams);e+="&"+t.toString()}try{this.editorOrigin=new URL(e,window.location.origin).origin}catch{this.editorOrigin=window.location.origin}this.editorFrame.src=e,this.editorFrame.style.width="100%",this.editorFrame.style.height=this.frameHeight,this.editorFrame.onload=()=>{this.iframeReady=!0,this.pendingDataSend&&(this.pendingDataSend=!1,this._setTimeout(()=>{this.sendDataToEditor()},1e3)),this._setTimeout(()=>{!this.editorReadyReceived&&this.iframeReady&&this.sendDataToEditor()},1e4)},this.$refs.iframeContainer.appendChild(this.editorFrame)},sendDataToEditor(){if(!this.iframeReady||!this.editorFrame||!this.editorFrame.contentWindow){this.pendingDataSend=!0;return}try{const e=JSON.parse(JSON.stringify(this.editorData));this.editorFrame.contentWindow.postMessage({action:"UPDATE_EDITOR",data:e},this.editorOrigin),this.dataSent=!0,this.sendRetries=0,this._setTimeout(()=>{this.editorContentReady||(this.editorContentReady=!0)},5e3)}catch{this.sendRetries++,this.sendRetries<=3&&this._setTimeout(()=>{this.sendDataToEditor()},500)}},handleEditorMessage(e){if(e&&e.origin&&this.editorOrigin&&e.origin!==this.editorOrigin)return;const{action:t,content:a}=e.data;t==="EDITOR_UPDATED"?this.dataSent&&(this.editorContentReady||this._setTimeout(()=>{this.editorContentReady=!0},1500),this.editorData.content=a,this.$emit("update:modelValue",a),this.$emit("contentUpdated",a)):t==="TITLE_UPDATED"?(this.editorData.title=a,this.$emit("titleUpdated",a)):t==="FEATURED_MEDIA_UPDATED"?this.$emit("featuredMediaUpdated",a):t==="EDITOR_FULLSCREEN_TOGGLE"?this.toggleFullScreen(a):t==="EMAIL_PREVIEW_REQUEST"?this.$emit("previewRequest"):t==="AUTOSAVE_STATE"?this.$emit("autosaveState",a):t==="EDITOR_READY"&&(this.editorReadyReceived=!0,this.isFailing=!1,this.sendDataToEditor())},forceAutosave(){this.editorFrame&&this.editorFrame.contentWindow&&this.editorFrame.contentWindow.postMessage({action:"FORCE_SAVE"},this.editorOrigin)},toggleFullScreen(e){this.isFullscreen=e;const t=this.editorFrame;if(e){if(document.documentElement.classList.add("fct-editor-fullscreen"),document.body.style.overflow="hidden",t){t.classList.add("fct-fullscreen-iframe"),this._fullscreenAncestors=[];let a=t.parentElement;for(;a&&a!==document.documentElement;)a.classList.add("fct-fullscreen-ancestor"),this._fullscreenAncestors.push(a),a=a.parentElement}}else document.documentElement.classList.remove("fct-editor-fullscreen"),document.body.style.overflow="",t&&t.classList.remove("fct-fullscreen-iframe"),this._fullscreenAncestors&&(this._fullscreenAncestors.forEach(function(a){a.classList.remove("fct-fullscreen-ancestor")}),this._fullscreenAncestors=null);this.$emit("editorFullscreenToggle",e)}}},_v={style:{width:"100%"}},vv={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},gv={class:"editor-container",style:{position:"relative"}},yv={key:0,class:"fct-editor-skeleton"},bv={ref:"iframeContainer",class:"iframe-container"};function wv(e,t,a,l,s,i){const c=B("EmailBodySkeleton");return r(),h("div",_v,[i.editorFailed?(r(),h("div",vv,[o("p",null,f(e.$t("Problem with loading the editor. Please reload the page.")),1)])):k("",!0),o("div",gv,[n(Gl,{name:"fct-skeleton-fade"},{default:d(()=>[s.editorContentReady?k("",!0):(r(),h("div",yv,[t[0]||(t[0]=o("div",{class:"fct-skel-menubar"},[o("div",{class:"fct-skel fct-skel-logo"}),o("div",{class:"fct-skel-slash"}),o("div",{class:"fct-skel fct-skel-name"}),o("div",{class:"fct-skel-spacer"}),o("div",{class:"fct-skel fct-skel-btn-wide"}),o("div",{class:"fct-skel-dot"}),o("div",{class:"fct-skel-dot"})],-1)),t[1]||(t[1]=o("div",{class:"fct-skel-toolbar"},[o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel-sep"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel-sep"}),o("div",{class:"fct-skel fct-skel-tb-wide"}),o("div",{class:"fct-skel fct-skel-tb-wide"}),o("div",{class:"fct-skel-sep"}),o("div",{class:"fct-skel fct-skel-tb-btn"})],-1)),n(c,{"show-loading-badge":!0})]))]),_:1}),o("div",bv,null,512)])])}const zc=at(hv,[["render",wv],["__scopeId","data-v-e5dae537"]]),Cv={class:"setting-wrap fct-pdf-template-edit-wrapper"},Bv={class:"capitalize"},kv={class:"setting-wrap-inner"},xv={class:"bg-white rounded dark:bg-dark-700 p-6 mb-4"},Sv={class:"setting-save-action"},Fv={__name:"PdfTemplateEdit",props:{template:{type:String,required:!0}},setup(e){const t=e,a=ll(),l=T(!0),s=T(!1),i=T(!1),c=T(!1),p=T(null),m=T(null),_=T(""),g=S=>{const D=atob(S),I=new Array(D.length);for(let V=0;V{const S=await ce.post("settings/pdf-templates/download",{template_id:t.template});if(!(S!=null&&S.pdf_base64))throw new Error(u("Failed to generate PDF"));return S},v=()=>{l.value=!0,ce.get("settings/pdf-templates/receipt/"+t.template).then(S=>{var I,V,Q;p.value=S.template;const D=(Q=(V=(I=S.template)==null?void 0:I.pdf_settings)==null?void 0:V[0])==null?void 0:Q.pdf_structure;D&&(_.value=D.content||"")}).catch(S=>{var D;Y.error(((D=S.data)==null?void 0:D.message)||u("Failed to load template"))}).finally(()=>{l.value=!1})},C=async({showSuccess:S=!0}={})=>{var I,V,Q,U;s.value=!0,m.value&&await m.value.forceAutosave();const D=((Q=(V=(I=p.value)==null?void 0:I.pdf_settings)==null?void 0:V[0])==null?void 0:Q.pdf_structure)||{};D.content=_.value;try{const O=await ce.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:D});return S&&Y.success(O.message||u("Template saved")),!0}catch(O){return Y.error(((U=O.data)==null?void 0:U.message)||u("Failed to save template")),!1}finally{s.value=!1}},w=()=>{i.value=!0,y().then(S=>{const D=g(S.pdf_base64),I=URL.createObjectURL(D),V=document.createElement("a");V.href=I,V.download=S.filename||"receipt-test.pdf",document.body.appendChild(V),V.click(),document.body.removeChild(V),URL.revokeObjectURL(I),Y.success(u("PDF downloaded"))}).catch(S=>{var D;Y.error(((D=S.data)==null?void 0:D.message)||S.message||u("Failed to generate PDF"))}).finally(()=>{i.value=!1})},b=async()=>{var S;c.value=!0;try{const D=await y(),I=g(D.pdf_base64),V=URL.createObjectURL(I),Q=document.createElement("a");Q.href=V,Q.target="_blank",Q.rel="noopener",document.body.appendChild(Q),Q.click(),document.body.removeChild(Q),setTimeout(()=>{URL.revokeObjectURL(V)},1e4)}catch(D){Y.error(((S=D.data)==null?void 0:S.message)||D.message||u("Failed to generate PDF"))}finally{c.value=!1}},x=async()=>{s.value||i.value||c.value||!await C({showSuccess:!1})||await b()},$=()=>p.value&&!p.value.is_default,M=()=>{ce.delete("settings/pdf-templates/delete/"+t.template).then(S=>{Y.success(S.message||u("Template deleted")),a.push({path:"/settings/pdf-template"})}).catch(S=>{var D;Y.error(((D=S.data)==null?void 0:D.message)||u("Failed to delete template"))})},F=()=>{ce.get("settings/pdf-templates/factory-default").then(S=>{var V,Q,U;const D=(V=S.templates)==null?void 0:V[t.template];if(!D)return;const I=((U=(Q=D.pdf_settings)==null?void 0:Q[0])==null?void 0:U.pdf_structure)||{};return ce.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:I}).then(()=>{Y.success(u("Reverted to default template")),v()})}).catch(S=>{var D;Y.error(((D=S.data)==null?void 0:D.message)||u("Failed to revert template"))})};return Ie(()=>{v()}),(S,D)=>{const I=B("el-breadcrumb-item"),V=B("el-breadcrumb"),Q=B("el-icon"),U=B("el-button"),O=B("el-dropdown-item"),L=B("el-dropdown-menu"),P=B("el-dropdown"),j=B("el-skeleton-item"),G=B("el-skeleton");return r(),h("div",Cv,[n(Qa,{loading:s.value,"loading-text":A(u)("Saving"),"save-button-text":A(u)("Save Template"),onOnSave:C},{heading:d(()=>[n(V,{class:"mb-0","separator-icon":A(dl)},{default:d(()=>[n(I,{to:{path:"/settings/pdf-template"}},{default:d(()=>[R(f(A(u)("PDF Templates")),1)]),_:1}),n(I,null,{default:d(()=>{var q;return[o("span",Bv,f(((q=p.value)==null?void 0:q.title)||A(u)("Edit Template")),1)]}),_:1})]),_:1},8,["separator-icon"])]),action:d(()=>[n(P,{trigger:"click",style:{"margin-left":"12px",display:"inline-flex","align-items":"center"},"popper-class":"fct-dropdown"},{dropdown:d(()=>[n(L,null,{default:d(()=>[n(O,{onClick:w,disabled:i.value},{default:d(()=>[R(f(i.value?A(u)("Downloading..."):A(u)("Test Download")),1)]),_:1},8,["disabled"]),n(O,{onClick:F},{default:d(()=>[R(f(A(u)("Revert to Default")),1)]),_:1}),$()?(r(),E(O,{key:0,divided:"",onClick:M,style:{color:"#F56C6C"}},{default:d(()=>[R(f(A(u)("Delete Template")),1)]),_:1})):k("",!0)]),_:1})]),default:d(()=>[n(U,{size:"small",text:"",style:{height:"auto",padding:"4px"}},{default:d(()=>[n(Q,{style:{transform:"rotate(90deg)","font-size":"16px"}},{default:d(()=>[n(A(Df))]),_:1})]),_:1})]),_:1})]),_:1},8,["loading","loading-text","save-button-text"]),o("div",kv,[n(Da),n(G,{loading:l.value,class:"bg-white rounded p-6 dark:bg-dark-700",animated:""},{template:d(()=>[n(j,{variant:"h3",class:"w-[200px] mb-5"}),n(j,{variant:"rect",style:{width:"100%",height:"500px"}})]),_:1},8,["loading"]),!l.value&&p.value?(r(),h(H,{key:0},[o("div",xv,[n(zc,{ref_key:"editorFrameRef",ref:m,editorParams:{block_type:"pdf_template",campaign_title:p.value.title,bid:t.template},frameHeight:"calc(100vh - 200px)",documentTitle:p.value.title||A(u)("Receipt Template"),onPreviewRequest:x,modelValue:_.value,"onUpdate:modelValue":D[0]||(D[0]=q=>_.value=q)},null,8,["editorParams","documentTitle","modelValue"])]),o("div",Sv,[n(U,{onClick:C,type:"primary",disabled:s.value,loading:s.value},{default:d(()=>[R(f(A(u)("Save Template")),1)]),_:1},8,["disabled","loading"]),n(U,{onClick:w,disabled:i.value,loading:i.value},{default:d(()=>[R(f(A(u)("Test Download")),1)]),_:1},8,["disabled","loading"])])],64)):k("",!0)])])}}},$v={class:"fluent-cart-admin-validation-error-wrapper `${fieldKey}`"},fl=Object.assign({name:"ValidationError"},{__name:"ValidationError",props:{validationErrors:Object,fieldKey:{type:String,default:""}},setup(e){return(t,a)=>(r(),h("div",$v,[(r(!0),h(H,null,ae(e.validationErrors,(l,s)=>(r(),h("span",{class:"fluent-cart-admin-validation-error",key:l.toLowerCase().replace(/\s/g,"")},f(l),1))),128))]))}}),_o={__name:"Alert",props:{type:String,title:String,description:String,closable:Boolean,showIcon:Boolean},setup(e){return(t,a)=>{const l=B("el-alert");return r(),E(l,{title:e.title,type:e.type,description:e.description,"show-icon":e.showIcon,closable:e.closable,role:"alert"},{default:d(()=>[ka(t.$slots,"default")]),_:3},8,["title","type","description","show-icon","closable"])}}},Ev={class:"setting-wrap"},Uv={class:"setting-wrap-inner"},Iv={class:"grid gap-3 mb-6"},Qv={class:"grid gap-3 mb-6"},Dv={class:"grid gap-3 mb-6"},Vv={class:"grid gap-3"},Tv={key:0,class:"mb-4 p-4 rounded-lg border border-yellow-300 bg-yellow-50 text-yellow-800 text-sm"},Mv=["href"],Lv={class:"form-note"},Rv={class:"form-note"},Ov=["href"],Hv={class:"mb-4"},Pv={class:"mb-4"},Nv={class:"form-note"},Kv={class:"form-note"},Gv={class:"form-note"},jv={class:"form-note"},zv={class:"setting-save-action"},qv={__name:"PdfTemplateSettings",setup(e){const t=T(!0),a=T(!1),l=T({}),s=T(!0),i=T(""),c=T({zugferd_enabled:"0",zugferd_profile:"en16931",seller_legal_registration_scheme:"",seller_contact_name:"",seller_contact_email:"",seller_contact_phone:"",seller_bank_iban:"",seller_bank_bic:"",seller_bank_account_name:"",seller_electronic_address:""}),p=[{label:"EN 16931 (ZUGFeRD)",value:"en16931"}],m=[{value:"",label:u("None")},{value:"0002",label:"0002 — SIRENE (France)"},{value:"0009",label:"0009 — SIRET (France)"},{value:"0021",label:"0021 — SWIFT"},{value:"0060",label:"0060 — DUNS"},{value:"0088",label:"0088 — EAN / GS1 GLN"},{value:"0096",label:"0096 — Danish P number"},{value:"0130",label:"0130 — EU Directorates"},{value:"0183",label:"0183 — Swiss UID"},{value:"0184",label:"0184 — Danish CVR"},{value:"0190",label:"0190 — Dutch OIN"},{value:"0191",label:"0191 — Dutch KvK"},{value:"0192",label:"0192 — Dutch Organisation ID"},{value:"0195",label:"0195 — Singapore UEN"},{value:"0196",label:"0196 — Icelandic kennitala"},{value:"0198",label:"0198 — Danish SE"},{value:"0199",label:"0199 — LEI"},{value:"0200",label:"0200 — Lithuanian legal entity"},{value:"0204",label:"0204 — German Leitweg-ID"},{value:"0208",label:"0208 — Belgian CBE / KBO"},{value:"0210",label:"0210 — Italian Codice Fiscale"},{value:"0211",label:"0211 — Italian Partita IVA"},{value:"0213",label:"0213 — Finnish OVT"}];fs().onSave(()=>{y()});const g=()=>{t.value=!0,ce.get("settings/pdf-templates/seller-details").then(v=>{v.seller_details&&Object.keys(c.value).forEach(C=>{v.seller_details[C]!==void 0&&(c.value[C]=v.seller_details[C])}),s.value=v.store_country_set!==!1,i.value=v.store_settings_url||""}).catch(v=>{var C;Y.error(((C=v.data)==null?void 0:C.message)||u("Failed to load settings"))}).finally(()=>{t.value=!1})},y=()=>{a.value=!0,l.value={},ce.post("settings/pdf-templates/seller-details",c.value).then(v=>{Y.success(v.message||u("Settings saved"))}).catch(v=>{var C,w;v.status_code===422&&((C=v.data)!=null&&C.data)&&(l.value=v.data.data),Y.error(((w=v.data)==null?void 0:w.message)||u("Failed to save settings"))}).finally(()=>{a.value=!1})};return Ie(()=>{g()}),(v,C)=>{const w=B("el-skeleton-item"),b=B("el-skeleton"),x=B("el-switch"),$=B("el-option"),M=B("el-select"),F=B("el-form-item"),S=B("el-col"),D=B("el-row"),I=B("el-input"),V=B("el-divider"),Q=B("el-button");return r(),h("div",Ev,[n(Qa,{heading:A(u)("E-Invoice Settings"),loading:a.value,onOnSave:y},null,8,["heading","loading"]),o("div",Uv,[n(Da),t.value?(r(),E(ke,{key:0},{default:d(()=>[n(Ce,null,{default:d(()=>[n(b,{animated:""},{template:d(()=>[o("div",Iv,[n(w,{variant:"p",class:"w-[20%]"}),n(w,{variant:"p"})]),o("div",Qv,[n(w,{variant:"p",class:"w-[20%]"}),n(w,{variant:"p"})]),o("div",Dv,[n(w,{variant:"p",class:"w-[20%]"}),n(w,{variant:"p"})]),o("div",Vv,[n(w,{variant:"p",class:"w-[20%]"}),n(w,{variant:"p"})])]),_:1})]),_:1})]),_:1})):k("",!0),t.value?k("",!0):(r(),h(H,{key:1},[c.value.zugferd_enabled==="1"&&!s.value?(r(),h("div",Tv,[o("strong",null,f(A(u)("Store country is not configured.")),1),R(" "+f(A(u)("ZUGFeRD XML cannot be embedded in PDFs until your store country is set."))+" ",1),i.value?(r(),h("a",{key:0,href:i.value,class:"underline ml-1"},f(A(u)("Go to Store Settings")),9,Mv)):k("",!0)])):k("",!0),n(ke,null,{default:d(()=>[n(Qe,{title:A(u)("E-Invoice Configuration"),text:A(u)("Configure ZUGFeRD / Factur-X e-invoice encoding and seller details for your PDFs."),border_bottom:""},{action:d(()=>[n(x,{modelValue:c.value.zugferd_enabled,"onUpdate:modelValue":C[0]||(C[0]=U=>c.value.zugferd_enabled=U),"active-value":"1","inactive-value":"0"},null,8,["modelValue"])]),_:1},8,["title","text"]),n(Ce,null,{default:d(()=>[n(D,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("ZUGFeRD Profile"),"label-position":"top"},{default:d(()=>[n(M,{modelValue:c.value.zugferd_profile,"onUpdate:modelValue":C[1]||(C[1]=U=>c.value.zugferd_profile=U)},{default:d(()=>[(r(),h(H,null,ae(p,U=>n($,{key:U.value,label:U.label,value:U.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),o("div",Lv,[o("p",null,f(A(u)("Select the e-invoice formatter used when generating the embedded XML.")),1)])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Legal Registration Scheme"),"label-position":"top"},{default:d(()=>[n(M,{modelValue:c.value.seller_legal_registration_scheme,"onUpdate:modelValue":C[2]||(C[2]=U=>c.value.seller_legal_registration_scheme=U),placeholder:A(u)("Select scheme"),clearable:"",filterable:""},{default:d(()=>[(r(),h(H,null,ae(m,U=>n($,{key:U.value,label:U.label,value:U.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","placeholder"]),o("div",Rv,[o("p",null,f(A(u)("ISO 6523 ICD code for the legal registration identifier")),1)]),n(fl,{"validation-errors":l.value.seller_legal_registration_scheme||{},"field-key":"seller_legal_registration_scheme"},null,8,["validation-errors"])]),_:1},8,["label"])]),_:1})]),_:1}),n(_o,{type:"info",closable:!1,"show-icon":"",class:"mb-4"},{default:d(()=>[R(f(A(u)("Company Name, VAT ID, Tax ID, and Legal Registration ID are managed in"))+" ",1),i.value?(r(),h("a",{key:0,href:i.value,target:"_blank",class:""},f(A(u)("Store Settings → Business Details")),9,Ov)):k("",!0)]),_:1}),o("h4",Hv,f(A(u)("Seller Contact")),1),n(D,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Contact Name"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_contact_name,"onUpdate:modelValue":C[3]||(C[3]=U=>c.value.seller_contact_name=U)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Contact Email"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_contact_email,"onUpdate:modelValue":C[4]||(C[4]=U=>c.value.seller_contact_email=U),type:"email"},null,8,["modelValue"]),n(fl,{"validation-errors":l.value.seller_contact_email||{},"field-key":"seller_contact_email"},null,8,["validation-errors"])]),_:1},8,["label"])]),_:1})]),_:1}),n(D,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Contact Phone"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_contact_phone,"onUpdate:modelValue":C[5]||(C[5]=U=>c.value.seller_contact_phone=U)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),n(V),o("h4",Pv,f(A(u)("Seller Bank Details")),1),n(D,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Bank IBAN"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_bank_iban,"onUpdate:modelValue":C[6]||(C[6]=U=>c.value.seller_bank_iban=U)},null,8,["modelValue"]),n(fl,{"validation-errors":l.value.seller_bank_iban||{},"field-key":"seller_bank_iban"},null,8,["validation-errors"]),o("div",Nv,[o("p",null,f(A(u)("International Bank Account Number")),1)])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Bank BIC"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_bank_bic,"onUpdate:modelValue":C[7]||(C[7]=U=>c.value.seller_bank_bic=U)},null,8,["modelValue"]),o("div",Kv,[o("p",null,f(A(u)("Bank Identifier Code (SWIFT)")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),n(D,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Bank Account Name"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_bank_account_name,"onUpdate:modelValue":C[8]||(C[8]=U=>c.value.seller_bank_account_name=U)},null,8,["modelValue"]),o("div",Gv,[o("p",null,f(A(u)("Name of the bank account holder")),1)])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(F,{label:A(u)("Electronic Address"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_electronic_address,"onUpdate:modelValue":C[9]||(C[9]=U=>c.value.seller_electronic_address=U)},null,8,["modelValue"]),o("div",jv,[o("p",null,f(A(u)("Electronic address for receiving e-invoices (e.g. PEPPOL ID)")),1)])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1}),o("div",zv,[n(Q,{type:"primary",onClick:C[10]||(C[10]=U=>y()),loading:a.value},{default:d(()=>[R(f(A(u)("Save Settings")),1)]),_:1},8,["loading"])])],64))])])}}},Yv={name:"CustomersRoute"},Wv={class:"fca_customers_route"};function Xv(e,t,a,l,s,i){const c=B("router-view");return r(),h("div",Wv,[n(c)])}const Jv=at(Yv,[["render",Xv]]);/*! * html2canvas 1.4.1 * Copyright (c) 2022 Niklas von Hertzen * Released under MIT License *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var nr=function(e,t){return nr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(a[s]=l[s])},nr(e,t)};function Ul(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nr(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}var or=function(){return or=Object.assign||function(t){for(var a,l=1,s=arguments.length;l0&&i[i.length-1])&&(_[0]===6||_[0]===2)){a=0;continue}if(_[0]===3&&(!i||_[1]>i[0]&&_[1]=55296&&s<=56319&&a>10)+55296,c%1024+56320)),(s+1===a||l.length>16384)&&(i+=String.fromCharCode.apply(String,l),l.length=0)}return i},Qd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eg=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Pn=0;Pn"u"?[]:new Uint8Array(256);for(var Nn=0;Nn>4,g[s++]=(c&15)<<4|p>>2,g[s++]=(p&3)<<6|m&63;return _},ag=function(e){for(var t=e.length,a=[],l=0;l>Cs,ng=1<>Cs,ig=qc+og,rg=ig,dg=32,ug=rg+dg,cg=65536>>ld,Ag=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>Cs],a=(a<>Cs)],a=(a<>ld),a=this.index[a],a+=t>>Cs&pg,a=this.index[a],a=(a<"u"?[]:new Uint8Array(256);for(var Kn=0;KnMd?(s.push(!0),p-=Md):s.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return l.push(c),a.push(dr);if(p===yg||p===ir){if(c===0)return l.push(c),a.push(ys);var m=a[c-1];return Fg.indexOf(m)===-1?(l.push(l[c-1]),a.push(m)):(l.push(c),a.push(ys))}if(l.push(c),p===kg)return a.push(t==="strict"?ur:En);if(p===Jc||p===Bg)return a.push(ys);if(p===xg)return i>=131072&&i<=196605||i>=196608&&i<=262141?a.push(En):a.push(ys);a.push(p)}),[l,a,s]},xi=function(e,t,a,l){var s=l[a];if(Array.isArray(e)?e.indexOf(s)!==-1:e===s)for(var i=a;i<=l.length;){i++;var c=l[i];if(c===t)return!0;if(c!==ss)break}if(s===ss)for(var i=a;i>0;){i--;var p=l[i];if(Array.isArray(e)?e.indexOf(p)!==-1:e===p)for(var m=a;m<=l.length;){m++;var c=l[m];if(c===t)return!0;if(c!==ss)break}if(p!==ss)break}return!1},Kd=function(e,t){for(var a=e;a>=0;){var l=t[a];if(l===ss)a--;else return l}return 0},Ug=function(e,t,a,l,s){if(a[l]===0)return Pt;var i=l-1;if(Array.isArray(s)&&s[i]===!0)return Pt;var c=i-1,p=i+1,m=t[i],_=c>=0?t[c]:0,g=t[p];if(m===Yc&&g===Wc)return Pt;if(hr.indexOf(m)!==-1)return Zc;if(hr.indexOf(g)!==-1||eA.indexOf(g)!==-1)return Pt;if(Kd(i,t)===Xc)return qn;if(mr.get(e[i])===ir||(m===jn||m===zn)&&mr.get(e[p])===ir||m===Ld||g===Ld||m===Rd||[ss,rr,pn].indexOf(m)===-1&&g===Rd||[Gn,rn,Cg,Ds,Vs].indexOf(g)!==-1||Kd(i,t)===dn||xi(Bi,dn,i,t)||xi([Gn,rn],ur,i,t)||xi(Od,Od,i,t))return Pt;if(m===ss)return qn;if(m===Bi||g===Bi)return Pt;if(g===dr||m===dr)return qn;if([rr,pn,ur].indexOf(g)!==-1||m===wg||_===pr&&$g.indexOf(m)!==-1||m===Vs&&g===pr||g===Hd||Nl.indexOf(g)!==-1&&m===cl||Nl.indexOf(m)!==-1&&g===cl||m===mn&&[En,jn,zn].indexOf(g)!==-1||[En,jn,zn].indexOf(m)!==-1&&g===fn||Nl.indexOf(m)!==-1&&Pd.indexOf(g)!==-1||Pd.indexOf(m)!==-1&&Nl.indexOf(g)!==-1||[mn,fn].indexOf(m)!==-1&&(g===cl||[dn,pn].indexOf(g)!==-1&&t[p+1]===cl)||[dn,pn].indexOf(m)!==-1&&g===cl||m===cl&&[cl,Vs,Ds].indexOf(g)!==-1)return Pt;if([cl,Vs,Ds,Gn,rn].indexOf(g)!==-1)for(var y=i;y>=0;){var v=t[y];if(v===cl)return Pt;if([Vs,Ds].indexOf(v)!==-1)y--;else break}if([mn,fn].indexOf(g)!==-1)for(var y=[Gn,rn].indexOf(m)!==-1?c:i;y>=0;){var v=t[y];if(v===cl)return Pt;if([Vs,Ds].indexOf(v)!==-1)y--;else break}if(fr===m&&[fr,vo,cr,Ar].indexOf(g)!==-1||[vo,cr].indexOf(m)!==-1&&[vo,go].indexOf(g)!==-1||[go,Ar].indexOf(m)!==-1&&g===go||Nd.indexOf(m)!==-1&&[Hd,fn].indexOf(g)!==-1||Nd.indexOf(g)!==-1&&m===mn||Nl.indexOf(m)!==-1&&Nl.indexOf(g)!==-1||m===Ds&&Nl.indexOf(g)!==-1||Nl.concat(cl).indexOf(m)!==-1&&g===dn&&Sg.indexOf(e[p])===-1||Nl.concat(cl).indexOf(g)!==-1&&m===rn)return Pt;if(m===ki&&g===ki){for(var C=a[i],w=1;C>0&&(C--,t[C]===ki);)w++;if(w%2!==0)return Pt}return m===jn&&g===zn?Pt:qn},Ig=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var a=Eg(e,t.lineBreak),l=a[0],s=a[1],i=a[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(s=s.map(function(p){return[cl,ys,Jc].indexOf(p)!==-1?En:p}));var c=t.wordBreak==="keep-all"?i.map(function(p,m){return p&&e[m]>=19968&&e[m]<=40959}):void 0;return[l,s,c]},Qg=function(){function e(t,a,l,s){this.codePoints=t,this.required=a===Zc,this.start=l,this.end=s}return e.prototype.slice=function(){return Ua.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Dg=function(e,t){var a=ni(e),l=Ig(a,t),s=l[0],i=l[1],c=l[2],p=a.length,m=0,_=0;return{next:function(){if(_>=p)return{done:!0,value:null};for(var g=Pt;_=tA&&e<=57},fy=function(e){return e>=55296&&e<=57343},Ts=function(e){return Xa(e)||e>=sA&&e<=oA||e>=aA&&e<=dy},my=function(e){return e>=aA&&e<=cy},hy=function(e){return e>=sA&&e<=py},_y=function(e){return my(e)||hy(e)},vy=function(e){return e>=Zg},Zn=function(e){return e===Fo||e===Mg||e===Lg},$o=function(e){return _y(e)||vy(e)||e===Pg},Yd=function(e){return $o(e)||Xa(e)||e===il},gy=function(e){return e>=ly&&e<=sy||e===ny||e>=oy&&e<=iy||e===ry},ls=function(e,t){return e!==yn?!1:t!==Fo},eo=function(e,t,a){return e===il?$o(t)||ls(t,a):$o(e)?!0:!!(e===yn&&ls(e,t))},Fi=function(e,t,a){return e===ws||e===il?Xa(t)?!0:t===Un&&Xa(a):Xa(e===Un?t:e)},yy=function(e){var t=0,a=1;(e[t]===ws||e[t]===il)&&(e[t]===il&&(a=-1),t++);for(var l=[];Xa(e[t]);)l.push(e[t++]);var s=l.length?parseInt(Ua.apply(void 0,l),10):0;e[t]===Un&&t++;for(var i=[];Xa(e[t]);)i.push(e[t++]);var c=i.length,p=c?parseInt(Ua.apply(void 0,i),10):0;(e[t]===nA||e[t]===lA)&&t++;var m=1;(e[t]===ws||e[t]===il)&&(e[t]===il&&(m=-1),t++);for(var _=[];Xa(e[t]);)_.push(e[t++]);var g=_.length?parseInt(Ua.apply(void 0,_),10):0;return a*(s+p*Math.pow(10,-c))*Math.pow(10,m*g)},by={type:2},wy={type:3},Cy={type:4},By={type:13},ky={type:8},xy={type:21},Sy={type:9},Fy={type:10},$y={type:11},Ey={type:12},Uy={type:14},to={type:23},Iy={type:1},Qy={type:25},Dy={type:24},Vy={type:26},Ty={type:27},My={type:28},Ly={type:29},Ry={type:31},_r={type:32},iA=function(){function e(){this._value=[]}return e.prototype.write=function(t){this._value=this._value.concat(ni(t))},e.prototype.read=function(){for(var t=[],a=this.consumeToken();a!==_r;)t.push(a),a=this.consumeToken();return t},e.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case Yn:return this.consumeStringToken(Yn);case Rg:var a=this.peekCodePoint(0),l=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Yd(a)||ls(l,s)){var i=eo(a,l,s)?Tg:Vg,c=this.consumeName();return{type:5,value:c,flags:i}}break;case Og:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),By;break;case Wn:return this.consumeStringToken(Wn);case Xn:return by;case cn:return wy;case Si:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),Uy;break;case ws:if(Fi(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case ey:return Cy;case il:var p=t,m=this.peekCodePoint(0),_=this.peekCodePoint(1);if(Fi(p,m,_))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(eo(p,m,_))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(m===il&&_===Gg)return this.consumeCodePoint(),this.consumeCodePoint(),Dy;break;case Un:if(Fi(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case jd:if(this.peekCodePoint(0)===Si)for(this.consumeCodePoint();;){var g=this.consumeCodePoint();if(g===Si&&(g=this.consumeCodePoint(),g===jd))return this.consumeToken();if(g===Dl)return this.consumeToken()}break;case ty:return Vy;case ay:return Ty;case Kg:if(this.peekCodePoint(0)===Ng&&this.peekCodePoint(1)===il&&this.peekCodePoint(2)===il)return this.consumeCodePoint(),this.consumeCodePoint(),Qy;break;case jg:var y=this.peekCodePoint(0),v=this.peekCodePoint(1),C=this.peekCodePoint(2);if(eo(y,v,C)){var c=this.consumeName();return{type:7,value:c}}break;case zg:return My;case yn:if(ls(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case qg:return Ly;case Yg:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),ky;break;case Wg:return $y;case Xg:return Ey;case uy:case Ay:var w=this.peekCodePoint(0),b=this.peekCodePoint(1);return w===ws&&(Ts(b)||b===Jn)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case zd:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),Sy;if(this.peekCodePoint(0)===zd)return this.consumeCodePoint(),xy;break;case Jg:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),Fy;break;case Dl:return _r}return Zn(t)?(this.consumeWhiteSpace(),Ry):Xa(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):$o(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:Ua(t)}},e.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},e.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},e.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},e.prototype.consumeUnicodeRangeToken=function(){for(var t=[],a=this.consumeCodePoint();Ts(a)&&t.length<6;)t.push(a),a=this.consumeCodePoint();for(var l=!1;a===Jn&&t.length<6;)t.push(a),a=this.consumeCodePoint(),l=!0;if(l){var s=parseInt(Ua.apply(void 0,t.map(function(m){return m===Jn?tA:m})),16),i=parseInt(Ua.apply(void 0,t.map(function(m){return m===Jn?oA:m})),16);return{type:30,start:s,end:i}}var c=parseInt(Ua.apply(void 0,t),16);if(this.peekCodePoint(0)===il&&Ts(this.peekCodePoint(1))){this.consumeCodePoint(),a=this.consumeCodePoint();for(var p=[];Ts(a)&&p.length<6;)p.push(a),a=this.consumeCodePoint();var i=parseInt(Ua.apply(void 0,p),16);return{type:30,start:c,end:i}}else return{type:30,start:c,end:c}},e.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===Xn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Xn?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},e.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dl)return{type:22,value:""};var a=this.peekCodePoint(0);if(a===Wn||a===Yn){var l=this.consumeStringToken(this.consumeCodePoint());return l.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dl||this.peekCodePoint(0)===cn)?(this.consumeCodePoint(),{type:22,value:l.value}):(this.consumeBadUrlRemnants(),to)}for(;;){var s=this.consumeCodePoint();if(s===Dl||s===cn)return{type:22,value:Ua.apply(void 0,t)};if(Zn(s))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Dl||this.peekCodePoint(0)===cn?(this.consumeCodePoint(),{type:22,value:Ua.apply(void 0,t)}):(this.consumeBadUrlRemnants(),to);if(s===Yn||s===Wn||s===Xn||gy(s))return this.consumeBadUrlRemnants(),to;if(s===yn)if(ls(s,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),to;else t.push(s)}},e.prototype.consumeWhiteSpace=function(){for(;Zn(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===cn||t===Dl)return;ls(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(t){for(var a=5e4,l="";t>0;){var s=Math.min(a,t);l+=Ua.apply(void 0,this._value.splice(0,s)),t-=s}return this._value.shift(),l},e.prototype.consumeStringToken=function(t){var a="",l=0;do{var s=this._value[l];if(s===Dl||s===void 0||s===t)return a+=this.consumeStringSlice(l),{type:0,value:a};if(s===Fo)return this._value.splice(0,l),Iy;if(s===yn){var i=this._value[l+1];i!==Dl&&i!==void 0&&(i===Fo?(a+=this.consumeStringSlice(l),l=-1,this._value.shift()):ls(s,i)&&(a+=this.consumeStringSlice(l),a+=Ua(this.consumeEscapedCodePoint()),l=-1))}l++}while(!0)},e.prototype.consumeNumber=function(){var t=[],a=Tn,l=this.peekCodePoint(0);for((l===ws||l===il)&&t.push(this.consumeCodePoint());Xa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());l=this.peekCodePoint(0);var s=this.peekCodePoint(1);if(l===Un&&Xa(s))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=Gd;Xa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());l=this.peekCodePoint(0),s=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((l===nA||l===lA)&&((s===ws||s===il)&&Xa(i)||Xa(s)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=Gd;Xa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[yy(t),a]},e.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),a=t[0],l=t[1],s=this.peekCodePoint(0),i=this.peekCodePoint(1),c=this.peekCodePoint(2);if(eo(s,i,c)){var p=this.consumeName();return{type:15,number:a,flags:l,unit:p}}return s===Hg?(this.consumeCodePoint(),{type:16,number:a,flags:l}):{type:17,number:a,flags:l}},e.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(Ts(t)){for(var a=Ua(t);Ts(this.peekCodePoint(0))&&a.length<6;)a+=Ua(this.consumeCodePoint());Zn(this.peekCodePoint(0))&&this.consumeCodePoint();var l=parseInt(a,16);return l===0||fy(l)||l>1114111?qd:l}return t===Dl?qd:t},e.prototype.consumeName=function(){for(var t="";;){var a=this.consumeCodePoint();if(Yd(a))t+=Ua(a);else if(ls(a,this.peekCodePoint(0)))t+=Ua(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(a),t}},e}(),rA=function(){function e(t){this._tokens=t}return e.create=function(t){var a=new iA;return a.write(t),new e(a.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var a=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return a;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var t=[];;){var a=this.consumeComponentValue();if(a.type===32)return t;t.push(a),t.push()}},e.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},e.prototype.consumeSimpleBlock=function(t){for(var a={type:t,values:[]},l=this.consumeToken();;){if(l.type===32||Hy(l,t))return a;this.reconsumeToken(l),a.values.push(this.consumeComponentValue()),l=this.consumeToken()}},e.prototype.consumeFunction=function(t){for(var a={name:t.value,values:[],type:18};;){var l=this.consumeToken();if(l.type===32||l.type===3)return a;this.reconsumeToken(l),a.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?_r:t},e.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},e}(),Mn=function(e){return e.type===15},ln=function(e){return e.type===17},ia=function(e){return e.type===20},Oy=function(e){return e.type===0},vr=function(e,t){return ia(e)&&e.value===t},dA=function(e){return e.type!==31},en=function(e){return e.type!==31&&e.type!==4},Ol=function(e){var t=[],a=[];return e.forEach(function(l){if(l.type===4){if(a.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(a),a=[];return}l.type!==31&&a.push(l)}),a.length&&t.push(a),t},Hy=function(e,t){return t===11&&e.type===12||t===28&&e.type===29?!0:t===2&&e.type===3},As=function(e){return e.type===17||e.type===15},Ta=function(e){return e.type===16||As(e)},uA=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},za={type:17,number:0,flags:Tn},sd={type:16,number:50,flags:Tn},ns={type:16,number:100,flags:Tn},hn=function(e,t,a){var l=e[0],s=e[1];return[ha(l,t),ha(typeof s<"u"?s:l,a)]},ha=function(e,t){if(e.type===16)return e.number/100*t;if(Mn(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},cA="deg",AA="grad",pA="rad",fA="turn",oi={name:"angle",parse:function(e,t){if(t.type===15)switch(t.unit){case cA:return Math.PI*t.number/180;case AA:return Math.PI/200*t.number;case pA:return t.number;case fA:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},mA=function(e){return e.type===15&&(e.unit===cA||e.unit===AA||e.unit===pA||e.unit===fA)},hA=function(e){var t=e.filter(ia).map(function(a){return a.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[za,za];case"to top":case"bottom":return Bl(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[za,ns];case"to right":case"left":return Bl(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ns,ns];case"to bottom":case"top":return Bl(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ns,za];case"to left":case"right":return Bl(270)}return 0},Bl=function(e){return Math.PI*e/180},ds={name:"color",parse:function(e,t){if(t.type===18){var a=Py[t.name];if(typeof a>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return a(e,t.values)}if(t.type===5){if(t.value.length===3){var l=t.value.substring(0,1),s=t.value.substring(1,2),i=t.value.substring(2,3);return os(parseInt(l+l,16),parseInt(s+s,16),parseInt(i+i,16),1)}if(t.value.length===4){var l=t.value.substring(0,1),s=t.value.substring(1,2),i=t.value.substring(2,3),c=t.value.substring(3,4);return os(parseInt(l+l,16),parseInt(s+s,16),parseInt(i+i,16),parseInt(c+c,16)/255)}if(t.value.length===6){var l=t.value.substring(0,2),s=t.value.substring(2,4),i=t.value.substring(4,6);return os(parseInt(l,16),parseInt(s,16),parseInt(i,16),1)}if(t.value.length===8){var l=t.value.substring(0,2),s=t.value.substring(2,4),i=t.value.substring(4,6),c=t.value.substring(6,8);return os(parseInt(l,16),parseInt(s,16),parseInt(i,16),parseInt(c,16)/255)}}if(t.type===20){var p=zl[t.value.toUpperCase()];if(typeof p<"u")return p}return zl.TRANSPARENT}},us=function(e){return(255&e)===0},Ha=function(e){var t=255&e,a=255&e>>8,l=255&e>>16,s=255&e>>24;return t<255?"rgba("+s+","+l+","+a+","+t/255+")":"rgb("+s+","+l+","+a+")"},os=function(e,t,a,l){return(e<<24|t<<16|a<<8|Math.round(l*255)<<0)>>>0},Wd=function(e,t){if(e.type===17)return e.number;if(e.type===16){var a=t===3?1:255;return t===3?e.number/100*a:Math.round(e.number/100*a)}return 0},Xd=function(e,t){var a=t.filter(en);if(a.length===3){var l=a.map(Wd),s=l[0],i=l[1],c=l[2];return os(s,i,c,1)}if(a.length===4){var p=a.map(Wd),s=p[0],i=p[1],c=p[2],m=p[3];return os(s,i,c,m)}return 0};function $i(e,t,a){return a<0&&(a+=1),a>=1&&(a-=1),a<1/6?(t-e)*a*6+e:a<1/2?t:a<2/3?(t-e)*6*(2/3-a)+e:e}var Jd=function(e,t){var a=t.filter(en),l=a[0],s=a[1],i=a[2],c=a[3],p=(l.type===17?Bl(l.number):oi.parse(e,l))/(Math.PI*2),m=Ta(s)?s.number/100:0,_=Ta(i)?i.number/100:0,g=typeof c<"u"&&Ta(c)?ha(c,1):1;if(m===0)return os(_*255,_*255,_*255,1);var y=_<=.5?_*(m+1):_+m-_*m,v=_*2-y,C=$i(v,y,p+1/3),w=$i(v,y,p),b=$i(v,y,p-1/3);return os(C*255,w*255,b*255,g)},Py={hsl:Jd,hsla:Jd,rgb:Xd,rgba:Xd},bn=function(e,t){return ds.parse(e,rA.create(t).parseComponentValue())},zl={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ny={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(ia(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ky={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ii=function(e,t){var a=ds.parse(e,t[0]),l=t[1];return l&&Ta(l)?{color:a,stop:l}:{color:a,stop:null}},Zd=function(e,t){var a=e[0],l=e[e.length-1];a.stop===null&&(a.stop=za),l.stop===null&&(l.stop=ns);for(var s=[],i=0,c=0;ci?s.push(m):s.push(i),i=m}else s.push(null)}for(var _=null,c=0;cc.optimumDistance)?{optimumCorner:p,optimumDistance:g}:c},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},zy=function(e,t,a,l,s){var i=0,c=0;switch(e.size){case 0:e.shape===0?i=c=Math.min(Math.abs(t),Math.abs(t-l),Math.abs(a),Math.abs(a-s)):e.shape===1&&(i=Math.min(Math.abs(t),Math.abs(t-l)),c=Math.min(Math.abs(a),Math.abs(a-s)));break;case 2:if(e.shape===0)i=c=Math.min(Fl(t,a),Fl(t,a-s),Fl(t-l,a),Fl(t-l,a-s));else if(e.shape===1){var p=Math.min(Math.abs(a),Math.abs(a-s))/Math.min(Math.abs(t),Math.abs(t-l)),m=eu(l,s,t,a,!0),_=m[0],g=m[1];i=Fl(_-t,(g-a)/p),c=p*i}break;case 1:e.shape===0?i=c=Math.max(Math.abs(t),Math.abs(t-l),Math.abs(a),Math.abs(a-s)):e.shape===1&&(i=Math.max(Math.abs(t),Math.abs(t-l)),c=Math.max(Math.abs(a),Math.abs(a-s)));break;case 3:if(e.shape===0)i=c=Math.max(Fl(t,a),Fl(t,a-s),Fl(t-l,a),Fl(t-l,a-s));else if(e.shape===1){var p=Math.max(Math.abs(a),Math.abs(a-s))/Math.max(Math.abs(t),Math.abs(t-l)),y=eu(l,s,t,a,!1),_=y[0],g=y[1];i=Fl(_-t,(g-a)/p),c=p*i}break}return Array.isArray(e.size)&&(i=ha(e.size[0],l),c=e.size.length===2?ha(e.size[1],s):i),[i,c]},qy=function(e,t){var a=Bl(180),l=[];return Ol(t).forEach(function(s,i){if(i===0){var c=s[0];if(c.type===20&&c.value==="to"){a=hA(s);return}else if(mA(c)){a=oi.parse(e,c);return}}var p=ii(e,s);l.push(p)}),{angle:a,stops:l,type:1}},ao=function(e,t){var a=Bl(180),l=[];return Ol(t).forEach(function(s,i){if(i===0){var c=s[0];if(c.type===20&&["top","left","right","bottom"].indexOf(c.value)!==-1){a=hA(s);return}else if(mA(c)){a=(oi.parse(e,c)+Bl(270))%Bl(360);return}}var p=ii(e,s);l.push(p)}),{angle:a,stops:l,type:1}},Yy=function(e,t){var a=Bl(180),l=[],s=1,i=0,c=3,p=[];return Ol(t).forEach(function(m,_){var g=m[0];if(_===0){if(ia(g)&&g.value==="linear"){s=1;return}else if(ia(g)&&g.value==="radial"){s=2;return}}if(g.type===18){if(g.name==="from"){var y=ds.parse(e,g.values[0]);l.push({stop:za,color:y})}else if(g.name==="to"){var y=ds.parse(e,g.values[0]);l.push({stop:ns,color:y})}else if(g.name==="color-stop"){var v=g.values.filter(en);if(v.length===2){var y=ds.parse(e,v[1]),C=v[0];ln(C)&&l.push({stop:{type:16,number:C.number*100,flags:C.flags},color:y})}}}}),s===1?{angle:(a+Bl(180))%Bl(360),stops:l,type:s}:{size:c,shape:i,stops:l,position:p,type:s}},_A="closest-side",vA="farthest-side",gA="closest-corner",yA="farthest-corner",bA="circle",wA="ellipse",CA="cover",BA="contain",Wy=function(e,t){var a=0,l=3,s=[],i=[];return Ol(t).forEach(function(c,p){var m=!0;if(p===0){var _=!1;m=c.reduce(function(y,v){if(_)if(ia(v))switch(v.value){case"center":return i.push(sd),y;case"top":case"left":return i.push(za),y;case"right":case"bottom":return i.push(ns),y}else(Ta(v)||As(v))&&i.push(v);else if(ia(v))switch(v.value){case bA:return a=0,!1;case wA:return a=1,!1;case"at":return _=!0,!1;case _A:return l=0,!1;case CA:case vA:return l=1,!1;case BA:case gA:return l=2,!1;case yA:return l=3,!1}else if(As(v)||Ta(v))return Array.isArray(l)||(l=[]),l.push(v),!1;return y},m)}if(m){var g=ii(e,c);s.push(g)}}),{size:l,shape:a,stops:s,position:i,type:2}},lo=function(e,t){var a=0,l=3,s=[],i=[];return Ol(t).forEach(function(c,p){var m=!0;if(p===0?m=c.reduce(function(g,y){if(ia(y))switch(y.value){case"center":return i.push(sd),!1;case"top":case"left":return i.push(za),!1;case"right":case"bottom":return i.push(ns),!1}else if(Ta(y)||As(y))return i.push(y),!1;return g},m):p===1&&(m=c.reduce(function(g,y){if(ia(y))switch(y.value){case bA:return a=0,!1;case wA:return a=1,!1;case BA:case _A:return l=0,!1;case vA:return l=1,!1;case gA:return l=2,!1;case CA:case yA:return l=3,!1}else if(As(y)||Ta(y))return Array.isArray(l)||(l=[]),l.push(y),!1;return g},m)),m){var _=ii(e,c);s.push(_)}}),{size:l,shape:a,stops:s,position:i,type:2}},Xy=function(e){return e.type===1},Jy=function(e){return e.type===2},nd={name:"image",parse:function(e,t){if(t.type===22){var a={url:t.value,type:0};return e.cache.addImage(t.value),a}if(t.type===18){var l=kA[t.name];if(typeof l>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return l(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function Zy(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!kA[e.name])}var kA={"linear-gradient":qy,"-moz-linear-gradient":ao,"-ms-linear-gradient":ao,"-o-linear-gradient":ao,"-webkit-linear-gradient":ao,"radial-gradient":Wy,"-moz-radial-gradient":lo,"-ms-radial-gradient":lo,"-o-radial-gradient":lo,"-webkit-radial-gradient":lo,"-webkit-gradient":Yy},e1={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var a=t[0];return a.type===20&&a.value==="none"?[]:t.filter(function(l){return en(l)&&Zy(l)}).map(function(l){return nd.parse(e,l)})}},t1={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(ia(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},a1={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return Ol(t).map(function(a){return a.filter(Ta)}).map(uA)}},l1={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return Ol(t).map(function(a){return a.filter(ia).map(function(l){return l.value}).join(" ")}).map(s1)}},s1=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Ys;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(Ys||(Ys={}));var n1={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return Ol(t).map(function(a){return a.filter(o1)})}},o1=function(e){return ia(e)||Ta(e)},ri=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},i1=ri("top"),r1=ri("right"),d1=ri("bottom"),u1=ri("left"),di=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(t,a){return uA(a.filter(Ta))}}},c1=di("top-left"),A1=di("top-right"),p1=di("bottom-right"),f1=di("bottom-left"),ui=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,a){switch(a){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},m1=ui("top"),h1=ui("right"),_1=ui("bottom"),v1=ui("left"),ci=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,a){return Mn(a)?a.number:0}}},g1=ci("top"),y1=ci("right"),b1=ci("bottom"),w1=ci("left"),C1={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},B1={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},k1={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(ia).reduce(function(a,l){return a|x1(l.value)},0)}},x1=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},S1={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},F1={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},Eo;(function(e){e.NORMAL="normal",e.STRICT="strict"})(Eo||(Eo={}));var $1={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"strict":return Eo.STRICT;case"normal":default:return Eo.NORMAL}}},E1={name:"line-height",initialValue:"normal",prefix:!1,type:4},tu=function(e,t){return ia(e)&&e.value==="normal"?1.2*t:e.type===17?t*e.number:Ta(e)?ha(e,t):t},U1={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value==="none"?null:nd.parse(e,t)}},I1={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},gr={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Ai=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Q1=Ai("top"),D1=Ai("right"),V1=Ai("bottom"),T1=Ai("left"),M1={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(ia).map(function(a){switch(a.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},L1={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},pi=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},R1=pi("top"),O1=pi("right"),H1=pi("bottom"),P1=pi("left"),N1={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},K1={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},G1={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.length===1&&vr(t[0],"none")?[]:Ol(t).map(function(a){for(var l={color:zl.TRANSPARENT,offsetX:za,offsetY:za,blur:za},s=0,i=0;i"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return a(t.values)}return null}},q1=function(e){var t=e.filter(function(a){return a.type===17}).map(function(a){return a.number});return t.length===6?t:null},Y1=function(e){var t=e.filter(function(m){return m.type===17}).map(function(m){return m.number}),a=t[0],l=t[1];t[2],t[3];var s=t[4],i=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var c=t[12],p=t[13];return t[14],t[15],t.length===16?[a,l,s,i,c,p]:null},W1={matrix:q1,matrix3d:Y1},au={type:16,number:50,flags:Tn},X1=[au,au],J1={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var a=t.filter(Ta);return a.length!==2?X1:[a[0],a[1]]}},Z1={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},wn;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(wn||(wn={}));var eb={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return wn.BREAK_ALL;case"keep-all":return wn.KEEP_ALL;case"normal":default:return wn.NORMAL}}},tb={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(t.type===20)return{auto:!0,order:0};if(ln(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},xA={name:"time",parse:function(e,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},ab={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return ln(t)?t.number:1}},lb={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},sb={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(ia).map(function(a){switch(a.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(a){return a!==0})}},nb={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var a=[],l=[];return t.forEach(function(s){switch(s.type){case 20:case 0:a.push(s.value);break;case 17:a.push(s.number.toString());break;case 4:l.push(a.join(" ")),a.length=0;break}}),a.length&&l.push(a.join(" ")),l.map(function(s){return s.indexOf(" ")===-1?s:"'"+s+"'"})}},ob={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ib={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){if(ln(t))return t.number;if(ia(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},rb={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(ia).map(function(a){return a.value})}},db={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},La=function(e,t){return(e&t)!==0},ub={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var a=t[0];return a.type===20&&a.value==="none"?[]:t}},cb={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(t.length===0)return null;var a=t[0];if(a.type===20&&a.value==="none")return null;for(var l=[],s=t.filter(dA),i=0;i1?1:0],this.overflowWrap=At(t,L1,a.overflowWrap),this.paddingTop=At(t,R1,a.paddingTop),this.paddingRight=At(t,O1,a.paddingRight),this.paddingBottom=At(t,H1,a.paddingBottom),this.paddingLeft=At(t,P1,a.paddingLeft),this.paintOrder=At(t,hb,a.paintOrder),this.position=At(t,K1,a.position),this.textAlign=At(t,N1,a.textAlign),this.textDecorationColor=At(t,lb,(l=a.textDecorationColor)!==null&&l!==void 0?l:a.color),this.textDecorationLine=At(t,sb,(s=a.textDecorationLine)!==null&&s!==void 0?s:a.textDecoration),this.textShadow=At(t,G1,a.textShadow),this.textTransform=At(t,j1,a.textTransform),this.transform=At(t,z1,a.transform),this.transformOrigin=At(t,J1,a.transformOrigin),this.visibility=At(t,Z1,a.visibility),this.webkitTextStrokeColor=At(t,_b,a.webkitTextStrokeColor),this.webkitTextStrokeWidth=At(t,vb,a.webkitTextStrokeWidth),this.wordBreak=At(t,eb,a.wordBreak),this.zIndex=At(t,tb,a.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return us(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return La(this.display,4)||La(this.display,33554432)||La(this.display,268435456)||La(this.display,536870912)||La(this.display,67108864)||La(this.display,134217728)},e}(),yb=function(){function e(t,a){this.content=At(t,ub,a.content),this.quotes=At(t,fb,a.quotes)}return e}(),su=function(){function e(t,a){this.counterIncrement=At(t,cb,a.counterIncrement),this.counterReset=At(t,Ab,a.counterReset)}return e}(),At=function(e,t,a){var l=new iA,s=a!==null&&typeof a<"u"?a.toString():t.initialValue;l.write(s);var i=new rA(l.read());switch(t.type){case 2:var c=i.parseComponentValue();return t.parse(e,ia(c)?c.value:t.initialValue);case 0:return t.parse(e,i.parseComponentValue());case 1:return t.parse(e,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(t.format){case"angle":return oi.parse(e,i.parseComponentValue());case"color":return ds.parse(e,i.parseComponentValue());case"image":return nd.parse(e,i.parseComponentValue());case"length":var p=i.parseComponentValue();return As(p)?p:za;case"length-percentage":var m=i.parseComponentValue();return Ta(m)?m:za;case"time":return xA.parse(e,i.parseComponentValue())}break}},bb="data-html2canvas-debug",wb=function(e){var t=e.getAttribute(bb);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},yr=function(e,t){var a=wb(e);return a===1||t===a},Hl=function(){function e(t,a){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,yr(a,3))debugger;this.styles=new gb(t,window.getComputedStyle(a,null)),Cr(a)&&(this.styles.animationDuration.some(function(l){return l>0})&&(a.style.animationDuration="0s"),this.styles.transform!==null&&(a.style.transform="none")),this.bounds=si(this.context,a),yr(a,4)&&(this.flags|=16)}return e}(),Cb="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",nu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_n=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var so=0;so>4,g[s++]=(c&15)<<4|p>>2,g[s++]=(p&3)<<6|m&63;return _},kb=function(e){for(var t=e.length,a=[],l=0;l>Bs,Fb=1<>Bs,Eb=SA+$b,Ub=Eb,Ib=32,Qb=Ub+Ib,Db=65536>>od,Vb=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>Bs],a=(a<>Bs)],a=(a<>od),a=this.index[a],a+=t>>Bs&Tb,a=this.index[a],a=(a<"u"?[]:new Uint8Array(256);for(var no=0;no=55296&&s<=56319&&a>10)+55296,c%1024+56320)),(s+1===a||l.length>16384)&&(i+=String.fromCharCode.apply(String,l),l.length=0)}return i},Gb=Lb(Cb),gl="×",Mi="÷",jb=function(e){return Gb.get(e)},zb=function(e,t,a){var l=a-2,s=t[l],i=t[a-1],c=t[a];if(i===Ii&&c===Qi)return gl;if(i===Ii||i===Qi||i===ru||c===Ii||c===Qi||c===ru)return Mi;if(i===uu&&[uu,Di,cu,Au].indexOf(c)!==-1||(i===cu||i===Di)&&(c===Di||c===Vi)||(i===Au||i===Vi)&&c===Vi||c===pu||c===du||c===Pb||i===Hb)return gl;if(i===pu&&c===fu){for(;s===du;)s=t[--l];if(s===fu)return gl}if(i===Ti&&c===Ti){for(var p=0;s===Ti;)p++,s=t[--l];if(p%2===0)return gl}return Mi},qb=function(e){var t=Nb(e),a=t.length,l=0,s=0,i=t.map(jb);return{next:function(){if(l>=a)return{done:!0,value:null};for(var c=gl;lc.x||g.y>c.y;return c=g,_===0?!0:y});return e.body.removeChild(t),p},Jb=function(){return typeof new Image().crossOrigin<"u"},Zb=function(){return typeof new XMLHttpRequest().responseType=="string"},e0=function(e){var t=new Image,a=e.createElement("canvas"),l=a.getContext("2d");if(!l)return!1;t.src="data:image/svg+xml,";try{l.drawImage(t,0,0),a.toDataURL()}catch{return!1}return!0},mu=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},t0=function(e){var t=e.createElement("canvas"),a=100;t.width=a,t.height=a;var l=t.getContext("2d");if(!l)return Promise.reject(!1);l.fillStyle="rgb(0, 255, 0)",l.fillRect(0,0,a,a);var s=new Image,i=t.toDataURL();s.src=i;var c=br(a,a,0,0,s);return l.fillStyle="red",l.fillRect(0,0,a,a),hu(c).then(function(p){l.drawImage(p,0,0);var m=l.getImageData(0,0,a,a).data;l.fillStyle="red",l.fillRect(0,0,a,a);var _=e.createElement("div");return _.style.backgroundImage="url("+i+")",_.style.height=a+"px",mu(m)?hu(br(a,a,0,0,_)):Promise.reject(!1)}).then(function(p){return l.drawImage(p,0,0),mu(l.getImageData(0,0,a,a).data)}).catch(function(){return!1})},br=function(e,t,a,l,s){var i="http://www.w3.org/2000/svg",c=document.createElementNS(i,"svg"),p=document.createElementNS(i,"foreignObject");return c.setAttributeNS(null,"width",e.toString()),c.setAttributeNS(null,"height",t.toString()),p.setAttributeNS(null,"width","100%"),p.setAttributeNS(null,"height","100%"),p.setAttributeNS(null,"x",a.toString()),p.setAttributeNS(null,"y",l.toString()),p.setAttributeNS(null,"externalResourcesRequired","true"),c.appendChild(p),p.appendChild(s),c},hu=function(e){return new Promise(function(t,a){var l=new Image;l.onload=function(){return t(l)},l.onerror=a,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},ja={get SUPPORT_RANGE_BOUNDS(){var e=Wb(document);return Object.defineProperty(ja,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=ja.SUPPORT_RANGE_BOUNDS&&Xb(document);return Object.defineProperty(ja,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=e0(document);return Object.defineProperty(ja,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?t0(document):Promise.resolve(!1);return Object.defineProperty(ja,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Jb();return Object.defineProperty(ja,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=Zb();return Object.defineProperty(ja,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ja,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(ja,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Cn=function(){function e(t,a){this.text=t,this.bounds=a}return e}(),a0=function(e,t,a,l){var s=n0(t,a),i=[],c=0;return s.forEach(function(p){if(a.textDecorationLine.length||p.trim().length>0)if(ja.SUPPORT_RANGE_BOUNDS){var m=_u(l,c,p.length).getClientRects();if(m.length>1){var _=id(p),g=0;_.forEach(function(v){i.push(new Cn(v,Xl.fromDOMRectList(e,_u(l,g+c,v.length).getClientRects()))),g+=v.length})}else i.push(new Cn(p,Xl.fromDOMRectList(e,m)))}else{var y=l.splitText(p.length);i.push(new Cn(p,l0(e,l))),l=y}else ja.SUPPORT_RANGE_BOUNDS||(l=l.splitText(p.length));c+=p.length}),i},l0=function(e,t){var a=t.ownerDocument;if(a){var l=a.createElement("html2canvaswrapper");l.appendChild(t.cloneNode(!0));var s=t.parentNode;if(s){s.replaceChild(l,t);var i=si(e,l);return l.firstChild&&s.replaceChild(l.firstChild,l),i}}return Xl.EMPTY},_u=function(e,t,a){var l=e.ownerDocument;if(!l)throw new Error("Node has no owner document");var s=l.createRange();return s.setStart(e,t),s.setEnd(e,t+a),s},id=function(e){if(ja.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map(function(a){return a.segment})}return Yb(e)},s0=function(e,t){if(ja.SUPPORT_NATIVE_TEXT_SEGMENTATION){var a=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(a.segment(e)).map(function(l){return l.segment})}return i0(e,t)},n0=function(e,t){return t.letterSpacing!==0?id(e):s0(e,t)},o0=[32,160,4961,65792,65793,4153,4241],i0=function(e,t){for(var a=Dg(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),l=[],s,i=function(){if(s.value){var c=s.value.slice(),p=ni(c),m="";p.forEach(function(_){o0.indexOf(_)===-1?m+=Ua(_):(m.length&&l.push(m),l.push(Ua(_)),m="")}),m.length&&l.push(m)}};!(s=a.next()).done;)i();return l},r0=function(){function e(t,a,l){this.text=d0(a.data,l.textTransform),this.textBounds=a0(t,this.text,l,a)}return e}(),d0=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(u0,c0);case 2:return e.toUpperCase();default:return e}},u0=/(^|\s|:|-|\(|\))([a-z])/g,c0=function(e,t,a){return e.length>0?t+a.toUpperCase():e},FA=function(e){Ul(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.src=l.currentSrc||l.src,s.intrinsicWidth=l.naturalWidth,s.intrinsicHeight=l.naturalHeight,s.context.cache.addImage(s.src),s}return t}(Hl),$A=function(e){Ul(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.canvas=l,s.intrinsicWidth=l.width,s.intrinsicHeight=l.height,s}return t}(Hl),EA=function(e){Ul(t,e);function t(a,l){var s=e.call(this,a,l)||this,i=new XMLSerializer,c=si(a,l);return l.setAttribute("width",c.width+"px"),l.setAttribute("height",c.height+"px"),s.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(l)),s.intrinsicWidth=l.width.baseVal.value,s.intrinsicHeight=l.height.baseVal.value,s.context.cache.addImage(s.svg),s}return t}(Hl),UA=function(e){Ul(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.value=l.value,s}return t}(Hl),wr=function(e){Ul(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.start=l.start,s.reversed=typeof l.reversed=="boolean"&&l.reversed===!0,s}return t}(Hl),A0=[{type:15,flags:0,unit:"px",number:3}],p0=[{type:16,flags:0,number:50}],f0=function(e){return e.width>e.height?new Xl(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width0)a.textNodes.push(new r0(e,s,a.styles));else if(js(s))if(HA(s)&&s.assignedNodes)s.assignedNodes().forEach(function(p){return yo(e,p,a,l)});else{var c=VA(e,s);c.styles.isVisible()&&(v0(s,c,l)?c.flags|=4:g0(c.styles)&&(c.flags|=2),_0.indexOf(s.tagName)!==-1&&(c.flags|=8),a.elements.push(c),s.slot,s.shadowRoot?yo(e,s.shadowRoot,c,l):!Qo(s)&&!LA(s)&&!Do(s)&&yo(e,s,c,l))}},VA=function(e,t){return Br(t)?new FA(e,t):RA(t)?new $A(e,t):LA(t)?new EA(e,t):y0(t)?new UA(e,t):b0(t)?new wr(e,t):w0(t)?new rd(e,t):Do(t)?new IA(e,t):Qo(t)?new QA(e,t):OA(t)?new DA(e,t):new Hl(e,t)},TA=function(e,t){var a=VA(e,t);return a.flags|=4,yo(e,t,a,a),a},v0=function(e,t,a){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||dd(e)&&a.styles.isTransparent()},g0=function(e){return e.isPositioned()||e.isFloating()},MA=function(e){return e.nodeType===Node.TEXT_NODE},js=function(e){return e.nodeType===Node.ELEMENT_NODE},Cr=function(e){return js(e)&&typeof e.style<"u"&&!bo(e)},bo=function(e){return typeof e.className=="object"},y0=function(e){return e.tagName==="LI"},b0=function(e){return e.tagName==="OL"},w0=function(e){return e.tagName==="INPUT"},C0=function(e){return e.tagName==="HTML"},LA=function(e){return e.tagName==="svg"},dd=function(e){return e.tagName==="BODY"},RA=function(e){return e.tagName==="CANVAS"},gu=function(e){return e.tagName==="VIDEO"},Br=function(e){return e.tagName==="IMG"},OA=function(e){return e.tagName==="IFRAME"},yu=function(e){return e.tagName==="STYLE"},B0=function(e){return e.tagName==="SCRIPT"},Qo=function(e){return e.tagName==="TEXTAREA"},Do=function(e){return e.tagName==="SELECT"},HA=function(e){return e.tagName==="SLOT"},bu=function(e){return e.tagName.indexOf("-")>0},k0=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(t){var a=this.counters[t];return a&&a.length?a[a.length-1]:1},e.prototype.getCounterValues=function(t){var a=this.counters[t];return a||[]},e.prototype.pop=function(t){var a=this;t.forEach(function(l){return a.counters[l].pop()})},e.prototype.parse=function(t){var a=this,l=t.counterIncrement,s=t.counterReset,i=!0;l!==null&&l.forEach(function(p){var m=a.counters[p.counter];m&&p.increment!==0&&(i=!1,m.length||m.push(1),m[Math.max(0,m.length-1)]+=p.increment)});var c=[];return i&&s.forEach(function(p){var m=a.counters[p.counter];c.push(p.counter),m||(m=a.counters[p.counter]=[]),m.push(p.reset)}),c},e}(),wu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Cu={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},x0={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},S0={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ms=function(e,t,a,l,s,i){return ea?In(e,s,i.length>0):l.integers.reduce(function(c,p,m){for(;e>=p;)e-=p,c+=l.values[m];return c},"")+i},PA=function(e,t,a,l){var s="";do a||e--,s=l(e)+s,e/=t;while(e*t>=t);return s},Ea=function(e,t,a,l,s){var i=a-t+1;return(e<0?"-":"")+(PA(Math.abs(e),i,l,function(c){return Ua(Math.floor(c%i)+t)})+s)},_s=function(e,t,a){a===void 0&&(a=". ");var l=t.length;return PA(Math.abs(e),l,!1,function(s){return t[Math.floor(s%l)]})+a},Hs=1,ts=2,as=4,vn=8,Kl=function(e,t,a,l,s,i){if(e<-9999||e>9999)return In(e,4,s.length>0);var c=Math.abs(e),p=s;if(c===0)return t[0]+p;for(var m=0;c>0&&m<=4;m++){var _=c%10;_===0&&La(i,Hs)&&p!==""?p=t[_]+p:_>1||_===1&&m===0||_===1&&m===1&&La(i,ts)||_===1&&m===1&&La(i,as)&&e>100||_===1&&m>1&&La(i,vn)?p=t[_]+(m>0?a[m-1]:"")+p:_===1&&m>0&&(p=a[m-1]+p),c=Math.floor(c/10)}return(e<0?l:"")+p},Bu="十百千萬",ku="拾佰仟萬",xu="マイナス",Li="마이너스",In=function(e,t,a){var l=a?". ":"",s=a?"、":"",i=a?", ":"",c=a?" ":"";switch(t){case 0:return"•"+c;case 1:return"◦"+c;case 2:return"◾"+c;case 5:var p=Ea(e,48,57,!0,l);return p.length<4?"0"+p:p;case 4:return _s(e,"〇一二三四五六七八九",s);case 6:return Ms(e,1,3999,wu,3,l).toLowerCase();case 7:return Ms(e,1,3999,wu,3,l);case 8:return Ea(e,945,969,!1,l);case 9:return Ea(e,97,122,!1,l);case 10:return Ea(e,65,90,!1,l);case 11:return Ea(e,1632,1641,!0,l);case 12:case 49:return Ms(e,1,9999,Cu,3,l);case 35:return Ms(e,1,9999,Cu,3,l).toLowerCase();case 13:return Ea(e,2534,2543,!0,l);case 14:case 30:return Ea(e,6112,6121,!0,l);case 15:return _s(e,"子丑寅卯辰巳午未申酉戌亥",s);case 16:return _s(e,"甲乙丙丁戊己庚辛壬癸",s);case 17:case 48:return Kl(e,"零一二三四五六七八九",Bu,"負",s,ts|as|vn);case 47:return Kl(e,"零壹貳參肆伍陸柒捌玖",ku,"負",s,Hs|ts|as|vn);case 42:return Kl(e,"零一二三四五六七八九",Bu,"负",s,ts|as|vn);case 41:return Kl(e,"零壹贰叁肆伍陆柒捌玖",ku,"负",s,Hs|ts|as|vn);case 26:return Kl(e,"〇一二三四五六七八九","十百千万",xu,s,0);case 25:return Kl(e,"零壱弐参四伍六七八九","拾百千万",xu,s,Hs|ts|as);case 31:return Kl(e,"영일이삼사오육칠팔구","십백천만",Li,i,Hs|ts|as);case 33:return Kl(e,"零一二三四五六七八九","十百千萬",Li,i,0);case 32:return Kl(e,"零壹貳參四五六七八九","拾百千",Li,i,Hs|ts|as);case 18:return Ea(e,2406,2415,!0,l);case 20:return Ms(e,1,19999,S0,3,l);case 21:return Ea(e,2790,2799,!0,l);case 22:return Ea(e,2662,2671,!0,l);case 22:return Ms(e,1,10999,x0,3,l);case 23:return _s(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return _s(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Ea(e,3302,3311,!0,l);case 28:return _s(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",s);case 29:return _s(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",s);case 34:return Ea(e,3792,3801,!0,l);case 37:return Ea(e,6160,6169,!0,l);case 38:return Ea(e,4160,4169,!0,l);case 39:return Ea(e,2918,2927,!0,l);case 40:return Ea(e,1776,1785,!0,l);case 43:return Ea(e,3046,3055,!0,l);case 44:return Ea(e,3174,3183,!0,l);case 45:return Ea(e,3664,3673,!0,l);case 46:return Ea(e,3872,3881,!0,l);case 3:default:return Ea(e,48,57,!0,l)}},NA="data-html2canvas-ignore",Su=function(){function e(t,a,l){if(this.context=t,this.options=l,this.scrolledElements=[],this.referenceElement=a,this.counters=new k0,this.quoteDepth=0,!a.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(a.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(t,a){var l=this,s=F0(t,a);if(!s.contentWindow)return Promise.reject("Unable to find iframe window");var i=t.defaultView.pageXOffset,c=t.defaultView.pageYOffset,p=s.contentWindow,m=p.document,_=U0(s).then(function(){return tl(l,void 0,void 0,function(){var g,y;return Ya(this,function(v){switch(v.label){case 0:return this.scrolledElements.forEach(V0),p&&(p.scrollTo(a.left,a.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(p.scrollY!==a.top||p.scrollX!==a.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(p.scrollX-a.left,p.scrollY-a.top,0,0))),g=this.options.onclone,y=this.clonedReferenceElement,typeof y>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:m.fonts&&m.fonts.ready?[4,m.fonts.ready]:[3,2];case 1:v.sent(),v.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,E0(m)]:[3,4];case 3:v.sent(),v.label=4;case 4:return typeof g=="function"?[2,Promise.resolve().then(function(){return g(m,y)}).then(function(){return s})]:[2,s]}})})});return m.open(),m.write(Q0(document.doctype)+""),D0(this.referenceElement.ownerDocument,i,c),m.replaceChild(m.adoptNode(this.documentElement),m.documentElement),m.close(),_},e.prototype.createElementClone=function(t){if(yr(t,2))debugger;if(RA(t))return this.createCanvasClone(t);if(gu(t))return this.createVideoClone(t);if(yu(t))return this.createStyleClone(t);var a=t.cloneNode(!1);return Br(a)&&(Br(t)&&t.currentSrc&&t.currentSrc!==t.src&&(a.src=t.currentSrc,a.srcset=""),a.loading==="lazy"&&(a.loading="eager")),bu(a)?this.createCustomElementClone(a):a},e.prototype.createCustomElementClone=function(t){var a=document.createElement("html2canvascustomelement");return Ri(t.style,a),a},e.prototype.createStyleClone=function(t){try{var a=t.sheet;if(a&&a.cssRules){var l=[].slice.call(a.cssRules,0).reduce(function(i,c){return c&&typeof c.cssText=="string"?i+c.cssText:i},""),s=t.cloneNode(!1);return s.textContent=l,s}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return t.cloneNode(!1)},e.prototype.createCanvasClone=function(t){var a;if(this.options.inlineImages&&t.ownerDocument){var l=t.ownerDocument.createElement("img");try{return l.src=t.toDataURL(),l}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var s=t.cloneNode(!1);try{s.width=t.width,s.height=t.height;var i=t.getContext("2d"),c=s.getContext("2d");if(c)if(!this.options.allowTaint&&i)c.putImageData(i.getImageData(0,0,t.width,t.height),0,0);else{var p=(a=t.getContext("webgl2"))!==null&&a!==void 0?a:t.getContext("webgl");if(p){var m=p.getContextAttributes();(m==null?void 0:m.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}c.drawImage(t,0,0)}return s}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return s},e.prototype.createVideoClone=function(t){var a=t.ownerDocument.createElement("canvas");a.width=t.offsetWidth,a.height=t.offsetHeight;var l=a.getContext("2d");try{return l&&(l.drawImage(t,0,0,a.width,a.height),this.options.allowTaint||l.getImageData(0,0,a.width,a.height)),a}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var s=t.ownerDocument.createElement("canvas");return s.width=t.offsetWidth,s.height=t.offsetHeight,s},e.prototype.appendChildNode=function(t,a,l){(!js(a)||!B0(a)&&!a.hasAttribute(NA)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(a)))&&(!this.options.copyStyles||!js(a)||!yu(a))&&t.appendChild(this.cloneNode(a,l))},e.prototype.cloneChildNodes=function(t,a,l){for(var s=this,i=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;i;i=i.nextSibling)if(js(i)&&HA(i)&&typeof i.assignedNodes=="function"){var c=i.assignedNodes();c.length&&c.forEach(function(p){return s.appendChildNode(a,p,l)})}else this.appendChildNode(a,i,l)},e.prototype.cloneNode=function(t,a){if(MA(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var l=t.ownerDocument.defaultView;if(l&&js(t)&&(Cr(t)||bo(t))){var s=this.createElementClone(t);s.style.transitionProperty="none";var i=l.getComputedStyle(t),c=l.getComputedStyle(t,":before"),p=l.getComputedStyle(t,":after");this.referenceElement===t&&Cr(s)&&(this.clonedReferenceElement=s),dd(s)&&L0(s);var m=this.counters.parse(new su(this.context,i)),_=this.resolvePseudoContent(t,s,c,Bn.BEFORE);bu(t)&&(a=!0),gu(t)||this.cloneChildNodes(t,s,a),_&&s.insertBefore(_,s.firstChild);var g=this.resolvePseudoContent(t,s,p,Bn.AFTER);return g&&s.appendChild(g),this.counters.pop(m),(i&&(this.options.copyStyles||bo(t))&&!OA(t)||a)&&Ri(i,s),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([s,t.scrollLeft,t.scrollTop]),(Qo(t)||Do(t))&&(Qo(s)||Do(s))&&(s.value=t.value),s}return t.cloneNode(!1)},e.prototype.resolvePseudoContent=function(t,a,l,s){var i=this;if(l){var c=l.content,p=a.ownerDocument;if(!(!p||!c||c==="none"||c==="-moz-alt-content"||l.display==="none")){this.counters.parse(new su(this.context,l));var m=new yb(this.context,l),_=p.createElement("html2canvaspseudoelement");Ri(l,_),m.content.forEach(function(y){if(y.type===0)_.appendChild(p.createTextNode(y.value));else if(y.type===22){var v=p.createElement("img");v.src=y.value,v.style.opacity="1",_.appendChild(v)}else if(y.type===18){if(y.name==="attr"){var C=y.values.filter(ia);C.length&&_.appendChild(p.createTextNode(t.getAttribute(C[0].value)||""))}else if(y.name==="counter"){var w=y.values.filter(en),b=w[0],x=w[1];if(b&&ia(b)){var $=i.counters.getCounterValue(b.value),M=x&&ia(x)?gr.parse(i.context,x.value):3;_.appendChild(p.createTextNode(In($,M,!1)))}}else if(y.name==="counters"){var F=y.values.filter(en),b=F[0],S=F[1],x=F[2];if(b&&ia(b)){var D=i.counters.getCounterValues(b.value),I=x&&ia(x)?gr.parse(i.context,x.value):3,V=S&&S.type===0?S.value:"",Q=D.map(function(L){return In(L,I,!1)}).join(V);_.appendChild(p.createTextNode(Q))}}}else if(y.type===20)switch(y.value){case"open-quote":_.appendChild(p.createTextNode(lu(m.quotes,i.quoteDepth++,!0)));break;case"close-quote":_.appendChild(p.createTextNode(lu(m.quotes,--i.quoteDepth,!1)));break;default:_.appendChild(p.createTextNode(y.value))}}),_.className=kr+" "+xr;var g=s===Bn.BEFORE?" "+kr:" "+xr;return bo(a)?a.className.baseValue+=g:a.className+=g,_}}},e.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},e}(),Bn;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(Bn||(Bn={}));var F0=function(e,t){var a=e.createElement("iframe");return a.className="html2canvas-container",a.style.visibility="hidden",a.style.position="fixed",a.style.left="-10000px",a.style.top="0px",a.style.border="0",a.width=t.width.toString(),a.height=t.height.toString(),a.scrolling="no",a.setAttribute(NA,"true"),e.body.appendChild(a),a},$0=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},E0=function(e){return Promise.all([].slice.call(e.images,0).map($0))},U0=function(e){return new Promise(function(t,a){var l=e.contentWindow;if(!l)return a("No window assigned for iframe");var s=l.document;l.onload=e.onload=function(){l.onload=e.onload=null;var i=setInterval(function(){s.body.childNodes.length>0&&s.readyState==="complete"&&(clearInterval(i),t(e))},50)}})},I0=["all","d","content"],Ri=function(e,t){for(var a=e.length-1;a>=0;a--){var l=e.item(a);I0.indexOf(l)===-1&&t.style.setProperty(l,e.getPropertyValue(l))}return t},Q0=function(e){var t="";return e&&(t+=""),t},D0=function(e,t,a){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||a!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,a)},V0=function(e){var t=e[0],a=e[1],l=e[2];t.scrollLeft=a,t.scrollTop=l},T0=":before",M0=":after",kr="___html2canvas___pseudoelement_before",xr="___html2canvas___pseudoelement_after",Fu=`{ content: "" !important; display: none !important; }`,L0=function(e){R0(e,"."+kr+T0+Fu+` .`+xr+M0+Fu)},R0=function(e,t){var a=e.ownerDocument;if(a){var l=a.createElement("style");l.textContent=t,e.appendChild(l)}},KA=function(){function e(){}return e.getOrigin=function(t){var a=e._link;return a?(a.href=t,a.href=a.href,a.protocol+a.hostname+a.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),O0=function(){function e(t,a){this.context=t,this._options=a,this._cache={}}return e.prototype.addImage=function(t){var a=Promise.resolve();return this.has(t)||(Hi(t)||K0(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),a},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return tl(this,void 0,void 0,function(){var a,l,s,i,c=this;return Ya(this,function(p){switch(p.label){case 0:return a=KA.isSameOrigin(t),l=!Oi(t)&&this._options.useCORS===!0&&ja.SUPPORT_CORS_IMAGES&&!a,s=!Oi(t)&&!a&&!Hi(t)&&typeof this._options.proxy=="string"&&ja.SUPPORT_CORS_XHR&&!l,!a&&this._options.allowTaint===!1&&!Oi(t)&&!Hi(t)&&!s&&!l?[2]:(i=t,s?[4,this.proxy(i)]:[3,2]);case 1:i=p.sent(),p.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(m,_){var g=new Image;g.onload=function(){return m(g)},g.onerror=_,(G0(i)||l)&&(g.crossOrigin="anonymous"),g.src=i,g.complete===!0&&setTimeout(function(){return m(g)},500),c._options.imageTimeout>0&&setTimeout(function(){return _("Timed out ("+c._options.imageTimeout+"ms) loading image")},c._options.imageTimeout)})];case 3:return[2,p.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var a=this,l=this._options.proxy;if(!l)throw new Error("No proxy defined");var s=t.substring(0,256);return new Promise(function(i,c){var p=ja.SUPPORT_RESPONSE_TYPE?"blob":"text",m=new XMLHttpRequest;m.onload=function(){if(m.status===200)if(p==="text")i(m.response);else{var y=new FileReader;y.addEventListener("load",function(){return i(y.result)},!1),y.addEventListener("error",function(v){return c(v)},!1),y.readAsDataURL(m.response)}else c("Failed to proxy resource "+s+" with status code "+m.status)},m.onerror=c;var _=l.indexOf("?")>-1?"&":"?";if(m.open("GET",""+l+_+"url="+encodeURIComponent(t)+"&responseType="+p),p!=="text"&&m instanceof XMLHttpRequest&&(m.responseType=p),a._options.imageTimeout){var g=a._options.imageTimeout;m.timeout=g,m.ontimeout=function(){return c("Timed out ("+g+"ms) proxying "+s)}}m.send()})},e}(),H0=/^data:image\/svg\+xml/i,P0=/^data:image\/.*;base64,/i,N0=/^data:image\/.*/i,K0=function(e){return ja.SUPPORT_SVG_DRAWING||!j0(e)},Oi=function(e){return N0.test(e)},G0=function(e){return P0.test(e)},Hi=function(e){return e.substr(0,4)==="blob"},j0=function(e){return e.substr(-3).toLowerCase()==="svg"||H0.test(e)},it=function(){function e(t,a){this.type=0,this.x=t,this.y=a}return e.prototype.add=function(t,a){return new e(this.x+t,this.y+a)},e}(),Ls=function(e,t,a){return new it(e.x+(t.x-e.x)*a,e.y+(t.y-e.y)*a)},oo=function(){function e(t,a,l,s){this.type=1,this.start=t,this.startControl=a,this.endControl=l,this.end=s}return e.prototype.subdivide=function(t,a){var l=Ls(this.start,this.startControl,t),s=Ls(this.startControl,this.endControl,t),i=Ls(this.endControl,this.end,t),c=Ls(l,s,t),p=Ls(s,i,t),m=Ls(c,p,t);return a?new e(this.start,l,c,m):new e(m,p,i,this.end)},e.prototype.add=function(t,a){return new e(this.start.add(t,a),this.startControl.add(t,a),this.endControl.add(t,a),this.end.add(t,a))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),wl=function(e){return e.type===1},z0=function(){function e(t){var a=t.styles,l=t.bounds,s=hn(a.borderTopLeftRadius,l.width,l.height),i=s[0],c=s[1],p=hn(a.borderTopRightRadius,l.width,l.height),m=p[0],_=p[1],g=hn(a.borderBottomRightRadius,l.width,l.height),y=g[0],v=g[1],C=hn(a.borderBottomLeftRadius,l.width,l.height),w=C[0],b=C[1],x=[];x.push((i+m)/l.width),x.push((w+y)/l.width),x.push((c+b)/l.height),x.push((_+v)/l.height);var $=Math.max.apply(Math,x);$>1&&(i/=$,c/=$,m/=$,_/=$,y/=$,v/=$,w/=$,b/=$);var M=l.width-m,F=l.height-v,S=l.width-y,D=l.height-b,I=a.borderTopWidth,V=a.borderRightWidth,Q=a.borderBottomWidth,U=a.borderLeftWidth,O=ha(a.paddingTop,t.bounds.width),L=ha(a.paddingRight,t.bounds.width),P=ha(a.paddingBottom,t.bounds.width),j=ha(a.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||c>0?wa(l.left+U/3,l.top+I/3,i-U/3,c-I/3,Jt.TOP_LEFT):new it(l.left+U/3,l.top+I/3),this.topRightBorderDoubleOuterBox=i>0||c>0?wa(l.left+M,l.top+I/3,m-V/3,_-I/3,Jt.TOP_RIGHT):new it(l.left+l.width-V/3,l.top+I/3),this.bottomRightBorderDoubleOuterBox=y>0||v>0?wa(l.left+S,l.top+F,y-V/3,v-Q/3,Jt.BOTTOM_RIGHT):new it(l.left+l.width-V/3,l.top+l.height-Q/3),this.bottomLeftBorderDoubleOuterBox=w>0||b>0?wa(l.left+U/3,l.top+D,w-U/3,b-Q/3,Jt.BOTTOM_LEFT):new it(l.left+U/3,l.top+l.height-Q/3),this.topLeftBorderDoubleInnerBox=i>0||c>0?wa(l.left+U*2/3,l.top+I*2/3,i-U*2/3,c-I*2/3,Jt.TOP_LEFT):new it(l.left+U*2/3,l.top+I*2/3),this.topRightBorderDoubleInnerBox=i>0||c>0?wa(l.left+M,l.top+I*2/3,m-V*2/3,_-I*2/3,Jt.TOP_RIGHT):new it(l.left+l.width-V*2/3,l.top+I*2/3),this.bottomRightBorderDoubleInnerBox=y>0||v>0?wa(l.left+S,l.top+F,y-V*2/3,v-Q*2/3,Jt.BOTTOM_RIGHT):new it(l.left+l.width-V*2/3,l.top+l.height-Q*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||b>0?wa(l.left+U*2/3,l.top+D,w-U*2/3,b-Q*2/3,Jt.BOTTOM_LEFT):new it(l.left+U*2/3,l.top+l.height-Q*2/3),this.topLeftBorderStroke=i>0||c>0?wa(l.left+U/2,l.top+I/2,i-U/2,c-I/2,Jt.TOP_LEFT):new it(l.left+U/2,l.top+I/2),this.topRightBorderStroke=i>0||c>0?wa(l.left+M,l.top+I/2,m-V/2,_-I/2,Jt.TOP_RIGHT):new it(l.left+l.width-V/2,l.top+I/2),this.bottomRightBorderStroke=y>0||v>0?wa(l.left+S,l.top+F,y-V/2,v-Q/2,Jt.BOTTOM_RIGHT):new it(l.left+l.width-V/2,l.top+l.height-Q/2),this.bottomLeftBorderStroke=w>0||b>0?wa(l.left+U/2,l.top+D,w-U/2,b-Q/2,Jt.BOTTOM_LEFT):new it(l.left+U/2,l.top+l.height-Q/2),this.topLeftBorderBox=i>0||c>0?wa(l.left,l.top,i,c,Jt.TOP_LEFT):new it(l.left,l.top),this.topRightBorderBox=m>0||_>0?wa(l.left+M,l.top,m,_,Jt.TOP_RIGHT):new it(l.left+l.width,l.top),this.bottomRightBorderBox=y>0||v>0?wa(l.left+S,l.top+F,y,v,Jt.BOTTOM_RIGHT):new it(l.left+l.width,l.top+l.height),this.bottomLeftBorderBox=w>0||b>0?wa(l.left,l.top+D,w,b,Jt.BOTTOM_LEFT):new it(l.left,l.top+l.height),this.topLeftPaddingBox=i>0||c>0?wa(l.left+U,l.top+I,Math.max(0,i-U),Math.max(0,c-I),Jt.TOP_LEFT):new it(l.left+U,l.top+I),this.topRightPaddingBox=m>0||_>0?wa(l.left+Math.min(M,l.width-V),l.top+I,M>l.width+V?0:Math.max(0,m-V),Math.max(0,_-I),Jt.TOP_RIGHT):new it(l.left+l.width-V,l.top+I),this.bottomRightPaddingBox=y>0||v>0?wa(l.left+Math.min(S,l.width-U),l.top+Math.min(F,l.height-Q),Math.max(0,y-V),Math.max(0,v-Q),Jt.BOTTOM_RIGHT):new it(l.left+l.width-V,l.top+l.height-Q),this.bottomLeftPaddingBox=w>0||b>0?wa(l.left+U,l.top+Math.min(D,l.height-Q),Math.max(0,w-U),Math.max(0,b-Q),Jt.BOTTOM_LEFT):new it(l.left+U,l.top+l.height-Q),this.topLeftContentBox=i>0||c>0?wa(l.left+U+j,l.top+I+O,Math.max(0,i-(U+j)),Math.max(0,c-(I+O)),Jt.TOP_LEFT):new it(l.left+U+j,l.top+I+O),this.topRightContentBox=m>0||_>0?wa(l.left+Math.min(M,l.width+U+j),l.top+I+O,M>l.width+U+j?0:m-U+j,_-(I+O),Jt.TOP_RIGHT):new it(l.left+l.width-(V+L),l.top+I+O),this.bottomRightContentBox=y>0||v>0?wa(l.left+Math.min(S,l.width-(U+j)),l.top+Math.min(F,l.height+I+O),Math.max(0,y-(V+L)),v-(Q+P),Jt.BOTTOM_RIGHT):new it(l.left+l.width-(V+L),l.top+l.height-(Q+P)),this.bottomLeftContentBox=w>0||b>0?wa(l.left+U+j,l.top+D,Math.max(0,w-(U+j)),b-(Q+P),Jt.BOTTOM_LEFT):new it(l.left+U+j,l.top+l.height-(Q+P))}return e}(),Jt;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Jt||(Jt={}));var wa=function(e,t,a,l,s){var i=4*((Math.sqrt(2)-1)/3),c=a*i,p=l*i,m=e+a,_=t+l;switch(s){case Jt.TOP_LEFT:return new oo(new it(e,_),new it(e,_-p),new it(m-c,t),new it(m,t));case Jt.TOP_RIGHT:return new oo(new it(e,t),new it(e+c,t),new it(m,_-p),new it(m,_));case Jt.BOTTOM_RIGHT:return new oo(new it(m,t),new it(m,t+p),new it(e+c,_),new it(e,_));case Jt.BOTTOM_LEFT:default:return new oo(new it(m,_),new it(m-c,_),new it(e,t+p),new it(e,t))}},Vo=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},q0=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},To=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Y0=function(){function e(t,a,l){this.offsetX=t,this.offsetY=a,this.matrix=l,this.type=0,this.target=6}return e}(),io=function(){function e(t,a){this.path=t,this.target=a,this.type=1}return e}(),W0=function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e}(),X0=function(e){return e.type===0},GA=function(e){return e.type===1},J0=function(e){return e.type===2},$u=function(e,t){return e.length===t.length?e.some(function(a,l){return a===t[l]}):!1},Z0=function(e,t,a,l,s){return e.map(function(i,c){switch(c){case 0:return i.add(t,a);case 1:return i.add(t+l,a);case 2:return i.add(t+l,a+s);case 3:return i.add(t,a+s)}return i})},jA=function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),zA=function(){function e(t,a){if(this.container=t,this.parent=a,this.effects=[],this.curves=new z0(this.container),this.container.styles.opacity<1&&this.effects.push(new W0(this.container.styles.opacity)),this.container.styles.transform!==null){var l=this.container.bounds.left+this.container.styles.transformOrigin[0].number,s=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Y0(l,s,i))}if(this.container.styles.overflowX!==0){var c=Vo(this.curves),p=To(this.curves);$u(c,p)?this.effects.push(new io(c,6)):(this.effects.push(new io(c,2)),this.effects.push(new io(p,4)))}}return e.prototype.getEffects=function(t){for(var a=[2,3].indexOf(this.container.styles.position)===-1,l=this.parent,s=this.effects.slice(0);l;){var i=l.effects.filter(function(m){return!GA(m)});if(a||l.container.styles.position!==0||!l.parent){if(s.unshift.apply(s,i),a=[2,3].indexOf(l.container.styles.position)===-1,l.container.styles.overflowX!==0){var c=Vo(l.curves),p=To(l.curves);$u(c,p)||s.unshift(new io(p,6))}}else s.unshift.apply(s,i);l=l.parent}return s.filter(function(m){return La(m.target,t)})},e}(),Sr=function(e,t,a,l){e.container.elements.forEach(function(s){var i=La(s.flags,4),c=La(s.flags,2),p=new zA(s,e);La(s.styles.display,2048)&&l.push(p);var m=La(s.flags,8)?[]:l;if(i||c){var _=i||s.styles.isPositioned()?a:t,g=new jA(p);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){var y=s.styles.zIndex.order;if(y<0){var v=0;_.negativeZIndex.some(function(w,b){return y>w.element.container.styles.zIndex.order?(v=b,!1):v>0}),_.negativeZIndex.splice(v,0,g)}else if(y>0){var C=0;_.positiveZIndex.some(function(w,b){return y>=w.element.container.styles.zIndex.order?(C=b+1,!1):C>0}),_.positiveZIndex.splice(C,0,g)}else _.zeroOrAutoZIndexOrTransformedOrOpacity.push(g)}else s.styles.isFloating()?_.nonPositionedFloats.push(g):_.nonPositionedInlineLevel.push(g);Sr(p,g,i?g:a,m)}else s.styles.isInlineLevel()?t.inlineLevel.push(p):t.nonInlineLevel.push(p),Sr(p,t,a,m);La(s.flags,8)&&qA(s,m)})},qA=function(e,t){for(var a=e instanceof wr?e.start:1,l=e instanceof wr?e.reversed:!1,s=0;s"u"?e[0]:a},iw=function(e,t,a,l,s){var i=t[0],c=t[1],p=a[0],m=a[1];switch(e){case 2:return[new it(Math.round(l.left),Math.round(l.top+c)),new it(Math.round(l.left+l.width),Math.round(l.top+c)),new it(Math.round(l.left+l.width),Math.round(m+l.top+c)),new it(Math.round(l.left),Math.round(m+l.top+c))];case 3:return[new it(Math.round(l.left+i),Math.round(l.top)),new it(Math.round(l.left+i+p),Math.round(l.top)),new it(Math.round(l.left+i+p),Math.round(l.height+l.top)),new it(Math.round(l.left+i),Math.round(l.height+l.top))];case 1:return[new it(Math.round(l.left+i),Math.round(l.top+c)),new it(Math.round(l.left+i+p),Math.round(l.top+c)),new it(Math.round(l.left+i+p),Math.round(l.top+c+m)),new it(Math.round(l.left+i),Math.round(l.top+c+m))];default:return[new it(Math.round(s.left),Math.round(s.top)),new it(Math.round(s.left+s.width),Math.round(s.top)),new it(Math.round(s.left+s.width),Math.round(s.height+s.top)),new it(Math.round(s.left),Math.round(s.height+s.top))]}},rw="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Uu="Hidden Text",dw=function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,a){var l=this._document.createElement("div"),s=this._document.createElement("img"),i=this._document.createElement("span"),c=this._document.body;l.style.visibility="hidden",l.style.fontFamily=t,l.style.fontSize=a,l.style.margin="0",l.style.padding="0",l.style.whiteSpace="nowrap",c.appendChild(l),s.src=rw,s.width=1,s.height=1,s.style.margin="0",s.style.padding="0",s.style.verticalAlign="baseline",i.style.fontFamily=t,i.style.fontSize=a,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(Uu)),l.appendChild(i),l.appendChild(s);var p=s.offsetTop-i.offsetTop+2;l.removeChild(i),l.appendChild(this._document.createTextNode(Uu)),l.style.lineHeight="normal",s.style.verticalAlign="super";var m=s.offsetTop-l.offsetTop+2;return c.removeChild(l),{baseline:p,middle:m}},e.prototype.getMetrics=function(t,a){var l=t+" "+a;return typeof this._data[l]>"u"&&(this._data[l]=this.parseMetrics(t,a)),this._data[l]},e}(),WA=function(){function e(t,a){this.context=t,this.options=a}return e}(),uw=1e4,cw=function(e){Ul(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s._activeEffects=[],s.canvas=l.canvas?l.canvas:document.createElement("canvas"),s.ctx=s.canvas.getContext("2d"),l.canvas||(s.canvas.width=Math.floor(l.width*l.scale),s.canvas.height=Math.floor(l.height*l.scale),s.canvas.style.width=l.width+"px",s.canvas.style.height=l.height+"px"),s.fontMetrics=new dw(document),s.ctx.scale(s.options.scale,s.options.scale),s.ctx.translate(-l.x,-l.y),s.ctx.textBaseline="bottom",s._activeEffects=[],s.context.logger.debug("Canvas renderer initialized ("+l.width+"x"+l.height+") with scale "+l.scale),s}return t.prototype.applyEffects=function(a){for(var l=this;this._activeEffects.length;)this.popEffect();a.forEach(function(s){return l.applyEffect(s)})},t.prototype.applyEffect=function(a){this.ctx.save(),J0(a)&&(this.ctx.globalAlpha=a.opacity),X0(a)&&(this.ctx.translate(a.offsetX,a.offsetY),this.ctx.transform(a.matrix[0],a.matrix[1],a.matrix[2],a.matrix[3],a.matrix[4],a.matrix[5]),this.ctx.translate(-a.offsetX,-a.offsetY)),GA(a)&&(this.path(a.path),this.ctx.clip()),this._activeEffects.push(a)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(a){return tl(this,void 0,void 0,function(){var l;return Ya(this,function(s){switch(s.label){case 0:return l=a.element.container.styles,l.isVisible()?[4,this.renderStackContent(a)]:[3,2];case 1:s.sent(),s.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(a){return tl(this,void 0,void 0,function(){return Ya(this,function(l){switch(l.label){case 0:if(La(a.container.flags,16))debugger;return a.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(a)]:[3,3];case 1:return l.sent(),[4,this.renderNodeContent(a)];case 2:l.sent(),l.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(a,l,s){var i=this;if(l===0)this.ctx.fillText(a.text,a.bounds.left,a.bounds.top+s);else{var c=id(a.text);c.reduce(function(p,m){return i.ctx.fillText(m,p,a.bounds.top+s),p+i.ctx.measureText(m).width},a.bounds.left)}},t.prototype.createFontStyle=function(a){var l=a.fontVariant.filter(function(c){return c==="normal"||c==="small-caps"}).join(""),s=hw(a.fontFamily).join(", "),i=Mn(a.fontSize)?""+a.fontSize.number+a.fontSize.unit:a.fontSize.number+"px";return[[a.fontStyle,l,a.fontWeight,i,s].join(" "),s,i]},t.prototype.renderTextNode=function(a,l){return tl(this,void 0,void 0,function(){var s,i,c,p,m,_,g,y,v=this;return Ya(this,function(C){return s=this.createFontStyle(l),i=s[0],c=s[1],p=s[2],this.ctx.font=i,this.ctx.direction=l.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",m=this.fontMetrics.getMetrics(c,p),_=m.baseline,g=m.middle,y=l.paintOrder,a.textBounds.forEach(function(w){y.forEach(function(b){switch(b){case 0:v.ctx.fillStyle=Ha(l.color),v.renderTextWithLetterSpacing(w,l.letterSpacing,_);var x=l.textShadow;x.length&&w.text.trim().length&&(x.slice(0).reverse().forEach(function($){v.ctx.shadowColor=Ha($.color),v.ctx.shadowOffsetX=$.offsetX.number*v.options.scale,v.ctx.shadowOffsetY=$.offsetY.number*v.options.scale,v.ctx.shadowBlur=$.blur.number,v.renderTextWithLetterSpacing(w,l.letterSpacing,_)}),v.ctx.shadowColor="",v.ctx.shadowOffsetX=0,v.ctx.shadowOffsetY=0,v.ctx.shadowBlur=0),l.textDecorationLine.length&&(v.ctx.fillStyle=Ha(l.textDecorationColor||l.color),l.textDecorationLine.forEach(function($){switch($){case 1:v.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+_),w.bounds.width,1);break;case 2:v.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:v.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+g),w.bounds.width,1);break}}));break;case 1:l.webkitTextStrokeWidth&&w.text.trim().length&&(v.ctx.strokeStyle=Ha(l.webkitTextStrokeColor),v.ctx.lineWidth=l.webkitTextStrokeWidth,v.ctx.lineJoin=window.chrome?"miter":"round",v.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+_)),v.ctx.strokeStyle="",v.ctx.lineWidth=0,v.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(a,l,s){if(s&&a.intrinsicWidth>0&&a.intrinsicHeight>0){var i=Mo(a),c=To(l);this.path(c),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,a.intrinsicWidth,a.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(a){return tl(this,void 0,void 0,function(){var l,s,i,c,p,m,M,M,_,g,y,v,S,C,w,D,b,x,$,M,F,S,D;return Ya(this,function(I){switch(I.label){case 0:this.applyEffects(a.getEffects(4)),l=a.container,s=a.curves,i=l.styles,c=0,p=l.textNodes,I.label=1;case 1:return c0&&G>0&&(Q=i.ctx.createPattern(D,"repeat"),i.renderRepeat(O,Q,Z,oe))):Jy(g)&&(U=Pi(a,l,[null,null,null]),O=U[0],L=U[1],P=U[2],j=U[3],G=U[4],q=g.position.length===0?[sd]:g.position,Z=ha(q[0],j),oe=ha(q[q.length-1],G),de=zy(g,Z,oe,j,G),K=de[0],z=de[1],K>0&&z>0&&(X=i.ctx.createRadialGradient(L+Z,P+oe,0,L+Z,P+oe,K),Zd(g.stops,K*2).forEach(function(se){return X.addColorStop(se.stop,Ha(se.color))}),i.path(O),i.ctx.fillStyle=X,K!==z?(W=a.bounds.left+.5*a.bounds.width,re=a.bounds.top+.5*a.bounds.height,ye=z/K,me=1/ye,i.ctx.save(),i.ctx.translate(W,re),i.ctx.transform(1,0,0,ye,0,0),i.ctx.translate(-W,-re),i.ctx.fillRect(L,me*(P-re)+re,j,G*me),i.ctx.restore()):i.ctx.fill())),ge.label=6;case 6:return l--,[2]}})},i=this,c=0,p=a.styles.backgroundImage.slice(0).reverse(),_.label=1;case 1:return c0?g.style!==2?[3,5]:[4,this.renderDashedDottedBorder(g.color,g.width,p,a.curves,2)]:[3,11]):[3,13];case 4:return v.sent(),[3,11];case 5:return g.style!==3?[3,7]:[4,this.renderDashedDottedBorder(g.color,g.width,p,a.curves,3)];case 6:return v.sent(),[3,11];case 7:return g.style!==4?[3,9]:[4,this.renderDoubleBorder(g.color,g.width,p,a.curves)];case 8:return v.sent(),[3,11];case 9:return[4,this.renderSolidBorder(g.color,p,a.curves)];case 10:v.sent(),v.label=11;case 11:p++,v.label=12;case 12:return m++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(a,l,s,i,c){return tl(this,void 0,void 0,function(){var p,m,_,g,y,v,C,w,b,x,$,M,F,S,D,I,D,I;return Ya(this,function(V){return this.ctx.save(),p=lw(i,s),m=Eu(i,s),c===2&&(this.path(m),this.ctx.clip()),wl(m[0])?(_=m[0].start.x,g=m[0].start.y):(_=m[0].x,g=m[0].y),wl(m[1])?(y=m[1].end.x,v=m[1].end.y):(y=m[1].x,v=m[1].y),s===0||s===2?C=Math.abs(_-y):C=Math.abs(g-v),this.ctx.beginPath(),c===3?this.formatPath(p):this.formatPath(m.slice(0,2)),w=l<3?l*3:l*2,b=l<3?l*2:l,c===3&&(w=l,b=l),x=!0,C<=w*2?x=!1:C<=w*2+b?($=C/(2*w+b),w*=$,b*=$):(M=Math.floor((C+b)/(w+b)),F=(C-M*w)/(M-1),S=(C-(M+1)*w)/M,b=S<=0||Math.abs(b-F){a.targetRef&&bw(a.targetRef,{useCORS:!0,scale:2,backgroundColor:null,scrollY:-window.scrollY}).then(s=>{const i=document.createElement("a");i.download="chart-screenshot.png",i.href=s.toDataURL(),i.click()})},a=e;return(l,s)=>(r(),E(Ze,{tag:"button",onClick:t,size:e.size,title:l.$t("Screenshot")},{default:d(()=>[n(J,{name:"Screenshot"})]),_:1},8,["size","title"]))}};var Ni={exports:{}};/** @license * * Colour Palette Generator script. * Copyright (c) 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may * obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * Furthermore, ColorBrewer colour schemes are covered by the following: * * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and * The Pennsylvania State University. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions as source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. The end-user documentation included with the redistribution, if any, * must include the following acknowledgment: "This product includes color * specifications and designs developed by Cynthia Brewer * (http://colorbrewer.org/)." Alternately, this acknowledgment may appear * in the software itself, if and wherever such third-party * acknowledgments normally appear. * * 4. The name "ColorBrewer" must not be used to endorse or promote products * derived from this software without prior written permission. For written * permission, please contact Cynthia Brewer at cbrewer@psu.edu. * * 5. Products derived from this software may not be called "ColorBrewer", * nor may "ColorBrewer" appear in their name, without prior written * permission of Cynthia Brewer. * * Furthermore, Solarized colour schemes are covered by the following: * * Copyright (c) 2011 Ethan Schoonover * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */var Iu;function Bw(){return Iu||(Iu=1,function(e){var t=function(){var a=Array.prototype,l=function(_,g,y){return a.slice.apply(_,a.slice.call(arguments,1))},s="function",i=1e9,c=function(_,g,y,v){if(g|=0,g==0)return[];if(typeof _!==s){var C=c.listSchemes(_,g);if(!C.length)return null;_=C[(y||0)%C.length]}var w=l(arguments,2);return w[0]=g,_.apply(_,w)};c.Scheme=function(_,g){var y={},v=0,C=i,w=function(){if(arguments.length<=1)return b.color_func.bind(b);var x=l(arguments);return function($){return x[0]=$,b.color_func.apply(b,x)}},b=function(x,$){if(x|=0,!x)return[];var M=x;if(x=Math.abs(x),x<=v){for(var F=Math.max(x,C);!(F in y);++F);var S=y[F];if(F>x){var D="shrinking_takes_head"in S?S.shrinking_takes_head:b.shrinking_takes_head;if(D)S=S.slice(0,x),F=x;else return c.generate(function(I){return S[Math.round(I)]},M,0,S.length-1)}return S=S.slice(),M<0&&S.reverse(),S}else return b.color_func?c.generate(w.apply(b,arguments),M,0,1,b.color_func_cyclic):null};return b.scheme_name=_,b.groups=g?typeof g=="string"?[g]:g:[],b.max=0,b.cbf_max=i,b.addPalette=function(x,$){var M=x.length;M&&(y[M]=x,C=Math.min(C,M),v=Math.max(v,M),b.max=Math.max(b.max,M),!$&&M!=1&&(b.cbf_max=Math.min(b.cbf_max,M-1)))},b.addPalettes=function(x,$,M){$=$||x.length;for(var F=0;F<$;++F)F in x&&b.addPalette(x[F],!0);b.cbf_max=Math.min(b.cbf_max,M||1)},b.shrinkByTakingHead=function(x,$){$!==void 0?$ in y&&(y[$].shrinking_takes_head=!!x):b.shrinking_takes_head=!!x},b.setColorFunction=function(x,$,M){b.color_func=x,b.color_func_cyclic=!!M,b.max=i,!$&&b.cbf_max===i&&(b.cbf_max=1)},b.color=function(x,$){return b.color_func?b.color_func.apply(this,arguments):null},b},c.Scheme.fromPalettes=function(_,g,y,v,C){var w=c.Scheme(_,g);return w.addPalettes.apply(w,l(arguments,2)),w},c.Scheme.withColorFunction=function(_,g,y,v,C){var w=c.Scheme(_,g);return w.setColorFunction.apply(w,l(arguments,2)),w};var p={};c.register=function(_){p["n-"+_.scheme_name]=[_],_.groups.forEach(function(g){(p["g-"+g]=p["g-"+g]||[]).push(_)}),(p["g-all"]=p["g-all"]||[]).push(_)},c.listSchemes=function(_,g){g?g<0&&(g=-g):g=2;var y=[];return(typeof _=="string"?[_]:_).forEach(function(v){var C=v.substring(v.length-4)==="-cbf";C&&(v=v.substring(0,v.length-4));for(var w=p["g-"+v]||p["n-"+v]||[],b=0,x;x=w[b];++b)(C?x.cbf:x.max)>=g&&y.push(x)}),y.sort(function(v,C){return v.scheme_name>=C.scheme_name?v.scheme_name>C.scheme_name?1:0:-1}),y},c.generate=function(_,g,y,v,C){if(Math.abs(g)<1)return[];if(y=y===void 0?0:y,v=v===void 0?1:v,Math.abs(g)<2)return[_(y)];for(var w=Math.abs(g),b=y,x=[],$=(v-y)/(C?w:w-1);--w>=0;b+=$)x.push(_(b));return g<0&&x.reverse(),x};var m=function(_){return _>0?_<1?_:1:0};return c.rgbColor=function(_,g,y){return[_,g,y].map(function(v){return v=Number(Math.round(m(v)*255)).toString(16),v.length==1?"0"+v:v}).join("")},c.linearRgbColor=function(_,g,y){return[_,g,y].map(function(v){return v=m(v),v<=.0031308?v=12.92*v:v=1.055*Math.pow(v,.4166666666666667)-.055,v=Number(Math.round(v*255)).toString(16),v.length==1?"0"+v:v}).join("")},c.hsvColor=function(_,g,y){_*=6;var v=g===void 0?1:m(g),C=y===void 0?1:m(y),w=C*(1-v*Math.abs(_%2-1)),b=C*(1-v);switch(Math.floor(_)%6){case 0:return c.rgbColor(C,w,b);case 1:return c.rgbColor(w,C,b);case 2:return c.rgbColor(b,C,w);case 3:return c.rgbColor(b,w,C);case 4:return c.rgbColor(w,b,C);default:return c.rgbColor(C,b,w)}},c.register(c.Scheme.withColorFunction("rainbow","qualitative",c.hsvColor,!1,!0)),c}();t.ColorFunction,t.Palette,t.PalettesList,t.SchemeType,function(){var a=t.Scheme.fromPalettes("mpn65","qualitative",[["ff0029","377eb8","66a61e","984ea3","00d2d5","ff7f00","af8d00","7f80cd","b3e900","c42e60","a65628","f781bf","8dd3c7","bebada","fb8072","80b1d3","fdb462","fccde5","bc80bd","ffed6f","c4eaff","cf8c00","1b9e77","d95f02","e7298a","e6ab02","a6761d","0097ff","00d067","000000","252525","525252","737373","969696","bdbdbd","f43600","4ba93b","5779bb","927acc","97ee3f","bf3947","9f5b00","f48758","8caed6","f2b94f","eff26e","e43872","d9b100","9d7a00","698cff","d9d9d9","00d27e","d06800","009f82","c49200","cbe8ff","fecddf","c27eb6","8cd2ce","c4b8d9","f883b0","a49100","f48800","27d0df","a04a9b"]]);a.shrinkByTakingHead(!0),t.register(a)}(),function(){var a=t.rgbColor,l=function(i,c){for(var p=arguments.length-1,m=arguments[p];p>1;)m=m*i+arguments[--p];return m},s=function(i){var c=l(Math.abs(i),1,.278393,.230389,972e-6,.078108);return c*=c,c*=c,c=1-1/c,i<0?-c:c};t.register(t.Scheme.fromPalettes("tol","qualitative",[["4477aa"],["4477aa","cc6677"],["4477aa","ddcc77","cc6677"],["4477aa","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","882255","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","aa4466","882255","aa4499"]],12,12)),t.tolSequentialColor=function(i){return a(1-.392*(1+s((i-.869)/.255)),1.021-.456*(1+s((i-.527)/.376)),1-.493*(1+s((i-.272)/.309)))},t.register(t.Scheme.withColorFunction("tol-sq","sequential",t.tolSequentialColor,!0)),t.tolDivergingColor=function(i){var c=l(i,.572,1.524,-1.811)/l(i,1,-.291,.1574);return a(l(i,.235,-2.13,26.92,-65.5,63.5,-22.36),c*c,1/l(i,1.579,-4.03,12.92,-31.4,48.6,-23.36))},t.register(t.Scheme.withColorFunction("tol-dv","diverging",t.tolDivergingColor,!0)),t.tolRainbowColor=function(i){return a(l(i,.472,-.567,4.05)/l(i,1,8.72,-19.17,14.1),l(i,.108932,-1.22635,27.284,-98.577,163.3,-131.395,40.634),1/l(i,1.97,3.54,-68.5,243,-297,125))},t.register(t.Scheme.withColorFunction("tol-rainbow","qualitative",t.tolRainbowColor,!0))}(),function(){t.register(t.Scheme.fromPalettes("sol-base","sequential",[["002b36","073642","586e75","657b83","839496","93a1a1","eee8d5","fdf6e3"]],1,8)),t.register(t.Scheme.fromPalettes("sol-accent","qualitative",[["b58900","cb4b16","dc322f","d33682","6c71c4","268bd2","2aa198","859900"]]))}(),function(){var a={YlGn:{type:"sequential",cbf:42,3:["f7fcb9","addd8e","31a354"],4:["ffffcc","c2e699","78c679","238443"],5:["ffffcc","c2e699","78c679","31a354","006837"],6:["ffffcc","d9f0a3","addd8e","78c679","31a354","006837"],7:["ffffcc","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],8:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],9:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","006837","004529"]},YlGnBu:{type:"sequential",cbf:42,3:["edf8b1","7fcdbb","2c7fb8"],4:["ffffcc","a1dab4","41b6c4","225ea8"],5:["ffffcc","a1dab4","41b6c4","2c7fb8","253494"],6:["ffffcc","c7e9b4","7fcdbb","41b6c4","2c7fb8","253494"],7:["ffffcc","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],8:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],9:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","253494","081d58"]},GnBu:{type:"sequential",cbf:42,3:["e0f3db","a8ddb5","43a2ca"],4:["f0f9e8","bae4bc","7bccc4","2b8cbe"],5:["f0f9e8","bae4bc","7bccc4","43a2ca","0868ac"],6:["f0f9e8","ccebc5","a8ddb5","7bccc4","43a2ca","0868ac"],7:["f0f9e8","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],8:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],9:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","0868ac","084081"]},BuGn:{type:"sequential",cbf:42,3:["e5f5f9","99d8c9","2ca25f"],4:["edf8fb","b2e2e2","66c2a4","238b45"],5:["edf8fb","b2e2e2","66c2a4","2ca25f","006d2c"],6:["edf8fb","ccece6","99d8c9","66c2a4","2ca25f","006d2c"],7:["edf8fb","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],8:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],9:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","006d2c","00441b"]},PuBuGn:{type:"sequential",cbf:42,3:["ece2f0","a6bddb","1c9099"],4:["f6eff7","bdc9e1","67a9cf","02818a"],5:["f6eff7","bdc9e1","67a9cf","1c9099","016c59"],6:["f6eff7","d0d1e6","a6bddb","67a9cf","1c9099","016c59"],7:["f6eff7","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],8:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],9:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016c59","014636"]},PuBu:{type:"sequential",cbf:42,3:["ece7f2","a6bddb","2b8cbe"],4:["f1eef6","bdc9e1","74a9cf","0570b0"],5:["f1eef6","bdc9e1","74a9cf","2b8cbe","045a8d"],6:["f1eef6","d0d1e6","a6bddb","74a9cf","2b8cbe","045a8d"],7:["f1eef6","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],8:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],9:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","045a8d","023858"]},BuPu:{type:"sequential",cbf:42,3:["e0ecf4","9ebcda","8856a7"],4:["edf8fb","b3cde3","8c96c6","88419d"],5:["edf8fb","b3cde3","8c96c6","8856a7","810f7c"],6:["edf8fb","bfd3e6","9ebcda","8c96c6","8856a7","810f7c"],7:["edf8fb","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],8:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],9:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","810f7c","4d004b"]},RdPu:{type:"sequential",cbf:42,3:["fde0dd","fa9fb5","c51b8a"],4:["feebe2","fbb4b9","f768a1","ae017e"],5:["feebe2","fbb4b9","f768a1","c51b8a","7a0177"],6:["feebe2","fcc5c0","fa9fb5","f768a1","c51b8a","7a0177"],7:["feebe2","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],8:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],9:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177","49006a"]},PuRd:{type:"sequential",cbf:42,3:["e7e1ef","c994c7","dd1c77"],4:["f1eef6","d7b5d8","df65b0","ce1256"],5:["f1eef6","d7b5d8","df65b0","dd1c77","980043"],6:["f1eef6","d4b9da","c994c7","df65b0","dd1c77","980043"],7:["f1eef6","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],8:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],9:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","980043","67001f"]},OrRd:{type:"sequential",cbf:42,3:["fee8c8","fdbb84","e34a33"],4:["fef0d9","fdcc8a","fc8d59","d7301f"],5:["fef0d9","fdcc8a","fc8d59","e34a33","b30000"],6:["fef0d9","fdd49e","fdbb84","fc8d59","e34a33","b30000"],7:["fef0d9","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],8:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],9:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","b30000","7f0000"]},YlOrRd:{type:"sequential",cbf:42,3:["ffeda0","feb24c","f03b20"],4:["ffffb2","fecc5c","fd8d3c","e31a1c"],5:["ffffb2","fecc5c","fd8d3c","f03b20","bd0026"],6:["ffffb2","fed976","feb24c","fd8d3c","f03b20","bd0026"],7:["ffffb2","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],8:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],9:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","bd0026","800026"]},YlOrBr:{type:"sequential",cbf:42,3:["fff7bc","fec44f","d95f0e"],4:["ffffd4","fed98e","fe9929","cc4c02"],5:["ffffd4","fed98e","fe9929","d95f0e","993404"],6:["ffffd4","fee391","fec44f","fe9929","d95f0e","993404"],7:["ffffd4","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],8:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],9:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","993404","662506"]},Purples:{type:"sequential",cbf:42,3:["efedf5","bcbddc","756bb1"],4:["f2f0f7","cbc9e2","9e9ac8","6a51a3"],5:["f2f0f7","cbc9e2","9e9ac8","756bb1","54278f"],6:["f2f0f7","dadaeb","bcbddc","9e9ac8","756bb1","54278f"],7:["f2f0f7","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],8:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],9:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","54278f","3f007d"]},Blues:{type:"sequential",cbf:42,3:["deebf7","9ecae1","3182bd"],4:["eff3ff","bdd7e7","6baed6","2171b5"],5:["eff3ff","bdd7e7","6baed6","3182bd","08519c"],6:["eff3ff","c6dbef","9ecae1","6baed6","3182bd","08519c"],7:["eff3ff","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],8:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],9:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","08519c","08306b"]},Greens:{type:"sequential",cbf:42,3:["e5f5e0","a1d99b","31a354"],4:["edf8e9","bae4b3","74c476","238b45"],5:["edf8e9","bae4b3","74c476","31a354","006d2c"],6:["edf8e9","c7e9c0","a1d99b","74c476","31a354","006d2c"],7:["edf8e9","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],8:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],9:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","006d2c","00441b"]},Oranges:{type:"sequential",cbf:42,3:["fee6ce","fdae6b","e6550d"],4:["feedde","fdbe85","fd8d3c","d94701"],5:["feedde","fdbe85","fd8d3c","e6550d","a63603"],6:["feedde","fdd0a2","fdae6b","fd8d3c","e6550d","a63603"],7:["feedde","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],8:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],9:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","a63603","7f2704"]},Reds:{type:"sequential",cbf:42,3:["fee0d2","fc9272","de2d26"],4:["fee5d9","fcae91","fb6a4a","cb181d"],5:["fee5d9","fcae91","fb6a4a","de2d26","a50f15"],6:["fee5d9","fcbba1","fc9272","fb6a4a","de2d26","a50f15"],7:["fee5d9","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],8:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],9:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","a50f15","67000d"]},Greys:{type:"sequential",cbf:42,3:["f0f0f0","bdbdbd","636363"],4:["f7f7f7","cccccc","969696","525252"],5:["f7f7f7","cccccc","969696","636363","252525"],6:["f7f7f7","d9d9d9","bdbdbd","969696","636363","252525"],7:["f7f7f7","d9d9d9","bdbdbd","969696","737373","525252","252525"],8:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525"],9:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525","000000"]},PuOr:{type:"diverging",cbf:42,3:["f1a340","f7f7f7","998ec3"],4:["e66101","fdb863","b2abd2","5e3c99"],5:["e66101","fdb863","f7f7f7","b2abd2","5e3c99"],6:["b35806","f1a340","fee0b6","d8daeb","998ec3","542788"],7:["b35806","f1a340","fee0b6","f7f7f7","d8daeb","998ec3","542788"],8:["b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788"],9:["b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788"],10:["7f3b08","b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788","2d004b"],11:["7f3b08","b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788","2d004b"]},BrBG:{type:"diverging",cbf:42,3:["d8b365","f5f5f5","5ab4ac"],4:["a6611a","dfc27d","80cdc1","018571"],5:["a6611a","dfc27d","f5f5f5","80cdc1","018571"],6:["8c510a","d8b365","f6e8c3","c7eae5","5ab4ac","01665e"],7:["8c510a","d8b365","f6e8c3","f5f5f5","c7eae5","5ab4ac","01665e"],8:["8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e"],9:["8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e"],10:["543005","8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e","003c30"],11:["543005","8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e","003c30"]},PRGn:{type:"diverging",cbf:42,3:["af8dc3","f7f7f7","7fbf7b"],4:["7b3294","c2a5cf","a6dba0","008837"],5:["7b3294","c2a5cf","f7f7f7","a6dba0","008837"],6:["762a83","af8dc3","e7d4e8","d9f0d3","7fbf7b","1b7837"],7:["762a83","af8dc3","e7d4e8","f7f7f7","d9f0d3","7fbf7b","1b7837"],8:["762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837"],9:["762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837"],10:["40004b","762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837","00441b"],11:["40004b","762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837","00441b"]},PiYG:{type:"diverging",cbf:42,3:["e9a3c9","f7f7f7","a1d76a"],4:["d01c8b","f1b6da","b8e186","4dac26"],5:["d01c8b","f1b6da","f7f7f7","b8e186","4dac26"],6:["c51b7d","e9a3c9","fde0ef","e6f5d0","a1d76a","4d9221"],7:["c51b7d","e9a3c9","fde0ef","f7f7f7","e6f5d0","a1d76a","4d9221"],8:["c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221"],9:["c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221"],10:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221","276419"],11:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221","276419"]},RdBu:{type:"diverging",cbf:42,3:["ef8a62","f7f7f7","67a9cf"],4:["ca0020","f4a582","92c5de","0571b0"],5:["ca0020","f4a582","f7f7f7","92c5de","0571b0"],6:["b2182b","ef8a62","fddbc7","d1e5f0","67a9cf","2166ac"],7:["b2182b","ef8a62","fddbc7","f7f7f7","d1e5f0","67a9cf","2166ac"],8:["b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac"],9:["b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac","053061"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac","053061"]},RdGy:{type:"diverging",cbf:42,3:["ef8a62","ffffff","999999"],4:["ca0020","f4a582","bababa","404040"],5:["ca0020","f4a582","ffffff","bababa","404040"],6:["b2182b","ef8a62","fddbc7","e0e0e0","999999","4d4d4d"],7:["b2182b","ef8a62","fddbc7","ffffff","e0e0e0","999999","4d4d4d"],8:["b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d"],9:["b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d","1a1a1a"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d","1a1a1a"]},RdYlBu:{type:"diverging",cbf:42,3:["fc8d59","ffffbf","91bfdb"],4:["d7191c","fdae61","abd9e9","2c7bb6"],5:["d7191c","fdae61","ffffbf","abd9e9","2c7bb6"],6:["d73027","fc8d59","fee090","e0f3f8","91bfdb","4575b4"],7:["d73027","fc8d59","fee090","ffffbf","e0f3f8","91bfdb","4575b4"],8:["d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4"],9:["d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4"],10:["a50026","d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4","313695"],11:["a50026","d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4","313695"]},Spectral:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","99d594"],4:["d7191c","fdae61","abdda4","2b83ba"],5:["d7191c","fdae61","ffffbf","abdda4","2b83ba"],6:["d53e4f","fc8d59","fee08b","e6f598","99d594","3288bd"],7:["d53e4f","fc8d59","fee08b","ffffbf","e6f598","99d594","3288bd"],8:["d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd"],9:["d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd"],10:["9e0142","d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd","5e4fa2"],11:["9e0142","d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd","5e4fa2"]},RdYlGn:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","91cf60"],4:["d7191c","fdae61","a6d96a","1a9641"],5:["d7191c","fdae61","ffffbf","a6d96a","1a9641"],6:["d73027","fc8d59","fee08b","d9ef8b","91cf60","1a9850"],7:["d73027","fc8d59","fee08b","ffffbf","d9ef8b","91cf60","1a9850"],8:["d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850"],9:["d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850"],10:["a50026","d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850","006837"],11:["a50026","d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850","006837"]},Accent:{type:"qualitative",cbf:0,3:["7fc97f","beaed4","fdc086"],4:["7fc97f","beaed4","fdc086","ffff99"],5:["7fc97f","beaed4","fdc086","ffff99","386cb0"],6:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f"],7:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17"],8:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17","666666"]},Dark2:{type:"qualitative",cbf:3,3:["1b9e77","d95f02","7570b3"],4:["1b9e77","d95f02","7570b3","e7298a"],5:["1b9e77","d95f02","7570b3","e7298a","66a61e"],6:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02"],7:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d"],8:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d","666666"]},Paired:{type:"qualitative",cbf:4,3:["a6cee3","1f78b4","b2df8a"],4:["a6cee3","1f78b4","b2df8a","33a02c"],5:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99"],6:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c"],7:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f"],8:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00"],9:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6"],10:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a"],11:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99"],12:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99","b15928"]},Pastel1:{type:"qualitative",cbf:0,3:["fbb4ae","b3cde3","ccebc5"],4:["fbb4ae","b3cde3","ccebc5","decbe4"],5:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6"],6:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc"],7:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd"],8:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec"],9:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec","f2f2f2"]},Pastel2:{type:"qualitative",cbf:0,3:["b3e2cd","fdcdac","cbd5e8"],4:["b3e2cd","fdcdac","cbd5e8","f4cae4"],5:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9"],6:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae"],7:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc"],8:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc","cccccc"]},Set1:{type:"qualitative",cbf:0,3:["e41a1c","377eb8","4daf4a"],4:["e41a1c","377eb8","4daf4a","984ea3"],5:["e41a1c","377eb8","4daf4a","984ea3","ff7f00"],6:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33"],7:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628"],8:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf"],9:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf","999999"]},Set2:{type:"qualitative",cbf:3,3:["66c2a5","fc8d62","8da0cb"],4:["66c2a5","fc8d62","8da0cb","e78ac3"],5:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854"],6:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f"],7:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494"],8:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494","b3b3b3"]},Set3:{type:"qualitative",cbf:0,3:["8dd3c7","ffffb3","bebada"],4:["8dd3c7","ffffb3","bebada","fb8072"],5:["8dd3c7","ffffb3","bebada","fb8072","80b1d3"],6:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462"],7:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69"],8:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5"],9:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9"],10:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd"],11:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5"],12:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5","ffed6f"]}};for(var l in a){var s=a[l];s=t.Scheme.fromPalettes("cb-"+l,[s.type,"cb-"+s.type],s,12,s.cbf),t.register(s)}}(),e.exports&&(e.exports=t)}(Ni)),Ni.exports}Bw();class kw extends ol{constructor(){super(...arguments);Re(this,"data",{dashboard:[{name:"sales_growth_chart",type:"line"}],order:[{name:"gross_sale_by_day_chart",type:""},{name:"order_completion_time_chart",type:""},{name:"item_count_distribution_chart",type:""},{name:"gross_sale_by_hour_chart",type:""},{name:"order_value_distribution_chart",type:""},{name:"avg_order_gross_chart",type:""},{name:"avg_order_items_chart",type:""},{name:"order_chart",type:""}],revenue:[{name:"revenue_chart",type:"line"}],refund:[{name:"refund_chart",type:"line"}],subscription:[{name:"subscription_chart",type:"line"},{name:"retention_chart",type:"line"},{name:"daily_signups_chart",type:"line"}],product:[{name:"product_chart",type:"bar"}]});Re(this,"storageKey","chart-type");Re(this,"listeners",{})}beforeInit(){this.mergeWithStorage()}mergeWithStorage(){const a=Ot.get(this.storageKey);this.data.dashboard=a.dashboard??this.data.dashboard,this.data.order=a.order??this.data.order,this.data.revenue=a.revenue??this.data.revenue,this.data.refund=a.refund??this.data.refund,this.data.subscription=a.subscription??this.data.subscription}addListener(a,l){this.listeners[a]=l}async onChange(a,l,s){const c=this.data[a].findIndex(p=>p.name===l);c!==-1?this.data[a][c].type=s:this.data[a].push({name:l,type:s}),this.syncStorage();for(let p in this.listeners)this.listeners[p](this.applicableFilters)}getChartType(a,l){const i=this.data[a].find(c=>c.name===l);return i?i.type:null}syncStorage(){Ot.set(this.storageKey,this.applicableFilters.chartType)}removeListener(a){delete this.listeners[a]}get applicableFilters(){return{chartType:{dashboard:this.data.dashboard,order:this.data.order,revenue:this.data.revenue,refund:this.data.refund,subscription:this.data.subscription}}}}const ga=kw.init();function Es(e){const t=lt(e[0]).format("MMMM D, YYYY"),a=lt(e[1]).format("MMMM D, YYYY");return t===a?`on ${t}.`:`between ${t} and ${a}.`}function Us(e){const t=e.split("-");if(t.length===3){const[a,l,s]=t;return`${Pa[parseInt(l)-1]} ${s}`}else if(t.length===2){const[a,l]=t;return`${Pa[parseInt(l)-1]} ${a}`}else if(t.length===1){const[a]=t;return`${a}`}}function Il(e){return e.map(t=>Us(t.group))}const Oa=Ve.colors.report,xw={[Oa.light_gray]:Oa.cyan_blue,[Oa.light_gray_cyan_blue]:Oa.cyan_blue_dark,[Oa.blue]:Oa.royal_blue,[Oa.royal_blue]:Oa.dark_blue,[Oa.medium_slate_blue]:Oa.dark_purple,[Oa.dark_cyan_blue_16]:Oa.dark_cyan_blue_40,[Oa.dark_cyan_blue_24]:Oa.dark_cyan_blue_40,[Oa.blue]:Oa.blue_dark_mode,[Oa.purple]:Oa.purple_dark_mode};function qa(e){return xw[e]}function ul(e){const t=e<=31?6:7,a=Math.floor(e/t);return{splitNumber:t,interval:a}}const Sw={class:"fct-gross-sale-vs-net-revenue-wrap"},Fw={class:"fct-btn-group sm"},$w={__name:"SalesGrowthChart",props:{chartData:{type:Array,required:!0},reportFilter:{type:Object},loading:{type:Boolean,default:!0}},emits:["fetch-chart-data"],setup(e,{emit:t}){const a=e,l=T(null),s=T(null);T("daily");const i=T(ga.getChartType("order","sales_growth_chart")||"line"),c=Ve.colors.report,p=T(Ve.isDark()),m=N(()=>a.chartData.every(F=>F.orders===0)),_=N(()=>p.value?c.dark_cyan_blue_16:c.light_gray),g=N(()=>p.value?c.dark_cyan_blue_36:c.light_gray_cyan_blue),y=N(()=>[{title:u("Orders"),key:"orders",color:_.value,yAxisIndex:1},{title:u("Revenue"),key:"net_revenue",color:g.value,yAxisIndex:0}].map(({title:F,key:S,color:D,yAxisIndex:I})=>$(F,i.value,a.chartData.map(V=>V[S]),D,I)));Pa.map(F=>F.slice(0,3));const v=N(()=>Il(a.chartData));let C=null;const w=()=>{C&&(C.dispose(),C=null),xe(()=>{l.value&&(C=ea(l.value),x())})},b=N(()=>ul(a.chartData.length)),x=()=>{if(!C)return;p.value=Ve.isDark();const F={title:{text:a.chartTitle??"",left:"center"},legend:{show:!0,top:"5%",icon:"circle",itemWidth:8,itemHeight:8,itemGap:30,textStyle:{color:p.value?"#ffffff":"#000000"}},tooltip:{trigger:"axis",backgroundColor:p.value?"#253241":"#ffffff",borderColor:p.value?"#2C3C4E":"#c0c4ca",borderWidth:1,textStyle:{color:p.value?"#ffffff":"#565865"},axisPointer:{type:"line",lineStyle:{type:"solid",width:2,color:p.value?c.dark_cyan_blue_16:c.light_gray_blue}},formatter:S=>{let D=S[0].name;return S.forEach(I=>{const V=I.seriesIndex===1?`${et.scaled(I.value)}`:I.value,Q=p.value?"#ffffff":"#565865";D+=`
${I.marker} ${I.seriesName} ${V}
`}),D}},xAxis:{type:"category",data:v.value,axisLabel:{color:p.value?"#ffffff":"#696778",fontSize:12,interval:b.value.interval},axisLine:{lineStyle:{type:"dashed",color:p.value?"#253241":"#D6DAE1"}}},yAxis:[{name:u("Revenue"),type:"value",position:"left",axisLabel:{color:p.value?"#ffffff":"#696778",fontSize:12,formatter:S=>`${et.scaledChart(S)}`},splitLine:{show:!0,lineStyle:{color:p.value?"#253241":"#D6DAE1",type:"dashed"}}},{name:u("Orders"),type:"value",position:"right",axisLabel:{color:p.value?"#ffffff":"#696778",fontSize:12},splitLine:{show:!1,lineStyle:{color:p.value?"#253241":"#D6DAE1",type:"dashed"}}}],series:y.value};C.setOption(F,{notMerge:!0,replaceMerge:["series"]})},$=(F,S,D,I,V)=>({name:F,type:S,barMaxWidth:30,data:D,smooth:!1,color:I,lineStyle:{width:3},areaStyle:{opacity:.3,color:I},symbol:"circle",showSymbol:!0,symbolSize:8,itemStyle:{color:I,borderRadius:[4,4,0,0]},yAxisIndex:V,emphasis:{scale:2,itemStyle:{color:qa(I)},lineStyle:{color:I},areaStyle:{opacity:.3,color:I}},animation:!0,animationEasing:"cubicOut",animationDuration:800,animationDelay:0,barGap:"-100%",legendHoverLink:!1}),M=F=>{i.value!==F&&(i.value=F,ga.onChange("order","sales_growth_chart",F),x())};return be([()=>a.chartData,i],()=>{xe(x)},{deep:!0}),be(m,F=>{F||w()}),be(()=>a.loading,F=>{F||w()}),kt(()=>{window.removeEventListener("onFluentCartThemeChange",x,!1),window.removeEventListener("fluentCartCurrencyChange",x,!1)}),Ie(()=>{window.addEventListener("onFluentCartThemeChange",x),window.addEventListener("fluentCartCurrencyChange",x),xe(w)}),(F,S)=>{const D=B("el-skeleton");return r(),h("div",Sw,[n(ke,{id:"chartContainer",ref_key:"cardRef",ref:s},{default:d(()=>[n(Qe,{title:F.$t("Sales Growth"),border_bottom:""},la({_:2},[!m.value&&!e.loading?{name:"action",fn:d(()=>[o("div",Fw,[n(Rl,{activeType:i.value,types:{bar:"BarChart",line:"LineChart"},onChange:M},null,8,["activeType"]),n(Fa,{targetRef:l.value},null,8,["targetRef"])])]),key:"0"}:void 0]),1032,["title"]),n(Ce,{class:"p-0"},{default:d(()=>[e.loading?(r(),E(D,{key:0,animated:"",rows:5,class:"p-4"})):(r(),h(H,{key:1},[m.value?(r(),E(bt,{key:1,icon:"Empty/ListView","has-dark":!0,text:A(u)("Currently there is no data!"),class:"fct-report-empty-state"},null,8,["text"])):(r(),h("div",{key:0,class:"fct-chart-wrap fct-gross-sale-vs-net-revenue-chart",ref_key:"chartRef",ref:l},null,512))],64))]),_:1})]),_:1},512)])}}},Ew={class:"fct-gross-sale-vs-net-revenue-wrap"},Uw={class:"fct-btn-group sm"},Iw={key:0,class:"fct-world-map-action-btns absolute top-5 right-5 flex flex-col gap-1 z-10"},Qw={key:1,class:"fct-world-map-action-btns absolute top-[10px] right-[40px] flex flex-col gap-1 z-10"},Qu=.5,Ki=6,co=1.2,Dw={__name:"HeatMap",props:{data:{type:Array,required:!0}},setup(e){const t=e,a=Ve.colors,l=T(null),s=T(null),i=T(!1),c=T("world"),p=T(92),m=T(100);T(!1);let _=null,g=null,y=50;const v=T(1.2),C=T(),w=a.blue,b=N(()=>{const z=m.value-p.value,X=t.data?t.data.length:0;return z<60||X<15}),x=z=>{z=z.replace(/^#/,"");const X=parseInt(z.substring(0,2),16),W=parseInt(z.substring(2,4),16),re=parseInt(z.substring(4,6),16);return[X,W,re]},$=()=>Ve.isDark()?a.gray[50]:a.gray[600],M=x(w[500]),F=async()=>{const z=cs.getUrl("world.geo.json"),W=await(await fetch(z)).json();qf("world",W)},S=z=>{if(!z||isNaN(z))return`rgba(${M.join(",")}, 0)`;const X=Math.log(z+1)/Math.log(y+1);return`rgba(${M.join(",")}, ${X})`},D=z=>{c.value=z,G(),_&&(_.clear(),_.setOption(P()),z==="bar"&&I()),g&&i.value&&(g.clear(),g.setOption(P()),z==="bar"&&V())},I=()=>{_&&(_.off("dataZoom"),_.on("dataZoom",function(z){z.batch&&z.batch[0]?(p.value=z.batch[0].start||0,m.value=z.batch[0].end||100):(p.value=z.start||0,m.value=z.end||100),setTimeout(()=>{G()},100)}))},V=()=>{g&&(g.off("dataZoom"),g.on("dataZoom",function(z){z.batch&&z.batch[0]?(p.value=z.batch[0].start||0,m.value=z.batch[0].end||100):(p.value=z.start||0,m.value=z.end||100),setTimeout(()=>{g&&g.setOption(P())},100)}))},Q=N(()=>(t.data||[]).map(z=>({...z,value:z.value||0,itemStyle:{color:S(z.value||0)},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}))),U=()=>({backgroundColor:Ve.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"item",formatter:z=>u("%1$s%2$s Orders: %3$s",z.name,"
",z.value||0),borderRadius:8,backgroundColor:Ve.isDark()?"#38485a":"#ffffff",borderColor:Ve.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1,textStyle:{color:Ve.isDark()?"#ffffff":"#565865"}},visualMap:{min:0,max:y,left:i.value?"5%":"center",bottom:i.value?"center":"4%",text:[u("High"),u("Low")],orient:i.value?"vertical":"horizontal",calculable:!0,inRange:{color:[w[100],w[500]]},textStyle:{color:a.gray[800]}},series:[{name:"Orders",type:"map",map:"world",roam:C.value,zoom:v.value,label:{show:!1,emphasis:{show:!0,color:a.gray[1e3],fontWeight:"bold",textShadowColor:a.gray[50],textShadowBlur:3,textShadowOffsetX:0,textShadowOffsetY:0}},emphasis:{itemStyle:{areaColor:w[300],shadowBlur:10,shadowColor:a.gray[400]}},itemStyle:{borderColor:a.gray[200],borderWidth:.5},data:Q.value}]}),O=N(()=>{const z=t.data.length,X=m.value-p.value,W=Math.ceil(z*X/100);let re=0;return W>100?re=9:W>50?re=4:W>30?re=2:W>20&&(re=1),re}),L=()=>{const z=b.value;return{backgroundColor:Ve.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(X){const W=X[0];return`${W.name}
${u("Orders")}: ${W.value||0}`},backgroundColor:Ve.isDark()?"#38485a":"#ffffff",textStyle:{color:Ve.isDark()?a.gray[25]:a.system.mid},borderColor:Ve.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1},dataZoom:[{type:"inside",yAxisIndex:0,start:p.value,end:m.value},{type:"slider",yAxisIndex:0,start:p.value,end:m.value,width:25,top:10,right:10,textStyle:{color:$()},brushSelect:!1,showDetail:!1,disabled:!0}],grid:{left:z?"10px":"0%",right:"15%",top:"10%",bottom:"15%",containLabel:!0},yAxis:{type:"category",axisTick:{show:z},splitLine:{show:!1},axisLine:{show:z,lineStyle:{color:$()}},axisLabel:{show:z,interval:O.value,color:$(),fontSize:11},data:t.data.map(X=>X.name)},xAxis:{type:"value",axisLabel:{show:!0,color:$(),formatter:function(X){return X.toLocaleString()}},splitLine:{show:!0,lineStyle:{color:Ve.isDark()?a.gray[600]:a.gray[200]}}},series:[{type:"bar",large:!0,itemStyle:{color:new lr(0,0,1,0,[{offset:0,color:w[400]},{offset:1,color:w[600]}]),borderRadius:[0,4,4,0]},emphasis:{itemStyle:{color:new lr(0,0,1,0,[{offset:0,color:w[500]},{offset:1,color:w[700]}])}},data:t.data.map(X=>X.value),label:{show:z,formatter:"{c}",position:"right",color:$(),fontSize:10}}]}},P=()=>c.value==="bar"?L():U(),j=async()=>{await F(),l.value&&(_=ea(l.value),_.setOption(P()),c.value==="bar"&&I(),_.on("georoam",()=>{const X=_.getOption().series[0].zoom;if(X!==v.value)if(XKi){const W=Math.max(co,Math.min(Ki,X));_.setOption({series:[{zoom:W}]},!1),v.value=W}else v.value=X}))},G=()=>{t.data&&t.data.length>0?y=Math.max(...t.data.map(z=>z.value||0)):y=1,_&&_.setOption(P(),{notMerge:!0})},q=()=>{v.value=Math.min(v.value+Qu,Ki),C.value=!0,_.setOption({series:[{zoom:v.value,roam:C.value}]})},Z=()=>{v.value=Math.max(v.value-Qu,co),C.value=!0,_.setOption({series:[{zoom:v.value,roam:C.value}]})},oe=()=>{c.value==="bar"?(p.value=92,m.value=100,_&&_.dispatchAction({type:"dataZoom",start:92,end:100})):(v.value=co,C.value="move",_&&(_.clear(),_.setOption(P())))},de=async()=>{i.value=!0,await xe(),g?g.clear():g=ea(s.value),g.setOption(P()),c.value==="bar"&&V()},K=z=>{$(),_&&_.setOption(P())};return Ie(()=>{window.addEventListener("onFluentCartThemeChange",K),C.value="move",xe(j)}),kt(()=>{window.removeEventListener("onFluentCartThemeChange",K),_&&(_.dispose(),_=null),g&&(g.dispose(),g=null)}),be(()=>t.data,()=>G(),{deep:!0}),be(b,()=>{c.value==="bar"&&xe(()=>{G()})}),(z,X)=>(r(),h("div",Ew,[n(ke,{id:"chartContainer",class:"mb-0"},{default:d(()=>[n(Qe,{title:z.$t("Order Heat Map"),border_bottom:""},{action:d(()=>[o("div",Uw,[n(Rl,{activeType:c.value,types:{world:"Globe",bar:"BarChart"},onChange:D},null,8,["activeType"]),n(Fa,{targetRef:l.value,size:"small"},null,8,["targetRef"])])]),_:1},8,["title"]),n(Ce,{class:"p-0 pt-0 relative"},{default:d(()=>[c.value==="world"?(r(),h("div",Iw,[n(Ze,{tag:"button",size:"small",onClick:q},{default:d(()=>[n(J,{name:"Plus"})]),_:1}),n(Ze,{tag:"button",size:"small",onClick:Z},{default:d(()=>[n(J,{name:"Minus"})]),_:1}),n(Ze,{tag:"button",size:"small",onClick:oe},{default:d(()=>[n(J,{name:"Reload"})]),_:1}),n(Ze,{tag:"button",size:"small lg:hidden",onClick:de},{default:d(()=>[n(J,{name:"Eye"})]),_:1})])):k("",!0),c.value==="bar"?(r(),h("div",Qw,[n(Ze,{tag:"button",size:"small",onClick:oe},{default:d(()=>[n(J,{name:"Reload"})]),_:1})])):k("",!0),o("div",{class:"fct-chart-wrap rounded-[0px] bg-transparent",ref_key:"chartRef",ref:l},null,512)]),_:1})]),_:1}),n(A(Jf),{modelValue:i.value,"onUpdate:modelValue":X[0]||(X[0]=W=>i.value=W),title:z.$t("Order Heat Map"),class:"country-heat-map-dialog"},{default:d(()=>[o("div",{class:"fct-chart-wrap",ref_key:"modalChartRef",ref:s},null,512)]),_:1},8,["modelValue","title"])]))}},Vw=at(Dw,[["__scopeId","data-v-36a900c8"]]),Tw={class:"fct-report-card"},Mw={key:0,class:"fct-report-card-header"},Lw={key:0,class:"flex items-center gap-2"},Rw={class:"title"},Ow={class:"actions"},Hw={class:"fct-report-card-body flex h-full"},Pw={class:"w-full"},Ln={__name:"ReportCard",props:{cardOptions:{type:Object,default:()=>({heading:"",linkButtonText:"",linkButtonUrl:"",headingIcon:{type:Boolean,default:!1}})}},setup(e){return(t,a)=>{const l=B("router-link");return r(),h("div",Tw,[e.cardOptions.heading||e.cardOptions.linkButtonText?(r(),h("div",Mw,[e.cardOptions.heading?(r(),h("div",Lw,[e.cardOptions.headingIcon?(r(),E(Ze,{key:0,size:"x-small",bg:"danger",soft:""},{default:d(()=>[n(J,{name:"FailedCircle"})]),_:1})):k("",!0),o("h4",Rw,f(e.cardOptions.heading),1)])):k("",!0),o("div",Ow,[e.cardOptions.linkButtonText?(r(),E(l,{key:0,to:`/${e.cardOptions.linkButtonUrl}`,class:"link"},{default:d(()=>[R(f(t.$t(e.cardOptions.linkButtonText)),1)]),_:1},8,["to"])):k("",!0),ka(t.$slots,"action")])])):k("",!0),o("div",Hw,[o("div",Pw,[ka(t.$slots,"default")])])])}}},Nw={key:0,class:"fct-report-sold-product-list has-scroll"},Kw={class:"list-left-content"},Gw={class:"list-title"},jw={class:"list-title-inner"},zw={class:"list-id"},qw={class:"list-right-content"},Yw=["innerHTML"],Ww={class:"list-price"},Xw={__name:"RecentOrders",setup(e){const t=Ga.data;return(a,l)=>{const s=B("router-link");return r(),E(Ln,{class:"top-sold-products","card-options":{heading:A(u)("Recent Orders"),linkButtonText:A(u)("View All"),linkButtonUrl:"orders"}},{default:d(()=>{var i,c;return[((c=(i=A(t))==null?void 0:i.recentOrders)==null?void 0:c.length)>0?(r(),h("ul",Nw,[(r(!0),h(H,null,ae(A(t).recentOrders,p=>(r(),h("li",{key:p.id},[n(s,{class:"no-underline",to:{name:"view_order",params:{order_id:p.id}}},{default:d(()=>[o("div",Kw,[o("div",Gw,[o("div",jw,f(p.customer_name)+" #"+f(A(Zt)(p.id)),1),o("div",zw,[n(Na,{"date-time":p.created_at},null,8,["date-time"])])])]),o("div",qw,[o("div",{class:"list-value",innerHTML:A(et).scaled(p.total_amount)},null,8,Yw),o("div",Ww,f(A(Zt)(p.order_items_count))+" "+f(A(u)("Items")),1)])]),_:2},1032,["to"])]))),128))])):(r(),E(bt,{key:1,icon:"Empty/ListView","has-dark":!0,text:A(u)("Currently there is no item!")},null,8,["text"]))]}),_:1},8,["card-options"])}}},Jw={key:0},Zw={key:1,class:"fc_dashboard_onboarding_wrap"},eC={class:"fc_dashboard_onboarding_title"},tC={class:"fc_dashboard_onboarding_lists"},aC=["href"],lC={class:"circle-shape"},sC={class:"fc_dashboard_onboarding_item__title"},nC={__name:"Onboarding",setup(e){const t=T(0),a=T(!1);zt().ctx;const l=T([]),s=T(!0);T(localStorage.getItem("started_content_collapse")==="true"||!1),N(()=>{const c=Object.keys(l.value).length;return c?Math.round(t.value/c*100):0});const i=Nr("dashboardTogglePageNotification");return Ie(async()=>{a.value=!0,ce.get("dashboard").then(c=>{var m;l.value=c.data.steps,t.value=c.data.completed,s.value=Object.keys(l.value).length!==t.value,a.value=!1;let p=((m=l.value.page_setup)==null?void 0:m.completed)||!1;i&&i(!p)}).catch(c=>{a.value=!1})}),(c,p)=>{const m=B("el-skeleton"),_=B("Check"),g=B("el-icon");return s.value?(r(),h("div",Jw,[a.value?(r(),E(m,{key:0,rows:3,animated:""})):(r(),h("div",Zw,[o("h3",eC,f(c.$t("Onboarding Checklist")),1),o("div",tC,[(r(!0),h(H,null,ae(l.value,(y,v)=>(r(),h("a",{key:v,href:y.url,class:ie([y.completed===!0?"active":"","fc_dashboard_onboarding_item"])},[o("span",lC,[y.completed===!0?(r(),E(g,{key:0},{default:d(()=>[n(_)]),_:1})):k("",!0)]),o("div",sC,f(y.title),1)],10,aC))),128))])]))])):k("",!0)}}},oC={class:"fct-dashboard-recent-activities-wrap"},iC={class:"fct-dashboard-recent-activities__header"},rC={class:"fct-dashboard-recent-activities__header_title"},dC={class:"fct-dashboard-recent-activities__header_desc"},uC={key:0,class:"fct-dashboard-recent-activities__body"},cC={key:0,class:"fct-dashboard-recent-activities__item has-icon"},AC={class:"content"},pC={class:"title"},fC=["onClick"],mC={class:"date"},hC=["innerHTML"],_C={class:"created_by"},vC={key:1,class:"fct-dashboard-recent-activities__empty"},gC={class:"fct-dashboard-recent-activities__empty_text"},yC={__name:"RecentActivity",props:{activities:{type:Array,default:()=>[]},showManageActivity:{type:Boolean,default:!1}},emits:["reload"],setup(e,{emit:t}){const a=ll(),l=T([{label:u("All"),value:"all"},{label:u("Today"),value:"today"},{label:u("Yesterday"),value:"yesterday"},{label:u("This Week"),value:"this_week"}]),s=T("all"),i=()=>{switch(s.value){case"all":return u("all");case"today":return u("today");case"yesterday":return u("yesterday");case"this_week":return u("this week");default:return s.value}},c=()=>{i(),Ga.getRecentActivities({groupKey:s.value})},p={Order:"orders/view",Payment:"orders/view",Product:"products/view",Customer:"customers/view",Coupon:"coupons/view"},m=g=>{var w;const y={order:{name:"view_order",param:"order_id",permission:"orders/view"},payment:{name:"view_order",param:"order_id",permission:"orders/view"},product:{name:"view_product",param:"product_id",permission:"products/view"},customer:{name:"view_customer",param:"customer_id",permission:"customers/view"},coupon:{name:"view_coupon",param:"coupon_id",permission:"coupons/view"}};let v=(w=g==null?void 0:g.module_name)==null?void 0:w.toLowerCase();const C=y[v];C&&g.module_id&&_(g)&&a.push({name:C.name,params:{[C.param]:g.module_id}})},_=g=>{if(!g.module_name)return!0;const y=rt.get(p,da.capitalize(g.module_name));return y?Sn.has(y):!1};return Ie(()=>{c()}),(g,y)=>{const v=B("el-radio-button"),C=B("el-radio-group");return r(),h("div",oC,[o("div",iC,[o("h4",rC,f(A(u)("Recent Activities")),1),o("p",dC,[s.value==="all"?(r(),h(H,{key:0},[R(f(A(u)("%s new activities",A(Zt)(A(Ga).data.recentActivities.length))),1)],64)):(r(),h(H,{key:1},[R(f(A(u)("%1$s new activities %2$s",A(Zt)(A(Ga).data.recentActivities.length),i())),1)],64))]),n(C,{class:"fct-dashboard-recent-activities__header_filter",modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=w=>s.value=w),onChange:c,size:"large"},{default:d(()=>[(r(!0),h(H,null,ae(l.value,(w,b)=>(r(),E(v,{key:b,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),A(Ga).data.recentActivities.length?(r(),h("div",uC,[(r(!0),h(H,null,ae(A(Ga).data.recentActivities,(w,b)=>(r(),h(H,{key:b},[_(w)?(r(),h("div",cC,[y[1]||(y[1]=o("span",{class:"icon"},[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M12.8499 9.92029L13.5711 10.3529C13.6156 10.3795 13.6524 10.4172 13.678 10.4623C13.7036 10.5075 13.717 10.5584 13.717 10.6103C13.717 10.6621 13.7036 10.7131 13.678 10.7582C13.6524 10.8033 13.6156 10.841 13.5711 10.8677L8.30911 14.0249C8.21579 14.081 8.10897 14.1106 8.00011 14.1106C7.89124 14.1106 7.78443 14.081 7.69111 14.0249L2.42911 10.8677C2.38462 10.841 2.34779 10.8033 2.32222 10.7582C2.29664 10.7131 2.2832 10.6621 2.2832 10.6103C2.2832 10.5584 2.29664 10.5075 2.32222 10.4623C2.34779 10.4172 2.38462 10.3795 2.42911 10.3529L3.15031 9.92029L8.00011 12.8303L12.8499 9.92029ZM12.8499 7.10029L13.5711 7.53289C13.6156 7.55952 13.6524 7.59723 13.678 7.64235C13.7036 7.68746 13.717 7.73843 13.717 7.79029C13.717 7.84214 13.7036 7.89311 13.678 7.93822C13.6524 7.98334 13.6156 8.02105 13.5711 8.04769L8.00011 11.3903L2.42911 8.04769C2.38462 8.02105 2.34779 7.98334 2.32222 7.93822C2.29664 7.89311 2.2832 7.84214 2.2832 7.79029C2.2832 7.73843 2.29664 7.68746 2.32222 7.64235C2.34779 7.59723 2.38462 7.55952 2.42911 7.53289L3.15031 7.10029L8.00011 10.0103L12.8499 7.10029ZM8.30851 1.58569L13.5711 4.74289C13.6156 4.76952 13.6524 4.80724 13.678 4.85235C13.7036 4.89746 13.717 4.94843 13.717 5.00029C13.717 5.05214 13.7036 5.10311 13.678 5.14822C13.6524 5.19334 13.6156 5.23105 13.5711 5.25769L8.00011 8.60029L2.42911 5.25769C2.38462 5.23105 2.34779 5.19334 2.32222 5.14822C2.29664 5.10311 2.2832 5.05214 2.2832 5.00029C2.2832 4.94843 2.29664 4.89746 2.32222 4.85235C2.34779 4.80724 2.38462 4.76952 2.42911 4.74289L7.69111 1.58569C7.78443 1.52962 7.89124 1.5 8.00011 1.5C8.10897 1.5 8.21579 1.52962 8.30911 1.58569H8.30851ZM8.00011 2.79949L4.33231 5.00029L8.00011 7.20109L11.6679 5.00029L8.00011 2.79949Z",fill:"#335CFF"})])],-1)),o("div",AC,[o("h3",pC,[w.module_name!==""?(r(),h("span",{key:0,onClick:x=>m(w),class:"cursor-pointer"},f(w.title||"--"),9,fC)):(r(),h(H,{key:1},[R(f(w.title),1)],64)),o("span",mC,[n(Na,{"date-time":w.created_at},null,8,["date-time"])])]),o("p",{innerHTML:w.content,class:"description"},null,8,hC),o("span",_C,f(A(u)("By %s",w.created_by)),1)])])):k("",!0)],64))),128))])):(r(),h("div",vC,[o("div",gC,f(A(u)("No activity found.")),1)]))])}}},bC={class:"fc_dashboard_sidebar bg-white dark:bg-dark-700 p-5 rounded"},wC={__name:"SideBar",setup(e){return(t,a)=>(r(),h("div",bC,[n(Nt,{permission:"is_super_admin"},{default:d(()=>[n(nC)]),_:1}),n(yC,{onReload:a[0]||(a[0]=()=>{})})]))}},CC={class:"fct-product-create"},BC={class:"fct-product-step"},kC={class:"fct-product-item-selector"},xC=["onClick"],SC={class:"fct-product-item-selector-content"},FC={class:"fct-bundle-product-condition"},$C={class:"condition-text"},EC={class:"dialog-footer"},fi={__name:"AddProductModal",props:{customModal:String},emits:["process_custom","update:createProductModal"],setup(e,{emit:t}){const a=e,l=t,s=ll(),i=je.get("variation_types",{}),c=T({post_title:"",post_content:"",post_excerpt:"",post_date:new Date,post_status:"draft",detail:{fulfillment_type:"digital",variation_type:"simple",manage_stock:"0",manage_downloadable:"0",other_info:{use_pricing_table:"yes",group_pricing_by:"repeat_interval",active_editor:"wp-editor",sold_individually:"no"}}}),p=[{type:"physical",title:u("Physical Product"),icon:"Gift"},{type:"digital",title:u("Digital Product"),icon:"Code"}],m=T(!1),_=T(null),g=C=>{c.value.detail.fulfillment_type=C},y=()=>{m.value=!0,ce.post("products",{...c.value}).then(C=>{if(Y.success(C.message),a.customModal==="order_modal"){const w={id:C.data.product_variants.id,object_id:C.data.product_variants.post_id,variation_id:C.data.product_variants.id,item_name:C.data.product_variants.variation_title,item_price:C.data.product_variants.item_price,quantity:1,stock:100,object_type:C.data.product_details.fulfillment_type,item_total:C.data.product_variants.item_price,line_total:C.data.product_variants.item_price,tax_amount:0,discount_total:0};l("process_custom",w),l("update:createProductModal",!1)}else s.push({name:"product_edit",params:{product_id:C.data.ID}})}).catch(C=>{var w;C.status_code=="422"?Y.validationErrors(C):Y.error((w=C.data)==null?void 0:w.message)}).finally(()=>{m.value=!1})},v=C=>{C.stopPropagation(),C.preventDefault(),y()};return Ie(()=>{xe(()=>{setTimeout(()=>{var C;(C=_.value)==null||C.focus()},10)})}),(C,w)=>{const b=B("el-input"),x=B("el-form-item"),$=B("el-option"),M=B("el-select"),F=B("el-checkbox"),S=B("el-form"),D=B("el-button");return r(),h("div",CC,[o("div",BC,[n(S,{"label-position":"top",model:c.value,"require-asterisk-position":"right"},{default:d(()=>[n(x,{label:c.value.detail.other_info.is_bundle_product==="yes"?A(u)("Bundle Title"):A(u)("Product Title"),required:""},{default:d(()=>[n(b,{type:"text",modelValue:c.value.post_title,"onUpdate:modelValue":w[0]||(w[0]=I=>c.value.post_title=I),placeholder:c.value.detail.other_info.is_bundle_product==="yes"?A(u)("Bundle Title"):A(u)("Product Title"),minlength:"3",maxlength:"200","show-word-limit":"",autofocus:"",ref_key:"fcProductTitle",ref:_,onKeydown:xa(v,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.customModal!=="order_modal"?(r(),E(x,{key:0,label:A(u)("Variation Type")},{default:d(()=>[n(M,{modelValue:c.value.detail.variation_type,"onUpdate:modelValue":w[1]||(w[1]=I=>c.value.detail.variation_type=I),placeholder:A(u)("Select Variation Type"),class:"w-full"},{default:d(()=>[(r(!0),h(H,null,ae(A(i),(I,V)=>(r(),E($,{key:V,label:I,value:V},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])):k("",!0),n(x,null,{default:d(()=>[o("ul",kC,[(r(),h(H,null,ae(p,I=>o("li",{key:I.type,class:ie({active:I.type===c.value.detail.fulfillment_type}),onClick:V=>g(I.type)},[o("div",SC,[n(J,{name:I.icon},null,8,["name"]),R(" "+f(I.title),1)]),w[3]||(w[3]=o("div",{class:"fct-product-item-selector-dot-wrap"},[o("span",{class:"fct-product-item-selector-dot"})],-1))],10,xC)),64))])]),_:1}),n(x,null,{default:d(()=>[o("div",FC,[n(F,{modelValue:c.value.detail.other_info.is_bundle_product,"onUpdate:modelValue":w[2]||(w[2]=I=>c.value.detail.other_info.is_bundle_product=I),"true-value":"yes","false-value":"no"},{default:d(()=>[R(f(A(u)("Add as a Bundle")),1)]),_:1},8,["modelValue"]),o("span",$C,f(A(u)("Combine multiple items into one package")),1)])]),_:1})]),_:1},8,["model"])]),o("div",EC,[n(D,{disabled:!c.value.post_title||m.value,loading:m.value,onClick:y,type:"primary"},{default:d(()=>[R(f(m.value?A(u)("Creating"):A(u)("Add Product")),1)]),_:1},8,["disabled","loading"])])])}}};class ud{constructor(t=new Date){this.date=t}getHours(){return this.date.getHours()}static greeting(){const t=new ud().getHours();if(t>=5&&t<12)return u("Good morning");if(t>=12&&t<17)return u("Good afternoon");if(t>=17&&t<21)return u("Good evening");{const a=[u("Step into the moonlight!"),u("Evening vibes!"),u("The night's still young!")];return a[Math.floor(Math.random()*a.length)]}}}const UC={class:"fct-current-user-info-wrap"},IC={class:"fct-current-user-info-content"},QC={class:"image"},DC=["src","alt"],VC={class:"content"},TC={key:0,class:"fct-current-user-info-action"},MC={__name:"CurrentUserInfo",setup(e){const t=T(!1),a=T(je.get("me")),l=()=>je.get("shop.store_name"),s=je.get("total_products_count");return(i,c)=>{const p=B("el-button"),m=B("el-dialog");return r(),h("div",UC,[o("div",IC,[o("div",QC,[o("img",{src:a.value.avatar,alt:a.value.full_name},null,8,DC)]),o("div",VC,[o("h4",null,f(A(ud).greeting())+" "+f(a.value.full_name)+" 👋🏻",1),o("p",null,f(A(u)("Welcome to %1$s",l())),1)])]),n(Nt,{permission:"products/create"},{default:d(()=>[A(s)==0?(r(),h("div",TC,[n(p,{onClick:c[0]||(c[0]=_=>t.value=!0),type:"primary"},{default:d(()=>[R(f(A(u)("Add Product")),1)]),_:1})])):k("",!0)]),_:1}),n(m,{"append-to-body":!0,modelValue:t.value,"onUpdate:modelValue":c[1]||(c[1]=_=>t.value=_),onClose:c[2]||(c[2]=_=>t.value=!1),title:A(u)("Add New Product")},{default:d(()=>[n(fi)]),_:1},8,["modelValue","title"])])}}};class LC{constructor(){Re(this,"operatorMap",{"!==":"matchNotEqual","!=":"matchNotEqual"});Re(this,"defaultMatcherMethod",null)}getMatchingMethod(t){return t==="=="||t==="==="?"matchEqual":this.operatorMap.hasOwnProperty(t)?this.operatorMap[t]:this.defaultMatcherMethod}defaultMatcher(t,a,l){}matchEqual(t,a,l){return l==="==="?t===a:t==a}matchNotEqual(t,a,l){return l==="!=="?t!==a:t!=a}matchContains(t,a,l){return a instanceof String||Array.isArray(a)?a.includes(t):typeof a=="object"?a.hasOwnProperty(t):!1}matchIn(t,a,l){return this.matchContains(t,a,l)}matchNotIn(t,a,l){return!this.matchContains(t,a,l)}}class RC{constructor(){Re(this,"modifierMap",{"+":"applyAddition","-":"applySubstruction"});Re(this,"defaultModifierMethod",null)}getModificationMethod(t){return t==="=="||t==="==="?"matchEqual":this.modifierMap.hasOwnProperty(t)?this.modifierMap[t]:this.defaultModifierMethod}applyAddition(t,a,l,s,i){return t+a}}class OC{constructor(t,a){Re(this,"value");Re(this,"operator");this.value=t,this.operator=a}setOperator(t){return this.operator=t,this}setValue(t){return this.value=t,this}static make(t,a){return new this(t,a)}build(){return{operator:this.operator,value:this.value instanceof Fr?this.value.setModifiers([]).build():this.value}}}class Fr{constructor(t,a){Re(this,"accessor");Re(this,"modifiers");this.accessor=t,this.modifiers=[],this.setModifiers(a)}setAccessor(t){return this.accessor=t,this}addModifier(t){return this.modifiers.push(t),this}setModifiers(t){return this.modifiers=Array.isArray(t)?t:this.modifiers,this}static make(t,a){return new this(t,a)}build(){let t=[];return Array.isArray(this.modifiers)&&this.modifiers.length>0&&(t=this.modifiers.map(a=>a instanceof OC?a.build():a)),t.length>0?{accessor:this.accessor,modifiers:t}:{accessor:this.accessor}}}class xs{constructor(t,a,l,s,i){Re(this,"conditionType");Re(this,"conditions");Re(this,"key");Re(this,"operator");Re(this,"value");this.key=t,this.value=a,this.operator=l,this.conditions=[],this.conditionType=this.buildConditionType(s),this.setConditions(i)}static make(t,a,l,s){return new this(t,a,l,s)}setConditionType(t){return this.conditionType=this.buildConditionType(t),this}buildConditionType(t){return t==="or"||t==="|"?"or":"and"}setOperator(t){return this.operator=t,this}setKey(t){return this.key=t,this}setValue(t){return this.value=t,this}addCondition(t){return this.conditions.push(t),this}setConditions(t){return this.conditions=Array.isArray(t)||t instanceof xs||typeof t=="function"?t:this.conditions,this}build(){if(Array.isArray(this.conditions)&&this.conditions.length>0){let l=[];return l=this.conditions.map(s=>s instanceof xs?s.build.bind(s)():s),{condition_type:this.conditionType,conditions:l}}const t=this.key instanceof Fr?this.key.build():this.key,a=this.value instanceof Fr?this.value.build():this.value;return{key:t,operator:this.operator,value:a}}}class HC{constructor(t,a){Re(this,"data");Re(this,"conditions");Re(this,"stateKey");Re(this,"matcher");Re(this,"modifier");this.data=a,this.stateKey=t,this.matcher=new LC,this.modifier=new RC}match(t,a,l,s=!0){let i="",c=this.matcher.getMatchingMethod(a);return c!=null?i=c:i=da.camel("match"+a),i in this.matcher&&typeof this.matcher[i]=="function"?this.matcher[i](t,l,a,s):s}evaluate(t,a="and"){if(t instanceof xs){const s=t.build.bind(t)();s.hasOwnProperty("conditions")?(t=s.conditions,a=s.condition_type):t=[s]}a=a==="or"?"or":"and";let l=a==="and";if(typeof t=="function")return t(this.stateKey,this.data);if(!Array.isArray(t))return!0;for(let s of t){let i=null;if(Array.isArray(rt.get(s,"conditions")))i=this.evaluate(s.conditions,rt.get(s,"condition_type","and"));else{if(s.key===null||s.key===void 0){l=!0;continue}i=this.applyCondition(s)}l=a==="and"?l&&i:l||i}return l}applyCondition(t){let a="",l=null;typeof t.key=="object"?a=rt.resolvePath(this.stateKey,rt.get(t,"key.accessor")):a=rt.resolvePath(this.stateKey,t.key);let s=rt.get(this.data,a);if(typeof t.value=="object"){const i=rt.resolvePath(this.stateKey,rt.get(t,"value.accessor"));l=rt.get(this.data,i)}else l=t.value;return s=this.applyModification(s,t.key.modifiers,this.stateKey),l=this.applyModification(l,t.value.modifiers,this.stateKey),this.match(s,t.operator,l)}applyModification(t,a,l){return Array.isArray(a)&&a.forEach(s=>{let i=s.operator,c="",p=this.modifier.getModificationMethod(i);if(p!=null?c=p:c=da.camel("apply"+i),c in this.modifier&&typeof this.modifier[c]=="function"){let m=s.value;typeof m=="object"&&m!==null&&(m=rt.getByPath(this.data,l,rt.get(m,"accessor"))),t=this.modifier[c](t,m,i,l,this.data)}}),t}}class XA{constructor(){Re(this,"_conditionType","and");Re(this,"_conditions",null)}conditionType(t){return this._conditionType=t,this}conditions(t){return this._conditions=Array.isArray(t)||t instanceof xs||typeof t=="function"?t:this._conditions,this}visibleIf(t){return this._conditions=t,this}buildConditions(t){return Array.isArray(t)&&t.length>0?t.map(a=>a instanceof xs?a.build.bind(a)():a):t}}class JA{constructor(){Re(this,"_events",{})}event(t,a){return this._events[t]=a,this}}class Lo{constructor(t=""){this._component="",this._affix=t}static component(t){const a=new Lo;return a._component="Affix/"+t,a}static make(t=""){return new this(t)}build(){return this._component.length>0?{component:this._component}:this._affix}}class $r{constructor(t,a="input"){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");this._key=t,this._type=a,this._class="",this._id="",this._name="",this._label="",this._value="",this._placeholder="",this._min="",this._max="",this._prefix="",this._hasPrefix=!1,this._hasSuffix=!1,this._suffix="",rs.install(this,jc),rs.install(this,JA),rs.install(this,XA),this._wrapperClass=""}static make(t,a="input"){return new this(t,a)}wrapperClass(t){return this._wrapperClass=t,this}type(t){return this._type=t,this}class(t){return this._class=t,this}id(t){return this._id=t,this}name(t){return this._name=t,this}label(t){return this._label=t,this}value(t){return this._value=t,this}placeholder(t){return this._placeholder=t,this}min(t){return this._min=t,this}max(t){return this._max=t,this}prefix(t){return this._hasPrefix=!0,this._prefix=t,this}suffix(t){this._hasSuffix=!0,this._suffix=t}onChange(t){return this._onChangeCallback=t,this}onKeyPress(t){return this._onKeyPressCallback=t,this}onKeyUp(t){return this._onKeyUpCallback=t,this}onKeyDown(t){return this._onKeyDownCallback=t,this}build(){return this._conditions,Array.isArray(this._conditions)&&this._conditions.length>0&&this._conditions.map(t=>t instanceof xs?t.build.bind(t)():t),this._attributes=typeof this._attributes=="object"?this._attributes:{},this._attributes.min=this._min,this._attributes.max=this._max,this._attributes.placeholder=this._placeholder,this._attributes.type=this._type,{key:this._key,type:this._type,class:this._class,id:this._id,name:this._name??u(da.headline(this._key)),label:this._label??u(da.headline(this._key)),value:this._value,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),hasSuffix:this._hasSuffix,hasPrefix:this._hasPrefix,suffix:this._suffix instanceof Lo?this._suffix.build():this._suffix,prefix:this._prefix instanceof Lo?this._prefix.build():this._prefix,min:this._min,max:this._max,placeholder:this._placeholder,attributes:this._attributes,events:this._events,wrapperClass:this._wrapperClass}}}class Er{constructor(t){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");this._type="section",this._key=t,this._schema=[],this._class="",this.disable_nesting=!0,rs.install(this,jc),rs.install(this,JA),rs.install(this,XA)}static make(t){return new this(t)}enableNesting(){return this.disable_nesting=!1,this}disableNesting(){return this.disable_nesting=!0,this}class(t){return this._class=t,this}get type(){return this._type}set type(t){if(typeof t=="string")this._type=t;else throw new TypeError("Type must be a string.")}get schema(){return this._schema}setSchema(t){return this._schema=t,this}build(){const t=tn.build(this.schema);return{key:this._key,type:this._type,class:this._class,schema:t,disable_nesting:this.disable_nesting,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),attributes:this._attributes}}}class Du{constructor(t,a){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");rs.install(this,$r,{key:t}),rs.install(this,Er,{key:t}),this._component=a,this._key=t}static make(t,a=""){return new this(t,a)}component(t){return this._component=t,this}value(t){return this._value=t,this}build(){const t=tn.build(this.schema??{});return{type:this._type,class:this._class,id:this._id,name:this._name??u(da.headline(this._key)),label:this._label??u(da.headline(this._key)),value:this._value,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),hasSuffix:this._hasSuffix,hasPrefix:this._hasPrefix,suffix:this._suffix,prefix:this._prefix,placeholder:this._placeholder,attributes:this._attributes,onChange:this._onChangeCallback,onKeyUp:this._onKeyUpCallback,onKeyDown:this._onKeyDownCallback,type:this._type,class:this._class,schema:t,disable_nesting:this.disable_nesting,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),type:"custom",component:this._component,key:this._key}}}class tn{static build(t){return Array.isArray(t)?tn.buildFromArray(t):typeof t=="object"?tn.buildFromObject(t):t}static buildFromObject(t){let a={};return Object.keys(t).forEach((l,s)=>{const i=t[l];i instanceof $r||i instanceof Er||i instanceof Du?a[l]=i.build.bind(i)():a[l]=t[l]}),a}static buildFromArray(t){let a={};return Array.isArray(t)&&t.forEach(l=>{if(l instanceof $r||l instanceof Er||l instanceof Du){let s=l.build.bind(l)();a[s.key]=s}else a[l.key]=l}),a}}class PC extends ol{constructor(){super(...arguments);Re(this,"data",{schema:{},defaults:{},_originalDefaults:{},values:{},initialized:!1,hasChange:!1,validationErrors:{},onChangeCallback:[]});Re(this,"nestedFormLayouts",["section","tab","tab-pane","grid"]);Re(this,"ignorableFormLayouts",["grid"])}get hasChange(){return this.data.hasChange}setSchema(a){return this.data.schema=tn.build(a??{}),this.initForm(),this}setDefaults(a){return this.data.defaults=a||{},this.data._originalDefaults=JSON.parse(JSON.stringify(this.data.defaults)),this.initForm(),this}get schema(){return this.data.schema}get values(){return this.data.values}get isReady(){return this.data.initialized}initForm(){if(typeof this.data.schema!="object"||typeof this.data.defaults!="object")throw new Error("You need to set Schema and Defaults First");this.setValues(),this.data.initialized=!0}setValues(){this.data.values=this.ensureNestedDataProperties(this.data.schema,this.data.defaults)}getState(){return this.data.values}setValidationErrors(a){this.data.validationErrors=a||{}}hasValidationError(a){return(this.data.validationErrors??{}).hasOwnProperty(a)}getValidationError(a){return this.data.validationErrors[a]}ensureNestedDataProperties(a,l={}){return Object.keys(a).reduce((s,i)=>{const c=a[i];if(c.type==="html")return s;if(this.nestedFormLayouts.includes(c.type??""))if(c.disable_nesting===!0){const p=this.ensureNestedDataProperties(c.schema??{},l??{});s={...s,...p}}else s[i]=this.ensureNestedDataProperties(c.schema??{},l[i]??{});else s[i]=l[i]??c.value??"";return s},{})}isVisible(a,l){return a.hasOwnProperty("conditions")?new HC(l,this.values).evaluate(rt.get(a,"conditions"),rt.get(a,"condition_type","and")):!0}triggerChange(a){for(let l of this.data.onChangeCallback)l(a)}onDataChanged(a){this.data.onChangeCallback.push(a)}setValue(a,l){rt.set(this.data.values,a,l),this.data.hasChange=!0,this.triggerChange(this.data.values)}reset(a=!0){if(!this.data.schema||!this.data._originalDefaults)throw new Error("Form is not initialized");const l=a?this.data._originalDefaults:this.data.defaults;return this.data.values=this.ensureNestedDataProperties(this.data.schema,JSON.parse(JSON.stringify(l))),this.data.validationErrors={},this.data.hasChange=!1,this.data.initialized=!0,this}}function cd(){return PC.init()}const NC=["innerHTML"],Ur={__name:"FieldNote",props:{note:String},setup(e){return(t,a)=>(r(),h("div",{class:"form-note",innerHTML:e.note},null,8,NC))}},KC=Object.freeze(Object.defineProperty({__proto__:null,default:Ur},Symbol.toStringTag,{value:"Module"})),Vu=Object.assign({name:"ValidationError"},{__name:"ValidationErrorNew",props:{errorKey:String,form:{type:Object,required:!0}},setup(e){return(t,a)=>e.form.hasValidationError(e.errorKey)?(r(),h("div",{key:0,class:ie(`fluent-cart-admin-validation-error-wrapper ${e.errorKey}`)},[(r(!0),h(H,null,ae(e.form.getValidationError(e.errorKey),(l,s)=>(r(),h("span",{class:"fluent-cart-admin-validation-error",key:l.toLowerCase().replace(/\s/g,"")},f(l),1))),128))],2)):k("",!0)}}),ZA={__name:"Resolver",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},label:{type:String},attribute:{type:Object},callback:{type:Function}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue"),a=Object.assign({"./Affix/Test.vue":()=>Yt(()=>import("./chunks/Test.js?ver=1.5.3"),[],import.meta.url),"./Base/Inputs/Checkbox.vue":()=>Yt(()=>Promise.resolve().then(()=>l2),void 0,import.meta.url),"./Base/Inputs/ColorPicker.vue":()=>Yt(()=>Promise.resolve().then(()=>_2),void 0,import.meta.url),"./Base/Inputs/Date.vue":()=>Yt(()=>Promise.resolve().then(()=>v2),void 0,import.meta.url),"./Base/Inputs/FieldNote.vue":()=>Yt(()=>Promise.resolve().then(()=>KC),void 0,import.meta.url),"./Base/Inputs/Input.vue":()=>Yt(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url),"./Base/Inputs/Media.vue":()=>Yt(()=>Promise.resolve().then(()=>N2),void 0,import.meta.url),"./Base/Inputs/RadioGroup.vue":()=>Yt(()=>Promise.resolve().then(()=>n2),void 0,import.meta.url),"./Base/Inputs/RemoteSearchableSelect.vue":()=>Yt(()=>Promise.resolve().then(()=>w2),void 0,import.meta.url),"./Base/Inputs/Select.vue":()=>Yt(()=>Promise.resolve().then(()=>b2),void 0,import.meta.url),"./Base/Inputs/Switch.vue":()=>Yt(()=>Promise.resolve().then(()=>a2),void 0,import.meta.url),"./Base/Inputs/Time.vue":()=>Yt(()=>Promise.resolve().then(()=>g2),void 0,import.meta.url),"./Base/Layouts/FormGrid.vue":()=>Yt(()=>Promise.resolve().then(()=>jC),void 0,import.meta.url),"./Base/Layouts/FormSection.vue":()=>Yt(()=>Promise.resolve().then(()=>JC),void 0,import.meta.url),"./Base/Layouts/FormTab.vue":()=>Yt(()=>Promise.resolve().then(()=>ZC),void 0,import.meta.url),"./Base/Layouts/FormTabPane.vue":()=>Yt(()=>Promise.resolve().then(()=>e2),void 0,import.meta.url),"./Coupon/BuyProducts.vue":()=>Yt(()=>import("./chunks/BuyProducts.js?ver=1.5.3"),[],import.meta.url),"./Coupon/Categories.vue":()=>Yt(()=>import("./chunks/Categories.js?ver=1.5.3"),[],import.meta.url),"./Coupon/Code.vue":()=>Yt(()=>import("./chunks/Code.js?ver=1.5.3"),[],import.meta.url),"./Coupon/GetProducts.vue":()=>Yt(()=>import("./chunks/GetProducts.js?ver=1.5.3"),[],import.meta.url),"./Coupon/IncludeExclude/Categories.vue":()=>Yt(()=>import("./chunks/Categories2.js?ver=1.5.3"),[],import.meta.url),"./Coupon/IncludeExclude/Product.vue":()=>Yt(()=>import("./chunks/Product.js?ver=1.5.3"),[],import.meta.url),"./Coupon/Products.vue":()=>Yt(()=>import("./chunks/Products.js?ver=1.5.3"),[],import.meta.url),"./McpSettings.vue":()=>Yt(()=>import("./chunks/McpSettings.js?ver=1.5.3"),[],import.meta.url),"./ModuleSettings.vue":()=>Yt(()=>import("./chunks/ModuleSettings.js?ver=1.5.3"),[],import.meta.url),"./PaymentView.vue":()=>Yt(()=>import("./chunks/PaymentView.js?ver=1.5.3"),[],import.meta.url),"./StoreSettings/AddressComponent.vue":()=>Yt(()=>import("./chunks/AddressComponent.js?ver=1.5.3"),[],import.meta.url),"./StoreSettings/CreatePageButton.vue":()=>Yt(()=>import("./chunks/CreatePageButton.js?ver=1.5.3"),[],import.meta.url),"./StoreSettings/PageSelector.vue":()=>Yt(()=>import("./chunks/PageSelector.js?ver=1.5.3"),[],import.meta.url),"./TurnstileSettings.vue":()=>Yt(()=>import("./chunks/TurnstileSettings.js?ver=1.5.3"),[],import.meta.url)}),l=Af(null);Ie(()=>{s(i.name)});const s=async c=>{const p=`./${c}.vue`;a[p]&&(l.value=(await a[p]()).default)},i=e;return(c,p)=>(r(),h(H,null,[(r(),E(Cl(l.value),ya({name:e.name,field:e.field,fieldKey:e.fieldKey,value:e.value,variant:e.variant,nesting:e.nesting,statePath:e.statePath,form:e.form,attribute:e.attribute,label:e.label,callback:e.callback},{modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=m=>t.value=m)}),null,16,["modelValue"])),ka(c.$slots,"fieldNote"),ka(c.$slots,"validationError")],64))}},GC=["id"],Ad={__name:"FormGrid",props:{field:{type:Object},fieldKey:{type:String},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>{var l,s,i,c,p,m,_,g,y,v;return r(),h("div",{class:"gap-2 grid grid-cols-dynamic sm:grid-cols-sm-dynamic md:grid-cols-md-dynamic lg:grid-cols-lg--dynamic",id:e.field.id||"",style:ra({"--grid-columns":((l=e.field.columns)==null?void 0:l.default)??2,"--sm-grid-columns":((s=e.field.columns)==null?void 0:s.sm)??((i=e.field.columns)==null?void 0:i.default)??2,"--md-grid-columns":((c=e.field.columns)==null?void 0:c.sm)??((p=e.field.columns)==null?void 0:p.md)??((m=e.field.columns)==null?void 0:m.default)??2,"--lg-grid-columns":((_=e.field.columns)==null?void 0:_.lg)??((g=e.field.columns)==null?void 0:g.md)??((y=e.field.columns)==null?void 0:y.sm)??((v=e.field.columns)==null?void 0:v.default)??2})},[n(_i,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])],12,GC)}}},jC=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),zC={key:0,class:"fct-content-card-header"},qC={key:0,class:"title"},YC={key:1,class:"fct-content-card-action"},WC={__name:"ContentCard",props:["title","show_heading"],setup(e){return(t,a)=>(r(),h("div",{class:ie({"fct-content-card":e.show_heading!==!1})},[e.show_heading!==!1?(r(),h("div",zC,[e.title||t.$slots.title?(r(),h("div",qC,[ka(t.$slots,"title",{},()=>[R(f(e.title),1)])])):k("",!0),t.$slots.action?(r(),h("div",YC,[ka(t.$slots,"action")])):k("",!0)])):k("",!0),o("div",{class:ie({"fct-content-card-body":e.show_heading!==!1})},[ka(t.$slots,"default")],2)],2))}},XC=["id"],ep={__name:"FormSection",props:{field:{type:Object},fieldKey:{type:String},value:{type:Object},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>(r(),h("div",{class:"form-section",id:e.field.id||""},[n(ke,null,{default:d(()=>[e.field.show_title!==!1?(r(),E(Qe,{key:0,title:e.field.title,border_bottom:""},null,8,["title"])):k("",!0),n(Ce,null,{default:d(()=>[n(Ad,{form:e.form,field:e.field,statePath:e.statePath,value:e.value},null,8,["form","field","statePath","value"])]),_:1})]),_:1})],8,XC))}},JC=Object.freeze(Object.defineProperty({__proto__:null,default:ep},Symbol.toStringTag,{value:"Module"})),tp={__name:"FormTab",props:{field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){const t=e,a=T(""),l=T([]),s=ll(),i=_=>{const g=_.props.name;c(g)},c=_=>{const g=new URL(window.location.href);g.hash=`#/settings/${_}`,window.history.replaceState(null,"",g.toString())},p=()=>{const g=window.location.hash.split("/").pop().split("#")[0];l.value=Object.keys(t.field.schema);const y=l.value.find(v=>v===g);y?a.value=y:a.value=t.field.default_tab};let m;return Ie(()=>{m=s.beforeEach((_,g,y)=>{y(),setTimeout(()=>{p()},200)}),p()}),kt(()=>{m&&m()}),(_,g)=>{const y=B("el-tabs");return r(),E(y,{modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=v=>a.value=v),class:ie(["fct-tabs-button",{"hidden-switch":e.field.hide_tab_switch}]),onTabClick:i,type:"card"},{default:d(()=>[n(_i,{form:e.form,schema:e.field.schema,value:e.value,"state-path":e.statePath},null,8,["form","schema","value","state-path"])]),_:1},8,["modelValue","class"])}}},ZC=Object.freeze(Object.defineProperty({__proto__:null,default:tp},Symbol.toStringTag,{value:"Module"})),ap={__name:"FormTabPane",props:{fieldKey:{type:String},field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>{const l=B("el-tab-pane");return r(),E(l,{label:e.field.title,name:e.fieldKey},{default:d(()=>[n(_i,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])]),_:1},8,["label","name"])}}},e2=Object.freeze(Object.defineProperty({__proto__:null,default:ap},Symbol.toStringTag,{value:"Module"}));class pd{}Re(pd,"attributesBuilders",async(t,a,l)=>{if(t.attributes||(t.attributes={}),t.class&&(t.attributes.class=t.class),t.placeholder&&(t.attributes.placeholder=t.placeholder),typeof a!="function")return t.attributes??{};let s={};typeof t.events!="object"&&(s={}),s.hasOwnProperty("onChange")&&typeof s.onChange=="function"?s.onChange=(...i)=>{l.data.hasChange=!0,s.onChange(i)}:s.onChange=()=>{l.data.hasChange=!0};for(let i in t.events)s[i]=(...c)=>{a(t.events[i],c)};for(let i in t.attributes??{}){let c=t.attributes[i];typeof c=="function"&&await a(c,{})}return{...t.attributes??{},...s}});const t2={__name:"LayoutRenderer",props:{form:{type:Object,required:!0},field:{type:Object,required:!0},value:{type:Object,required:!0},statePath:{type:String,required:!0},fieldKey:{type:String,required:!0},fullStatePath:{type:String,required:!0}},setup(e){const t=e;zt().ctx;const a=(i,c)=>{if(typeof i=="function")return i({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(c)&&c.length===1?c[0]:c})},l=T(!1),s=T({});return Ie(async()=>{s.value=await pd.attributesBuilders(t.field,a,t.form),l.value=!0}),(i,c)=>(r(),h(H,null,[e.field.type==="grid"&&typeof e.field.schema<"u"?(r(),E(Ad,ya({key:0,class:e.field.wrapperClass,form:e.form,field:e.field,value:e.value,fieldKey:e.fieldKey,statePath:e.fullStatePath},s.value),null,16,["class","form","field","value","fieldKey","statePath"])):k("",!0),e.field.type==="tab"&&typeof e.field.schema<"u"?(r(),E(tp,ya({key:1,form:e.form,field:e.field,value:e.value,statePath:e.fullStatePath},s.value),null,16,["form","field","value","statePath"])):k("",!0),e.field.type==="tab-pane"&&typeof e.field.schema<"u"&&typeof e.field.title<"u"?(r(),E(ap,ya({key:2,form:e.form,field:e.field,value:e.value,fieldKey:e.fieldKey,statePath:e.fullStatePath},s.value),null,16,["form","field","value","fieldKey","statePath"])):k("",!0),e.field.type==="section"?(r(),E(ep,ya({key:3,form:e.form,statePath:e.field.disable_nesting===!0?e.fullStatePath:e.fieldKey+".",field:e.field,"field-key":e.fieldKey,value:e.field.disable_nesting===!0?e.value:e.value[e.fieldKey],nesting:e.field.disable_nesting===!0},s.value),null,16,["form","statePath","field","field-key","value","nesting"])):k("",!0)],64))}},lp={__name:"Switch",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue");return(a,l)=>{const s=B("el-switch");return r(),E(s,ya({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i),disabled:e.field.disabled},e.attribute),null,16,["modelValue","disabled"])}}},a2=Object.freeze(Object.defineProperty({__proto__:null,default:lp},Symbol.toStringTag,{value:"Module"})),sp={__name:"Checkbox",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue");return(a,l)=>{const s=B("el-checkbox");return r(),E(s,ya({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i)},e.attribute,{"true-value":"yes","false-value":"no",disabled:e.field.disabled}),{default:d(()=>[R(f(e.label),1)]),_:1},16,["modelValue","disabled"])}}},l2=Object.freeze(Object.defineProperty({__proto__:null,default:sp},Symbol.toStringTag,{value:"Module"})),s2=["innerHTML"],np={__name:"RadioGroup",props:_l({field:{type:Object},statePath:{type:String},value:{required:!0},form:{type:Object},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue"),a=e,l=T([]),s=async(i="")=>{if(typeof a.field.options=="function")return l.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:i});if(Array.isArray(a.field.options))return l.value=[...a.field.options]};return Ie(async()=>{await s()}),(i,c)=>{const p=B("el-radio"),m=B("el-radio-group");return r(),E(m,ya({modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=_=>t.value=_)},e.attribute),{default:d(()=>[(r(!0),h(H,null,ae(e.field.options,(_,g)=>(r(),E(p,{key:g,value:_.value,class:ie(_.option_class)},{default:d(()=>[o("div",null,f(_.label),1),o("div",{innerHTML:_.note},null,8,s2)]),_:2},1032,["value","class"]))),128))]),_:1},16,["modelValue"])}}},n2=Object.freeze(Object.defineProperty({__proto__:null,default:np},Symbol.toStringTag,{value:"Module"})),o2=["innerHTML"],Ns={__name:"Input",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=zt().ctx,a=Sl(e,"modelValue"),l=e,s=T(),i=async()=>{typeof l.field.prefix=="function"?s.value=await l.callback(l.field.prefix):s.value=l.field.prefix};return Ie(()=>{i()}),pf(()=>{i()}),N(()=>l.fieldKey==="amount"?l.form.data.values.type==="fixed"?je.shop.get("currency_sign"):"%":t.appVars.shop.currency_sign),(c,p)=>{var _;const m=B("el-input");return r(),E(m,ya({modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=g=>a.value=g)},e.attribute,{disabled:e.field.disabled}),la({_:2},[(_=e.field.prefix)!=null&&_.component?{name:"prefix",fn:d(()=>[n(ZA,{form:e.form,name:e.field.prefix.component,field:e.field,value:e.value},null,8,["form","name","field","value"])]),key:"0"}:e.field.prefix?{name:"prefix",fn:d(()=>[o("div",{innerHTML:s.value},null,8,o2)]),key:"1"}:void 0]),1040,["modelValue","disabled"])}}},i2=Object.freeze(Object.defineProperty({__proto__:null,default:Ns},Symbol.toStringTag,{value:"Module"})),r2={key:0,class:"fct-color-presets-section"},d2=["aria-label"],u2=["aria-label","aria-pressed","tabindex","onClick","onKeydown"],c2={class:"fct-color-custom-row"},A2={class:"fct-term-color-picker-wrap fct-term-color-picker-wrap--lg"},p2={key:1,class:"fct-color-picker-box"},f2={class:"fct-color-picker-trigger-wrap"},m2={key:0,class:"text-xs text-system-light"},h2={key:1,class:"fct-color-picker-action-wrap"},fd={__name:"ColorPicker",props:_l({field:{type:Object},statePath:{type:String},value:{default:null},form:{type:Object},callback:{type:Function},label:{type:String},attribute:{default:()=>({})},withPresets:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue"),a=()=>{t.value=""},l=m=>m?hs.findIndex(_=>_.toLowerCase()===m.toLowerCase()):-1,s=T(Math.max(0,l(t.value)));be(t,m=>{const _=l(m);_>=0&&(s.value=_)});const i=T([]),c=(m,_)=>{t.value=m,s.value=_},p=(m,_)=>{let g=_;if(m.key==="ArrowRight"||m.key==="ArrowDown")g=(_+1)%hs.length;else if(m.key==="ArrowLeft"||m.key==="ArrowUp")g=(_-1+hs.length)%hs.length;else if(m.key==="Home")g=0;else if(m.key==="End")g=hs.length-1;else return;m.preventDefault(),c(hs[g],g),xe(()=>{i.value[g]&&i.value[g].focus()})};return(m,_)=>{const g=B("el-color-picker"),y=B("el-input");return e.withPresets?(r(),h("div",r2,[o("div",{class:"fct-color-swatch-grid",role:"group","aria-label":A(u)("Color presets")},[(r(!0),h(H,null,ae(A(hs),(v,C)=>(r(),h("button",{key:v,ref_for:!0,ref:w=>i.value[C]=w,type:"button",class:ie(["fct-color-swatch",{"is-active":t.value&&t.value.toLowerCase()===v.toLowerCase()}]),style:ra({background:v,"--swatch-color":v}),"aria-label":A(u)("Select color %1$s",v),"aria-pressed":!!(t.value&&t.value.toLowerCase()===v.toLowerCase()),tabindex:C===s.value?0:-1,onClick:w=>c(v,C),onKeydown:w=>p(w,C)},null,46,u2))),128))],8,d2),o("div",c2,[o("div",A2,[n(g,ya({modelValue:t.value,"onUpdate:modelValue":_[0]||(_[0]=v=>t.value=v),"color-format":"hex"},e.attribute,{disabled:e.field&&e.field.disabled}),null,16,["modelValue","disabled"])]),n(y,{modelValue:t.value,"onUpdate:modelValue":_[1]||(_[1]=v=>t.value=v),placeholder:A(u)("#000000"),"aria-label":A(u)("Hex color code")},null,8,["modelValue","placeholder","aria-label"])])])):(r(),h("div",p2,[o("div",f2,[n(g,ya({modelValue:t.value,"onUpdate:modelValue":_[2]||(_[2]=v=>t.value=v)},e.attribute,{disabled:e.field&&e.field.disabled,"popper-class":"fct-color-picker-popover"}),null,16,["modelValue","disabled"]),t.value?k("",!0):(r(),E(J,{key:0,name:"ColorPicker",class:"fct-color-picker-icon w-4 h-4"}))]),t.value?k("",!0):(r(),h("span",m2,f(A(u)("Add...")),1)),t.value?(r(),h("div",h2,[o("span",null,f(t.value),1),n(J,{name:"Cross",class:"fct-color-picker-action w-5 h-5",onClick:a})])):k("",!0)]))}}},_2=Object.freeze(Object.defineProperty({__proto__:null,default:fd},Symbol.toStringTag,{value:"Module"})),op={__name:"Date",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue");return(a,l)=>{const s=B("el-date-picker");return r(),E(s,ya({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},v2=Object.freeze(Object.defineProperty({__proto__:null,default:op},Symbol.toStringTag,{value:"Module"})),ip={__name:"Time",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue");return(a,l)=>{const s=B("el-time-select");return r(),E(s,ya({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},g2=Object.freeze(Object.defineProperty({__proto__:null,default:ip},Symbol.toStringTag,{value:"Module"})),y2={key:0},rp={__name:"Select",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue"),a=e,l=T([]),s=T(!1),i=async(p="")=>{s.value=!0,typeof a.field.options=="function"&&(l.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:p})),Array.isArray(a.field.options)&&(l.value=[...a.field.options]),s.value=!1};Ie(async()=>{await i()});const c=p=>typeof p.disabled=="function"?a.callback(p.disabled,{}):p.disabled;return(p,m)=>{const _=B("el-option"),g=B("el-select");return r(),E(g,ya({modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=y=>t.value=y)},e.attribute,{"remote-method":i,loading:s.value,filterable:e.field.filterable===!0,clearable:e.field.clearable===!0,disabled:e.field.disabled}),{default:d(()=>[(r(!0),h(H,null,ae(l.value,(y,v)=>(r(),E(_,{key:v,value:y.value,label:y.label,disabled:c(y)},{default:d(()=>[y.slot?(r(),h("span",y2,f(y.slot),1)):k("",!0)]),_:2},1032,["value","label","disabled"]))),128))]),_:1},16,["modelValue","loading","filterable","clearable","disabled"])}}},b2=Object.freeze(Object.defineProperty({__proto__:null,default:rp},Symbol.toStringTag,{value:"Module"})),dp={__name:"RemoteSearchableSelect",props:_l({field:{type:Object},key:{type:String}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue"),a=e,l=T(!1),s=T(a.field.options||[]),i=c=>{if(a.field.search_only_on_type===!0){if(c.query.length===0)return}else if(c.query.length<1&&s.value.length>0)return;l.value=!0,ce.get("forms/search_options",{search_by:c.query,search_for:c.key}).then(p=>{s.value=p.options,l.value=!1})};return(c,p)=>{const m=B("el-option"),_=B("el-select");return r(),E(_,{modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=g=>t.value=g),filterable:"",remote:"",placeholder:e.field.placeholder??A(u)("Please enter a keyword"),"remote-method":g=>{i({query:g,key:e.field.remote_key})},loading:l.value,multiple:e.field.multiple},{default:d(()=>[(r(!0),h(H,null,ae(s.value,g=>(r(),E(m,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","remote-method","loading","multiple"])}}},w2=Object.freeze(Object.defineProperty({__proto__:null,default:dp},Symbol.toStringTag,{value:"Module"}));function sn(e,t){t===void 0&&(t={});var a=t.insertAt;if(e&&typeof document<"u"){var l=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",a==="top"&&l.firstChild?l.insertBefore(s,l.firstChild):l.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}sn(".vel-fade-enter-active,.vel-fade-leave-active{-webkit-transition:all .3s ease;transition:all .3s ease}.vel-fade-enter-from,.vel-fade-leave-to{opacity:0}.vel-img-swiper{display:block;position:relative}.vel-modal{background:rgba(0,0,0,.5);bottom:0;left:0;margin:0;position:fixed;right:0;top:0;z-index:9998}.vel-img-wrapper{left:50%;margin:0;position:absolute;top:50%;-webkit-transform:translate(-50% -50%);transform:translate(-50% -50%);-webkit-transition:.3s linear;transition:.3s linear;will-change:transform opacity}.vel-img,.vel-img-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-img{background-color:rgba(0,0,0,.7);-webkit-box-shadow:0 5px 20px 2px rgba(0,0,0,.7);box-shadow:0 5px 20px 2px rgba(0,0,0,.7);display:block;max-height:80vh;max-width:80vw;position:relative;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}@media (max-width:750px){.vel-img{max-height:95vh;max-width:85vw}}.vel-btns-wrapper{position:static}.vel-btns-wrapper .btn__close,.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;font-size:32px;opacity:.6;outline:none;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:.15s linear;transition:.15s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-btns-wrapper .btn__close:hover,.vel-btns-wrapper .btn__next:hover,.vel-btns-wrapper .btn__prev:hover{opacity:1}.vel-btns-wrapper .btn__close.disable,.vel-btns-wrapper .btn__close.disable:hover,.vel-btns-wrapper .btn__next.disable,.vel-btns-wrapper .btn__next.disable:hover,.vel-btns-wrapper .btn__prev.disable,.vel-btns-wrapper .btn__prev.disable:hover{cursor:default;opacity:.2}.vel-btns-wrapper .btn__next{right:12px}.vel-btns-wrapper .btn__prev{left:12px}.vel-btns-wrapper .btn__close{right:10px;top:24px}@media (max-width:750px){.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{font-size:20px}.vel-btns-wrapper .btn__close{font-size:24px}.vel-btns-wrapper .btn__next{right:4px}.vel-btns-wrapper .btn__prev{left:4px}}.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:12px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:12px}@media (max-width:750px){.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:4px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:4px}}.vel-modal.is-rtl .vel-img-title{direction:rtl}");sn('.vel-loading{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-loading .ring{display:inline-block;height:64px;width:64px}.vel-loading .ring:after{-webkit-animation:ring 1.2s linear infinite;animation:ring 1.2s linear infinite;border-color:hsla(0,0%,100%,.7) transparent;border-radius:50%;border-style:solid;border-width:5px;content:" ";display:block;height:46px;margin:1px;width:46px}@-webkit-keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}');sn(".vel-on-error{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-on-error .icon{color:#aaa;font-size:80px}");sn(".vel-img-title{bottom:60px;color:#ccc;cursor:default;font-size:12px;left:50%;line-height:1;max-width:80%;opacity:.8;overflow:hidden;position:absolute;text-align:center;text-overflow:ellipsis;-webkit-transform:translate(-50%);transform:translate(-50%);-webkit-transition:opacity .15s;transition:opacity .15s;white-space:nowrap}.vel-img-title:hover{opacity:1}");sn(".vel-icon{fill:currentColor;height:1em;overflow:hidden;vertical-align:-.15em;width:1em}");sn(".vel-toolbar{border-radius:4px;bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;left:50%;opacity:.9;overflow:hidden;padding:0;position:absolute;-webkit-transform:translate(-50%);transform:translate(-50%)}.vel-toolbar,.vel-toolbar .toolbar-btn{background-color:#2d2d2d;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-toolbar .toolbar-btn{-ms-flex-negative:0;-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;flex-shrink:0;font-size:20px;outline:none;padding:6px 10px}.vel-toolbar .toolbar-btn:active,.vel-toolbar .toolbar-btn:hover{background-color:#3d3d3d}");const bl="vel",El=jl({name:"SvgIcon",props:{type:{type:String,default:""}},setup:e=>()=>n("svg",{class:`${bl}-icon icon`,"aria-hidden":"true"},[n("use",{"xlink:href":`#icon-${e.type}`},null)])}),mi=typeof window<"u",Ks=()=>{};let up=!1;if(mi)try{const e={};Object.defineProperty(e,"passive",{get(){up=!0}}),window.addEventListener("test-passive",Ks,e)}catch{}const Tu=function(e,t,a){let l=arguments.length>3&&arguments[3]!==void 0&&arguments[3];mi&&e.addEventListener(t,a,!!up&&{capture:!1,passive:l})},Mu=(e,t,a)=>{mi&&e.removeEventListener(t,a)},C2=e=>{e.preventDefault()},B2=Object.prototype.toString,md=e=>t=>B2.call(t).slice(8,-1)===e,k2=e=>!!e&&md("Object")(e),Lu=e=>!!e&&md("String")(e);function x2(e){return e!=null}const S2=jl({name:"Toolbar",props:{zoomIn:{type:Function,default:Ks},zoomOut:{type:Function,default:Ks},rotateLeft:{type:Function,default:Ks},rotateRight:{type:Function,default:Ks},resize:{type:Function,default:Ks},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1}},setup:e=>()=>n("div",{class:`${bl}-toolbar`},[!e.zoomDisabled&&n(H,null,[n("div",{role:"button","aria-label":"zoom in button",class:"toolbar-btn toolbar-btn__zoomin",onClick:e.zoomIn},[n(El,{type:"zoomin"},null)]),n("div",{role:"button","aria-label":"zoom out button",class:"toolbar-btn toolbar-btn__zoomout",onClick:e.zoomOut},[n(El,{type:"zoomout"},null)])]),n("div",{role:"button","aria-label":"resize image button",class:"toolbar-btn toolbar-btn__resize",onClick:e.resize},[n(El,{type:"resize"},null)]),!e.rotateDisabled&&n(H,null,[n("div",{role:"button","aria-label":"image rotate left button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateLeft},[n(El,{type:"rotate-left"},null)]),n("div",{role:"button","aria-label":"image rotate right button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateRight},[n(El,{type:"rotate-right"},null)])])])}),F2=()=>n("div",{class:`${bl}-loading`},[n("div",{class:"ring"},null)]),$2=()=>n("div",{class:`${bl}-on-error`},[n("div",{class:"ring"},null),n(El,{type:"img-broken"},null)]),E2=(e,t)=>{let{slots:a}=t;return n("div",{class:`${bl}-img-title`},[a.default?a.default():""])},U2=jl({name:"DefaultIcons",setup:()=>()=>n("svg",{"aria-hidden":!0,style:"position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden;"},[n("symbol",{id:"icon-rotate-right",viewBox:"0 0 1024 1024"},[n("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973z m282.559912-479.07185A509.887841 509.887841 0 0 0 511.99984 0.00032C229.215928 0.00032 0 229.216248 0 512.00016s229.215928 511.99984 511.99984 511.99984 511.99984-229.215928 511.99984-511.99984c0-3.743999-0.032-7.455998-0.128-11.167997-1.631999-11.295996-8.159997-27.103992-31.87199-27.103991-27.487991 0-31.67999 21.247993-32.03199 32.06399l0.032 4.127999a30.62399 30.62399 0 0 0 0.16 2.079999H959.9997c0 247.423923-200.575937 447.99986-447.99986 447.99986S63.99998 759.424083 63.99998 512.00016 264.575917 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 1 277.439913 96.22397l-94.91197 91.679971c-25.439992 24.607992-17.439995 44.991986 17.887994 45.599986l188.031942 3.295999a64.31998 64.31998 0 0 0 65.055979-62.84798l3.295999-188.127942C969.407697 15.040315 949.311703 5.792318 923.871711 30.368311l-87.999972 85.023973z",fill:""},null)]),n("symbol",{id:"icon-rotate-left",viewBox:"0 0 1024 1024"},[n("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973zM188.159941 115.392284A509.887841 509.887841 0 0 1 511.99984 0.00032c282.783912 0 511.99984 229.215928 511.99984 511.99984s-229.215928 511.99984-511.99984 511.99984S0 794.784072 0 512.00016c0-3.743999 0.032-7.455998 0.128-11.167997 1.631999-11.295996 8.159997-27.103992 31.87199-27.103991 27.487991 0 31.67999 21.247993 32.03199 32.06399L63.99998 509.920161a30.62399 30.62399 0 0 1-0.16 2.079999H63.99998c0 247.423923 200.575937 447.99986 447.99986 447.99986s447.99986-200.575937 447.99986-447.99986S759.423763 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 0-277.439913 96.22397l94.91197 91.679971c25.439992 24.607992 17.439995 44.991986-17.887994 45.599986L123.551961 300.800226a64.31998 64.31998 0 0 1-65.055979-62.84798l-3.295999-188.127942C54.591983 15.040315 74.687977 5.792318 100.127969 30.368311l87.999972 85.023973z",fill:""},null)]),n("symbol",{id:"icon-resize",viewBox:"0 0 1024 1024"},[n("path",{d:"M456.036919 791.8108 270.553461 791.8108 460.818829 601.572038l-39.593763-39.567157L231.314785 751.915162l0.873903-183.953615c0-15.465227-12.515035-27.981285-27.981285-27.981285s-27.981285 12.515035-27.981285 27.981285l0 251.829516c0 8.3072 3.415796 14.975063 8.826016 19.564591 5.082762 5.192256 12.132318 8.416693 19.947308 8.416693l251.036453 0c15.46625 0 27.981285-12.514012 27.981285-27.981285C484.018204 804.325835 471.504192 791.8108 456.036919 791.8108zM838.945819 184.644347c-5.082762-5.191232-12.132318-8.416693-19.947308-8.416693L567.961034 176.227654c-15.46625 0-27.981285 12.515035-27.981285 27.981285 0 15.46625 12.514012 27.981285 27.981285 27.981285l185.483458 0L563.206754 422.427962l39.567157 39.567157 189.910281-189.910281-0.873903 183.953615c0 15.46625 12.514012 27.981285 27.981285 27.981285s27.981285-12.514012 27.981285-27.981285L847.772858 204.208938C847.771835 195.902762 844.356039 189.234899 838.945819 184.644347zM847.771835 64.303538 176.227142 64.303538c-61.809741 0-111.924115 50.115398-111.924115 111.924115l0 671.544693c0 61.809741 50.114374 111.924115 111.924115 111.924115l671.544693 0c61.809741 0 111.924115-50.114374 111.924115-111.924115l0-671.544693C959.69595 114.418936 909.581576 64.303538 847.771835 64.303538zM903.733381 847.772346c0 30.878265-25.056676 55.962569-55.962569 55.962569L176.227142 903.734916c-30.90487 0-55.962569-25.084305-55.962569-55.962569l0-671.544693c0-30.9325 25.056676-55.962569 55.962569-55.962569l671.544693 0c30.90487 0 55.962569 25.03007 55.962569 55.962569L903.734404 847.772346z"},null)]),n("symbol",{id:"icon-img-broken",viewBox:"0 0 1024 1024"},[n("path",{d:"M810.666667 128H213.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333v597.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h597.333334c46.933333 0 85.333333-38.4 85.333333-85.333333V213.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z m0 682.666667H213.333333v-195.413334l42.24 42.24 170.666667-170.666666 170.666667 170.666666 170.666666-170.24L810.666667 530.346667V810.666667z m0-401.493334l-43.093334-43.093333-170.666666 171.093333-170.666667-170.666666-170.666667 170.666666-42.24-42.666666V213.333333h597.333334v195.84z"},null)]),n("symbol",{id:"icon-prev",viewBox:"0 0 1024 1024"},[n("path",{d:"M784.652701 955.6957 346.601985 517.644983c-2.822492-2.822492-2.822492-7.902977 0-11.289967l439.179713-439.179713c6.77398-6.77398 10.725469-16.370452 10.725469-25.966924L796.507166 36.692393c0-20.32194-16.370452-36.692393-36.692393-36.692393l-4.515987 0c-9.596472 0-19.192944 3.951488-25.966924 10.725469L250.072767 489.420066c-12.418964 12.418964-12.418964 32.740904 0 45.159868l477.565601 477.565601c7.338479 7.338479 17.499449 11.854465 28.224917 11.854465l0 0c22.015436 0 40.079383-18.063947 40.079383-40.079383l0 0C796.507166 973.759647 791.99118 963.598677 784.652701 955.6957z"},null)]),n("symbol",{id:"icon-next",viewBox:"0 0 1024 1024"},[n("path",{d:"M246.121279 955.6957l438.050717-438.050717c2.822492-2.822492 2.822492-7.902977 0-11.289967L244.992282 67.175303c-6.77398-6.77398-10.725469-16.370452-10.725469-25.966924L234.266814 36.692393C234.266814 16.370452 250.637266 0 270.959206 0l4.515987 0c9.596472 0 19.192944 3.951488 25.966924 10.725469l478.694598 478.694598c12.418964 12.418964 12.418964 32.740904 0 45.159868l-477.565601 477.565601c-7.338479 7.338479-17.499449 11.854465-28.224917 11.854465l0 0c-22.015436 0-40.079383-18.063947-40.079383-40.079383l0 0C234.266814 973.759647 238.7828 963.598677 246.121279 955.6957z"},null)]),n("symbol",{id:"icon-zoomin",viewBox:"0 0 1024 1024"},[n("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),n("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null),n("path",{d:"M367.488 238.144h127.104v390.72H367.488z"},null)]),n("symbol",{id:"icon-close",viewBox:"0 0 1024 1024"},[n("path",{d:"M570.24 512l259.2 259.2-58.88 58.24L512 570.24l-261.12 261.12-58.24-58.24L453.76 512 194.56 252.8l58.24-58.24L512 453.76l261.12-261.12 58.24 58.24z"},null)]),n("symbol",{id:"icon-zoomout",viewBox:"0 0 1024 1024"},[n("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),n("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null)])])}),kn=mi?window:global;let Ru=Date.now();function I2(e){const t=Date.now(),a=Math.max(0,16-(t-Ru)),l=setTimeout(e,a);return Ru=t+a,l}function Gi(e){return(kn.requestAnimationFrame||I2).call(kn,e)}function Ou(e){(kn.cancelAnimationFrame||kn.clearTimeout).call(kn,e)}function Hu(e,t){const a=e.clientX-t.clientX,l=e.clientY-t.clientY;return Math.sqrt(a*a+l*l)}function ji(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ff(e)}var zi=jl({name:"VueEasyLightbox",props:{imgs:{type:[Array,String],default:()=>""},visible:{type:Boolean,default:!1},index:{type:Number,default:0},scrollDisabled:{type:Boolean,default:!0},escDisabled:{type:Boolean,default:!1},moveDisabled:{type:Boolean,default:!1},titleDisabled:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},teleport:{type:[String,Object],default:null},swipeTolerance:{type:Number,default:50},loop:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},zoomScale:{type:Number,default:.12},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.1},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1},pinchDisabled:{type:Boolean,default:!1},dblclickDisabled:{type:Boolean,default:!1}},emits:{hide:()=>!0,"on-error":e=>!0,"on-prev":(e,t)=>!0,"on-next":(e,t)=>!0,"on-prev-click":(e,t)=>!0,"on-next-click":(e,t)=>!0,"on-index-change":(e,t)=>!0,"on-rotate":e=>!0},setup(e,t){let{emit:a,slots:l}=t;const{imgRef:s,imgState:i,setImgSize:c}=(()=>{const Se=T(),Ee=gn({width:0,height:0,maxScale:1});return{imgRef:Se,imgState:Ee,setImgSize:()=>{if(Se.value){const{width:Oe,height:Me,naturalWidth:_t}=Se.value;Ee.maxScale=_t/Oe,Ee.width=Oe,Ee.height=Me}}}})(),p=T(e.index),m=T(""),_=gn({scale:1,lastScale:1,rotateDeg:0,top:0,left:0,initX:0,initY:0,lastX:0,lastY:0,touches:[]}),g=gn({loadError:!1,loading:!1,dragging:!1,gesturing:!1,wheeling:!1}),y=N(()=>{return Se=e.imgs,md("Array")(Se)?e.imgs.map(Ee=>typeof Ee=="string"?{src:Ee}:function(Oe){return k2(Oe)&&Lu(Oe.src)}(Ee)?Ee:void 0).filter(x2):Lu(e.imgs)?[{src:e.imgs}]:[];var Se}),v=N(()=>y.value[p.value]),C=N(()=>{var Se;return(Se=y.value[p.value])==null?void 0:Se.src}),w=N(()=>{var Se;return(Se=y.value[p.value])==null?void 0:Se.title}),b=N(()=>{var Se;return(Se=y.value[p.value])==null?void 0:Se.alt}),x=N(()=>({cursor:g.loadError?"default":e.moveDisabled?g.dragging?"grabbing":"grab":"move",top:`calc(50% + ${_.top}px)`,left:`calc(50% + ${_.left}px)`,transition:g.dragging||g.gesturing?"none":"",transform:`translate(-50%, -50%) scale(${_.scale}) rotate(${_.rotateDeg}deg)`})),$=()=>{a("hide")},M=()=>{_.scale=1,_.lastScale=1,_.rotateDeg=0,_.top=0,_.left=0,g.loadError=!1,g.dragging=!1,g.loading=!0},F=(Se,Ee)=>{const Oe=p.value;M(),p.value=Se,y.value[p.value]===y.value[Se]&&xe(()=>{g.loading=!1}),e.visible&&Oe!==Se&&(Ee&&Ee(Oe,Se),a("on-index-change",Oe,Se))},S=()=>{const Se=p.value,Ee=e.loop?(Se+1)%y.value.length:Se+1;!e.loop&&Ee>y.value.length-1||F(Ee,(Oe,Me)=>{a("on-next",Oe,Me),a("on-next-click",Oe,Me)})},D=()=>{const Se=p.value;let Ee=Se-1;if(Se===0){if(!e.loop)return;Ee=y.value.length-1}F(Ee,(Oe,Me)=>{a("on-prev",Oe,Me),a("on-prev-click",Oe,Me)})},I=Se=>{Math.abs(1-Se)<.05?Se=1:Math.abs(i.maxScale-Se)<.05&&(Se=i.maxScale),_.lastScale=_.scale,_.scale=Se},V=()=>{const Se=_.scale+e.zoomScale;Se{const Se=_.scale-e.zoomScale;Se>e.minZoom&&I(Se)},U=()=>{const Se=_.rotateDeg%360;a("on-rotate",Math.abs(Se<0?Se+360:Se))},O=()=>{_.rotateDeg-=90,U()},L=()=>{_.rotateDeg+=90,U()},P=()=>{_.scale=1,_.top=0,_.left=0},j=function(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return!e.moveDisabled&&Se===0},{onMouseDown:G,onMouseMove:q,onMouseUp:Z}=((Se,Ee,Oe)=>{let Me,_t=!1;return{onMouseDown:vt=>{Se.initX=Se.lastX=vt.clientX,Se.initY=Se.lastY=vt.clientY,Ee.dragging=!0,_t=!1,vt.stopPropagation()},onMouseUp:vt=>{Oe(vt.button)&&Ou(Me),Ee.dragging=!1,_t=!1},onMouseMove:vt=>{if(Ee.dragging)if(Oe(vt.button)){if(_t)return;_t=!0,Me=Gi(()=>{const{top:Lt,left:Et,lastY:Dt,lastX:dt}=Se;Se.top=Lt-Dt+vt.clientY,Se.left=Et-dt+vt.clientX,Se.lastX=vt.clientX,Se.lastY=vt.clientY,_t=!1})}else Se.lastX=vt.clientX,Se.lastY=vt.clientY;vt.stopPropagation()}}})(_,g,j),{onTouchStart:oe,onTouchMove:de,onTouchEnd:K}=((Se,Ee,Oe,Me,_t)=>{let vt,Lt=!1;return{onTouchStart:Et=>{const{touches:Dt}=Et;Dt.length>1&&_t()?(Oe.gesturing=!0,Ee.touches=Dt):(Ee.initX=Ee.lastX=Dt[0].clientX,Ee.initY=Ee.lastY=Dt[0].clientY,Oe.dragging=!0),Et.stopPropagation()},onTouchMove:Et=>{if(Lt)return;const{touches:Dt}=Et,{lastX:dt,lastY:Ut,left:Ft,top:It,scale:Qt}=Ee;if(!Oe.gesturing&&Oe.dragging){if(!Dt[0])return;const{clientX:Tt,clientY:Wt}=Dt[0];Me()?vt=Gi(()=>{Ee.lastX=Tt,Ee.lastY=Wt,Ee.top=It-Ut+Wt,Ee.left=Ft-dt+Tt,Lt=!1}):(Ee.lastX=Tt,Ee.lastY=Wt)}else Oe.gesturing&&Ee.touches.length>1&&Dt.length>1&&_t()&&(vt=Gi(()=>{const Tt=(Hu(Ee.touches[0],Ee.touches[1])-Hu(Dt[0],Dt[1]))/Se.width;Ee.touches=Dt;const Wt=Qt-1.3*Tt;Wt>.5&&Wt<1.5*Se.maxScale&&(Ee.scale=Wt),Lt=!1}))},onTouchEnd:()=>{Ou(vt),Oe.dragging=!1,Oe.gesturing=!1,Lt=!1}}})(i,_,g,j,()=>!e.pinchDisabled),z=()=>{e.dblclickDisabled||(_.scale!==i.maxScale?(_.lastScale=_.scale,_.scale=i.maxScale):_.scale=_.lastScale)},X=Se=>{g.loadError||g.gesturing||g.loading||g.dragging||g.wheeling||!e.scrollDisabled||e.zoomDisabled||(g.wheeling=!0,setTimeout(()=>{g.wheeling=!1},80),Se.deltaY<0?V():Q())},W=Se=>{const Ee=Se;e.visible&&(!e.escDisabled&&Ee.key==="Escape"&&e.visible&&$(),Ee.key==="ArrowLeft"&&(e.rtl?S():D()),Ee.key==="ArrowRight"&&(e.rtl?D():S()))},re=()=>{e.maskClosable&&$()},ye=()=>{c()},me=()=>{g.loading=!1},ge=Se=>{g.loading=!1,g.loadError=!0,a("on-error",Se)},se=()=>{e.visible&&c()};be(()=>e.index,Se=>{Se<0||Se>=y.value.length||F(Se)}),be(()=>g.dragging,(Se,Ee)=>{const Oe=!Se&&Ee;if(!j()&&Oe){const Me=_.lastX-_.initX,_t=_.lastY-_.initY,vt=e.swipeTolerance;Math.abs(Me)>Math.abs(_t)&&(Me<-1*vt?S():Me>vt&&D())}}),be(()=>e.visible,Se=>{if(Se){M();const Ee=y.value.length;if(Ee===0)return p.value=0,g.loading=!1,void xe(()=>g.loadError=!0);p.value=e.index>=Ee?Ee-1:e.index<0?0:e.index,e.scrollDisabled&&fe()}else e.scrollDisabled&&$e()});const fe=()=>{document&&(m.value=document.body.style.overflowY,document.body.style.overflowY="hidden")},$e=()=>{document&&(document.body.style.overflowY=m.value)};Ie(()=>{Tu(document,"keydown",W),Tu(window,"resize",se)}),vl(()=>{Mu(document,"keydown",W),Mu(window,"resize",se),e.scrollDisabled&&$e()});const tt=()=>g.loading?l.loading?l.loading({key:"loading"}):n(F2,{key:"img-loading"},null):g.loadError?l.onerror?l.onerror({key:"onerror"}):n($2,{key:"img-on-error"},null):n("div",{class:`${bl}-img-wrapper`,style:x.value,key:"img-wrapper"},[n("img",{alt:b.value,ref:s,draggable:"false",class:`${bl}-img`,src:C.value,onMousedown:G,onMouseup:Z,onMousemove:q,onTouchstart:oe,onTouchmove:de,onTouchend:K,onLoad:ye,onDblclick:z,onDragstart:Se=>{Se.preventDefault()}},null)]),_e=()=>{if(l["prev-btn"])return l["prev-btn"]({prev:D});if(y.value.length<=1)return;const Se=!e.loop&&p.value<=0;return n("div",{role:"button","aria-label":"previous image button",class:"btn__prev "+(Se?"disable":""),onClick:D},[e.rtl?n(El,{type:"next"},null):n(El,{type:"prev"},null)])},Xe=()=>{if(l["next-btn"])return l["next-btn"]({next:S});if(y.value.length<=1)return;const Se=!e.loop&&p.value>=y.value.length-1;return n("div",{role:"button","aria-label":"next image button",class:"btn__next "+(Se?"disable":""),onClick:S},[e.rtl?n(El,{type:"prev"},null):n(El,{type:"next"},null)])},ht=()=>{if(!(e.titleDisabled||g.loading||g.loadError))return l.title?l.title({currentImg:v.value}):w.value?n(E2,null,{default:()=>[w.value]}):void 0},Ye=()=>{let Se;if(e.visible)return n("div",{onTouchmove:C2,class:[`${bl}-modal`,e.rtl?"is-rtl":""],onClick:Ne(re,["self"]),onWheel:X},[n(U2,null,null),n(Gl,{name:`${bl}-fade`,mode:"out-in"},ji(Se=tt())?Se:{default:()=>[Se]}),n("img",{style:"display:none;",src:C.value,onError:ge,onLoad:me},null),n("div",{class:`${bl}-btns-wrapper`},[_e(),Xe(),ht(),l["close-btn"]?l["close-btn"]({close:$}):n("div",{role:"button","aria-label":"close image preview button",class:"btn__close",onClick:$},[n(El,{type:"close"},null)]),l.toolbar?l.toolbar({toolbarMethods:{zoomIn:V,zoomOut:Q,rotate:O,rotateLeft:O,rotateRight:L,resize:P},zoomIn:V,zoomOut:Q,rotate:O,rotateLeft:O,rotateRight:L,resize:P}):n(S2,{zoomIn:V,zoomOut:Q,resize:P,rotateLeft:O,rotateRight:L,rotateDisabled:e.rotateDisabled,zoomDisabled:e.zoomDisabled},null)])])};return()=>{let Se;if(e.teleport){let Ee;return n(Xo,{to:e.teleport},{default:()=>[n(Gl,{name:`${bl}-fade`},ji(Ee=Ye())?Ee:{default:()=>[Ee]})]})}return n(Gl,{name:`${bl}-fade`},ji(Se=Ye())?Se:{default:()=>[Se]})}}});const Q2=Object.assign(zi,{install:e=>{e.component(zi.name,zi)}}),D2={name:"Attachments",components:{MediaButton:Lc,VueEasyLightbox:Q2,IconButton:Ze,Delete:gs},props:{multiple:Boolean,attachments:{type:[Array,Object],default:()=>[]},empty_text:String,isSingle:Boolean,title:String,type:String,icon:String,showList:{type:Boolean,default:!0},showDeleteButton:{type:Boolean,default:!0},previewImage:{type:Boolean,default:!0},mediaInputSize:{type:String},mediaInputBg:{type:String}},emits:["removeImage","mediaUploaded"],data(){return{visible:!1,imageIndex:0,lightboxData:[],images:T([])}},computed:{showMediaButtonAsIcon:function(){return!this.multiple&&this.attachments.length===1}},watch:{attachments:{handler:function(e,t){return this.lightboxData=[],Array.isArray(e)&&e.length>0&&e.map((a,l)=>{this.lightboxData.push(a.url)}),e},deep:!0}},mounted:function(){Array.isArray(this.attachments)&&this.attachments.length>0&&this.attachments.forEach(e=>{this.lightboxData.push(e.url),this.images.push({id:e.id,url:e.url,title:e.title})})},methods:{translate:u,removeImageEvent(e){this.$emit("removeImage",e)},onMediaSelected(e){this.images=e.map(t=>({id:t.id,title:t.title,url:t.url})),this.$emit("mediaUploaded",this.images)}}},V2={class:"fct-attachments-wrap",style:{position:"relative"}},T2={class:"fct-attachment-img-wrap"},M2=["src","alt","onClick"],L2={class:"fct-attachments-button"};function R2(e,t,a,l,s,i){const c=B("VueEasyLightbox"),p=B("MediaButton"),m=B("IconButton"),_=B("Delete");return r(),h(H,null,[n(c,{visible:s.visible,imgs:s.lightboxData,index:s.imageIndex,onHide:t[0]||(t[0]=()=>{s.visible=!1})},null,8,["visible","imgs","index"]),o("div",V2,[a.attachments?(r(),h("ul",{key:0,class:ie(`fct-attachments-list ${a.multiple?"is-multiple":"fct-single-attachment"} ${a.attachments.length>0?"is-single":""}`)},[a.showList===!0?(r(!0),h(H,{key:0},ae(a.attachments,(g,y)=>(r(),h("li",{key:y,class:ie([[a.mediaInputSize,a.mediaInputBg],"fct-attachment-item"])},[o("div",T2,[a.previewImage?(r(),h("img",{key:0,src:g.url,alt:g.title,onClick:()=>{s.imageIndex=y,s.visible=!0}},null,8,M2)):k("",!0),i.showMediaButtonAsIcon&&!a.multiple?(r(),E(m,{key:1,size:"x-small"},{default:d(()=>[n(p,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:i.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):k("",!0)]),o("div",L2,[a.showDeleteButton?(r(),E(m,{key:0,tag:"button",bg:"danger",outline:"",size:"x-small",onClick:Ne(v=>i.removeImageEvent(y),["prevent"]),title:i.translate("Delete media")},{default:d(()=>[a.multiple?(r(),E(_,{key:0})):(r(),h(H,{key:1},[R(f(i.translate("Remove")),1)],64))]),_:2},1032,["onClick","title"])):k("",!0),i.showMediaButtonAsIcon&&a.multiple?(r(),E(m,{key:1,size:"x-small"},{default:d(()=>[n(p,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:i.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):k("",!0)])],2))),128)):k("",!0),i.showMediaButtonAsIcon?k("",!0):(r(),h("li",{key:1,class:ie([a.mediaInputSize,a.mediaInputBg])},[n(p,{"icon-mode":!1,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:i.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])],2))],2)):k("",!0),ka(e.$slots,"default")])],64)}const cp=at(D2,[["render",R2]]),O2={key:0},H2={key:0,class:"setting-label"},hi={__name:"MediaInput",props:{modelValue:{default:""},showSupported:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},icon:{type:String},title:{type:String},mediaInputSize:{type:String},mediaInputBg:{type:String},field:{type:Object}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,l=t,s=T();let i=T([]);const c=()=>{a.multiple?s.value=[]:s.value="",i.value=[],l("update:modelValue",s.value)},p=_=>{if(_.length)if(a.multiple){s.value=[],i.value=[];for(const g of _)s.value.push(g),i.value.push(g)}else s.value=_,i.value=_;l("update:modelValue",s.value)};be(()=>a.modelValue,_=>{Array.isArray(_)&&_.length>0?s.value=_:_&&typeof _=="string"&&_!==""?s.value=[_]:_&&typeof _=="object"?s.value=[_]:s.value=[],m()});const m=()=>{i.value=[],Object.values(s.value).forEach((_,g)=>{_!==void 0&&_!==""&&i.value.push(_)})};return Ie(()=>{Array.isArray(a.modelValue)&&a.modelValue.length>0?s.value=a.modelValue:a.modelValue&&typeof a.modelValue=="string"&&a.modelValue!==""?s.value=[a.modelValue]:a.modelValue&&typeof a.modelValue=="object"?s.value=[a.modelValue]:s.value=[],m()}),(_,g)=>(r(),h(H,null,[n(cp,{attachments:A(i),onMediaUploaded:p,onRemoveImage:c,icon:e.icon,title:e.title,mediaInputSize:e.mediaInputSize,mediaInputBg:e.mediaInputBg},null,8,["attachments","icon","title","mediaInputSize","mediaInputBg"]),e.showSupported?(r(),h("div",O2,[e.field&&e.field.label?(r(),h("label",H2,f(e.field.label),1)):k("",!0),o("span",null,f(A(u)("%1$s Recommended width: %2$s pixels minimum.","HEIC, WEBP, SVG, PNG, or JPG.","512")),1)])):k("",!0)],64))}},P2={class:"setting-media-wrap"},Ap={__name:"Media",props:_l({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue");return(a,l)=>(r(),h("div",P2,[n(hi,ya({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=s=>t.value=s),field:e.field,icon:"Upload"},e.attribute),null,16,["modelValue","field"])]))}},N2=Object.freeze(Object.defineProperty({__proto__:null,default:Ap},Symbol.toStringTag,{value:"Module"})),K2={__name:"InputRenderer",props:{form:{type:Object,required:!0},field:{type:Object,required:!0},value:{type:Object,required:!0},statePath:{type:String,required:!0},fieldKey:{type:String,required:!0},fullStatePath:{type:String,required:!0}},setup(e){const t=e;T(!1),zt().ctx;const a=_=>typeof _.label=="function"?_.label(t.value,t.statePath,t.form):_.label,l=(_,g)=>{if(typeof _=="function")return _({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(g)&&g.length===1?g[0]:g})},s=T(!1);let i={};Ie(async()=>{i=await pd.attributesBuilders(t.field,l,t.form),s.value=!0});const c={switch:lp,checkbox:sp,radio:np,input:Ns,text:Ns,email:Ns,number:Ns,textarea:Ns,color:fd,date:op,time:ip,select:rp,media:Ap,remote_select:dp},p=N(()=>c[t.field.type]||null),m=N(()=>({modelValue:t.value[t.fieldKey],form:t.form,statePath:t.statePath,field:t.field,fieldKey:t.fieldKey,value:t.value[t.fieldKey],nesting:!1,label:a(t.field),attribute:i,callback:l}));return(_,g)=>e.field.type==="wp-editor"?(r(),E(Wl,{key:0,shortCodes:e.field.shortcodes.data,modelValue:t.value[t.fieldKey],onUpdate:g[0]||(g[0]=y=>{t.value[t.fieldKey]=y})},null,8,["shortCodes","modelValue"])):p.value&&s.value?(r(),E(Cl(p.value),ya({key:1,onChange:g[1]||(g[1]=y=>{e.form.triggerChange(y)}),onInput:g[2]||(g[2]=y=>{e.form.triggerChange(e.value[e.fieldKey])}),modelValue:e.value[e.fieldKey],"onUpdate:modelValue":g[3]||(g[3]=y=>e.value[e.fieldKey]=y)},m.value),null,16,["modelValue"])):k("",!0)}},G2=["innerHTML"],j2={key:0},z2={key:0},_i={__name:"FormRenderer",props:{form:{type:Object,required:!0},schema:{type:Object},value:{type:Object},statePath:{type:String}},setup(e){const t=e,a=t.statePath??"",l=["grid","section","tab","tab-pane"];T(!1),zt().ctx;const s=(c,p)=>{if(typeof c.label=="function"){let m=i(c)?a:p+".",_=i(c)?t.value:t.value[p];return c.label(_,m,t.form)}return c.label},i=c=>c.disable_nesting!==!1;return(c,p)=>(r(!0),h(H,null,ae(e.schema,(m,_)=>(r(),h(H,{key:_},[e.form.isVisible(m,e.statePath+_)?(r(),h(H,{key:0},[m.type==="html"?(r(),h("div",{key:0,class:ie(`setting-html-wrapper ${m.wrapperClass??""}`),innerHTML:m.value},null,10,G2)):(r(),h(H,{key:1},[m.component?(r(),h("div",{key:0,class:ie(m.wrapperClass??"")},[m.component&&m.label?(r(),E(pa,{key:0,title:s(m,_),content:m.tooltip,class:"setting-label",placement:m.tooltip_placement},{default:d(()=>[m.labelOptional?(r(),h("span",j2,"("+f(m.labelOptional)+")",1)):k("",!0)]),_:2},1032,["title","content","placement"])):k("",!0),n(ZA,{modelValue:e.value[_],"onUpdate:modelValue":g=>e.value[_]=g,name:m.component,form:e.form,statePath:i(m)?A(a):_+".",field:m,"field-key":_,value:i(m)?e.value:e.value[_],nesting:i(m)},{fieldNote:d(()=>[m.note&&m.hide_note!==!0?(r(),E(Ur,{key:0,note:m.note},null,8,["note"])):k("",!0)]),validationError:d(()=>[n(Vu,{form:e.form,"error-key":A(a)+_},null,8,["form","error-key"])]),_:2},1032,["modelValue","onUpdate:modelValue","name","form","statePath","field","field-key","value","nesting"])],2)):k("",!0),l.includes(m.type)?(r(),E(t2,{key:1,form:e.form,field:m,value:e.value,"full-state-path":A(a),statePath:i(m)?A(a):_+".","field-key":_},null,8,["form","field","value","full-state-path","statePath","field-key"])):k("",!0),typeof m.type<"u"&&!l.includes(m.type)&&!["custom","component","html","hidden"].includes(m.type)?(r(),h("div",{key:2,class:ie(`setting-fields-inner ${m.wrapperClass??""}`)},[m.type!=="checkbox"&&!m.component&&m.label!==!1?(r(),E(pa,{key:0,class:"setting-label",title:s(m,_),content:m.tooltip,placement:m.tooltip_placement},{default:d(()=>[m.labelOptional?(r(),h("span",z2,"("+f(m.labelOptional)+")",1)):k("",!0)]),_:2},1032,["title","content","placement"])):k("",!0),n(K2,{form:e.form,field:m,value:e.value,"full-state-path":A(a),"state-path":e.statePath,"field-key":_},null,8,["form","field","value","full-state-path","state-path","field-key"]),m.note&&!m.component?(r(),E(Ur,{key:1,note:m.note},null,8,["note"])):k("",!0),m.component?k("",!0):(r(),E(Vu,{key:2,form:e.form,"error-key":A(a)+_},null,8,["form","error-key"]))],2)):k("",!0)],64))],64)):k("",!0)],64))),128))}},q2={key:0,class:"vue-form-wrap"},Y2={key:0,class:"form-section-save-action"},W2={key:0,class:"cmd block leading-none"},vi={__name:"VueForm",props:{form:{type:Object,required:!0},schema:{type:Object},value:{type:Object},showSubmitButton:{type:Boolean,default:!1},submitButtonText:{type:String,default:"Save"},loading:{type:Boolean,default:!1}},emits:["onSubmit","onChange","onSubmitButtonClick"],setup(e,{expose:t,emit:a}){const l=sl(),s=e,i=a;be(()=>s.form.isReady,()=>{xe(()=>Zs.scrollToHashSection(l.hash))},{once:!0}),Ie(()=>{xe(()=>{c.registerCopyAction(),s.form.isReady&&Zs.scrollToHashSection(l.hash)})}),T({});const c=zt().ctx,p=()=>{i("onSubmitButtonClick")};return t({getState:()=>s.form.values}),(_,g)=>{const y=B("el-button");return e.form.isReady?(r(),h("div",q2,[n(_i,{form:e.form,ref:"formRenderer",schema:e.form.schema,value:e.form.values},null,8,["form","schema","value"]),e.showSubmitButton?(r(),h("div",Y2,[n(y,{onClick:p,type:"primary",loading:e.loading},{default:d(()=>[e.loading?k("",!0):(r(),h("span",W2,"⌘s")),R(" "+f(e.submitButtonText),1)]),_:1},8,["loading"])])):k("",!0)])):k("",!0)}}},X2={key:0},pp={__name:"DynamicFormLoader",props:["schema","values","submit_button_text","form_name","widget"],emits:["change"],setup(e,{expose:t,emit:a}){let l=cd();const s=a,i=e,c=()=>{const g=i.form_name,y={};return y[g]={...l.values},y},p=()=>{l.reset()},m=()=>{var g;return((g=i.widget)==null?void 0:g.reset_on_save)==!0},_=Nr("triggerChange");return Ie(()=>{l.setSchema(i.schema).setDefaults(i.values).initForm(),l.onDataChanged(g=>{_==null||_(),s("change")})}),t({getState:c,resetForm:p,resetOnSave:m}),(g,y)=>A(l).isReady?(r(),h("div",X2,[n(vi,{showSubmitButton:!1,submitButtonText:e.submit_button_text,form:A(l),onOnSubmitButtonClick:y[0]||(y[0]=()=>{A(l).values}),onOnChange:y[1]||(y[1]=v=>{}),"validation-errors":{}},null,8,["submitButtonText","form"])])):k("",!0)}},J2={__name:"EChart",props:{option:{type:Object,required:!0},height:{type:String,default:"400px"},width:{type:String,default:"100%"}},setup(e){const t=e,a=T(null);let l=null;const s=()=>{a.value&&(l=ea(a.value),l.setOption(t.option))};be(()=>t.option,m=>{l&&m&&l.setOption(m,!0)},{deep:!0});const i=(m,_)=>{if(m==null||m==="")return _;const g=Number(m);return isNaN(g)?m:`${g}px`},c=N(()=>i(t.height,"400px")),p=N(()=>i(t.width,"100%"));return Ie(()=>{s(),window.addEventListener("resize",()=>l==null?void 0:l.resize())}),vl(()=>{window.removeEventListener("resize",()=>l==null?void 0:l.resize()),l==null||l.dispose()}),(m,_)=>(r(),h("div",{ref_key:"chartRef",ref:a,style:ra({width:p.value,height:c.value})},null,4))}},Z2={class:"fct-step-indicator"},eB={class:"indicator-title"},tB={class:"indicator-steps"},aB={class:"indicator-progress"},lB={class:"indicator-steps-bar"},sB=["onClick"],nB={__name:"StepIndicator",props:{steps:{type:Array,required:!0},currentStep:{type:Number,default:1}},emits:["step-click"],setup(e,{emit:t}){const a=t;return(l,s)=>(r(),h("div",Z2,[o("div",eB,f(e.steps[e.currentStep-1].label),1),o("div",tB,[o("div",aB,f(e.currentStep)+"/"+f(e.steps.length)+" "+f(l.$t("Completed")),1),o("div",lB,[(r(!0),h(H,null,ae(e.steps,(i,c)=>(r(),h("div",{key:c,class:"indicator-step",onClick:p=>a("step-click",c+1)},[o("div",{class:ie(["indicator-step-bar",ca.disabled||a.loading),i=()=>`width ${a.duration}ms ease, opacity ${a.duration}ms ease, margin-right ${a.duration}ms ease`,c=y=>{y.style.width="0",y.style.opacity="0",y.style.overflow="hidden",y.style.marginRight="6px"},p=(y,v)=>{const C=y.scrollWidth+"px";y.style.transition=i(),requestAnimationFrame(()=>{y.style.width=C,y.style.opacity="1",y.style.marginRight=""}),setTimeout(()=>v(),a.duration)},m=y=>{y.style.width="auto",y.style.overflow="",y.style.marginRight=""},_=y=>{y.style.width=y.scrollWidth+"px",y.style.opacity="1",y.style.overflow="hidden",y.style.marginRight=rB},g=(y,v)=>{y.offsetHeight,y.style.transition=i(),y.style.width="0",y.style.opacity="0",y.style.marginRight="0";const C=w=>{w.propertyName==="width"&&(y.removeEventListener("transitionend",C),v())};y.addEventListener("transitionend",C)};return(y,v)=>(r(),h("button",{type:e.nativeType,class:ie(["el-button",e.type&&`el-button--${e.type}`,e.size&&`el-button--${e.size}`,{"is-plain":e.plain,"is-loading":e.loading,"is-disabled":s.value}]),disabled:s.value,"aria-disabled":s.value,onClick:v[0]||(v[0]=C=>l("click",C))},[n(Gl,{onBeforeEnter:c,onEnter:p,onAfterEnter:m,onBeforeLeave:_,onLeave:g},{default:d(()=>[e.loading?(r(),h("span",iB,v[1]||(v[1]=[o("i",{class:"el-icon is-loading"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})])],-1)]))):k("",!0)]),_:1}),o("span",null,[ka(y.$slots,"default",{},void 0,!0)])],10,oB))}},uB=at(dB,[["__scopeId","data-v-fa8794a2"]]),fp={__name:"VueTemplateLoader",props:{widget:{type:Object,required:!0},data:{required:!1}},setup(e){var _,g,y,v,C,w;const t=Bc(kc),a=Object.freeze({get:(...b)=>ce.get(...b),post:(...b)=>ce.post(...b),put:(...b)=>ce.put(...b),delete:(...b)=>ce.delete(...b),patch:(...b)=>ce.patch(...b),upload:(...b)=>ce.upload(...b),getNonce:()=>ce.getNonce()}),l=Object.freeze({success:(...b)=>Y.success(...b),error:(...b)=>Y.error(...b),info:(...b)=>Y.info(...b),validationErrors:(...b)=>Y.validationErrors(...b)}),s=Object.freeze({clipboard:(_=window==null?void 0:window.navigator)==null?void 0:_.clipboard,userAgent:(g=window==null?void 0:window.navigator)==null?void 0:g.userAgent,language:(y=window==null?void 0:window.navigator)==null?void 0:y.language,languages:(v=window==null?void 0:window.navigator)==null?void 0:v.languages,onLine:(C=window==null?void 0:window.navigator)==null?void 0:C.onLine,platform:(w=window==null?void 0:window.navigator)==null?void 0:w.platform}),i=[{pattern:/\balert\s*\(/,label:"alert()"},{pattern:/\bconfirm\s*\(/,label:"confirm()"},{pattern:/\bprompt\s*\(/,label:"prompt()"},{pattern:/\bsetTimeout\s*\(/,label:"setTimeout()"},{pattern:/\bsetInterval\s*\(/,label:"setInterval()"},{pattern:/\brequestAnimationFrame\s*\(/,label:"requestAnimationFrame()"},{pattern:/\bcancelAnimationFrame\s*\(/,label:"cancelAnimationFrame()"},{pattern:/\bqueueMicrotask\s*\(/,label:"queueMicrotask()"},{pattern:/\bfetch\s*\(/,label:"fetch()"},{pattern:/\bXMLHttpRequest\b/,label:"XMLHttpRequest"},{pattern:/\bWebSocket\b/,label:"WebSocket"},{pattern:/\bWorker\b/,label:"Worker"},{pattern:/\bSharedWorker\b/,label:"SharedWorker"},{pattern:/\bEventSource\b/,label:"EventSource"},{pattern:/\bMessageChannel\b/,label:"MessageChannel"},{pattern:/\bBroadcastChannel\b/,label:"BroadcastChannel"},{pattern:/\bwindow\b/,label:"window"},{pattern:/\bdocument\b/,label:"document"},{pattern:/\bnavigator\.(?:serviceWorker|sendBeacon|geolocation|mediaDevices|bluetooth|usb|serial|hid|credentials|locks|wakeLock)\b/,label:"navigator privileged API"},{pattern:/\bglobalThis\b/,label:"globalThis"},{pattern:/\bself\b/,label:"self"},{pattern:/\bparent\b/,label:"parent"},{pattern:/\btop\b/,label:"top"},{pattern:/\bframes\b/,label:"frames"},{pattern:/\blocalStorage\b/,label:"localStorage"},{pattern:/\bsessionStorage\b/,label:"sessionStorage"},{pattern:/\bindexedDB\b/,label:"indexedDB"},{pattern:/\bpostMessage\s*\(/,label:"postMessage()"},{pattern:/\bopen\s*\(/,label:"open()"},{pattern:/\bFileReader\b/,label:"FileReader"},{pattern:/\bBlob\b/,label:"Blob"},{pattern:/\bURL\.createObjectURL\b/,label:"URL.createObjectURL"},{pattern:/\bMutationObserver\b/,label:"MutationObserver"},{pattern:/\bResizeObserver\b/,label:"ResizeObserver"},{pattern:/\bIntersectionObserver\b/,label:"IntersectionObserver"},{pattern:/\bhistory\.(?:pushState|replaceState|go|back|forward)\s*\(/,label:"history navigation"},{pattern:/\blocation\.(?:assign|replace|reload)\s*\(/,label:"location navigation"},{pattern:/\blocation\.href\s*=/,label:"location.href assignment"},{pattern:/\bFunction\b/,label:"Function"},{pattern:/\beval\s*\(/,label:"eval()"},{pattern:/\bnew\s+Function\b/,label:"new Function"},{pattern:/\brequire\s*\(/,label:"require()"},{pattern:/\bimport\s*\(/,label:"import()"},{pattern:/\bReflect\b/,label:"Reflect"},{pattern:/\bProxy\b/,label:"Proxy"},{pattern:/\bprocess\b/,label:"process"},{pattern:/\bmodule\b/,label:"module"},{pattern:/\bexports\b/,label:"exports"},{pattern:/\b__proto__\b/,label:"__proto__"},{pattern:/\b__defineGetter__\b/,label:"__defineGetter__"},{pattern:/\b__defineSetter__\b/,label:"__defineSetter__"}],c=b=>{for(const x of i)if(x.pattern.test(b))return!1;return!0},p=b=>{var x,$;try{if(typeof b!="string")return null;const M=b.match(/]*)?>|