import{S as ne,o as ie,U as M,h as A,M as le,R as te,g as S,V as se,W as fe,X as B,Y as y,x as R,Z as ue,_ as z,v as F,$ as oe,a0 as D,a1 as G,Q as J,a2 as Q,a3 as ve,a4 as W,a5 as L,a6 as ce,a7 as de,a8 as _e,w as he,a9 as P,aa as pe,ab as me,J as Ee,q as ge,ac as K,ad as we,a as Te,b as xe,e as Ae}from"./CZBSCAq2.js";import{r as Ie}from"./BjH23EBg.js";import{p as Ce}from"./CfkMNJHN.js";function Me(r,e){return e}function Re(r,e,a,s){for(var o=[],c=e.length,u=0;u<c;u++)ce(e[u].e,o,!0);var d=c>0&&o.length===0&&a!==null;if(d){var E=a.parentNode;de(E),E.append(a),s.clear(),x(r,e[0].prev,e[c-1].next)}_e(o,()=>{for(var h=0;h<c;h++){var v=e[h];d||(s.delete(v.k),x(r,v.prev,v.next)),he(v.e,!d)}})}function ye(r,e,a,s,o,c=null){var u=r,d={flags:e,items:new Map,first:null},E=(e&K)!==0;if(E){var h=r;u=A?M(le(h)):h.appendChild(ne())}A&&te();var v=null,I=!1,l=se(()=>{var f=a();return Ee(f)?f:f==null?[]:G(f)});ie(()=>{var f=S(l),n=f.length;if(I&&n===0)return;I=n===0;let w=!1;if(A){var p=u.data===fe;p!==(n===0)&&(u=B(),M(u),y(!1),w=!0)}if(A){for(var m=null,g,_=0;_<n;_++){if(R.nodeType===8&&R.data===ue){u=R,w=!0,y(!1);break}var i=f[_],t=s(i,_);g=j(R,d,m,null,i,t,_,o,e,a),d.items.set(t,g),m=g}n>0&&M(B())}A||Se(f,d,u,o,e,s,a),c!==null&&(n===0?v?z(v):v=F(()=>c(u)):v!==null&&oe(v,()=>{v=null})),w&&y(!0),S(l)}),A&&(u=R)}function Se(r,e,a,s,o,c,u){var U,q,V,Y;var d=(o&we)!==0,E=(o&(P|L))!==0,h=r.length,v=e.items,I=e.first,l=I,f,n=null,w,p=[],m=[],g,_,i,t;if(d)for(t=0;t<h;t+=1)g=r[t],_=c(g,t),i=v.get(_),i!==void 0&&((U=i.a)==null||U.measure(),(w??(w=new Set)).add(i));for(t=0;t<h;t+=1){if(g=r[t],_=c(g,t),i=v.get(_),i===void 0){var ae=l?l.e.nodes_start:a;n=j(ae,e,n,n===null?e.first:n.next,g,_,t,s,o,u),v.set(_,n),p=[],m=[],l=n.next;continue}if(E&&be(i,g,t,o),(i.e.f&D)!==0&&(z(i.e),d&&((q=i.a)==null||q.unfix(),(w??(w=new Set)).delete(i))),i!==l){if(f!==void 0&&f.has(i)){if(p.length<m.length){var b=m[0],T;n=b.prev;var O=p[0],N=p[p.length-1];for(T=0;T<p.length;T+=1)Z(p[T],b,a);for(T=0;T<m.length;T+=1)f.delete(m[T]);x(e,O.prev,N.next),x(e,n,O),x(e,N,b),l=b,n=N,t-=1,p=[],m=[]}else f.delete(i),Z(i,l,a),x(e,i.prev,i.next),x(e,i,n===null?e.first:n.next),x(e,n,i),n=i;continue}for(p=[],m=[];l!==null&&l.k!==_;)(l.e.f&D)===0&&(f??(f=new Set)).add(l),m.push(l),l=l.next;if(l===null)continue;i=l}p.push(i),n=i,l=i.next}if(l!==null||f!==void 0){for(var C=f===void 0?[]:G(f);l!==null;)(l.e.f&D)===0&&C.push(l),l=l.next;var H=C.length;if(H>0){var re=(o&K)!==0&&h===0?a:null;if(d){for(t=0;t<H;t+=1)(V=C[t].a)==null||V.measure();for(t=0;t<H;t+=1)(Y=C[t].a)==null||Y.fix()}Re(e,C,re,v)}}d&&ge(()=>{var X;if(w!==void 0)for(i of w)(X=i.a)==null||X.apply()}),J.first=e.first&&e.first.e,J.last=n&&n.e}function be(r,e,a,s){(s&P)!==0&&Q(r.v,e),(s&L)!==0?Q(r.i,a):r.i=a}function j(r,e,a,s,o,c,u,d,E,h){var v=(E&P)!==0,I=(E&pe)===0,l=v?I?ve(o):W(o):o,f=(E&L)===0?u:W(u),n={i:f,v:l,k:c,a:null,e:null,prev:a,next:s};try{return n.e=F(()=>d(r,l,f,h),A),n.e.prev=a&&a.e,n.e.next=s&&s.e,a===null?e.first=n:(a.next=n,a.e.next=n.e),s!==null&&(s.prev=n,s.e.prev=n.e),n}finally{}}function Z(r,e,a){for(var s=r.next?r.next.e.nodes_start:a,o=e?e.e.nodes_start:a,c=r.e.nodes_start;c!==s;){var u=me(c);o.before(c),c=u}}function x(r,e,a){e===null?r.first=a:(e.next=a,e.e.next=a&&a.e),a!==null&&(a.prev=e,a.e.prev=e&&e.e)}const De=globalThis.__sveltekit_159sk1m.env;let k=Te(xe({}));function $(r){const a=Ce.url.searchParams.get(r);return a?decodeURIComponent(a):null}function ee(r,e){e||(e=window.location.href);const a=new URL(e,window.location.origin);for(const s in r)r[s]&&a.searchParams.set(s,r[s]);return a.toString()}function Le(r){return ee({solution:S(k).solution||$("solution")||"",scenario:S(k).scenario||$("scenario")||""},r)}function Pe(r){Ie(ee(r),{}),Ae(k,{...S(k),...r},!0)}export{De as a,Le as b,ye as e,$ as g,Me as i,Pe as r};
