designix-uis 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/designix-uis.js +1 -1
- package/dist/public/_app/immutable/chunks/{Yo6YXqe-.js → BDffofGV.js} +1 -1
- package/dist/public/_app/immutable/chunks/{BMzF0dM8.js → C0W53cED.js} +1 -1
- package/dist/public/_app/immutable/chunks/{CsiwpmvA.js → CYKRgQr_.js} +1 -1
- package/dist/public/_app/immutable/chunks/nly6OBCW.js +1 -0
- package/dist/public/_app/immutable/chunks/{8iDbMsaU.js → vHZsYl-F.js} +1 -1
- package/dist/public/_app/immutable/entry/{app.CefCpV6N.js → app.CcIEsctn.js} +2 -2
- package/dist/public/_app/immutable/entry/start.CqEyRjkX.js +1 -0
- package/dist/public/_app/immutable/nodes/{0.BcqkWGB-.js → 0.CDA_Nshd.js} +1 -1
- package/dist/public/_app/immutable/nodes/{1.BwXfKp8I.js → 1.C0_iuzRT.js} +1 -1
- package/dist/public/_app/immutable/nodes/{2.aPmJGwfe.js → 2.C81mVb7y.js} +1 -1
- package/dist/public/_app/immutable/nodes/{3.BVc5h4x0.js → 3.Bjeiju6o.js} +1 -1
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_bar.html +13 -13
- package/dist/public/gear/gear_epicycloid.html +13 -13
- package/dist/public/gear/gear_ring.html +13 -13
- package/dist/public/gear/gear_wheel.html +13 -13
- package/dist/public/heliostat/base.html +13 -13
- package/dist/public/heliostat/haxis_guidance.html +13 -13
- package/dist/public/heliostat/heliostat.html +13 -13
- package/dist/public/heliostat/heliostat_2.html +13 -13
- package/dist/public/heliostat/pole_static.html +13 -13
- package/dist/public/heliostat/rake.html +13 -13
- package/dist/public/heliostat/rake_stopper.html +13 -13
- package/dist/public/heliostat/ring.html +13 -13
- package/dist/public/heliostat/ring_guidance.html +13 -13
- package/dist/public/heliostat/rod.html +13 -13
- package/dist/public/heliostat/spider.html +13 -13
- package/dist/public/heliostat/surface.html +13 -13
- package/dist/public/heliostat/swing.html +13 -13
- package/dist/public/heliostat/trapeze.html +13 -13
- package/dist/public/heliostat/vaxis.html +13 -13
- package/dist/public/heliostat/vaxis_guidance.html +13 -13
- package/dist/public/heliostat/vaxis_holder.html +13 -13
- package/dist/public/index.html +11 -11
- package/package.json +1 -1
- package/dist/public/_app/immutable/chunks/nEWvNvcR.js +0 -1
- package/dist/public/_app/immutable/entry/start.B_rWRAvR.js +0 -1
package/dist/designix-uis.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Et=Object.defineProperty;var bt=(s,e,_)=>e in s?Et(s,e,{enumerable:!0,configurable:!0,writable:!0,value:_}):s[e]=_;var G=(s,e,_)=>bt(s,typeof e!="symbol"?e+"":e,_);import{p as t,a as z,b as xe,c as $e,i as _e,f as L,d as J,g as B,E as re,h as U,r as ae,j as P,k as ge,l as le,m as ve,n as X,o as Le,q as He,t as De,u as At,v as Me,w as Ke,x as kt,y as Se,z as ye,A as Oe,B as ze,S as ke,C as Rt}from"./
|
|
1
|
+
var Et=Object.defineProperty;var bt=(s,e,_)=>e in s?Et(s,e,{enumerable:!0,configurable:!0,writable:!0,value:_}):s[e]=_;var G=(s,e,_)=>bt(s,typeof e!="symbol"?e+"":e,_);import{p as t,a as z,b as xe,c as $e,i as _e,f as L,d as J,g as B,E as re,h as U,r as ae,j as P,k as ge,l as le,m as ve,n as X,o as Le,q as He,t as De,u as At,v as Me,w as Ke,x as kt,y as Se,z as ye,A as Oe,B as ze,S as ke,C as Rt}from"./vHZsYl-F.js";var Nt=class{constructor(s,e,_,o,i){G(this,"base_center_x");G(this,"base_center_y");G(this,"base_radius");G(this,"initial_angle");G(this,"right_nleft");this.base_center_x=s,this.base_center_y=e,this.base_radius=_,this.initial_angle=o,this.right_nleft=i}angleSign(){return this.right_nleft?1:-1}lFromU(s){return this.base_radius*Math.sqrt(1+s**2)}wFromU(s){if(s<0)throw`err729: involute parameter au ${s} is negative`;if(Math.abs(s)>Math.PI/2)throw`err730: involute parameter au ${s} is larger than PI/2`;return this.angleSign()*(s-Math.atan(s))}w2FromU(s){return this.initial_angle+this.wFromU(s)}ptc(s){const e=this.lFromU(s),_=this.w2FromU(s),o=this.base_center_x+Math.cos(_)*e,i=this.base_center_y+Math.sin(_)*e;return[o,i]}ptcta(s){return this.initial_angle+this.angleSign()*s}uFromL(s){return Math.sqrt(s**2/this.base_radius**2-1)}uFromWslow(s){let _=Math.PI/3,o=_/2,i=this.wFromU(_),d=0;for(;Math.abs(i-s)>1e-4;)i<s?_+=o:_-=o,i=this.wFromU(_),o=o/2,d+=1;return console.log(`dbg072: uFromWslow itcnt ${d}`),_}laptc(s,e,_,o){if(Math.sign(e)*this.angleSign()<0)throw`err904: Invole.laptc angle-of-pressure ${e} not compatible with right_nleft ${this.right_nleft}`;const i=s+e,d=this.base_center_x+Math.cos(i)*this.base_radius,c=this.base_center_y+Math.sin(i)*this.base_radius,n=i-this.angleSign()*Math.PI/2,l=_*this.base_radius,h=d+Math.cos(n)*l,a=c+Math.sin(n)*l,g=this.lFromU(_)*o,r=_,u=Math.cos(r)*g,f=Math.sin(r)*g;return[h,a,u,f]}};function Ee(s,e,_,o,i){return new Nt(s,e,_,o,i)}var Ct=class{constructor(){G(this,"mod",1);G(this,"TN",23);G(this,"as",1);G(this,"cx",0);G(this,"cy",0);G(this,"brr",50);G(this,"blr",50);G(this,"ar",54);G(this,"pr",53);G(this,"dr",52);G(this,"br",51);G(this,"bRound",1);G(this,"adt",.5);G(this,"initAngle",0);G(this,"axisAngle",0);G(this,"involArcPairs",1);G(this,"skinThickness",0);G(this,"involuteR",Ee(0,0,50,0,!0));G(this,"involuteL",Ee(0,0,50,0,!1));G(this,"rud",0);G(this,"rup",0);G(this,"rua",0);G(this,"rwd",0);G(this,"rwp",0);G(this,"rwa",0);G(this,"lud",0);G(this,"lup",0);G(this,"lua",0);G(this,"lwd",0);G(this,"lwp",0);G(this,"lwa",0);G(this,"msg");G(this,"initStep",0);this.mod=1,this.msg="",this.initStep=0}incInitStep(s){if(this.initStep+1!==s)throw`err834: incInitStep initStep ${this.initStep} and target ${s} are not compatible`;this.initStep=s}checkInitStep(s,e){if(this.initStep<s)throw`err835: checkInitStep for ${e} initStep ${this.initStep} is too small compare to targetMin ${s}`}set1ModuleToothNumber(s,e){this.incInitStep(1),this.mod=s,this.TN=e,this.pr=this.mod*this.TN/2,this.as=2*Math.PI/this.TN}set2CenterPosition(s,e){this.incInitStep(2),this.cx=s,this.cy=e}set3CircleRadius(s,e,_,o){this.incInitStep(3),this.ar=this.pr+this.mod*s,this.dr=this.pr-this.mod*e,this.br=this.dr-this.mod*_,this.bRound=o}set4BaseCircles(s,e){this.incInitStep(4),this.brr=s,this.blr=e}set5AddendumThickness(s){this.incInitStep(5),this.adt=s/100}set6Angles(s,e){this.incInitStep(6),this.initAngle=s,this.axisAngle=e}set7InvoluteDetails(s,e){this.incInitStep(7),this.involArcPairs=s,this.skinThickness=e}getRefCircles(){return this.checkInitStep(4,"getRefCircles"),[P(this.cx,this.cy,this.ar,"Azure"),P(this.cx,this.cy,this.pr,"Azure"),P(this.cx,this.cy,this.dr,"Azure"),P(this.cx,this.cy,this.br,"Azure"),P(this.cx,this.cy,this.brr,"CornFlowerBlue"),P(this.cx,this.cy,this.blr,"Crimson")]}calcInvoluteAngles(){this.checkInitStep(4,"calcInvoluteAngles"),this.involuteR=Ee(this.cx,this.cy,this.brr,0,!0),this.dr>this.brr?this.rud=this.involuteR.uFromL(this.dr):this.rud=0,this.rup=this.involuteR.uFromL(this.pr),this.rua=this.involuteR.uFromL(this.ar),this.rwd=this.involuteR.wFromU(this.rud),this.rwp=this.involuteR.wFromU(this.rup),this.rwa=this.involuteR.wFromU(this.rua),this.involuteL=Ee(this.cx,this.cy,this.blr,0,!1),this.dr>this.blr?this.lud=this.involuteL.uFromL(this.dr):this.lud=0,this.lup=this.involuteL.uFromL(this.pr),this.lua=this.involuteL.uFromL(this.ar),this.lwd=this.involuteL.wFromU(this.lud),this.lwp=this.involuteL.wFromU(this.lup),this.lwa=this.involuteL.wFromU(this.lua)}checkProfileConditions(){const s=this.as*this.adt,e=this.rwa-this.rwp,_=Math.abs(this.lwa-this.lwp),o=s-e-_;if(o<0)throw`err554: No remaining Addendum reserve ${L(o)}
|
|
2
2
|
`;const i=this.as*(1-this.adt),d=this.rwp-this.rwd,c=Math.abs(this.lwp-this.lwd),n=i-d-c;if(n<2*Math.atan2(this.bRound,this.br))throw`err555: No remaining Dedendum reserve ${L(n)} compare to bRound ${L(this.bRound)}
|
|
3
3
|
`}getToothRef(){const s=6*this.involArcPairs,e=0;this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles();const _=(this.rua-this.rud)/s,o=(this.lua-this.lud)/s,i=this.initAngle+e*this.as,d=Ee(this.cx,this.cy,this.brr,i-this.rwp,!0),[c,n]=d.ptc(this.rud+0*_),l=J(c,n,"Gold");for(let S=0;S<s;S++){const[g,r]=d.ptc(this.rud+(S+1)*_);l.addSegStrokeA(g,r)}const h=i+this.as*this.adt,a=Ee(this.cx,this.cy,this.blr,h-this.lwp,!1);for(let S=0;S<s+1;S++){const[g,r]=a.ptc(this.lud+(s-S)*o);l.addSegStrokeA(g,r)}return l.closeSegStroke(),l}getProfile(){this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles(),this.checkProfileConditions();const s=this.rwd-this.rwp,e=this.lwd-this.lwp,_=this.dr>this.brr?this.dr:this.brr,o=this.dr>this.blr?this.dr:this.blr;if(this.bRound>_-this.br)throw`err409: getProfile bRound ${L(this.bRound)} too large for erdr ${L(_)} and br ${L(this.br)}`;if(this.bRound>o-this.br)throw`err408: getProfile bRound ${L(this.bRound)} too large for eldr ${L(o)} and br ${L(this.br)}`;const i=(this.rua-this.rud)/this.involArcPairs,d=(this.lua-this.lud)/this.involArcPairs,c=le(this.cx,this.cy),n=c.translatePolar(this.initAngle+s,this.br),l=J(n.cx,n.cy);for(let h=0;h<this.TN;h++){const a=this.initAngle+h*this.as,S=c.translatePolar(a+s,this.br);l.addSegStrokeA(S.cx,S.cy).addCornerRounded(this.bRound);const g=Ee(this.cx,this.cy,this.brr,a-this.rwp,!0),[r,u]=g.ptc(this.rud),f=g.ptcta(this.rud),H=le(r,u).translatePolar(f-Math.PI/2,this.skinThickness);l.addSegStrokeA(H.cx,H.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.rud+x*i,[C,$]=g.ptc(O+i),m=g.ptcta(O),q=g.ptcta(O+i)+Math.PI,F=le(C,$).translatePolar(m-Math.PI/2,this.skinThickness);l.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const k=a+this.as*this.adt,M=Ee(this.cx,this.cy,this.blr,k-this.lwp,!1),D=this.lud+this.involArcPairs*d,[b,N]=M.ptc(D),R=M.ptcta(D)+Math.PI,v=le(b,N).translatePolar(R-Math.PI/2,this.skinThickness);l.addSegStrokeA(v.cx,v.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.lud+(this.involArcPairs-x)*d,[C,$]=M.ptc(O-d),m=M.ptcta(O)+Math.PI,q=M.ptcta(O-d),F=le(C,$).translatePolar(m-Math.PI/2,this.skinThickness);l.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const E=c.translatePolar(k+e,this.br);l.addSegStrokeA(E.cx,E.cy).addCornerRounded(this.bRound)}return l.closeSegStroke(),l}getMsg(){return this.msg}};function Qe(){return new Ct}function It(s,e,_,o){s.checkInitStep(1,"helper.gw2center-1"),e.checkInitStep(1,"helper.gw2center-2");const i=s.pr+e.pr+o,d=s.cx+i*Math.cos(_),c=s.cy+i*Math.sin(_);return[d,c,i]}function Vt(s,e,_,o,i,d,c,n,l,h,a){s.checkInitStep(3,"helper.baseCircles-1"),e.checkInitStep(3,"helper.baseCircles-2");let S=_,g=i,r=o,u=d;const f=s.pr+e.pr,H=h,k=a;switch(H){case 0:e.TN>s.TN?(S=s.dr,g=S*e.TN/s.TN):(g=e.dr,S=g*s.TN/e.TN);break;case 1:g=S*e.TN/s.TN;break;case 2:S=g*s.TN/e.TN;break;case 3:S=f*s.TN/(s.TN+e.TN)*Math.cos(ve(c)),g=S*e.TN/s.TN;break;case 4:break;default:console.log(`err337: involROpt2 case ${H} is not implemented!`)}switch(k){case 0:e.TN>s.TN?(r=s.dr,u=r*e.TN/s.TN):(u=e.dr,r=u*s.TN/e.TN);break;case 1:u=r*e.TN/s.TN;break;case 2:r=u*s.TN/e.TN;break;case 3:r=f*s.TN/(s.TN+e.TN)*Math.cos(ve(n)),u=r*e.TN/s.TN;break;case 4:break;default:console.log(`err358: involLOpt2 case ${k} is not implemented!`)}return l===1&&(r=S,u=g),[S,r,g,u]}var Bt=class{constructor(s,e,_,o,i,d){G(this,"gw1");G(this,"gw2");G(this,"initAngle1");G(this,"angleCenterCenter");G(this,"interAxis");G(this,"rightLeftCenter2");G(this,"msg");G(this,"apr");G(this,"apl");G(this,"lBDr",0);G(this,"lBDl",0);G(this,"laStartRr1",0);G(this,"laStartRr2",0);G(this,"laStartRl1",0);G(this,"laStartRl2",0);G(this,"aFODr1",0);G(this,"aFODr2",0);G(this,"aFODl1",0);G(this,"aFODl2",0);G(this,"lasr1",0);G(this,"lasr2",0);G(this,"lasl1",0);G(this,"lasl2",0);G(this,"firstToothUr1",0);G(this,"firstToothUl1",0);G(this,"ftdr1",0);G(this,"ftdl1",0);this.gw1=s,this.gw2=e,this.initAngle1=_,this.angleCenterCenter=o,this.interAxis=i,this.rightLeftCenter2=d,this.msg="",this.apr=0,this.apl=0}check1(){this.gw1.checkInitStep(4,"ActionLine.check1-1"),this.gw2.checkInitStep(4,"ActionLine.check1-2"),this.interAxis>this.gw1.ar+this.gw2.ar&&(this.msg+=`warn333: initAngle2 interAxis ${L(this.interAxis)} is too large compare to gw1.ar ${L(this.gw1.ar)} and gw2.ar ${L(this.gw2.ar)}
|
|
4
4
|
`),Se(this.gw1.brr*this.gw2.TN-this.gw2.brr*this.gw1.TN)!==0&&(this.msg+=`warn407: right ratios differ N1/N2 = ${this.gw1.TN} / ${this.gw2.TN} = ${L(this.gw1.TN/this.gw2.TN)} and brr1/brr2 = ${L(this.gw1.brr)}/${L(this.gw2.brr)} = ${L(this.gw1.brr/this.gw2.brr)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as m,o as _,u as i,q as l,m as k,v as h,j as g,w as v,x as b}from"./BwBztTFZ.js";import{s as x,p as c}from"./
|
|
1
|
+
import{k as m,o as _,u as i,q as l,m as k,v as h,j as g,w as v,x as b}from"./BwBztTFZ.js";import{s as x,p as c}from"./CYKRgQr_.js";function q(r=!1){const t=m,e=t.l.u;if(!e)return;let a=()=>v(t.s);if(r){let n=0,s={};const d=b(()=>{let u=!1;const f=t.s;for(const o in f)f[o]!==s[o]&&(s[o]=f[o],u=!0);return u&&n++,n});a=()=>g(d)}e.b.length&&_(()=>{p(t,a),l(e.b)}),i(()=>{const n=k(()=>e.m.map(h));return()=>{for(const s of n)typeof s=="function"&&s()}}),e.a.length&&i(()=>{p(t,a),l(e.a)})}function p(r,t){if(r.l.s)for(const e of r.l.s)g(e);t()}const y={get error(){return c.error},get status(){return c.status},get url(){return c.url}};x.updated.check;const w=y;export{q as i,w as p};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var Zt=t=>{throw TypeError(t)};var Ne=(t,e,n)=>e.has(t)||Zt("Cannot "+n);var A=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),x=(t,e,n)=>e.has(t)?Zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{o as Ct}from"./Bke29ZwM.js";import{n as Ut,aH as Oe,a8 as C,j as N,D as O,a9 as je}from"./BwBztTFZ.js";import{a as $e,b as P}from"./nEWvNvcR.js";const q=[];function $t(t,e=Ut){let n=null;const r=new Set;function a(o){if(Oe(t,o)&&(t=o,n)){const c=!q.length;for(const l of r)l[1](),q.push(l,t);if(c){for(let l=0;l<q.length;l+=2)q[l][0](q[l+1]);q.length=0}}}function s(o){a(o(t))}function i(o,c=Ut){const l=[o,c];return r.add(l),r.size===1&&(n=e(a,s)||Ut),o(t),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}new URL("sveltekit-internal://");function De(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Fe(t){return t.split("%25").map(decodeURI).join("%25")}function Ve(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Lt({href:t}){return t.split("#")[0]}function Be(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));e();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return a}function qe(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}function Me(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n.buffer}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&z.delete(Dt(t)),Ge(t,e));const z=new Map;function He(t,e){const n=Dt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&z.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Me(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function Ke(t,e,n){if(z.size>0){const r=Dt(t,n),a=z.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);z.delete(r)}}return window.fetch(e,n)}function Dt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${qe(...a)}"]`}return r}const We=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ye(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Je(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return Tt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Tt(String.fromCharCode(...c.slice(2).split("-").map(p=>parseInt(p,16))));const d=We.exec(c),[,u,w,f,m]=d;return e.push({name:f,matcher:m,optional:!!u,rest:!!w,chained:w?l===1&&i[0]==="":!1}),w?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return Tt(c)}).join("")}).join("")}/?$`),params:e}}function ze(t){return!/^\([^)]+\)$/.test(t)}function Je(t){return t.slice(1).split("/").filter(ze)}function Xe(t,e,n){const r={},a=t.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const c=e[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=e[o+1],u=a[o+1];d&&!d.rest&&d.optional&&u&&c.chained&&(i=0),!d&&!u&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Tt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ze({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:u,params:w}=Ye(o),f={id:o,exec:m=>{const p=u.exec(m);if(p)return Xe(p,w,r)},errors:[1,...d||[]].map(m=>t[m]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,t[o]]}function i(o){return o===void 0?o:[a.has(o),t[o]]}}function ue(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Qt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const Qe="1741554546620",he="sveltekit:snapshot",de="sveltekit:scroll",pe="sveltekit:states",tn="sveltekit:pageurl",G="sveltekit:history",X="sveltekit:navigation",F={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ut=location.origin;function ge(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function Ft(){return{x:pageXOffset,y:pageYOffset}}function M(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const te={...F,"":F.hover};function me(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function we(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=me(t)}}function Nt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||At(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ut&&t.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function pt(t){let e=null,n=null,r=null,a=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)r===null&&(r=M(o,"preload-code")),a===null&&(a=M(o,"preload-data")),e===null&&(e=M(o,"keepfocus")),n===null&&(n=M(o,"noscroll")),s===null&&(s=M(o,"reload")),i===null&&(i=M(o,"replacestate")),o=me(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:te[r??"off"],preload_data:te[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(i)}}function ee(t){const e=$t(t);let n=!0;function r(){n=!0,e.update(i=>i)}function a(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const ye={v:()=>{}};function en(){const{set:t,subscribe:e}=$t(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${$e}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Qe;return i&&(t(!0),ye.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:r}}function At(t,e,n){return t.origin!==ut||!t.pathname.startsWith(e)?!0:n?!(t.pathname===e+"/"||t.pathname===e+"/index.html"||t.protocol==="file:"&&t.pathname.replace(/\/[^/]+\.html?$/,"")===e):!1}function Mn(t){}function ne(t){const e=rn(t),n=new ArrayBuffer(e.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,e.charCodeAt(a));return n}const nn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function rn(t){t.length%4===0&&(t=t.replace(/==?$/,""));let e="",n=0,r=0;for(let a=0;a<t.length;a++)n<<=6,n|=nn.indexOf(t[a]),r+=6,r===24&&(e+=String.fromCharCode((n&16711680)>>16),e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,e+=String.fromCharCode(n)):r===18&&(n>>=2,e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255)),e}const an=-1,on=-2,sn=-3,cn=-4,ln=-5,fn=-6;function un(t,e){if(typeof t=="number")return a(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,r=Array(n.length);function a(s,i=!1){if(s===an)return;if(s===sn)return NaN;if(s===cn)return 1/0;if(s===ln)return-1/0;if(s===fn)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=e==null?void 0:e[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const u=new Map;r[s]=u;for(let f=1;f<o.length;f+=2)u.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const w=Object.create(null);r[s]=w;for(let f=1;f<o.length;f+=2)w[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],m=o[1],p=ne(m),h=new f(p);r[s]=h;break}case"ArrayBuffer":{const f=o[1],m=ne(f);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==on&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const _e=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[..._e];const hn=new Set([..._e]);[...hn];function dn(t){return t.filter(e=>e!=null)}class St{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Vt{constructor(e,n){this.status=e,this.location=n}}class Bt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}const pn="x-sveltekit-invalidated",gn="x-sveltekit-trailing-slash";function gt(t){return t instanceof St||t instanceof Bt?t.status:500}function mn(t){return t instanceof Bt?t.text:"Internal Error"}let U,Z,xt;const wn=Ct.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ct.toString());var et,nt,rt,at,ot,st,it,ct,ce,lt,le,ft,fe;wn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Z={current:null},xt={current:!1}):(U=new(ce=class{constructor(){x(this,et,C({}));x(this,nt,C(null));x(this,rt,C(null));x(this,at,C({}));x(this,ot,C({id:null}));x(this,st,C({}));x(this,it,C(-1));x(this,ct,C(new URL("https://example.com")))}get data(){return N(A(this,et))}set data(e){O(A(this,et),e)}get form(){return N(A(this,nt))}set form(e){O(A(this,nt),e)}get error(){return N(A(this,rt))}set error(e){O(A(this,rt),e)}get params(){return N(A(this,at))}set params(e){O(A(this,at),e)}get route(){return N(A(this,ot))}set route(e){O(A(this,ot),e)}get state(){return N(A(this,st))}set state(e){O(A(this,st),e)}get status(){return N(A(this,it))}set status(e){O(A(this,it),e)}get url(){return N(A(this,ct))}set url(e){O(A(this,ct),e)}},et=new WeakMap,nt=new WeakMap,rt=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,ce),Z=new(le=class{constructor(){x(this,lt,C(null))}get current(){return N(A(this,lt))}set current(e){O(A(this,lt),e)}},lt=new WeakMap,le),xt=new(fe=class{constructor(){x(this,ft,C(!1))}get current(){return N(A(this,ft))}set current(e){O(A(this,ft),e)}},ft=new WeakMap,fe),ye.v=()=>xt.current=!0);function yn(t){Object.assign(U,t)}const _n="/__data.json",vn=".html__data.json";function bn(t){return t.endsWith(".html")?t.replace(/\.html$/,vn):t.replace(/\/$/,"")+_n}const An=new Set(["icon","shortcut icon","apple-touch-icon"]),B=ue(de)??{},Q=ue(he)??{},$={url:ee({}),page:ee({}),navigating:$t(null),updated:en()};function qt(t){B[t]=Ft()}function Sn(t,e){let n=t+1;for(;B[n];)delete B[n],n+=1;for(n=e+1;Q[n];)delete Q[n],n+=1}function W(t){return location.href=t.href,new Promise(()=>{})}async function ve(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(P||"/");t&&await t.update()}}function re(){}let Mt,Ot,mt,j,jt,S;const wt=[],yt=[];let L=null;const ht=new Map,be=new Set,En=new Set,H=new Set;let v={branch:[],error:null,url:null},Gt=!1,_t=!1,ae=!0,tt=!1,Y=!1,Ae=!1,Ht=!1,Se,k,T,V;const J=new Set;async function Wn(t,e,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),S=t,await((s=(a=t.hooks).init)==null?void 0:s.call(a)),Mt=Ze(t),j=document.documentElement,jt=e,Ot=t.nodes[0],mt=t.nodes[1],Ot(),mt(),k=(i=history.state)==null?void 0:i[G],T=(o=history.state)==null?void 0:o[X],k||(k=T=Date.now(),history.replaceState({...history.state,[G]:k,[X]:T},""));const r=B[k];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await jn(jt,n):await Cn(S.hash?Dn(new URL(location.href)):location.href,{replaceState:!0}),On()}function kn(){wt.length=0,Ht=!1}function Ee(t){yt.some(e=>e==null?void 0:e.snapshot)&&(Q[t]=yt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function ke(t){var e;(e=Q[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=yt[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function oe(){qt(k),Qt(de,B),Ee(T),Qt(he,Q)}async function Kt(t,e,n,r){return dt({type:"goto",url:ge(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Ht=!0),e.invalidate&&e.invalidate.forEach(Nn)}})}async function Rn(t){if(t.id!==(L==null?void 0:L.id)){const e={};J.add(e),L={id:t.id,token:e,promise:Ue({...t,preload:e}).then(n=>(J.delete(e),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function Pt(t){var n;const e=(n=await kt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}function Re(t,e,n){var s;v=t.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,t.props.page),Se=new S.root({target:e,props:{...t.props,stores:$,components:yt},hydrate:n,sync:!1}),ke(T);const a={from:null,to:{params:v.params,route:{id:((s=v.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(i=>i(a)),_t=!0}function vt({url:t,params:e,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(P&&(t.pathname===P||t.pathname===P+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);t.pathname=De(t.pathname,o),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:dn(n).map(f=>f.node.component),page:zt(U)}};i!==void 0&&(c.props.form=i);let l={},d=!U,u=0;for(let f=0;f<Math.max(n.length,v.branch.length);f+=1){const m=n[f],p=v.branch[f];(m==null?void 0:m.data)!==(p==null?void 0:p.data)&&(d=!0),m&&(l={...l,...m.data},d&&(c.props[`data_${u}`]=l),u+=1)}return(!v.url||t.href!==v.url.href||v.error!==a||i!==void 0&&i!==U.form||d)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:i??null,data:d?l:U.data}),c}async function Wt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var d,u,w;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await t();if((d=l.universal)!=null&&d.load){let f=function(...p){for(const h of p){const{href:_}=new URL(h,n);c.dependencies.add(_)}};const m={route:new Proxy(a,{get:(p,h)=>(o&&(c.route=!0),p[h])}),params:new Proxy(r,{get:(p,h)=>(o&&c.params.add(h),p[h])}),data:(s==null?void 0:s.data)??null,url:Be(n,()=>{o&&(c.url=!0)},p=>{o&&c.search_params.add(p)},S.hash),async fetch(p,h){p instanceof Request&&(h={body:p.method==="GET"||p.method==="HEAD"?void 0:await p.blob(),cache:p.cache,credentials:p.credentials,headers:[...p.headers].length?p.headers:void 0,integrity:p.integrity,keepalive:p.keepalive,method:p.method,mode:p.mode,redirect:p.redirect,referrer:p.referrer,referrerPolicy:p.referrerPolicy,signal:p.signal,...h});const{resolved:_,promise:R}=Ie(p,h,n);return o&&f(_.href),R},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),e()},untrack(p){o=!1;try{return p()}finally{o=!0}}};i=await l.universal.load.call(null,m)??null}return{node:l,loader:t,server:s,universal:(u=l.universal)!=null&&u.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((w=l.universal)==null?void 0:w.trailingSlash)??(s==null?void 0:s.slash)}}function Ie(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=_t?Ke(r,a.href,e):He(r,e);return{resolved:a,promise:s}}function se(t,e,n,r,a,s){if(Ht)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==v.params[i])return!0;for(const i of a.dependencies)if(wt.some(o=>o(new URL(i))))return!0;return!1}function Yt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function In(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function ie({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:zt(U),constructors:[]}}}async function Ue({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===t)return J.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let d=null;const u=v.url?t!==bt(v.url):!1,w=v.route?a.id!==v.route.id:!1,f=In(v.url,n);let m=!1;const p=l.map((g,y)=>{var D;const b=v.branch[y],E=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||se(m,w,u,f,(D=b.server)==null?void 0:D.uses,r));return E&&(m=!0),E});if(p.some(Boolean)){try{d=await xe(n,p)}catch(g){const y=await K(g,{url:n,params:r,route:{id:t}});return J.has(s)?ie({error:y,url:n,params:r,route:a}):Et({status:gt(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const h=d==null?void 0:d.nodes;let _=!1;const R=l.map(async(g,y)=>{var Rt;if(!g)return;const b=v.branch[y],E=h==null?void 0:h[y];if((!E||E.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!se(_,w,u,f,(Rt=b.universal)==null?void 0:Rt.uses,r))return b;if(_=!0,(E==null?void 0:E.type)==="error")throw E;return Wt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var Xt;const Jt={};for(let It=0;It<y;It+=1)Object.assign(Jt,(Xt=await R[It])==null?void 0:Xt.data);return Jt},server_data_node:Yt(E===void 0&&g[0]?{type:"skip"}:E??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of R)g.catch(()=>{});const I=[];for(let g=0;g<l.length;g+=1)if(l[g])try{I.push(await R[g])}catch(y){if(y instanceof Vt)return{type:"redirect",location:y.location};if(J.has(s))return ie({error:await K(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=gt(y),E;if(h!=null&&h.includes(y))b=y.status??b,E=y.error;else if(y instanceof St)E=y.body;else{if(await $.updated.check())return await ve(),await W(n);E=await K(y,{params:r,url:n,route:{id:a.id}})}const D=await Un(g,I,i);return D?vt({url:n,params:r,branch:I.slice(0,D.idx).concat(D.node),status:b,error:E,route:a}):await Te(n,{id:a.id},E,b)}else I.push(void 0);return vt({url:n,params:r,branch:I,status:200,error:null,route:a,form:e?void 0:null})}async function Un(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Et({status:t,error:e,url:n,route:r}){const a={};let s=null;if(S.server_loads[0]===0)try{const o=await xe(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ut||n.pathname!==location.pathname||Gt)&&await W(n)}try{const o=await Wt({loader:Ot,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Yt(s)}),c={node:await mt(),loader:mt,universal:null,server:null,data:null};return vt({url:n,params:a,branch:[o,c],status:t,error:e,route:null})}catch(o){if(o instanceof Vt)return Kt(new URL(o.location,location.href),{},0);throw o}}async function Ln(t){const e=t.href;if(ht.has(e))return ht.get(e);let n;try{const r=(async()=>{let a=await S.hooks.reroute({url:new URL(t),fetch:async(s,i)=>Ie(s,i,t).promise})??t;if(typeof a=="string"){const s=new URL(t);S.hash?s.hash=a:s.pathname=a,a=s}return a})();ht.set(e,r),n=await r}catch{ht.delete(e);return}return n}async function kt(t,e){if(t&&!At(t,P,S.hash)){const n=await Ln(t);if(!n)return;const r=Tn(n);for(const a of Mt){const s=a.exec(r);if(s)return{id:bt(t),invalidating:e,route:a,params:Ve(s),url:t}}}}function Tn(t){return Fe(S.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(P.length))||"/"}function bt(t){return(S.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Le({url:t,type:e,intent:n,delta:r}){let a=!1;const s=Ce(v,n,t,e);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return tt||be.forEach(o=>o(i)),a?null:s}async function dt({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=re,block:d=re}){const u=V;V=c;const w=await kt(e,!1),f=Le({url:e,type:t,delta:n==null?void 0:n.delta,intent:w});if(!f){d(),V===c&&(V=u);return}const m=k,p=T;l(),tt=!0,_t&&$.navigating.set(Z.current=f.navigation);let h=w&&await Ue(w);if(!h){if(At(e,P,S.hash))return await W(e);h=await Te(e,{id:null},await K(new Bt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(w==null?void 0:w.url)||e,V!==c)return f.reject(new Error("navigation aborted")),!1;if(h.type==="redirect")if(o>=20)h=await Et({status:500,error:await K(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return await Kt(new URL(h.location,e).href,{},o+1,c),!1;else h.props.page.status>=400&&await $.updated.check()&&(await ve(),await W(e));if(kn(),qt(m),Ee(p),h.props.page.url.pathname!==e.pathname&&(e.pathname=h.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[G]:k+=g,[X]:T+=g,[pe]:i};(s?history.replaceState:history.pushState).call(history,y,"",e),s||Sn(k,T)}if(L=null,h.props.page.state=i,_t){v=h.state,h.props.page&&(h.props.page.url=e);const g=(await Promise.all(Array.from(En,y=>y(f.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{H.delete(b)})};g.push(y),g.forEach(b=>{H.add(b)})}Se.$set(h.props),yn(h.props.page),Ae=!0}else Re(h,jt,!1);const{activeElement:_}=document;await je();const R=n?n.scroll:a?Ft():null;if(ae){const g=e.hash&&document.getElementById(decodeURIComponent(S.hash?e.hash.split("#")[2]??"":e.hash.slice(1)));R?scrollTo(R.x,R.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==_&&document.activeElement!==document.body;!r&&!I&&$n(),ae=!0,h.props.page&&Object.assign(U,h.props.page),tt=!1,t==="popstate"&&ke(T),f.fulfil(void 0),H.forEach(g=>g(f.navigation)),$.navigating.set(Z.current=null)}async function Te(t,e,n,r){return t.origin===ut&&t.pathname===location.pathname&&!Gt?await Et({status:r,error:n,url:t,route:e}):await W(t)}function xn(){let t,e,n;j.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(t),t=setTimeout(()=>{s(c,F.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],F.tap)}j.addEventListener("mousedown",r),j.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(Pt(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=we(o,j),d=l===e&&c>=n;if(!l||d)return;const{url:u,external:w,download:f}=Nt(l,P,S.hash);if(w||f)return;const m=pt(l),p=u&&bt(v.url)===bt(u);if(!(m.reload||p))if(c<=m.preload_data){e=l,n=F.tap;const h=await kt(u,!1);if(!h)return;Rn(h)}else c<=m.preload_code&&(e=l,n=c,Pt(u))}function i(){a.disconnect();for(const o of j.querySelectorAll("a")){const{url:c,external:l,download:d}=Nt(o,P,S.hash);if(l||d)continue;const u=pt(o);u.reload||(u.preload_code===F.viewport&&a.observe(o),u.preload_code===F.eager&&Pt(c))}}H.add(i),i()}function K(t,e){if(t instanceof St)return t.body;const n=gt(t),r=mn(t);return S.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function Pn(t,e){Ct(()=>(t.add(e),()=>{t.delete(e)}))}function Yn(t){Pn(H,t)}function Cn(t,e={}){return t=new URL(ge(t)),t.origin!==ut?Promise.reject(new Error("goto: invalid URL")):Kt(t,e,0)}function Nn(t){if(typeof t=="function")wt.push(t);else{const{href:e}=new URL(t,location.href);wt.push(n=>n.href===e)}}function On(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(oe(),!tt){const a=Ce(v,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};be.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&oe()}),(e=navigator.connection)!=null&&e.saveData||xn(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=we(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Nt(r,P,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=pt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[d,u]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),w=d===Lt(location);if(s||c.reload&&(!w||!u)){Le({url:a,type:"link"})?tt=!0:n.preventDefault();return}if(u!==void 0&&w){const[,f]=v.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(u));m&&(m.scrollIntoView(),m.focus())}return}if(Y=!0,qt(k),t(a),!c.replace_state)return;Y=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await dt({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(At(o,P,!1))return;const c=n.target,l=pt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c),u=a==null?void 0:a.getAttribute("name");u&&d.append(u,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(d).toString(),dt({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[G]){const a=n.state[G];if(V={},a===k)return;const s=B[a],i=n.state[pe]??{},o=new URL(n.state[tn]??location.href),c=n.state[X],l=v.url?Lt(location)===Lt(v.url):!1;if(c===T&&(Ae||l)){i!==U.state&&(U.state=i),t(o),B[k]=Ft(),s&&scrollTo(s.x,s.y),k=a;return}const u=a-k;await dt({type:"popstate",url:o,popped:{state:i,scroll:s,delta:u},accept:()=>{k=a,T=c},block:()=>{history.go(-u)},nav_token:V})}else if(!Y){const a=new URL(location.href);t(a),S.hash&&location.reload()}}),addEventListener("hashchange",()=>{Y&&(Y=!1,history.replaceState({...history.state,[G]:++k,[X]:T},"",location.href))});for(const n of document.querySelectorAll("link"))An.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Z.current=null)});function t(n){v.url=U.url=n,$.page.set(zt(U)),$.page.notify()}}async function jn(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Gt=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await kt(l,!1)||{}),d=Mt.find(({id:f})=>f===s.id);let u,w=!0;try{const f=r.map(async(p,h)=>{const _=o[h];return _!=null&&_.uses&&(_.uses=Pe(_.uses)),Wt({loader:S.nodes[p],url:l,params:a,route:s,parent:async()=>{const R={};for(let I=0;I<h;I+=1)Object.assign(R,(await f[I]).data);return R},server_data_node:Yt(_)})}),m=await Promise.all(f);if(d){const p=d.layouts;for(let h=0;h<p.length;h++)p[h]||m.splice(h,0,void 0)}u=vt({url:l,params:a,branch:m,status:e,error:n,form:c,route:d??null})}catch(f){if(f instanceof Vt){await W(new URL(f.location,location.href));return}u=await Et({status:gt(f),error:await K(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",w=!1}u.props.page&&(u.props.page.state={}),Re(u,t,w)}async function xe(t,e){var s;const n=new URL(t);n.pathname=bn(t.pathname),t.pathname.endsWith("/")&&n.searchParams.append(gn,"1"),n.searchParams.append(pn,e.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new St(a.status,i)}return new Promise(async i=>{var w;const o=new Map,c=a.body.getReader(),l=new TextDecoder;function d(f){return un(f,{...S.decoders,Promise:m=>new Promise((p,h)=>{o.set(m,{fulfil:p,reject:h})})})}let u="";for(;;){const{done:f,value:m}=await c.read();if(f&&!u)break;for(u+=!m&&u?`
|
|
1
|
+
var Zt=t=>{throw TypeError(t)};var Ne=(t,e,n)=>e.has(t)||Zt("Cannot "+n);var A=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),x=(t,e,n)=>e.has(t)?Zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{o as Ct}from"./Bke29ZwM.js";import{n as Ut,aH as Oe,a8 as C,j as N,D as O,a9 as je}from"./BwBztTFZ.js";import{a as $e,b as P}from"./nly6OBCW.js";const q=[];function $t(t,e=Ut){let n=null;const r=new Set;function a(o){if(Oe(t,o)&&(t=o,n)){const c=!q.length;for(const l of r)l[1](),q.push(l,t);if(c){for(let l=0;l<q.length;l+=2)q[l][0](q[l+1]);q.length=0}}}function s(o){a(o(t))}function i(o,c=Ut){const l=[o,c];return r.add(l),r.size===1&&(n=e(a,s)||Ut),o(t),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}new URL("sveltekit-internal://");function De(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Fe(t){return t.split("%25").map(decodeURI).join("%25")}function Ve(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Lt({href:t}){return t.split("#")[0]}function Be(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));e();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return a}function qe(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}function Me(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n.buffer}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&z.delete(Dt(t)),Ge(t,e));const z=new Map;function He(t,e){const n=Dt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&z.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Me(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function Ke(t,e,n){if(z.size>0){const r=Dt(t,n),a=z.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);z.delete(r)}}return window.fetch(e,n)}function Dt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${qe(...a)}"]`}return r}const We=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ye(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Je(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return Tt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Tt(String.fromCharCode(...c.slice(2).split("-").map(p=>parseInt(p,16))));const d=We.exec(c),[,u,w,f,m]=d;return e.push({name:f,matcher:m,optional:!!u,rest:!!w,chained:w?l===1&&i[0]==="":!1}),w?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return Tt(c)}).join("")}).join("")}/?$`),params:e}}function ze(t){return!/^\([^)]+\)$/.test(t)}function Je(t){return t.slice(1).split("/").filter(ze)}function Xe(t,e,n){const r={},a=t.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const c=e[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=e[o+1],u=a[o+1];d&&!d.rest&&d.optional&&u&&c.chained&&(i=0),!d&&!u&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Tt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ze({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:u,params:w}=Ye(o),f={id:o,exec:m=>{const p=u.exec(m);if(p)return Xe(p,w,r)},errors:[1,...d||[]].map(m=>t[m]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,t[o]]}function i(o){return o===void 0?o:[a.has(o),t[o]]}}function ue(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Qt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const Qe="1741558170481",he="sveltekit:snapshot",de="sveltekit:scroll",pe="sveltekit:states",tn="sveltekit:pageurl",G="sveltekit:history",X="sveltekit:navigation",F={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ut=location.origin;function ge(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function Ft(){return{x:pageXOffset,y:pageYOffset}}function M(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const te={...F,"":F.hover};function me(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function we(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=me(t)}}function Nt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||At(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ut&&t.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function pt(t){let e=null,n=null,r=null,a=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)r===null&&(r=M(o,"preload-code")),a===null&&(a=M(o,"preload-data")),e===null&&(e=M(o,"keepfocus")),n===null&&(n=M(o,"noscroll")),s===null&&(s=M(o,"reload")),i===null&&(i=M(o,"replacestate")),o=me(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:te[r??"off"],preload_data:te[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(i)}}function ee(t){const e=$t(t);let n=!0;function r(){n=!0,e.update(i=>i)}function a(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const ye={v:()=>{}};function en(){const{set:t,subscribe:e}=$t(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${$e}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Qe;return i&&(t(!0),ye.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:r}}function At(t,e,n){return t.origin!==ut||!t.pathname.startsWith(e)?!0:n?!(t.pathname===e+"/"||t.pathname===e+"/index.html"||t.protocol==="file:"&&t.pathname.replace(/\/[^/]+\.html?$/,"")===e):!1}function Mn(t){}function ne(t){const e=rn(t),n=new ArrayBuffer(e.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,e.charCodeAt(a));return n}const nn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function rn(t){t.length%4===0&&(t=t.replace(/==?$/,""));let e="",n=0,r=0;for(let a=0;a<t.length;a++)n<<=6,n|=nn.indexOf(t[a]),r+=6,r===24&&(e+=String.fromCharCode((n&16711680)>>16),e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,e+=String.fromCharCode(n)):r===18&&(n>>=2,e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255)),e}const an=-1,on=-2,sn=-3,cn=-4,ln=-5,fn=-6;function un(t,e){if(typeof t=="number")return a(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,r=Array(n.length);function a(s,i=!1){if(s===an)return;if(s===sn)return NaN;if(s===cn)return 1/0;if(s===ln)return-1/0;if(s===fn)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=e==null?void 0:e[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const u=new Map;r[s]=u;for(let f=1;f<o.length;f+=2)u.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const w=Object.create(null);r[s]=w;for(let f=1;f<o.length;f+=2)w[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],m=o[1],p=ne(m),h=new f(p);r[s]=h;break}case"ArrayBuffer":{const f=o[1],m=ne(f);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==on&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const _e=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[..._e];const hn=new Set([..._e]);[...hn];function dn(t){return t.filter(e=>e!=null)}class St{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Vt{constructor(e,n){this.status=e,this.location=n}}class Bt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}const pn="x-sveltekit-invalidated",gn="x-sveltekit-trailing-slash";function gt(t){return t instanceof St||t instanceof Bt?t.status:500}function mn(t){return t instanceof Bt?t.text:"Internal Error"}let U,Z,xt;const wn=Ct.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ct.toString());var et,nt,rt,at,ot,st,it,ct,ce,lt,le,ft,fe;wn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Z={current:null},xt={current:!1}):(U=new(ce=class{constructor(){x(this,et,C({}));x(this,nt,C(null));x(this,rt,C(null));x(this,at,C({}));x(this,ot,C({id:null}));x(this,st,C({}));x(this,it,C(-1));x(this,ct,C(new URL("https://example.com")))}get data(){return N(A(this,et))}set data(e){O(A(this,et),e)}get form(){return N(A(this,nt))}set form(e){O(A(this,nt),e)}get error(){return N(A(this,rt))}set error(e){O(A(this,rt),e)}get params(){return N(A(this,at))}set params(e){O(A(this,at),e)}get route(){return N(A(this,ot))}set route(e){O(A(this,ot),e)}get state(){return N(A(this,st))}set state(e){O(A(this,st),e)}get status(){return N(A(this,it))}set status(e){O(A(this,it),e)}get url(){return N(A(this,ct))}set url(e){O(A(this,ct),e)}},et=new WeakMap,nt=new WeakMap,rt=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,ce),Z=new(le=class{constructor(){x(this,lt,C(null))}get current(){return N(A(this,lt))}set current(e){O(A(this,lt),e)}},lt=new WeakMap,le),xt=new(fe=class{constructor(){x(this,ft,C(!1))}get current(){return N(A(this,ft))}set current(e){O(A(this,ft),e)}},ft=new WeakMap,fe),ye.v=()=>xt.current=!0);function yn(t){Object.assign(U,t)}const _n="/__data.json",vn=".html__data.json";function bn(t){return t.endsWith(".html")?t.replace(/\.html$/,vn):t.replace(/\/$/,"")+_n}const An=new Set(["icon","shortcut icon","apple-touch-icon"]),B=ue(de)??{},Q=ue(he)??{},$={url:ee({}),page:ee({}),navigating:$t(null),updated:en()};function qt(t){B[t]=Ft()}function Sn(t,e){let n=t+1;for(;B[n];)delete B[n],n+=1;for(n=e+1;Q[n];)delete Q[n],n+=1}function W(t){return location.href=t.href,new Promise(()=>{})}async function ve(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(P||"/");t&&await t.update()}}function re(){}let Mt,Ot,mt,j,jt,S;const wt=[],yt=[];let L=null;const ht=new Map,be=new Set,En=new Set,H=new Set;let v={branch:[],error:null,url:null},Gt=!1,_t=!1,ae=!0,tt=!1,Y=!1,Ae=!1,Ht=!1,Se,k,T,V;const J=new Set;async function Wn(t,e,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),S=t,await((s=(a=t.hooks).init)==null?void 0:s.call(a)),Mt=Ze(t),j=document.documentElement,jt=e,Ot=t.nodes[0],mt=t.nodes[1],Ot(),mt(),k=(i=history.state)==null?void 0:i[G],T=(o=history.state)==null?void 0:o[X],k||(k=T=Date.now(),history.replaceState({...history.state,[G]:k,[X]:T},""));const r=B[k];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await jn(jt,n):await Cn(S.hash?Dn(new URL(location.href)):location.href,{replaceState:!0}),On()}function kn(){wt.length=0,Ht=!1}function Ee(t){yt.some(e=>e==null?void 0:e.snapshot)&&(Q[t]=yt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function ke(t){var e;(e=Q[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=yt[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function oe(){qt(k),Qt(de,B),Ee(T),Qt(he,Q)}async function Kt(t,e,n,r){return dt({type:"goto",url:ge(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Ht=!0),e.invalidate&&e.invalidate.forEach(Nn)}})}async function Rn(t){if(t.id!==(L==null?void 0:L.id)){const e={};J.add(e),L={id:t.id,token:e,promise:Ue({...t,preload:e}).then(n=>(J.delete(e),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function Pt(t){var n;const e=(n=await kt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}function Re(t,e,n){var s;v=t.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,t.props.page),Se=new S.root({target:e,props:{...t.props,stores:$,components:yt},hydrate:n,sync:!1}),ke(T);const a={from:null,to:{params:v.params,route:{id:((s=v.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(i=>i(a)),_t=!0}function vt({url:t,params:e,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(P&&(t.pathname===P||t.pathname===P+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);t.pathname=De(t.pathname,o),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:dn(n).map(f=>f.node.component),page:zt(U)}};i!==void 0&&(c.props.form=i);let l={},d=!U,u=0;for(let f=0;f<Math.max(n.length,v.branch.length);f+=1){const m=n[f],p=v.branch[f];(m==null?void 0:m.data)!==(p==null?void 0:p.data)&&(d=!0),m&&(l={...l,...m.data},d&&(c.props[`data_${u}`]=l),u+=1)}return(!v.url||t.href!==v.url.href||v.error!==a||i!==void 0&&i!==U.form||d)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:i??null,data:d?l:U.data}),c}async function Wt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var d,u,w;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await t();if((d=l.universal)!=null&&d.load){let f=function(...p){for(const h of p){const{href:_}=new URL(h,n);c.dependencies.add(_)}};const m={route:new Proxy(a,{get:(p,h)=>(o&&(c.route=!0),p[h])}),params:new Proxy(r,{get:(p,h)=>(o&&c.params.add(h),p[h])}),data:(s==null?void 0:s.data)??null,url:Be(n,()=>{o&&(c.url=!0)},p=>{o&&c.search_params.add(p)},S.hash),async fetch(p,h){p instanceof Request&&(h={body:p.method==="GET"||p.method==="HEAD"?void 0:await p.blob(),cache:p.cache,credentials:p.credentials,headers:[...p.headers].length?p.headers:void 0,integrity:p.integrity,keepalive:p.keepalive,method:p.method,mode:p.mode,redirect:p.redirect,referrer:p.referrer,referrerPolicy:p.referrerPolicy,signal:p.signal,...h});const{resolved:_,promise:R}=Ie(p,h,n);return o&&f(_.href),R},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),e()},untrack(p){o=!1;try{return p()}finally{o=!0}}};i=await l.universal.load.call(null,m)??null}return{node:l,loader:t,server:s,universal:(u=l.universal)!=null&&u.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((w=l.universal)==null?void 0:w.trailingSlash)??(s==null?void 0:s.slash)}}function Ie(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=_t?Ke(r,a.href,e):He(r,e);return{resolved:a,promise:s}}function se(t,e,n,r,a,s){if(Ht)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==v.params[i])return!0;for(const i of a.dependencies)if(wt.some(o=>o(new URL(i))))return!0;return!1}function Yt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function In(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function ie({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:zt(U),constructors:[]}}}async function Ue({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===t)return J.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let d=null;const u=v.url?t!==bt(v.url):!1,w=v.route?a.id!==v.route.id:!1,f=In(v.url,n);let m=!1;const p=l.map((g,y)=>{var D;const b=v.branch[y],E=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||se(m,w,u,f,(D=b.server)==null?void 0:D.uses,r));return E&&(m=!0),E});if(p.some(Boolean)){try{d=await xe(n,p)}catch(g){const y=await K(g,{url:n,params:r,route:{id:t}});return J.has(s)?ie({error:y,url:n,params:r,route:a}):Et({status:gt(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const h=d==null?void 0:d.nodes;let _=!1;const R=l.map(async(g,y)=>{var Rt;if(!g)return;const b=v.branch[y],E=h==null?void 0:h[y];if((!E||E.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!se(_,w,u,f,(Rt=b.universal)==null?void 0:Rt.uses,r))return b;if(_=!0,(E==null?void 0:E.type)==="error")throw E;return Wt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var Xt;const Jt={};for(let It=0;It<y;It+=1)Object.assign(Jt,(Xt=await R[It])==null?void 0:Xt.data);return Jt},server_data_node:Yt(E===void 0&&g[0]?{type:"skip"}:E??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of R)g.catch(()=>{});const I=[];for(let g=0;g<l.length;g+=1)if(l[g])try{I.push(await R[g])}catch(y){if(y instanceof Vt)return{type:"redirect",location:y.location};if(J.has(s))return ie({error:await K(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=gt(y),E;if(h!=null&&h.includes(y))b=y.status??b,E=y.error;else if(y instanceof St)E=y.body;else{if(await $.updated.check())return await ve(),await W(n);E=await K(y,{params:r,url:n,route:{id:a.id}})}const D=await Un(g,I,i);return D?vt({url:n,params:r,branch:I.slice(0,D.idx).concat(D.node),status:b,error:E,route:a}):await Te(n,{id:a.id},E,b)}else I.push(void 0);return vt({url:n,params:r,branch:I,status:200,error:null,route:a,form:e?void 0:null})}async function Un(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Et({status:t,error:e,url:n,route:r}){const a={};let s=null;if(S.server_loads[0]===0)try{const o=await xe(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ut||n.pathname!==location.pathname||Gt)&&await W(n)}try{const o=await Wt({loader:Ot,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Yt(s)}),c={node:await mt(),loader:mt,universal:null,server:null,data:null};return vt({url:n,params:a,branch:[o,c],status:t,error:e,route:null})}catch(o){if(o instanceof Vt)return Kt(new URL(o.location,location.href),{},0);throw o}}async function Ln(t){const e=t.href;if(ht.has(e))return ht.get(e);let n;try{const r=(async()=>{let a=await S.hooks.reroute({url:new URL(t),fetch:async(s,i)=>Ie(s,i,t).promise})??t;if(typeof a=="string"){const s=new URL(t);S.hash?s.hash=a:s.pathname=a,a=s}return a})();ht.set(e,r),n=await r}catch{ht.delete(e);return}return n}async function kt(t,e){if(t&&!At(t,P,S.hash)){const n=await Ln(t);if(!n)return;const r=Tn(n);for(const a of Mt){const s=a.exec(r);if(s)return{id:bt(t),invalidating:e,route:a,params:Ve(s),url:t}}}}function Tn(t){return Fe(S.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(P.length))||"/"}function bt(t){return(S.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Le({url:t,type:e,intent:n,delta:r}){let a=!1;const s=Ce(v,n,t,e);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return tt||be.forEach(o=>o(i)),a?null:s}async function dt({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=re,block:d=re}){const u=V;V=c;const w=await kt(e,!1),f=Le({url:e,type:t,delta:n==null?void 0:n.delta,intent:w});if(!f){d(),V===c&&(V=u);return}const m=k,p=T;l(),tt=!0,_t&&$.navigating.set(Z.current=f.navigation);let h=w&&await Ue(w);if(!h){if(At(e,P,S.hash))return await W(e);h=await Te(e,{id:null},await K(new Bt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(w==null?void 0:w.url)||e,V!==c)return f.reject(new Error("navigation aborted")),!1;if(h.type==="redirect")if(o>=20)h=await Et({status:500,error:await K(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return await Kt(new URL(h.location,e).href,{},o+1,c),!1;else h.props.page.status>=400&&await $.updated.check()&&(await ve(),await W(e));if(kn(),qt(m),Ee(p),h.props.page.url.pathname!==e.pathname&&(e.pathname=h.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[G]:k+=g,[X]:T+=g,[pe]:i};(s?history.replaceState:history.pushState).call(history,y,"",e),s||Sn(k,T)}if(L=null,h.props.page.state=i,_t){v=h.state,h.props.page&&(h.props.page.url=e);const g=(await Promise.all(Array.from(En,y=>y(f.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{H.delete(b)})};g.push(y),g.forEach(b=>{H.add(b)})}Se.$set(h.props),yn(h.props.page),Ae=!0}else Re(h,jt,!1);const{activeElement:_}=document;await je();const R=n?n.scroll:a?Ft():null;if(ae){const g=e.hash&&document.getElementById(decodeURIComponent(S.hash?e.hash.split("#")[2]??"":e.hash.slice(1)));R?scrollTo(R.x,R.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==_&&document.activeElement!==document.body;!r&&!I&&$n(),ae=!0,h.props.page&&Object.assign(U,h.props.page),tt=!1,t==="popstate"&&ke(T),f.fulfil(void 0),H.forEach(g=>g(f.navigation)),$.navigating.set(Z.current=null)}async function Te(t,e,n,r){return t.origin===ut&&t.pathname===location.pathname&&!Gt?await Et({status:r,error:n,url:t,route:e}):await W(t)}function xn(){let t,e,n;j.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(t),t=setTimeout(()=>{s(c,F.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],F.tap)}j.addEventListener("mousedown",r),j.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(Pt(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=we(o,j),d=l===e&&c>=n;if(!l||d)return;const{url:u,external:w,download:f}=Nt(l,P,S.hash);if(w||f)return;const m=pt(l),p=u&&bt(v.url)===bt(u);if(!(m.reload||p))if(c<=m.preload_data){e=l,n=F.tap;const h=await kt(u,!1);if(!h)return;Rn(h)}else c<=m.preload_code&&(e=l,n=c,Pt(u))}function i(){a.disconnect();for(const o of j.querySelectorAll("a")){const{url:c,external:l,download:d}=Nt(o,P,S.hash);if(l||d)continue;const u=pt(o);u.reload||(u.preload_code===F.viewport&&a.observe(o),u.preload_code===F.eager&&Pt(c))}}H.add(i),i()}function K(t,e){if(t instanceof St)return t.body;const n=gt(t),r=mn(t);return S.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function Pn(t,e){Ct(()=>(t.add(e),()=>{t.delete(e)}))}function Yn(t){Pn(H,t)}function Cn(t,e={}){return t=new URL(ge(t)),t.origin!==ut?Promise.reject(new Error("goto: invalid URL")):Kt(t,e,0)}function Nn(t){if(typeof t=="function")wt.push(t);else{const{href:e}=new URL(t,location.href);wt.push(n=>n.href===e)}}function On(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(oe(),!tt){const a=Ce(v,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};be.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&oe()}),(e=navigator.connection)!=null&&e.saveData||xn(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=we(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Nt(r,P,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=pt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[d,u]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),w=d===Lt(location);if(s||c.reload&&(!w||!u)){Le({url:a,type:"link"})?tt=!0:n.preventDefault();return}if(u!==void 0&&w){const[,f]=v.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(u));m&&(m.scrollIntoView(),m.focus())}return}if(Y=!0,qt(k),t(a),!c.replace_state)return;Y=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await dt({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(At(o,P,!1))return;const c=n.target,l=pt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c),u=a==null?void 0:a.getAttribute("name");u&&d.append(u,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(d).toString(),dt({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[G]){const a=n.state[G];if(V={},a===k)return;const s=B[a],i=n.state[pe]??{},o=new URL(n.state[tn]??location.href),c=n.state[X],l=v.url?Lt(location)===Lt(v.url):!1;if(c===T&&(Ae||l)){i!==U.state&&(U.state=i),t(o),B[k]=Ft(),s&&scrollTo(s.x,s.y),k=a;return}const u=a-k;await dt({type:"popstate",url:o,popped:{state:i,scroll:s,delta:u},accept:()=>{k=a,T=c},block:()=>{history.go(-u)},nav_token:V})}else if(!Y){const a=new URL(location.href);t(a),S.hash&&location.reload()}}),addEventListener("hashchange",()=>{Y&&(Y=!1,history.replaceState({...history.state,[G]:++k,[X]:T},"",location.href))});for(const n of document.querySelectorAll("link"))An.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Z.current=null)});function t(n){v.url=U.url=n,$.page.set(zt(U)),$.page.notify()}}async function jn(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Gt=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await kt(l,!1)||{}),d=Mt.find(({id:f})=>f===s.id);let u,w=!0;try{const f=r.map(async(p,h)=>{const _=o[h];return _!=null&&_.uses&&(_.uses=Pe(_.uses)),Wt({loader:S.nodes[p],url:l,params:a,route:s,parent:async()=>{const R={};for(let I=0;I<h;I+=1)Object.assign(R,(await f[I]).data);return R},server_data_node:Yt(_)})}),m=await Promise.all(f);if(d){const p=d.layouts;for(let h=0;h<p.length;h++)p[h]||m.splice(h,0,void 0)}u=vt({url:l,params:a,branch:m,status:e,error:n,form:c,route:d??null})}catch(f){if(f instanceof Vt){await W(new URL(f.location,location.href));return}u=await Et({status:gt(f),error:await K(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",w=!1}u.props.page&&(u.props.page.state={}),Re(u,t,w)}async function xe(t,e){var s;const n=new URL(t);n.pathname=bn(t.pathname),t.pathname.endsWith("/")&&n.searchParams.append(gn,"1"),n.searchParams.append(pn,e.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new St(a.status,i)}return new Promise(async i=>{var w;const o=new Map,c=a.body.getReader(),l=new TextDecoder;function d(f){return un(f,{...S.decoders,Promise:m=>new Promise((p,h)=>{o.set(m,{fulfil:p,reject:h})})})}let u="";for(;;){const{done:f,value:m}=await c.read();if(f&&!u)break;for(u+=!m&&u?`
|
|
2
2
|
`:l.decode(m,{stream:!0});;){const p=u.indexOf(`
|
|
3
3
|
`);if(p===-1)break;const h=JSON.parse(u.slice(0,p));if(u=u.slice(p+1),h.type==="redirect")return i(h);if(h.type==="data")(w=h.nodes)==null||w.forEach(_=>{(_==null?void 0:_.type)==="data"&&(_.uses=Pe(_.uses),_.data=d(_.data))}),i(h);else if(h.type==="chunk"){const{id:_,data:R,error:I}=h,g=o.get(_);o.delete(_),I?g.reject(d(I)):g.fulfil(d(R))}}}})}function Pe(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function $n(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const e=document.body,n=e.getAttribute("tabindex");e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),n!==null?e.setAttribute("tabindex",n):e.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function Ce(t,e,n,r){var c,l;let a,s;const i=new Promise((d,u)=>{a=d,s=u});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((l=e==null?void 0:e.route)==null?void 0:l.id)??null},url:n},willUnload:!e,type:r,complete:i},fulfil:a,reject:s}}function zt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Dn(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}export{St as H,Yn as a,Wn as b,Cn as g,Mn as l,U as p,$ as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s;const e=((s=globalThis.__sveltekit_1mbgk45)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_1mbgk45)==null?void 0:a.assets)??e;export{t as a,e as b};
|
|
@@ -58,7 +58,7 @@ ${Ue(s)}
|
|
|
58
58
|
ENDSEC
|
|
59
59
|
0
|
|
60
60
|
EOF
|
|
61
|
-
`}stringify(){return this.close(),this.dxfStr}};function Y0(){return new H0}function G0(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var Z0=class{constructor(){M(this,"seg");this.seg=[]}addStart(e,n){this.seg=[];const t={typ:0,px:e,py:n};this.seg.push(t)}addStroke(e,n){const t={typ:1,px:e,py:n};this.seg.push(t)}addArc(e,n,t,r,s){const i={typ:2,px:e,py:n,radius:t,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function X0(){return new Z0}var Ro=class{};function Oo(e,n,t,r){const s=Mt(e,n,t),i=Z(s.pc.cx,s.pc.cy),o=yt(s.a2-s.a1),u=(t.arcCcw?o:o-2*Math.PI)/r,l=[];for(let c=1;c<r;c++)l.push(i.translatePolar(s.a1+c*u,t.radius));return l}var K0=class kt extends Ro{constructor(t,r,s=""){super();M(this,"circle",!1);M(this,"segments");M(this,"points");M(this,"debugPoints");M(this,"debugLines");M(this,"lastPoint");M(this,"imposedColor");this.segments=[new je(6,t,r,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=Z(t,r),this.imposedColor=s}setLastPoint(t,r){this.lastPoint=Z(t,r)}getLastPoint(){return this.lastPoint}getFirstPoint(){return Z(this.segments[0].px,this.segments[0].py)}addPointA(t,r){if(this.points.length>2)throw`err311: contour add too much point ${t} ${r}`;return this.points.push(Z(t,r)),this}addPointAP(t,r){const s=Z(0,0).translatePolar(t,r);return this.addPointA(s.cx,s.cy),this}addPointR(t,r){const i=this.getLastPoint().translate(t,r);return this.addPointA(i.cx,i.cy),this}addPointRP(t,r){const i=this.getLastPoint().translatePolar(t,r);return this.addPointA(i.cx,i.cy),this}addSeg(t){return this.segments.push(t),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const t=this.points.pop();if(t!==void 0){const r=new je(0,t.cx,t.cy,0);t.isEqual(this.getLastPoint())||(this.addSeg(r),this.setLastPoint(t.cx,t.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(t,r){return this.addPointA(t,r).addSegStroke(),this}addSegStrokeAP(t,r){return this.addPointAP(t,r).addSegStroke(),this}addSegStrokeR(t,r){return this.addPointR(t,r).addSegStroke(),this}addSegStrokeRP(t,r){return this.addPointRP(t,r).addSegStroke(),this}addSegStrokeAifBig(t,r,s,i){const o=this.getLastPoint();if(Math.sqrt((t-o.cx)**2+(r-o.cy)**2)>s)this.addPointA(t,r).addSegStroke();else if(i){const u=this.segments[this.segments.length-1].sType;if(u===0)this.segments.pop(),this.addPointA(t,r).addSegStroke();else throw`err186: addSegStrokeA-ifBig used after a not eStroke ${u} at segment ${this.segments.length}`}return this}addSegArc(t,r,s){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const i=this.points.pop();if(i!==void 0){const o=new je(1,i.cx,i.cy,t,r,s);i.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${ut(i.cx)} ${ut(i.cy)}`):(this.addSeg(o),this.setLastPoint(i.cx,i.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 with unexpected points.length ${this.points.length}`;const t=this.points.pop(),r=this.points.pop();if(r!==void 0&&t!==void 0){const s=this.getLastPoint(),i=S0(s,r,t),o=i.distanceToPoint(s),a=s.middlePoint(t),u=a.angleToPoint(s),l=a.angleToPoint(r),c=le(l-u);let h=!1,m=!1;if(!a.isEqual(i)){const x=a.angleToPoint(i),y=le(x-u);Math.sign(y)*Math.sign(c)>0&&(h=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(o,h,m),this.debugPoints.push(r)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(t,r){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=Ur(i,s);let a=s;r&&(a=i);const u=er(a.cx,a.cy,t+Math.PI/2),l=o.intersection(u),c=l.distanceToPoint(i),h=i.middlePoint(s),m=a.angleToPoint(h),x=le(t-m);let y=!1;Math.abs(x)>Math.PI/2&&(y=!0);let f=!1;x<0&&(f=!0),r||(f=!f),this.addPointA(s.cx,s.cy).addSegArc(c,y,f),this.debugPoints.push(h),this.debugPoints.push(l)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(t,r){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=i.distanceToPoint(s),a=i.angleToPoint(s),u=s.angleToPoint(i),l=le(t-a),c=-1*le(r-u);if(Math.abs(l)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${l}`;if(Math.abs(c)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${c}`;if(ne(l)===0)throw`err765: addSeg2Arcs with almost zero au ${l}`;if(ne(c)===0)throw`err766: addSeg2Arcs with almost zero av ${c}`;if(Math.sign(l)*Math.sign(c)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${l} ${c}`;const h=Math.tan(l/2),m=Math.tan(c/2),x=o*m/(m+h),y=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),d=o*h/(m+h),p=Math.abs(d/Math.sin(c)),g=i.translatePolar(a+l/2,f);let D=!1;Math.sign(l)<0&&(D=!0),this.addPointA(g.cx,g.cy).addSegArc(y,!1,D),this.addPointA(s.cx,s.cy).addSegArc(p,!1,D),this.debugPoints.push(i.translatePolar(a,x)),this.debugPoints.push(i.translatePolar(a+l-Math.sign(l)*Math.PI/2,y)),this.debugPoints.push(s.translatePolar(u-c+Math.sign(l)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addCornerPointed(){const t=new je(2,0,0,0);return this.addSeg(t),this}addCornerRounded(t){const r=new je(3,0,0,t);return this.addSeg(r),this}addCornerWidened(t){const r=new je(4,0,0,t);return this.addSeg(r),this}addCornerWideAcc(t){const r=new je(5,0,0,t);return this.addSeg(r),this}closeSegStroke(){const t=this.segments[0].px,r=this.segments[0].py;return this.addSegStrokeA(t,r),this}closeSegArc(t,r,s){const i=this.segments[0].px,o=this.segments[0].py;return this.addPointA(i,o).addSegArc(t,r,s),this}clone(){const t=new kt(this.segments[0].px,this.segments[0].py);for(const r of this.segments){const s=r.clone();s.sType!==6&&(t.addSeg(s),ze(s.sType)&&t.setLastPoint(s.px,s.py))}return t}translate(t,r){const s=this.segments[0].px+t,i=this.segments[0].py+r,o=new kt(s,i);for(const a of this.segments){const u=a.clone();ze(a.sType)&&(u.px+=t,u.py+=r),u.sType!==6&&(o.addSeg(u),ze(u.sType)&&o.setLastPoint(u.px,u.py))}return o}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),a=Z(this.segments[0].px,this.segments[0].py).rotate(i,s),u=new kt(a.cx,a.cy);for(const l of this.segments){const c=l.clone();if(ze(l.sType)){const m=Z(c.px,c.py).rotate(i,s);c.px=m.cx,c.py=m.cy}c.sType!==6&&(u.addSeg(c),ze(c.sType)&&u.setLastPoint(c.px,c.py))}return u}scale(t,r,s,i=!1){const o=Z(t,r),u=Z(this.segments[0].px,this.segments[0].py).scale(o,s),l=new kt(u.cx,u.cy);for(const c of this.segments){const h=c.clone();if(ze(c.sType)){const x=Z(h.px,h.py).scale(o,s);h.px=x.cx,h.py=x.cy}c.sType===1&&(h.radius*=s),Vn(c.sType)&&i&&(h.radius*=s),h.sType!==6&&(l.addSeg(h),ze(h.sType)&&l.setLastPoint(h.px,h.py))}return l}addPartial(t){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let r=t;if(t.segments.length>0){const s=t.segments[0],i=this.getLastPoint(),o=s.px-i.cx,a=s.py-i.cy;s.sType===6&&(r=t.translate(-o,-a))}for(const s of r.segments)s.sType!==6&&(this.addSeg(s),ze(s.sType)&&this.setLastPoint(s.px,s.py));return this}draw(t,r,s=de.contour){const i=this.imposedColor===""?s:this.imposedColor;let o=0,a=0;for(const u of this.segments){if(u.sType===0){const[l,c]=qt(o,a,r),[h,m]=qt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(h,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Mt(o,a,u),[c,h]=qt(l.pc.cx,l.pc.cy,r),m=Io(u.radius,r);t.beginPath(),t.arc(c,h,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}cn(u.sType)&&(o=u.px,a=u.py)}}extractSkeleton(){const t=this.segments[0],r=new kt(t.px,t.py);for(const s of this.segments)ze(s.sType)&&r.addSeg(s);return r}generateContour(){Bt.clearPoints(),Bt.clearLines();const t=[],r=[];let s=0,i=0,o=0;for(const c of this.segments){if(c.sType===0){const x=Z(i,o),y=Z(c.px,c.py),f=Z(0,0);t.push(new He(c.sType,x,y,f,0,0,0,!1)),s=1}if(c.sType===1){const x=Mt(i,o,c);t.push(x),s=1}const h=t.at(-1),m=t.at(-2);if(h!==void 0&&m!==void 0&&ze(h.sType)&&In(m.sType)){const x=t.pop(),y=t.pop(),f=t.pop();if(f!==void 0&&y!==void 0&&x!==void 0){const d=bi(f,y,x);t.push(...d)}else throw"err603: contour generateContour internal error"}if(In(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&Vn(c.sType)&&c.radius>0){const x=Z(0,0);r.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}if(s===1&&Vn(c.sType)&&c.radius>0){const x=Z(0,0);t.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}s=2}cn(c.sType)&&(i=c.px,o=c.py)}if(r.length>0)if(s===1)t.push(...r);else throw"err397: contour generateContour Corners defined at end and begining";const a=t.at(-1);if(a!==void 0&&In(a.sType)){const c=t[0],h=t.pop(),m=t.pop();if(m!==void 0&&h!==void 0&&c!==void 0){const x=bi(m,h,c);t.push(...x.slice(0,-1));const y=x.at(-1);if(y!==void 0)t[0]=y;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const u=t[0],l=new kt(u.p1.cx,u.p1.cy,this.imposedColor);l.debugPoints.push(...Bt.getPoints()),l.debugLines.push(...Bt.getLines());for(const c of t)if(c.sType===0)l.addSegStrokeA(c.p2.cx,c.p2.cy);else if(c.sType===1){const h=T0(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(h.radius,h.arcLarge,h.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${c.sType}`;return l}generatePoints(t){const r=[];let s=0,i=0;for(const o of this.segments){if(o.sType===1)try{const a=Oo(s,i,o,t);r.push(...a)}catch(a){console.log("err453: "+a)}cn(o.sType)&&(s=o.px,i=o.py,r.push(Z(s,i)))}return r}getOrientation(t,r,s){const o=t.slice(1);let a=0,u=o.at(-3),l=o.at(-2),c=o.at(-1),h=-1;for(const[x,y]of o.entries()){u=l,l=c,c=y;const f=s?l.cx>r-.001:l.cx<r+.001,d=s?u.cx>r-.001:u.cx<r+.001;if(f&&!d){const p=u.cx-l.cx,g=u.cy-l.cy,D=c.cx-l.cx,_=c.cy-l.cy,w=D*g-_*p;a=Math.sign(w),h=x}}if(a===0)throw`err299: Orientation not found with ${o.length} points and foundIdx ${h}`;return a>0}getEnvelop(){const t=this.generatePoints(24),r=[],s=[];for(const h of t)r.push(h.cx),s.push(h.cy);const i=Math.min(...r),o=Math.max(...r),a=Math.min(...s),u=Math.max(...s),l=this.getOrientation(t,i,!1),c=this.getOrientation(t,o,!0);if(c!==l)throw`err390: orientation unstable ${l} ${c} with ${t.length} points`;return{xMin:i,xMax:o,yMin:a,yMax:u,orientation:l}}generateLines(){const t=[];return t.push(...this.debugLines),t}checkContour(t){if(t.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${t.segments[0].sType}`;let r=0,s=0;for(const a of t.segments){if(a.sType===1)try{Mt(r,s,a)}catch(u){throw`err778: ${u}`}cn(a.sType)&&(r=a.px,s=a.py)}const i=t.segments[0].px,o=t.segments[0].py;if(ne(r-i)!==0||ne(s-o)!==0)throw`err414: contour check, contour is not closed px ${i} ${r} py ${i} ${o}`}check(){Bt.clearMsg(),this.checkContour(this);const t=this.generateContour();return this.checkContour(t),Bt.getMsg()}toSvg(t,r=""){const s=O0();for(const o of this.segments)o.sType===6?s.addStart(o.px,t-o.py):o.sType===0?s.addStroke(o.px,t-o.py):o.sType===1?s.addArc(o.px,t-o.py,o.radius,o.arcLarge,!o.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${o.sType}`);return s.stringify(r)}toDxfSeg(){const t=[];let r=0,s=0;for(const i of this.segments){if(i.sType===0)t.push(q0(r,s,i.px,i.py));else if(i.sType===1)try{const o=Mt(r,s,i);t.push(j0(o.pc.cx,o.pc.cy,i.radius,o.a1,o.a2,o.arcCcw))}catch(o){console.log("err413: "+o)}cn(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=X0();for(const s of this.segments)s.sType===6?t.addStart(s.px,s.py):s.sType===0?t.addStroke(s.px,s.py):s.sType===1?t.addArc(s.px,s.py,s.radius,s.arcLarge,s.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${s.sType}`);return t.toJson()}getPerimeter(){let t=0;const r=this.generateContour();let s=0,i=0;for(const o of r.segments)if(o.sType===6)s=o.px,i=o.py;else if(o.sType===0){const a=Math.sqrt((o.px-s)**2+(o.py-i)**2);s=o.px,i=o.py,t+=a}else if(o.sType===1){const a=Mt(s,i,o),u=yt(a.a2-a.a1),l=a.arcCcw?u:yt(2*Math.PI-u),c=o.radius*l;s=o.px,i=o.py,t+=c}else console.log(`err760: contour.getPerimeter has unknown segment type ${o.sType}`);return t}generateRevertOrientation(){let t=this.segments[0];const r=new kt(t.px,t.py);let s=this.segments[0],i=!1;for(const o of this.segments.slice().reverse())if(In(o.sType))i=!0,t=o;else{if(s.sType!==6){const a=new je(s.sType,o.px,o.py,s.radius,s.arcLarge,!s.arcCcw);r.addSeg(a)}s=o,i&&(r.addSeg(t),i=!1)}return r}},J0=class Vt extends Ro{constructor(t,r,s,i=""){super();M(this,"circle",!0);M(this,"px");M(this,"py");M(this,"radius");M(this,"imposedColor");if(this.px=t,this.py=r,this.radius=s,this.imposedColor=i,s<0)throw`err432: iRadius ${s} is negative at circle ix ${t}, iy ${r}`}clone(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}translate(t,r){return new Vt(this.px+t,this.py+r,this.radius,this.imposedColor)}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),o=Z(this.px,this.py).rotate(i,s);return new Vt(o.cx,o.cy,this.radius,this.imposedColor)}draw(t,r,s=de.contour){const[i,o]=qt(this.px,this.py,r),a=Io(this.radius,r),u=this.imposedColor===""?s:this.imposedColor;t.beginPath(),t.arc(i,o,a,0,2*Math.PI,!0),t.strokeStyle=u,t.stroke()}extractSkeleton(){return new Vt(this.px,this.py,this.radius)}generateContour(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(t){const r=[],s=Z(this.px,this.py),i=t*2;r.push(s);for(let o=0;o<i;o++){const a=s.translatePolar(o*2*Math.PI/i,this.radius);r.push(a)}return r}getEnvelop(){return{xMin:this.px-this.radius,xMax:this.px+this.radius,yMin:this.py-this.radius,yMax:this.py+this.radius,orientation:!0}}generateLines(){return[]}check(){return""}toSvg(t,r=""){return N0(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(W0(this.px,this.py,this.radius)),t}toPax(){return G0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}generateRevertOrientation(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}};function is(e,n,t=""){return new K0(e,n,t)}function df(e,n,t,r=""){return new J0(e,n,t,r)}var z0=class qr{constructor(){M(this,"pointList");M(this,"lineList");M(this,"vectorList");M(this,"mainList");M(this,"mainBList");M(this,"secondList");M(this,"secondBList");M(this,"dynamicsList");M(this,"xMin");M(this,"xMax");M(this,"yMin");M(this,"yMax");this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(n){this.pointList.push(n)}addPoints(n){this.pointList.push(...n)}addLine(n){this.lineList.push(n)}addLines(n){for(const t of n)this.lineList.push(t)}addVector(n){this.vectorList.push(n)}addMainOI(n){const t=[];for(const r of n){const s=r.generateContour();this.addPoints(s.generatePoints(2)),this.addLines(s.generateLines()),t.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(t)}addMainO(n){const t=[n];this.addMainOI(t)}addSecond(n){const t=n.generateContour();this.addPoints(t.generatePoints(2)),this.addLines(t.generateLines()),this.secondList.push(t),this.secondBList.push(n.extractSkeleton())}addDynamics(n){this.addPoints(n.generatePoints(2)),this.addLines(n.generateLines()),this.dynamicsList.push(n)}translate(n,t){const r=new qr;for(const s of this.pointList)r.addPoint(s.translate(n,t));for(const s of this.lineList)r.addLine(s.translate(n,t));for(const s of this.vectorList)r.addVector(s.translate(n,t));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(n,t));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(n,t));for(const s of this.dynamicsList)r.addDynamics(s.translate(n,t));return r}translatePolar(n,t){return this.translate(t*Math.cos(n),t*Math.sin(n))}rotate(n,t,r){const s=new qr,i=Z(n,t);for(const o of this.pointList)s.addPoint(o.rotate(i,r));for(const o of this.lineList)s.addLine(o.rotate(i,r));for(const o of this.vectorList)s.addVector(o.rotate(i,r));for(const o of this.mainList){const a=[];for(const u of o)a.push(u.rotate(n,t,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(n,t,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(n,t,r));return s}mergeFigure(n,t=!1){for(const r of n.pointList)this.addPoint(r.clone());for(const r of n.lineList)this.addLine(r.clone());for(const r of n.vectorList)this.addVector(r.clone());for(const r of n.mainList){const s=[];for(const i of r)s.push(i.clone());if(t)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of n.secondList)this.addSecond(r.clone());for(const r of n.dynamicsList)this.addDynamics(r.clone())}mainListC(){const n=[];for(const t of this.mainList)for(const r of t)n.push(r);return n}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=Lo(this.pointList)}getAdjustFull(n,t){let r=Or();return this.pointList.length>0&&(this.getMinMax(),r=Vr(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=Or();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Vr(s,this.xMax,i,this.yMax,n,t)}return r}quantifyRuler(n,t){const s=n/10/t.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*t.scaleX;return[i,o]}drawRuler(n,t,r){const[s,i]=this.quantifyRuler(n.canvas.width,t),o=n.canvas.width-10-i;n.font="15px Arial",n.fillStyle=r,n.fillText(`${s.toFixed(4)}`,o,20),n.beginPath(),n.moveTo(o,25),n.lineTo(o+i,25),n.lineTo(o+i,25+i),n.strokeStyle=r,n.stroke()}draw(n,t,r){if(r.points)for(const s of this.pointList)s.draw(n,t);if(r.lines)for(const s of this.lineList)s.draw(n,t);if(r.vectors)for(const s of this.vectorList)s.draw(n,t);if(r.main)for(const s of this.mainList)for(const[i,o]of s.entries()){let a=de.mainOuter;i>0&&(a=de.mainInner),o.draw(n,t,a)}if(r.mainB)for(const s of this.mainBList)s.draw(n,t,de.mainB);if(r.second)for(const s of this.secondList)s.draw(n,t,de.second);if(r.secondB)for(const s of this.secondBList)s.draw(n,t,de.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(n,t,de.dynamics);if(r.ruler&&this.drawRuler(n,t,de.ruler),r.refframe){for(const s of[10,100,200])Z(s,0).draw(n,t,de.reference,2),Z(-s,0).draw(n,t,de.reference,2),Z(0,s).draw(n,t,de.reference,2),Z(0,-s).draw(n,t,de.reference,2);Z(0,0).draw(n,t,de.origin,2)}}};function Q0(){return new z0}function jr(e){const n=Q0();for(const t in e){const r=e[t];for(const s of r.pointList)n.pointList.push(s);for(const s of r.lineList)n.lineList.push(s);for(const s of r.vectorList)n.vectorList.push(s);for(const s of r.mainList)n.mainList.push(s);for(const s of r.mainBList)n.mainBList.push(s);for(const s of r.secondList)n.secondList.push(s);for(const s of r.secondBList)n.secondBList.push(s);for(const s of r.dynamicsList)n.dynamicsList.push(s)}return n}function pf(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function hf(e){return{points:e.points,lines:e.lines,vectors:e.vectors,main:e.main,mainB:e.mainB,second:e.second,secondB:e.secondB,dynamics:e.dynamics,ruler:e.ruler,refframe:e.refframe}}var el=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(el||{}),zt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function tl(e,n,t){return{val:e,init:n,chg:t}}function nl(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}var rl=class{constructor(e,n=""){M(this,"paramVal",{});M(this,"paramInit",{});M(this,"paramChanged",{});M(this,"partName");M(this,"suffix");M(this,"paramNames");for(const t of e.params)this.paramVal[t.name]=t.init,this.paramInit[t.name]=t.init,this.paramChanged[t.name]=!1;this.suffix=n,this.partName=e.partName,this.paramNames=this.getParamName()}getParamName(){const e=[];for(const n of Object.keys(this.paramVal))e.push(n);return e}getPartName(){return this.partName}getPartNameSuffix(){return this.partName+this.suffix}getSuffix(){return this.suffix}getParamVal(){return this.paramVal}getVal(e){if(this.paramNames.includes(e))return this.paramVal[e];throw`err140: parameter ${e} does not exist in design ${this.partName}`}getInit(e){if(this.paramNames.includes(e))return this.paramInit[e];throw`err149: parameter ${e} does not exist in design ${this.partName}`}getChanged(e){if(this.paramNames.includes(e))return this.paramChanged[e];throw`err156: parameter ${e} does not exist in design ${this.partName}`}setVal(e,n){if(this.paramNames.includes(e))this.paramVal[e]=n,this.paramChanged[e]=!0;else throw`err163: parameter ${e} does not exist in design ${this.partName}`}applyParamVal(e){let n="";for(const t of Object.keys(e))this.setVal(t,e[t]);return n+=`info104: apply ${Object.keys(e).length} parameters on ${this.partName}
|
|
61
|
+
`}stringify(){return this.close(),this.dxfStr}};function Y0(){return new H0}function G0(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var Z0=class{constructor(){M(this,"seg");this.seg=[]}addStart(e,n){this.seg=[];const t={typ:0,px:e,py:n};this.seg.push(t)}addStroke(e,n){const t={typ:1,px:e,py:n};this.seg.push(t)}addArc(e,n,t,r,s){const i={typ:2,px:e,py:n,radius:t,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function X0(){return new Z0}var Ro=class{};function Oo(e,n,t,r){const s=Mt(e,n,t),i=Z(s.pc.cx,s.pc.cy),o=yt(s.a2-s.a1),u=(t.arcCcw?o:o-2*Math.PI)/r,l=[];for(let c=1;c<r;c++)l.push(i.translatePolar(s.a1+c*u,t.radius));return l}var K0=class kt extends Ro{constructor(t,r,s=""){super();M(this,"circle",!1);M(this,"segments");M(this,"points");M(this,"debugPoints");M(this,"debugLines");M(this,"lastPoint");M(this,"imposedColor");this.segments=[new je(6,t,r,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=Z(t,r),this.imposedColor=s}setLastPoint(t,r){this.lastPoint=Z(t,r)}getLastPoint(){return this.lastPoint}getFirstPoint(){return Z(this.segments[0].px,this.segments[0].py)}addPointA(t,r){if(this.points.length>2)throw`err311: contour add too much point ${t} ${r}`;return this.points.push(Z(t,r)),this}addPointAP(t,r){const s=Z(0,0).translatePolar(t,r);return this.addPointA(s.cx,s.cy),this}addPointR(t,r){const i=this.getLastPoint().translate(t,r);return this.addPointA(i.cx,i.cy),this}addPointRP(t,r){const i=this.getLastPoint().translatePolar(t,r);return this.addPointA(i.cx,i.cy),this}addSeg(t){return this.segments.push(t),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const t=this.points.pop();if(t!==void 0){const r=new je(0,t.cx,t.cy,0);t.isEqual(this.getLastPoint())||(this.addSeg(r),this.setLastPoint(t.cx,t.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(t,r){return this.addPointA(t,r).addSegStroke(),this}addSegStrokeAP(t,r){return this.addPointAP(t,r).addSegStroke(),this}addSegStrokeR(t,r){return this.addPointR(t,r).addSegStroke(),this}addSegStrokeRP(t,r){return this.addPointRP(t,r).addSegStroke(),this}addSegArc(t,r,s){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const i=this.points.pop();if(i!==void 0){const o=new je(1,i.cx,i.cy,t,r,s);i.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${ut(i.cx)} ${ut(i.cy)}`):(this.addSeg(o),this.setLastPoint(i.cx,i.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 with unexpected points.length ${this.points.length}`;const t=this.points.pop(),r=this.points.pop();if(r!==void 0&&t!==void 0){const s=this.getLastPoint(),i=S0(s,r,t),o=i.distanceToPoint(s),a=s.middlePoint(t),u=a.angleToPoint(s),l=a.angleToPoint(r),c=le(l-u);let h=!1,m=!1;if(!a.isEqual(i)){const x=a.angleToPoint(i),y=le(x-u);Math.sign(y)*Math.sign(c)>0&&(h=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(o,h,m),this.debugPoints.push(r)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(t,r){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=Ur(i,s);let a=s;r&&(a=i);const u=er(a.cx,a.cy,t+Math.PI/2),l=o.intersection(u),c=l.distanceToPoint(i),h=i.middlePoint(s),m=a.angleToPoint(h),x=le(t-m);let y=!1;Math.abs(x)>Math.PI/2&&(y=!0);let f=!1;x<0&&(f=!0),r||(f=!f),this.addPointA(s.cx,s.cy).addSegArc(c,y,f),this.debugPoints.push(h),this.debugPoints.push(l)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(t,r){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=i.distanceToPoint(s),a=i.angleToPoint(s),u=s.angleToPoint(i),l=le(t-a),c=-1*le(r-u);if(Math.abs(l)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${l}`;if(Math.abs(c)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${c}`;if(ne(l)===0)throw`err765: addSeg2Arcs with almost zero au ${l}`;if(ne(c)===0)throw`err766: addSeg2Arcs with almost zero av ${c}`;if(Math.sign(l)*Math.sign(c)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${l} ${c}`;const h=Math.tan(l/2),m=Math.tan(c/2),x=o*m/(m+h),y=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),d=o*h/(m+h),p=Math.abs(d/Math.sin(c)),g=i.translatePolar(a+l/2,f);let D=!1;Math.sign(l)<0&&(D=!0),this.addPointA(g.cx,g.cy).addSegArc(y,!1,D),this.addPointA(s.cx,s.cy).addSegArc(p,!1,D),this.debugPoints.push(i.translatePolar(a,x)),this.debugPoints.push(i.translatePolar(a+l-Math.sign(l)*Math.PI/2,y)),this.debugPoints.push(s.translatePolar(u-c+Math.sign(l)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addSegStrokeAifBig(t,r,s,i){const o=this.getLastPoint();if(Math.sqrt((t-o.cx)**2+(r-o.cy)**2)>s)this.addPointA(t,r).addSegStroke();else if(i){const u=this.segments[this.segments.length-1];if(u.sType===0)this.segments.pop(),this.addPointA(t,r).addSegStroke();else if(u.sType===1)this.segments.pop(),this.addPointA(t,r).addSegArc(u.radius,u.arcLarge,u.arcCcw);else throw`err186: addSegStrokeA-ifBig used after eStart or eCorner ${u.sType} at segment ${this.segments.length}`}return this}addCornerPointed(){const t=new je(2,0,0,0);return this.addSeg(t),this}addCornerRounded(t){const r=new je(3,0,0,t);return this.addSeg(r),this}addCornerWidened(t){const r=new je(4,0,0,t);return this.addSeg(r),this}addCornerWideAcc(t){const r=new je(5,0,0,t);return this.addSeg(r),this}closeSegStroke(){const t=this.segments[0].px,r=this.segments[0].py;return this.addSegStrokeA(t,r),this}closeSegArc(t,r,s){const i=this.segments[0].px,o=this.segments[0].py;return this.addPointA(i,o).addSegArc(t,r,s),this}clone(){const t=new kt(this.segments[0].px,this.segments[0].py);for(const r of this.segments){const s=r.clone();s.sType!==6&&(t.addSeg(s),ze(s.sType)&&t.setLastPoint(s.px,s.py))}return t}translate(t,r){const s=this.segments[0].px+t,i=this.segments[0].py+r,o=new kt(s,i);for(const a of this.segments){const u=a.clone();ze(a.sType)&&(u.px+=t,u.py+=r),u.sType!==6&&(o.addSeg(u),ze(u.sType)&&o.setLastPoint(u.px,u.py))}return o}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),a=Z(this.segments[0].px,this.segments[0].py).rotate(i,s),u=new kt(a.cx,a.cy);for(const l of this.segments){const c=l.clone();if(ze(l.sType)){const m=Z(c.px,c.py).rotate(i,s);c.px=m.cx,c.py=m.cy}c.sType!==6&&(u.addSeg(c),ze(c.sType)&&u.setLastPoint(c.px,c.py))}return u}scale(t,r,s,i=!1){const o=Z(t,r),u=Z(this.segments[0].px,this.segments[0].py).scale(o,s),l=new kt(u.cx,u.cy);for(const c of this.segments){const h=c.clone();if(ze(c.sType)){const x=Z(h.px,h.py).scale(o,s);h.px=x.cx,h.py=x.cy}c.sType===1&&(h.radius*=s),Vn(c.sType)&&i&&(h.radius*=s),h.sType!==6&&(l.addSeg(h),ze(h.sType)&&l.setLastPoint(h.px,h.py))}return l}addPartial(t){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let r=t;if(t.segments.length>0){const s=t.segments[0],i=this.getLastPoint(),o=s.px-i.cx,a=s.py-i.cy;s.sType===6&&(r=t.translate(-o,-a))}for(const s of r.segments)s.sType!==6&&(this.addSeg(s),ze(s.sType)&&this.setLastPoint(s.px,s.py));return this}draw(t,r,s=de.contour){const i=this.imposedColor===""?s:this.imposedColor;let o=0,a=0;for(const u of this.segments){if(u.sType===0){const[l,c]=qt(o,a,r),[h,m]=qt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(h,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Mt(o,a,u),[c,h]=qt(l.pc.cx,l.pc.cy,r),m=Io(u.radius,r);t.beginPath(),t.arc(c,h,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}cn(u.sType)&&(o=u.px,a=u.py)}}extractSkeleton(){const t=this.segments[0],r=new kt(t.px,t.py);for(const s of this.segments)ze(s.sType)&&r.addSeg(s);return r}generateContour(){Bt.clearPoints(),Bt.clearLines();const t=[],r=[];let s=0,i=0,o=0;for(const c of this.segments){if(c.sType===0){const x=Z(i,o),y=Z(c.px,c.py),f=Z(0,0);t.push(new He(c.sType,x,y,f,0,0,0,!1)),s=1}if(c.sType===1){const x=Mt(i,o,c);t.push(x),s=1}const h=t.at(-1),m=t.at(-2);if(h!==void 0&&m!==void 0&&ze(h.sType)&&In(m.sType)){const x=t.pop(),y=t.pop(),f=t.pop();if(f!==void 0&&y!==void 0&&x!==void 0){const d=bi(f,y,x);t.push(...d)}else throw"err603: contour generateContour internal error"}if(In(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&Vn(c.sType)&&c.radius>0){const x=Z(0,0);r.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}if(s===1&&Vn(c.sType)&&c.radius>0){const x=Z(0,0);t.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}s=2}cn(c.sType)&&(i=c.px,o=c.py)}if(r.length>0)if(s===1)t.push(...r);else throw"err397: contour generateContour Corners defined at end and begining";const a=t.at(-1);if(a!==void 0&&In(a.sType)){const c=t[0],h=t.pop(),m=t.pop();if(m!==void 0&&h!==void 0&&c!==void 0){const x=bi(m,h,c);t.push(...x.slice(0,-1));const y=x.at(-1);if(y!==void 0)t[0]=y;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const u=t[0],l=new kt(u.p1.cx,u.p1.cy,this.imposedColor);l.debugPoints.push(...Bt.getPoints()),l.debugLines.push(...Bt.getLines());for(const c of t)if(c.sType===0)l.addSegStrokeA(c.p2.cx,c.p2.cy);else if(c.sType===1){const h=T0(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(h.radius,h.arcLarge,h.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${c.sType}`;return l}generatePoints(t){const r=[];let s=0,i=0;for(const o of this.segments){if(o.sType===1)try{const a=Oo(s,i,o,t);r.push(...a)}catch(a){console.log("err453: "+a)}cn(o.sType)&&(s=o.px,i=o.py,r.push(Z(s,i)))}return r}getOrientation(t,r,s){const o=t.slice(1);let a=0,u=o.at(-3),l=o.at(-2),c=o.at(-1),h=-1;for(const[x,y]of o.entries()){u=l,l=c,c=y;const f=s?l.cx>r-.001:l.cx<r+.001,d=s?u.cx>r-.001:u.cx<r+.001;if(f&&!d){const p=u.cx-l.cx,g=u.cy-l.cy,D=c.cx-l.cx,_=c.cy-l.cy,w=D*g-_*p;a=Math.sign(w),h=x}}if(a===0)throw`err299: Orientation not found with ${o.length} points and foundIdx ${h}`;return a>0}getEnvelop(){const t=this.generatePoints(24),r=[],s=[];for(const h of t)r.push(h.cx),s.push(h.cy);const i=Math.min(...r),o=Math.max(...r),a=Math.min(...s),u=Math.max(...s),l=this.getOrientation(t,i,!1),c=this.getOrientation(t,o,!0);if(c!==l)throw`err390: orientation unstable ${l} ${c} with ${t.length} points`;return{xMin:i,xMax:o,yMin:a,yMax:u,orientation:l}}generateLines(){const t=[];return t.push(...this.debugLines),t}checkContour(t){if(t.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${t.segments[0].sType}`;let r=0,s=0;for(const a of t.segments){if(a.sType===1)try{Mt(r,s,a)}catch(u){throw`err778: ${u}`}cn(a.sType)&&(r=a.px,s=a.py)}const i=t.segments[0].px,o=t.segments[0].py;if(ne(r-i)!==0||ne(s-o)!==0)throw`err414: contour check, contour is not closed px ${i} ${r} py ${i} ${o}`}check(){Bt.clearMsg(),this.checkContour(this);const t=this.generateContour();return this.checkContour(t),Bt.getMsg()}toSvg(t,r=""){const s=O0();for(const o of this.segments)o.sType===6?s.addStart(o.px,t-o.py):o.sType===0?s.addStroke(o.px,t-o.py):o.sType===1?s.addArc(o.px,t-o.py,o.radius,o.arcLarge,!o.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${o.sType}`);return s.stringify(r)}toDxfSeg(){const t=[];let r=0,s=0;for(const i of this.segments){if(i.sType===0)t.push(q0(r,s,i.px,i.py));else if(i.sType===1)try{const o=Mt(r,s,i);t.push(j0(o.pc.cx,o.pc.cy,i.radius,o.a1,o.a2,o.arcCcw))}catch(o){console.log("err413: "+o)}cn(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=X0();for(const s of this.segments)s.sType===6?t.addStart(s.px,s.py):s.sType===0?t.addStroke(s.px,s.py):s.sType===1?t.addArc(s.px,s.py,s.radius,s.arcLarge,s.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${s.sType}`);return t.toJson()}getPerimeter(){let t=0;const r=this.generateContour();let s=0,i=0;for(const o of r.segments)if(o.sType===6)s=o.px,i=o.py;else if(o.sType===0){const a=Math.sqrt((o.px-s)**2+(o.py-i)**2);s=o.px,i=o.py,t+=a}else if(o.sType===1){const a=Mt(s,i,o),u=yt(a.a2-a.a1),l=a.arcCcw?u:yt(2*Math.PI-u),c=o.radius*l;s=o.px,i=o.py,t+=c}else console.log(`err760: contour.getPerimeter has unknown segment type ${o.sType}`);return t}generateRevertOrientation(){let t=this.segments[0];const r=new kt(t.px,t.py);let s=this.segments[0],i=!1;for(const o of this.segments.slice().reverse())if(In(o.sType))i=!0,t=o;else{if(s.sType!==6){const a=new je(s.sType,o.px,o.py,s.radius,s.arcLarge,!s.arcCcw);r.addSeg(a)}s=o,i&&(r.addSeg(t),i=!1)}return r}},J0=class Vt extends Ro{constructor(t,r,s,i=""){super();M(this,"circle",!0);M(this,"px");M(this,"py");M(this,"radius");M(this,"imposedColor");if(this.px=t,this.py=r,this.radius=s,this.imposedColor=i,s<0)throw`err432: iRadius ${s} is negative at circle ix ${t}, iy ${r}`}clone(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}translate(t,r){return new Vt(this.px+t,this.py+r,this.radius,this.imposedColor)}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),o=Z(this.px,this.py).rotate(i,s);return new Vt(o.cx,o.cy,this.radius,this.imposedColor)}draw(t,r,s=de.contour){const[i,o]=qt(this.px,this.py,r),a=Io(this.radius,r),u=this.imposedColor===""?s:this.imposedColor;t.beginPath(),t.arc(i,o,a,0,2*Math.PI,!0),t.strokeStyle=u,t.stroke()}extractSkeleton(){return new Vt(this.px,this.py,this.radius)}generateContour(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(t){const r=[],s=Z(this.px,this.py),i=t*2;r.push(s);for(let o=0;o<i;o++){const a=s.translatePolar(o*2*Math.PI/i,this.radius);r.push(a)}return r}getEnvelop(){return{xMin:this.px-this.radius,xMax:this.px+this.radius,yMin:this.py-this.radius,yMax:this.py+this.radius,orientation:!0}}generateLines(){return[]}check(){return""}toSvg(t,r=""){return N0(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(W0(this.px,this.py,this.radius)),t}toPax(){return G0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}generateRevertOrientation(){return new Vt(this.px,this.py,this.radius,this.imposedColor)}};function is(e,n,t=""){return new K0(e,n,t)}function df(e,n,t,r=""){return new J0(e,n,t,r)}var z0=class qr{constructor(){M(this,"pointList");M(this,"lineList");M(this,"vectorList");M(this,"mainList");M(this,"mainBList");M(this,"secondList");M(this,"secondBList");M(this,"dynamicsList");M(this,"xMin");M(this,"xMax");M(this,"yMin");M(this,"yMax");this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(n){this.pointList.push(n)}addPoints(n){this.pointList.push(...n)}addLine(n){this.lineList.push(n)}addLines(n){for(const t of n)this.lineList.push(t)}addVector(n){this.vectorList.push(n)}addMainOI(n){const t=[];for(const r of n){const s=r.generateContour();this.addPoints(s.generatePoints(2)),this.addLines(s.generateLines()),t.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(t)}addMainO(n){const t=[n];this.addMainOI(t)}addSecond(n){const t=n.generateContour();this.addPoints(t.generatePoints(2)),this.addLines(t.generateLines()),this.secondList.push(t),this.secondBList.push(n.extractSkeleton())}addDynamics(n){this.addPoints(n.generatePoints(2)),this.addLines(n.generateLines()),this.dynamicsList.push(n)}translate(n,t){const r=new qr;for(const s of this.pointList)r.addPoint(s.translate(n,t));for(const s of this.lineList)r.addLine(s.translate(n,t));for(const s of this.vectorList)r.addVector(s.translate(n,t));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(n,t));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(n,t));for(const s of this.dynamicsList)r.addDynamics(s.translate(n,t));return r}translatePolar(n,t){return this.translate(t*Math.cos(n),t*Math.sin(n))}rotate(n,t,r){const s=new qr,i=Z(n,t);for(const o of this.pointList)s.addPoint(o.rotate(i,r));for(const o of this.lineList)s.addLine(o.rotate(i,r));for(const o of this.vectorList)s.addVector(o.rotate(i,r));for(const o of this.mainList){const a=[];for(const u of o)a.push(u.rotate(n,t,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(n,t,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(n,t,r));return s}mergeFigure(n,t=!1){for(const r of n.pointList)this.addPoint(r.clone());for(const r of n.lineList)this.addLine(r.clone());for(const r of n.vectorList)this.addVector(r.clone());for(const r of n.mainList){const s=[];for(const i of r)s.push(i.clone());if(t)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of n.secondList)this.addSecond(r.clone());for(const r of n.dynamicsList)this.addDynamics(r.clone())}mainListC(){const n=[];for(const t of this.mainList)for(const r of t)n.push(r);return n}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=Lo(this.pointList)}getAdjustFull(n,t){let r=Or();return this.pointList.length>0&&(this.getMinMax(),r=Vr(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=Or();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Vr(s,this.xMax,i,this.yMax,n,t)}return r}quantifyRuler(n,t){const s=n/10/t.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*t.scaleX;return[i,o]}drawRuler(n,t,r){const[s,i]=this.quantifyRuler(n.canvas.width,t),o=n.canvas.width-10-i;n.font="15px Arial",n.fillStyle=r,n.fillText(`${s.toFixed(4)}`,o,20),n.beginPath(),n.moveTo(o,25),n.lineTo(o+i,25),n.lineTo(o+i,25+i),n.strokeStyle=r,n.stroke()}draw(n,t,r){if(r.points)for(const s of this.pointList)s.draw(n,t);if(r.lines)for(const s of this.lineList)s.draw(n,t);if(r.vectors)for(const s of this.vectorList)s.draw(n,t);if(r.main)for(const s of this.mainList)for(const[i,o]of s.entries()){let a=de.mainOuter;i>0&&(a=de.mainInner),o.draw(n,t,a)}if(r.mainB)for(const s of this.mainBList)s.draw(n,t,de.mainB);if(r.second)for(const s of this.secondList)s.draw(n,t,de.second);if(r.secondB)for(const s of this.secondBList)s.draw(n,t,de.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(n,t,de.dynamics);if(r.ruler&&this.drawRuler(n,t,de.ruler),r.refframe){for(const s of[10,100,200])Z(s,0).draw(n,t,de.reference,2),Z(-s,0).draw(n,t,de.reference,2),Z(0,s).draw(n,t,de.reference,2),Z(0,-s).draw(n,t,de.reference,2);Z(0,0).draw(n,t,de.origin,2)}}};function Q0(){return new z0}function jr(e){const n=Q0();for(const t in e){const r=e[t];for(const s of r.pointList)n.pointList.push(s);for(const s of r.lineList)n.lineList.push(s);for(const s of r.vectorList)n.vectorList.push(s);for(const s of r.mainList)n.mainList.push(s);for(const s of r.mainBList)n.mainBList.push(s);for(const s of r.secondList)n.secondList.push(s);for(const s of r.secondBList)n.secondBList.push(s);for(const s of r.dynamicsList)n.dynamicsList.push(s)}return n}function pf(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function hf(e){return{points:e.points,lines:e.lines,vectors:e.vectors,main:e.main,mainB:e.mainB,second:e.second,secondB:e.secondB,dynamics:e.dynamics,ruler:e.ruler,refframe:e.refframe}}var el=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(el||{}),zt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function tl(e,n,t){return{val:e,init:n,chg:t}}function nl(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}var rl=class{constructor(e,n=""){M(this,"paramVal",{});M(this,"paramInit",{});M(this,"paramChanged",{});M(this,"partName");M(this,"suffix");M(this,"paramNames");for(const t of e.params)this.paramVal[t.name]=t.init,this.paramInit[t.name]=t.init,this.paramChanged[t.name]=!1;this.suffix=n,this.partName=e.partName,this.paramNames=this.getParamName()}getParamName(){const e=[];for(const n of Object.keys(this.paramVal))e.push(n);return e}getPartName(){return this.partName}getPartNameSuffix(){return this.partName+this.suffix}getSuffix(){return this.suffix}getParamVal(){return this.paramVal}getVal(e){if(this.paramNames.includes(e))return this.paramVal[e];throw`err140: parameter ${e} does not exist in design ${this.partName}`}getInit(e){if(this.paramNames.includes(e))return this.paramInit[e];throw`err149: parameter ${e} does not exist in design ${this.partName}`}getChanged(e){if(this.paramNames.includes(e))return this.paramChanged[e];throw`err156: parameter ${e} does not exist in design ${this.partName}`}setVal(e,n){if(this.paramNames.includes(e))this.paramVal[e]=n,this.paramChanged[e]=!0;else throw`err163: parameter ${e} does not exist in design ${this.partName}`}applyParamVal(e){let n="";for(const t of Object.keys(e))this.setVal(t,e[t]);return n+=`info104: apply ${Object.keys(e).length} parameters on ${this.partName}
|
|
62
62
|
`,n}applyParamList(e){return this.applyParamVal(nl(e))}getDesignParamList(){const e={};for(const n of this.paramNames)e[n]=tl(this.getVal(n),this.getInit(n),this.getChanged(n));return e}};function mf(e,n=""){return new rl(e,n)}function xf(e,n,t,r=0,s=100,i=1){return{name:e,unit:n,init:t,min:r,max:s,step:i,dropdown:[],pType:0}}function gf(e,n){return{name:e,unit:"checkbox",init:n?1:0,min:0,max:1,step:1,dropdown:[],pType:1}}function Df(e,n,t=0){let r=0;return t<n.length&&(r=t),{name:e,unit:"dropdown",init:r,min:0,max:n.length-1,step:1,dropdown:n,pType:2}}function wf(e){return{name:e,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var sl=(e=>(e[e.eLinearOrtho=0]="eLinearOrtho",e[e.eRotate=1]="eRotate",e))(sl||{}),il=(e=>(e[e.eIdentity=0]="eIdentity",e[e.eIntersection=1]="eIntersection",e[e.eUnion=2]="eUnion",e[e.eSubstraction=3]="eSubstraction",e))(il||{});function yf(e){return{partName:e,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}function bf(e){if(e.calcErr){let n=`err182: Error in sub-design ${e.partName}
|
|
63
63
|
`;throw n+=ol(e.logstr,e.partName),n}}function ol(e,n){let t="";for(const r of e.split(`
|
|
64
64
|
`))r!==""&&(t+=`[${n}]: ${r}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.
|
|
2
|
-
var G=r=>{throw TypeError(r)};var K=(r,e,s)=>e.has(r)||G("Cannot "+s);var u=(r,e,s)=>(K(r,e,"read from private field"),s?s.call(r):e.get(r)),L=(r,e,s)=>e.has(r)?G("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,s),T=(r,e,s,o)=>(K(r,e,"write to private field"),o?o.call(r,s):e.set(r,s),s);import{h as N,K as Q,b as X,E as Z,d as M,R as $,g as ee,D as S,a2 as te,j as _,a6 as re,a7 as se,a0 as ne,p as ae,o as oe,u as ce,a8 as j,a9 as ie,f as k,s as ue,a as le,c as de,r as fe,x as D,t as me}from"../chunks/BwBztTFZ.js";import{h as he,m as _e,u as ve,t as Y,a as E,c as I,b as ge,s as ye}from"../chunks/iIw5Yrdx.js";import{p as V,a as be,i as U,b as q}from"../chunks/DpbigbqS.js";import{o as Ee}from"../chunks/Bke29ZwM.js";function F(r,e,s){N&&Q();var o=r,a,i;X(()=>{a!==(a=e())&&(i&&($(i),i=null),a&&(i=M(()=>s(o,a))))},Z),N&&(o=ee)}function Pe(r){return class extends Re{constructor(e){super({component:r,...e})}}}var v,d;class Re{constructor(e){L(this,v);L(this,d);var i;var s=new Map,o=(t,n)=>{var c=ne(n);return s.set(t,c),c};const a=new Proxy({...e.props||{},$$events:{}},{get(t,n){return _(s.get(n)??o(n,Reflect.get(t,n)))},has(t,n){return n===te?!0:(_(s.get(n)??o(n,Reflect.get(t,n))),Reflect.has(t,n))},set(t,n,c){return S(s.get(n)??o(n,c),c),Reflect.set(t,n,c)}});T(this,d,(e.hydrate?he:_e)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((i=e==null?void 0:e.props)!=null&&i.$$host)||e.sync===!1)&&re(),T(this,v,a.$$events);for(const t of Object.keys(u(this,d)))t==="$set"||t==="$destroy"||t==="$on"||se(this,t,{get(){return u(this,d)[t]},set(n){u(this,d)[t]=n},enumerable:!0});u(this,d).$set=t=>{Object.assign(a,t)},u(this,d).$destroy=()=>{ve(u(this,d))}}$set(e){u(this,d).$set(e)}$on(e,s){u(this,v)[e]=u(this,v)[e]||[];const o=(...a)=>s.call(this,...a);return u(this,v)[e].push(o),()=>{u(this,v)[e]=u(this,v)[e].filter(a=>a!==o)}}$destroy(){u(this,d).$destroy()}}v=new WeakMap,d=new WeakMap;const xe="modulepreload",we=function(r){return"/"+r},W={},O=function(e,s,o){let a=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),n=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));a=Promise.allSettled(s.map(c=>{if(c=we(c),c in W)return;W[c]=!0;const g=c.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${x}`))return;const m=document.createElement("link");if(m.rel=g?"stylesheet":xe,g||(m.as="script"),m.crossOrigin="",m.href=c,n&&m.setAttribute("nonce",n),document.head.appendChild(m),g)return new Promise((A,C)=>{m.addEventListener("load",A),m.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(t){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=t,window.dispatchEvent(n),!n.defaultPrevented)throw t}return a.then(t=>{for(const n of t||[])n.status==="rejected"&&i(n.reason);return e().catch(i)})},Ue={};var ke=Y('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Oe=Y("<!> <!>",1);function Se(r,e){ae(e,!0);let s=V(e,"components",23,()=>[]),o=V(e,"data_0",3,null),a=V(e,"data_1",3,null);oe(()=>e.stores.page.set(e.page)),ce(()=>{e.stores,e.page,e.constructors,s(),e.form,o(),a(),e.stores.page.notify()});let i=j(!1),t=j(!1),n=j(null);Ee(()=>{const l=e.stores.page.subscribe(()=>{_(i)&&(S(t,!0),ie().then(()=>{S(n,be(document.title||"untitled page"))}))});return S(i,!0),l});const c=D(()=>e.constructors[1]);var g=Oe(),x=k(g);{var m=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form},children:(f,Le)=>{var B=I(),z=k(B);F(z,()=>_(c),(H,J)=>{q(J(H,{get data(){return a()},get form(){return e.form}}),w=>s()[1]=w,()=>{var w;return(w=s())==null?void 0:w[1]})}),E(f,B)},$$slots:{default:!0}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)},A=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)};U(x,l=>{e.constructors[1]?l(m):l(A,!1)})}var C=ue(x,2);{var p=l=>{var h=ke(),P=de(h);{var R=y=>{var b=ge();me(()=>ye(b,_(n))),E(y,b)};U(P,y=>{_(t)&&y(R)})}fe(h),E(l,h)};U(C,l=>{_(i)&&l(p)})}E(r,g),le()}const qe=Pe(Se),Fe=[()=>O(()=>import("../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.CDA_Nshd.js","_app/immutable/chunks/iIw5Yrdx.js","_app/immutable/chunks/BwBztTFZ.js","_app/immutable/chunks/vHZsYl-F.js","_app/immutable/chunks/C5YK61bY.js","_app/immutable/chunks/nly6OBCW.js","_app/immutable/assets/0.D3ep0F2Z.css","_app/immutable/nodes/1.C0_iuzRT.js","_app/immutable/chunks/FpZwEl-R.js","_app/immutable/chunks/C0W53cED.js","_app/immutable/chunks/CYKRgQr_.js","_app/immutable/chunks/Bke29ZwM.js","_app/immutable/nodes/2.C81mVb7y.js","_app/immutable/chunks/BDffofGV.js","_app/immutable/assets/2.BTCojHq8.css","_app/immutable/nodes/3.Bjeiju6o.js","_app/immutable/chunks/DpbigbqS.js","_app/immutable/assets/3.DKegludn.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var G=r=>{throw TypeError(r)};var K=(r,e,s)=>e.has(r)||G("Cannot "+s);var u=(r,e,s)=>(K(r,e,"read from private field"),s?s.call(r):e.get(r)),L=(r,e,s)=>e.has(r)?G("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,s),T=(r,e,s,o)=>(K(r,e,"write to private field"),o?o.call(r,s):e.set(r,s),s);import{h as N,K as Q,b as X,E as Z,d as M,R as $,g as ee,D as S,a2 as te,j as _,a6 as re,a7 as se,a0 as ne,p as ae,o as oe,u as ce,a8 as j,a9 as ie,f as k,s as ue,a as le,c as de,r as fe,x as D,t as me}from"../chunks/BwBztTFZ.js";import{h as he,m as _e,u as ve,t as Y,a as E,c as I,b as ge,s as ye}from"../chunks/iIw5Yrdx.js";import{p as V,a as be,i as U,b as q}from"../chunks/DpbigbqS.js";import{o as Ee}from"../chunks/Bke29ZwM.js";function F(r,e,s){N&&Q();var o=r,a,i;X(()=>{a!==(a=e())&&(i&&($(i),i=null),a&&(i=M(()=>s(o,a))))},Z),N&&(o=ee)}function Pe(r){return class extends Re{constructor(e){super({component:r,...e})}}}var v,d;class Re{constructor(e){L(this,v);L(this,d);var i;var s=new Map,o=(t,n)=>{var c=ne(n);return s.set(t,c),c};const a=new Proxy({...e.props||{},$$events:{}},{get(t,n){return _(s.get(n)??o(n,Reflect.get(t,n)))},has(t,n){return n===te?!0:(_(s.get(n)??o(n,Reflect.get(t,n))),Reflect.has(t,n))},set(t,n,c){return S(s.get(n)??o(n,c),c),Reflect.set(t,n,c)}});T(this,d,(e.hydrate?he:_e)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((i=e==null?void 0:e.props)!=null&&i.$$host)||e.sync===!1)&&re(),T(this,v,a.$$events);for(const t of Object.keys(u(this,d)))t==="$set"||t==="$destroy"||t==="$on"||se(this,t,{get(){return u(this,d)[t]},set(n){u(this,d)[t]=n},enumerable:!0});u(this,d).$set=t=>{Object.assign(a,t)},u(this,d).$destroy=()=>{ve(u(this,d))}}$set(e){u(this,d).$set(e)}$on(e,s){u(this,v)[e]=u(this,v)[e]||[];const o=(...a)=>s.call(this,...a);return u(this,v)[e].push(o),()=>{u(this,v)[e]=u(this,v)[e].filter(a=>a!==o)}}$destroy(){u(this,d).$destroy()}}v=new WeakMap,d=new WeakMap;const xe="modulepreload",we=function(r){return"/"+r},W={},O=function(e,s,o){let a=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),n=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));a=Promise.allSettled(s.map(c=>{if(c=we(c),c in W)return;W[c]=!0;const g=c.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${x}`))return;const m=document.createElement("link");if(m.rel=g?"stylesheet":xe,g||(m.as="script"),m.crossOrigin="",m.href=c,n&&m.setAttribute("nonce",n),document.head.appendChild(m),g)return new Promise((A,C)=>{m.addEventListener("load",A),m.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(t){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=t,window.dispatchEvent(n),!n.defaultPrevented)throw t}return a.then(t=>{for(const n of t||[])n.status==="rejected"&&i(n.reason);return e().catch(i)})},Ue={};var ke=Y('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Oe=Y("<!> <!>",1);function Se(r,e){ae(e,!0);let s=V(e,"components",23,()=>[]),o=V(e,"data_0",3,null),a=V(e,"data_1",3,null);oe(()=>e.stores.page.set(e.page)),ce(()=>{e.stores,e.page,e.constructors,s(),e.form,o(),a(),e.stores.page.notify()});let i=j(!1),t=j(!1),n=j(null);Ee(()=>{const l=e.stores.page.subscribe(()=>{_(i)&&(S(t,!0),ie().then(()=>{S(n,be(document.title||"untitled page"))}))});return S(i,!0),l});const c=D(()=>e.constructors[1]);var g=Oe(),x=k(g);{var m=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form},children:(f,Le)=>{var B=I(),z=k(B);F(z,()=>_(c),(H,J)=>{q(J(H,{get data(){return a()},get form(){return e.form}}),w=>s()[1]=w,()=>{var w;return(w=s())==null?void 0:w[1]})}),E(f,B)},$$slots:{default:!0}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)},A=l=>{var h=I();const P=D(()=>e.constructors[0]);var R=k(h);F(R,()=>_(P),(y,b)=>{q(b(y,{get data(){return o()},get form(){return e.form}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),E(l,h)};U(x,l=>{e.constructors[1]?l(m):l(A,!1)})}var C=ue(x,2);{var p=l=>{var h=ke(),P=de(h);{var R=y=>{var b=ge();me(()=>ye(b,_(n))),E(y,b)};U(P,y=>{_(t)&&y(R)})}fe(h),E(l,h)};U(C,l=>{_(i)&&l(p)})}E(r,g),le()}const qe=Pe(Se),Fe=[()=>O(()=>import("../nodes/0.CDA_Nshd.js"),__vite__mapDeps([0,1,2,3,4,5,6])),()=>O(()=>import("../nodes/1.C0_iuzRT.js"),__vite__mapDeps([7,1,2,8,9,10,11,5])),()=>O(()=>import("../nodes/2.C81mVb7y.js"),__vite__mapDeps([12,1,2,8,3,13,5,14])),()=>O(()=>import("../nodes/3.Bjeiju6o.js"),__vite__mapDeps([15,13,3,2,1,10,11,5,16,4,9,8,17]))],Be=[],Ge={"/":[2],"/[...design]":[3]},Ae={handleError:({error:r})=>{console.error(r)},reroute:()=>{},transport:{}},Ce=Object.fromEntries(Object.entries(Ae.transport).map(([r,e])=>[r,e.decode])),Ke=!1,Ne=(r,e)=>Ce[r](e);export{Ne as decode,Ce as decoders,Ge as dictionary,Ke as hash,Ae as hooks,Ue as matchers,Fe as nodes,qe as root,Be as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,b as r}from"../chunks/CYKRgQr_.js";export{o as load_css,r as start};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as g,a as u,s as w}from"../chunks/iIw5Yrdx.js";import{p as P,s as e,f as v,a as j,c as t,r as a,n as k,y as o,t as S}from"../chunks/BwBztTFZ.js";import{D,s as O,e as z}from"../chunks/
|
|
1
|
+
import{t as g,a as u,s as w}from"../chunks/iIw5Yrdx.js";import{p as P,s as e,f as v,a as j,c as t,r as a,n as k,y as o,t as S}from"../chunks/BwBztTFZ.js";import{D,s as O,e as z}from"../chunks/vHZsYl-F.js";import{s as C}from"../chunks/C5YK61bY.js";import{b as M}from"../chunks/nly6OBCW.js";const T=!0,L=Object.freeze(Object.defineProperty({__proto__:null,prerender:T},Symbol.toStringTag,{value:"Module"})),W="designix-ui",q="1.0.0",A={designix:"^1.0.13",geometrix:"^1.0.13",geomui:"^1.0.13"},B={name:W,version:q,dependencies:A};var E=g(" <br>",1),F=g(`<h1 class="svelte-im9xuh">Welcome to designix-ui</h1> <h6 class="svelte-im9xuh">Showcasing the usage of the <a href="https://svelte.dev/">svelte</a> library <a href="https://www.npmjs.com/package/geomui">geomui</a>.</h6> <nav class="svelte-im9xuh"><a class="svelte-im9xuh">index: list of designs</a></nav> <main class="svelte-im9xuh"><!></main> <footer class="svelte-im9xuh"><article><a href="https://github.com/charlyoleg2/parametrix">designix-ui</a>, a minimalist showcase
|
|
2
2
|
of <a href="https://www.npmjs.com/package/geomui">geomui</a>.</article> <article><h3>Designix-ui version</h3> <code></code></article> <article><h3>Parametrix</h3> <ol><li><a href="https://github.com/charlyoleg2/parametrix">Parametrix repo</a></li> <li><a href="https://charlyoleg2.github.io/parametrix/">Parametrix page</a></li> <li><a href="https://catalos-catalui.vercel.app/">Catalos</a></li></ol></article></footer>`,1);function N(f,l){P(l,!0);const d=D(B);var c=F(),s=e(v(c),4),x=t(s);O(x,"href",`${M}/`),a(s);var r=e(s,2),_=t(r);C(_,()=>l.children??k),a(r);var n=e(r,2),m=e(t(n),2),h=e(t(m),2);z(h,20,()=>d,i=>i,(i,b)=>{o();var p=E(),y=v(p,!0);o(),S(()=>w(y,b)),u(i,p)}),a(h),a(m),o(2),a(n),u(f,c),j()}export{N as component,L as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as h,a as l,s as e}from"../chunks/iIw5Yrdx.js";import"../chunks/FpZwEl-R.js";import{p as v,f as u,t as g,a as x,s as _,c as p,r as o}from"../chunks/BwBztTFZ.js";import{i as d,p as i}from"../chunks/
|
|
1
|
+
import{t as h,a as l,s as e}from"../chunks/iIw5Yrdx.js";import"../chunks/FpZwEl-R.js";import{p as v,f as u,t as g,a as x,s as _,c as p,r as o}from"../chunks/BwBztTFZ.js";import{i as d,p as i}from"../chunks/C0W53cED.js";var b=h("<h1> </h1> <p> </p>",1);function w(m,f){v(f,!1),d();var a=b(),t=u(a),n=p(t,!0);o(t);var r=_(t,2),c=p(r,!0);o(r),g(()=>{var s;e(n,i.status),e(c,(s=i.error)==null?void 0:s.message)}),l(m,a),x()}export{w as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as p,a as m,s as n}from"../chunks/iIw5Yrdx.js";import"../chunks/FpZwEl-R.js";import{s as d,f as h,r as s,c as f,t as _,j as l}from"../chunks/BwBztTFZ.js";import{e as g,s as b}from"../chunks/
|
|
1
|
+
import{t as p,a as m,s as n}from"../chunks/iIw5Yrdx.js";import"../chunks/FpZwEl-R.js";import{s as d,f as h,r as s,c as f,t as _,j as l}from"../chunks/BwBztTFZ.js";import{e as g,s as b}from"../chunks/vHZsYl-F.js";import{d as u}from"../chunks/BDffofGV.js";import{b as x}from"../chunks/nly6OBCW.js";var L=p("<li><a> </a></li>"),$=p('<h2 class="svelte-1r3d1r">List of designs:</h2> <ol></ol>',1);function z(c){var e=$(),o=d(h(e),2);g(o,5,()=>u,a=>a,(a,i)=>{var t=L(),r=f(t),v=f(r,!0);s(r),s(t),_(()=>{b(r,"href",`${x}/${l(i)}`),n(v,l(i))}),m(a,t)}),s(o),m(c,e)}export{z as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ga,b as Ra}from"../chunks/
|
|
1
|
+
import{a as ga,b as Ra}from"../chunks/BDffofGV.js";import{H as Ua,a as Na,g as Ia}from"../chunks/CYKRgQr_.js";import{l as ua,e as Xa,w as Wa,f as Ut,c as fa,a as M,t as U,s as w,b as xa,r as da,g as ka}from"../chunks/iIw5Yrdx.js";import{h as Je,aF as Ya,m as Sa,V as Aa,T as Oa,D as j,j as o,B as Va,f as Rt,c as l,r as a,t as et,p as bt,a as gt,s,a8 as J,x as mt,y as Lt,u as _a,aG as Za}from"../chunks/BwBztTFZ.js";import{c as qa,a as O,p as St,i as ae,b as Qe}from"../chunks/DpbigbqS.js";import{s as E,e as Pt,F as lt,G as $e,H as Ea,I as Ga,J as Ka,K as Ba,L as ma,P as Be,M as ja,N as He,O as ee,Q as Ha,R as Ja,T as Qa,U as $a,V as oa,W as ts,X as pa,f as me,r as ca,Y as rt,Z as es,_ as ha,$ as as,a0 as ss,a1 as ls,a2 as ns}from"../chunks/vHZsYl-F.js";import{b as ta}from"../chunks/nly6OBCW.js";import{s as rs}from"../chunks/C5YK61bY.js";import{p as ya,i as os}from"../chunks/C0W53cED.js";import{a as cs,o as is}from"../chunks/Bke29ZwM.js";import"../chunks/FpZwEl-R.js";function Ca(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var c=e.length;for(t=0;t<c;t++)e[t]&&(n=Ca(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vs(){for(var e,t,n=0,r="",c=arguments.length;n<c;n++)(e=arguments[n])&&(t=Ca(e))&&(r&&(r+=" "),r+=t);return r}function wa(e){return typeof e=="object"?vs(e):e??""}const Da=[...`
|
|
2
2
|
\r\f \v\uFEFF`];function ds(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var c in n)if(n[c])r=r?r+" "+c:c;else if(r.length)for(var i=c.length,d=0;(d=r.indexOf(c,d))>=0;){var v=d+i;(d===0||Da.includes(r[d-1]))&&(v===r.length||Da.includes(r[v]))?r=(d===0?"":r.substring(0,d))+r.substring(v+1):d=v}}return r===""?null:r}function ht(e,t,n,r,c,i){var d=e.__className;if(Je||d!==n){var v=ds(n,r,i);(!Je||v!==e.getAttribute("class"))&&(v==null?e.removeAttribute("class"):e.className=v),e.__className=n}else if(i&&c!==i)for(var u in i){var p=!!i[u];(c==null||p!==!!c[u])&&e.classList.toggle(u,p)}return i}function be(e,t,n=t){var r=Ya();ua(e,"input",c=>{var i=c?e.defaultValue:e.value;if(i=ia(e)?va(i):i,n(i),r&&i!==(i=t())){var d=e.selectionStart,v=e.selectionEnd;e.value=i??"",v!==null&&(e.selectionStart=d,e.selectionEnd=Math.min(v,e.value.length))}}),(Je&&e.defaultValue!==e.value||Sa(t)==null&&e.value)&&n(ia(e)?va(e.value):e.value),Aa(()=>{var c=t();ia(e)&&c===va(e.value)||e.type==="date"&&!c&&!e.value||c!==e.value&&(e.value=c??"")})}function Nt(e,t,n=t){ua(e,"change",r=>{var c=r?e.defaultChecked:e.checked;n(c)}),(Je&&e.defaultChecked!==e.checked||Sa(t)==null)&&n(e.checked),Aa(()=>{var r=t();e.checked=!!r})}function ia(e){var t=e.type;return t==="number"||t==="range"}function va(e){return e===""?null:+e}function Pa(e,t,n){if(e.multiple)return fs(e,t);for(var r of e.options){var c=Ie(r);if(qa(c,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function us(e,t){Oa(()=>{var n=new MutationObserver(()=>{var r=e.__value;Pa(e,r)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function za(e,t,n=t){var r=!0;ua(e,"change",c=>{var i=c?"[selected]":":checked",d;if(e.multiple)d=[].map.call(e.querySelectorAll(i),Ie);else{var v=e.querySelector(i)??e.querySelector("option:not([disabled])");d=v&&Ie(v)}n(d)}),Oa(()=>{var c=t();if(Pa(e,c,r),r&&c===void 0){var i=e.querySelector(":checked");i!==null&&(c=Ie(i),n(c))}e.__value=c,r=!1}),us(e)}function fs(e,t){for(var n of e.options)n.selected=~t.indexOf(Ie(n))}function Ie(e){return"__value"in e?e.__value:e.value}function _s(e,t){Xa(window,["resize"],()=>Wa(()=>t(window[e])))}function ms(e){var t=Va(0);return function(){return arguments.length===1?(j(t,o(t)+1),arguments[0]):(o(t),e())}}function bs(e,t){throw new Ua(e,t)}new TextEncoder;function gs({params:e}){const t=e.design;if(Object.keys(ga).includes(t))return{pageDef:ga[t],allLink:Ra};bs(404,"Design undefined!")}const xn=Object.freeze(Object.defineProperty({__proto__:null,load:gs},Symbol.toStringTag,{value:"Module"})),Q=O({});function Fa(e,t,n){if(Object.keys(Q).includes(e)){const c=Q[e],i=Object.keys(c);for(const d of Object.keys(t))i.includes(d)?n&&(c[d]=t[d]):c[d]=t[d];Q[e]=c}else Q[e]=t}function xs(e){const t=e.pDef.partName,n={};for(const r of e.pDef.params)n[r.name]=r.init;Fa(t,n,!1)}function ks(e,t){t(!1)}var js=U('<aside class="backdrop svelte-sjxf1e"><div class="dialog svelte-sjxf1e"><button class="svelte-sjxf1e"><img></button></div></aside>');function Ma(e,t){let n=St(t,"modalOpen",15);var r=fa(),c=Rt(r);{var i=d=>{var v=js(),u=l(v),p=l(u);p.__click=[ks,n];var f=l(p);a(p),a(u),a(v),et(()=>{E(f,"src",t.svgPath),E(f,"alt",t.svgPath)}),M(d,v)};ae(c,d=>{n()&&d(i)})}M(e,r)}Ut(["click"]);var ps=(e,t,n)=>t(n),hs=U('<button class="svelte-fxmnfh"><img class="svelte-fxmnfh"></button>'),ys=U('<section class="svelte-fxmnfh"><!> <!></section>');function ws(e,t){bt(t,!0);function n(f){const S=[];for(const N of Object.values(f.paramSvg))S.includes(N)||S.push(N);return S}let r=J(!1),c=J(""),i=mt(()=>n(t.pDef).map(f=>`${ta}/pgdsvg/${f}`));function d(f){j(c,O(f)),j(r,!0)}var v=ys(),u=l(v);Ma(u,{get svgPath(){return o(c)},get modalOpen(){return o(r)},set modalOpen(f){j(r,O(f))}});var p=s(u,2);Pt(p,16,()=>o(i),f=>f,(f,S)=>{var N=hs();N.__click=[ps,d,S];var x=l(N);a(N),et(()=>{E(x,"src",S),E(x,"alt",S)}),M(f,N)}),a(v),M(e,v),gt()}Ut(["click"]);function Ds(e,t){t(!1)}function zs(e,t,n){t.okFunc(),n(!1)}var Ls=U('<aside class="backdrop svelte-weruk7"><div><article class="question svelte-weruk7"><!></article> <footer class="svelte-weruk7"><button class="cancel svelte-weruk7">Cancel</button> <button class="ok svelte-weruk7"> </button></footer></div></aside>');function Ue(e,t){bt(t,!0);let n=St(t,"okName",3,"Ok"),r=St(t,"modalOpen",15),c=St(t,"sizeLarge",3,!1);var i=fa(),d=Rt(i);{var v=u=>{var p=Ls(),f=l(p);let S;var N=l(f),x=l(N);rs(x,()=>t.children),a(N);var _=s(N,2),I=l(_);I.__click=[Ds,r];var R=s(I,2);R.__click=[zs,t,r];var tt=l(R,!0);a(R),a(_),a(f),a(p),et(T=>{S=ht(f,1,"dialog svelte-weruk7",null,S,T),w(tt,n())},[()=>({sizeLarge:c()})]),M(u,p)};ae(d,u=>{r()&&u(v)})}M(e,i),gt()}Ut(["click"]);function Ns(e,t,n,r){for(const c of t())o(n)[c]=o(r)}var Ss=(e,t)=>{j(t,!0)},As=U('<p class="diagItem svelte-12dj9tj"> </p>'),Os=U('<p class="diagTitle svelte-12dj9tj">Do you really want to delete the following localStorage keys?</p> <!>',1),Cs=(e,t,n)=>t(n),Ps=U('<tr class="svelte-12dj9tj"><td><input type="checkbox"></td><td class="svelte-12dj9tj"><button class="svelte-12dj9tj"> </button></td><td> </td></tr>'),Fs=U('<div class="deleteKeys svelte-12dj9tj"><button class="svelte-12dj9tj">Delete</button> <!> <table class="svelte-12dj9tj"><thead class="svelte-12dj9tj"><tr><td>Delete</td><td>Key name</td><td>Last modification</td></tr><tr><td><input type="checkbox"></td><td class="instruction">delete all</td><td></td></tr></thead><tbody class="svelte-12dj9tj"></tbody></table></div>');function Ta(e,t){bt(t,!0);let n=St(t,"storeName",15),r=St(t,"localKeys",15),c=J(O({})),i=J(!1),d=J(!1);function v(){let L=[];const y=new RegExp(`^${t.pageName}_`);return L=Object.keys(window.localStorage).filter(G=>y.test(G)).map(G=>G.replace(y,"")),L.sort(),L}r(v());function u(L){n(L)}function p(L){let y={};for(const q of L){let G="";const $=`${t.pageName}_${q}`,K=window.localStorage.getItem($);K!==null&&(G=JSON.parse(K).lastModif),y[q]=G}return y}let f=mt(()=>p(r()));function S(L){let y={};for(const q of L)y[q]=!1;return y}j(c,O(S(r())));function N(){for(const L of r())if(o(c)[L]){const y=`${t.pageName}_${L}`;window.localStorage.removeItem(y)}j(i,!1),r(v())}var x=Fs(),_=l(x);_.__click=[Ss,d];var I=s(_,2);Ue(I,{okName:"Confirm",okFunc:N,get modalOpen(){return o(d)},set modalOpen(L){j(d,O(L))},children:(L,y)=>{var q=Os(),G=s(Rt(q),2);Pt(G,16,r,$=>$,($,K)=>{var at=fa(),dt=Rt(at);{var nt=B=>{var ut=As(),xt=l(ut,!0);a(ut),et(()=>w(xt,K)),M(B,ut)};ae(dt,B=>{o(c)[K]&&B(nt)})}M($,at)}),M(L,q)},$$slots:{default:!0}});var R=s(I,2),tt=l(R),T=s(l(tt)),H=l(T),ot=l(H);lt(ot),ot.__change=[Ns,r,c,i],a(H),Lt(2),a(T),a(tt);var ct=s(tt);Pt(ct,20,r,L=>L,(L,y)=>{var q=Ps(),G=l(q),$=l(G);lt($),a(G);var K=s(G),at=l(K);at.__click=[Cs,u,y];var dt=l(at,!0);a(at),a(K);var nt=s(K),B=l(nt,!0);a(nt),a(q),et(()=>{w(dt,y),w(B,o(f)[y])}),Nt($,()=>o(c)[y],ut=>o(c)[y]=ut),M(L,q)}),a(ct),a(R),a(x),Nt(ot,()=>o(i),L=>j(i,L)),M(e,x),gt()}Ut(["click","change"]);var Ms=U('<p class="warnMsg svelte-1rkdwo"> </p>'),Ts=U('<!> <div class="svelte-1rkdwo"><label for="storName" class="svelte-1rkdwo">Give a name to your parameter-set:</label> <input type="text" id="storName" required minlength="4" maxlength="30" size="32" class="svelte-1rkdwo"> <!></div>',1);function Rs(e,t){bt(t,!0);let n=St(t,"storeName",15),r=J(O([]));function c(N){const x=/[-:]/g,_=/\..*$/,I=new Date().toISOString().replace(x,"").replace(_,"").replace("T","_");return`${N}_${I}`}n(c(t.pageName));let i=mt(()=>o(r).includes(n()));var d=Ts(),v=Rt(d);Ta(v,{get pageName(){return t.pageName},get storeName(){return n()},set storeName(N){n(N)},get localKeys(){return o(r)},set localKeys(N){j(r,O(N))}});var u=s(v,2),p=s(l(u),2);lt(p);var f=s(p,2);{var S=N=>{var x=Ms(),_=l(x);a(x),et(()=>w(_,`Warning: name ${n()??""} already used`)),M(N,x)};ae(f,N=>{o(i)&&N(S)})}a(u),be(p,n),M(e,d),gt()}var Us=U('<!> <div class="svelte-1ozd0ey"><label for="storName" class="svelte-1ozd0ey">Select a parameter-set:</label> <input type="text" id="storName" readonly="" minlength="4" maxlength="30" size="32" class="svelte-1ozd0ey"></div>',1);function Is(e,t){bt(t,!0);let n=St(t,"storeName",15),r=J(O([]));function c(p){let f=n();return!p.includes(f)&&(p.length>0?f=p[0]:f=""),f}_a(()=>{n(c(o(r)))});var i=Us(),d=Rt(i);Ta(d,{get pageName(){return t.pageName},get storeName(){return n()},set storeName(p){n(p)},get localKeys(){return o(r)},set localKeys(p){j(r,O(p))}});var v=s(d,2),u=s(l(v),2);lt(u),a(v),et(()=>$e(u,n())),M(e,i),gt()}const h=O({dLayers:Ga(),zAdjust:Ea(),canvasZWidth:0});var Xs=U('<canvas class="mini svelte-z8e4tz"></canvas>');function La(e,t){bt(t,!0);const n=200,r=.6;let c;function i(u,p,f,S){const N=Ka(S);N.ruler=!1;let x;if(c){const _=c.getContext("2d");_.clearRect(0,0,_.canvas.width,_.canvas.height);const I=_.canvas.width;try{t.full?x=u.getAdjustFull(_.canvas.width,_.canvas.height):x=Ba(f,I,p),u.draw(_,x,N)}catch(R){console.log(R)}}}_a(()=>{i(t.pFig,h.zAdjust,h.canvasZWidth,h.dLayers)});function d(u){const p=u.offsetX,f=u.offsetY,S=c.getContext("2d"),N=S.canvas.width/2,x=S.canvas.height/2;if(u.button===0){let _=1;p>N&&(_+=1*r),f>x&&(_+=2*r),S.canvas.width=_*n,S.canvas.height=_*n,i(t.pFig,h.zAdjust,h.canvasZWidth,h.dLayers)}}var v=Xs();E(v,"width",n),E(v,"height",n),v.__click=d,Qe(v,u=>c=u,()=>c),M(e,v),gt()}Ut(["click"]);function Ws(e,t){const n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.click(),n.remove()}function Ys(e,t,n){const r=/[-:]/g,c=/\..*$/,i=new Date().toISOString().replace(r,"").replace(c,"").replace("T","_");return ma(i,e,t,n)}function ba(e,t,n){const r=/[-:]/g,c=/\..*$/,i=new Date().toISOString().replace(r,"").replace(c,"").replace("T","_"),d=`px_${e}_${i}.json`,v=ma(i,e,t,n);Ws(d,v)}function Vs(e,t,n){const r=new URL(e),c=2e3;let i=r.toString().length;for(const d of Object.keys(t)){const v=t[d].toString(),u=2+d.length+v.length;r.searchParams.append(encodeURIComponent(d),encodeURIComponent(v)),i+=u}return i>=c&&console.log(`warn547: generateUrl: strLength ${i} larger than strLengthLimit ${c}`),r.toString()}function Zs(e,t){if(e.target){const n=e.target.files;n&&t(n[0])}}function qs(e,t,n,r){j(t,O(n())),j(r,!0)}function Es(e,t){j(t,!0)}function Gs(e,t){j(t,!0)}function Ks(e,t){j(t,!1)}var Bs=(e,t)=>{j(t,!0)},Hs=(e,t)=>{j(t,!0)},Js=(e,t,n)=>t(o(n).name),Qs=U('<input type="number" class="input-number svelte-jonk14"> <input type="range" class="svelte-jonk14">',1),$s=U("<option> </option>"),tl=U("<select></select>"),el=U("<option> </option>"),al=U("<select></select>"),sl=U('<tr><td class="svelte-jonk14"> </td><td class="svelte-jonk14"><button class="svelte-jonk14"> </button></td><td class="svelte-jonk14"><!></td><td> </td><td> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td> </td></tr>'),ll=U('<tbody class="svelte-jonk14"><tr class="separator svelte-jonk14"><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"><label class="svelte-jonk14"><input type="checkbox" class="svelte-jonk14"> <span class="svelte-jonk14"></span></label></td></tr></tbody> <tbody></tbody>',1),nl=(e,t)=>{j(t,!0)},rl=U('<p>Copy this URL and send it to your friends!</p> <p class="cUrl svelte-jonk14"> </p>',1),ol=U('<section class="svelte-jonk14"><h2 class="svelte-jonk14">Parameters</h2> <main class="svelte-jonk14"><label for="loadFParams" class="fileUpload svelte-jonk14">Load Params from File</label> <input id="loadFParams" type="file" accept="text/plain, application/json" class="svelte-jonk14"> <button class="svelte-jonk14">Set Params Default</button> <button class="svelte-jonk14">Load Params from localStorage</button> <!> <!> <textarea rows="3" cols="80" readonly="" wrap="soft"></textarea> <table class="svelte-jonk14"><thead class="svelte-jonk14"><tr class="svelte-jonk14"><td class="svelte-jonk14">#</td><td class="svelte-jonk14">Parameter name</td><td class="svelte-jonk14">Value<span class="svelte-jonk14"><button class="svelte-jonk14">−</button><button class="svelte-jonk14">+</button></span></td><td>Unit</td><td>Default</td><td class="svelte-jonk14">Min</td><td class="svelte-jonk14">Max</td><td>Step</td></tr></thead><!></table> <div class="comment svelte-jonk14"><label for="inComment">Comment:</label> <input type="text" id="inComment" maxlength="150"></div> <button class="svelte-jonk14">Save Parameters to File</button> <button class="svelte-jonk14">Save Parameters as URL</button> <button class="svelte-jonk14">Save Parameters to localStorage</button> <!> <!></main> <!> <button class="side-img svelte-jonk14"><img class="svelte-jonk14"></button> <div class="mini-canvas svelte-jonk14"><!></div> <div class="mini-canvas svelte-jonk14"><!></div></section>');function cl(e,t){bt(t,!0);let n=J(""),r=J(!1),c=J(""),i=J(!1),d=J(!1),v=J(!1),u=J(!1),p=J(!1),f=J(""),S=J(""),N=J(""),x=J(O(K(t.pDef.params[0].name))),_=J(!1),I=J(O(nt(dt(t.pDef.params))));Na(()=>{j(x,O(K(t.pDef.params[0].name))),j(I,O(nt(dt(t.pDef.params))))});function R(g,k){let z="",X=!1;g!==t.pDef.partName&&(z+=`warn361: read partName: '${g}' expected partName: '${t.pDef.partName}'
|
|
3
3
|
`,X=!0);let st=0,_t=0,Mt=0;const ue=[];for(const jt of t.pDef.params)ue.push(jt.name),Object.hasOwn(k,jt.name)?(st+=1,Q[t.pDef.partName][jt.name]===k[jt.name]?Mt+=1:Q[t.pDef.partName][jt.name]=k[jt.name]):_t+=1;let wt=0;for(const jt of Object.keys(k))ue.includes(jt)||(wt+=1,z+=`warn363: parameter ${jt} not in the scope of the design (${wt})
|
|
4
4
|
`);const Bt=wt>0,Ht=new Date().toLocaleTimeString();return z+=`Params loaded at ${Ht} :`,z+=` def-nb: ${Object.keys(t.pDef.params).length}`,z+=`, cover-nb: ${st}, uncover-nb: ${_t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1741558170481"}
|