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