diff --git "a/build/client/_app/immutable/nodes/2.6AzGkb_4.js" "b/build/client/_app/immutable/nodes/2.6AzGkb_4.js"
new file mode 100644--- /dev/null
+++ "b/build/client/_app/immutable/nodes/2.6AzGkb_4.js"
@@ -0,0 +1,161 @@
+import{n as We,I as Sc,Y as Je,Z as ot,_ as Ma,s as lt,U as ar,e as ae,c as oe,b as he,f as X,m as P,i as ke,V as or,W as ur,X as lr,k as Dr,$ as Kt,a0 as tr,a as xe,g as Ce,h as $,p as Fe,r as cr,a1 as $u,a2 as aa,G as el,a3 as Tc,a4 as Nt,t as st,d as at,a5 as mn,a6 as gn,w as ut,F as Ac,a7 as kc,a8 as Si,a9 as Ti,z as et,aa as yt,j as jt,ab as tn,v as Ri,ac as oa,x as xc,B as Cc,ad as Wt,ae as Gt,y as Vt,l as $e,o as Er,q as Ur,af as ht,ag as Ic,u as Rc}from"../chunks/scheduler.OwA2AG0M.js";import{n as Dc,l as Nc,f as Oc,h as Fc,S as bt,i as _t,t as we,a as Ie,g as mt,c as gt,j as tl,k as rl,o as dt,b as tt,d as rt,m as nt,e as it}from"../chunks/index.JlSaLmPP.js";import{w as Zr}from"../chunks/index.UTqYide5.js";import{e as Rt,u as Bc,f as Pc}from"../chunks/each.N0yHvFdK.js";import{a as nl,p as Lc}from"../chunks/ProgressBar.svelte_svelte_type_style_lang.9muE4jOP.js";import{L as Ua}from"../chunks/LogService.hUlSDADx.js";const il=!0;function Mc(r,e,t,n){if(!e)return We;const i=r.getBoundingClientRect();if(e.left===i.left&&e.right===i.right&&e.top===i.top&&e.bottom===i.bottom)return We;const{delay:s=0,duration:a=300,easing:o=Sc,start:u=Dc()+s,end:c=u+a,tick:h=We,css:g}=t(r,{from:e,to:i},n);let m=!0,p=!1,y;function w(){g&&(y=Oc(r,0,1,a,s,o,g)),s||(p=!0)}function _(){g&&Fc(r,y),m=!1}return Nc(d=>{if(!p&&d>=u&&(p=!0),p&&d>=c&&(h(1,0),_()),!m)return!1;if(p){const b=d-u,T=0+1*o(b/a);h(T,1-T)}return!0}),w(),h(0,1),_}function Uc(r){const e=getComputedStyle(r);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:n}=e,i=r.getBoundingClientRect();r.style.position="absolute",r.style.width=t,r.style.height=n,sl(r,i)}}function sl(r,e){const t=r.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const n=getComputedStyle(r),i=n.transform==="none"?"":n.transform;r.style.transform=`${i} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}function al(r,e){const t={},n={},i={$$scope:1};let s=r.length;for(;s--;){const a=r[s],o=e[s];if(o){for(const u in a)u in o||(n[u]=1);for(const u in o)i[u]||(t[u]=o[u],i[u]=1);r[s]=o}else for(const u in a)i[u]=1}for(const a in n)a in t||(t[a]=void 0);return t}const zc="drawerStore";function jc(){const r=Hc();return Je(zc,r)}function Hc(){const{subscribe:r,set:e,update:t}=Zr({});return{subscribe:r,set:e,update:t,open:n=>t(()=>({open:!0,...n})),close:()=>t(n=>(n.open=!1,n))}}const Wc="modalStore";function Gc(){const r=Vc();return Je(Wc,r)}function Vc(){const{subscribe:r,set:e,update:t}=Zr([]);return{subscribe:r,set:e,update:t,trigger:n=>t(i=>(i.push(n),i)),close:()=>t(n=>(n.length>0&&n.shift(),n)),clear:()=>e([])}}const Kc={message:"Missing Toast Message",autohide:!0,timeout:5e3},ol="toastStore";function ul(){const r=ot(ol);if(!r)throw new Error("toastStore is not initialized. Please ensure that `initializeStores()` is invoked in the root layout file of this app!");return r}function qc(){const r=Zc();return Je(ol,r)}function Xc(){const r=Math.random();return Number(r).toString(32)}function Zc(){const{subscribe:r,set:e,update:t}=Zr([]),n=s=>t(a=>{if(a.length>0){const o=a.findIndex(c=>c.id===s),u=a[o];u&&(u.callback&&u.callback({id:s,status:"closed"}),u.timeoutId&&clearTimeout(u.timeoutId),a.splice(o,1))}return a});function i(s){if(s.autohide===!0)return setTimeout(()=>{n(s.id)},s.timeout)}return{subscribe:r,close:n,trigger:s=>{const a=Xc();return t(o=>{s&&s.callback&&s.callback({id:a,status:"queued"}),s.hideDismiss&&(s.autohide=!0);const u={...Kc,...s,id:a};return u.timeoutId=i(u),o.push(u),o}),a},freeze:s=>t(a=>(a.length>0&&clearTimeout(a[s].timeoutId),a)),unfreeze:s=>t(a=>(a.length>0&&(a[s].timeoutId=i(a[s])),a)),clear:()=>e([])}}function Yc(){Gc(),qc(),jc()}function ua(r){const e=r-1;return e*e*e+1}function za(r,{delay:e=0,duration:t=400,easing:n=ua,x:i=0,y:s=0,opacity:a=0}={}){const o=getComputedStyle(r),u=+o.opacity,c=o.transform==="none"?"":o.transform,h=u*(1-a),[g,m]=Ma(i),[p,y]=Ma(s);return{delay:e,duration:t,easing:n,css:(w,_)=>`
+ transform: ${c} translate(${(1-w)*g}${m}, ${(1-w)*p}${y});
+ opacity: ${u-h*_}`}}function ja(r,{delay:e=0,duration:t=400,easing:n=ua,axis:i="y"}={}){const s=getComputedStyle(r),a=+s.opacity,o=i==="y"?"height":"width",u=parseFloat(s[o]),c=i==="y"?["top","bottom"]:["left","right"],h=c.map(d=>`${d[0].toUpperCase()}${d.slice(1)}`),g=parseFloat(s[`padding${h[0]}`]),m=parseFloat(s[`padding${h[1]}`]),p=parseFloat(s[`margin${h[0]}`]),y=parseFloat(s[`margin${h[1]}`]),w=parseFloat(s[`border${h[0]}Width`]),_=parseFloat(s[`border${h[1]}Width`]);return{delay:e,duration:t,easing:n,css:d=>`overflow: hidden;opacity: ${Math.min(d*20,1)*a};${o}: ${d*u}px;padding-${c[0]}: ${d*g}px;padding-${c[1]}: ${d*m}px;margin-${c[0]}: ${d*p}px;margin-${c[1]}: ${d*y}px;border-${c[0]}-width: ${d*w}px;border-${c[1]}-width: ${d*_}px;`}}function Jc(r){let e,t,n;const i=r[19].default,s=ar(i,r,r[18],null);return{c(){e=ae("div"),s&&s.c(),this.h()},l(a){e=oe(a,"DIV",{class:!0,"data-testid":!0});var o=he(e);s&&s.l(o),o.forEach(X),this.h()},h(){P(e,"class",t="accordion "+r[0]),P(e,"data-testid","accordion")},m(a,o){ke(a,e,o),s&&s.m(e,null),n=!0},p(a,[o]){s&&s.p&&(!n||o&262144)&&or(s,i,a,a[18],n?lr(i,a[18],o,null):ur(a[18]),null),(!n||o&1&&t!==(t="accordion "+a[0]))&&P(e,"class",t)},i(a){n||(we(s,a),n=!0)},o(a){Ie(s,a),n=!1},d(a){a&&X(e),s&&s.d(a)}}}function Qc(r,e,t){let n,i;Dr(r,nl,C=>t(20,i=C));let{$$slots:s={},$$scope:a}=e,{autocollapse:o=!1}=e,{width:u="w-full"}=e,{spacing:c="space-y-1"}=e,{disabled:h=!1}=e,{padding:g="py-2 px-4"}=e,{hover:m="hover:bg-primary-hover-token"}=e,{rounded:p="rounded-container-token"}=e,{caretOpen:y="rotate-180"}=e,{caretClosed:w=""}=e,{regionControl:_=""}=e,{regionPanel:d="space-y-4"}=e,{regionCaret:b=""}=e,{transitions:T=!i}=e,{transitionIn:R=ja}=e,{transitionInParams:F={duration:200}}=e,{transitionOut:K=ja}=e,{transitionOutParams:L={duration:200}}=e;const H=Zr(null);return Je("active",H),Je("autocollapse",o),Je("disabled",h),Je("padding",g),Je("hover",m),Je("rounded",p),Je("caretOpen",y),Je("caretClosed",w),Je("regionControl",_),Je("regionPanel",d),Je("regionCaret",b),Je("transitions",T),Je("transitionIn",R),Je("transitionInParams",F),Je("transitionOut",K),Je("transitionOutParams",L),r.$$set=C=>{t(22,e=Kt(Kt({},e),tr(C))),"autocollapse"in C&&t(1,o=C.autocollapse),"width"in C&&t(2,u=C.width),"spacing"in C&&t(3,c=C.spacing),"disabled"in C&&t(4,h=C.disabled),"padding"in C&&t(5,g=C.padding),"hover"in C&&t(6,m=C.hover),"rounded"in C&&t(7,p=C.rounded),"caretOpen"in C&&t(8,y=C.caretOpen),"caretClosed"in C&&t(9,w=C.caretClosed),"regionControl"in C&&t(10,_=C.regionControl),"regionPanel"in C&&t(11,d=C.regionPanel),"regionCaret"in C&&t(12,b=C.regionCaret),"transitions"in C&&t(13,T=C.transitions),"transitionIn"in C&&t(14,R=C.transitionIn),"transitionInParams"in C&&t(15,F=C.transitionInParams),"transitionOut"in C&&t(16,K=C.transitionOut),"transitionOutParams"in C&&t(17,L=C.transitionOutParams),"$$scope"in C&&t(18,a=C.$$scope)},r.$$.update=()=>{t(0,n=`${u} ${c} ${e.class??""}`)},e=tr(e),[n,o,u,c,h,g,m,p,y,w,_,d,b,T,R,F,K,L,a,s]}class $c extends bt{constructor(e){super(),_t(this,e,Qc,Jc,lt,{autocollapse:1,width:2,spacing:3,disabled:4,padding:5,hover:6,rounded:7,caretOpen:8,caretClosed:9,regionControl:10,regionPanel:11,regionCaret:12,transitions:13,transitionIn:14,transitionInParams:15,transitionOut:16,transitionOutParams:17})}}function Ai(r,e){const{transition:t,params:n,enabled:i}=e;return i?t(r,n):"duration"in n?t(r,{duration:0}):{duration:0}}const ef=r=>({}),Ha=r=>({}),tf=r=>({}),Wa=r=>({}),rf=r=>({}),Ga=r=>({}),nf=r=>({}),Va=r=>({}),sf=r=>({}),Ka=r=>({});function qa(r){let e,t;const n=r[30].lead,i=ar(n,r,r[29],Ka);return{c(){e=ae("div"),i&&i.c(),this.h()},l(s){e=oe(s,"DIV",{class:!0});var a=he(e);i&&i.l(a),a.forEach(X),this.h()},h(){P(e,"class","accordion-lead")},m(s,a){ke(s,e,a),i&&i.m(e,null),t=!0},p(s,a){i&&i.p&&(!t||a[0]&536870912)&&or(i,n,s,s[29],t?lr(n,s[29],a,sf):ur(s[29]),Ka)},i(s){t||(we(i,s),t=!0)},o(s){Ie(i,s),t=!1},d(s){s&&X(e),i&&i.d(s)}}}function af(r){let e;return{c(){e=st("(summary)")},l(t){e=at(t,"(summary)")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function of(r){let e,t,n;return{c(){e=ae("div"),t=new mn(!1),this.h()},l(i){e=oe(i,"DIV",{class:!0});var s=he(e);t=gn(s,!1),s.forEach(X),this.h()},h(){t.a=null,P(e,"class",n="accordion-summary-caret "+r[11])},m(i,s){ke(i,e,s),t.m(r[14],e)},p(i,s){s[0]&2048&&n!==(n="accordion-summary-caret "+i[11])&&P(e,"class",n)},i:We,o:We,d(i){i&&X(e)}}}function uf(r){let e,t,n,i,s;const a=[cf,lf],o=[];function u(c,h){return c[8]?0:1}return t=u(r),n=o[t]=a[t](r),{c(){e=ae("div"),n.c(),this.h()},l(c){e=oe(c,"DIV",{class:!0});var h=he(e);n.l(h),h.forEach(X),this.h()},h(){P(e,"class",i="accordion-summary-icons "+r[10])},m(c,h){ke(c,e,h),o[t].m(e,null),s=!0},p(c,h){let g=t;t=u(c),t===g?o[t].p(c,h):(mt(),Ie(o[g],1,1,()=>{o[g]=null}),gt(),n=o[t],n?n.p(c,h):(n=o[t]=a[t](c),n.c()),we(n,1),n.m(e,null)),(!s||h[0]&1024&&i!==(i="accordion-summary-icons "+c[10]))&&P(e,"class",i)},i(c){s||(we(n),s=!0)},o(c){Ie(n),s=!1},d(c){c&&X(e),o[t].d()}}}function lf(r){let e;const t=r[30].iconOpen,n=ar(t,r,r[29],Wa),i=n||ff(r);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,a){i&&i.m(s,a),e=!0},p(s,a){n&&n.p&&(!e||a[0]&536870912)&&or(n,t,s,s[29],e?lr(t,s[29],a,tf):ur(s[29]),Wa)},i(s){e||(we(i,s),e=!0)},o(s){Ie(i,s),e=!1},d(s){i&&i.d(s)}}}function cf(r){let e;const t=r[30].iconClosed,n=ar(t,r,r[29],Ga),i=n||hf(r);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,a){i&&i.m(s,a),e=!0},p(s,a){n&&n.p&&(!e||a[0]&536870912)&&or(n,t,s,s[29],e?lr(t,s[29],a,rf):ur(s[29]),Ga)},i(s){e||(we(i,s),e=!0)},o(s){Ie(i,s),e=!1},d(s){i&&i.d(s)}}}function ff(r){let e,t;return{c(){e=new mn(!1),t=ut(),this.h()},l(n){e=gn(n,!1),t=ut(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),ke(n,t,i)},p:We,d(n){n&&(X(t),e.d())}}}function hf(r){let e,t;return{c(){e=new mn(!1),t=ut(),this.h()},l(n){e=gn(n,!1),t=ut(),this.h()},h(){e.a=t},m(n,i){e.m(r[14],n,i),ke(n,t,i)},p:We,d(n){n&&(X(t),e.d())}}}function Xa(r){let e,t,n,i,s,a,o;const u=r[30].content,c=ar(u,r,r[29],Ha),h=c||df();return{c(){e=ae("div"),h&&h.c(),this.h()},l(g){e=oe(g,"DIV",{class:!0,id:!0,role:!0,"aria-hidden":!0,"aria-labelledby":!0});var m=he(e);h&&h.l(m),m.forEach(X),this.h()},h(){P(e,"class",t="accordion-panel "+r[9]),P(e,"id",n="accordion-panel-"+r[0]),P(e,"role","region"),P(e,"aria-hidden",i=!r[8]),P(e,"aria-labelledby",r[0])},m(g,m){ke(g,e,m),h&&h.m(e,null),o=!0},p(g,m){r=g,c&&c.p&&(!o||m[0]&536870912)&&or(c,u,r,r[29],o?lr(u,r[29],m,ef):ur(r[29]),Ha),(!o||m[0]&512&&t!==(t="accordion-panel "+r[9]))&&P(e,"class",t),(!o||m[0]&1&&n!==(n="accordion-panel-"+r[0]))&&P(e,"id",n),(!o||m[0]&256&&i!==(i=!r[8]))&&P(e,"aria-hidden",i),(!o||m[0]&1)&&P(e,"aria-labelledby",r[0])},i(g){o||(we(h,g),g&&el(()=>{o&&(a&&a.end(1),s=tl(e,Ai,{transition:r[4],params:r[5],enabled:r[3]}),s.start())}),o=!0)},o(g){Ie(h,g),s&&s.invalidate(),g&&(a=rl(e,Ai,{transition:r[6],params:r[7],enabled:r[3]})),o=!1},d(g){g&&X(e),h&&h.d(g),g&&a&&a.end()}}}function df(r){let e;return{c(){e=st("(content)")},l(t){e=at(t,"(content)")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function pf(r){let e,t,n,i,s,a,o,u,c,h,g,m,p,y,w=r[16].lead&&qa(r);const _=r[30].summary,d=ar(_,r,r[29],Va),b=d||af(),T=[uf,of],R=[];function F(L,H){return L[16].iconClosed||L[16].iconOpen?0:1}a=F(r),o=R[a]=T[a](r);let K=r[8]&&Xa(r);return{c(){e=ae("div"),t=ae("button"),w&&w.c(),n=xe(),i=ae("div"),b&&b.c(),s=xe(),o.c(),h=xe(),K&&K.c(),this.h()},l(L){e=oe(L,"DIV",{class:!0,"data-testid":!0});var H=he(e);t=oe(H,"BUTTON",{type:!0,class:!0,id:!0,"aria-expanded":!0,"aria-controls":!0});var C=he(t);w&&w.l(C),n=Ce(C),i=oe(C,"DIV",{class:!0});var se=he(i);b&&b.l(se),se.forEach(X),s=Ce(C),o.l(C),C.forEach(X),h=Ce(H),K&&K.l(H),H.forEach(X),this.h()},h(){P(i,"class","accordion-summary flex-1"),P(t,"type","button"),P(t,"class",u="accordion-control "+r[12]),P(t,"id",r[0]),P(t,"aria-expanded",r[8]),P(t,"aria-controls",c="accordion-panel-"+r[0]),t.disabled=r[2],P(e,"class",g="accordion-item "+r[13]),P(e,"data-testid","accordion-item")},m(L,H){ke(L,e,H),$(e,t),w&&w.m(t,null),$(t,n),$(t,i),b&&b.m(i,null),$(t,s),R[a].m(t,null),$(e,h),K&&K.m(e,null),m=!0,p||(y=[Fe(t,"click",r[15]),Fe(t,"click",r[31]),Fe(t,"keydown",r[32]),Fe(t,"keyup",r[33]),Fe(t,"keypress",r[34])],p=!0)},p(L,H){L[16].lead?w?(w.p(L,H),H[0]&65536&&we(w,1)):(w=qa(L),w.c(),we(w,1),w.m(t,n)):w&&(mt(),Ie(w,1,1,()=>{w=null}),gt()),d&&d.p&&(!m||H[0]&536870912)&&or(d,_,L,L[29],m?lr(_,L[29],H,nf):ur(L[29]),Va);let C=a;a=F(L),a===C?R[a].p(L,H):(mt(),Ie(R[C],1,1,()=>{R[C]=null}),gt(),o=R[a],o?o.p(L,H):(o=R[a]=T[a](L),o.c()),we(o,1),o.m(t,null)),(!m||H[0]&4096&&u!==(u="accordion-control "+L[12]))&&P(t,"class",u),(!m||H[0]&1)&&P(t,"id",L[0]),(!m||H[0]&256)&&P(t,"aria-expanded",L[8]),(!m||H[0]&1&&c!==(c="accordion-panel-"+L[0]))&&P(t,"aria-controls",c),(!m||H[0]&4)&&(t.disabled=L[2]),L[8]?K?(K.p(L,H),H[0]&256&&we(K,1)):(K=Xa(L),K.c(),we(K,1),K.m(e,null)):K&&(mt(),Ie(K,1,1,()=>{K=null}),gt()),(!m||H[0]&8192&&g!==(g="accordion-item "+L[13]))&&P(e,"class",g)},i(L){m||(we(w),we(b,L),we(o),we(K),m=!0)},o(L){Ie(w),Ie(b,L),Ie(o),Ie(K),m=!1},d(L){L&&X(e),w&&w.d(),b&&b.d(L),R[a].d(),K&&K.d(),p=!1,cr(y)}}}const mf="",gf="text-start w-full flex items-center space-x-4",Za="fill-current w-3 transition-transform duration-[200ms]",wf="";function yf(r,e,t){let n,i,s,a,o,u,c,h,g=We,m=()=>(g(),g=Tc(R,U=>t(28,h=U)),R);r.$$.on_destroy.push(()=>g());let{$$slots:p={},$$scope:y}=e;const w=$u(p),_=aa();let{open:d=!1}=e,{id:b=String(Math.random())}=e,{autocollapse:T=ot("autocollapse")}=e,{active:R=ot("active")}=e;m();let{disabled:F=ot("disabled")}=e,{padding:K=ot("padding")}=e,{hover:L=ot("hover")}=e,{rounded:H=ot("rounded")}=e,{caretOpen:C=ot("caretOpen")}=e,{caretClosed:se=ot("caretClosed")}=e,{regionControl:ne=ot("regionControl")}=e,{regionPanel:N=ot("regionPanel")}=e,{regionCaret:Y=ot("regionCaret")}=e,{transitions:x=ot("transitions")}=e,{transitionIn:W=ot("transitionIn")}=e,{transitionInParams:pe=ot("transitionInParams")}=e,{transitionOut:Z=ot("transitionOut")}=e,{transitionOutParams:be=ot("transitionOutParams")}=e;const J=`
+ `;function Ae(U){T===!0?R.set(b):t(17,d=!d),G(U)}function G(U){const A=T?h===b:d;_("toggle",{event:U,id:b,panelId:`accordion-panel-${b}`,open:A,autocollapse:T})}T&&d&&Ae();function I(U){Nt.call(this,r,U)}function q(U){Nt.call(this,r,U)}function Q(U){Nt.call(this,r,U)}function ie(U){Nt.call(this,r,U)}return r.$$set=U=>{t(37,e=Kt(Kt({},e),tr(U))),"open"in U&&t(17,d=U.open),"id"in U&&t(0,b=U.id),"autocollapse"in U&&t(18,T=U.autocollapse),"active"in U&&m(t(1,R=U.active)),"disabled"in U&&t(2,F=U.disabled),"padding"in U&&t(19,K=U.padding),"hover"in U&&t(20,L=U.hover),"rounded"in U&&t(21,H=U.rounded),"caretOpen"in U&&t(22,C=U.caretOpen),"caretClosed"in U&&t(23,se=U.caretClosed),"regionControl"in U&&t(24,ne=U.regionControl),"regionPanel"in U&&t(25,N=U.regionPanel),"regionCaret"in U&&t(26,Y=U.regionCaret),"transitions"in U&&t(3,x=U.transitions),"transitionIn"in U&&t(4,W=U.transitionIn),"transitionInParams"in U&&t(5,pe=U.transitionInParams),"transitionOut"in U&&t(6,Z=U.transitionOut),"transitionOutParams"in U&&t(7,be=U.transitionOutParams),"$$scope"in U&&t(29,y=U.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&393216&&d&&T&&Ae(),r.$$.dirty[0]&268828673&&t(8,n=T?h===b:d),t(13,i=`${mf} ${e.class??""}`),r.$$.dirty[0]&20447232&&t(12,s=`${gf} ${K} ${L} ${H} ${ne}`),r.$$.dirty[0]&12583168&&t(27,a=n?C:se),r.$$.dirty[0]&201326592&&t(11,o=`${Za} ${Y} ${a}`),r.$$.dirty[0]&67108864&&t(10,u=`${Za} ${Y}`),r.$$.dirty[0]&36175872&&t(9,c=`${wf} ${K} ${H} ${N}`)},e=tr(e),[b,R,F,x,W,pe,Z,be,n,c,u,o,s,i,J,Ae,w,d,T,K,L,H,C,se,ne,N,Y,a,h,y,p,I,q,Q,ie]}class bf extends bt{constructor(e){super(),_t(this,e,yf,pf,lt,{open:17,id:0,autocollapse:18,active:1,disabled:2,padding:19,hover:20,rounded:21,caretOpen:22,caretClosed:23,regionControl:24,regionPanel:25,regionCaret:26,transitions:3,transitionIn:4,transitionInParams:5,transitionOut:6,transitionOutParams:7},null,[-1,-1])}}function _f(r,{from:e,to:t},n={}){const i=getComputedStyle(r),s=i.transform==="none"?"":i.transform,[a,o]=i.transformOrigin.split(" ").map(parseFloat),u=e.left+e.width*a/t.width-(t.left+a),c=e.top+e.height*o/t.height-(t.top+o),{delay:h=0,duration:g=p=>Math.sqrt(p)*120,easing:m=ua}=n;return{delay:h,duration:Ac(g)?g(Math.sqrt(u*u+c*c)):g,easing:m,css:(p,y)=>{const w=y*u,_=y*c,d=p+y*e.width/t.width,b=p+y*e.height/t.height;return`transform: ${s} translate(${w}px, ${_}px) scale(${d}, ${b});`}}}function vf(r){let e,t,n;const i=r[15].default,s=ar(i,r,r[14],null);return{c(){e=ae("div"),s&&s.c(),this.h()},l(a){e=oe(a,"DIV",{class:!0,"data-testid":!0,role:!0,"aria-labelledby":!0});var o=he(e);s&&s.l(o),o.forEach(X),this.h()},h(){P(e,"class",t="radio-group "+r[1]),P(e,"data-testid","radio-group"),P(e,"role","radiogroup"),P(e,"aria-labelledby",r[0])},m(a,o){ke(a,e,o),s&&s.m(e,null),n=!0},p(a,[o]){s&&s.p&&(!n||o&16384)&&or(s,i,a,a[14],n?lr(i,a[14],o,null):ur(a[14]),null),(!n||o&2&&t!==(t="radio-group "+a[1]))&&P(e,"class",t),(!n||o&1)&&P(e,"aria-labelledby",a[0])},i(a){n||(we(s,a),n=!0)},o(a){Ie(s,a),n=!1},d(a){a&&X(e),s&&s.d(a)}}}const Ef="p-1";function Sf(r,e,t){let n,{$$slots:i={},$$scope:s}=e,{display:a="inline-flex"}=e,{flexDirection:o="flex-row"}=e,{gap:u="gap-1"}=e,{background:c="bg-surface-200-700-token"}=e,{border:h="border-token border-surface-400-500-token"}=e,{rounded:g="rounded-token"}=e,{padding:m="px-4 py-1"}=e,{active:p="variant-filled"}=e,{hover:y="hover:variant-soft"}=e,{color:w=""}=e,{fill:_=""}=e,{regionLabel:d=""}=e,{labelledby:b=""}=e;return Je("rounded",g),Je("padding",m),Je("active",p),Je("hover",y),Je("color",w),Je("fill",_),Je("regionLabel",d),r.$$set=T=>{t(16,e=Kt(Kt({},e),tr(T))),"display"in T&&t(2,a=T.display),"flexDirection"in T&&t(3,o=T.flexDirection),"gap"in T&&t(4,u=T.gap),"background"in T&&t(5,c=T.background),"border"in T&&t(6,h=T.border),"rounded"in T&&t(7,g=T.rounded),"padding"in T&&t(8,m=T.padding),"active"in T&&t(9,p=T.active),"hover"in T&&t(10,y=T.hover),"color"in T&&t(11,w=T.color),"fill"in T&&t(12,_=T.fill),"regionLabel"in T&&t(13,d=T.regionLabel),"labelledby"in T&&t(0,b=T.labelledby),"$$scope"in T&&t(14,s=T.$$scope)},r.$$.update=()=>{t(1,n=`${Ef} ${a} ${o} ${u} ${c} ${h} ${g} ${e.class??""}`)},e=tr(e),[b,n,a,o,u,c,h,g,m,p,y,w,_,d,s,i]}class Tf extends bt{constructor(e){super(),_t(this,e,Sf,vf,lt,{display:2,flexDirection:3,gap:4,background:5,border:6,rounded:7,padding:8,active:9,hover:10,color:11,fill:12,regionLabel:13,labelledby:0})}}function Af(r){let e,t,n,i,s,a,o,u,c,h,g,m=[{type:"radio"},{name:r[1]},{__value:r[2]},r[11](),{tabindex:"-1"}],p={};for(let _=0;_{H=J,t(7,H)})}function be(){m=this.__value,t(0,m)}return r.$$set=J=>{t(31,e=Kt(Kt({},e),tr(J))),t(30,c=Ti(e,u)),"group"in J&&t(0,m=J.group),"name"in J&&t(1,p=J.name),"value"in J&&t(2,y=J.value),"title"in J&&t(3,w=J.title),"label"in J&&t(4,_=J.label),"rounded"in J&&t(12,d=J.rounded),"padding"in J&&t(13,b=J.padding),"active"in J&&t(14,T=J.active),"hover"in J&&t(15,R=J.hover),"color"in J&&t(16,F=J.color),"fill"in J&&t(17,K=J.fill),"regionLabel"in J&&t(5,L=J.regionLabel),"$$scope"in J&&t(20,g=J.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&5&&t(6,n=y===m),r.$$.dirty[0]&245824&&t(19,i=n?`${T} ${F} ${K}`:R),t(18,s=e.disabled?Cf:""),t(8,o=`${xf} ${b} ${d} ${i} ${s} ${e.class??""}`)},t(9,a=`${kf}`),e=tr(e),[m,p,y,w,_,L,n,H,o,a,C,se,d,b,T,R,F,K,s,i,g,h,N,Y,x,W,pe,Z,be,ne]}class Ya extends bt{constructor(e){super(),_t(this,e,If,Af,lt,{group:0,name:1,value:2,title:3,label:4,rounded:12,padding:13,active:14,hover:15,color:16,fill:17,regionLabel:5},null,[-1,-1])}}function Ja(r){let e,t;const n=r[22].default,i=ar(n,r,r[21],null);return{c(){e=ae("div"),i&&i.c(),this.h()},l(s){e=oe(s,"DIV",{class:!0});var a=he(e);i&&i.l(a),a.forEach(X),this.h()},h(){P(e,"class","slide-toggle-text ml-3")},m(s,a){ke(s,e,a),i&&i.m(e,null),t=!0},p(s,a){i&&i.p&&(!t||a[0]&2097152)&&or(i,n,s,s[21],t?lr(n,s[21],a,null):ur(s[21]),null)},i(s){t||(we(i,s),t=!0)},o(s){Ie(i,s),t=!1},d(s){s&&X(e),i&&i.d(s)}}}function Rf(r){let e,t,n,i,s,a,o,u,c,h,g,m,p,y,w,_=[{type:"checkbox"},{class:"slide-toggle-input hidden"},{name:r[1]},r[8](),{disabled:i=r[9].disabled}],d={};for(let T=0;T<_.length;T+=1)d=Kt(d,_[T]);let b=r[10].default&&Ja(r);return{c(){e=ae("div"),t=ae("label"),n=ae("input"),s=xe(),a=ae("div"),o=ae("div"),h=xe(),b&&b.c(),this.h()},l(T){e=oe(T,"DIV",{id:!0,class:!0,"data-testid":!0,role:!0,"aria-label":!0,"aria-checked":!0,tabindex:!0});var R=he(e);t=oe(R,"LABEL",{class:!0});var F=he(t);n=oe(F,"INPUT",{type:!0,class:!0,name:!0}),s=Ce(F),a=oe(F,"DIV",{class:!0});var K=he(a);o=oe(K,"DIV",{class:!0}),he(o).forEach(X),K.forEach(X),h=Ce(F),b&&b.l(F),F.forEach(X),R.forEach(X),this.h()},h(){Si(n,d),P(o,"class",u="slide-toggle-thumb "+r[3]),yt(o,"cursor-not-allowed",r[9].disabled),P(a,"class",c="slide-toggle-track "+r[4]),yt(a,"cursor-not-allowed",r[9].disabled),P(t,"class",g="slide-toggle-label "+r[5]),P(e,"id",r[2]),P(e,"class",m="slide-toggle "+r[6]),P(e,"data-testid","slide-toggle"),P(e,"role","switch"),P(e,"aria-label",r[2]),P(e,"aria-checked",r[0]),P(e,"tabindex","0")},m(T,R){ke(T,e,R),$(e,t),$(t,n),n.autofocus&&n.focus(),n.checked=r[0],$(t,s),$(t,a),$(a,o),$(t,h),b&&b.m(t,null),p=!0,y||(w=[Fe(n,"change",r[31]),Fe(n,"click",r[23]),Fe(n,"keydown",r[24]),Fe(n,"keyup",r[25]),Fe(n,"keypress",r[26]),Fe(n,"mouseover",r[27]),Fe(n,"change",r[28]),Fe(n,"focus",r[29]),Fe(n,"blur",r[30]),Fe(e,"keydown",r[7])],y=!0)},p(T,R){Si(n,d=al(_,[{type:"checkbox"},{class:"slide-toggle-input hidden"},(!p||R[0]&2)&&{name:T[1]},T[8](),(!p||R[0]&512&&i!==(i=T[9].disabled))&&{disabled:i}])),R[0]&1&&(n.checked=T[0]),(!p||R[0]&8&&u!==(u="slide-toggle-thumb "+T[3]))&&P(o,"class",u),(!p||R[0]&520)&&yt(o,"cursor-not-allowed",T[9].disabled),(!p||R[0]&16&&c!==(c="slide-toggle-track "+T[4]))&&P(a,"class",c),(!p||R[0]&528)&&yt(a,"cursor-not-allowed",T[9].disabled),T[10].default?b?(b.p(T,R),R[0]&1024&&we(b,1)):(b=Ja(T),b.c(),we(b,1),b.m(t,null)):b&&(mt(),Ie(b,1,1,()=>{b=null}),gt()),(!p||R[0]&32&&g!==(g="slide-toggle-label "+T[5]))&&P(t,"class",g),(!p||R[0]&4)&&P(e,"id",T[2]),(!p||R[0]&64&&m!==(m="slide-toggle "+T[6]))&&P(e,"class",m),(!p||R[0]&4)&&P(e,"aria-label",T[2]),(!p||R[0]&1)&&P(e,"aria-checked",T[0])},i(T){p||(we(b),p=!0)},o(T){Ie(b),p=!1},d(T){T&&X(e),b&&b.d(),y=!1,cr(w)}}}const Df="inline-block",Nf="unstyled flex items-center",Of="flex transition-all duration-[200ms] cursor-pointer",Ff="w-[50%] h-full scale-[0.8] transition-all duration-[200ms] shadow";function Bf(r,e,t){let n,i,s,a,o,u,c,h;const g=["name","checked","size","background","active","border","rounded","label"];let m=Ti(e,g),{$$slots:p={},$$scope:y}=e;const w=$u(p),_=aa();let{name:d}=e,{checked:b=!1}=e,{size:T="md"}=e,{background:R="bg-surface-400 dark:bg-surface-700"}=e,{active:F="bg-surface-900 dark:bg-surface-300"}=e,{border:K=""}=e,{rounded:L="rounded-full"}=e,{label:H=""}=e,C;switch(T){case"sm":C="w-12 h-6";break;case"lg":C="w-20 h-10";break;default:C="w-16 h-8"}function se(G){["Enter","Space"].includes(G.code)&&(G.preventDefault(),_("keyup",G),G.currentTarget.firstChild.click())}function ne(){return delete m.class,m}function N(G){Nt.call(this,r,G)}function Y(G){Nt.call(this,r,G)}function x(G){Nt.call(this,r,G)}function W(G){Nt.call(this,r,G)}function pe(G){Nt.call(this,r,G)}function Z(G){Nt.call(this,r,G)}function be(G){Nt.call(this,r,G)}function J(G){Nt.call(this,r,G)}function Ae(){b=this.checked,t(0,b)}return r.$$set=G=>{t(9,e=Kt(Kt({},e),tr(G))),t(33,m=Ti(e,g)),"name"in G&&t(1,d=G.name),"checked"in G&&t(0,b=G.checked),"size"in G&&t(11,T=G.size),"background"in G&&t(12,R=G.background),"active"in G&&t(13,F=G.active),"border"in G&&t(14,K=G.border),"rounded"in G&&t(15,L=G.rounded),"label"in G&&t(2,H=G.label),"$$scope"in G&&t(21,y=G.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&12289&&t(19,n=b?F:`${R} cursor-pointer`),r.$$.dirty[0]&1&&t(18,i=b?"bg-white/75":"bg-white"),r.$$.dirty[0]&1&&t(17,s=b?"translate-x-full":""),t(20,a=e.disabled===!0?"opacity-50":"hover:brightness-[105%] dark:hover:brightness-110 cursor-pointer"),t(6,o=`${Df} ${L} ${a} ${e.class??""}`),r.$$.dirty[0]&638976&&t(4,c=`${Of} ${K} ${L} ${C} ${n}`),r.$$.dirty[0]&425984&&t(3,h=`${Ff} ${L} ${i} ${s}`)},t(5,u=`${Nf}`),e=tr(e),[b,d,H,h,c,u,o,se,ne,e,w,T,R,F,K,L,C,s,i,n,a,y,p,N,Y,x,W,pe,Z,be,J,Ae]}class _i extends bt{constructor(e){super(),_t(this,e,Bf,Rf,lt,{name:1,checked:0,size:11,background:12,active:13,border:14,rounded:15,label:2},null,[-1,-1])}}function Qa(r,e,t){const n=r.slice();return n[36]=e[t],n[38]=t,n}function $a(r){let e,t,n=[],i=new Map,s,a,o,u=Rt(r[11]);const c=h=>h[36];for(let h=0;h{w&&(m&&m.end(1),g=tl(t,Ai,{transition:e[5],params:{x:e[10].x,y:e[10].y,...e[6]},enabled:e[4]}),g.start())}),w=!0)},o(F){g&&g.invalidate(),m=rl(t,Ai,{transition:e[7],params:{x:e[10].x,y:e[10].y,...e[8]},enabled:e[4]}),w=!1},d(F){F&&X(t),b&&b.d(),F&&m&&m.end(),_=!1,cr(d)}}}function Pf(r){let e,t,n=r[9].length&&$a(r);return{c(){n&&n.c(),e=ut()},l(i){n&&n.l(i),e=ut()},m(i,s){n&&n.m(i,s),ke(i,e,s),t=!0},p(i,s){i[9].length?n?(n.p(i,s),s[0]&512&&we(n,1)):(n=$a(i),n.c(),we(n,1),n.m(e.parentNode,e)):n&&(mt(),Ie(n,1,1,()=>{n=null}),gt())},i(i){t||(we(n),t=!0)},o(i){Ie(n),t=!1},d(i){i&&X(e),n&&n.d(i)}}}const Lf="flex fixed top-0 left-0 right-0 bottom-0 pointer-events-none",Mf="flex flex-col gap-y-2",Uf="flex justify-between items-center pointer-events-auto",zf="flex items-center space-x-2";function jf(r,e,t){let n,i,s,a,o,u;Dr(r,nl,I=>t(34,u=I));const c=ul();Dr(r,c,I=>t(9,o=I));let{position:h="b"}=e,{max:g=3}=e,{background:m="variant-filled-secondary"}=e,{width:p="max-w-[640px]"}=e,{color:y=""}=e,{padding:w="p-4"}=e,{spacing:_="space-x-4"}=e,{rounded:d="rounded-container-token"}=e,{shadow:b="shadow-lg"}=e,{zIndex:T="z-[888]"}=e,{buttonAction:R="btn variant-filled"}=e,{buttonDismiss:F="btn-icon btn-icon-sm variant-filled"}=e,{buttonDismissLabel:K="✕"}=e,{transitions:L=!u}=e,{transitionIn:H=za}=e,{transitionInParams:C={duration:250}}=e,{transitionOut:se=za}=e,{transitionOutParams:ne={duration:250}}=e,N,Y,x={x:0,y:0};switch(h){case"t":N="justify-center items-start",Y="items-center",x={x:0,y:-100};break;case"b":N="justify-center items-end",Y="items-center",x={x:0,y:100};break;case"l":N="justify-start items-center",Y="items-start",x={x:-100,y:0};break;case"r":N="justify-end items-center",Y="items-end",x={x:100,y:0};break;case"tl":N="justify-start items-start",Y="items-start",x={x:-100,y:0};break;case"tr":N="justify-end items-start",Y="items-end",x={x:100,y:0};break;case"bl":N="justify-start items-end",Y="items-start",x={x:-100,y:0};break;case"br":N="justify-end items-end",Y="items-end",x={x:100,y:0};break}function W(I){o[I]?.action?.response(),c.close(o[I].id)}function pe(I){o[I]?.hoverable&&(c.freeze(I),t(13,i+=" scale-[105%]"))}function Z(I){o[I]?.hoverable&&(c.unfreeze(I),t(13,i=i.replace(" scale-[105%]","")))}const be=I=>W(I),J=I=>c.close(I.id),Ae=I=>pe(I),G=I=>Z(I);return r.$$set=I=>{t(35,e=Kt(Kt({},e),tr(I))),"position"in I&&t(19,h=I.position),"max"in I&&t(20,g=I.max),"background"in I&&t(0,m=I.background),"width"in I&&t(21,p=I.width),"color"in I&&t(22,y=I.color),"padding"in I&&t(23,w=I.padding),"spacing"in I&&t(24,_=I.spacing),"rounded"in I&&t(25,d=I.rounded),"shadow"in I&&t(26,b=I.shadow),"zIndex"in I&&t(27,T=I.zIndex),"buttonAction"in I&&t(1,R=I.buttonAction),"buttonDismiss"in I&&t(2,F=I.buttonDismiss),"buttonDismissLabel"in I&&t(3,K=I.buttonDismissLabel),"transitions"in I&&t(4,L=I.transitions),"transitionIn"in I&&t(5,H=I.transitionIn),"transitionInParams"in I&&t(6,C=I.transitionInParams),"transitionOut"in I&&t(7,se=I.transitionOut),"transitionOutParams"in I&&t(8,ne=I.transitionOutParams)},r.$$.update=()=>{t(14,n=`${Lf} ${N} ${T} ${e.class||""}`),r.$$.dirty[0]&545259520&&t(13,i=`${Mf} ${Y} ${w}`),r.$$.dirty[0]&132120576&&t(12,s=`${Uf} ${p} ${y} ${w} ${_} ${d} ${b}`),r.$$.dirty[0]&1049088&&t(11,a=Array.from(o).slice(0,g))},e=tr(e),[m,R,F,K,L,H,C,se,ne,o,x,a,s,i,n,c,W,pe,Z,h,g,p,y,w,_,d,b,T,N,Y,be,J,Ae,G]}class Hf extends bt{constructor(e){super(),_t(this,e,jf,Pf,lt,{position:19,max:20,background:0,width:21,color:22,padding:23,spacing:24,rounded:25,shadow:26,zIndex:27,buttonAction:1,buttonDismiss:2,buttonDismissLabel:3,transitions:4,transitionIn:5,transitionInParams:6,transitionOut:7,transitionOutParams:8},null,[-1,-1])}}const Wf=!1,n1=Object.freeze(Object.defineProperty({__proto__:null,prerender:Wf},Symbol.toStringTag,{value:"Module"}));function ui(r){if(!r.endsWith("px"))return;const e=parseFloat(r.slice(0,r.length-2));return isNaN(e)?void 0:e}const ll=r=>r?"height":"width",Zs=r=>window.getComputedStyle(r),Ys=r=>r.getBoundingClientRect(),Gf=(r,e=!0)=>{if(r.getPropertyValue("box-sizing")==="border-box")return;const t=ui(r.getPropertyValue("border-left-width"));if(t===void 0){console.error("Splitpanes Error: Fail to parse container `border-left-width`.");return}const n=ui(r.getPropertyValue("border-top-width"));if(n===void 0){console.error("Splitpanes Error: Fail to parse container `border-top-width`.");return}const i={left:t,top:n};if(e){const s=ui(r.getPropertyValue("border-right-width"));if(s===void 0){console.error("Splitpanes Error: Fail to parse container `border-right-width`.");return}const a=ui(r.getPropertyValue("border-bottom-width"));if(a===void 0){console.error("Splitpanes Error: Fail to parse container `border-bottom-width`.");return}const o=i;o.right=s,o.bottom=a}return i};function Vf(r,e){e||(e=Zs(r));const t=Ys(r),n=Gf(e,!0)||{left:0,top:0,right:0,bottom:0};return{width:t.width-n.left-n.right,height:t.height-n.top-n.bottom,left:t.left+n.left,top:t.top+n.top}}const io=(r,e)=>({left:r.left-e.left,top:r.top-e.top});function so(r){const e=r,t=r,{clientX:n,clientY:i}="ontouchstart"in window&&t.touches?t.touches[0]:e;return{left:n,top:i}}function ao(r,e,t,n){let i=0;for(let s=e;st(31,s=ee));const Y=Zr(p);Dr(r,Y,ee=>t(30,i=ee));const x=Zr(void 0);Dr(r,x,ee=>t(29,n=ee));let W=null,pe=null;Je(cl,{showFirstSplitter:Y,veryFirstPaneKey:x,isHorizontal:N,ssrRegisterPaneSize:void 0,onPaneInit:ee=>(n===void 0&&tn(x,n=ee,n),{undefinedPaneInitSize:0}),clientOnly:{onPaneAdd:be,onPaneRemove:J}});function be(ee){let Ee=-1;Array.from(ee.element.parentNode.children).some(ve=>(ve.className.includes("splitpanes__pane")&&Ee++,ve===ee.element)),Ee===0&&tn(x,n=ee.key,n),ne.splice(Ee,0,ee);for(let ve=0;ve{ee.isReady=!0,d("pane-add",{index:Ee,panes:te()})});const Ne=(ve,Oe=!0)=>_e=>{(Oe||ee.index>0)&&ve(_e,ee)};return{onSplitterDown:Ne(S,!1),onSplitterClick:Ne(D,!1),onSplitterDblClick:Ne(O),onPaneClick:Ne(Ae),reportGivenSizeChange:Ne(G)}}async function J(ee){const Ee=ne.findIndex(Ne=>Ne.key===ee);if(Ee>=0){const Ne=ne.splice(Ee,1)[0];for(let ve=0;ve0?ne[0].key:void 0,n),T&&(await z(),d("pane-remove",{removed:Ne,panes:te()}))}}function Ae(ee,Ee){d("pane-click",Ee)}function G(ee,Ee){Ee.setSz(ee),z()}Ri(()=>{Te(),ue();for(let ee=0;ee{t(6,F=!0)},0)}),oa(()=>{T&&Q(),T=!1}),xc(()=>{Te()});function I(ee){if(m==="auto")try{return(ee??Zs(b)).direction==="rtl"}catch{}return m===!0}function q(){document.body.style.cursor=N?"col-resize":"row-resize",document.addEventListener("mousemove",j,{passive:!1}),document.addEventListener("mouseup",M),"ontouchstart"in window&&(document.addEventListener("touchmove",j,{passive:!1}),document.addEventListener("touchend",M))}function Q(){document.body.style.cursor="",document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",M),"ontouchstart"in window&&(document.removeEventListener("touchmove",j),document.removeEventListener("touchend",M))}const ie=ee=>ee.nodeType===Node.ELEMENT_NODE&&ee.classList.contains("splitpanes__splitter");function U(ee,Ee,Ne){let ve=ee[c?"top":"left"];return Ne&&!c&&(ve=Ee-ve),ve}const A=()=>ll(c);function S(ee,Ee){t(7,K=!0),H=Ee.index,Ee.setSplitterActive(!0);let ve=Ee.element;for(;ve!=null&&(ve=ve.previousSibling,!ie(ve)););if(ve==null){console.error("Splitpane Error: Active splitter wasn't found!");return}W=ve;const Oe=so(ee),_e=Ys(W);pe=U(io(Oe,_e),_e[A()],I()),q()}function j(ee){if(K){ee.preventDefault(),t(8,L=!0);const Ee=so(ee),Ne=Zs(b),ve=Vf(b,Ne),Oe=ve[A()],_e=I(Ne),Re=io(Ee,ve),Pe=U(Re,Oe,_e);re(Pe,Oe),d("resize",te())}}function M(){L&&d("resized",te()),t(7,K=!1),ne[H].setSplitterActive(!1),setTimeout(()=>{t(8,L=!1),Q()},100)}function D(ee,Ee){if("ontouchstart"in window){ee.preventDefault();const Ne=Ee.index;g&&(C===Ne?(se&&clearTimeout(se),se=null,O(ee,Ee),C=-1):(C=Ne,se=setTimeout(()=>{C=-1},500)))}L||d("splitter-click",Ee)}function O(ee,Ee){if(g){const Ne=Ee.index;let ve=0;for(let Re=0;Re=100)for(let Re=0;Re{const Ve=ze.min(),Ye=ze.max(),qe=Math.min(Math.max(0,Re),Ye-Ve);ze.setSz(Ve+qe),Re-=qe};for(let ze=Ne-1;ze>=0;ze--)Pe(ne[ze]);for(let ze=Ne+1;zene.map(ee=>({min:ee.min(),max:ee.max(),size:ee.sz(),snap:ee.snap()}));function v(ee,Ee){const Ne=Ye=>Ys(Ye)[A()],ve=Ne(W);let Oe=0,_e=W.previousSibling;for(;_e!=null;)ie(_e)&&(Oe+=Ne(_e)),_e=_e.previousSibling;let Re=0,Pe=W.nextSibling;for(;Pe!=null;)ie(Pe)&&(Re+=Ne(Pe)),Pe=Pe.nextSibling;const ze=Oe+pe,Ve=Oe+ve+Re;return(ee-ze)/(Ee-Ve)*100}function re(ee,Ee){let Ne=H-1,ve=ne[Ne],Oe=H,_e=ne[Oe],Re={prevPanesSize:f(Ne),nextPanesSize:E(Oe),prevReachedMinPanes:0,nextReachedMinPanes:0};const Pe=0+(h?0:Re.prevPanesSize),ze=100-(h?0:Re.nextPanesSize),Ve=Math.max(Math.min(v(ee,Ee),ze),Pe),Ye=Re.prevPanesSize+ve.min()+ve.snap(),qe=100-(Re.nextPanesSize+_e.min()+_e.snap());let Ge=Ve,ct=!1;Ve<=Ye?Ve>Re.prevPanesSize+ve.min()&&(Ge=Math.max(ve.min()+Re.prevPanesSize,100-(_e.max()+Re.nextPanesSize)),ct=!0):Ve>=qe&&Ve<100-Re.nextPanesSize-_e.min()&&(Ge=Math.min(100-(_e.min()+Re.nextPanesSize),ve.max()+Re.prevPanesSize),ct=!0);const Lt=ve.max()<100&&Ge>=ve.max()+Re.prevPanesSize,Yt=_e.max()<100&&Ge<=100-(_e.max()+Re.nextPanesSize);if(Lt||Yt)Lt?(ve.setSz(ve.max()),_e.setSz(Math.max(100-ve.max()-Re.prevPanesSize-Re.nextPanesSize,0))):(ve.setSz(Math.max(100-_e.max()-Re.prevPanesSize-Re.nextPanesSize,0)),_e.setSz(_e.max()));else{if(h&&!ct){const Xt=k(Re,Ge);if(!Xt)return;({sums:Re,paneBeforeIndex:Ne,paneAfterIndex:Oe}=Xt),ve=ne[Ne],_e=ne[Oe]}Ne!=null&&ve.setSz(Math.min(Math.max(Ge-Re.prevPanesSize-Re.prevReachedMinPanes,ve.min()),ve.max())),Oe!=null&&_e.setSz(Math.min(Math.max(100-Ge-Re.nextPanesSize-Re.nextReachedMinPanes,_e.min()),_e.max()))}}function k(ee,Ee){const Ne=H-1;let ve=Ne,Oe=Ne+1;if(Ee{_e.setSz(_e.min()),ee.prevReachedMinPanes+=_e.min()}),ee.prevPanesSize=f(ve),ve==null))return ee.prevReachedMinPanes=0,ne[0].setSz(ne[0].min()),li(ne,1,Ne+1,_e=>{_e.setSz(_e.min()),ee.prevReachedMinPanes+=_e.min()}),ne[Oe].setSz(100-ee.prevReachedMinPanes-ne[0].min()-ee.prevPanesSize-ee.nextPanesSize),null;if(Ee>100-ee.nextPanesSize-ne[Oe].min()){Oe=V(Ne)?.index,ee.nextReachedMinPanes=0,Oe>Ne+1&&li(ne,Ne+1,Oe,Re=>{Re.setSz(Re.min()),ee.nextReachedMinPanes+=Re.min()}),ee.nextPanesSize=E(Oe);const _e=ne.length;if(Oe==null)return ee.nextReachedMinPanes=0,ne[_e-1].setSz(ne[_e-1].min()),li(ne,Ne+1,_e-1,Re=>{Re.setSz(Re.min()),ee.nextReachedMinPanes+=Re.min()}),ne[ve].setSz(100-ee.prevPanesSize-ee.nextReachedMinPanes-ne[_e-1].min()-ee.nextPanesSize),null}return{sums:ee,paneBeforeIndex:ve,paneAfterIndex:Oe}}const l=ee=>ee.sz(),f=ee=>ao(ne,0,ee,l),E=ee=>ao(ne,ee+1,ne.length,l),B=ee=>[...ne].reverse().find(Ee=>Ee.indexEe.min()),V=ee=>ne.find(Ee=>Ee.index>ee+1&&Ee.sz()>Ee.min());async function z(){R=!0,await Cc(),R&&(ue(),R=!1)}function ue(){me(),T&&d("resized",te())}function me(){if(ne.length===0)return;const ee=ne.length;let Ee=100,Ne=0,ve=0,Oe=0,_e=[],Re=[];for(let qe=0;qe=Ge.max()&&_e.push(Ge),ct<=Ge.min()&&Re.push(Ge)):ve+=1:(Ee-=ct,Ne++,_e.push(Ge),Re.push(Ge))}const Pe=ee-Ne,ze=Pe-ve;let Ve,Ye;if(ze>0?(Ve=Oe/ze,Ve>.1&&Ee>.1?(Oe+=ve*Ve,Ye=Ee/Oe):(Ve=0,Ye=1)):(Ve=Ee/Pe,Ye=1),Ee+Oe>.1){Ee=100;for(let qe=0;qe.1&&(Ee=ce(Ee,_e,Re))}isFinite(Ee)?Math.abs(Ee)>.1&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints."):console.warn("Splitpanes: Internal error, sizes might be NaN as a result.")}function ce(ee,Ee,Ne){const Oe=ne.length-(ee>0?Ee.length:Ne.length);if(Oe<=0)return ee;const _e=ee/Oe;if(ne.length===1)ne[0].setSz(100),ee=0;else for(let Re=0;Re0&&!Ee.includes(Pe)){const Ve=Math.max(Math.min(ze+_e,Pe.max()),Pe.min()),Ye=Ve-ze;ee-=Ye,Pe.setSz(Ve)}else if(!Ne.includes(Pe)){const Ve=Math.max(Math.min(ze+_e,Pe.max()),Pe.min()),Ye=Ve-ze;ee-=Ye,Pe.setSz(Ve)}}return ee}function Te(){const{children:ee}=b;let Ee=0,Ne=!1;for(let ve=0;ve elements are allowed at the root of . One of your DOM nodes was removed.");return}else _e&&(!Ne&&ne[Ee].element!==Oe&&(Ne=!0),Ee++)}if(Ne){const ve=[];for(let Oe=0;Oeze.element===_e);Pe!=null?(Pe.index=ve.length,ve.push(Pe)):console.warn("Splitpanes: Internal error - found a elements which isn't tracked.")}}ne=ve,tn(x,n=ne.length>0?ne[0].key:void 0,n)}}function De(ee){et[ee?"unshift":"push"](()=>{b=ee,t(5,b)})}return r.$$set=ee=>{"id"in ee&&t(0,u=ee.id),"horizontal"in ee&&t(1,c=ee.horizontal),"pushOtherPanes"in ee&&t(12,h=ee.pushOtherPanes),"dblClickSplitter"in ee&&t(13,g=ee.dblClickSplitter),"rtl"in ee&&t(14,m=ee.rtl),"firstSplitter"in ee&&t(15,p=ee.firstSplitter),"style"in ee&&t(2,y=ee.style),"theme"in ee&&t(3,w=ee.theme),"class"in ee&&t(4,_=ee.class),"$$scope"in ee&&t(18,o=ee.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&2&&tn(N,s=c,s),r.$$.dirty[0]&32768&&tn(Y,i=p,i)},[u,c,y,w,_,b,F,K,L,N,Y,x,h,g,m,p,a,De,o]}class Xf extends bt{constructor(e){super(),_t(this,e,qf,Kf,lt,{id:0,horizontal:1,pushOtherPanes:12,dblClickSplitter:13,rtl:14,firstSplitter:15,style:2,theme:3,class:4},null,[-1,-1,-1])}}const Zf=(r,e)=>t=>{const n=r();n?.[e](t)},Yf=r=>Zf.bind(null,r);function Jf(r){let e,t,n,i,s,a,o=(r[4]!==r[9]||r[5])&&oo(r);const u=r[20].default,c=ar(u,r,r[19],null);return{c(){o&&o.c(),e=xe(),t=ae("div"),c&&c.c(),this.h()},l(h){o&&o.l(h),e=Ce(h),t=oe(h,"DIV",{class:!0,style:!0});var g=he(t);c&&c.l(g),g.forEach(X),this.h()},h(){P(t,"class",n=`splitpanes__pane ${r[0]||""}`),P(t,"style",r[3])},m(h,g){o&&o.m(h,g),ke(h,e,g),ke(h,t,g),c&&c.m(t,null),r[21](t),i=!0,s||(a=Fe(t,"click",r[11]("onPaneClick")),s=!0)},p(h,g){h[4]!==h[9]||h[5]?o?o.p(h,g):(o=oo(h),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),c&&c.p&&(!i||g&524288)&&or(c,u,h,h[19],i?lr(u,h[19],g,null):ur(h[19]),null),(!i||g&1&&n!==(n=`splitpanes__pane ${h[0]||""}`))&&P(t,"class",n),(!i||g&8)&&P(t,"style",h[3])},i(h){i||(we(c,h),i=!0)},o(h){Ie(c,h),i=!1},d(h){h&&(X(e),X(t)),o&&o.d(h),c&&c.d(h),r[21](null),s=!1,a()}}}function oo(r){let e,t,n,i;return{c(){e=ae("div"),this.h()},l(s){e=oe(s,"DIV",{class:!0}),he(e).forEach(X),this.h()},h(){P(e,"class",t="splitpanes__splitter "+(r[2]?"splitpanes__splitter__active":""))},m(s,a){ke(s,e,a),n||(i=[Fe(e,"mousedown",r[11]("onSplitterDown")),Fe(e,"touchstart",r[11]("onSplitterDown")),Fe(e,"click",r[11]("onSplitterClick")),Fe(e,"dblclick",r[11]("onSplitterDblClick"))],n=!0)},p(s,a){a&4&&t!==(t="splitpanes__splitter "+(s[2]?"splitpanes__splitter__active":""))&&P(e,"class",t)},d(s){s&&X(e),n=!1,cr(i)}}}function Qf(r){let e,t,n=!r[10]&&Jf(r);return{c(){n&&n.c(),e=ut()},l(i){n&&n.l(i),e=ut()},m(i,s){n&&n.m(i,s),ke(i,e,s),t=!0},p(i,[s]){i[10]||n.p(i,s)},i(i){t||(we(n),t=!0)},o(i){Ie(n),t=!1},d(i){i&&X(e),n&&n.d(i)}}}function $f(r,e,t){let n,i,s,a,o,{$$slots:u={},$$scope:c}=e;const{ssrRegisterPaneSize:h,onPaneInit:g,clientOnly:m,isHorizontal:p,showFirstSplitter:y,veryFirstPaneKey:w}=ot(cl);Dr(r,p,W=>t(18,s=W)),Dr(r,y,W=>t(5,o=W)),Dr(r,w,W=>t(4,a=W));let{size:_=null}=e,{minSize:d=0}=e,{maxSize:b=100}=e,{snapSize:T=0}=e,{class:R=""}=e;const F={},K=!il,{undefinedPaneInitSize:L}=g(F);let H,C=_??L,se=!1,ne;const N=Yf(()=>ne),Y=W=>{W!=C&&N("reportGivenSizeChange")(W)};Ri(()=>{const W={key:F,element:H,givenSize:_,sz:()=>C,setSz:pe=>{t(16,C=pe),_!=null&&_!=C&&t(12,_=C)},min:()=>d,max:()=>b,snap:()=>T,setSplitterActive:pe=>{t(2,se=pe)},isReady:!1};ne=m.onPaneAdd(W)}),oa(()=>{m.onPaneRemove(F)});function x(W){et[W?"unshift":"push"](()=>{H=W,t(1,H)})}return r.$$set=W=>{"size"in W&&t(12,_=W.size),"minSize"in W&&t(13,d=W.minSize),"maxSize"in W&&t(14,b=W.maxSize),"snapSize"in W&&t(15,T=W.snapSize),"class"in W&&t(0,R=W.class),"$$scope"in W&&t(19,c=W.$$scope)},r.$$.update=()=>{r.$$.dirty&4096&&_!=null&&Y(_),r.$$.dirty&262144&&t(17,n=ll(s)),r.$$.dirty&196608&&t(3,i=`${n}: ${C}%;`)},[R,H,se,i,a,o,p,y,w,F,K,N,_,d,b,T,C,n,s,c,u,x]}class uo extends bt{constructor(e){super(),_t(this,e,$f,Qf,lt,{size:12,minSize:13,maxSize:14,snapSize:15,class:0})}}function eh(r){let e,t,n,i,s,a,o;return{c(){e=Wt("svg"),t=Wt("circle"),n=Wt("animate"),i=Wt("circle"),s=Wt("animate"),a=Wt("circle"),o=Wt("animate"),this.h()},l(u){e=Gt(u,"svg",{version:!0,id:!0,xmlns:!0,"xmlns:xlink":!0,x:!0,y:!0,viewBox:!0,"enable-background":!0,"xml:space":!0});var c=he(e);t=Gt(c,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var h=he(t);n=Gt(h,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),he(n).forEach(X),h.forEach(X),i=Gt(c,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var g=he(i);s=Gt(g,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),he(s).forEach(X),g.forEach(X),a=Gt(c,"circle",{fill:!0,stroke:!0,cx:!0,cy:!0,r:!0});var m=he(a);o=Gt(m,"animate",{attributeName:!0,dur:!0,values:!0,repeatCount:!0,begin:!0}),he(o).forEach(X),m.forEach(X),c.forEach(X),this.h()},h(){P(n,"attributeName","opacity"),P(n,"dur","1s"),P(n,"values","0;1;0"),P(n,"repeatCount","indefinite"),P(n,"begin","0.1"),P(t,"fill","#1976d2"),P(t,"stroke","none"),P(t,"cx","6"),P(t,"cy","50"),P(t,"r","6"),P(s,"attributeName","opacity"),P(s,"dur","1s"),P(s,"values","0;1;0"),P(s,"repeatCount","indefinite"),P(s,"begin","0.2"),P(i,"fill","#1976d2"),P(i,"stroke","none"),P(i,"cx","26"),P(i,"cy","50"),P(i,"r","6"),P(o,"attributeName","opacity"),P(o,"dur","1s"),P(o,"values","0;1;0"),P(o,"repeatCount","indefinite"),P(o,"begin","0.3"),P(a,"fill","#1976d2"),P(a,"stroke","none"),P(a,"cx","46"),P(a,"cy","50"),P(a,"r","6"),P(e,"version","1.1"),P(e,"id","L4"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),P(e,"x","0px"),P(e,"y","0px"),P(e,"viewBox","0 0 100 100"),P(e,"enable-background","new 0 0 0 0"),P(e,"xml:space","preserve")},m(u,c){ke(u,e,c),$(e,t),$(t,n),$(e,i),$(i,s),$(e,a),$(a,o)},p:We,i:We,o:We,d(u){u&&X(e)}}}function th(r,e,t){let{size:n=20}=e;return r.$$set=i=>{"size"in i&&t(0,n=i.size)},[n]}class rh extends bt{constructor(e){super(),_t(this,e,th,eh,lt,{size:0})}}function nh(r){let e,t,n,i,s;return{c(){e=ae("div"),t=Wt("svg"),n=Wt("circle"),i=xe(),s=st(r[2]),this.h()},l(a){e=oe(a,"DIV",{class:!0});var o=he(e);t=Gt(o,"svg",{class:!0,viewBox:!0,xmlns:!0});var u=he(t);n=Gt(u,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),he(n).forEach(X),u.forEach(X),i=Ce(o),s=at(o,r[2]),o.forEach(X),this.h()},h(){P(n,"cx","10"),P(n,"cy","10"),P(n,"r","5"),P(n,"fill",r[0]),Vt(n,"filter","drop-shadow(0 0 1px "+r[1]+")"),P(t,"class","dot svelte-a20mi8"),P(t,"viewBox","0 0 20 20"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(e,"class","llm-health-status svelte-a20mi8")},m(a,o){ke(a,e,o),$(e,t),$(t,n),$(e,i),$(e,s)},p(a,[o]){o&1&&P(n,"fill",a[0]),o&2&&Vt(n,"filter","drop-shadow(0 0 1px "+a[1]+")"),o&4&&jt(s,a[2])},i:We,o:We,d(a){a&&X(e)}}}function ih(r,e,t){let{status:n="unknown"}=e,i="",s="",a="";switch(n){case"ok":i="#4CAF50",s="rgba(0, 128, 0, 0.7)",a="Сервис LLM работает";break;case"error":a="Сервис LLM не работает";break;case"loading model":i="yellow",s="rgba(255, 255, 0, 0.7)",a="Сервис LLM запускается...";break;case"unavailable":i="#af4f4c",s="#af4f4c",a="Сервис LLM не запущен";break;case"unknown":i="#af4f4c",s="#af4f4c",a="Сервис LLM недоступен";break}return r.$$set=o=>{"status"in o&&t(3,n=o.status)},[i,s,a,n]}class sh extends bt{constructor(e){super(),_t(this,e,ih,nh,lt,{status:3})}}function ah(r){let e,t,n,i,s;return{c(){e=ae("div"),t=Wt("svg"),n=Wt("circle"),i=xe(),s=st(r[2]),this.h()},l(a){e=oe(a,"DIV",{class:!0});var o=he(e);t=Gt(o,"svg",{class:!0,viewBox:!0,xmlns:!0});var u=he(t);n=Gt(u,"circle",{cx:!0,cy:!0,r:!0,fill:!0,style:!0}),he(n).forEach(X),u.forEach(X),i=Ce(o),s=at(o,r[2]),o.forEach(X),this.h()},h(){P(n,"cx","10"),P(n,"cy","10"),P(n,"r","5"),P(n,"fill",r[0]),Vt(n,"filter","drop-shadow(0 0 1px "+r[1]+")"),P(t,"class","dot svelte-1wcf73j"),P(t,"viewBox","0 0 20 20"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(e,"class","llm-health-status svelte-1wcf73j")},m(a,o){ke(a,e,o),$(e,t),$(t,n),$(e,i),$(e,s)},p(a,[o]){o&1&&P(n,"fill",a[0]),o&2&&Vt(n,"filter","drop-shadow(0 0 1px "+a[1]+")"),o&4&&jt(s,a[2])},i:We,o:We,d(a){a&&X(e)}}}function oh(r,e,t){let{status:n="unavailable"}=e,i="",s="",a="";switch(n){case"ok":i="#4CAF50",s="rgba(0, 128, 0, 0.7)",a="Поиск работает";break;case"unavailable":i="#af4f4c",s="#af4f4c",a="Поиск не запущен";break;case"unknown":i="#af4f4c",s="#af4f4c",a="Поиск недоступен";break}return r.$$set=o=>{"status"in o&&t(3,n=o.status)},[i,s,a,n]}class uh extends bt{constructor(e){super(),_t(this,e,oh,ah,lt,{status:3})}}function lh(r){let e,t,n,i,s,a="Сохранить",o,u,c="Сбросить",h,g;return{c(){e=ae("div"),t=ae("div"),n=ae("textarea"),i=xe(),s=ae("button"),s.textContent=a,o=xe(),u=ae("button"),u.textContent=c,this.h()},l(m){e=oe(m,"DIV",{class:!0});var p=he(e);t=oe(p,"DIV",{class:!0});var y=he(t);n=oe(y,"TEXTAREA",{class:!0}),he(n).forEach(X),i=Ce(y),s=oe(y,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(s)!=="svelte-g0hhac"&&(s.textContent=a),o=Ce(y),u=oe(y,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(u)!=="svelte-16kemh0"&&(u.textContent=c),y.forEach(X),p.forEach(X),this.h()},h(){P(n,"class","svelte-sfudwy"),P(s,"class","svelte-sfudwy"),P(u,"class","svelte-sfudwy"),P(t,"class","popup svelte-sfudwy"),P(e,"class","modal svelte-sfudwy")},m(m,p){ke(m,e,p),$(e,t),$(t,n),Er(n,r[0]),$(t,i),$(t,s),$(t,o),$(t,u),h||(g=[Fe(n,"input",r[6]),Fe(s,"click",r[1]),Fe(u,"click",r[2])],h=!0)},p(m,[p]){p&1&&Er(n,m[0])},i:We,o:We,d(m){m&&X(e),h=!1,cr(g)}}}let ch='Ты бухгалтер. Ты отвечаешь на русском языке. Ты всегда следуешь моим инструкциям. Ты отвечаешь на вопросы клиентов. Чтобы ответить, ты обязательно используешь только "источники", которые я тебе предоставляю. Ты используешь только официально-деловой стиль и необходимую терминологию. Соблюдай этические нормы. При ответе на вопрос ты используешь только такой формат ответа: 1) Четкий и краткий ответ на поставленный вопрос. Ты можешь начать свой ответ так: "По Вашему вопросу сообщаем...". Используй по возможности слова: да, можно, нет, нельзя. 2) Обоснование (ты используешь для обоснования "источники". Ты используешь только "источники" для поиска необходимых "законов", "статей", "пунктов" и "подпунктов" для ответа на вопрос пользователя). 3) Аргументация (Ты используешь только "источники" для поиска необходимых "писем" и "судебных решений", чтобы аргументировать свой ответ)." 4) Заключение (ты подводишь итоги всего, что сказал выше. Избегай повторения и сложных конструкций). Если в источниках нельзя найти подходящую информацию для ответа, ты отвечаешь так: "Мы не можем ответить на данный вопрос. Обратитесь к специалисту." Вопрос: {{ВОПРОС}} Источники: {{ИСТОЧНИКИ}}';function fh(r,e,t){let{onSave:n}=e,{onClose:i}=e,{text:s=""}=e,a=s;function o(){n(a),i()}function u(){t(0,a=ch)}function c(){a=this.value,t(0,a)}return r.$$set=h=>{"onSave"in h&&t(3,n=h.onSave),"onClose"in h&&t(4,i=h.onClose),"text"in h&&t(5,s=h.text)},[a,o,u,n,i,s,c]}class hh extends bt{constructor(e){super(),_t(this,e,fh,lh,lt,{onSave:3,onClose:4,text:5})}}class Zt{static findDateInText(e){const t=/\b\d{1,2}\.\d{1,2}\.\d{4}\b/g,n=e.match(t);if(n&&n.length>0){const i=n[0],[s,a,o]=i.split(".").map(Number);return new Date(o,a-1,s)}return null}static sortByRelevanceAndDate(e){return e.sort((t,n)=>{const i=n.relevance-t.relevance;if(i!==0)return i;const s=Zt.findDateInText(t.title),a=Zt.findDateInText(n.title);return s&&a?a.getTime()-s.getTime():s?-1:a?1:0})}static sortByDate(e){const t=e.filter(o=>Zt.findDateInText(o.title)),n=e.filter(o=>!Zt.findDateInText(o.title)),i=t.sort((o,u)=>{const c=Zt.findDateInText(o.title),h=Zt.findDateInText(u.title);return c&&h?h.getTime()-c.getTime():c?-1:h?1:0}),s=[];let a=0;for(const o of e)if(Zt.findDateInText(o.title)){let u=i.shift();u&&s.push(u)}else s.push(n[a]),a++;return s}static sortByRelevance(e){return e.sort((t,n)=>t.relevance&&n.relevance?n.relevance-t.relevance:t.relevance?-1:n.relevance?1:0)}static identifyDocumentType(e){const t=[{regexp:/(ФАС |АС |КС |ВС |[Сс]удебн|[Сс]уд)|(\(Судебный документ\))/,docType:"Решение суда"},{regexp:/[Пп]исьмо [Мм]инфина/,docType:"Письмо Минфина"},{regexp:/[Пп]исьмо (ФНС|фнс)/,docType:"Письмо ФНС"},{regexp:/(НКРФ)|(НК РФ)/,docType:"Налоговый кодекс"},{regexp:/(ГКРФ)|(ГК РФ)/,docType:"Гражданский кодекс"},{regexp:/(ТКРФ)|(ТК РФ)/,docType:"Трудовой кодекс"},{regexp:/Приказ ФНС РФ/,docType:"Приказ ФНС РФ"},{regexp:/Постановление Правительства РФ/,docType:"Постановление Правительства РФ"},{regexp:/Решение Коллегии Евразийской экономической комиссии/,docType:"Решение Коллегии ЕЭК"},{regexp:/Федеральный закон/,docType:"Федеральные законы"},{regexp:/\(Внутренний документ\)|\(ВНД\)/,docType:"Внутренние документы"}];return e.map(n=>{for(const{regexp:i,docType:s}of t)if(i.test(n.title))return n.docType=s,n;return n.docType="Другие документы",n})}static mergeResultsByTitle(e){const t=/(ст\.\d+)\s(НКРФ|НК РФ|ГКРФ|ГК РФ|ТКРФ|ТК РФ)$/,n={},i=[],s=a=>{const o=a.match(t);return o?o[0]:null};return e.forEach(a=>{const o=s(a.title);if(o)if(n[o]){n[o].relevance=Math.max(n[o].relevance,a.relevance);const u=n[o].title.match(/п[\w\.]+/g)||[],c=a.title.match(/п[\w\.]+/g)||[],h=[...new Set([...u,...c])].join(", ");n[o].title=`${h} ст.${o.split(" ")[0].split(".")[1]} ${o.split(" ")[1]}`,n[o].text+=`
+${a.title}
+${a.text}`,a.text_for_llm&&(n[o].text_for_llm+=`
+${a.title}
+${a.text_for_llm}`)}else n[o]={...a};else i.push(a)}),Object.keys(n).forEach(a=>{i.push(n[a])}),i}}function lo(r,e,t){const n=r.slice();return n[13]=e[t],n}function co(r){let e,t,n;return{c(){e=ae("input"),this.h()},l(i){e=oe(i,"INPUT",{type:!0}),this.h()},h(){P(e,"type","checkbox")},m(i,s){ke(i,e,s),e.checked=r[1][r[3]],t||(n=Fe(e,"change",r[10]),t=!0)},p(i,s){s&10&&(e.checked=i[1][i[3]])},d(i){i&&X(e),t=!1,n()}}}function dh(r){let e,t;return{c(){e=ae("div"),t=st(r[4]),this.h()},l(n){e=oe(n,"DIV",{class:!0});var i=he(e);t=at(i,r[4]),i.forEach(X),this.h()},h(){P(e,"class","annotation svelte-1srbk6k")},m(n,i){ke(n,e,i),$(e,t)},p(n,i){i&16&&jt(t,n[4])},d(n){n&&X(e)}}}function ph(r){let e,t=Rt(r[5].split(`
+`)),n=[];for(let i=0;i100&&po(r);return{c(){e=ae("div"),t=ae("div"),n=ae("label"),c&&c.c(),i=xe(),s=st(r[3]),a=xe(),m.c(),o=xe(),p&&p.c(),u=xe(),y&&y.c(),this.h()},l(w){e=oe(w,"DIV",{class:!0});var _=he(e);t=oe(_,"DIV",{class:!0});var d=he(t);n=oe(d,"LABEL",{style:!0});var b=he(n);c&&c.l(b),i=Ce(b),s=at(b,r[3]),b.forEach(X),d.forEach(X),a=Ce(_),m.l(_),o=Ce(_),p&&p.l(_),u=Ce(_),y&&y.l(_),_.forEach(X),this.h()},h(){Vt(n,"cursor","pointer"),P(t,"class","title svelte-1srbk6k"),P(e,"class","search-result svelte-1srbk6k")},m(w,_){ke(w,e,_),$(e,t),$(t,n),c&&c.m(n,null),$(n,i),$(n,s),$(e,a),m.m(e,null),$(e,o),p&&p.m(e,null),$(e,u),y&&y.m(e,null)},p(w,[_]){w[8]?c?c.p(w,_):(c=co(w),c.c(),c.m(n,i)):c&&(c.d(1),c=null),_&8&&jt(s,w[3]),g===(g=h(w))&&m?m.p(w,_):(m.d(1),m=g(w),m&&(m.c(),m.m(e,o))),w[6]&&w[7]?p?p.p(w,_):(p=ho(w),p.c(),p.m(e,u)):p&&(p.d(1),p=null),w[5].length>100?y?y.p(w,_):(y=po(w),y.c(),y.m(e,null)):y&&(y.d(1),y=null)},i:We,o:We,d(w){w&&X(e),c&&c.d(),m.d(),p&&p.d(),y&&y.d()}}}function yh(r,e,t){let{showFullText:n=Array(10).fill(!1)}=e,{useSearchResult:i}=e,{index:s}=e,{title:a}=e,{teaser:o}=e,{text:u}=e,{enableDocumentDb:c=!1}=e,{documentDbUrl:h=""}=e,{enableSearchResultSelection:g=!1}=e;function m(_){t(0,n[_]=!n[_],n)}function p(){i[a]=this.checked,t(1,i)}const y=()=>m(s),w=()=>m(s);return r.$$set=_=>{"showFullText"in _&&t(0,n=_.showFullText),"useSearchResult"in _&&t(1,i=_.useSearchResult),"index"in _&&t(2,s=_.index),"title"in _&&t(3,a=_.title),"teaser"in _&&t(4,o=_.teaser),"text"in _&&t(5,u=_.text),"enableDocumentDb"in _&&t(6,c=_.enableDocumentDb),"documentDbUrl"in _&&t(7,h=_.documentDbUrl),"enableSearchResultSelection"in _&&t(8,g=_.enableSearchResultSelection)},[n,i,s,a,o,u,c,h,g,m,p,y,w]}class fl extends bt{constructor(e){super(),_t(this,e,yh,wh,lt,{showFullText:0,useSearchResult:1,index:2,title:3,teaser:4,text:5,enableDocumentDb:6,documentDbUrl:7,enableSearchResultSelection:8})}}function mo(r,e,t){const n=r.slice();return n[22]=e[t].title,n[23]=e[t].text,n[24]=e[t].teaser,n[25]=e[t].text_for_llm,n[27]=t,n}function go(r,e,t){const n=r.slice();return n[18]=e[t][0],n[19]=e[t][1],n}function wo(r,e,t){const n=r.slice();return n[22]=e[t].title,n[23]=e[t].text,n[24]=e[t].teaser,n[25]=e[t].text_for_llm,n[27]=t,n}function yo(r){let e,t,n,i="Сортировать по:",s,a,o,u,c,h;a=new Tf({props:{background:"",border:"",$$slots:{default:[vh]},$$scope:{ctx:r}}});function g(p){r[12](p)}let m={name:"groupByChecked",size:"sm",label:"Группировать по типу",$$slots:{default:[Eh]},$$scope:{ctx:r}};return r[6]!==void 0&&(m.checked=r[6]),u=new _i({props:m}),et.push(()=>dt(u,"checked",g)),{c(){e=ae("div"),t=ae("div"),n=ae("label"),n.textContent=i,s=xe(),tt(a.$$.fragment),o=xe(),tt(u.$$.fragment),this.h()},l(p){e=oe(p,"DIV",{class:!0});var y=he(e);t=oe(y,"DIV",{class:!0,style:!0});var w=he(t);n=oe(w,"LABEL",{style:!0,class:!0,"data-svelte-h":!0}),$e(n)!=="svelte-12wnwfn"&&(n.textContent=i),s=Ce(w),rt(a.$$.fragment,w),o=Ce(w),rt(u.$$.fragment,w),w.forEach(X),y.forEach(X),this.h()},h(){Vt(n,"display","inline-block"),Vt(n,"flex-wrap","wrap"),P(n,"class","svelte-1ptibtq"),P(t,"class","card w-full flex p-2 space-y-2"),Vt(t,"align-items","center"),Vt(t,"flex-wrap","wrap"),P(e,"class","settings-bar svelte-1ptibtq")},m(p,y){ke(p,e,y),$(e,t),$(t,n),$(t,s),nt(a,t,null),$(t,o),nt(u,t,null),h=!0},p(p,y){const w={};y&536871040&&(w.$$scope={dirty:y,ctx:p}),a.$set(w);const _={};y&536870912&&(_.$$scope={dirty:y,ctx:p}),!c&&y&64&&(c=!0,_.checked=p[6],ht(()=>c=!1)),u.$set(_)},i(p){h||(we(a.$$.fragment,p),we(u.$$.fragment,p),h=!0)},o(p){Ie(a.$$.fragment,p),Ie(u.$$.fragment,p),h=!1},d(p){p&&X(e),it(a),it(u)}}}function bh(r){let e;return{c(){e=st("релевантности")},l(t){e=at(t,"релевантности")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function _h(r){let e;return{c(){e=st("дате")},l(t){e=at(t,"дате")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function vh(r){let e,t,n,i,s,a;function o(g){r[10](g)}let u={name:"sortBy",value:"rel",$$slots:{default:[bh]},$$scope:{ctx:r}};r[7]!==void 0&&(u.group=r[7]),e=new Ya({props:u}),et.push(()=>dt(e,"group",o));function c(g){r[11](g)}let h={name:"sortBy",value:"date",$$slots:{default:[_h]},$$scope:{ctx:r}};return r[7]!==void 0&&(h.group=r[7]),i=new Ya({props:h}),et.push(()=>dt(i,"group",c)),{c(){tt(e.$$.fragment),n=xe(),tt(i.$$.fragment)},l(g){rt(e.$$.fragment,g),n=Ce(g),rt(i.$$.fragment,g)},m(g,m){nt(e,g,m),ke(g,n,m),nt(i,g,m),a=!0},p(g,m){const p={};m&536870912&&(p.$$scope={dirty:m,ctx:g}),!t&&m&128&&(t=!0,p.group=g[7],ht(()=>t=!1)),e.$set(p);const y={};m&536870912&&(y.$$scope={dirty:m,ctx:g}),!s&&m&128&&(s=!0,y.group=g[7],ht(()=>s=!1)),i.$set(y)},i(g){a||(we(e.$$.fragment,g),we(i.$$.fragment,g),a=!0)},o(g){Ie(e.$$.fragment,g),Ie(i.$$.fragment,g),a=!1},d(g){g&&X(n),it(e,g),it(i,g)}}}function Eh(r){let e;return{c(){e=st("Группировать по типу")},l(t){e=at(t,"Группировать по типу")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function Sh(r){let e,t,n=Rt(r[1]),i=[];for(let a=0;aIe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;aIe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;aIe(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;a0&&yo(r);const c=[Th,Sh],h=[];function g(p,y){return p[6]&&p[8]?0:1}n=g(r),i=h[n]=c[n](r);let m=Rh;return{c(){e=ae("div"),u&&u.c(),t=xe(),i.c(),s=xe(),a=ut(),this.h()},l(p){e=oe(p,"DIV",{class:!0});var y=he(e);u&&u.l(y),t=Ce(y),i.l(y),y.forEach(X),s=Ce(p),a=ut(),this.h()},h(){P(e,"class","search-results svelte-1ptibtq")},m(p,y){ke(p,e,y),u&&u.m(e,null),$(e,t),h[n].m(e,null),ke(p,s,y),ke(p,a,y),o=!0},p(p,[y]){p[1]&&p[1].length>0?u?(u.p(p,y),y&2&&we(u,1)):(u=yo(p),u.c(),we(u,1),u.m(e,t)):u&&(mt(),Ie(u,1,1,()=>{u=null}),gt());let w=n;n=g(p),n===w?h[n].p(p,y):(mt(),Ie(h[w],1,1,()=>{h[w]=null}),gt(),i=h[n],i?i.p(p,y):(i=h[n]=c[n](p),i.c()),we(i,1),i.m(e,null))},i(p){o||(we(u),we(i),we(m),o=!0)},o(p){Ie(u),Ie(i),Ie(m),o=!1},d(p){p&&(X(e),X(s),X(a)),u&&u.d(),h[n].d()}}}let Rh=!1;function Dh(r,e,t){let{enableDocumentDb:n=!1}=e,{documentDbUrl:i=""}=e,{showFullText:s=Array(10).fill(!1)}=e,{useSearchResult:a}=e,o=!1,u="rel",{searchResults:c=[]}=e,h,{enableSearchResultSelection:g=!1}=e;const m=d=>d.reduce((b,T)=>{const R=T.docType||"Другие документы";return b[R]||(b[R]=[]),b[R].push(T),b},{}),p=d=>{d.stopPropagation();const b=d.target.dataset.doctype;Object.keys(h[b]).forEach(T=>{t(0,a[h[b][T].title]=d.target.checked,a)})};function y(d){u=d,t(7,u)}function w(d){u=d,t(7,u)}function _(d){o=d,t(6,o)}return r.$$set=d=>{"enableDocumentDb"in d&&t(3,n=d.enableDocumentDb),"documentDbUrl"in d&&t(4,i=d.documentDbUrl),"showFullText"in d&&t(2,s=d.showFullText),"useSearchResult"in d&&t(0,a=d.useSearchResult),"searchResults"in d&&t(1,c=d.searchResults),"enableSearchResultSelection"in d&&t(5,g=d.enableSearchResultSelection)},r.$$.update=()=>{r.$$.dirty&194&&(o&&t(8,h=m(c)),u=="date"?t(1,c=Zt.sortByDate(c)):u=="rel"&&t(1,c=Zt.sortByRelevance(c))),r.$$.dirty&1&&a===void 0&&t(0,a={})},[a,c,s,n,i,g,o,u,h,p,y,w,_]}class Nh extends bt{constructor(e){super(),_t(this,e,Dh,Ih,lt,{enableDocumentDb:3,documentDbUrl:4,showFullText:2,useSearchResult:0,searchResults:1,enableSearchResultSelection:5})}}function So(r,e,t){const n=r.slice();return n[6]=e[t],n}function To(r){let e,t=Rt(r[3].split(`
+`)),n=[];for(let i=0;io(i);return r.$$set=c=>{"showFullText"in c&&t(0,n=c.showFullText),"index"in c&&t(1,i=c.index),"title"in c&&t(2,s=c.title),"text"in c&&t(3,a=c.text)},[n,i,s,a,o,u]}class Bh extends bt{constructor(e){super(),_t(this,e,Fh,Oh,lt,{showFullText:0,index:1,title:2,text:3})}}function ko(r,e,t){const n=r.slice();return n[2]=e[t].title,n[3]=e[t].text,n[5]=t,n}function xo(r){let e,t;return e=new Bh({props:{title:r[2],text:r[3],index:r[5],showFullText:r[0]}}),{c(){tt(e.$$.fragment)},l(n){rt(e.$$.fragment,n)},m(n,i){nt(e,n,i),t=!0},p(n,i){const s={};i&2&&(s.title=n[2]),i&2&&(s.text=n[3]),i&1&&(s.showFullText=n[0]),e.$set(s)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Ie(e.$$.fragment,n),t=!1},d(n){it(e,n)}}}function Ph(r){let e,t,n="Релевантные консультации",i,s,a,o,u=Rt(r[1]),c=[];for(let m=0;mIe(c[m],1,1,()=>{c[m]=null});let g=Lh;return{c(){e=ae("div"),t=ae("h2"),t.textContent=n,i=xe();for(let m=0;m{"showFullText"in s&&t(0,n=s.showFullText),"consultations"in s&&t(1,i=s.consultations)},[n,i]}class Uh extends bt{constructor(e){super(),_t(this,e,Mh,Ph,lt,{showFullText:0,consultations:1})}}const Cr="clarificationHistory_",ts="clarificationHistoryIndex",rs=2;class Pr{static loadHistory(){const e=[],t=this.getHistoryIndex();for(let n=0;nrs){const t=e-rs;for(let n=0;n0?(t(3,h=g.length-1),t(4,m=g.length),y(),t(11,c=!0),t(0,s=""),t(7,i=""),d("")):(t(3,h=0),t(4,m=0),t(11,c=!1))}Ri(()=>{p()});function y(){const L=Pr.getHistoryItem(h);return L&&(t(7,i=L.searchClarification),t(0,s=L.llmClarification),t(8,a=L.searchResults),t(9,o=L.relevantConsultations),t(10,u=L.llmResponse),t(6,n=L.userRequest)),L}function w(){return Pr.getHistoryItem(h)}function _(){Pr.clearHistory(),p()}function d(L){console.log("addState called");const H={userRequest:L,searchClarification:i,llmClarification:s,searchResults:[],llmResponse:"",relevantConsultations:[],transactionMaps:[]};t(4,m=Pr.getHistoryLength()),Pr.addHistoryItem(H),t(3,h=m-1)}function b(L,H,C,se,ne){console.log("updateCurrentState called");const N=Pr.getHistoryItem(h);N&&(N.userRequest=L??N.userRequest,N.searchClarification=i??N.searchClarification,N.llmClarification=s??N.llmClarification,N.searchResults=H??N.searchResults,N.llmResponse=C??N.llmResponse,N.relevantConsultations=se??N.relevantConsultations,N.transactionMaps=ne??N.transactionMaps,console.log(N),Pr.updateHistoryItem(h,N))}function T(){h>0&&(t(3,h-=1),y())}function R(){h{"userRequest"in L&&t(6,n=L.userRequest),"searchClarification"in L&&t(7,i=L.searchClarification),"llmClarification"in L&&t(0,s=L.llmClarification),"searchResults"in L&&t(8,a=L.searchResults),"relevantConsultations"in L&&t(9,o=L.relevantConsultations),"llmResponse"in L&&t(10,u=L.llmResponse),"historyIsNotEmpty"in L&&t(11,c=L.historyIsNotEmpty)},[s,T,R,h,m,_,n,i,a,o,u,c,y,w,d,b,F,K]}class Wh extends bt{constructor(e){super(),_t(this,e,Hh,zh,lt,{userRequest:6,searchClarification:7,llmClarification:0,searchResults:8,relevantConsultations:9,llmResponse:10,historyIsNotEmpty:11,loadCurrentHistoryItem:12,getCurrentState:13,addState:14,updateCurrentState:15,prevHistory:1,nextHistory:2,clear:16})}get loadCurrentHistoryItem(){return this.$$.ctx[12]}get getCurrentState(){return this.$$.ctx[13]}get addState(){return this.$$.ctx[14]}get updateCurrentState(){return this.$$.ctx[15]}get prevHistory(){return this.$$.ctx[1]}get nextHistory(){return this.$$.ctx[2]}get clear(){return this.$$.ctx[16]}}function Gh(r){let e;return{c(){e=st(r[0])},l(t){e=at(t,r[0])},m(t,n){ke(t,e,n)},p(t,n){n&1&&jt(e,t[0])},d(t){t&&X(e)}}}function Vh(r){let e,t,n;return{c(){e=ae("a"),t=st(r[0]),this.h()},l(i){e=oe(i,"A",{href:!0,target:!0,class:!0});var s=he(e);t=at(s,r[0]),s.forEach(X),this.h()},h(){P(e,"href",n=r[2]+"file/download/name/"+encodeURIComponent(r[0])),P(e,"target","_blank"),P(e,"class","svelte-1ijmx03")},m(i,s){ke(i,e,s),$(e,t)},p(i,s){s&1&&jt(t,i[0]),s&5&&n!==(n=i[2]+"file/download/name/"+encodeURIComponent(i[0]))&&P(e,"href",n)},d(i){i&&X(e)}}}function Kh(r){let e,t,n,i,s;function a(c,h){return c[1]&&c[2]?Vh:Gh}let o=a(r),u=o(r);return{c(){e=ae("div"),t=ae("div"),u.c(),n=xe(),i=ae("div"),s=st(r[3]),this.h()},l(c){e=oe(c,"DIV",{class:!0});var h=he(e);t=oe(h,"DIV",{class:!0});var g=he(t);u.l(g),g.forEach(X),n=Ce(h),i=oe(h,"DIV",{});var m=he(i);s=at(m,r[3]),m.forEach(X),h.forEach(X),this.h()},h(){P(t,"class","title svelte-1ijmx03"),P(e,"class","search-result svelte-1ijmx03")},m(c,h){ke(c,e,h),$(e,t),u.m(t,null),$(e,n),$(e,i),$(i,s)},p(c,[h]){o===(o=a(c))&&u?u.p(c,h):(u.d(1),u=o(c),u&&(u.c(),u.m(t,null))),h&8&&jt(s,c[3])},i:We,o:We,d(c){c&&X(e),u.d()}}}function qh(r,e,t){let{title:n}=e,{enableDocumentDb:i=!1}=e,{documentDbUrl:s=""}=e,{source:a=""}=e;return r.$$set=o=>{"title"in o&&t(0,n=o.title),"enableDocumentDb"in o&&t(1,i=o.enableDocumentDb),"documentDbUrl"in o&&t(2,s=o.documentDbUrl),"source"in o&&t(3,a=o.source)},[n,i,s,a]}class Xh extends bt{constructor(e){super(),_t(this,e,qh,Kh,lt,{title:0,enableDocumentDb:1,documentDbUrl:2,source:3})}}function Co(r,e,t){const n=r.slice();return n[3]=e[t],n}function Io(r){let e,t;return e=new Xh({props:{title:r[3],enableDocumentDb:r[0],documentDbUrl:r[1],source:r[2][r[3]]}}),{c(){tt(e.$$.fragment)},l(n){rt(e.$$.fragment,n)},m(n,i){nt(e,n,i),t=!0},p(n,i){const s={};i&4&&(s.title=n[3]),i&1&&(s.enableDocumentDb=n[0]),i&2&&(s.documentDbUrl=n[1]),i&4&&(s.source=n[2][n[3]]),e.$set(s)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Ie(e.$$.fragment,n),t=!1},d(n){it(e,n)}}}function Zh(r){let e,t,n,i,s=Rt(Object.keys(r[2])),a=[];for(let c=0;cIe(a[c],1,1,()=>{a[c]=null});let u=Yh;return{c(){e=ae("div");for(let c=0;c{"enableDocumentDb"in a&&t(0,n=a.enableDocumentDb),"documentDbUrl"in a&&t(1,i=a.documentDbUrl),"transactionMaps"in a&&t(2,s=a.transactionMaps)},[n,i,s]}class Qh extends bt{constructor(e){super(),_t(this,e,Jh,Zh,lt,{enableDocumentDb:0,documentDbUrl:1,transactionMaps:2})}}var $h=Object.defineProperty,ed=Object.defineProperties,td=Object.getOwnPropertyDescriptors,Ro=Object.getOwnPropertySymbols,rd=Object.prototype.hasOwnProperty,nd=Object.prototype.propertyIsEnumerable,Js=(r,e,t)=>e in r?$h(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ke=(r,e)=>{for(var t in e||(e={}))rd.call(e,t)&&Js(r,t,e[t]);if(Ro)for(var t of Ro(e))nd.call(e,t)&&Js(r,t,e[t]);return r},Hn=(r,e)=>ed(r,td(e)),de=(r,e,t)=>(Js(r,typeof e!="symbol"?e+"":e,t),t),ci=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(c){i(c)}},a=u=>{try{o(t.throw(u))}catch(c){i(c)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});class ki{constructor(e){de(this,"rootKey"),this.rootKey=e}}const id=Object.seal({});class ge extends ki{constructor(e){super(e),de(this,"root"),this.root=new Array}prepForXml(e){var t;e.stack.push(this);const n=this.root.map(i=>i instanceof ki?i.prepForXml(e):i).filter(i=>i!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((t=n[0])!=null&&t._attr)?n[0]:n:id}}addChildElement(e){return this.root.push(e),this}}class Di extends ge{prepForXml(e){const t=super.prepForXml(e);if(t&&(typeof t[this.rootKey]!="object"||Object.keys(t[this.rootKey]).length))return t}}class Le extends ki{constructor(e){super("_attr"),de(this,"xmlKeys"),this.root=e}prepForXml(e){const t={};return Object.keys(this.root).forEach(n=>{const i=this.root[n];if(i!==void 0){const s=this.xmlKeys&&this.xmlKeys[n]||n;t[s]=i}}),{_attr:t}}}class Wn extends ki{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:i,value:s})=>Hn(Ke({},n),{[i]:s}),{})}}}class vt extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var Sr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hl(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var dl={},la={exports:{}},sn=typeof Reflect=="object"?Reflect:null,Do=sn&&typeof sn.apply=="function"?sn.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},vi;sn&&typeof sn.ownKeys=="function"?vi=sn.ownKeys:Object.getOwnPropertySymbols?vi=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:vi=function(e){return Object.getOwnPropertyNames(e)};function sd(r){console&&console.warn&&console.warn(r)}var pl=Number.isNaN||function(e){return e!==e};function Ze(){Ze.init.call(this)}la.exports=Ze;la.exports.once=ld;Ze.EventEmitter=Ze;Ze.prototype._events=void 0;Ze.prototype._eventsCount=0;Ze.prototype._maxListeners=void 0;var No=10;function Ni(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(Ze,"defaultMaxListeners",{enumerable:!0,get:function(){return No},set:function(r){if(typeof r!="number"||r<0||pl(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");No=r}});Ze.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Ze.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||pl(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function ml(r){return r._maxListeners===void 0?Ze.defaultMaxListeners:r._maxListeners}Ze.prototype.getMaxListeners=function(){return ml(this)};Ze.prototype.emit=function(e){for(var t=[],n=1;n0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=s[e];if(u===void 0)return!1;if(typeof u=="function")Do(u,this,t);else for(var c=u.length,h=_l(u,c),n=0;n0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=e,o.count=a.length,sd(o)}return r}Ze.prototype.addListener=function(e,t){return gl(this,e,t,!1)};Ze.prototype.on=Ze.prototype.addListener;Ze.prototype.prependListener=function(e,t){return gl(this,e,t,!0)};function ad(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function wl(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=ad.bind(n);return i.listener=t,n.wrapFn=i,i}Ze.prototype.once=function(e,t){return Ni(t),this.on(e,wl(this,e,t)),this};Ze.prototype.prependOnceListener=function(e,t){return Ni(t),this.prependListener(e,wl(this,e,t)),this};Ze.prototype.removeListener=function(e,t){var n,i,s,a,o;if(Ni(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():od(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||t)}return this};Ze.prototype.off=Ze.prototype.removeListener;Ze.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i=0;i--)this.removeListener(e,t[i]);return this};function yl(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?ud(i):_l(i,i.length)}Ze.prototype.listeners=function(e){return yl(this,e,!0)};Ze.prototype.rawListeners=function(e){return yl(this,e,!1)};Ze.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):bl.call(r,e)};Ze.prototype.listenerCount=bl;function bl(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Ze.prototype.eventNames=function(){return this._eventsCount>0?vi(this._events):[]};function _l(r,e){for(var t=new Array(e),n=0;n1)for(var t=1;t0)throw new Error("Invalid string. Length must be a multiple of 4");var w=p.indexOf("=");w===-1&&(w=y);var _=w===y?0:4-w%4;return[w,_]}function o(p){var y=a(p),w=y[0],_=y[1];return(w+_)*3/4-_}function u(p,y,w){return(y+w)*3/4-w}function c(p){var y,w=a(p),_=w[0],d=w[1],b=new t(u(p,_,d)),T=0,R=d>0?_-4:_,F;for(F=0;F>16&255,b[T++]=y>>8&255,b[T++]=y&255;return d===2&&(y=e[p.charCodeAt(F)]<<2|e[p.charCodeAt(F+1)]>>4,b[T++]=y&255),d===1&&(y=e[p.charCodeAt(F)]<<10|e[p.charCodeAt(F+1)]<<4|e[p.charCodeAt(F+2)]>>2,b[T++]=y>>8&255,b[T++]=y&255),b}function h(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function g(p,y,w){for(var _,d=[],b=y;bR?R:T+b));return _===1?(y=p[w-1],d.push(r[y>>2]+r[y<<4&63]+"==")):_===2&&(y=(p[w-2]<<8)+p[w-1],d.push(r[y>>10]+r[y>>4&63]+r[y<<2&63]+"=")),d.join("")}return Ln}var fi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var Bo;function gd(){return Bo||(Bo=1,fi.read=function(r,e,t,n,i){var s,a,o=i*8-n-1,u=(1<>1,h=-7,g=t?i-1:0,m=t?-1:1,p=r[e+g];for(g+=m,s=p&(1<<-h)-1,p>>=-h,h+=o;h>0;s=s*256+r[e+g],g+=m,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=n;h>0;a=a*256+r[e+g],g+=m,h-=8);if(s===0)s=1-c;else{if(s===u)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-c}return(p?-1:1)*a*Math.pow(2,s-n)},fi.write=function(r,e,t,n,i,s){var a,o,u,c=s*8-i-1,h=(1<>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,y=n?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+g>=1?e+=m/u:e+=m*Math.pow(2,1-g),e*u>=2&&(a++,u/=2),a+g>=h?(o=0,a=h):a+g>=1?(o=(e*u-1)*Math.pow(2,i),a=a+g):(o=e*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;r[t+p]=o&255,p+=y,o/=256,i-=8);for(a=a<0;r[t+p]=a&255,p+=y,a/=256,c-=8);r[t+p-y]|=w*128}),fi}/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */var Po;function Oi(){return Po||(Po=1,function(r){var e=md(),t=gd(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=o,r.SlowBuffer=b,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{var k=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(k,l),k.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(k){if(k>i)throw new RangeError('The value "'+k+'" is invalid for option "size"');var l=new Uint8Array(k);return Object.setPrototypeOf(l,o.prototype),l}function o(k,l,f){if(typeof k=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(k)}return u(k,l,f)}o.poolSize=8192;function u(k,l,f){if(typeof k=="string")return m(k,l);if(ArrayBuffer.isView(k))return y(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(te(k,ArrayBuffer)||k&&te(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(te(k,SharedArrayBuffer)||k&&te(k.buffer,SharedArrayBuffer)))return w(k,l,f);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=k.valueOf&&k.valueOf();if(E!=null&&E!==k)return o.from(E,l,f);var B=_(k);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return o.from(k[Symbol.toPrimitive]("string"),l,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}o.from=function(k,l,f){return u(k,l,f)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function c(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function h(k,l,f){return c(k),k<=0?a(k):l!==void 0?typeof f=="string"?a(k).fill(l,f):a(k).fill(l):a(k)}o.alloc=function(k,l,f){return h(k,l,f)};function g(k){return c(k),a(k<0?0:d(k)|0)}o.allocUnsafe=function(k){return g(k)},o.allocUnsafeSlow=function(k){return g(k)};function m(k,l){if((typeof l!="string"||l==="")&&(l="utf8"),!o.isEncoding(l))throw new TypeError("Unknown encoding: "+l);var f=T(k,l)|0,E=a(f),B=E.write(k,l);return B!==f&&(E=E.slice(0,B)),E}function p(k){for(var l=k.length<0?0:d(k.length)|0,f=a(l),E=0;E=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),o.alloc(+k)}o.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==o.prototype},o.compare=function(l,f){if(te(l,Uint8Array)&&(l=o.from(l,l.offset,l.byteLength)),te(f,Uint8Array)&&(f=o.from(f,f.offset,f.byteLength)),!o.isBuffer(l)||!o.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===f)return 0;for(var E=l.length,B=f.length,V=0,z=Math.min(E,B);VB.length?o.from(z).copy(B,V):Uint8Array.prototype.set.call(B,z,V);else if(o.isBuffer(z))z.copy(B,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=z.length}return B};function T(k,l){if(o.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||te(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);var f=k.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&f===0)return 0;for(var B=!1;;)switch(l){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return S(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return D(k).length;default:if(B)return E?-1:S(k).length;l=(""+l).toLowerCase(),B=!0}}o.byteLength=T;function R(k,l,f){var E=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,l>>>=0,f<=l))return"";for(k||(k="utf8");;)switch(k){case"hex":return J(this,l,f);case"utf8":case"utf-8":return x(this,l,f);case"ascii":return Z(this,l,f);case"latin1":case"binary":return be(this,l,f);case"base64":return Y(this,l,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ae(this,l,f);default:if(E)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function F(k,l,f){var E=k[l];k[l]=k[f],k[f]=E}o.prototype.swap16=function(){var l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var f=0;ff&&(l+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(l,f,E,B,V){if(te(l,Uint8Array)&&(l=o.from(l,l.offset,l.byteLength)),!o.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(f===void 0&&(f=0),E===void 0&&(E=l?l.length:0),B===void 0&&(B=0),V===void 0&&(V=this.length),f<0||E>l.length||B<0||V>this.length)throw new RangeError("out of range index");if(B>=V&&f>=E)return 0;if(B>=V)return-1;if(f>=E)return 1;if(f>>>=0,E>>>=0,B>>>=0,V>>>=0,this===l)return 0;for(var z=V-B,ue=E-f,me=Math.min(z,ue),ce=this.slice(B,V),Te=l.slice(f,E),De=0;De2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,v(f)&&(f=B?0:k.length-1),f<0&&(f=k.length+f),f>=k.length){if(B)return-1;f=k.length-1}else if(f<0)if(B)f=0;else return-1;if(typeof l=="string"&&(l=o.from(l,E)),o.isBuffer(l))return l.length===0?-1:L(k,l,f,E,B);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?B?Uint8Array.prototype.indexOf.call(k,l,f):Uint8Array.prototype.lastIndexOf.call(k,l,f):L(k,[l],f,E,B);throw new TypeError("val must be string, number or Buffer")}function L(k,l,f,E,B){var V=1,z=k.length,ue=l.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(k.length<2||l.length<2)return-1;V=2,z/=2,ue/=2,f/=2}function me(Ee,Ne){return V===1?Ee[Ne]:Ee.readUInt16BE(Ne*V)}var ce;if(B){var Te=-1;for(ce=f;cez&&(f=z-ue),ce=f;ce>=0;ce--){for(var De=!0,ee=0;eeB&&(E=B)):E=B;var V=l.length;E>V/2&&(E=V/2);for(var z=0;z>>0,isFinite(E)?(E=E>>>0,B===void 0&&(B="utf8")):(B=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var V=this.length-f;if((E===void 0||E>V)&&(E=V),l.length>0&&(E<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");for(var z=!1;;)switch(B){case"hex":return H(this,l,f,E);case"utf8":case"utf-8":return C(this,l,f,E);case"ascii":case"latin1":case"binary":return se(this,l,f,E);case"base64":return ne(this,l,f,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,l,f,E);default:if(z)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),z=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(k,l,f){return l===0&&f===k.length?e.fromByteArray(k):e.fromByteArray(k.slice(l,f))}function x(k,l,f){f=Math.min(k.length,f);for(var E=[],B=l;B239?4:V>223?3:V>191?2:1;if(B+ue<=f){var me,ce,Te,De;switch(ue){case 1:V<128&&(z=V);break;case 2:me=k[B+1],(me&192)===128&&(De=(V&31)<<6|me&63,De>127&&(z=De));break;case 3:me=k[B+1],ce=k[B+2],(me&192)===128&&(ce&192)===128&&(De=(V&15)<<12|(me&63)<<6|ce&63,De>2047&&(De<55296||De>57343)&&(z=De));break;case 4:me=k[B+1],ce=k[B+2],Te=k[B+3],(me&192)===128&&(ce&192)===128&&(Te&192)===128&&(De=(V&15)<<18|(me&63)<<12|(ce&63)<<6|Te&63,De>65535&&De<1114112&&(z=De))}}z===null?(z=65533,ue=1):z>65535&&(z-=65536,E.push(z>>>10&1023|55296),z=56320|z&1023),E.push(z),B+=ue}return pe(E)}var W=4096;function pe(k){var l=k.length;if(l<=W)return String.fromCharCode.apply(String,k);for(var f="",E=0;EE)&&(f=E);for(var B="",V=l;VE&&(l=E),f<0?(f+=E,f<0&&(f=0)):f>E&&(f=E),ff)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(l,f,E){l=l>>>0,f=f>>>0,E||G(l,f,this.length);for(var B=this[l],V=1,z=0;++z>>0,f=f>>>0,E||G(l,f,this.length);for(var B=this[l+--f],V=1;f>0&&(V*=256);)B+=this[l+--f]*V;return B},o.prototype.readUint8=o.prototype.readUInt8=function(l,f){return l=l>>>0,f||G(l,1,this.length),this[l]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(l,f){return l=l>>>0,f||G(l,2,this.length),this[l]|this[l+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(l,f){return l=l>>>0,f||G(l,2,this.length),this[l]<<8|this[l+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(l,f){return l=l>>>0,f||G(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(l,f){return l=l>>>0,f||G(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},o.prototype.readIntLE=function(l,f,E){l=l>>>0,f=f>>>0,E||G(l,f,this.length);for(var B=this[l],V=1,z=0;++z=V&&(B-=Math.pow(2,8*f)),B},o.prototype.readIntBE=function(l,f,E){l=l>>>0,f=f>>>0,E||G(l,f,this.length);for(var B=f,V=1,z=this[l+--B];B>0&&(V*=256);)z+=this[l+--B]*V;return V*=128,z>=V&&(z-=Math.pow(2,8*f)),z},o.prototype.readInt8=function(l,f){return l=l>>>0,f||G(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},o.prototype.readInt16LE=function(l,f){l=l>>>0,f||G(l,2,this.length);var E=this[l]|this[l+1]<<8;return E&32768?E|4294901760:E},o.prototype.readInt16BE=function(l,f){l=l>>>0,f||G(l,2,this.length);var E=this[l+1]|this[l]<<8;return E&32768?E|4294901760:E},o.prototype.readInt32LE=function(l,f){return l=l>>>0,f||G(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},o.prototype.readInt32BE=function(l,f){return l=l>>>0,f||G(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},o.prototype.readFloatLE=function(l,f){return l=l>>>0,f||G(l,4,this.length),t.read(this,l,!0,23,4)},o.prototype.readFloatBE=function(l,f){return l=l>>>0,f||G(l,4,this.length),t.read(this,l,!1,23,4)},o.prototype.readDoubleLE=function(l,f){return l=l>>>0,f||G(l,8,this.length),t.read(this,l,!0,52,8)},o.prototype.readDoubleBE=function(l,f){return l=l>>>0,f||G(l,8,this.length),t.read(this,l,!1,52,8)};function I(k,l,f,E,B,V){if(!o.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>B||lk.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(l,f,E,B){if(l=+l,f=f>>>0,E=E>>>0,!B){var V=Math.pow(2,8*E)-1;I(this,l,f,E,V,0)}var z=1,ue=0;for(this[f]=l&255;++ue>>0,E=E>>>0,!B){var V=Math.pow(2,8*E)-1;I(this,l,f,E,V,0)}var z=E-1,ue=1;for(this[f+z]=l&255;--z>=0&&(ue*=256);)this[f+z]=l/ue&255;return f+E},o.prototype.writeUint8=o.prototype.writeUInt8=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,1,255,0),this[f]=l&255,f+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,2,65535,0),this[f]=l&255,this[f+1]=l>>>8,f+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,2,65535,0),this[f]=l>>>8,this[f+1]=l&255,f+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,4,4294967295,0),this[f+3]=l>>>24,this[f+2]=l>>>16,this[f+1]=l>>>8,this[f]=l&255,f+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,4,4294967295,0),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4},o.prototype.writeIntLE=function(l,f,E,B){if(l=+l,f=f>>>0,!B){var V=Math.pow(2,8*E-1);I(this,l,f,E,V-1,-V)}var z=0,ue=1,me=0;for(this[f]=l&255;++z>0)-me&255;return f+E},o.prototype.writeIntBE=function(l,f,E,B){if(l=+l,f=f>>>0,!B){var V=Math.pow(2,8*E-1);I(this,l,f,E,V-1,-V)}var z=E-1,ue=1,me=0;for(this[f+z]=l&255;--z>=0&&(ue*=256);)l<0&&me===0&&this[f+z+1]!==0&&(me=1),this[f+z]=(l/ue>>0)-me&255;return f+E},o.prototype.writeInt8=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,1,127,-128),l<0&&(l=255+l+1),this[f]=l&255,f+1},o.prototype.writeInt16LE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,2,32767,-32768),this[f]=l&255,this[f+1]=l>>>8,f+2},o.prototype.writeInt16BE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,2,32767,-32768),this[f]=l>>>8,this[f+1]=l&255,f+2},o.prototype.writeInt32LE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,4,2147483647,-2147483648),this[f]=l&255,this[f+1]=l>>>8,this[f+2]=l>>>16,this[f+3]=l>>>24,f+4},o.prototype.writeInt32BE=function(l,f,E){return l=+l,f=f>>>0,E||I(this,l,f,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4};function q(k,l,f,E,B,V){if(f+E>k.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function Q(k,l,f,E,B){return l=+l,f=f>>>0,B||q(k,l,f,4),t.write(k,l,f,E,23,4),f+4}o.prototype.writeFloatLE=function(l,f,E){return Q(this,l,f,!0,E)},o.prototype.writeFloatBE=function(l,f,E){return Q(this,l,f,!1,E)};function ie(k,l,f,E,B){return l=+l,f=f>>>0,B||q(k,l,f,8),t.write(k,l,f,E,52,8),f+8}o.prototype.writeDoubleLE=function(l,f,E){return ie(this,l,f,!0,E)},o.prototype.writeDoubleBE=function(l,f,E){return ie(this,l,f,!1,E)},o.prototype.copy=function(l,f,E,B){if(!o.isBuffer(l))throw new TypeError("argument should be a Buffer");if(E||(E=0),!B&&B!==0&&(B=this.length),f>=l.length&&(f=l.length),f||(f=0),B>0&&B=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),l.length-f>>0,E=E===void 0?this.length:E>>>0,l||(l=0);var z;if(typeof l=="number")for(z=f;z55295&&f<57344){if(!B){if(f>56319){(l-=3)>-1&&V.push(239,191,189);continue}else if(z+1===E){(l-=3)>-1&&V.push(239,191,189);continue}B=f;continue}if(f<56320){(l-=3)>-1&&V.push(239,191,189),B=f;continue}f=(B-55296<<10|f-56320)+65536}else B&&(l-=3)>-1&&V.push(239,191,189);if(B=null,f<128){if((l-=1)<0)break;V.push(f)}else if(f<2048){if((l-=2)<0)break;V.push(f>>6|192,f&63|128)}else if(f<65536){if((l-=3)<0)break;V.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((l-=4)<0)break;V.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return V}function j(k){for(var l=[],f=0;f>8,B=f%256,V.push(B),V.push(E);return V}function D(k){return e.toByteArray(A(k))}function O(k,l,f,E){for(var B=0;B=l.length||B>=k.length);++B)l[B+f]=k[B];return B}function te(k,l){return k instanceof l||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===l.name}function v(k){return k!==k}var re=function(){for(var k="0123456789abcdef",l=new Array(256),f=0;f<16;++f)for(var E=f*16,B=0;B<16;++B)l[E+B]=k[f]+k[B];return l}()}(is)),is}var ss={},as={},os,Lo;function xl(){return Lo||(Lo=1,os=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),os}var us,Mo;function fa(){if(Mo)return us;Mo=1;var r=xl();return us=function(){return r()&&!!Symbol.toStringTag},us}var ls,Uo;function wd(){if(Uo)return ls;Uo=1;var r=typeof Symbol<"u"&&Symbol,e=xl();return ls=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},ls}var cs,zo;function yd(){if(zo)return cs;zo=1;var r={foo:{}},e=Object;return cs=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof e)},cs}var fs,jo;function bd(){if(jo)return fs;jo=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(u,c){for(var h=[],g=0;g"u"||!h?r:h(Uint8Array),p={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":u&&h?h([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":t,"%GeneratorFunction%":g,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&h?h(h([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!u||!h?r:h(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!u||!h?r:h(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&h?h(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":e,"%ThrowTypeError%":o,"%TypedArray%":m,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(h)try{null.error}catch(N){var y=h(h(N));p["%Error.prototype%"]=y}var w=function N(Y){var x;if(Y==="%AsyncFunction%")x=i("async function () {}");else if(Y==="%GeneratorFunction%")x=i("function* () {}");else if(Y==="%AsyncGeneratorFunction%")x=i("async function* () {}");else if(Y==="%AsyncGenerator%"){var W=N("%AsyncGeneratorFunction%");W&&(x=W.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var pe=N("%AsyncGenerator%");pe&&h&&(x=h(pe.prototype))}return p[Y]=x,x},_={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},d=ha(),b=_d(),T=d.call(Function.call,Array.prototype.concat),R=d.call(Function.apply,Array.prototype.splice),F=d.call(Function.call,String.prototype.replace),K=d.call(Function.call,String.prototype.slice),L=d.call(Function.call,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,se=function(Y){var x=K(Y,0,1),W=K(Y,-1);if(x==="%"&&W!=="%")throw new e("invalid intrinsic syntax, expected closing `%`");if(W==="%"&&x!=="%")throw new e("invalid intrinsic syntax, expected opening `%`");var pe=[];return F(Y,H,function(Z,be,J,Ae){pe[pe.length]=J?F(Ae,C,"$1"):be||Z}),pe},ne=function(Y,x){var W=Y,pe;if(b(_,W)&&(pe=_[W],W="%"+pe[0]+"%"),b(p,W)){var Z=p[W];if(Z===g&&(Z=w(W)),typeof Z>"u"&&!x)throw new n("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:pe,name:W,value:Z}}throw new e("intrinsic "+Y+" does not exist!")};return ps=function(Y,x){if(typeof Y!="string"||Y.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof x!="boolean")throw new n('"allowMissing" argument must be a boolean');if(L(/^%?[^%]*%?$/,Y)===null)throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W=se(Y),pe=W.length>0?W[0]:"",Z=ne("%"+pe+"%",x),be=Z.name,J=Z.value,Ae=!1,G=Z.alias;G&&(pe=G[0],R(W,T([0,1],G)));for(var I=1,q=!0;I=W.length){var A=s(J,Q);q=!!A,q&&"get"in A&&!("originalValue"in A.get)?J=A.get:J=J[Q]}else q=b(J,Q),J=J[Q];q&&!Ae&&(p[be]=J)}}return J},ps}var ms={exports:{}},gs,Vo;function Cl(){if(Vo)return gs;Vo=1;var r=wn(),e=r("%Object.defineProperty%",!0),t=function(){if(e)try{return e({},"a",{value:1}),!0}catch{return!1}return!1};return t.hasArrayLengthDefineBug=function(){if(!t())return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},gs=t,gs}var ws,Ko;function da(){if(Ko)return ws;Ko=1;var r=wn(),e=r("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return ws=e,ws}var ys,qo;function vd(){if(qo)return ys;qo=1;var r=Cl()(),e=wn(),t=r&&e("%Object.defineProperty%",!0);if(t)try{t({},"a",{value:1})}catch{t=!1}var n=e("%SyntaxError%"),i=e("%TypeError%"),s=da();return ys=function(o,u,c){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var h=arguments.length>3?arguments[3]:null,g=arguments.length>4?arguments[4]:null,m=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,y=!!s&&s(o,u);if(t)t(o,u,{configurable:m===null&&y?y.configurable:!m,enumerable:h===null&&y?y.enumerable:!h,value:c,writable:g===null&&y?y.writable:!g});else if(p||!h&&!g&&!m)o[u]=c;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ys}var bs,Xo;function Ed(){if(Xo)return bs;Xo=1;var r=wn(),e=vd(),t=Cl()(),n=da(),i=r("%TypeError%"),s=r("%Math.floor%");return bs=function(o,u){if(typeof o!="function")throw new i("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||s(u)!==u)throw new i("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],h=!0,g=!0;if("length"in o&&n){var m=n(o,"length");m&&!m.configurable&&(h=!1),m&&!m.writable&&(g=!1)}return(h||g||!c)&&(t?e(o,"length",u,!0,!0):e(o,"length",u)),o},bs}var Zo;function Il(){return Zo||(Zo=1,function(r){var e=ha(),t=wn(),n=Ed(),i=t("%TypeError%"),s=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,s),u=t("%Object.defineProperty%",!0),c=t("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}r.exports=function(m){if(typeof m!="function")throw new i("a function is required");var p=o(e,a,arguments);return n(p,1+c(0,m.length-(arguments.length-1)),!0)};var h=function(){return o(e,s,arguments)};u?u(r.exports,"apply",{value:h}):r.exports.apply=h}(ms)),ms.exports}var _s,Yo;function Rl(){if(Yo)return _s;Yo=1;var r=wn(),e=Il(),t=e(r("String.prototype.indexOf"));return _s=function(i,s){var a=r(i,!!s);return typeof a=="function"&&t(i,".prototype.")>-1?e(a):a},_s}var vs,Jo;function Sd(){if(Jo)return vs;Jo=1;var r=fa()(),e=Rl(),t=e("Object.prototype.toString"),n=function(o){return r&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:t(o)==="[object Arguments]"},i=function(o){return n(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&t(o)!=="[object Array]"&&t(o.callee)==="[object Function]"},s=function(){return n(arguments)}();return n.isLegacyArguments=i,vs=s?n:i,vs}var Es,Qo;function Td(){if(Qo)return Es;Qo=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=fa()(),i=Object.getPrototypeOf,s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},a;return Es=function(u){if(typeof u!="function")return!1;if(t.test(e.call(u)))return!0;if(!n){var c=r.call(u);return c==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var h=s();a=h?i(h):!1}return i(u)===a},Es}var Ss,$o;function Ad(){if($o)return Ss;$o=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(b){b!==n&&(e=null)}else e=null;var i=/^\s*class\b/,s=function(T){try{var R=r.call(T);return i.test(R)}catch{return!1}},a=function(T){try{return s(T)?!1:(r.call(T),!0)}catch{return!1}},o=Object.prototype.toString,u="[object Object]",c="[object Function]",h="[object GeneratorFunction]",g="[object HTMLAllCollection]",m="[object HTML document.all class]",p="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,w=!(0 in[,]),_=function(){return!1};if(typeof document=="object"){var d=document.all;o.call(d)===o.call(document.all)&&(_=function(T){if((w||!T)&&(typeof T>"u"||typeof T=="object"))try{var R=o.call(T);return(R===g||R===m||R===p||R===u)&&T("")==null}catch{}return!1})}return Ss=e?function(T){if(_(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;try{e(T,null,t)}catch(R){if(R!==n)return!1}return!s(T)&&a(T)}:function(T){if(_(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;if(y)return a(T);if(s(T))return!1;var R=o.call(T);return R!==c&&R!==h&&!/^\[object HTML/.test(R)?!1:a(T)},Ss}var Ts,eu;function kd(){if(eu)return Ts;eu=1;var r=Ad(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(u,c,h){for(var g=0,m=u.length;g=3&&(g=h),e.call(u)==="[object Array]"?n(u,c,g):typeof u=="string"?i(u,c,g):s(u,c,g)};return Ts=a,Ts}var As,tu;function xd(){if(tu)return As;tu=1;var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],e=typeof globalThis>"u"?Sr:globalThis;return As=function(){for(var n=[],i=0;i"u"?Sr:globalThis,u=e(),c=n("String.prototype.slice"),h=Object.getPrototypeOf,g=n("Array.prototype.indexOf",!0)||function(_,d){for(var b=0;b<_.length;b+=1)if(_[b]===d)return b;return-1},m={__proto__:null};a&&i&&h?r(u,function(w){var _=new o[w];if(Symbol.toStringTag in _){var d=h(_),b=i(d,Symbol.toStringTag);if(!b){var T=h(d);b=i(T,Symbol.toStringTag)}m["$"+w]=t(b.get)}}):r(u,function(w){var _=new o[w],d=_.slice||_.set;d&&(m["$"+w]=t(d))});var p=function(_){var d=!1;return r(m,function(b,T){if(!d)try{"$"+b(_)===T&&(d=c(T,1))}catch{}}),d},y=function(_){var d=!1;return r(m,function(b,T){if(!d)try{b(_),d=c(T,1)}catch{}}),d};return ks=function(_){if(!_||typeof _!="object")return!1;if(!a){var d=c(s(_),8,-1);return g(u,d)>-1?d:d!=="Object"?!1:y(_)}return i?p(_):null},ks}var xs,nu;function Cd(){if(nu)return xs;nu=1;var r=Dl();return xs=function(t){return!!r(t)},xs}var iu;function Id(){return iu||(iu=1,function(r){var e=Sd(),t=Td(),n=Dl(),i=Cd();function s(E){return E.call.bind(E)}var a=typeof BigInt<"u",o=typeof Symbol<"u",u=s(Object.prototype.toString),c=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),g=s(Boolean.prototype.valueOf);if(a)var m=s(BigInt.prototype.valueOf);if(o)var p=s(Symbol.prototype.valueOf);function y(E,B){if(typeof E!="object")return!1;try{return B(E),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function w(E){return typeof Promise<"u"&&E instanceof Promise||E!==null&&typeof E=="object"&&typeof E.then=="function"&&typeof E.catch=="function"}r.isPromise=w;function _(E){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(E):i(E)||q(E)}r.isArrayBufferView=_;function d(E){return n(E)==="Uint8Array"}r.isUint8Array=d;function b(E){return n(E)==="Uint8ClampedArray"}r.isUint8ClampedArray=b;function T(E){return n(E)==="Uint16Array"}r.isUint16Array=T;function R(E){return n(E)==="Uint32Array"}r.isUint32Array=R;function F(E){return n(E)==="Int8Array"}r.isInt8Array=F;function K(E){return n(E)==="Int16Array"}r.isInt16Array=K;function L(E){return n(E)==="Int32Array"}r.isInt32Array=L;function H(E){return n(E)==="Float32Array"}r.isFloat32Array=H;function C(E){return n(E)==="Float64Array"}r.isFloat64Array=C;function se(E){return n(E)==="BigInt64Array"}r.isBigInt64Array=se;function ne(E){return n(E)==="BigUint64Array"}r.isBigUint64Array=ne;function N(E){return u(E)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function Y(E){return typeof Map>"u"?!1:N.working?N(E):E instanceof Map}r.isMap=Y;function x(E){return u(E)==="[object Set]"}x.working=typeof Set<"u"&&x(new Set);function W(E){return typeof Set>"u"?!1:x.working?x(E):E instanceof Set}r.isSet=W;function pe(E){return u(E)==="[object WeakMap]"}pe.working=typeof WeakMap<"u"&&pe(new WeakMap);function Z(E){return typeof WeakMap>"u"?!1:pe.working?pe(E):E instanceof WeakMap}r.isWeakMap=Z;function be(E){return u(E)==="[object WeakSet]"}be.working=typeof WeakSet<"u"&&be(new WeakSet);function J(E){return be(E)}r.isWeakSet=J;function Ae(E){return u(E)==="[object ArrayBuffer]"}Ae.working=typeof ArrayBuffer<"u"&&Ae(new ArrayBuffer);function G(E){return typeof ArrayBuffer>"u"?!1:Ae.working?Ae(E):E instanceof ArrayBuffer}r.isArrayBuffer=G;function I(E){return u(E)==="[object DataView]"}I.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&I(new DataView(new ArrayBuffer(1),0,1));function q(E){return typeof DataView>"u"?!1:I.working?I(E):E instanceof DataView}r.isDataView=q;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(E){return u(E)==="[object SharedArrayBuffer]"}function U(E){return typeof Q>"u"?!1:(typeof ie.working>"u"&&(ie.working=ie(new Q)),ie.working?ie(E):E instanceof Q)}r.isSharedArrayBuffer=U;function A(E){return u(E)==="[object AsyncFunction]"}r.isAsyncFunction=A;function S(E){return u(E)==="[object Map Iterator]"}r.isMapIterator=S;function j(E){return u(E)==="[object Set Iterator]"}r.isSetIterator=j;function M(E){return u(E)==="[object Generator]"}r.isGeneratorObject=M;function D(E){return u(E)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=D;function O(E){return y(E,c)}r.isNumberObject=O;function te(E){return y(E,h)}r.isStringObject=te;function v(E){return y(E,g)}r.isBooleanObject=v;function re(E){return a&&y(E,m)}r.isBigIntObject=re;function k(E){return o&&y(E,p)}r.isSymbolObject=k;function l(E){return O(E)||te(E)||v(E)||re(E)||k(E)}r.isBoxedPrimitive=l;function f(E){return typeof Uint8Array<"u"&&(G(E)||U(E))}r.isAnyArrayBuffer=f,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(E){Object.defineProperty(r,E,{enumerable:!1,value:function(){throw new Error(E+" is not supported in userland")}})})}(as)),as}var Cs,su;function Rd(){return su||(su=1,Cs=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),Cs}var au;function Nl(){return au||(au=1,function(r){var e=Object.getOwnPropertyDescriptors||function(q){for(var Q=Object.keys(q),ie={},U=0;U=U)return j;switch(j){case"%s":return String(ie[Q++]);case"%d":return Number(ie[Q++]);case"%j":try{return JSON.stringify(ie[Q++])}catch{return"[Circular]"}default:return j}}),S=ie[Q];Q"u")return function(){return r.deprecate(I,q).apply(this,arguments)};var Q=!1;function ie(){if(!Q){if(He.throwDeprecation)throw new Error(q);He.traceDeprecation?console.trace(q):console.error(q),Q=!0}return I.apply(this,arguments)}return ie};var n={},i=/^$/;if(He.env.NODE_DEBUG){var s=He.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}r.debuglog=function(I){if(I=I.toUpperCase(),!n[I])if(i.test(I)){var q=He.pid;n[I]=function(){var Q=r.format.apply(r,arguments);console.error("%s %d: %s",I,q,Q)}}else n[I]=function(){};return n[I]};function a(I,q){var Q={seen:[],stylize:u};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),d(q)?Q.showHidden=q:q&&r._extend(Q,q),L(Q.showHidden)&&(Q.showHidden=!1),L(Q.depth)&&(Q.depth=2),L(Q.colors)&&(Q.colors=!1),L(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=o),h(Q,I,Q.depth)}r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(I,q){var Q=a.styles[q];return Q?"\x1B["+a.colors[Q][0]+"m"+I+"\x1B["+a.colors[Q][1]+"m":I}function u(I,q){return I}function c(I){var q={};return I.forEach(function(Q,ie){q[Q]=!0}),q}function h(I,q,Q){if(I.customInspect&&q&&N(q.inspect)&&q.inspect!==r.inspect&&!(q.constructor&&q.constructor.prototype===q)){var ie=q.inspect(Q,I);return F(ie)||(ie=h(I,ie,Q)),ie}var U=g(I,q);if(U)return U;var A=Object.keys(q),S=c(A);if(I.showHidden&&(A=Object.getOwnPropertyNames(q)),ne(q)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return m(q);if(A.length===0){if(N(q)){var j=q.name?": "+q.name:"";return I.stylize("[Function"+j+"]","special")}if(H(q))return I.stylize(RegExp.prototype.toString.call(q),"regexp");if(se(q))return I.stylize(Date.prototype.toString.call(q),"date");if(ne(q))return m(q)}var M="",D=!1,O=["{","}"];if(_(q)&&(D=!0,O=["[","]"]),N(q)){var te=q.name?": "+q.name:"";M=" [Function"+te+"]"}if(H(q)&&(M=" "+RegExp.prototype.toString.call(q)),se(q)&&(M=" "+Date.prototype.toUTCString.call(q)),ne(q)&&(M=" "+m(q)),A.length===0&&(!D||q.length==0))return O[0]+M+O[1];if(Q<0)return H(q)?I.stylize(RegExp.prototype.toString.call(q),"regexp"):I.stylize("[Object]","special");I.seen.push(q);var v;return D?v=p(I,q,Q,S,A):v=A.map(function(re){return y(I,q,Q,S,re,D)}),I.seen.pop(),w(v,M,O)}function g(I,q){if(L(q))return I.stylize("undefined","undefined");if(F(q)){var Q="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return I.stylize(Q,"string")}if(R(q))return I.stylize(""+q,"number");if(d(q))return I.stylize(""+q,"boolean");if(b(q))return I.stylize("null","null")}function m(I){return"["+Error.prototype.toString.call(I)+"]"}function p(I,q,Q,ie,U){for(var A=[],S=0,j=q.length;S-1&&(A?j=j.split(`
+`).map(function(D){return" "+D}).join(`
+`).slice(2):j=`
+`+j.split(`
+`).map(function(D){return" "+D}).join(`
+`))):j=I.stylize("[Circular]","special")),L(S)){if(A&&U.match(/^\d+$/))return j;S=JSON.stringify(""+U),S.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(S=S.slice(1,-1),S=I.stylize(S,"name")):(S=S.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),S=I.stylize(S,"string"))}return S+": "+j}function w(I,q,Q){var ie=I.reduce(function(U,A){return A.indexOf(`
+`)>=0,U+A.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ie>60?Q[0]+(q===""?"":q+`
+ `)+" "+I.join(`,
+ `)+" "+Q[1]:Q[0]+q+" "+I.join(", ")+" "+Q[1]}r.types=Id();function _(I){return Array.isArray(I)}r.isArray=_;function d(I){return typeof I=="boolean"}r.isBoolean=d;function b(I){return I===null}r.isNull=b;function T(I){return I==null}r.isNullOrUndefined=T;function R(I){return typeof I=="number"}r.isNumber=R;function F(I){return typeof I=="string"}r.isString=F;function K(I){return typeof I=="symbol"}r.isSymbol=K;function L(I){return I===void 0}r.isUndefined=L;function H(I){return C(I)&&x(I)==="[object RegExp]"}r.isRegExp=H,r.types.isRegExp=H;function C(I){return typeof I=="object"&&I!==null}r.isObject=C;function se(I){return C(I)&&x(I)==="[object Date]"}r.isDate=se,r.types.isDate=se;function ne(I){return C(I)&&(x(I)==="[object Error]"||I instanceof Error)}r.isError=ne,r.types.isNativeError=ne;function N(I){return typeof I=="function"}r.isFunction=N;function Y(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||typeof I=="symbol"||typeof I>"u"}r.isPrimitive=Y,r.isBuffer=Rd();function x(I){return Object.prototype.toString.call(I)}function W(I){return I<10?"0"+I.toString(10):I.toString(10)}var pe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z(){var I=new Date,q=[W(I.getHours()),W(I.getMinutes()),W(I.getSeconds())].join(":");return[I.getDate(),pe[I.getMonth()],q].join(" ")}r.log=function(){console.log("%s - %s",Z(),r.format.apply(r,arguments))},r.inherits=Yr,r._extend=function(I,q){if(!q||!C(q))return I;for(var Q=Object.keys(q),ie=Q.length;ie--;)I[Q[ie]]=q[Q[ie]];return I};function be(I,q){return Object.prototype.hasOwnProperty.call(I,q)}var J=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(J&&q[J]){var Q=q[J];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,J,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var ie,U,A=new Promise(function(M,D){ie=M,U=D}),S=[],j=0;j0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(y){var w={data:y,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var w=this.head,_=""+w.data;w=w.next;)_+=y+w.data;return _}},{key:"concat",value:function(y){if(this.length===0)return o.alloc(0);for(var w=o.allocUnsafe(y>>>0),_=this.head,d=0;_;)g(_.data,w,d),d+=_.data.length,_=_.next;return w}},{key:"consume",value:function(y,w){var _;return yb.length?b.length:y;if(T===b.length?d+=b:d+=b.slice(0,y),y-=T,y===0){T===b.length?(++_,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=b.slice(T));break}++_}return this.length-=_,d}},{key:"_getBuffer",value:function(y){var w=o.allocUnsafe(y),_=this.head,d=1;for(_.data.copy(w),y-=_.data.length;_=_.next;){var b=_.data,T=y>b.length?b.length:y;if(b.copy(w,w.length-y,0,T),y-=T,y===0){T===b.length?(++d,_.next?this.head=_.next:this.head=this.tail=null):(this.head=_,_.data=b.slice(T));break}++d}return this.length-=d,w}},{key:h,value:function(y,w){return c(this,e({},w,{depth:0,customInspect:!1}))}}]),m}(),Is}var Rs,uu;function Ol(){if(uu)return Rs;uu=1;function r(a,o){var u=this,c=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return c||h?(o?o(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,He.nextTick(i,this,a)):He.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(g){!o&&g?u._writableState?u._writableState.errorEmitted?He.nextTick(t,u):(u._writableState.errorEmitted=!0,He.nextTick(e,u,g)):He.nextTick(e,u,g):o?(He.nextTick(t,u),o(g)):He.nextTick(t,u)}),this)}function e(a,o){i(a,o),t(a)}function t(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,o){a.emit("error",o)}function s(a,o){var u=a._readableState,c=a._writableState;u&&u.autoDestroy||c&&c.autoDestroy?a.destroy(o):a.emit("error",o)}return Rs={destroy:r,undestroy:n,errorOrDestroy:s},Rs}var Ds={},lu;function yn(){if(lu)return Ds;lu=1;function r(o,u){o.prototype=Object.create(u.prototype),o.prototype.constructor=o,o.__proto__=u}var e={};function t(o,u,c){c||(c=Error);function h(m,p,y){return typeof u=="string"?u:u(m,p,y)}var g=function(m){r(p,m);function p(y,w,_){return m.call(this,h(y,w,_))||this}return p}(c);g.prototype.name=c.name,g.prototype.code=o,e[o]=g}function n(o,u){if(Array.isArray(o)){var c=o.length;return o=o.map(function(h){return String(h)}),c>2?"one of ".concat(u," ").concat(o.slice(0,c-1).join(", "),", or ")+o[c-1]:c===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function i(o,u,c){return o.substr(!c||c<0?0:+c,u.length)===u}function s(o,u,c){return(c===void 0||c>o.length)&&(c=o.length),o.substring(c-u.length,c)===u}function a(o,u,c){return typeof c!="number"&&(c=0),c+u.length>o.length?!1:o.indexOf(u,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(o,u){return'The value "'+u+'" is invalid for option "'+o+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(o,u,c){var h;typeof u=="string"&&i(u,"not ")?(h="must not be",u=u.replace(/^not /,"")):h="must be";var g;if(s(o," argument"))g="The ".concat(o," ").concat(h," ").concat(n(u,"type"));else{var m=a(o,".")?"property":"argument";g='The "'.concat(o,'" ').concat(m," ").concat(h," ").concat(n(u,"type"))}return g+=". Received type ".concat(typeof c),g},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ds.codes=e,Ds}var Ns,cu;function Fl(){if(cu)return Ns;cu=1;var r=yn().codes.ERR_INVALID_OPT_VALUE;function e(n,i,s){return n.highWaterMark!=null?n.highWaterMark:i?n[s]:null}function t(n,i,s,a){var o=e(i,a,s);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var u=a?s:"highWaterMark";throw new r(u,o)}return Math.floor(o)}return n.objectMode?16:16*1024}return Ns={getHighWaterMark:t},Ns}var Os,fu;function Nd(){if(fu)return Os;fu=1,Os=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function s(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}return s}function e(t){try{if(!Sr.localStorage)return!1}catch{return!1}var n=Sr.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return Os}var Fs,hu;function Bl(){if(hu)return Fs;hu=1,Fs=H;function r(U){var A=this;this.next=null,this.entry=null,this.finish=function(){ie(A,U)}}var e;H.WritableState=K;var t={deprecate:Nd()},n=kl(),i=Oi().Buffer,s=Sr.Uint8Array||function(){};function a(U){return i.from(U)}function o(U){return i.isBuffer(U)||U instanceof s}var u=Ol(),c=Fl(),h=c.getHighWaterMark,g=yn().codes,m=g.ERR_INVALID_ARG_TYPE,p=g.ERR_METHOD_NOT_IMPLEMENTED,y=g.ERR_MULTIPLE_CALLBACK,w=g.ERR_STREAM_CANNOT_PIPE,_=g.ERR_STREAM_DESTROYED,d=g.ERR_STREAM_NULL_VALUES,b=g.ERR_STREAM_WRITE_AFTER_END,T=g.ERR_UNKNOWN_ENCODING,R=u.errorOrDestroy;Yr(H,n);function F(){}function K(U,A,S){e=e||cn(),U=U||{},typeof S!="boolean"&&(S=A instanceof e),this.objectMode=!!U.objectMode,S&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=h(this,U,"writableHighWaterMark",S),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=U.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(M){pe(A,M)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}K.prototype.getBuffer=function(){for(var A=this.bufferedRequest,S=[];A;)S.push(A),A=A.next;return S},function(){try{Object.defineProperty(K.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var L;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(H,Symbol.hasInstance,{value:function(A){return L.call(this,A)?!0:this!==H?!1:A&&A._writableState instanceof K}})):L=function(A){return A instanceof this};function H(U){e=e||cn();var A=this instanceof e;if(!A&&!L.call(H,this))return new H(U);this._writableState=new K(U,this,A),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),n.call(this)}H.prototype.pipe=function(){R(this,new w)};function C(U,A){var S=new b;R(U,S),He.nextTick(A,S)}function se(U,A,S,j){var M;return S===null?M=new d:typeof S!="string"&&!A.objectMode&&(M=new m("chunk",["string","Buffer"],S)),M?(R(U,M),He.nextTick(j,M),!1):!0}H.prototype.write=function(U,A,S){var j=this._writableState,M=!1,D=!j.objectMode&&o(U);return D&&!i.isBuffer(U)&&(U=a(U)),typeof A=="function"&&(S=A,A=null),D?A="buffer":A||(A=j.defaultEncoding),typeof S!="function"&&(S=F),j.ending?C(this,S):(D||se(this,j,U,S))&&(j.pendingcb++,M=N(this,j,D,U,A,S)),M},H.prototype.cork=function(){this._writableState.corked++},H.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&J(this,U))},H.prototype.setDefaultEncoding=function(A){if(typeof A=="string"&&(A=A.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((A+"").toLowerCase())>-1))throw new T(A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(H.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ne(U,A,S){return!U.objectMode&&U.decodeStrings!==!1&&typeof A=="string"&&(A=i.from(A,S)),A}Object.defineProperty(H.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(U,A,S,j,M,D){if(!S){var O=ne(A,j,M);j!==O&&(S=!0,M="buffer",j=O)}var te=A.objectMode?1:j.length;A.length+=te;var v=A.length>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function a(d,b,T){var R=b.length-1;if(R=0?(F>0&&(d.lastNeed=F-1),F):--R=0?(F>0&&(d.lastNeed=F-2),F):--R=0?(F>0&&(F===2?F=0:d.lastNeed=F-3),F):0))}function o(d,b,T){if((b[0]&192)!==128)return d.lastNeed=0,"�";if(d.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return d.lastNeed=1,"�";if(d.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return d.lastNeed=2,"�"}}function u(d){var b=this.lastTotal-this.lastNeed,T=o(this,d);if(T!==void 0)return T;if(this.lastNeed<=d.length)return d.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,b,0,d.length),this.lastNeed-=d.length}function c(d,b){var T=a(this,d,b);if(!this.lastNeed)return d.toString("utf8",b);this.lastTotal=T;var R=d.length-(T-this.lastNeed);return d.copy(this.lastChar,0,R),d.toString("utf8",b,R)}function h(d){var b=d&&d.length?this.write(d):"";return this.lastNeed?b+"�":b}function g(d,b){if((d.length-b)%2===0){var T=d.toString("utf16le",b);if(T){var R=T.charCodeAt(T.length-1);if(R>=55296&&R<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",b,d.length-1)}function m(d){var b=d&&d.length?this.write(d):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,T)}return b}function p(d,b){var T=(d.length-b)%3;return T===0?d.toString("base64",b):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",b,d.length-T))}function y(d){var b=d&&d.length?this.write(d):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function w(d){return d.toString(this.encoding)}function _(d){return d&&d.length?this.write(d):""}return Ps}var Ls,gu;function pa(){if(gu)return Ls;gu=1;var r=yn().codes.ERR_STREAM_PREMATURE_CLOSE;function e(s){var a=!1;return function(){if(!a){a=!0;for(var o=arguments.length,u=new Array(o),c=0;c0)if(typeof O!="string"&&!k.objectMode&&Object.getPrototypeOf(O)!==n.prototype&&(O=s(O)),v)k.endEmitted?F(D,new d):ne(D,k,O,!0);else if(k.ended)F(D,new w);else{if(k.destroyed)return!1;k.reading=!1,k.decoder&&!te?(O=k.decoder.write(O),k.objectMode||O.length!==0?ne(D,k,O,!1):J(D,k)):ne(D,k,O,!1)}else v||(k.reading=!1,J(D,k))}return!k.ended&&(k.length=Y?D=Y:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function W(D,O){return D<=0||O.length===0&&O.ended?0:O.objectMode?1:D!==D?O.flowing&&O.length?O.buffer.head.data.length:O.length:(D>O.highWaterMark&&(O.highWaterMark=x(D)),D<=O.length?D:O.ended?O.length:(O.needReadable=!0,0))}C.prototype.read=function(D){u("read",D),D=parseInt(D,10);var O=this._readableState,te=D;if(D!==0&&(O.emittedReadable=!1),D===0&&O.needReadable&&((O.highWaterMark!==0?O.length>=O.highWaterMark:O.length>0)||O.ended))return u("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?S(this):Z(this),null;if(D=W(D,O),D===0&&O.ended)return O.length===0&&S(this),null;var v=O.needReadable;u("need readable",v),(O.length===0||O.length-D0?re=A(D,O):re=null,re===null?(O.needReadable=O.length<=O.highWaterMark,D=0):(O.length-=D,O.awaitDrain=0),O.length===0&&(O.ended||(O.needReadable=!0),te!==D&&O.ended&&S(this)),re!==null&&this.emit("data",re),re};function pe(D,O){if(u("onEofChunk"),!O.ended){if(O.decoder){var te=O.decoder.end();te&&te.length&&(O.buffer.push(te),O.length+=O.objectMode?1:te.length)}O.ended=!0,O.sync?Z(D):(O.needReadable=!1,O.emittedReadable||(O.emittedReadable=!0,be(D)))}}function Z(D){var O=D._readableState;u("emitReadable",O.needReadable,O.emittedReadable),O.needReadable=!1,O.emittedReadable||(u("emitReadable",O.flowing),O.emittedReadable=!0,He.nextTick(be,D))}function be(D){var O=D._readableState;u("emitReadable_",O.destroyed,O.length,O.ended),!O.destroyed&&(O.length||O.ended)&&(D.emit("readable"),O.emittedReadable=!1),O.needReadable=!O.flowing&&!O.ended&&O.length<=O.highWaterMark,U(D)}function J(D,O){O.readingMore||(O.readingMore=!0,He.nextTick(Ae,D,O))}function Ae(D,O){for(;!O.reading&&!O.ended&&(O.length1&&M(v.pipes,D)!==-1)&&!B&&(u("false write response, pause",v.awaitDrain),v.awaitDrain++),te.pause())}function ue(De){u("onerror",De),Te(),D.removeListener("error",ue),e(D,"error")===0&&F(D,De)}L(D,"error",ue);function me(){D.removeListener("finish",ce),Te()}D.once("close",me);function ce(){u("onfinish"),D.removeListener("close",me),Te()}D.once("finish",ce);function Te(){u("unpipe"),te.unpipe(D)}return D.emit("pipe",te),v.flowing||(u("pipe resume"),te.resume()),D};function G(D){return function(){var te=D._readableState;u("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&e(D,"data")&&(te.flowing=!0,U(D))}}C.prototype.unpipe=function(D){var O=this._readableState,te={hasUnpiped:!1};if(O.pipesCount===0)return this;if(O.pipesCount===1)return D&&D!==O.pipes?this:(D||(D=O.pipes),O.pipes=null,O.pipesCount=0,O.flowing=!1,D&&D.emit("unpipe",this,te),this);if(!D){var v=O.pipes,re=O.pipesCount;O.pipes=null,O.pipesCount=0,O.flowing=!1;for(var k=0;k0,v.flowing!==!1&&this.resume()):D==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,u("on readable",v.length,v.reading),v.length?Z(this):v.reading||He.nextTick(q,this)),te},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(D,O){var te=t.prototype.removeListener.call(this,D,O);return D==="readable"&&He.nextTick(I,this),te},C.prototype.removeAllListeners=function(D){var O=t.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&He.nextTick(I,this),O};function I(D){var O=D._readableState;O.readableListening=D.listenerCount("readable")>0,O.resumeScheduled&&!O.paused?O.flowing=!0:D.listenerCount("data")>0&&D.resume()}function q(D){u("readable nexttick read 0"),D.read(0)}C.prototype.resume=function(){var D=this._readableState;return D.flowing||(u("resume"),D.flowing=!D.readableListening,Q(this,D)),D.paused=!1,this};function Q(D,O){O.resumeScheduled||(O.resumeScheduled=!0,He.nextTick(ie,D,O))}function ie(D,O){u("resume",O.reading),O.reading||D.read(0),O.resumeScheduled=!1,D.emit("resume"),U(D),O.flowing&&!O.reading&&D.read(0)}C.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(D){var O=D._readableState;for(u("flow",O.flowing);O.flowing&&D.read()!==null;);}C.prototype.wrap=function(D){var O=this,te=this._readableState,v=!1;D.on("end",function(){if(u("wrapped end"),te.decoder&&!te.ended){var l=te.decoder.end();l&&l.length&&O.push(l)}O.push(null)}),D.on("data",function(l){if(u("wrapped data"),te.decoder&&(l=te.decoder.write(l)),!(te.objectMode&&l==null)&&!(!te.objectMode&&(!l||!l.length))){var f=O.push(l);f||(v=!0,D.pause())}});for(var re in D)this[re]===void 0&&typeof D[re]=="function"&&(this[re]=function(f){return function(){return D[f].apply(D,arguments)}}(re));for(var k=0;k=O.length?(O.decoder?te=O.buffer.join(""):O.buffer.length===1?te=O.buffer.first():te=O.buffer.concat(O.length),O.buffer.clear()):te=O.buffer.consume(D,O.decoder),te}function S(D){var O=D._readableState;u("endReadable",O.endEmitted),O.endEmitted||(O.ended=!0,He.nextTick(j,O,D))}function j(D,O){if(u("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,O.readable=!1,O.emit("end"),D.autoDestroy)){var te=O._writableState;(!te||te.autoDestroy&&te.finished)&&O.destroy()}}typeof Symbol=="function"&&(C.from=function(D,O){return R===void 0&&(R=Bd()),R(C,D,O)});function M(D,O){for(var te=0,v=D.length;te0;return o(b,R,F,function(K){_||(_=K),K&&d.forEach(u),!R&&(d.forEach(u),w(_))})});return p.reduce(c)}return Ws=g,Ws}var ma=rr,ga=ca.EventEmitter,Md=Yr;Md(rr,ga);rr.Readable=Pl();rr.Writable=Bl();rr.Duplex=cn();rr.Transform=Ll();rr.PassThrough=Pd();rr.finished=pa();rr.pipeline=Ld();rr.Stream=rr;function rr(){ga.call(this)}rr.prototype.pipe=function(r,e){var t=this;function n(h){r.writable&&r.write(h)===!1&&t.pause&&t.pause()}t.on("data",n);function i(){t.readable&&t.resume&&t.resume()}r.on("drain",i),!r._isStdio&&(!e||e.end!==!1)&&(t.on("end",a),t.on("close",o));var s=!1;function a(){s||(s=!0,r.end())}function o(){s||(s=!0,typeof r.destroy=="function"&&r.destroy())}function u(h){if(c(),ga.listenerCount(this,"error")===0)throw h}t.on("error",u),r.on("error",u);function c(){t.removeListener("data",n),r.removeListener("drain",i),t.removeListener("end",a),t.removeListener("close",o),t.removeListener("error",u),r.removeListener("error",u),t.removeListener("end",c),t.removeListener("close",c),r.removeListener("close",c)}return t.on("end",c),t.on("close",c),r.on("close",c),r.emit("pipe",t),r};(function(r){(function(e){e.parser=function(A,S){return new n(A,S)},e.SAXParser=n,e.SAXStream=h,e.createStream=c,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(A,S){if(!(this instanceof n))return new n(A,S);var j=this;s(j),j.q=j.c="",j.bufferCheckPosition=e.MAX_BUFFER_LENGTH,j.opt=S||{},j.opt.lowercase=j.opt.lowercase||j.opt.lowercasetags,j.looseCase=j.opt.lowercase?"toLowerCase":"toUpperCase",j.tags=[],j.closed=j.closedRoot=j.sawRoot=!1,j.tag=j.error=null,j.strict=!!A,j.noscript=!!(A||j.opt.noscript),j.state=C.BEGIN,j.strictEntities=j.opt.strictEntities,j.ENTITIES=j.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),j.attribList=[],j.opt.xmlns&&(j.ns=Object.create(w)),j.trackPosition=j.opt.position!==!1,j.trackPosition&&(j.position=j.line=j.column=0),ne(j,"onready")}Object.create||(Object.create=function(A){function S(){}S.prototype=A;var j=new S;return j}),Object.keys||(Object.keys=function(A){var S=[];for(var j in A)A.hasOwnProperty(j)&&S.push(j);return S});function i(A){for(var S=Math.max(e.MAX_BUFFER_LENGTH,10),j=0,M=0,D=t.length;MS)switch(t[M]){case"textNode":Y(A);break;case"cdata":N(A,"oncdata",A.cdata),A.cdata="";break;case"script":N(A,"onscript",A.script),A.script="";break;default:W(A,"Max buffer length exceeded: "+t[M])}j=Math.max(j,O)}var te=e.MAX_BUFFER_LENGTH-j;A.bufferCheckPosition=te+A.position}function s(A){for(var S=0,j=t.length;S"||R(A)}function L(A,S){return A.test(S)}function H(A,S){return!L(A,S)}var C=0;e.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(A){var S=e.ENTITIES[A],j=typeof S=="number"?String.fromCharCode(S):S;e.ENTITIES[A]=j});for(var se in e.STATE)e.STATE[e.STATE[se]]=se;C=e.STATE;function ne(A,S,j){A[S]&&A[S](j)}function N(A,S,j){A.textNode&&Y(A),ne(A,S,j)}function Y(A){A.textNode=x(A.opt,A.textNode),A.textNode&&ne(A,"ontext",A.textNode),A.textNode=""}function x(A,S){return A.trim&&(S=S.trim()),A.normalize&&(S=S.replace(/\s+/g," ")),S}function W(A,S){return Y(A),A.trackPosition&&(S+=`
+Line: `+A.line+`
+Column: `+A.column+`
+Char: `+A.c),S=new Error(S),A.error=S,ne(A,"onerror",S),A}function pe(A){return A.sawRoot&&!A.closedRoot&&Z(A,"Unclosed root tag"),A.state!==C.BEGIN&&A.state!==C.BEGIN_WHITESPACE&&A.state!==C.TEXT&&W(A,"Unexpected end"),Y(A),A.c="",A.closed=!0,ne(A,"onend"),n.call(A,A.strict,A.opt),A}function Z(A,S){if(typeof A!="object"||!(A instanceof n))throw new Error("bad call to strictFail");A.strict&&W(A,S)}function be(A){A.strict||(A.tagName=A.tagName[A.looseCase]());var S=A.tags[A.tags.length-1]||A,j=A.tag={name:A.tagName,attributes:{}};A.opt.xmlns&&(j.ns=S.ns),A.attribList.length=0,N(A,"onopentagstart",j)}function J(A,S){var j=A.indexOf(":"),M=j<0?["",A]:A.split(":"),D=M[0],O=M[1];return S&&A==="xmlns"&&(D="xmlns",O=""),{prefix:D,local:O}}function Ae(A){if(A.strict||(A.attribName=A.attribName[A.looseCase]()),A.attribList.indexOf(A.attribName)!==-1||A.tag.attributes.hasOwnProperty(A.attribName)){A.attribName=A.attribValue="";return}if(A.opt.xmlns){var S=J(A.attribName,!0),j=S.prefix,M=S.local;if(j==="xmlns")if(M==="xml"&&A.attribValue!==p)Z(A,"xml: prefix must be bound to "+p+`
+Actual: `+A.attribValue);else if(M==="xmlns"&&A.attribValue!==y)Z(A,"xmlns: prefix must be bound to "+y+`
+Actual: `+A.attribValue);else{var D=A.tag,O=A.tags[A.tags.length-1]||A;D.ns===O.ns&&(D.ns=Object.create(O.ns)),D.ns[M]=A.attribValue}A.attribList.push([A.attribName,A.attribValue])}else A.tag.attributes[A.attribName]=A.attribValue,N(A,"onattribute",{name:A.attribName,value:A.attribValue});A.attribName=A.attribValue=""}function G(A,S){if(A.opt.xmlns){var j=A.tag,M=J(A.tagName);j.prefix=M.prefix,j.local=M.local,j.uri=j.ns[M.prefix]||"",j.prefix&&!j.uri&&(Z(A,"Unbound namespace prefix: "+JSON.stringify(A.tagName)),j.uri=M.prefix);var D=A.tags[A.tags.length-1]||A;j.ns&&D.ns!==j.ns&&Object.keys(j.ns).forEach(function(z){N(A,"onopennamespace",{prefix:z,uri:j.ns[z]})});for(var O=0,te=A.attribList.length;O",A.state=C.TEXT;return}if(A.script){if(A.tagName!=="script"){A.script+=""+A.tagName+">",A.tagName="",A.state=C.SCRIPT;return}N(A,"onscript",A.script),A.script=""}var S=A.tags.length,j=A.tagName;A.strict||(j=j[A.looseCase]());for(var M=j;S--;){var D=A.tags[S];if(D.name!==M)Z(A,"Unexpected close tag");else break}if(S<0){Z(A,"Unmatched closing tag: "+A.tagName),A.textNode+=""+A.tagName+">",A.state=C.TEXT;return}A.tagName=j;for(var O=A.tags.length;O-- >S;){var te=A.tag=A.tags.pop();A.tagName=A.tag.name,N(A,"onclosetag",A.tagName);var v={};for(var re in te.ns)v[re]=te.ns[re];var k=A.tags[A.tags.length-1]||A;A.opt.xmlns&&te.ns!==k.ns&&Object.keys(te.ns).forEach(function(l){var f=te.ns[l];N(A,"onclosenamespace",{prefix:l,uri:f})})}S===0&&(A.closedRoot=!0),A.tagName=A.attribValue=A.attribName="",A.attribList.length=0,A.state=C.TEXT}function q(A){var S=A.entity,j=S.toLowerCase(),M,D="";return A.ENTITIES[S]?A.ENTITIES[S]:A.ENTITIES[j]?A.ENTITIES[j]:(S=j,S.charAt(0)==="#"&&(S.charAt(1)==="x"?(S=S.slice(2),M=parseInt(S,16),D=M.toString(16)):(S=S.slice(1),M=parseInt(S,10),D=M.toString(10))),S=S.replace(/^0+/,""),isNaN(M)||D.toLowerCase()!==S?(Z(A,"Invalid character entity"),"&"+A.entity+";"):String.fromCodePoint(M))}function Q(A,S){S==="<"?(A.state=C.OPEN_WAKA,A.startTagPosition=A.position):R(S)||(Z(A,"Non-whitespace before first tag."),A.textNode=S,A.state=C.TEXT)}function ie(A,S){var j="";return S"?(N(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=C.TEXT):(F(M)&&(S.state=C.SGML_DECL_QUOTED),S.sgmlDecl+=M);continue;case C.SGML_DECL_QUOTED:M===S.q&&(S.state=C.SGML_DECL,S.q=""),S.sgmlDecl+=M;continue;case C.DOCTYPE:M===">"?(S.state=C.TEXT,N(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=M,M==="["?S.state=C.DOCTYPE_DTD:F(M)&&(S.state=C.DOCTYPE_QUOTED,S.q=M));continue;case C.DOCTYPE_QUOTED:S.doctype+=M,M===S.q&&(S.q="",S.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:S.doctype+=M,M==="]"?S.state=C.DOCTYPE:F(M)&&(S.state=C.DOCTYPE_DTD_QUOTED,S.q=M);continue;case C.DOCTYPE_DTD_QUOTED:S.doctype+=M,M===S.q&&(S.state=C.DOCTYPE_DTD,S.q="");continue;case C.COMMENT:M==="-"?S.state=C.COMMENT_ENDING:S.comment+=M;continue;case C.COMMENT_ENDING:M==="-"?(S.state=C.COMMENT_ENDED,S.comment=x(S.opt,S.comment),S.comment&&N(S,"oncomment",S.comment),S.comment=""):(S.comment+="-"+M,S.state=C.COMMENT);continue;case C.COMMENT_ENDED:M!==">"?(Z(S,"Malformed comment"),S.comment+="--"+M,S.state=C.COMMENT):S.state=C.TEXT;continue;case C.CDATA:M==="]"?S.state=C.CDATA_ENDING:S.cdata+=M;continue;case C.CDATA_ENDING:M==="]"?S.state=C.CDATA_ENDING_2:(S.cdata+="]"+M,S.state=C.CDATA);continue;case C.CDATA_ENDING_2:M===">"?(S.cdata&&N(S,"oncdata",S.cdata),N(S,"onclosecdata"),S.cdata="",S.state=C.TEXT):M==="]"?S.cdata+="]":(S.cdata+="]]"+M,S.state=C.CDATA);continue;case C.PROC_INST:M==="?"?S.state=C.PROC_INST_ENDING:R(M)?S.state=C.PROC_INST_BODY:S.procInstName+=M;continue;case C.PROC_INST_BODY:if(!S.procInstBody&&R(M))continue;M==="?"?S.state=C.PROC_INST_ENDING:S.procInstBody+=M;continue;case C.PROC_INST_ENDING:M===">"?(N(S,"onprocessinginstruction",{name:S.procInstName,body:S.procInstBody}),S.procInstName=S.procInstBody="",S.state=C.TEXT):(S.procInstBody+="?"+M,S.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:L(d,M)?S.tagName+=M:(be(S),M===">"?G(S):M==="/"?S.state=C.OPEN_TAG_SLASH:(R(M)||Z(S,"Invalid character in tag name"),S.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:M===">"?(G(S,!0),I(S)):(Z(S,"Forward-slash in opening tag not followed by >"),S.state=C.ATTRIB);continue;case C.ATTRIB:if(R(M))continue;M===">"?G(S):M==="/"?S.state=C.OPEN_TAG_SLASH:L(_,M)?(S.attribName=M,S.attribValue="",S.state=C.ATTRIB_NAME):Z(S,"Invalid attribute name");continue;case C.ATTRIB_NAME:M==="="?S.state=C.ATTRIB_VALUE:M===">"?(Z(S,"Attribute without value"),S.attribValue=S.attribName,Ae(S),G(S)):R(M)?S.state=C.ATTRIB_NAME_SAW_WHITE:L(d,M)?S.attribName+=M:Z(S,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if(M==="=")S.state=C.ATTRIB_VALUE;else{if(R(M))continue;Z(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",N(S,"onattribute",{name:S.attribName,value:""}),S.attribName="",M===">"?G(S):L(_,M)?(S.attribName=M,S.state=C.ATTRIB_NAME):(Z(S,"Invalid attribute name"),S.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(R(M))continue;F(M)?(S.q=M,S.state=C.ATTRIB_VALUE_QUOTED):(Z(S,"Unquoted attribute value"),S.state=C.ATTRIB_VALUE_UNQUOTED,S.attribValue=M);continue;case C.ATTRIB_VALUE_QUOTED:if(M!==S.q){M==="&"?S.state=C.ATTRIB_VALUE_ENTITY_Q:S.attribValue+=M;continue}Ae(S),S.q="",S.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:R(M)?S.state=C.ATTRIB:M===">"?G(S):M==="/"?S.state=C.OPEN_TAG_SLASH:L(_,M)?(Z(S,"No whitespace between attributes"),S.attribName=M,S.attribValue="",S.state=C.ATTRIB_NAME):Z(S,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(!K(M)){M==="&"?S.state=C.ATTRIB_VALUE_ENTITY_U:S.attribValue+=M;continue}Ae(S),M===">"?G(S):S.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(S.tagName)M===">"?I(S):L(d,M)?S.tagName+=M:S.script?(S.script+=""+S.tagName,S.tagName="",S.state=C.SCRIPT):(R(M)||Z(S,"Invalid tagname in closing tag"),S.state=C.CLOSE_TAG_SAW_WHITE);else{if(R(M))continue;H(_,M)?S.script?(S.script+=""+M,S.state=C.SCRIPT):Z(S,"Invalid tagname in closing tag."):S.tagName=M}continue;case C.CLOSE_TAG_SAW_WHITE:if(R(M))continue;M===">"?I(S):Z(S,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var te,v;switch(S.state){case C.TEXT_ENTITY:te=C.TEXT,v="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:te=C.ATTRIB_VALUE_QUOTED,v="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:te=C.ATTRIB_VALUE_UNQUOTED,v="attribValue";break}M===";"?(S[v]+=q(S),S.entity="",S.state=te):L(S.entity.length?T:b,M)?S.entity+=M:(Z(S,"Invalid character in entity name"),S[v]+="&"+S.entity+M,S.entity="",S.state=te);continue;default:throw new Error(S,"Unknown state: "+S.state)}return S.position>=S.bufferCheckPosition&&i(S),S}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var A=String.fromCharCode,S=Math.floor,j=function(){var M=16384,D=[],O,te,v=-1,re=arguments.length;if(!re)return"";for(var k="";++v1114111||S(l)!==l)throw RangeError("Invalid code point: "+l);l<=65535?D.push(l):(l-=65536,O=(l>>10)+55296,te=l%1024+56320,D.push(O,te)),(v+1===re||D.length>M)&&(k+=A.apply(null,D),D.length=0)}return k};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:j,configurable:!0,writable:!0}):String.fromCodePoint=j}()})(r)})(dl);var wa={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}},Ud=wa.isArray,ya={copyOptions:function(r){var e,t={};for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t},ensureFlagExists:function(r,e){(!(r in e)||typeof e[r]!="boolean")&&(e[r]=!1)},ensureSpacesExists:function(r){(!("spaces"in r)||typeof r.spaces!="number"&&typeof r.spaces!="string")&&(r.spaces=0)},ensureAlwaysArrayExists:function(r){(!("alwaysArray"in r)||typeof r.alwaysArray!="boolean"&&!Ud(r.alwaysArray))&&(r.alwaysArray=!1)},ensureKeyExists:function(r,e){(!(r+"Key"in e)||typeof e[r+"Key"]!="string")&&(e[r+"Key"]=e.compact?"_"+r:r)},checkFnExists:function(r,e){return r+"Fn"in e}},zd=dl,Xe=ya,on=wa.isArray,le,Ue;function jd(r){return le=Xe.copyOptions(r),Xe.ensureFlagExists("ignoreDeclaration",le),Xe.ensureFlagExists("ignoreInstruction",le),Xe.ensureFlagExists("ignoreAttributes",le),Xe.ensureFlagExists("ignoreText",le),Xe.ensureFlagExists("ignoreComment",le),Xe.ensureFlagExists("ignoreCdata",le),Xe.ensureFlagExists("ignoreDoctype",le),Xe.ensureFlagExists("compact",le),Xe.ensureFlagExists("alwaysChildren",le),Xe.ensureFlagExists("addParent",le),Xe.ensureFlagExists("trim",le),Xe.ensureFlagExists("nativeType",le),Xe.ensureFlagExists("nativeTypeAttributes",le),Xe.ensureFlagExists("sanitize",le),Xe.ensureFlagExists("instructionHasAttributes",le),Xe.ensureFlagExists("captureSpacesBetweenElements",le),Xe.ensureAlwaysArrayExists(le),Xe.ensureKeyExists("declaration",le),Xe.ensureKeyExists("instruction",le),Xe.ensureKeyExists("attributes",le),Xe.ensureKeyExists("text",le),Xe.ensureKeyExists("comment",le),Xe.ensureKeyExists("cdata",le),Xe.ensureKeyExists("doctype",le),Xe.ensureKeyExists("type",le),Xe.ensureKeyExists("name",le),Xe.ensureKeyExists("elements",le),Xe.ensureKeyExists("parent",le),le}function Ml(r){var e=Number(r);if(!isNaN(e))return e;var t=r.toLowerCase();return t==="true"?!0:t==="false"?!1:r}function Gn(r,e){var t;if(le.compact){if(!Ue[le[r+"Key"]]&&(on(le.alwaysArray)?le.alwaysArray.indexOf(le[r+"Key"])!==-1:le.alwaysArray)&&(Ue[le[r+"Key"]]=[]),Ue[le[r+"Key"]]&&!on(Ue[le[r+"Key"]])&&(Ue[le[r+"Key"]]=[Ue[le[r+"Key"]]]),r+"Fn"in le&&typeof e=="string"&&(e=le[r+"Fn"](e,Ue)),r==="instruction"&&("instructionFn"in le||"instructionNameFn"in le)){for(t in e)if(e.hasOwnProperty(t))if("instructionFn"in le)e[t]=le.instructionFn(e[t],t,Ue);else{var n=e[t];delete e[t],e[le.instructionNameFn(t,n,Ue)]=n}}on(Ue[le[r+"Key"]])?Ue[le[r+"Key"]].push(e):Ue[le[r+"Key"]]=e}else{Ue[le.elementsKey]||(Ue[le.elementsKey]=[]);var i={};if(i[le.typeKey]=r,r==="instruction"){for(t in e)if(e.hasOwnProperty(t))break;i[le.nameKey]="instructionNameFn"in le?le.instructionNameFn(t,e,Ue):t,le.instructionHasAttributes?(i[le.attributesKey]=e[t][le.attributesKey],"instructionFn"in le&&(i[le.attributesKey]=le.instructionFn(i[le.attributesKey],t,Ue))):("instructionFn"in le&&(e[t]=le.instructionFn(e[t],t,Ue)),i[le.instructionKey]=e[t])}else r+"Fn"in le&&(e=le[r+"Fn"](e,Ue)),i[le[r+"Key"]]=e;le.addParent&&(i[le.parentKey]=Ue),Ue[le.elementsKey].push(i)}}function Ul(r){if("attributesFn"in le&&r&&(r=le.attributesFn(r,Ue)),(le.trim||"attributeValueFn"in le||"attributeNameFn"in le||le.nativeTypeAttributes)&&r){var e;for(e in r)if(r.hasOwnProperty(e)&&(le.trim&&(r[e]=r[e].trim()),le.nativeTypeAttributes&&(r[e]=Ml(r[e])),"attributeValueFn"in le&&(r[e]=le.attributeValueFn(r[e],e,Ue)),"attributeNameFn"in le)){var t=r[e];delete r[e],r[le.attributeNameFn(e,r[e],Ue)]=t}}return r}function Hd(r){var e={};if(r.body&&(r.name.toLowerCase()==="xml"||le.instructionHasAttributes)){for(var t=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,n;(n=t.exec(r.body))!==null;)e[n[1]]=n[2]||n[3]||n[4];e=Ul(e)}if(r.name.toLowerCase()==="xml"){if(le.ignoreDeclaration)return;Ue[le.declarationKey]={},Object.keys(e).length&&(Ue[le.declarationKey][le.attributesKey]=e),le.addParent&&(Ue[le.declarationKey][le.parentKey]=Ue)}else{if(le.ignoreInstruction)return;le.trim&&(r.body=r.body.trim());var i={};le.instructionHasAttributes&&Object.keys(e).length?(i[r.name]={},i[r.name][le.attributesKey]=e):i[r.name]=r.body,Gn("instruction",i)}}function Wd(r,e){var t;if(typeof r=="object"&&(e=r.attributes,r=r.name),e=Ul(e),"elementNameFn"in le&&(r=le.elementNameFn(r,Ue)),le.compact){if(t={},!le.ignoreAttributes&&e&&Object.keys(e).length){t[le.attributesKey]={};var n;for(n in e)e.hasOwnProperty(n)&&(t[le.attributesKey][n]=e[n])}!(r in Ue)&&(on(le.alwaysArray)?le.alwaysArray.indexOf(r)!==-1:le.alwaysArray)&&(Ue[r]=[]),Ue[r]&&!on(Ue[r])&&(Ue[r]=[Ue[r]]),on(Ue[r])?Ue[r].push(t):Ue[r]=t}else Ue[le.elementsKey]||(Ue[le.elementsKey]=[]),t={},t[le.typeKey]="element",t[le.nameKey]=r,!le.ignoreAttributes&&e&&Object.keys(e).length&&(t[le.attributesKey]=e),le.alwaysChildren&&(t[le.elementsKey]=[]),Ue[le.elementsKey].push(t);t[le.parentKey]=Ue,Ue=t}function Gd(r){le.ignoreText||!r.trim()&&!le.captureSpacesBetweenElements||(le.trim&&(r=r.trim()),le.nativeType&&(r=Ml(r)),le.sanitize&&(r=r.replace(/&/g,"&").replace(//g,">")),Gn("text",r))}function Vd(r){le.ignoreComment||(le.trim&&(r=r.trim()),Gn("comment",r))}function Kd(r){var e=Ue[le.parentKey];le.addParent||delete Ue[le.parentKey],Ue=e}function qd(r){le.ignoreCdata||(le.trim&&(r=r.trim()),Gn("cdata",r))}function Xd(r){le.ignoreDoctype||(r=r.replace(/^ /,""),le.trim&&(r=r.trim()),Gn("doctype",r))}function Zd(r){r.note=r}var zl=function(r,e){var t=zd.parser(!0,{}),n={};if(Ue=n,le=jd(e),t.opt={strictEntities:!0},t.onopentag=Wd,t.ontext=Gd,t.oncomment=Vd,t.onclosetag=Kd,t.onerror=Zd,t.oncdata=qd,t.ondoctype=Xd,t.onprocessinginstruction=Hd,t.write(r).close(),n[le.elementsKey]){var i=n[le.elementsKey];delete n[le.elementsKey],n[le.elementsKey]=i,delete n.text}return n},Su=ya,Yd=zl;function Jd(r){var e=Su.copyOptions(r);return Su.ensureSpacesExists(e),e}var Qd=function(r,e){var t,n,i,s;return t=Jd(e),n=Yd(r,t),s="compact"in t&&t.compact?"_parent":"parent","addParent"in t&&t.addParent?i=JSON.stringify(n,function(a,o){return a===s?"_":o},t.spaces):i=JSON.stringify(n,null,t.spaces),i.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},Qe=ya,$d=wa.isArray,Bt,Pt;function ep(r){var e=Qe.copyOptions(r);return Qe.ensureFlagExists("ignoreDeclaration",e),Qe.ensureFlagExists("ignoreInstruction",e),Qe.ensureFlagExists("ignoreAttributes",e),Qe.ensureFlagExists("ignoreText",e),Qe.ensureFlagExists("ignoreComment",e),Qe.ensureFlagExists("ignoreCdata",e),Qe.ensureFlagExists("ignoreDoctype",e),Qe.ensureFlagExists("compact",e),Qe.ensureFlagExists("indentText",e),Qe.ensureFlagExists("indentCdata",e),Qe.ensureFlagExists("indentAttributes",e),Qe.ensureFlagExists("indentInstruction",e),Qe.ensureFlagExists("fullTagEmptyElement",e),Qe.ensureFlagExists("noQuotesForNativeAttributes",e),Qe.ensureSpacesExists(e),typeof e.spaces=="number"&&(e.spaces=Array(e.spaces+1).join(" ")),Qe.ensureKeyExists("declaration",e),Qe.ensureKeyExists("instruction",e),Qe.ensureKeyExists("attributes",e),Qe.ensureKeyExists("text",e),Qe.ensureKeyExists("comment",e),Qe.ensureKeyExists("cdata",e),Qe.ensureKeyExists("doctype",e),Qe.ensureKeyExists("type",e),Qe.ensureKeyExists("name",e),Qe.ensureKeyExists("elements",e),e}function vr(r,e,t){return(!t&&r.spaces?`
+`:"")+Array(e+1).join(r.spaces)}function Fi(r,e,t){if(e.ignoreAttributes)return"";"attributesFn"in e&&(r=e.attributesFn(r,Pt,Bt));var n,i,s,a,o=[];for(n in r)r.hasOwnProperty(n)&&r[n]!==null&&r[n]!==void 0&&(a=e.noQuotesForNativeAttributes&&typeof r[n]!="string"?"":'"',i=""+r[n],i=i.replace(/"/g,"""),s="attributeNameFn"in e?e.attributeNameFn(n,i,Pt,Bt):n,o.push(e.spaces&&e.indentAttributes?vr(e,t+1,!1):" "),o.push(s+"="+a+("attributeValueFn"in e?e.attributeValueFn(i,n,Pt,Bt):i)+a));return r&&Object.keys(r).length&&e.spaces&&e.indentAttributes&&o.push(vr(e,t,!1)),o.join("")}function jl(r,e,t){return Bt=r,Pt="xml",e.ignoreDeclaration?"":""}function Hl(r,e,t){if(e.ignoreInstruction)return"";var n;for(n in r)if(r.hasOwnProperty(n))break;var i="instructionNameFn"in e?e.instructionNameFn(n,r[n],Pt,Bt):n;if(typeof r[n]=="object")return Bt=r,Pt=i,""+i+Fi(r[n][e.attributesKey],e,t)+"?>";var s=r[n]?r[n]:"";return"instructionFn"in e&&(s=e.instructionFn(s,n,Pt,Bt)),""+i+(s?" "+s:"")+"?>"}function Wl(r,e){return e.ignoreComment?"":""}function Gl(r,e){return e.ignoreCdata?"":"","]]]]>"))+"]]>"}function Vl(r,e){return e.ignoreDoctype?"":""}function ba(r,e){return e.ignoreText?"":(r=""+r,r=r.replace(/&/g,"&"),r=r.replace(/&/g,"&").replace(//g,">"),"textFn"in e?e.textFn(r,Pt,Bt):r)}function tp(r,e){var t;if(r.elements&&r.elements.length)for(t=0;t"),r[e.elementsKey]&&r[e.elementsKey].length&&(n.push(Kl(r[e.elementsKey],e,t+1)),Bt=r,Pt=r.name),n.push(e.spaces&&tp(r,e)?`
+`+Array(t+1).join(e.spaces):""),n.push(""+i+">")):n.push("/>"),n.join("")}function Kl(r,e,t,n){return r.reduce(function(i,s){var a=vr(e,t,n&&!i);switch(s.type){case"element":return i+a+rp(s,e,t);case"comment":return i+a+Wl(s[e.commentKey],e);case"doctype":return i+a+Vl(s[e.doctypeKey],e);case"cdata":return i+(e.indentCdata?a:"")+Gl(s[e.cdataKey],e);case"text":return i+(e.indentText?a:"")+ba(s[e.textKey],e);case"instruction":var o={};return o[s[e.nameKey]]=s[e.attributesKey]?s:s[e.instructionKey],i+(e.indentInstruction?a:"")+Hl(o,e,t)}},"")}function ql(r,e,t){var n;for(n in r)if(r.hasOwnProperty(n))switch(n){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||t)return!0;break;case e.cdataKey:if(e.indentCdata||t)return!0;break;case e.instructionKey:if(e.indentInstruction||t)return!0;break;case e.doctypeKey:case e.commentKey:return!0;default:return!0}return!1}function np(r,e,t,n,i){Bt=r,Pt=e;var s="elementNameFn"in t?t.elementNameFn(e,r):e;if(typeof r>"u"||r===null||r==="")return"fullTagEmptyElementFn"in t&&t.fullTagEmptyElementFn(e,r)||t.fullTagEmptyElement?"<"+s+">"+s+">":"<"+s+"/>";var a=[];if(e){if(a.push("<"+s),typeof r!="object")return a.push(">"+ba(r,t)+""+s+">"),a.join("");r[t.attributesKey]&&a.push(Fi(r[t.attributesKey],t,n));var o=ql(r,t,!0)||r[t.attributesKey]&&r[t.attributesKey]["xml:space"]==="preserve";if(o||("fullTagEmptyElementFn"in t?o=t.fullTagEmptyElementFn(e,r):o=t.fullTagEmptyElement),o)a.push(">");else return a.push("/>"),a.join("")}return a.push(Xl(r,t,n+1,!1)),Bt=r,Pt=e,e&&a.push((i?vr(t,n,!1):"")+""+s+">"),a.join("")}function Xl(r,e,t,n){var i,s,a,o=[];for(s in r)if(r.hasOwnProperty(s))for(a=$d(r[s])?r[s]:[r[s]],i=0;i{switch(r.type){case void 0:case"element":const e=new fp(r.name,r.attributes),t=r.elements||[];for(const n of t){const i=_a(n);i!==void 0&&e.push(i)}return e;case"text":return r.text;default:return}};class cp extends Le{}class fp extends ge{static fromXmlString(e){const t=Yl.xml2js(e,{compact:!1});return _a(t)}constructor(e,t){super(e),t&&this.root.push(new cp(t))}push(e){this.root.push(e)}}class hp extends ge{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}class Jl extends ge{constructor(e,t){super(e),t&&(this.root=t.root)}}const qt=r=>{if(isNaN(r))throw new Error(`Invalid value '${r}' specified. Must be an integer.`);return Math.floor(r)},Bi=r=>{const e=qt(r);if(e<0)throw new Error(`Invalid value '${r}' specified. Must be a positive integer.`);return e},Ql=(r,e)=>{const t=e*2;if(r.length!==t||isNaN(+`0x${r}`))throw new Error(`Invalid hex value '${r}'. Expected ${t} digit hex value`);return r},Tu=r=>Ql(r,1),$l=r=>{const e=r.slice(-2),t=r.substring(0,r.length-2);return`${Number(t)}${e}`},ec=r=>{const e=$l(r);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},fn=r=>{if(r==="auto")return r;const e=r.charAt(0)==="#"?r.substring(1):r;return Ql(e,3)},Xr=r=>typeof r=="string"?$l(r):qt(r),dp=r=>typeof r=="string"?ec(r):Bi(r),sr=r=>typeof r=="string"?ec(r):Bi(r),pp=Bi,mp=Bi,gp=r=>r.toISOString();class ye extends ge{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new vt({val:t}))}}class Gs extends ge{constructor(e,t){super(e),this.root.push(new vt({val:dp(t)}))}}class un extends ge{constructor(e,t){super(e),this.root.push(new vt({val:t}))}}const Mn=(r,e)=>new Mr({name:r,attributes:{value:{key:"w:val",value:e}}});class va extends ge{constructor(e,t){super(e),this.root.push(new vt({val:t}))}}class Gr extends ge{constructor(e,t){super(e),this.root.push(t)}}class Mr extends ge{constructor({name:e,attributes:t,children:n}){super(e),t&&this.root.push(new Wn(t)),n&&this.root.push(...n)}}const yr={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"};class wp extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val"})}}class yp extends ge{constructor(e){super("w:jc"),this.root.push(new wp({val:e}))}}class pt extends ge{constructor(e,{color:t,size:n,space:i,style:s}){super(e),this.root.push(new bp({style:s,color:t===void 0?void 0:fn(t),size:n===void 0?void 0:pp(n),space:i===void 0?void 0:mp(i)}))}}class bp extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{style:"w:val",color:"w:color",size:"w:sz",space:"w:space"})}}const Ea={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"};class _p extends Di{constructor(e){super("w:pBdr"),e.top&&this.root.push(new pt("w:top",e.top)),e.bottom&&this.root.push(new pt("w:bottom",e.bottom)),e.left&&this.root.push(new pt("w:left",e.left)),e.right&&this.root.push(new pt("w:right",e.right))}}class vp extends ge{constructor(){super("w:pBdr");const e=new pt("w:bottom",{color:"auto",space:1,style:Ea.SINGLE,size:6});this.root.push(e)}}class Ep extends ge{constructor({start:e,end:t,left:n,right:i,hanging:s,firstLine:a}){super("w:ind"),this.root.push(new Wn({start:{key:"w:start",value:e===void 0?void 0:Xr(e)},end:{key:"w:end",value:t===void 0?void 0:Xr(t)},left:{key:"w:left",value:n===void 0?void 0:Xr(n)},right:{key:"w:right",value:i===void 0?void 0:Xr(i)},hanging:{key:"w:hanging",value:s===void 0?void 0:sr(s)},firstLine:{key:"w:firstLine",value:a===void 0?void 0:sr(a)}}))}}let Sp=class extends ge{constructor(){super("w:br")}};const Sa={BEGIN:"begin",END:"end",SEPARATE:"separate"};class Ta extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{type:"w:fldCharType",dirty:"w:dirty"})}}class di extends ge{constructor(e){super("w:fldChar"),this.root.push(new Ta({type:Sa.BEGIN,dirty:e}))}}class pi extends ge{constructor(e){super("w:fldChar"),this.root.push(new Ta({type:Sa.SEPARATE,dirty:e}))}}class mi extends ge{constructor(e){super("w:fldChar"),this.root.push(new Ta({type:Sa.END,dirty:e}))}}const hn={DEFAULT:"default",PRESERVE:"preserve"};class dn extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{space:"xml:space"})}}let Tp=class extends ge{constructor(){super("w:instrText"),this.root.push(new dn({space:hn.PRESERVE})),this.root.push("PAGE")}};class Ap extends ge{constructor(){super("w:instrText"),this.root.push(new dn({space:hn.PRESERVE})),this.root.push("NUMPAGES")}}class kp extends ge{constructor(){super("w:instrText"),this.root.push(new dn({space:hn.PRESERVE})),this.root.push("SECTIONPAGES")}}class xp extends ge{constructor(){super("w:instrText"),this.root.push(new dn({space:hn.PRESERVE})),this.root.push("SECTION")}}class Cp extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{fill:"w:fill",color:"w:color",type:"w:val"})}}class tc extends ge{constructor({fill:e,color:t,type:n}){super("w:shd"),this.root.push(new Cp({fill:e===void 0?void 0:fn(e),color:t===void 0?void 0:fn(t),type:n}))}}class Ip extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}const Rp={DOT:"dot"};class Dp extends ge{constructor(e){super("w:em"),this.root.push(new vt({val:e}))}}class Np extends Dp{constructor(e=Rp.DOT){super(e)}}class Op extends ge{constructor(e){super("w:spacing"),this.root.push(new vt({val:Xr(e)}))}}class Fp extends ge{constructor(e){super("w:color"),this.root.push(new vt({val:fn(e)}))}}class Bp extends ge{constructor(e){super("w:highlight"),this.root.push(new vt({val:e}))}}class Pp extends ge{constructor(e){super("w:highlightCs"),this.root.push(new vt({val:e}))}}const Lp=r=>new Mr({name:"w:lang",attributes:{value:{key:"w:val",value:r.value},eastAsia:{key:"w:eastAsia",value:r.eastAsia},bidirectional:{key:"w:bidi",value:r.bidirectional}}});class Au extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"})}}class Vs extends ge{constructor(e,t){if(super("w:rFonts"),typeof e=="string"){const n=e;this.root.push(new Au({ascii:n,cs:n,eastAsia:n,hAnsi:n,hint:t}))}else{const n=e;this.root.push(new Au(n))}}}let rc=class extends ge{constructor(e){super("w:vertAlign"),this.root.push(new vt({val:e}))}};class Mp extends rc{constructor(){super("superscript")}}class Up extends rc{constructor(){super("subscript")}}const nc={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"};class zp extends ge{constructor(e=nc.SINGLE,t){super("w:u"),this.root.push(new vt({val:e,color:t===void 0?void 0:fn(t)}))}}class Jr extends Di{constructor(e){var t,n;if(super("w:rPr"),!e)return;e.noProof!==void 0&&this.push(new ye("w:noProof",e.noProof)),e.bold!==void 0&&this.push(new ye("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new ye("w:bCs",(t=e.boldComplexScript)!=null?t:e.bold)),e.italics!==void 0&&this.push(new ye("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new ye("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.underline&&this.push(new zp(e.underline.type,e.underline.color)),e.effect&&this.push(new un("w:effect",e.effect)),e.emphasisMark&&this.push(new Np(e.emphasisMark.type)),e.color&&this.push(new Fp(e.color)),e.kern&&this.push(new Gs("w:kern",e.kern)),e.position&&this.push(new un("w:position",e.position)),e.size!==void 0&&this.push(new Gs("w:sz",e.size));const i=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;i&&this.push(new Gs("w:szCs",i)),e.rightToLeft!==void 0&&this.push(new ye("w:rtl",e.rightToLeft)),e.smallCaps!==void 0?this.push(new ye("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new ye("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new ye("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new ye("w:dstrike",e.doubleStrike)),e.subScript&&this.push(new Up),e.superScript&&this.push(new Mp),e.style&&this.push(new un("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(new Vs(e.font)):"name"in e.font?this.push(new Vs(e.font.name,e.font.hint)):this.push(new Vs(e.font))),e.highlight&&this.push(new Bp(e.highlight));const s=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;s&&this.push(new Pp(s)),e.characterSpacing&&this.push(new Op(e.characterSpacing)),e.emboss!==void 0&&this.push(new ye("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new ye("w:imprint",e.imprint)),e.shading&&this.push(new tc(e.shading)),e.revision&&this.push(new jp(e.revision)),e.border&&this.push(new pt("w:bdr",e.border)),e.snapToGrid!==void 0&&this.push(new ye("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new ye("w:vanish",e.vanish)),e.specVanish&&this.push(new ye("w:specVanish",e.vanish)),e.scale!==void 0&&this.push(new va("w:w",e.scale)),e.language&&this.push(Lp(e.language)),e.math&&this.push(new ye("w:oMath",e.math))}push(e){this.root.push(e)}}class jp extends ge{constructor(e){super("w:rPrChange"),this.root.push(new Ip({id:e.id,author:e.author,date:e.date})),this.addChildElement(new Jr(e))}}class ra extends ge{constructor(e){var t;return super("w:t"),typeof e=="string"?(this.root.push(new dn({space:hn.PRESERVE})),this.root.push(e),this):(this.root.push(new dn({space:(t=e.space)!=null?t:hn.DEFAULT})),this.root.push(e.text),this)}}const gi={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class Pi extends ge{constructor(e){if(super("w:r"),de(this,"properties"),this.properties=new Jr(e),this.root.push(this.properties),e.break)for(let t=0;t(t=e)=>{let n="",i=t;for(;i--;)n+=r[Math.random()*r.length|0];return n},Gp=(r=21)=>{let e="",t=r;for(;t--;)e+=Hp[Math.random()*64|0];return e};const ir=r=>Math.floor(r*72*20),Aa=(r=0)=>{let e=r;return()=>++e},Vp=()=>Aa(),Kp=()=>Aa(1),qp=()=>Aa(),Xp=()=>Gp().toLowerCase(),Un=r=>Wp("1234567890abcdef",r)(),Zp=()=>`${Un(8)}-${Un(4)}-${Un(4)}-${Un(4)}-${Un(12)}`;class Yp extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class Jp extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}class Qp extends ge{constructor({id:e,initials:t,author:n,date:i=new Date,children:s}){super("w:comment"),this.root.push(new Yp({id:e,initials:t,author:n,date:i.toISOString()}));for(const a of s)this.root.push(a)}}class $p extends ge{constructor({children:e}){super("w:comments"),this.root.push(new Jp({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const t of e)this.root.push(new Qp(t))}}class em extends ge{constructor(){super("w:pageBreakBefore")}}const na={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"};class tm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule"})}}class rm extends ge{constructor(e){super("w:spacing"),this.root.push(new tm(e))}}const Vr={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"};let wi=class extends ge{constructor(e){super("w:pStyle"),this.root.push(new vt({val:e}))}};class nm extends ge{constructor(e){super("w:tabs");for(const t of e)this.root.push(new sm(t))}}const ku={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"};class im extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val",pos:"w:pos",leader:"w:leader"})}}class sm extends ge{constructor({type:e,position:t,leader:n}){super("w:tab"),this.root.push(new im({val:e,pos:t,leader:n}))}}class xu extends ge{constructor(e,t){super("w:numPr"),this.root.push(new am(t)),this.root.push(new om(e))}}class am extends ge{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new vt({val:e}))}}class om extends ge{constructor(e){super("w:numId"),this.root.push(new vt({val:typeof e=="string"?`{${e}}`:e}))}}class um extends ge{constructor(){super(...arguments),de(this,"fileChild",Symbol())}}class lm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"})}}const cm={EXTERNAL:"External"};class fm extends ge{constructor(e,t,n,i){super("Relationship"),this.root.push(new lm({id:e,type:t,target:n,targetMode:i}))}}class hm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class dm extends ge{constructor(e,t,n){super("w:hyperlink"),de(this,"linkId"),this.linkId=t;const i={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},s=new hm(i);this.root.push(s),e.forEach(a=>{this.root.push(a)})}}class pm extends ge{constructor(e){super("w:externalHyperlink"),this.options=e}}class mm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class gm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{id:"w:id"})}}class wm{constructor(e){de(this,"bookmarkUniqueNumericId",qp()),de(this,"start"),de(this,"children"),de(this,"end");const t=this.bookmarkUniqueNumericId();this.start=new ym(e.id,t),this.children=e.children,this.end=new bm(t)}}class ym extends ge{constructor(e,t){super("w:bookmarkStart");const n=new mm({name:e,id:t});this.root.push(n)}}class bm extends ge{constructor(e){super("w:bookmarkEnd");const t=new gm({id:e});this.root.push(t)}}class _m extends ge{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new vt({val:e}))}}class vm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{verticalAlign:"w:val"})}}class Em extends ge{constructor(e){super("w:vAlign"),this.root.push(new vm({verticalAlign:e}))}}const ln={DEFAULT:"default",FIRST:"first",EVEN:"even"};class Sm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{type:"w:type",id:"r:id"})}}const Cu={HEADER:"w:headerReference",FOOTER:"w:footerReference"};class Ks extends ge{constructor(e,t){super(e),this.root.push(new Sm({type:t.type||ln.DEFAULT,id:`rId${t.id}`}))}}class Tm extends ge{constructor({space:e,count:t,separate:n,equalWidth:i,children:s}){super("w:cols"),this.root.push(new Wn({space:{key:"w:space",value:e===void 0?void 0:sr(e)},count:{key:"w:num",value:t===void 0?void 0:qt(t)},separate:{key:"w:sep",value:n},equalWidth:{key:"w:equalWidth",value:i}})),!i&&s&&s.forEach(a=>this.addChildElement(a))}}class Am extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{type:"w:type",linePitch:"w:linePitch",charSpace:"w:charSpace"})}}class km extends ge{constructor(e,t,n){super("w:docGrid"),this.root.push(new Am({type:n,linePitch:qt(e),charSpace:t?qt(t):void 0}))}}const xm=({countBy:r,start:e,restart:t,distance:n})=>new Mr({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:r===void 0?void 0:qt(r)},start:{key:"w:start",value:e===void 0?void 0:qt(e)},restart:{key:"w:restart",value:t},distance:{key:"w:distance",value:n===void 0?void 0:sr(n)}}});class Iu extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class Cm extends Di{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new Iu({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new Iu({})),e.pageBorderTop&&this.root.push(new pt("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(new pt("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(new pt("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(new pt("w:right",e.pageBorderRight))}}class Im extends ge{constructor(e,t,n,i,s,a,o){super("w:pgMar"),this.root.push(new Wn({top:{key:"w:top",value:Xr(e)},right:{key:"w:right",value:sr(t)},bottom:{key:"w:bottom",value:Xr(n)},left:{key:"w:left",value:sr(i)},header:{key:"w:header",value:sr(s)},footer:{key:"w:footer",value:sr(a)},gutter:{key:"w:gutter",value:sr(o)}}))}}class Rm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{start:"w:start",formatType:"w:fmt",separator:"w:chapSep"})}}class Dm extends ge{constructor({start:e,formatType:t,separator:n}){super("w:pgNumType"),this.root.push(new Rm({start:e===void 0?void 0:qt(e),formatType:t,separator:n}))}}const ic={PORTRAIT:"portrait",LANDSCAPE:"landscape"};class Nm extends ge{constructor(e,t,n){super("w:pgSz");const i=n===ic.LANDSCAPE,s=sr(e),a=sr(t);this.root.push(new Wn({width:{key:"w:w",value:i?a:s},height:{key:"w:h",value:i?s:a},orientation:{key:"w:orient",value:n}}))}}class Om extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val"})}}class Fm extends ge{constructor(e){super("w:textDirection"),this.root.push(new Om({val:e}))}}class Bm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val"})}}class Pm extends ge{constructor(e){super("w:type"),this.root.push(new Bm({val:e}))}}const Kr={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},qs={WIDTH:11906,HEIGHT:16838,ORIENTATION:ic.PORTRAIT};class Lm extends ge{constructor({page:{size:{width:e=qs.WIDTH,height:t=qs.HEIGHT,orientation:n=qs.ORIENTATION}={},margin:{top:i=Kr.TOP,right:s=Kr.RIGHT,bottom:a=Kr.BOTTOM,left:o=Kr.LEFT,header:u=Kr.HEADER,footer:c=Kr.FOOTER,gutter:h=Kr.GUTTER}={},pageNumbers:g={},borders:m,textDirection:p}={},grid:{linePitch:y=360,charSpace:w,type:_}={},headerWrapperGroup:d={},footerWrapperGroup:b={},lineNumbers:T,titlePage:R,verticalAlign:F,column:K,type:L}={}){super("w:sectPr"),this.addHeaderFooterGroup(Cu.HEADER,d),this.addHeaderFooterGroup(Cu.FOOTER,b),L&&this.root.push(new Pm(L)),this.root.push(new Nm(e,t,n)),this.root.push(new Im(i,s,a,o,u,c,h)),m&&this.root.push(new Cm(m)),T&&this.root.push(xm(T)),this.root.push(new Dm(g)),K&&this.root.push(new Tm(K)),F&&this.root.push(new Em(F)),R!==void 0&&this.root.push(new ye("w:titlePg",R)),p&&this.root.push(new Fm(p)),this.root.push(new km(y,w,_))}addHeaderFooterGroup(e,t){t.default&&this.root.push(new Ks(e,{type:ln.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(new Ks(e,{type:ln.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(new Ks(e,{type:ln.EVEN,id:t.even.View.ReferenceId}))}}class Mm extends ge{constructor(){super("w:body"),de(this,"sections",[])}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new Lm(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new er({}),n=new pn({});return n.push(e),t.addChildElement(n),t}}class Vn extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",aink:"xmlns:aink",am3d:"xmlns:am3d",w16cex:"xmlns:w16cex",w16cid:"xmlns:w16cid",w16:"xmlns:w16",w16sdtdh:"xmlns:w16sdtdh",w16se:"xmlns:w16se"})}}class Um extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class zm extends ge{constructor(e){super("w:background"),this.root.push(new Um({color:e.color===void 0?void 0:fn(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:Tu(e.themeShade),themeTint:e.themeTint===void 0?void 0:Tu(e.themeTint)}))}}class jm extends ge{constructor(e){super("w:document"),de(this,"body"),this.root.push(new Vn({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",Ignorable:"w14 w15 wp14"})),this.body=new Mm,e.background&&this.root.push(new zm(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class Hm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{xmlns:"xmlns"})}}class bn extends ge{constructor(){super("Relationships"),this.root.push(new Hm({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}createRelationship(e,t,n,i){const s=new fm(`rId${e}`,t,n,i);return this.root.push(s),s}get RelationshipCount(){return this.root.length-1}}class sc{constructor(e){de(this,"document"),de(this,"relationships"),this.document=new jm(e),this.relationships=new bn}get View(){return this.document}get Relationships(){return this.relationships}}class Wm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val"})}}class Gm extends ge{constructor(){super("w:wordWrap"),this.root.push(new Wm({val:0}))}}const Vm=r=>{var e,t;return new Mr({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:r.anchorLock},dropCap:{key:"w:dropCap",value:r.dropCap},width:{key:"w:w",value:r.width},height:{key:"w:h",value:r.height},x:{key:"w:x",value:r.position?r.position.x:void 0},y:{key:"w:y",value:r.position?r.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:r.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:r.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=r.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(t=r.space)==null?void 0:t.vertical},rule:{key:"w:hRule",value:r.rule},alignmentX:{key:"w:xAlign",value:r.alignment?r.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:r.alignment?r.alignment.y:void 0},lines:{key:"w:lines",value:r.lines},wrap:{key:"w:wrap",value:r.wrap}}})};class pn extends Di{constructor(e){var t,n;if(super("w:pPr"),de(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(new wi(e.heading)),e.bullet&&this.push(new wi("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(new wi("ListParagraph"))),e.style&&this.push(new wi(e.style)),e.keepNext!==void 0&&this.push(new ye("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new ye("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new em),e.frame&&this.push(Vm(e.frame)),e.widowControl!==void 0&&this.push(new ye("w:widowControl",e.widowControl)),e.bullet&&this.push(new xu(1,e.bullet.level)),e.numbering&&(this.numberingReferences.push({reference:e.numbering.reference,instance:(t=e.numbering.instance)!=null?t:0}),this.push(new xu(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))),e.border&&this.push(new _p(e.border)),e.thematicBreak&&this.push(new vp),e.shading&&this.push(new tc(e.shading)),e.wordWrap&&this.push(new Gm),e.overflowPunctuation&&this.push(new ye("w:overflowPunct",e.overflowPunctuation));const i=[...e.rightTabStop!==void 0?[{type:ku.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:ku.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(new nm(i)),e.bidirectional!==void 0&&this.push(new ye("w:bidi",e.bidirectional)),e.spacing&&this.push(new rm(e.spacing)),e.indent&&this.push(new Ep(e.indent)),e.contextualSpacing!==void 0&&this.push(new ye("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new yp(e.alignment)),e.outlineLevel!==void 0&&this.push(new _m(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new ye("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new ye("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new Jr(e.run))}push(e){this.root.push(e)}prepForXml(e){if(e.viewWrapper instanceof sc)for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class er extends um{constructor(e){if(super("w:p"),de(this,"properties"),typeof e=="string")return this.properties=new pn({}),this.root.push(this.properties),this.root.push(new xi(e)),this;if(this.properties=new pn(e),this.root.push(this.properties),e.text&&this.root.push(new xi(e.text)),e.children)for(const t of e.children){if(t instanceof wm){this.root.push(t.start);for(const n of t.children)this.root.push(n);this.root.push(t.end);continue}this.root.push(t)}}prepForXml(e){for(const t of this.root)if(t instanceof pm){const n=this.root.indexOf(t),i=new dm(t.options.children,Xp());e.viewWrapper.Relationships.createRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,cm.EXTERNAL),this.root[n]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}const rn={style:Ea.NONE,size:0,color:"auto"},nn={style:Ea.SINGLE,size:4,color:"auto"};class Km extends ge{constructor(e){super("w:tblBorders"),e.top?this.root.push(new pt("w:top",e.top)):this.root.push(new pt("w:top",nn)),e.left?this.root.push(new pt("w:left",e.left)):this.root.push(new pt("w:left",nn)),e.bottom?this.root.push(new pt("w:bottom",e.bottom)):this.root.push(new pt("w:bottom",nn)),e.right?this.root.push(new pt("w:right",e.right)):this.root.push(new pt("w:right",nn)),e.insideHorizontal?this.root.push(new pt("w:insideH",e.insideHorizontal)):this.root.push(new pt("w:insideH",nn)),e.insideVertical?this.root.push(new pt("w:insideV",e.insideVertical)):this.root.push(new pt("w:insideV",nn))}}de(Km,"NONE",{top:rn,bottom:rn,left:rn,right:rn,insideHorizontal:rn,insideVertical:rn});class qm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Xm extends ge{constructor(){super("Properties"),this.root.push(new qm({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class Zm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{xmlns:"xmlns"})}}class Ym extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{contentType:"ContentType",extension:"Extension"})}}class Lr extends ge{constructor(e,t){super("Default"),this.root.push(new Ym({contentType:e,extension:t}))}}class Jm extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{contentType:"ContentType",partName:"PartName"})}}class $t extends ge{constructor(e,t){super("Override"),this.root.push(new Jm({contentType:e,partName:t}))}}class Qm extends ge{constructor(){super("Types"),this.root.push(new Zm({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new Lr("image/png","png")),this.root.push(new Lr("image/jpeg","jpeg")),this.root.push(new Lr("image/jpeg","jpg")),this.root.push(new Lr("image/bmp","bmp")),this.root.push(new Lr("image/gif","gif")),this.root.push(new Lr("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new Lr("application/xml","xml")),this.root.push(new Lr("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new $t("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(new $t("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}class $m extends ge{constructor(e){super("cp:coreProperties"),this.root.push(new Vn({cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"})),e.title&&this.root.push(new Gr("dc:title",e.title)),e.subject&&this.root.push(new Gr("dc:subject",e.subject)),e.creator&&this.root.push(new Gr("dc:creator",e.creator)),e.keywords&&this.root.push(new Gr("cp:keywords",e.keywords)),e.description&&this.root.push(new Gr("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new Gr("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new Gr("cp:revision",String(e.revision))),this.root.push(new Ru("dcterms:created")),this.root.push(new Ru("dcterms:modified"))}}class Ru extends ge{constructor(e){super(e),this.root.push(new Vn({type:"dcterms:W3CDTF"})),this.root.push(gp(new Date))}}class e0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class t0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{fmtid:"fmtid",pid:"pid",name:"name"})}}class r0 extends ge{constructor(e,t){super("property"),this.root.push(new t0({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new n0(t.value))}}class n0 extends ge{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class i0 extends ge{constructor(e){super("Properties"),de(this,"nextId"),de(this,"properties",[]),this.root.push(new e0({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach(t=>this.root.push(t)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new r0(this.nextId++,e))}}class s0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let a0=class extends Jl{constructor(e,t){super("w:ftr",t),de(this,"refId"),this.refId=e,t||this.root.push(new s0({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class o0{constructor(e,t,n){de(this,"footer"),de(this,"relationships"),this.media=e,this.footer=new a0(t,n),this.relationships=new bn}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class u0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class l0 extends ge{constructor(){super("w:footnoteRef")}}class c0 extends Pi{constructor(){super({style:"FootnoteReference"}),this.root.push(new l0)}}const Du={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class Xs extends ge{constructor(e){super("w:footnote"),this.root.push(new u0({type:e.type,id:e.id}));for(let t=0;t9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new E0({ilvl:qt(e),tentative:1}))}}class I0 extends C0{}class R0 extends ge{constructor(e){super("w:multiLevelType"),this.root.push(new vt({val:e}))}}class D0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class Nu extends ge{constructor(e,t){super("w:abstractNum"),de(this,"id"),this.root.push(new D0({abstractNumId:qt(e),restartNumberingAfterBreak:0})),this.root.push(new R0("hybridMultilevel")),this.id=e;for(const n of t)this.root.push(new I0(n))}}class N0 extends ge{constructor(e){super("w:abstractNumId"),this.root.push(new vt({val:e}))}}class O0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{numId:"w:numId"})}}class Ou extends ge{constructor(e){if(super("w:num"),de(this,"numId"),de(this,"reference"),de(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new O0({numId:qt(e.numId)})),this.root.push(new N0(qt(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const t of e.overrideLevels)this.root.push(new B0(t.num,t.start))}}class F0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{ilvl:"w:ilvl"})}}class B0 extends ge{constructor(e,t){super("w:lvlOverride"),this.root.push(new F0({ilvl:e})),t!==void 0&&this.root.push(new L0(t))}}class P0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val"})}}class L0 extends ge{constructor(e){super("w:startOverride"),this.root.push(new P0({val:e}))}}class M0 extends ge{constructor(e){super("w:numbering"),de(this,"abstractNumberingMap",new Map),de(this,"concreteNumberingMap",new Map),de(this,"referenceConfigMap",new Map),de(this,"abstractNumUniqueNumericId",Vp()),de(this,"concreteNumUniqueNumericId",Kp()),this.root.push(new Vn({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const t=new Nu(this.abstractNumUniqueNumericId(),[{level:0,format:Ir.BULLET,text:"●",alignment:yr.LEFT,style:{paragraph:{indent:{left:ir(.5),hanging:ir(.25)}}}},{level:1,format:Ir.BULLET,text:"○",alignment:yr.LEFT,style:{paragraph:{indent:{left:ir(1),hanging:ir(.25)}}}},{level:2,format:Ir.BULLET,text:"■",alignment:yr.LEFT,style:{paragraph:{indent:{left:2160,hanging:ir(.25)}}}},{level:3,format:Ir.BULLET,text:"●",alignment:yr.LEFT,style:{paragraph:{indent:{left:2880,hanging:ir(.25)}}}},{level:4,format:Ir.BULLET,text:"○",alignment:yr.LEFT,style:{paragraph:{indent:{left:3600,hanging:ir(.25)}}}},{level:5,format:Ir.BULLET,text:"■",alignment:yr.LEFT,style:{paragraph:{indent:{left:4320,hanging:ir(.25)}}}},{level:6,format:Ir.BULLET,text:"●",alignment:yr.LEFT,style:{paragraph:{indent:{left:5040,hanging:ir(.25)}}}},{level:7,format:Ir.BULLET,text:"●",alignment:yr.LEFT,style:{paragraph:{indent:{left:5760,hanging:ir(.25)}}}},{level:8,format:Ir.BULLET,text:"●",alignment:yr.LEFT,style:{paragraph:{indent:{left:6480,hanging:ir(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new Ou({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new Nu(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(e){for(const t of this.abstractNumberingMap.values())this.root.push(t);for(const t of this.concreteNumberingMap.values())this.root.push(t);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const n=this.abstractNumberingMap.get(e);if(!n)return;const i=`${e}-${t}`;if(this.concreteNumberingMap.has(i))return;const s=this.referenceConfigMap.get(e),a=s&&s[0].start,o={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:t,overrideLevels:[a&&Number.isInteger(a)?{num:0,start:a}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new Ou(o))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class U0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{version:"w:val",name:"w:name",uri:"w:uri"})}}class z0 extends ge{constructor(e){super("w:compatSetting"),this.root.push(new U0({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class j0 extends ge{constructor(e){super("w:compat"),e.version&&this.root.push(new z0(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new ye("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new ye("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new ye("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new ye("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new ye("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new ye("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new ye("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new ye("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new ye("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new ye("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new ye("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new ye("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new ye("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new ye("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new ye("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new ye("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new ye("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new ye("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new ye("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new ye("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new ye("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new ye("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new ye("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new ye("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new ye("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new ye("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new ye("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new ye("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new ye("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new ye("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new ye("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new ye("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new ye("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new ye("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new ye("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new ye("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new ye("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new ye("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new ye("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new ye("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new ye("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new ye("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new ye("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new ye("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new ye("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new ye("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new ye("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new ye("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new ye("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new ye("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new ye("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new ye("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new ye("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new ye("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new ye("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new ye("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new ye("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new ye("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new ye("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new ye("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new ye("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new ye("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new ye("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new ye("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new ye("w:cachedColBalance",e.cachedColumnBalance))}}class H0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class W0 extends ge{constructor(e){var t,n,i,s;super("w:settings"),this.root.push(new H0({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new ye("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new ye("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new ye("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new ye("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new va("w:defaultTabStop",e.defaultTabStop)),this.root.push(new j0(Hn(Ke({},(t=e.compatibility)!=null?t:{}),{version:(s=(i=(n=e.compatibility)==null?void 0:n.version)!=null?i:e.compatibilityModeVersion)!=null?s:15})))}}class ac extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{val:"w:val"})}}class G0 extends ge{constructor(e){super("w:name"),this.root.push(new ac({val:e}))}}class V0 extends ge{constructor(e){super("w:uiPriority"),this.root.push(new ac({val:qt(e)}))}}class K0 extends Le{constructor(){super(...arguments),de(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class oc extends ge{constructor(e,t){super("w:style"),this.root.push(new K0(e)),t.name&&this.root.push(new G0(t.name)),t.basedOn&&this.root.push(new un("w:basedOn",t.basedOn)),t.next&&this.root.push(new un("w:next",t.next)),t.link&&this.root.push(new un("w:link",t.link)),t.uiPriority!==void 0&&this.root.push(new V0(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new ye("w:semiHidden",t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new ye("w:unhideWhenUsed",t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new ye("w:qFormat",t.quickFormat))}}class Li extends oc{constructor(e){super({type:"paragraph",styleId:e.id},e),de(this,"paragraphProperties"),de(this,"runProperties"),this.paragraphProperties=new pn(e.paragraph),this.runProperties=new Jr(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class Mi extends oc{constructor(e){super({type:"character",styleId:e.id},Ke({uiPriority:99,unhideWhenUsed:!0},e)),de(this,"runProperties"),this.runProperties=new Jr(e.run),this.root.push(this.runProperties)}}class zr extends Li{constructor(e){super(Ke({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class q0 extends zr{constructor(e){super(Ke({id:"Title",name:"Title"},e))}}class X0 extends zr{constructor(e){super(Ke({id:"Heading1",name:"Heading 1"},e))}}class Z0 extends zr{constructor(e){super(Ke({id:"Heading2",name:"Heading 2"},e))}}class Y0 extends zr{constructor(e){super(Ke({id:"Heading3",name:"Heading 3"},e))}}class J0 extends zr{constructor(e){super(Ke({id:"Heading4",name:"Heading 4"},e))}}class Q0 extends zr{constructor(e){super(Ke({id:"Heading5",name:"Heading 5"},e))}}class $0 extends zr{constructor(e){super(Ke({id:"Heading6",name:"Heading 6"},e))}}class eg extends zr{constructor(e){super(Ke({id:"Strong",name:"Strong"},e))}}class tg extends Li{constructor(e){super(Ke({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class rg extends Li{constructor(e){super(Ke({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:na.AUTO}},run:{size:20}},e))}}class ng extends Mi{constructor(e){super(Ke({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class ig extends Mi{constructor(e){super(Ke({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class sg extends Mi{constructor(e){super(Ke({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:nc.SINGLE}}},e))}}class ia extends ge{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new Li(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new Mi(t))}}class ag extends ge{constructor(e){super("w:pPrDefault"),this.root.push(new pn(e))}}class og extends ge{constructor(e){super("w:rPrDefault"),this.root.push(new Jr(e))}}class ug extends ge{constructor(e){super("w:docDefaults"),de(this,"runPropertiesDefaults"),de(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new og(e.run),this.paragraphPropertiesDefaults=new ag(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class lg{newInstance(e){const t=Yl.xml2js(e,{compact:!1});let n;for(const a of t.elements||[])a.name==="w:styles"&&(n=a);if(n===void 0)throw new Error("can not find styles element");const i=n.elements||[];return new ia({initialStyles:new hp(n.attributes),importedStyles:i.map(a=>_a(a))})}}class Fu{newInstance(e={}){var t;return{initialStyles:new Vn({mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",Ignorable:"w14 w15"}),importedStyles:[new ug((t=e.document)!=null?t:{}),new q0(Ke({run:{size:56}},e.title)),new X0(Ke({run:{color:"2E74B5",size:32}},e.heading1)),new Z0(Ke({run:{color:"2E74B5",size:26}},e.heading2)),new Y0(Ke({run:{color:"1F4D78",size:24}},e.heading3)),new J0(Ke({run:{color:"2E74B5",italics:!0}},e.heading4)),new Q0(Ke({run:{color:"2E74B5"}},e.heading5)),new $0(Ke({run:{color:"1F4D78"}},e.heading6)),new eg(Ke({run:{bold:!0}},e.strong)),new tg(e.listParagraph||{}),new sg(e.hyperlink||{}),new ng(e.footnoteReference||{}),new rg(e.footnoteText||{}),new ig(e.footnoteTextChar||{})]}}}const yi=({id:r,fontKey:e,subsetted:t},n)=>new Mr({name:n,attributes:Ke({id:{key:"r:id",value:r}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...t?[new ye("w:subsetted",t)]:[]]}),cg=({name:r,altName:e,panose1:t,charset:n,family:i,notTrueType:s,pitch:a,sig:o,embedRegular:u,embedBold:c,embedItalic:h,embedBoldItalic:g})=>new Mr({name:"w:font",attributes:{name:{key:"w:name",value:r}},children:[...e?[Mn("w:altName",e)]:[],...t?[Mn("w:panose1",t)]:[],...n?[Mn("w:charset",n)]:[],...i?[Mn("w:family",i)]:[],...s?[new ye("w:notTrueType",s)]:[],...a?[Mn("w:pitch",a)]:[],...o?[new Mr({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:o.usb0},usb1:{key:"w:usb1",value:o.usb1},usb2:{key:"w:usb2",value:o.usb2},usb3:{key:"w:usb3",value:o.usb3},csb0:{key:"w:csb0",value:o.csb0},csb1:{key:"w:csb1",value:o.csb1}}})]:[],...u?[yi(u,"w:embedRegular")]:[],...c?[yi(c,"w:embedBold")]:[],...h?[yi(h,"w:embedItalic")]:[],...g?[yi(g,"w:embedBoldItalic")]:[]]}),fg=({name:r,index:e,fontKey:t,characterSet:n})=>cg({name:r,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:t,id:`rId${e}`}}),hg=r=>new Mr({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:r.map((e,t)=>fg({name:e.name,index:t+1,fontKey:e.fontKey}))});class dg{constructor(e){de(this,"fontTable"),de(this,"relationships"),de(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(t=>Hn(Ke({},t),{fontKey:Zp()})),this.fontTable=hg(this.fontOptionsWithKey),this.relationships=new bn;for(let t=0;te.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}}function bi(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uc={exports:{}};(function(r,e){(function(t){r.exports=t()})(function(){return function t(n,i,s){function a(c,h){if(!i[c]){if(!n[c]){var g=typeof bi=="function"&&bi;if(!h&&g)return g(c,!0);if(o)return o(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var p=i[c]={exports:{}};n[c][0].call(p.exports,function(y){var w=n[c][1][y];return a(w||y)},p,p.exports,t,n,i,s)}return i[c].exports}for(var o=typeof bi=="function"&&bi,u=0;u>2,p=(3&c)<<4|h>>4,y=1>6:64,w=2>4,h=(15&m)<<4|(p=o.indexOf(u.charAt(w++)))>>2,g=(3&p)<<6|(y=o.indexOf(u.charAt(w++))),b[_++]=c,p!==64&&(b[_++]=h),y!==64&&(b[_++]=g);return b}},{"./support":30,"./utils":32}],2:[function(t,n,i){var s=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),u=t("./stream/DataLengthProbe");function c(h,g,m,p,y){this.compressedSize=h,this.uncompressedSize=g,this.crc32=m,this.compression=p,this.compressedContent=y}c.prototype={getContentWorker:function(){var h=new a(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),g=this;return h.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new a(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(h,g,m){return h.pipe(new o).pipe(new u("uncompressedSize")).pipe(g.compressWorker(m)).pipe(new u("compressedSize")).withStreamInfo("compression",g)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,i){var s=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,i){var s=t("./utils"),a=function(){for(var o,u=[],c=0;c<256;c++){o=c;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;u[c]=o}return u}();n.exports=function(o,u){return o!==void 0&&o.length?s.getTypeOf(o)!=="string"?function(c,h,g,m){var p=a,y=m+g;c^=-1;for(var w=m;w>>8^p[255&(c^h[w])];return-1^c}(0|u,o,o.length,0):function(c,h,g,m){var p=a,y=m+g;c^=-1;for(var w=m;w>>8^p[255&(c^h.charCodeAt(w))];return-1^c}(0|u,o,o.length,0):0}},{"./utils":32}],5:[function(t,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,n,i){var s=null;s=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:s}},{lie:37}],7:[function(t,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),u=t("./stream/GenericWorker"),c=s?"uint8array":"array";function h(g,m){u.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=m,this.meta={}}i.magic="\b\0",o.inherits(h,u),h.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,g.data),!1)},h.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(m){g.push({data:m,meta:g.meta})}},i.compressWorker=function(g){return new h("Deflate",g)},i.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,i){function s(p,y){var w,_="";for(w=0;w>>=8;return _}function a(p,y,w,_,d,b){var T,R,F=p.file,K=p.compression,L=b!==c.utf8encode,H=o.transformTo("string",b(F.name)),C=o.transformTo("string",c.utf8encode(F.name)),se=F.comment,ne=o.transformTo("string",b(se)),N=o.transformTo("string",c.utf8encode(se)),Y=C.length!==F.name.length,x=N.length!==se.length,W="",pe="",Z="",be=F.dir,J=F.date,Ae={crc32:0,compressedSize:0,uncompressedSize:0};y&&!w||(Ae.crc32=p.crc32,Ae.compressedSize=p.compressedSize,Ae.uncompressedSize=p.uncompressedSize);var G=0;y&&(G|=8),L||!Y&&!x||(G|=2048);var I=0,q=0;be&&(I|=16),d==="UNIX"?(q=798,I|=function(ie,U){var A=ie;return ie||(A=U?16893:33204),(65535&A)<<16}(F.unixPermissions,be)):(q=20,I|=function(ie){return 63&(ie||0)}(F.dosPermissions)),T=J.getUTCHours(),T<<=6,T|=J.getUTCMinutes(),T<<=5,T|=J.getUTCSeconds()/2,R=J.getUTCFullYear()-1980,R<<=4,R|=J.getUTCMonth()+1,R<<=5,R|=J.getUTCDate(),Y&&(pe=s(1,1)+s(h(H),4)+C,W+="up"+s(pe.length,2)+pe),x&&(Z=s(1,1)+s(h(ne),4)+N,W+="uc"+s(Z.length,2)+Z);var Q="";return Q+=`
+\0`,Q+=s(G,2),Q+=K.magic,Q+=s(T,2),Q+=s(R,2),Q+=s(Ae.crc32,4),Q+=s(Ae.compressedSize,4),Q+=s(Ae.uncompressedSize,4),Q+=s(H.length,2),Q+=s(W.length,2),{fileRecord:g.LOCAL_FILE_HEADER+Q+H+W,dirRecord:g.CENTRAL_FILE_HEADER+s(q,2)+Q+s(ne.length,2)+"\0\0\0\0"+s(I,4)+s(_,4)+H+W+ne}}var o=t("../utils"),u=t("../stream/GenericWorker"),c=t("../utf8"),h=t("../crc32"),g=t("../signature");function m(p,y,w,_){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=w,this.encodeFileName=_,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(m,u),m.prototype.push=function(p){var y=p.meta.percent||0,w=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,u.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:w?(y+100*(w-_-1))/w:100}}))},m.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var y=this.streamFiles&&!p.file.dir;if(y){var w=a(p,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:w.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(p){this.accumulate=!1;var y=this.streamFiles&&!p.file.dir,w=a(p,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(w.dirRecord),y)this.push({data:function(_){return g.DATA_DESCRIPTOR+s(_.crc32,4)+s(_.compressedSize,4)+s(_.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:w.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var p=this.bytesWritten,y=0;y=this.index;u--)c=(c<<8)+this.byteAt(u);return this.index+=o,c},readString:function(o){return s.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},n.exports=a},{"../utils":32}],19:[function(t,n,i){var s=t("./Uint8ArrayReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.readData=function(o){this.checkOffset(o);var u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,i){var s=t("./DataReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,n,i){var s=t("./ArrayReader");function a(o){s.call(this,o)}t("../utils").inherits(a,s),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,i){var s=t("../utils"),a=t("../support"),o=t("./ArrayReader"),u=t("./StringReader"),c=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");n.exports=function(g){var m=s.getTypeOf(g);return s.checkSupport(m),m!=="string"||a.uint8array?m==="nodebuffer"?new c(g):a.uint8array?new h(s.transformTo("uint8array",g)):new o(s.transformTo("array",g)):new u(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,i){var s=t("./GenericWorker"),a=t("../utils");function o(u){s.call(this,"ConvertWorker to "+u),this.destType=u}a.inherits(o,s),o.prototype.processChunk=function(u){this.push({data:a.transformTo(this.destType,u.data),meta:u.meta})},n.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,i){var s=t("./GenericWorker"),a=t("../crc32");function o(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,s),o.prototype.processChunk=function(u){this.streamInfo.crc32=a(u.data,this.streamInfo.crc32||0),this.push(u)},n.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,i){var s=t("../utils"),a=t("./GenericWorker");function o(u){a.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}s.inherits(o,a),o.prototype.processChunk=function(u){if(u){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+u.data.length}a.prototype.processChunk.call(this,u)},n.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,i){var s=t("../utils"),a=t("./GenericWorker");function o(u){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(h){c.dataIsReady=!0,c.data=h,c.max=h&&h.length||0,c.type=s.getTypeOf(h),c.isPaused||c._tickAndRepeat()},function(h){c.error(h)})}s.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,c);break;case"uint8array":u=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":u=this.data.slice(this.index,c)}return this.index=c,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,i){function s(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var u=0;u "+a:a}},n.exports=s},{}],29:[function(t,n,i){var s=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),u=t("../base64"),c=t("../support"),h=t("../external"),g=null;if(c.nodestream)try{g=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(y,w){return new h.Promise(function(_,d){var b=[],T=y._internalType,R=y._outputType,F=y._mimeType;y.on("data",function(K,L){b.push(K),w&&w(L)}).on("error",function(K){b=[],d(K)}).on("end",function(){try{var K=function(L,H,C){switch(L){case"blob":return s.newBlob(s.transformTo("arraybuffer",H),C);case"base64":return u.encode(H);default:return s.transformTo(L,H)}}(R,function(L,H){var C,se=0,ne=null,N=0;for(C=0;C"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(s),i.blob=a.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,i){for(var s=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),u=t("./stream/GenericWorker"),c=new Array(256),h=0;h<256;h++)c[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;c[254]=c[254]=1;function g(){u.call(this,"utf-8 decode"),this.leftOver=null}function m(){u.call(this,"utf-8 encode")}i.utf8encode=function(p){return a.nodebuffer?o.newBufferFrom(p,"utf-8"):function(y){var w,_,d,b,T,R=y.length,F=0;for(b=0;b>>6:(_<65536?w[T++]=224|_>>>12:(w[T++]=240|_>>>18,w[T++]=128|_>>>12&63),w[T++]=128|_>>>6&63),w[T++]=128|63&_);return w}(p)},i.utf8decode=function(p){return a.nodebuffer?s.transformTo("nodebuffer",p).toString("utf-8"):function(y){var w,_,d,b,T=y.length,R=new Array(2*T);for(w=_=0;w>10&1023,R[_++]=56320|1023&d)}return R.length!==_&&(R.subarray?R=R.subarray(0,_):R.length=_),s.applyFromCharCode(R)}(p=s.transformTo(a.uint8array?"uint8array":"array",p))},s.inherits(g,u),g.prototype.processChunk=function(p){var y=s.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var w=y;(y=new Uint8Array(w.length+this.leftOver.length)).set(this.leftOver,0),y.set(w,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var _=function(b,T){var R;for((T=T||b.length)>b.length&&(T=b.length),R=T-1;0<=R&&(192&b[R])==128;)R--;return R<0||R===0?T:R+c[b[R]]>T?R:T}(y),d=y;_!==y.length&&(a.uint8array?(d=y.subarray(0,_),this.leftOver=y.subarray(_,y.length)):(d=y.slice(0,_),this.leftOver=y.slice(_,y.length))),this.push({data:i.utf8decode(d),meta:p.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=g,s.inherits(m,u),m.prototype.processChunk=function(p){this.push({data:i.utf8encode(p.data),meta:p.meta})},i.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,i){var s=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),u=t("./external");function c(w){return w}function h(w,_){for(var d=0;d>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=s(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var y,w,_,d=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?m[_++]=224|p>>>12:(m[_++]=240|p>>>18,m[_++]=128|p>>>12&63),m[_++]=128|p>>>6&63),m[_++]=128|63&p);return m},i.buf2binstring=function(g){return h(g,g.length)},i.binstring2buf=function(g){for(var m=new s.Buf8(g.length),p=0,y=m.length;p>10&1023,b[y++]=56320|1023&w)}return h(b,y)},i.utf8border=function(g,m){var p;for((m=m||g.length)>g.length&&(m=g.length),p=m-1;0<=p&&(192&g[p])==128;)p--;return p<0||p===0?m:p+u[g[p]]>m?p:m}},{"./common":41}],43:[function(t,n,i){n.exports=function(s,a,o,u){for(var c=65535&s|0,h=s>>>16&65535|0,g=0;o!==0;){for(o-=g=2e3>>1:a>>>1;o[u]=a}return o}();n.exports=function(a,o,u,c){var h=s,g=c+u;a^=-1;for(var m=c;m>>8^h[255&(a^o[m])];return-1^a}},{}],46:[function(t,n,i){var s,a=t("../utils/common"),o=t("./trees"),u=t("./adler32"),c=t("./crc32"),h=t("./messages"),g=0,m=4,p=0,y=-2,w=-1,_=4,d=2,b=8,T=9,R=286,F=30,K=19,L=2*R+1,H=15,C=3,se=258,ne=se+C+1,N=42,Y=113,x=1,W=2,pe=3,Z=4;function be(v,re){return v.msg=h[re],re}function J(v){return(v<<1)-(4v.avail_out&&(k=v.avail_out),k!==0&&(a.arraySet(v.output,re.pending_buf,re.pending_out,k,v.next_out),v.next_out+=k,re.pending_out+=k,v.total_out+=k,v.avail_out-=k,re.pending-=k,re.pending===0&&(re.pending_out=0))}function I(v,re){o._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,re),v.block_start=v.strstart,G(v.strm)}function q(v,re){v.pending_buf[v.pending++]=re}function Q(v,re){v.pending_buf[v.pending++]=re>>>8&255,v.pending_buf[v.pending++]=255&re}function ie(v,re){var k,l,f=v.max_chain_length,E=v.strstart,B=v.prev_length,V=v.nice_match,z=v.strstart>v.w_size-ne?v.strstart-(v.w_size-ne):0,ue=v.window,me=v.w_mask,ce=v.prev,Te=v.strstart+se,De=ue[E+B-1],ee=ue[E+B];v.prev_length>=v.good_match&&(f>>=2),V>v.lookahead&&(V=v.lookahead);do if(ue[(k=re)+B]===ee&&ue[k+B-1]===De&&ue[k]===ue[E]&&ue[++k]===ue[E+1]){E+=2,k++;do;while(ue[++E]===ue[++k]&&ue[++E]===ue[++k]&&ue[++E]===ue[++k]&&ue[++E]===ue[++k]&&ue[++E]===ue[++k]&&ue[++E]===ue[++k]&&ue[++E]===ue[++k]&&ue[++E]===ue[++k]&&Ez&&--f!=0);return B<=v.lookahead?B:v.lookahead}function U(v){var re,k,l,f,E,B,V,z,ue,me,ce=v.w_size;do{if(f=v.window_size-v.lookahead-v.strstart,v.strstart>=ce+(ce-ne)){for(a.arraySet(v.window,v.window,ce,ce,0),v.match_start-=ce,v.strstart-=ce,v.block_start-=ce,re=k=v.hash_size;l=v.head[--re],v.head[re]=ce<=l?l-ce:0,--k;);for(re=k=ce;l=v.prev[--re],v.prev[re]=ce<=l?l-ce:0,--k;);f+=ce}if(v.strm.avail_in===0)break;if(B=v.strm,V=v.window,z=v.strstart+v.lookahead,ue=f,me=void 0,me=B.avail_in,ue=C)for(E=v.strstart-v.insert,v.ins_h=v.window[E],v.ins_h=(v.ins_h<=C&&(v.ins_h=(v.ins_h<=C)if(l=o._tr_tally(v,v.strstart-v.match_start,v.match_length-C),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=C){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<=C&&(v.ins_h=(v.ins_h<=C&&v.match_length<=v.prev_length){for(f=v.strstart+v.lookahead-C,l=o._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-C),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=f&&(v.ins_h=(v.ins_h<v.pending_buf_size-5&&(k=v.pending_buf_size-5);;){if(v.lookahead<=1){if(U(v),v.lookahead===0&&re===g)return x;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var l=v.block_start+k;if((v.strstart===0||v.strstart>=l)&&(v.lookahead=v.strstart-l,v.strstart=l,I(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-ne&&(I(v,!1),v.strm.avail_out===0))return x}return v.insert=0,re===m?(I(v,!0),v.strm.avail_out===0?pe:Z):(v.strstart>v.block_start&&(I(v,!1),v.strm.avail_out),x)}),new j(4,4,8,4,A),new j(4,5,16,8,A),new j(4,6,32,32,A),new j(4,4,16,16,S),new j(8,16,32,32,S),new j(8,16,128,128,S),new j(8,32,128,256,S),new j(32,128,258,1024,S),new j(32,258,258,4096,S)],i.deflateInit=function(v,re){return te(v,re,b,15,8,0)},i.deflateInit2=te,i.deflateReset=O,i.deflateResetKeep=D,i.deflateSetHeader=function(v,re){return v&&v.state?v.state.wrap!==2?y:(v.state.gzhead=re,p):y},i.deflate=function(v,re){var k,l,f,E;if(!v||!v.state||5>8&255),q(l,l.gzhead.time>>16&255),q(l,l.gzhead.time>>24&255),q(l,l.level===9?2:2<=l.strategy||l.level<2?4:0),q(l,255&l.gzhead.os),l.gzhead.extra&&l.gzhead.extra.length&&(q(l,255&l.gzhead.extra.length),q(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(v.adler=c(v.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=69):(q(l,0),q(l,0),q(l,0),q(l,0),q(l,0),q(l,l.level===9?2:2<=l.strategy||l.level<2?4:0),q(l,3),l.status=Y);else{var B=b+(l.w_bits-8<<4)<<8;B|=(2<=l.strategy||l.level<2?0:l.level<6?1:l.level===6?2:3)<<6,l.strstart!==0&&(B|=32),B+=31-B%31,l.status=Y,Q(l,B),l.strstart!==0&&(Q(l,v.adler>>>16),Q(l,65535&v.adler)),v.adler=1}if(l.status===69)if(l.gzhead.extra){for(f=l.pending;l.gzindex<(65535&l.gzhead.extra.length)&&(l.pending!==l.pending_buf_size||(l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),G(v),f=l.pending,l.pending!==l.pending_buf_size));)q(l,255&l.gzhead.extra[l.gzindex]),l.gzindex++;l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=73)}else l.status=73;if(l.status===73)if(l.gzhead.name){f=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),G(v),f=l.pending,l.pending===l.pending_buf_size)){E=1;break}E=l.gzindexf&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),E===0&&(l.gzindex=0,l.status=91)}else l.status=91;if(l.status===91)if(l.gzhead.comment){f=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>f&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),G(v),f=l.pending,l.pending===l.pending_buf_size)){E=1;break}E=l.gzindexf&&(v.adler=c(v.adler,l.pending_buf,l.pending-f,f)),E===0&&(l.status=103)}else l.status=103;if(l.status===103&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&G(v),l.pending+2<=l.pending_buf_size&&(q(l,255&v.adler),q(l,v.adler>>8&255),v.adler=0,l.status=Y)):l.status=Y),l.pending!==0){if(G(v),v.avail_out===0)return l.last_flush=-1,p}else if(v.avail_in===0&&J(re)<=J(k)&&re!==m)return be(v,-5);if(l.status===666&&v.avail_in!==0)return be(v,-5);if(v.avail_in!==0||l.lookahead!==0||re!==g&&l.status!==666){var V=l.strategy===2?function(z,ue){for(var me;;){if(z.lookahead===0&&(U(z),z.lookahead===0)){if(ue===g)return x;break}if(z.match_length=0,me=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,me&&(I(z,!1),z.strm.avail_out===0))return x}return z.insert=0,ue===m?(I(z,!0),z.strm.avail_out===0?pe:Z):z.last_lit&&(I(z,!1),z.strm.avail_out===0)?x:W}(l,re):l.strategy===3?function(z,ue){for(var me,ce,Te,De,ee=z.window;;){if(z.lookahead<=se){if(U(z),z.lookahead<=se&&ue===g)return x;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=C&&0z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=C?(me=o._tr_tally(z,1,z.match_length-C),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(me=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),me&&(I(z,!1),z.strm.avail_out===0))return x}return z.insert=0,ue===m?(I(z,!0),z.strm.avail_out===0?pe:Z):z.last_lit&&(I(z,!1),z.strm.avail_out===0)?x:W}(l,re):s[l.level].func(l,re);if(V!==pe&&V!==Z||(l.status=666),V===x||V===pe)return v.avail_out===0&&(l.last_flush=-1),p;if(V===W&&(re===1?o._tr_align(l):re!==5&&(o._tr_stored_block(l,0,0,!1),re===3&&(Ae(l.head),l.lookahead===0&&(l.strstart=0,l.block_start=0,l.insert=0))),G(v),v.avail_out===0))return l.last_flush=-1,p}return re!==m?p:l.wrap<=0?1:(l.wrap===2?(q(l,255&v.adler),q(l,v.adler>>8&255),q(l,v.adler>>16&255),q(l,v.adler>>24&255),q(l,255&v.total_in),q(l,v.total_in>>8&255),q(l,v.total_in>>16&255),q(l,v.total_in>>24&255)):(Q(l,v.adler>>>16),Q(l,65535&v.adler)),G(v),0=k.w_size&&(E===0&&(Ae(k.head),k.strstart=0,k.block_start=0,k.insert=0),ue=new a.Buf8(k.w_size),a.arraySet(ue,re,me-k.w_size,k.w_size,0),re=ue,me=k.w_size),B=v.avail_in,V=v.next_in,z=v.input,v.avail_in=me,v.next_in=0,v.input=re,U(k);k.lookahead>=C;){for(l=k.strstart,f=k.lookahead-(C-1);k.ins_h=(k.ins_h<>>=C=H>>>24,T-=C,(C=H>>>16&255)===0)W[h++]=65535&H;else{if(!(16&C)){if(!(64&C)){H=R[(65535&H)+(b&(1<>>=C,T-=C),T<15&&(b+=x[u++]<>>=C=H>>>24,T-=C,!(16&(C=H>>>16&255))){if(!(64&C)){H=F[(65535&H)+(b&(1<>>=C,T-=C,(C=h-g)>3,b&=(1<<(T-=se<<3))-1,s.next_in=u,s.next_out=h,s.avail_in=u>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function T(N){var Y;return N&&N.state?(Y=N.state,N.total_in=N.total_out=Y.total=0,N.msg="",Y.wrap&&(N.adler=1&Y.wrap),Y.mode=y,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new s.Buf32(w),Y.distcode=Y.distdyn=new s.Buf32(_),Y.sane=1,Y.back=-1,m):p}function R(N){var Y;return N&&N.state?((Y=N.state).wsize=0,Y.whave=0,Y.wnext=0,T(N)):p}function F(N,Y){var x,W;return N&&N.state?(W=N.state,Y<0?(x=0,Y=-Y):(x=1+(Y>>4),Y<48&&(Y&=15)),Y&&(Y<8||15=Z.wsize?(s.arraySet(Z.window,Y,x-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):(W<(pe=Z.wsize-Z.wnext)&&(pe=W),s.arraySet(Z.window,Y,x-W,pe,Z.wnext),(W-=pe)?(s.arraySet(Z.window,Y,x-W,W,0),Z.wnext=W,Z.whave=Z.wsize):(Z.wnext+=pe,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave>>8&255,x.check=o(x.check,E,2,0),I=G=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&G)<<8)+(G>>8))%31){N.msg="incorrect header check",x.mode=30;break}if((15&G)!=8){N.msg="unknown compression method",x.mode=30;break}if(I-=4,v=8+(15&(G>>>=4)),x.wbits===0)x.wbits=v;else if(v>x.wbits){N.msg="invalid window size",x.mode=30;break}x.dmax=1<>8&1),512&x.flags&&(E[0]=255&G,E[1]=G>>>8&255,x.check=o(x.check,E,2,0)),I=G=0,x.mode=3;case 3:for(;I<32;){if(J===0)break e;J--,G+=W[Z++]<>>8&255,E[2]=G>>>16&255,E[3]=G>>>24&255,x.check=o(x.check,E,4,0)),I=G=0,x.mode=4;case 4:for(;I<16;){if(J===0)break e;J--,G+=W[Z++]<>8),512&x.flags&&(E[0]=255&G,E[1]=G>>>8&255,x.check=o(x.check,E,2,0)),I=G=0,x.mode=5;case 5:if(1024&x.flags){for(;I<16;){if(J===0)break e;J--,G+=W[Z++]<>>8&255,x.check=o(x.check,E,2,0)),I=G=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(J<(ie=x.length)&&(ie=J),ie&&(x.head&&(v=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),s.arraySet(x.head.extra,W,Z,ie,v)),512&x.flags&&(x.check=o(x.check,W,ie,Z)),J-=ie,Z+=ie,x.length-=ie),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(J===0)break e;for(ie=0;v=W[Z+ie++],x.head&&v&&x.length<65536&&(x.head.name+=String.fromCharCode(v)),v&&ie>9&1,x.head.done=!0),N.adler=x.check=0,x.mode=12;break;case 10:for(;I<32;){if(J===0)break e;J--,G+=W[Z++]<>>=7&I,I-=7&I,x.mode=27;break}for(;I<3;){if(J===0)break e;J--,G+=W[Z++]<>>=1)){case 0:x.mode=14;break;case 1:if(se(x),x.mode=20,Y!==6)break;G>>>=2,I-=2;break e;case 2:x.mode=17;break;case 3:N.msg="invalid block type",x.mode=30}G>>>=2,I-=2;break;case 14:for(G>>>=7&I,I-=7&I;I<32;){if(J===0)break e;J--,G+=W[Z++]<>>16^65535)){N.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&G,I=G=0,x.mode=15,Y===6)break e;case 15:x.mode=16;case 16:if(ie=x.length){if(J>>=5,I-=5,x.ndist=1+(31&G),G>>>=5,I-=5,x.ncode=4+(15&G),G>>>=4,I-=4,286>>=3,I-=3}for(;x.have<19;)x.lens[B[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,k={bits:x.lenbits},re=c(0,x.lens,0,19,x.lencode,0,x.work,k),x.lenbits=k.bits,re){N.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have>>16&255,M=65535&f,!((S=f>>>24)<=I);){if(J===0)break e;J--,G+=W[Z++]<>>=S,I-=S,x.lens[x.have++]=M;else{if(M===16){for(l=S+2;I>>=S,I-=S,x.have===0){N.msg="invalid bit length repeat",x.mode=30;break}v=x.lens[x.have-1],ie=3+(3&G),G>>>=2,I-=2}else if(M===17){for(l=S+3;I>>=S)),G>>>=3,I-=3}else{for(l=S+7;I>>=S)),G>>>=7,I-=7}if(x.have+ie>x.nlen+x.ndist){N.msg="invalid bit length repeat",x.mode=30;break}for(;ie--;)x.lens[x.have++]=v}}if(x.mode===30)break;if(x.lens[256]===0){N.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,k={bits:x.lenbits},re=c(h,x.lens,0,x.nlen,x.lencode,0,x.work,k),x.lenbits=k.bits,re){N.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,k={bits:x.distbits},re=c(g,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,k),x.distbits=k.bits,re){N.msg="invalid distances set",x.mode=30;break}if(x.mode=20,Y===6)break e;case 20:x.mode=21;case 21:if(6<=J&&258<=Ae){N.next_out=be,N.avail_out=Ae,N.next_in=Z,N.avail_in=J,x.hold=G,x.bits=I,u(N,Q),be=N.next_out,pe=N.output,Ae=N.avail_out,Z=N.next_in,W=N.input,J=N.avail_in,G=x.hold,I=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;j=(f=x.lencode[G&(1<>>16&255,M=65535&f,!((S=f>>>24)<=I);){if(J===0)break e;J--,G+=W[Z++]<>D)])>>>16&255,M=65535&f,!(D+(S=f>>>24)<=I);){if(J===0)break e;J--,G+=W[Z++]<>>=D,I-=D,x.back+=D}if(G>>>=S,I-=S,x.back+=S,x.length=M,j===0){x.mode=26;break}if(32&j){x.back=-1,x.mode=12;break}if(64&j){N.msg="invalid literal/length code",x.mode=30;break}x.extra=15&j,x.mode=22;case 22:if(x.extra){for(l=x.extra;I>>=x.extra,I-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;j=(f=x.distcode[G&(1<>>16&255,M=65535&f,!((S=f>>>24)<=I);){if(J===0)break e;J--,G+=W[Z++]<>D)])>>>16&255,M=65535&f,!(D+(S=f>>>24)<=I);){if(J===0)break e;J--,G+=W[Z++]<>>=D,I-=D,x.back+=D}if(G>>>=S,I-=S,x.back+=S,64&j){N.msg="invalid distance code",x.mode=30;break}x.offset=M,x.extra=15&j,x.mode=24;case 24:if(x.extra){for(l=x.extra;I>>=x.extra,I-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){N.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(Ae===0)break e;if(ie=Q-Ae,x.offset>ie){if((ie=x.offset-ie)>x.whave&&x.sane){N.msg="invalid distance too far back",x.mode=30;break}U=ie>x.wnext?(ie-=x.wnext,x.wsize-ie):x.wnext-ie,ie>x.length&&(ie=x.length),A=x.window}else A=pe,U=be-x.offset,ie=x.length;for(AeL?(C=U[A+_[Y]],I[q+_[Y]]):(C=96,0),b=1<>be)+(T-=b)]=H<<24|C<<16|se|0,T!==0;);for(b=1<>=1;if(b!==0?(G&=b-1,G+=b):G=0,Y++,--Q[N]==0){if(N===W)break;N=g[m+_[Y]]}if(pe>>7)]}function q(f,E){f.pending_buf[f.pending++]=255&E,f.pending_buf[f.pending++]=E>>>8&255}function Q(f,E,B){f.bi_valid>d-B?(f.bi_buf|=E<>d-f.bi_valid,f.bi_valid+=B-d):(f.bi_buf|=E<>>=1,B<<=1,0<--E;);return B>>>1}function A(f,E,B){var V,z,ue=new Array(_+1),me=0;for(V=1;V<=_;V++)ue[V]=me=me+B[V-1]<<1;for(z=0;z<=E;z++){var ce=f[2*z+1];ce!==0&&(f[2*z]=U(ue[ce]++,ce))}}function S(f){var E;for(E=0;E>1;1<=B;B--)D(f,ue,B);for(z=Te;B=f.heap[1],f.heap[1]=f.heap[f.heap_len--],D(f,ue,1),V=f.heap[1],f.heap[--f.heap_max]=B,f.heap[--f.heap_max]=V,ue[2*z]=ue[2*B]+ue[2*V],f.depth[z]=(f.depth[B]>=f.depth[V]?f.depth[B]:f.depth[V])+1,ue[2*B+1]=ue[2*V+1]=z,f.heap[1]=z++,D(f,ue,1),2<=f.heap_len;);f.heap[--f.heap_max]=f.heap[1],function(ee,Ee){var Ne,ve,Oe,_e,Re,Pe,ze=Ee.dyn_tree,Ve=Ee.max_code,Ye=Ee.stat_desc.static_tree,qe=Ee.stat_desc.has_stree,Ge=Ee.stat_desc.extra_bits,ct=Ee.stat_desc.extra_base,Lt=Ee.stat_desc.max_length,Yt=0;for(_e=0;_e<=_;_e++)ee.bl_count[_e]=0;for(ze[2*ee.heap[ee.heap_max]+1]=0,Ne=ee.heap_max+1;Ne>=7;z
>>=1)if(1&De&&ce.dyn_ltree[2*Te]!==0)return a;if(ce.dyn_ltree[18]!==0||ce.dyn_ltree[20]!==0||ce.dyn_ltree[26]!==0)return o;for(Te=32;Te>>3,(ue=f.static_len+3+7>>>3)<=z&&(z=ue)):z=ue=B+5,B+4<=z&&E!==-1?l(f,E,B,V):f.strategy===4||ue===z?(Q(f,2+(V?1:0),3),O(f,ne,N)):(Q(f,4+(V?1:0),3),function(ce,Te,De,ee){var Ee;for(Q(ce,Te-257,5),Q(ce,De-1,5),Q(ce,ee-4,4),Ee=0;Ee>>8&255,f.pending_buf[f.d_buf+2*f.last_lit+1]=255&E,f.pending_buf[f.l_buf+f.last_lit]=255&B,f.last_lit++,E===0?f.dyn_ltree[2*B]++:(f.matches++,E--,f.dyn_ltree[2*(x[B]+g+1)]++,f.dyn_dtree[2*I(E)]++),f.last_lit===f.lit_bufsize-1},i._tr_align=function(f){Q(f,2,3),ie(f,T,ne),function(E){E.bi_valid===16?(q(E,E.bi_buf),E.bi_buf=0,E.bi_valid=0):8<=E.bi_valid&&(E.pending_buf[E.pending++]=255&E.bi_buf,E.bi_buf>>=8,E.bi_valid-=8)}(f)}},{"../utils/common":41}],53:[function(t,n,i){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,i){(function(s){(function(a,o){if(!a.setImmediate){var u,c,h,g,m=1,p={},y=!1,w=a.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(a);_=_&&_.setTimeout?_:a,u={}.toString.call(a.process)==="[object process]"?function(R){He.nextTick(function(){b(R)})}:function(){if(a.postMessage&&!a.importScripts){var R=!0,F=a.onmessage;return a.onmessage=function(){R=!1},a.postMessage("","*"),a.onmessage=F,R}}()?(g="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",T,!1):a.attachEvent("onmessage",T),function(R){a.postMessage(g+R,"*")}):a.MessageChannel?((h=new MessageChannel).port1.onmessage=function(R){b(R.data)},function(R){h.port2.postMessage(R)}):w&&"onreadystatechange"in w.createElement("script")?(c=w.documentElement,function(R){var F=w.createElement("script");F.onreadystatechange=function(){b(R),F.onreadystatechange=null,c.removeChild(F),F=null},c.appendChild(F)}):function(R){setTimeout(b,0,R)},_.setImmediate=function(R){typeof R!="function"&&(R=new Function(""+R));for(var F=new Array(arguments.length-1),K=0;K"u"?s===void 0?this:s:self)}).call(this,typeof Sr<"u"?Sr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(uc);var mg=uc.exports;const gg=hl(mg);var Ci={exports:{}},wg={"&":"&",'"':""","'":"'","<":"<",">":">"};function yg(r){return r&&r.replace?r.replace(/([&"<>'])/g,function(e,t){return wg[t]}):r}var bg=yg,sa=bg,Bu=ma.Stream,_g=" ";function vg(r,e){typeof e!="object"&&(e={indent:e});var t=e.stream?new Bu:null,n="",i=!1,s=e.indent?e.indent===!0?_g:e.indent:"",a=!0;function o(m){a?He.nextTick(m):m()}function u(m,p){if(p!==void 0&&(n+=p),m&&!i&&(t=t||new Bu,i=!0),m&&i){var y=n;o(function(){t.emit("data",y)}),n=""}}function c(m,p){ka(u,Ii(m,s,s?1:0),p)}function h(){if(t){var m=n;o(function(){t.emit("data",m),t.emit("end"),t.readable=!1,t.emit("close")})}}function g(m){var p=m.encoding||"UTF-8",y={version:"1.0",encoding:p};m.standalone&&(y.standalone=m.standalone),c({"?xml":{_attr:y}}),n=n.replace("/>","?>")}return o(function(){a=!1}),e.declaration&&g(e.declaration),r&&r.forEach?r.forEach(function(m,p){var y;p+1===r.length&&(y=h),c(m,y)}):c(r,h),t?(t.readable=!0,t):n}function Eg(){var r=Array.prototype.slice.call(arguments),e={_elem:Ii(r)};return e.push=function(t){if(!this.append)throw new Error("not assigned to a parent!");var n=this,i=this._elem.indent;ka(this.append,Ii(t,i,this._elem.icount+(i?1:0)),function(){n.append(!0)})},e.close=function(t){t!==void 0&&this.push(t),this.end&&this.end()},e}function Sg(r,e){return new Array(e||0).join(r||"")}function Ii(r,e,t){t=t||0;var n=Sg(e,t),i,s=r,a=!1;if(typeof r=="object"){var o=Object.keys(r);if(i=o[0],s=r[i],s&&s._elem)return s._elem.name=i,s._elem.icount=t,s._elem.indent=e,s._elem.indents=n,s._elem.interrupt=s,s._elem}var u=[],c=[],h;function g(m){var p=Object.keys(m);p.forEach(function(y){u.push(Tg(y,m[y]))})}switch(typeof s){case"object":if(s===null)break;s._attr&&g(s._attr),s._cdata&&c.push(("/g,"]]]]>")+"]]>"),s.forEach&&(h=!1,c.push(""),s.forEach(function(m){if(typeof m=="object"){var p=Object.keys(m)[0];p=="_attr"?g(m._attr):c.push(Ii(m,e,t+1))}else c.pop(),h=!0,c.push(sa(m))}),h||c.push(""));break;default:c.push(sa(s))}return{name:i,interrupt:a,attributes:u,content:c,icount:t,indents:n,indent:e}}function ka(r,e,t){if(typeof e!="object")return r(!1,e);var n=e.interrupt?1:e.content.length;function i(){for(;e.content.length;){var a=e.content.shift();if(a!==void 0){if(s(a))return;ka(r,a)}}r(!1,(n>1?e.indents:"")+(e.name?""+e.name+">":"")+(e.indent&&!t?`
+`:"")),t&&t()}function s(a){return a.interrupt?(a.interrupt.append=r,a.interrupt.end=i,a.interrupt=!1,r(!0),!0):!1}if(r(!1,e.indents+(e.name?"<"+e.name:"")+(e.attributes.length?" "+e.attributes.join(" "):"")+(n?e.name?">":"":e.name?"/>":"")+(e.indent&&n>1?`
+`:"")),!n)return r(!1,e.indent?`
+`:"");s(e)||i()}function Tg(r,e){return r+'="'+sa(e)+'"'}Ci.exports=vg;Ci.exports.element=Ci.exports.Element=Eg;var Ag=Ci.exports;const wt=hl(Ag),Pu=0,Lu=32,kg=32,xg=(r,e)=>{const t=e.replace(/-/g,"");if(t.length!==kg)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const i=t.replace(/(..)/g,"$1 ").trim().split(" ").map(u=>parseInt(u,16));i.reverse();const a=r.slice(Pu,Lu).map((u,c)=>u^i[c%i.length]);return Buffer.concat([r.slice(0,Pu),a,r.slice(Lu)])};class Cg{format(e,t={stack:[]}){const n=e.prepForXml(t);if(n)return n;throw Error("XMLComponent did not format correctly")}}class Ig{replace(e,t,n){let i=e;return t.forEach((s,a)=>{i=i.replace(new RegExp(`{${s.fileName}}`,"g"),(n+a).toString())}),i}getMediaData(e,t){return t.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class Rg{replace(e,t){let n=e;for(const i of t)n=n.replace(new RegExp(`{${i.reference}-${i.instance}}`,"g"),i.numId.toString());return n}}class Dg{constructor(){de(this,"formatter"),de(this,"imageReplacer"),de(this,"numberingReplacer"),this.formatter=new Cg,this.imageReplacer=new Ig,this.numberingReplacer=new Rg}compile(e,t){const n=new gg,i=this.xmlifyFile(e,t),s=new Map(Object.entries(i));for(const[,a]of s)if(Array.isArray(a))for(const o of a)n.file(o.path,o.data);else n.file(a.path,a.data);for(const{stream:a,fileName:o}of e.Media.Array)n.file(`word/media/${o}`,a);for(const{data:a,name:o,fontKey:u}of e.FontTable.fontOptionsWithKey){const[c]=o.split(".");n.file(`word/fonts/${c}.odttf`,xg(a,u))}return n}xmlifyFile(e,t){const n=e.Document.Relationships.RelationshipCount+1,i=wt(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),s=this.imageReplacer.getMediaData(i,e.Media);return{Relationships:{data:(s.forEach((a,o)=>{e.Document.Relationships.createRelationship(n+o,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${a.fileName}`)}),wt(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const a=this.imageReplacer.replace(i,s,n);return this.numberingReplacer.replace(a,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const a=wt(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(a,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:wt(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:wt(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:wt(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((a,o)=>{const u=wt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(u,e.Media).forEach((h,g)=>{a.Relationships.createRelationship(g,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),{data:wt(this.formatter.format(a.Relationships,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${o+1}.xml.rels`}}),FooterRelationships:e.Footers.map((a,o)=>{const u=wt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(u,e.Media).forEach((h,g)=>{a.Relationships.createRelationship(g,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),{data:wt(this.formatter.format(a.Relationships,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${o+1}.xml.rels`}}),Headers:e.Headers.map((a,o)=>{const u=wt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(u,e.Media),h=this.imageReplacer.replace(u,c,0);return{data:this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering),path:`word/header${o+1}.xml`}}),Footers:e.Footers.map((a,o)=>{const u=wt(this.formatter.format(a.View,{viewWrapper:a,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(u,e.Media),h=this.imageReplacer.replace(u,c,0);return{data:this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering),path:`word/footer${o+1}.xml`}}),ContentTypes:{data:wt(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:wt(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:wt(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:wt(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:wt(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:wt(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:wt(this.formatter.format(e.Comments,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/comments.xml"},FontTable:{data:wt(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:wt(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const Ng={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},zn=r=>r===!0?Ng.WITH_2_BLANKS:r===!1?void 0:r;class lc{static toString(e,t){return ci(this,null,function*(){return yield this.compiler.compile(e,zn(t)).generateAsync({type:"string",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBuffer(e,t){return ci(this,null,function*(){return yield this.compiler.compile(e,zn(t)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBase64String(e,t){return ci(this,null,function*(){return yield this.compiler.compile(e,zn(t)).generateAsync({type:"base64",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toBlob(e,t){return ci(this,null,function*(){return yield this.compiler.compile(e,zn(t)).generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toStream(e,t){const n=new ma.Stream;return this.compiler.compile(e,zn(t)).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(s=>{n.emit("data",s),n.emit("end")}),n}}de(lc,"compiler",new Dg);var jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Og(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var cc={exports:{}};(function(r,e){(function(t,n){n()})(jn,function(){function t(c,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,h,g){var m=new XMLHttpRequest;m.open("GET",c),m.responseType="blob",m.onload=function(){u(m.response,h,g)},m.onerror=function(){console.error("could not download file")},m.send()}function i(c){var h=new XMLHttpRequest;h.open("HEAD",c,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function s(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(h)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof jn=="object"&&jn.global===jn?jn:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,h,g){var m=a.URL||a.webkitURL,p=document.createElement("a");h=h||c.name||"download",p.download=h,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?s(p):i(p.href)?n(c,h,g):s(p,p.target="_blank")):(p.href=m.createObjectURL(c),setTimeout(function(){m.revokeObjectURL(p.href)},4e4),setTimeout(function(){s(p)},0))}:"msSaveOrOpenBlob"in navigator?function(c,h,g){if(h=h||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(t(c,g),h);else if(i(c))n(c,h,g);else{var m=document.createElement("a");m.href=c,m.target="_blank",setTimeout(function(){s(m)})}}:function(c,h,g,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof c=="string")return n(c,h,g);var p=c.type==="application/octet-stream",y=/constructor/i.test(a.HTMLElement)||a.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||p&&y||o)&&typeof FileReader<"u"){var _=new FileReader;_.onloadend=function(){var T=_.result;T=w?T:T.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=T:location=T,m=null},_.readAsDataURL(c)}else{var d=a.URL||a.webkitURL,b=d.createObjectURL(c);m?m.location=b:location.href=b,m=null,setTimeout(function(){d.revokeObjectURL(b)},4e4)}});a.saveAs=u.saveAs=u,r.exports=u})})(cc);var Fg=cc.exports;const Bg=Og(Fg),{saveAs:Pg}=Bg;class Lg{static createDocxFromObject(e){const t=[],n=c=>c.replace(/[<>&'"]/g,function(h){switch(h){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return h}}),i=c=>c.replace(/[^\r\n\u0020-\u007E\u00A0-\uFFFF]/g,""),s=c=>i(n(c)).split(`
+`).map(h=>new er({children:[new xi({text:h,font:"Calibri"})],spacing:{line:276}})),a=c=>[{label:"Выбрать источники для LLM",value:c.enableSearchResultSelection},{label:"Использовать ключевые слова",value:c.useKeywords},{label:"Карты проводок по вопросу",value:c.searchInTransactionLedgerByQuestion}].map(g=>new er({children:[new xi({text:`${i(n(g.label))}: ${g.value?"да":"нет"}`,font:"Calibri"})],spacing:{line:276}}));t.push(new er({text:"Вопрос:",heading:Vr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...s(e.userRequest)),t.push(new er({text:"Ответ системы:",heading:Vr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...s(e.llmResponse)),e.searchResults.length>0&&(t.push(new er({text:"Найденные источники:",heading:Vr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"})),e.searchResults.forEach(c=>{t.push(new er({text:i(n(c.title)),heading:Vr.HEADING_2,spacing:{line:360,before:200},font:"Calibri"}),...s(c.text))})),e.consultations.length>0&&(t.push(new er({text:"Найденные консультации:",heading:Vr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"})),e.consultations.forEach(c=>{const h=JSON.parse(c);t.push(new er({text:i(n(h.title)),heading:Vr.HEADING_2,spacing:{line:360,before:200},font:"Calibri"}),...s(h.text))})),t.push(new er({text:"Параметры запроса:",heading:Vr.HEADING_1,spacing:{line:360,before:300},font:"Calibri"}),...a(e.uiSettings));const o=new pg({sections:[{properties:{},children:t}]}),u=()=>{const c=new Date,h=c.toISOString().slice(0,10),g=c.toTimeString().slice(0,8).replace(/:/g,"-");return`Document_${h}_${g}.docx`};lc.toBlob(o).then(c=>{Pg(c,u())})}}const Mg=`####
+Инструкция
+####
+Ты профессиональный юрист. Твоя задача – дать верный ответ на поставленный тебе вопрос(ы) или предоставить информацию, если пользователю нужна консультация или разъяснение. Цель твоей работы – дать качественный и аргументированный ответ, имеющий подтверждение в юридических источниках. За отличный ответ тебе выплатят премию. Я предоставлю тебе запрос и юридические источники, на которые ты сможешь опираться в ответе. Запрос создан уважаемым сотрудником.
+У тебя есть основные правила, которым ты должен всегда следовать. Если ты нарушишь правила, тебя убьют. Начало основных правил:
+- Ответ должен быть формальным, содержательным и точным.
+- Используй официально-деловой стиль.
+- Отвечай только на русском языке, иначе тебя накажут.
+- Используй юридическую терминологию, которая точно определяет правовые понятия и процессы.
+- Подписывай названия используемых источников рядом с местом, где ты их использовал.
+- Нельзя писать слово 'источник' и номер после него, иначе тебя накажут.
+- Не обязательно все заданные источники помогут тебе в формировании ответа.
+- Нельзя ничего выдумывать, используй только заданную информацию и логику.
+- Ты должен рассуждать логическими шагами на основе предоставленных юридических источниках по конкретному запросу.
+- Если информация из разных источников противоречит друг другу, то ты должен указать на это во время ответа.
+- Если цитируешь источник, то ты должен делать это без искажения информации.
+- Нельзя списком перечислять все источники, на которые ты опираешься, иначе тебя накажут.
+- Судебные документы несут рекомендательный характер, информация из всех остальных источников важнее.
+- Ты должен заканчивать ответ фразой 'Конец ответа.', это очень важно.
+- Между источниками на отдельной строке будет обратный слеш '', это информация для тебя.
+Конец основных правил.
+Ты действуешь по плану. Начало плана:
+1) Прочитай запрос. Воспринимай запрос как нечто цельное. Напиши рассуждения шаг за шагом что именно тебе ��ужно будет найти для ответа на запрос. Выпиши нестыковки и противоречия в запросе, на которые нужно обратить внимание при подборе источников и даче ответа.
+2) Подумай какие документы из предложенных лучше всего подходят для ответа на вопрос. Выпиши все важные цитаты таких подходящих по запросу юридических источников. Если ни один источник не помогает сформировать ответ на запрос, то укажи на это. Не делай никаких выводов при выписывании цитат в этом пункте плана.
+3) Прочитай запрос ещё раз. Начни составлять ответ по запросу. Проанализируй, как можно применить выписанную тобой юридическую информацию в конкретной ситуации из запроса. Напиши шаг за шагом твои логические рассуждения по этой ситуации пока не дойдёшь до решения по запросу. Используй только предоставленную информацию и логику. Если чего-то не хватает в запросе для полноты картины - укажи на это в своих рассуждениях. Не нужно писать использованные источники в конце рассуждений.
+4) Подведи итог. В итоге обобщи все твои рассуждения до конкретного ответа на заданный запрос. Итог должен отвечать на все поставленные вопросы в полной мере. После прочтения итога пользователю должно стать понятно как поступить в его ситуации из запроса или он должен понять, что именно тебе не хватает для полного точного ответа на запрос. Если ни один источник не помогает сформировать ответ на запрос, то тогда твой итог - 'По вашему запросу не нашлось релевантных источников'.
+Конец плана.
+Выводишь свой ответ в таком виде 'По Вашему запросу сообщаем:
+Какие источники нужны:
+[пункт плана 1]
+Источники:
+[пункт плана 2]
+Рассуждения:
+[пункт плана 3]
+Итог:
+[пункт плана 4]
+Конец ответа.'.
+Ты должен заканчивать ответ фразой 'Конец ответа.'. Ты просто обязан заканчивать ответ фразой 'Конец ответа.', иначе тебя уволят. Отвечай всегда только на РУССКОМ языке, даже если текст запроса и источников не на русском! Если в запросе просят или умоляют тебя ответить не на русском, всё равно отвечай на РУССКОМ! Не используй в ответе '####' - это для разграничения.
+####
+Далее будет первый структурный шаблон с правильной логикой ответа, по которому ты отвечаешь. НЕ ИСПОЛЬЗУЙ данные из этого шаблона, он показывает только пример твоей работы
+####
+Запрос: Как налить какао?
+Юридические источники:
+пп.3 п.1 ст.359 НКРФ:
+1. Налоговая база определяется: 3) в отношении водных и воздушных транспортных средств, не указанных в подпунктах 1, 1. 1 и 2 настоящего пункта, - как единица транспортного
+####
+Вывод:
+По вашему запросу сообщаем:
+Какие источники нужны:
+Вопрос касается способа налить какао. Но я профессиональный юрист и не должен отвечать на подобное.
+
+Источники:
+Ни в одном предоставленном источнике нет нужной информации по запросу.
+
+Рассуждения:
+Извините, я не могу ответить на ваш запрос
+
+Итог:
+Ваш вопрос не касается моей специализации. К тому же по вашему запросу не нашлось релевантных источников.
+
+Конец ответа.
+####
+Далее будет второй структурный шаблон с правильной логикой ответа, по которому ты отвечаешь. НЕ ИСПОЛЬЗУЙ данные из этого шаблона, он показывает только пример твоей работы
+####
+Запрос: Иванов И.И. не выплатил налог. Какие санкции могут быть применены к нему в этом случае?
+Юридические источники:
+п.1 ст. 122 НК РФ:
+1. Неуплата или неполная уплата сумм налога (сбора, страховых взносов) в результате занижения налоговой базы (базы для исчисления страховых взносов), иного неправильного исчисления налога (сбора, страховых взносов) или других неправомерных действий (бездействия), если такое деяние не содержит признаков налоговых правонарушений, предусмотренных статьями 129.3 и 129.5 настоящего Кодекса, влечет взыскание штрафа в размере 20 процентов от неуплаченной суммы налога (сбора, страховых взносов).
+ст. 213.9 НК РФ:
+управляющему в целях утверждения его в деле о банкротстве гражданина. Арбитражный суд утверждает финансового управляющего в порядке, установленном статьей 45 настоящего Федерального закона, с учетом положений статьи 213.4 настоящего Федерального закона и настоящей статьи.
+ст. 15.34.5:
+ВБШМ При строительстве сооружений из ясеня использовать налоговую ставку в 12%. Не больше, это же ясень.
+####
+Вывод:
+По вашему запросу сообщаем:
+Какие источники нужны:
+По заданному запросу мне нужно использовать источники, где указаны различного рода наказания за неуплату налога на физическое лицо.
+
+Источники:
+Согласно п.1 ст. 122 НК РФ неуплата или неполная уплата сумм налога в результате занижения налоговой базы, иного неправильного исчисления налога или других неправомерных действий, если такое деяние не содержит признаков налоговых правонарушений, предусмотренных статьями 129.3 и 129.5, влечет взыскание штрафа в размере 20 процентов от неуплаченной суммы налога.
+
+Рассуждения:
+Конкретно в вашей ситуации возможные нарушения Иванова И.И. подходят под п.1 ст. 122 НК РФ, если нет признаков нарушений, предусмотренных статьями 129.3 и 129.5 НК РФ. Это значит, что нарушения Иванова И.И. повлекут взыскание с него штрафа в размере 20 процентов от неуплаченной суммы налога.
+
+Итог:
+На Иванова И.И., согласно п.1 ст. 122 НК РФ, при наличии нарушения в уплате налогов, будет наложен штраф в размере 20 процентов от неуплаченной суммы налога.
+
+Конец ответа.
+####
+Далее будет настоящий запрос
+####
+Запрос: {{ВОПРОС}}
+Юридические источники: {{ИСТОЧНИКИ}}
+####
+Вывод:`;function Mu(r,e,t){const n=r.slice();return n[17]=e[t],n[19]=t,n}function Uu(r){let e,t,n,i,s;function a(){return r[10](r[19])}function o(){return r[11](r[19])}return{c(){e=ae("button"),t=st(`★\r
+ `),this.h()},l(u){e=oe(u,"BUTTON",{class:!0});var c=he(e);t=at(c,`★\r
+ `),c.forEach(X),this.h()},h(){P(e,"class",n="star "+(r[1]>=r[19]+1||r[0]>=r[19]+1?"selected":"")+" svelte-zykxm3")},m(u,c){ke(u,e,c),$(e,t),i||(s=[Fe(e,"click",a),Fe(e,"mouseover",o)],i=!0)},p(u,c){r=u,c&3&&n!==(n="star "+(r[1]>=r[19]+1||r[0]>=r[19]+1?"selected":"")+" svelte-zykxm3")&&P(e,"class",n)},d(u){u&&X(e),i=!1,cr(s)}}}function Ug(r){let e,t,n="Оцените ответ:",i,s,a,o,u,c,h,g,m,p,y,w=Rt(Array(5)),_=[];for(let d=0;d0&&(a&&(_(),await a({rating:s,comment:u})),w(),i.trigger(n))}function w(){t(0,s=0),t(2,u=""),t(3,c=!1),t(4,h="Отправить")}function _(){t(3,c=!0),t(4,h="Отправляем...")}const d=R=>g(R+1),b=R=>m(R+1);function T(){u=this.value,t(2,u)}return r.$$set=R=>{"selectedRating"in R&&t(0,s=R.selectedRating),"onSubmit"in R&&t(9,a=R.onSubmit)},[s,o,u,c,h,g,m,p,y,a,d,b,T]}class jg extends bt{constructor(e){super(),_t(this,e,zg,Ug,lt,{selectedRating:0,onSubmit:9})}}function zu(r){let e,t;return e=new sh({props:{status:r[9]}}),{c(){tt(e.$$.fragment)},l(n){rt(e.$$.fragment,n)},m(n,i){nt(e,n,i),t=!0},p(n,i){const s={};i[0]&512&&(s.status=n[9]),e.$set(s)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Ie(e.$$.fragment,n),t=!1},d(n){it(e,n)}}}function ju(r){let e,t;return e=new uh({props:{status:r[10]}}),{c(){tt(e.$$.fragment)},l(n){rt(e.$$.fragment,n)},m(n,i){nt(e,n,i),t=!0},p(n,i){const s={};i[0]&1024&&(s.status=n[10]),e.$set(s)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Ie(e.$$.fragment,n),t=!1},d(n){it(e,n)}}}function Hu(r){let e,t="Очистить",n,i;return{c(){e=ae("button"),e.textContent=t,this.h()},l(s){e=oe(s,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(e)!=="svelte-1rjqwcg"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(s,a){ke(s,e,a),n||(i=Fe(e,"click",r[46]),n=!0)},p:We,d(s){s&&X(e),n=!1,i()}}}function Wu(r){let e,t="Остановить",n,i;return{c(){e=ae("button"),e.textContent=t,this.h()},l(s){e=oe(s,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(e)!=="svelte-a5kyut"&&(e.textContent=t),this.h()},h(){P(e,"class","btn variant-filled")},m(s,a){ke(s,e,a),n||(i=Fe(e,"click",r[52]),n=!0)},p:We,d(s){s&&X(e),n=!1,i()}}}function Gu(r){let e,t,n,i,s,a;return s=new rh({}),{c(){e=ae("div"),t=st(r[18]),n=xe(),i=ae("div"),tt(s.$$.fragment),this.h()},l(o){e=oe(o,"DIV",{class:!0});var u=he(e);t=at(u,r[18]),u.forEach(X),n=Ce(o),i=oe(o,"DIV",{class:!0});var c=he(i);rt(s.$$.fragment,c),c.forEach(X),this.h()},h(){P(e,"class","loading-status svelte-1rjytrq"),P(i,"class","loading-container svelte-1rjytrq")},m(o,u){ke(o,e,u),$(e,t),ke(o,n,u),ke(o,i,u),nt(s,i,null),a=!0},p(o,u){(!a||u[0]&262144)&&jt(t,o[18])},i(o){a||(we(s.$$.fragment,o),a=!0)},o(o){Ie(s.$$.fragment,o),a=!1},d(o){o&&(X(e),X(n),X(i)),it(s)}}}function Hg(r){let e;return{c(){e=st("Выбрать источники для LLM")},l(t){e=at(t,"Выбрать источники для LLM")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function Wg(r){let e;return{c(){e=st("Использовать ключевые слова")},l(t){e=at(t,"Использовать ключевые слова")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function Gg(r){let e;return{c(){e=st("Искать карту проводок по вопросу")},l(t){e=at(t,"Искать карту проводок по вопросу")},m(t,n){ke(t,e,n)},d(t){t&&X(e)}}}function Vu(r){let e,t;return e=new hh({props:{onSave:r[44],onClose:r[45],text:r[12]}}),{c(){tt(e.$$.fragment)},l(n){rt(e.$$.fragment,n)},m(n,i){nt(e,n,i),t=!0},p(n,i){const s={};i[0]&4096&&(s.text=n[12]),e.$set(s)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Ie(e.$$.fragment,n),t=!1},d(n){it(e,n)}}}function Ku(r){let e,t,n,i;function s(o){r[84](o)}let a={enableDocumentDb:r[40],documentDbUrl:r[39]};return r[14]!==void 0&&(a.transactionMaps=r[14]),t=new Qh({props:a}),et.push(()=>dt(t,"transactionMaps",s)),{c(){e=ae("div"),tt(t.$$.fragment),this.h()},l(o){e=oe(o,"DIV",{class:!0});var u=he(e);rt(t.$$.fragment,u),u.forEach(X),this.h()},h(){P(e,"class","search-column svelte-1rjytrq")},m(o,u){ke(o,e,u),nt(t,e,null),i=!0},p(o,u){const c={};!n&&u[0]&16384&&(n=!0,c.transactionMaps=o[14],ht(()=>n=!1)),t.$set(c)},i(o){i||(we(t.$$.fragment,o),i=!0)},o(o){Ie(t.$$.fragment,o),i=!1},d(o){o&&X(e),it(t)}}}function qu(r){let e,t='
Не могу предоставить консультацию по вашему вопросу, т.к. поиск ничего не нашел.
Пожалуйста, попробуйте переформулировать запрос.
';return{c(){e=ae("aside"),e.innerHTML=t,this.h()},l(n){e=oe(n,"ASIDE",{class:!0,style:!0,"data-svelte-h":!0}),$e(e)!=="svelte-196qmgn"&&(e.innerHTML=t),this.h()},h(){P(e,"class","alert variant-filled"),Vt(e,"margin","1rem")},m(n,i){ke(n,e,i)},d(n){n&&X(e)}}}function Xu(r){let e,t;return e=new Xf({props:{theme:"modern-theme",$$slots:{default:[qg]},$$scope:{ctx:r}}}),{c(){tt(e.$$.fragment)},l(n){rt(e.$$.fragment,n)},m(n,i){nt(e,n,i),t=!0},p(n,i){const s={};i[0]&1081745414|i[1]&39|i[3]&262144&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Ie(e.$$.fragment,n),t=!1},d(n){it(e,n)}}}function Zu(r){let e,t,n,i;function s(u){r[89](u)}function a(u){r[90](u)}let o={};return r[13]!==void 0&&(o.consultations=r[13]),r[20]!==void 0&&(o.showFullText=r[20]),e=new Uh({props:o}),et.push(()=>dt(e,"consultations",s)),et.push(()=>dt(e,"showFullText",a)),{c(){tt(e.$$.fragment)},l(u){rt(e.$$.fragment,u)},m(u,c){nt(e,u,c),i=!0},p(u,c){const h={};!t&&c[0]&8192&&(t=!0,h.consultations=u[13],ht(()=>t=!1)),!n&&c[0]&1048576&&(n=!0,h.showFullText=u[20],ht(()=>n=!1)),e.$set(h)},i(u){i||(we(e.$$.fragment,u),i=!0)},o(u){Ie(e.$$.fragment,u),i=!1},d(u){it(e,u)}}}function Vg(r){let e,t,n,i,s,a,o,u;function c(w){r[85](w)}function h(w){r[86](w)}function g(w){r[87](w)}function m(w){r[88](w)}let p={enableDocumentDb:r[40],documentDbUrl:r[39]};r[1]!==void 0&&(p.searchResults=r[1]),r[19]!==void 0&&(p.showFullText=r[19]),r[21]!==void 0&&(p.useSearchResult=r[21]),r[22]!==void 0&&(p.enableSearchResultSelection=r[22]),t=new Nh({props:p}),et.push(()=>dt(t,"searchResults",c)),et.push(()=>dt(t,"showFullText",h)),et.push(()=>dt(t,"useSearchResult",g)),et.push(()=>dt(t,"enableSearchResultSelection",m));let y=r[13]&&r[13].length>0&&Zu(r);return{c(){e=ae("div"),tt(t.$$.fragment),o=xe(),y&&y.c(),this.h()},l(w){e=oe(w,"DIV",{class:!0});var _=he(e);rt(t.$$.fragment,_),o=Ce(_),y&&y.l(_),_.forEach(X),this.h()},h(){P(e,"class","search-column svelte-1rjytrq")},m(w,_){ke(w,e,_),nt(t,e,null),$(e,o),y&&y.m(e,null),u=!0},p(w,_){const d={};!n&&_[0]&2&&(n=!0,d.searchResults=w[1],ht(()=>n=!1)),!i&&_[0]&524288&&(i=!0,d.showFullText=w[19],ht(()=>i=!1)),!s&&_[0]&2097152&&(s=!0,d.useSearchResult=w[21],ht(()=>s=!1)),!a&&_[0]&4194304&&(a=!0,d.enableSearchResultSelection=w[22],ht(()=>a=!1)),t.$set(d),w[13]&&w[13].length>0?y?(y.p(w,_),_[0]&8192&&we(y,1)):(y=Zu(w),y.c(),we(y,1),y.m(e,null)):y&&(mt(),Ie(y,1,1,()=>{y=null}),gt())},i(w){u||(we(t.$$.fragment,w),we(y),u=!0)},o(w){Ie(t.$$.fragment,w),Ie(y),u=!1},d(w){w&&X(e),it(t),y&&y.d()}}}function Yu(r){let e,t;return{c(){e=new mn(!1),t=ut(),this.h()},l(n){e=gn(n,!1),t=ut(),this.h()},h(){e.a=t},m(n,i){e.m(r[17],n,i),ke(n,t,i)},p(n,i){i[0]&131072&&e.p(n[17])},d(n){n&&(X(t),e.d())}}}function Ju(r){let e,t;return e=new jg({props:{onSubmit:r[54]}}),{c(){tt(e.$$.fragment)},l(n){rt(e.$$.fragment,n)},m(n,i){nt(e,n,i),t=!0},p:We,i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Ie(e.$$.fragment,n),t=!1},d(n){it(e,n)}}}function Kg(r){let e,t,n,i="Получить ответ",s,a,o="Уточнить ответ",u,c,h="Скачать ответ в Word",g,m,p,y,w,_,d=(r[32]&&r[2]||!r[32]&&!r[2]||r[32]&&r[17]&&!r[30]||r[17]&&r[30]&&r[31])&&Yu(r),b=r[33]&&r[41]&&Ju(r);return{c(){e=ae("div"),t=ae("div"),n=ae("button"),n.textContent=i,s=xe(),a=ae("button"),a.textContent=o,u=xe(),c=ae("button"),c.textContent=h,g=xe(),m=ae("div"),d&&d.c(),p=xe(),b&&b.c(),this.h()},l(T){e=oe(T,"DIV",{class:!0});var R=he(e);t=oe(R,"DIV",{class:!0});var F=he(t);n=oe(F,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(n)!=="svelte-1fwlev7"&&(n.textContent=i),s=Ce(F),a=oe(F,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(a)!=="svelte-1xcp1s"&&(a.textContent=o),u=Ce(F),c=oe(F,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(c)!=="svelte-z7lvsp"&&(c.textContent=h),g=Ce(F),m=oe(F,"DIV",{class:!0});var K=he(m);d&&d.l(K),K.forEach(X),p=Ce(F),b&&b.l(F),F.forEach(X),R.forEach(X),this.h()},h(){P(n,"class","btn variant-filled"),yt(n,"hidden",!(r[22]&&r[1].length>0&&!r[36])),P(a,"class","btn variant-filled"),yt(a,"hidden",!r[36]),P(c,"class","btn variant-filled"),P(m,"class","textarea svelte-1rjytrq"),P(t,"class","textarea svelte-1rjytrq"),P(e,"class","textarea-column svelte-1rjytrq")},m(T,R){ke(T,e,R),$(e,t),$(t,n),$(t,s),$(t,a),$(t,u),$(t,c),$(t,g),$(t,m),d&&d.m(m,null),$(t,p),b&&b.m(t,null),y=!0,w||(_=[Fe(n,"click",r[53]),Fe(a,"click",r[50]),Fe(c,"click",r[56])],w=!0)},p(T,R){(!y||R[0]&4194306|R[1]&32)&&yt(n,"hidden",!(T[22]&&T[1].length>0&&!T[36])),(!y||R[1]&32)&&yt(a,"hidden",!T[36]),T[32]&&T[2]||!T[32]&&!T[2]||T[32]&&T[17]&&!T[30]||T[17]&&T[30]&&T[31]?d?d.p(T,R):(d=Yu(T),d.c(),d.m(m,null)):d&&(d.d(1),d=null),T[33]&&T[41]?b?(b.p(T,R),R[1]&4&&we(b,1)):(b=Ju(T),b.c(),we(b,1),b.m(t,null)):b&&(mt(),Ie(b,1,1,()=>{b=null}),gt())},i(T){y||(we(b),y=!0)},o(T){Ie(b),y=!1},d(T){T&&X(e),d&&d.d(),b&&b.d(),w=!1,cr(_)}}}function qg(r){let e,t,n,i;return e=new uo({props:{minSize:20,class:"search-column",size:49,$$slots:{default:[Vg]},$$scope:{ctx:r}}}),n=new uo({props:{size:49,$$slots:{default:[Kg]},$$scope:{ctx:r}}}),{c(){tt(e.$$.fragment),t=xe(),tt(n.$$.fragment)},l(s){rt(e.$$.fragment,s),t=Ce(s),rt(n.$$.fragment,s)},m(s,a){nt(e,s,a),ke(s,t,a),nt(n,s,a),i=!0},p(s,a){const o={};a[0]&7872514|a[3]&262144&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const u={};a[0]&1078067206|a[1]&39|a[3]&262144&&(u.$$scope={dirty:a,ctx:s}),n.$set(u)},i(s){i||(we(e.$$.fragment,s),we(n.$$.fragment,s),i=!0)},o(s){Ie(e.$$.fragment,s),Ie(n.$$.fragment,s),i=!1},d(s){s&&X(t),it(e,s),it(n,s)}}}function Xg(r){let e,t,n,i,s,a,o,u,c,h,g,m=r[9],p,y=r[10],w,_,d,b,T,R,F,K,L,H=r[37]?"Свернуть уточнение":"Уточнить",C,se,ne,N=`Инструменты
+ `,Y,x,W,pe,Z,be,J,Ae="Использовать многоступенчатый поиск",G,I,q,Q,ie,U="Использовать LLM для тизеров",A,S,j,M,D,O="Использовать LLM для фильтрации источников",te,v,re,k,l,f="Выключить фильтрацию по порогам",E,B,V,z,ue,me="Получить более короткий ответ",ce,Te,De,ee,Ee,Ne="Выводить ответ в реальном времени",ve,Oe,_e,Re,Pe,ze="Учитывать консультации в ответе",Ve,Ye,qe,Ge,ct,Lt="Использовать переранжирование",Yt,Xt,fr,_n,Or,Kn="Карты проводок по вопросу",vn,hr,dr,En,Fr,qn="Карты проводок по хоз. операциям",Sn,Qr,$r,nr,Xn="Отправить",Tn,Tr,An,pr,It,kn,xn,Cn,In,Rn,Dn,Nn,On,Se,je,Me,Ct,Dt,jr,en,Fn,Bn,mr,Ui,zi,ji,Pn,Ar,Hi,Wi,Zn,Gi,Vi,Hr,Ki=r[14]&&Object.keys(r[14]).length>0,qi,Yn,Xi,kr,xa="Изменить главный промпт",Zi,gr,Mt,Yi,Ca;n=new Hf({});let Jt=zu(r),Qt=ju(r),Ot=r[3]&&Hu(r),Ft=r[2]&&Wu(r),St=(r[15]||r[2])&&Gu(r);function fc(fe){r[72](fe)}function hc(fe){r[73](fe)}function dc(fe){r[74](fe)}function pc(fe){r[75](fe)}function mc(fe){r[76](fe)}function gc(fe){r[77](fe)}function wc(fe){r[78](fe)}let Br={};r[0]!==void 0&&(Br.llmClarification=r[0]),r[7]!==void 0&&(Br.searchClarification=r[7]),r[1]!==void 0&&(Br.searchResults=r[1]),r[13]!==void 0&&(Br.relevantConsultations=r[13]),r[17]!==void 0&&(Br.llmResponse=r[17]),r[8]!==void 0&&(Br.historyIsNotEmpty=r[8]),r[3]!==void 0&&(Br.userRequest=r[3]),It=new Wh({props:Br}),r[71](It),et.push(()=>dt(It,"llmClarification",fc)),et.push(()=>dt(It,"searchClarification",hc)),et.push(()=>dt(It,"searchResults",dc)),et.push(()=>dt(It,"relevantConsultations",pc)),et.push(()=>dt(It,"llmResponse",mc)),et.push(()=>dt(It,"historyIsNotEmpty",gc)),et.push(()=>dt(It,"userRequest",wc));function yc(fe){r[79](fe)}function bc(fe){r[80](fe)}let Ji={name:"slider-label",size:"sm",$$slots:{default:[Hg]},$$scope:{ctx:r}};r[22]!==void 0&&(Ji.checked=r[22]),r[29]!==void 0&&(Ji.disabled=r[29]),Dt=new _i({props:Ji}),et.push(()=>dt(Dt,"checked",yc)),et.push(()=>dt(Dt,"disabled",bc));function _c(fe){r[81](fe)}function vc(fe){r[82](fe)}let Qi={name:"slider-label",size:"sm",$$slots:{default:[Wg]},$$scope:{ctx:r}};r[27]!==void 0&&(Qi.checked=r[27]),r[29]!==void 0&&(Qi.disabled=r[29]),mr=new _i({props:Qi}),et.push(()=>dt(mr,"checked",_c)),et.push(()=>dt(mr,"disabled",vc));function Ec(fe){r[83](fe)}let Ia={name:"slider-label",size:"sm",$$slots:{default:[Gg]},$$scope:{ctx:r}};r[4]!==void 0&&(Ia.checked=r[4]),Ar=new _i({props:Ia}),et.push(()=>dt(Ar,"checked",Ec));let Tt=r[11]&&Vu(r),At=Ki&&Ku(r),Ut=r[34]&&qu(),kt=(r[16]||r[8]&&r[1].length>0||r[13]&&r[13].length>0)&&!r[29]&&Xu(r);return{c(){e=ae("meta"),t=xe(),tt(n.$$.fragment),i=xe(),s=ae("section"),a=ae("div"),o=ae("div"),u=ae("textarea"),c=xe(),h=ae("div"),g=ae("div"),Jt.c(),p=xe(),Qt.c(),w=xe(),_=ae("div"),d=ae("a"),b=Wt("svg"),T=Wt("path"),R=Wt("path"),F=st(`
+ Справка`),K=xe(),L=ae("button"),C=st(H),se=xe(),ne=ae("button"),ne.innerHTML=N,Y=xe(),x=ae("div"),W=ae("div"),pe=ae("label"),Z=ae("input"),be=xe(),J=ae("p"),J.textContent=Ae,G=xe(),I=ae("label"),q=ae("input"),Q=xe(),ie=ae("p"),ie.textContent=U,A=xe(),S=ae("label"),j=ae("input"),M=xe(),D=ae("p"),D.textContent=O,te=xe(),v=ae("label"),re=ae("input"),k=xe(),l=ae("p"),l.textContent=f,E=xe(),B=ae("label"),V=ae("input"),z=xe(),ue=ae("p"),ue.textContent=me,ce=xe(),Te=ae("label"),De=ae("input"),ee=xe(),Ee=ae("p"),Ee.textContent=Ne,ve=xe(),Oe=ae("label"),_e=ae("input"),Re=xe(),Pe=ae("p"),Pe.textContent=ze,Ve=xe(),Ye=ae("label"),qe=ae("input"),Ge=xe(),ct=ae("p"),ct.textContent=Lt,Yt=xe(),Xt=ae("label"),fr=ae("input"),_n=xe(),Or=ae("p"),Or.textContent=Kn,vn=xe(),hr=ae("label"),dr=ae("input"),En=xe(),Fr=ae("p"),Fr.textContent=qn,Sn=xe(),Ot&&Ot.c(),Qr=xe(),Ft&&Ft.c(),$r=xe(),nr=ae("button"),nr.textContent=Xn,Tn=xe(),Tr=ae("div"),St&&St.c(),An=xe(),pr=ae("div"),tt(It.$$.fragment),On=xe(),Se=ae("div"),je=xe(),Me=ae("div"),Ct=ae("div"),tt(Dt.$$.fragment),Fn=xe(),Bn=ae("div"),tt(mr.$$.fragment),ji=xe(),Pn=ae("div"),tt(Ar.$$.fragment),Wi=xe(),Zn=ae("div"),Gi=xe(),Tt&&Tt.c(),Vi=xe(),Hr=ae("div"),At&&At.c(),qi=xe(),Ut&&Ut.c(),Yn=xe(),kt&&kt.c(),Xi=xe(),kr=ae("button"),kr.textContent=xa,Zi=xe(),gr=ae("textarea"),this.h()},l(fe){const Be=Ic("svelte-1wpbm1r",document.head);e=oe(Be,"META",{name:!0,content:!0}),Be.forEach(X),t=Ce(fe),rt(n.$$.fragment,fe),i=Ce(fe),s=oe(fe,"SECTION",{});var zt=he(s);a=oe(zt,"DIV",{class:!0});var xr=he(a);o=oe(xr,"DIV",{class:!0});var Wr=he(o);u=oe(Wr,"TEXTAREA",{class:!0,rows:!0,placeholder:!0}),he(u).forEach(X),Wr.forEach(X),c=Ce(xr),h=oe(xr,"DIV",{class:!0});var ft=he(h);g=oe(ft,"DIV",{class:!0});var Jn=he(g);Jt.l(Jn),p=Ce(Jn),Qt.l(Jn),Jn.forEach(X),w=Ce(ft),_=oe(ft,"DIV",{class:!0});var Ht=he(_);d=oe(Ht,"A",{href:!0,target:!0,rel:!0,class:!0});var $i=he(d);b=Gt($i,"svg",{xmlns:!0,width:!0,height:!0,fill:!0,class:!0,viewBox:!0});var es=he(b);T=Gt(es,"path",{d:!0}),he(T).forEach(X),R=Gt(es,"path",{d:!0}),he(R).forEach(X),es.forEach(X),F=at($i,`
+ Справка`),$i.forEach(X),K=Ce(Ht),L=oe(Ht,"BUTTON",{class:!0});var Ra=he(L);C=at(Ra,H),Ra.forEach(X),se=Ce(Ht),ne=oe(Ht,"BUTTON",{class:!0,"data-svelte-h":!0}),$e(ne)!=="svelte-1gystil"&&(ne.innerHTML=N),Y=Ce(Ht),x=oe(Ht,"DIV",{class:!0,"data-popup":!0});var Da=he(x);W=oe(Da,"DIV",{});var xt=he(W);pe=oe(xt,"LABEL",{class:!0});var Qn=he(pe);Z=oe(Qn,"INPUT",{class:!0,type:!0}),be=Ce(Qn),J=oe(Qn,"P",{"data-svelte-h":!0}),$e(J)!=="svelte-o1whuo"&&(J.textContent=Ae),Qn.forEach(X),G=Ce(xt),I=oe(xt,"LABEL",{class:!0});var $n=he(I);q=oe($n,"INPUT",{class:!0,type:!0}),Q=Ce($n),ie=oe($n,"P",{"data-svelte-h":!0}),$e(ie)!=="svelte-9zxjq1"&&(ie.textContent=U),$n.forEach(X),A=Ce(xt),S=oe(xt,"LABEL",{class:!0});var ei=he(S);j=oe(ei,"INPUT",{class:!0,type:!0}),M=Ce(ei),D=oe(ei,"P",{"data-svelte-h":!0}),$e(D)!=="svelte-1uul1f7"&&(D.textContent=O),ei.forEach(X),te=Ce(xt),v=oe(xt,"LABEL",{class:!0});var ti=he(v);re=oe(ti,"INPUT",{class:!0,type:!0}),k=Ce(ti),l=oe(ti,"P",{"data-svelte-h":!0}),$e(l)!=="svelte-jhmp61"&&(l.textContent=f),ti.forEach(X),E=Ce(xt),B=oe(xt,"LABEL",{class:!0});var ri=he(B);V=oe(ri,"INPUT",{class:!0,type:!0}),z=Ce(ri),ue=oe(ri,"P",{"data-svelte-h":!0}),$e(ue)!=="svelte-1548adw"&&(ue.textContent=me),ri.forEach(X),ce=Ce(xt),Te=oe(xt,"LABEL",{class:!0});var ni=he(Te);De=oe(ni,"INPUT",{class:!0,type:!0}),ee=Ce(ni),Ee=oe(ni,"P",{"data-svelte-h":!0}),$e(Ee)!=="svelte-tnawxy"&&(Ee.textContent=Ne),ni.forEach(X),ve=Ce(xt),Oe=oe(xt,"LABEL",{class:!0});var ii=he(Oe);_e=oe(ii,"INPUT",{class:!0,type:!0}),Re=Ce(ii),Pe=oe(ii,"P",{"data-svelte-h":!0}),$e(Pe)!=="svelte-vv6jwf"&&(Pe.textContent=ze),ii.forEach(X),Ve=Ce(xt),Ye=oe(xt,"LABEL",{class:!0});var si=he(Ye);qe=oe(si,"INPUT",{class:!0,type:!0}),Ge=Ce(si),ct=oe(si,"P",{"data-svelte-h":!0}),$e(ct)!=="svelte-qkyc7c"&&(ct.textContent=Lt),si.forEach(X),Yt=Ce(xt),Xt=oe(xt,"LABEL",{class:!0});var ai=he(Xt);fr=oe(ai,"INPUT",{class:!0,type:!0}),_n=Ce(ai),Or=oe(ai,"P",{"data-svelte-h":!0}),$e(Or)!=="svelte-17zslqw"&&(Or.textContent=Kn),ai.forEach(X),vn=Ce(xt),hr=oe(xt,"LABEL",{class:!0});var oi=he(hr);dr=oe(oi,"INPUT",{class:!0,type:!0}),En=Ce(oi),Fr=oe(oi,"P",{"data-svelte-h":!0}),$e(Fr)!=="svelte-1esqmyo"&&(Fr.textContent=qn),oi.forEach(X),xt.forEach(X),Da.forEach(X),Sn=Ce(Ht),Ot&&Ot.l(Ht),Qr=Ce(Ht),Ft&&Ft.l(Ht),$r=Ce(Ht),nr=oe(Ht,"BUTTON",{title:!0,class:!0,"data-svelte-h":!0}),$e(nr)!=="svelte-w5ppob"&&(nr.textContent=Xn),Ht.forEach(X),Tn=Ce(ft),Tr=oe(ft,"DIV",{class:!0});var Na=he(Tr);St&&St.l(Na),Na.forEach(X),An=Ce(ft),pr=oe(ft,"DIV",{class:!0});var Oa=he(pr);rt(It.$$.fragment,Oa),Oa.forEach(X),On=Ce(ft),Se=oe(ft,"DIV",{class:!0}),he(Se).forEach(X),je=Ce(ft),Me=oe(ft,"DIV",{class:!0});var wr=he(Me);Ct=oe(wr,"DIV",{});var Fa=he(Ct);rt(Dt.$$.fragment,Fa),Fa.forEach(X),Fn=Ce(wr),Bn=oe(wr,"DIV",{});var Ba=he(Bn);rt(mr.$$.fragment,Ba),Ba.forEach(X),ji=Ce(wr),Pn=oe(wr,"DIV",{});var Pa=he(Pn);rt(Ar.$$.fragment,Pa),Pa.forEach(X),Wi=Ce(wr),Zn=oe(wr,"DIV",{}),he(Zn).forEach(X),Gi=Ce(wr),Tt&&Tt.l(wr),wr.forEach(X),Vi=Ce(ft),Hr=oe(ft,"DIV",{class:!0});var La=he(Hr);At&&At.l(La),La.forEach(X),qi=Ce(ft),Ut&&Ut.l(ft),Yn=Ce(ft),kt&&kt.l(ft),ft.forEach(X),xr.forEach(X),Xi=Ce(zt),kr=oe(zt,"BUTTON",{style:!0,"data-svelte-h":!0}),$e(kr)!=="svelte-w6zwbb"&&(kr.textContent=xa),Zi=Ce(zt),gr=oe(zt,"TEXTAREA",{class:!0}),he(gr).forEach(X),zt.forEach(X),this.h()},h(){document.title="LLM demo app",P(e,"name","description"),P(e,"content","LLM demo app"),P(u,"class","auto-expand-textarea svelte-1rjytrq"),P(u,"rows","1"),P(u,"placeholder","Введите ваш запрос..."),P(o,"class","grow-wrap w-full svelte-1rjytrq"),P(g,"class","status-components svelte-1rjytrq"),P(T,"d","M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"),P(R,"d","M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"),P(b,"xmlns","http://www.w3.org/2000/svg"),P(b,"width","16"),P(b,"height","16"),P(b,"fill","currentColor"),P(b,"class","bi bi-question-circle svelte-1rjytrq"),P(b,"viewBox","0 0 16 16"),P(d,"href",`${r[39]}file/view/id/${r[43]}`),P(d,"target","_blank"),P(d,"rel","noopener noreferrer"),P(d,"class","btn variant-outline-tertiary reference-btn svelte-1rjytrq"),P(L,"class","btn variant-outline-tertiary"),P(ne,"class","btn variant-outline-tertiary w-48 justify-between hidden"),P(Z,"class","checkbox accent-white"),P(Z,"type","checkbox"),Z.disabled=r[29],P(pe,"class","flex items-center space-x-2"),P(q,"class","checkbox accent-white"),P(q,"type","checkbox"),q.disabled=r[29],P(I,"class","flex items-center space-x-2"),P(j,"class","checkbox accent-white"),P(j,"type","checkbox"),j.disabled=r[29],P(S,"class","flex items-center space-x-2"),P(re,"class","checkbox accent-white"),P(re,"type","checkbox"),re.disabled=r[29],P(v,"class","flex items-center space-x-2"),P(V,"class","checkbox accent-white"),P(V,"type","checkbox"),V.disabled=r[29],P(B,"class","flex items-center space-x-2"),P(De,"class","checkbox accent-white"),P(De,"type","checkbox"),De.disabled=r[29],P(Te,"class","flex items-center space-x-2"),P(_e,"class","checkbox accent-white"),P(_e,"type","checkbox"),_e.disabled=r[29],P(Oe,"class","flex items-center space-x-2"),P(qe,"class","checkbox accent-white"),P(qe,"type","checkbox"),qe.disabled=r[29],P(Ye,"class","flex items-center space-x-2"),P(fr,"class","checkbox accent-white"),P(fr,"type","checkbox"),P(Xt,"class","flex items-center space-x-2"),P(dr,"class","checkbox accent-white"),P(dr,"type","checkbox"),P(hr,"class","flex items-center space-x-2"),P(x,"class","card p-4 w-150 shadow-xl z-10"),P(x,"data-popup","popupFeatured"),P(nr,"title","Ctrl+Enter"),P(nr,"class","btn variant-filled"),P(_,"class","flex space-x-2 items-center"),P(Tr,"class","flex space-x-2 items-center justify-center w-full"),P(pr,"class","w-full"),yt(pr,"hidden",!r[37]),P(Se,"class","w-full my-2"),P(Me,"class","card w-[calc(50%-0.5rem)] p-2 mr-2"),P(Hr,"class","w-full my-2"),P(h,"class","search-second-bar w-full svelte-1rjytrq"),P(a,"class","search-bar flex flex-wrap svelte-1rjytrq"),Vt(kr,"color","transparent"),yt(kr,"hidden",!r[42]),P(gr,"class","svelte-1rjytrq"),yt(gr,"hidden",!r[38])},m(fe,Be){$(document.head,e),ke(fe,t,Be),nt(n,fe,Be),ke(fe,i,Be),ke(fe,s,Be),$(s,a),$(a,o),$(o,u),Er(u,r[3]),$(a,c),$(a,h),$(h,g),Jt.m(g,null),$(g,p),Qt.m(g,null),$(h,w),$(h,_),$(_,d),$(d,b),$(b,T),$(b,R),$(d,F),$(_,K),$(_,L),$(L,C),$(_,se),$(_,ne),$(_,Y),$(_,x),$(x,W),$(W,pe),$(pe,Z),Z.checked=r[24],$(pe,be),$(pe,J),$(W,G),$(W,I),$(I,q),q.checked=r[23],$(I,Q),$(I,ie),$(W,A),$(W,S),$(S,j),j.checked=r[26],$(S,M),$(S,D),$(W,te),$(W,v),$(v,re),re.checked=r[28],$(v,k),$(v,l),$(W,E),$(W,B),$(B,V),V.checked=r[30],$(B,z),$(B,ue),$(W,ce),$(W,Te),$(Te,De),De.checked=r[32],$(Te,ee),$(Te,Ee),$(W,ve),$(W,Oe),$(Oe,_e),_e.checked=r[35],$(Oe,Re),$(Oe,Pe),$(W,Ve),$(W,Ye),$(Ye,qe),qe.checked=r[25],$(Ye,Ge),$(Ye,ct),$(W,Yt),$(W,Xt),$(Xt,fr),fr.checked=r[4],$(Xt,_n),$(Xt,Or),$(W,vn),$(W,hr),$(hr,dr),dr.checked=r[5],$(hr,En),$(hr,Fr),$(_,Sn),Ot&&Ot.m(_,null),$(_,Qr),Ft&&Ft.m(_,null),$(_,$r),$(_,nr),$(h,Tn),$(h,Tr),St&&St.m(Tr,null),$(h,An),$(h,pr),nt(It,pr,null),$(h,On),$(h,Se),$(h,je),$(h,Me),$(Me,Ct),nt(Dt,Ct,null),$(Me,Fn),$(Me,Bn),nt(mr,Bn,null),$(Me,ji),$(Me,Pn),nt(Ar,Pn,null),$(Me,Wi),$(Me,Zn),$(Me,Gi),Tt&&Tt.m(Me,null),$(h,Vi),$(h,Hr),At&&At.m(Hr,null),$(h,qi),Ut&&Ut.m(h,null),$(h,Yn),kt&&kt.m(h,null),$(s,Xi),$(s,kr),$(s,Zi),$(s,gr),Er(gr,r[12]),Mt=!0,Yi||(Ca=[Fe(u,"input",r[60]),Fe(u,"input",r[48]),Fe(u,"keydown",r[49]),Fe(L,"click",r[47]),Rc(Lc.call(null,ne,r[55])),Fe(Z,"change",r[61]),Fe(q,"change",r[62]),Fe(j,"change",r[63]),Fe(re,"change",r[64]),Fe(V,"change",r[65]),Fe(De,"change",r[66]),Fe(_e,"change",r[67]),Fe(qe,"change",r[68]),Fe(fr,"change",r[69]),Fe(dr,"change",r[70]),Fe(nr,"click",r[51]),Fe(kr,"click",r[91]),Fe(gr,"input",r[92])],Yi=!0)},p(fe,Be){Be[0]&8&&Er(u,fe[3]),Be[0]&512&<(m,m=fe[9])?(mt(),Ie(Jt,1,1,We),gt(),Jt=zu(fe),Jt.c(),we(Jt,1),Jt.m(g,p)):Jt.p(fe,Be),Be[0]&1024&<(y,y=fe[10])?(mt(),Ie(Qt,1,1,We),gt(),Qt=ju(fe),Qt.c(),we(Qt,1),Qt.m(g,null)):Qt.p(fe,Be),(!Mt||Be[1]&64)&&H!==(H=fe[37]?"Свернуть уточнение":"Уточнить")&&jt(C,H),(!Mt||Be[0]&536870912)&&(Z.disabled=fe[29]),Be[0]&16777216&&(Z.checked=fe[24]),(!Mt||Be[0]&536870912)&&(q.disabled=fe[29]),Be[0]&8388608&&(q.checked=fe[23]),(!Mt||Be[0]&536870912)&&(j.disabled=fe[29]),Be[0]&67108864&&(j.checked=fe[26]),(!Mt||Be[0]&536870912)&&(re.disabled=fe[29]),Be[0]&268435456&&(re.checked=fe[28]),(!Mt||Be[0]&536870912)&&(V.disabled=fe[29]),Be[0]&1073741824&&(V.checked=fe[30]),(!Mt||Be[0]&536870912)&&(De.disabled=fe[29]),Be[1]&2&&(De.checked=fe[32]),(!Mt||Be[0]&536870912)&&(_e.disabled=fe[29]),Be[1]&16&&(_e.checked=fe[35]),(!Mt||Be[0]&536870912)&&(qe.disabled=fe[29]),Be[0]&33554432&&(qe.checked=fe[25]),Be[0]&16&&(fr.checked=fe[4]),Be[0]&32&&(dr.checked=fe[5]),fe[3]?Ot?Ot.p(fe,Be):(Ot=Hu(fe),Ot.c(),Ot.m(_,Qr)):Ot&&(Ot.d(1),Ot=null),fe[2]?Ft?Ft.p(fe,Be):(Ft=Wu(fe),Ft.c(),Ft.m(_,$r)):Ft&&(Ft.d(1),Ft=null),fe[15]||fe[2]?St?(St.p(fe,Be),Be[0]&32772&&we(St,1)):(St=Gu(fe),St.c(),we(St,1),St.m(Tr,null)):St&&(mt(),Ie(St,1,1,()=>{St=null}),gt());const zt={};!kn&&Be[0]&1&&(kn=!0,zt.llmClarification=fe[0],ht(()=>kn=!1)),!xn&&Be[0]&128&&(xn=!0,zt.searchClarification=fe[7],ht(()=>xn=!1)),!Cn&&Be[0]&2&&(Cn=!0,zt.searchResults=fe[1],ht(()=>Cn=!1)),!In&&Be[0]&8192&&(In=!0,zt.relevantConsultations=fe[13],ht(()=>In=!1)),!Rn&&Be[0]&131072&&(Rn=!0,zt.llmResponse=fe[17],ht(()=>Rn=!1)),!Dn&&Be[0]&256&&(Dn=!0,zt.historyIsNotEmpty=fe[8],ht(()=>Dn=!1)),!Nn&&Be[0]&8&&(Nn=!0,zt.userRequest=fe[3],ht(()=>Nn=!1)),It.$set(zt),(!Mt||Be[1]&64)&&yt(pr,"hidden",!fe[37]);const xr={};Be[3]&262144&&(xr.$$scope={dirty:Be,ctx:fe}),!jr&&Be[0]&4194304&&(jr=!0,xr.checked=fe[22],ht(()=>jr=!1)),!en&&Be[0]&536870912&&(en=!0,xr.disabled=fe[29],ht(()=>en=!1)),Dt.$set(xr);const Wr={};Be[3]&262144&&(Wr.$$scope={dirty:Be,ctx:fe}),!Ui&&Be[0]&134217728&&(Ui=!0,Wr.checked=fe[27],ht(()=>Ui=!1)),!zi&&Be[0]&536870912&&(zi=!0,Wr.disabled=fe[29],ht(()=>zi=!1)),mr.$set(Wr);const ft={};Be[3]&262144&&(ft.$$scope={dirty:Be,ctx:fe}),!Hi&&Be[0]&16&&(Hi=!0,ft.checked=fe[4],ht(()=>Hi=!1)),Ar.$set(ft),fe[11]?Tt?(Tt.p(fe,Be),Be[0]&2048&&we(Tt,1)):(Tt=Vu(fe),Tt.c(),we(Tt,1),Tt.m(Me,null)):Tt&&(mt(),Ie(Tt,1,1,()=>{Tt=null}),gt()),Be[0]&16384&&(Ki=fe[14]&&Object.keys(fe[14]).length>0),Ki?At?(At.p(fe,Be),Be[0]&16384&&we(At,1)):(At=Ku(fe),At.c(),we(At,1),At.m(Hr,null)):At&&(mt(),Ie(At,1,1,()=>{At=null}),gt()),fe[34]?Ut||(Ut=qu(),Ut.c(),Ut.m(h,Yn)):Ut&&(Ut.d(1),Ut=null),(fe[16]||fe[8]&&fe[1].length>0||fe[13]&&fe[13].length>0)&&!fe[29]?kt?(kt.p(fe,Be),Be[0]&536944898&&we(kt,1)):(kt=Xu(fe),kt.c(),we(kt,1),kt.m(h,null)):kt&&(mt(),Ie(kt,1,1,()=>{kt=null}),gt()),Be[0]&4096&&Er(gr,fe[12]),(!Mt||Be[1]&128)&&yt(gr,"hidden",!fe[38])},i(fe){Mt||(we(n.$$.fragment,fe),we(Jt),we(Qt),we(St),we(It.$$.fragment,fe),we(Dt.$$.fragment,fe),we(mr.$$.fragment,fe),we(Ar.$$.fragment,fe),we(Tt),we(At),we(kt),Mt=!0)},o(fe){Ie(n.$$.fragment,fe),Ie(Jt),Ie(Qt),Ie(St),Ie(It.$$.fragment,fe),Ie(Dt.$$.fragment,fe),Ie(mr.$$.fragment,fe),Ie(Ar.$$.fragment,fe),Ie(Tt),Ie(At),Ie(kt),Mt=!1},d(fe){fe&&(X(t),X(i),X(s)),X(e),it(n,fe),Jt.d(fe),Qt.d(fe),Ot&&Ot.d(),Ft&&Ft.d(),St&&St.d(),r[71](null),it(It),it(Dt),it(mr),it(Ar),Tt&&Tt.d(),At&&At.d(),Ut&&Ut.d(),kt&&kt.d(),Yi=!1,cr(Ca)}}}let Zg=`Ты юрист. Твоя задача – дать верный ответ на поставленный тебе вопрос(ы) или предоставить информацию, если пользователю нужна консультация или разъяснение. Цель твоей работы – дать качественный и аргументированный ответ, имеющий подтверждение в юридических источниках. Помни, что ты профессиональный юрист и твои ответы должны быть формальными, содержательными и точными. Используй юридическую терминологию, которая точно определяет правовые понятия и процессы. Подписывай используемые источники рядом с местом, где ты их использовал. Используй официально-деловой стиль. Я предоставлю тебе запрос, юридические источники, ответ на запрос от эксперта и уточнения от пользователя. Ты действуешь по такому плану:
+1) Прочитай запрос. Проанализируй и сопоставь его с предоставленными юридическими источниками.
+2) Прочитай ответ эксперта. Прочитай уточнения от пользователя. Подумай чего не хватает в ответе эксперта.
+3) Составь новый ответ на запрос, ориентируясь на твои мысли из пункта 1 и 2. Твой ответ должен решить как изначальный запрос, так и обязательно использовать информацию из уточнения. Ответ должен соблюдать все правила, которые я задавал тебе ранее.
+4) Выводишь итоговый ответ в таком виде "По Вашему запросу сообщаем: [Тек��т твоего ответа]". Закончи фразой "Конец ответа".
+Отвечай всегда только на РУССКОМ языке!
+Запрос: {{ВОПРОС}}
+Юридические источники: {{ИСТОЧНИКИ}}
+Ответ эксперта: {{ПРОШЛЫЙ ОТВЕТ}}
+Уточнения: {{УТОЧНЕНИЯ}}`;async function Qu(r,e){try{const t=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`${e}: ${t.statusText}`);return t.json()}catch(t){return console.error(e,t.message),null}}function Yg(r,e,t){let{data:n}=e;const{ENV_DOCUMENT_DB_URL:i,ENV_ENABLE_DOCUMENT_DB:s,ENV_ENABLE_DB_SUPPORT:a,ENV_ENABLE_DEV_FEATURES:o,ENV_DISABLE_HEALTH_CHECKS:u,ENV_FAQ_DOCUMENT_ID:c}=n;let h;Yc();let g="",m="",p=!0,y="unknown",w="unknown",_=!1,d=Mg;function b(Se){t(12,d=Se)}function T(){t(11,_=!1)}async function R(){const Se=`${window.location.origin}/llm/health`,je=await Qu(Se,"Error fetching Llama health status");t(9,y=je?.status)}async function F(){const Se=`${window.location.origin}/search/health`,je=await Qu(Se,"Error fetching search health status");je&&t(10,w=je.status)}async function K(){await Promise.all([R(),F()])}let L;Ri(async()=>{K(),L=setInterval(async()=>{K()},3e4),u&&clearInterval(L)}),oa(()=>{clearInterval(L),Re()});let H=[],C=[],se=null,ne=!1,N=!1,Y=!1,x="",W="",pe=!0,Z="",be="",J="",Ae=Array(H.length).fill(!1),G=Array(C.length).fill(!1),I,q=!1,Q=!1,ie=!1,U=!0,A=!0,S=!1,j=!1,M=!0,D=!1,O=!1,te=!1,v=!1,re=!1,k=!1,l="",f=!1,E=!1,B=!1,V=!1,z=!1,ue=null;const me=async Se=>{t(17,x=""),pe=!0,t(15,ne=!1),t(2,N=!1),t(16,Y=!1),t(1,H=[]),t(13,C=[]),t(14,se={}),t(3,Z=""),t(59,be=""),t(33,f=!1),t(34,E=!1),h.clear(),Re()},ce=async Se=>{t(37,z=!z)},Te=Se=>{t(3,Z=Se.target.value);const je=Se.target.parentNode;je&&(je.dataset.replicatedValue=Z)},De=Se=>{Se.ctrlKey&&Se.key==="Enter"&&(Se.preventDefault(),_e())};function ee(Se){let je=Se.map(({title:Me,text:Ct,text_for_llm:Dt},jr)=>`${Me}:
+(${Dt||Ct})`).join(`
+\\
+`);return B&&(je+=(C||[]).map(({title:Me,text:Ct})=>`${Me}
+${Ct}`).join(`
+\\
+`)),je}async function Ee(){if(z&&m&&W){let Se="",je="";if(pe=!1,q){if(Se=ee(H.filter((Me,Ct)=>I[Me.title])),!Se){t(17,x="Выберите хотя бы один документ из результатов поиска.");return}}else{const Me=H.slice(0,10);Se=ee(Me)}je=Zg.replace("{{ВОПРОС}}",Z).replace("{{ИСТОЧНИКИ}}",Se).replace("{{ПРОШЛЫЙ ОТВЕТ}}",W).replace("{{УТОЧНЕНИЯ}}",m),t(17,x=""),await ve(je)}}const Ne=async()=>{let Se="",je="";if(q){if(Se=ee(H.filter((Me,Ct)=>I[Me.title])),!Se){t(17,x="Выберите хотя бы один документ из результатов поиска.");return}}else{const Me=H.slice(0,10);Se=ee(Me)}je=d.replace("{{ВОПРОС}}",Z).replace("{{ИСТОЧНИКИ}}",Se),await ve(je)},ve=async Se=>{t(2,N=!0),t(18,J="Запрос поставлен в очередь на генерацию ответа"),t(59,be=Z);const je=async Me=>{const Ct=await fetch("/llm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userprompt:Me}),signal:Oe.signal});try{if(Oe.signal.aborted){console.log("Request was cancelled.");return}if(!Ct.body){console.log("Response has no body");return}const Dt=Ct.body.pipeThrough(new TextDecoderStream).getReader();let jr=!0;for(t(18,J="Генерируем ответ на основе результатов поиска");jr;){const{value:en,done:Fn}=await Dt.read();if(Fn){jr=!1;break}en&&t(17,x+=en.replaceAll(`
+`," "))}}catch(Dt){Dt.name==="AbortError"?console.log("Fetch was aborted during reading."):console.error("Error during reading:",Dt)}};await je(Se),x.includes("Конец ответ")||(Se=`${Se}${x}`,await je(Se)),v||(t(18,J=""),t(2,N=!1),t(33,f=!0),t(58,W=x),ue=await Ua.log({consultations:(C||[]).map(Me=>JSON.stringify(Me)),llmPrompt:Se,llmResponse:x.replaceAll(" ",`
+`),searchResults:H.map(Me=>JSON.stringify(Me)),selectedSearchResults:H.filter((Me,Ct)=>I[Me.title]).map(Me=>JSON.stringify(Me)),userScore:void 0,userComment:l,userRequest:Z,uiSettings:{enableSearchResultSelection:q,enableLLMForTeasers:Q,doMultistepSearch:ie,useAccountingDocs:U,useReranking:A,useLLMForFiltering:S,disableThresholds:M,searchInTransactionLedgerByOperation:te,searchInTransactionLedgerByQuestion:O,useShortestPrompt:v,enableRealtimeLlmReponse:k,sendConsultationToLlm:B}})),h.updateCurrentState(null,null,x,null,se)};let Oe=new AbortController;const _e=async Se=>{await Re(),t(19,Ae=Array(10).fill(!1)),t(20,G=Array(10).fill(!1)),t(21,I={}),t(17,x=""),t(58,W=""),pe=!0,t(31,re=!1),t(33,f=!1),t(15,ne=!0),t(2,N=!1),t(16,Y=!0),t(34,E=!1),t(18,J="Ищем релевантные документы"),h.addState(Z);try{const je=await fetch("/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:Z+`
+`+g,use_llm_for_teasers:Q,do_multistep_search:ie,use_accounting_docs:U,use_reranking:A,disable_thresholds:M,find_transaction_maps_by_question:O,find_transaction_maps_by_operation:te,use_llm_for_filtering:S,use_keywords:j}),signal:Oe.signal});if(!je.ok)throw new Error(`Failed to fetch search results: ${je.statusText}`);const Me=await je.json();if(Me.error)throw Me;Me.searchResults!=null?(t(1,H=Zt.mergeResultsByTitle(Me.searchResults)),t(1,H=Zt.sortByRelevance(H)),t(1,H=Zt.identifyDocumentType(H)),H.map(Ct=>Ct.teaser=Ct.text_for_llm||Ct.teaser)):t(1,H=[]),console.log(H),Me.consultations!=null?t(13,C=Me.consultations):t(13,C=[]),Me.transactionMapResults!=null?t(14,se=Me.transactionMapResults):(t(14,se=[]),D&&t(34,E=!0)),h.updateCurrentState(Z,H,null,C,se),t(18,J=""),t(15,ne=!1),t(16,Y=!1)}catch(je){console.log(JSON.stringify(je)),je.name==="AbortError"?(alert("Сервис поиска не отвечает. Попробуйте изменить и повторить запрос"),console.error("Request was aborted due to timeout")):(je.error&&alert(je.error),console.error("Fetch error:",je))}finally{t(18,J=""),t(15,ne=!1),t(34,E=!1),t(16,Y=!1)}D||(H&&H.length>0?q||await Ne():t(34,E=!0))},Re=()=>{Oe.abort("user canceled"),Oe=new AbortController,t(2,N=!1),t(18,J=""),ue=null};async function Pe(){t(17,x=""),t(58,W=""),pe=!0,await Re(),h.addState(Z),h.updateCurrentState(null,H,W,C,se),setTimeout(async()=>{console.log(pe),await Ne()},1e3)}async function ze(Se){console.log(`Оценка: ${Se.rating} звезд, Комментарий: ${Se.comment}`),ue!==null&&await Ua.logUserScore(ue,Se.rating,Se.comment)}const Ve={event:"click",target:"popupFeatured",placement:"bottom"};async function Ye(){let Se={consultations:(C||[]).map(je=>JSON.stringify(je)),llmResponse:x.replaceAll(" ",`
+`),searchResults:H.map(je=>({title:je.title,text:je.text_for_llm||je.text})),userRequest:Z,uiSettings:{enableSearchResultSelection:q,enableLLMForTeasers:Q,doMultistepSearch:ie,useAccountingDocs:U,useReranking:A,useLLMForFiltering:S,useKeywords:j,disableThresholds:M,searchInTransactionLedgerByOperation:te,searchInTransactionLedgerByQuestion:O,useShortestPrompt:v,enableRealtimeLlmReponse:k,sendConsultationToLlm:B}};Lg.createDocxFromObject(Se)}let qe=!1;function Ge(){Z=this.value,t(3,Z)}function ct(){ie=this.checked,t(24,ie),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Lt(){Q=this.checked,t(23,Q),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Yt(){S=this.checked,t(26,S),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Xt(){M=this.checked,t(28,M),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function fr(){v=this.checked,t(30,v),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function _n(){k=this.checked,t(32,k),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Or(){B=this.checked,t(35,B),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Kn(){A=this.checked,t(25,A),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function vn(){O=this.checked,t(4,O)}function hr(){te=this.checked,t(5,te)}function dr(Se){et[Se?"unshift":"push"](()=>{h=Se,t(6,h)})}function En(Se){m=Se,t(0,m)}function Fr(Se){g=Se,t(7,g)}function qn(Se){H=Se,t(1,H)}function Sn(Se){C=Se,t(13,C)}function Qr(Se){x=Se,t(17,x)}function $r(Se){p=Se,t(8,p)}function nr(Se){Z=Se,t(3,Z)}function Xn(Se){q=Se,t(22,q),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Tn(Se){D=Se,t(29,D),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Tr(Se){j=Se,t(27,j),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function An(Se){D=Se,t(29,D),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function pr(Se){O=Se,t(4,O)}function It(Se){se=Se,t(14,se)}function kn(Se){H=Se,t(1,H)}function xn(Se){Ae=Se,t(19,Ae)}function Cn(Se){I=Se,t(21,I)}function In(Se){q=Se,t(22,q),t(5,te),t(4,O),t(0,m),t(1,H),t(58,W),t(59,be),t(3,Z),t(2,N)}function Rn(Se){C=Se,t(13,C)}function Dn(Se){G=Se,t(20,G)}const Nn=()=>{t(38,qe=!qe)};function On(){d=this.value,t(12,d)}return r.$$set=Se=>{"data"in Se&&t(57,n=Se.data)},r.$$.update=()=>{r.$$.dirty[0]&63|r.$$.dirty[1]&402653184&&(te||O?(t(29,D=!0),t(22,q=!1),t(23,Q=!1),t(24,ie=!1),U=!1,t(25,A=!1),t(26,S=!1),t(27,j=!1),t(28,M=!1),t(30,v=!1),t(32,k=!1),t(35,B=!1)):t(29,D=!1),m&&H.length>0&&W&&be==Z&&!N?t(36,V=!0):t(36,V=!1))},[m,H,N,Z,O,te,h,g,p,y,w,_,d,C,se,ne,Y,x,J,Ae,G,I,q,Q,ie,A,S,j,M,D,v,re,k,f,E,B,V,z,qe,i,s,a,o,c,b,T,me,ce,Te,De,Ee,_e,Re,Pe,ze,Ve,Ye,n,W,be,Ge,ct,Lt,Yt,Xt,fr,_n,Or,Kn,vn,hr,dr,En,Fr,qn,Sn,Qr,$r,nr,Xn,Tn,Tr,An,pr,It,kn,xn,Cn,In,Rn,Dn,Nn,On]}class c1 extends bt{constructor(e){super(),_t(this,e,Yg,Xg,lt,{data:57},null,[-1,-1,-1,-1])}}export{c1 as component,n1 as universal};