designix-uis 0.5.30 → 0.5.32

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.
Files changed (41) hide show
  1. package/dist/designix-uis.js +15 -14
  2. package/dist/public/_app/immutable/chunks/entry.D_exCd0f.js +3 -0
  3. package/dist/public/_app/immutable/chunks/{index.VmH-9d5B.js → index.7KyUWpqJ.js} +1 -1
  4. package/dist/public/_app/immutable/chunks/{makeList.OAfyhA_q.js → makeList.C3agm0IL.js} +1 -1
  5. package/dist/public/_app/immutable/chunks/paths.CnG5LrC8.js +1 -0
  6. package/dist/public/_app/immutable/chunks/{stores.CBY9bGtC.js → stores.BdytS9Df.js} +1 -1
  7. package/dist/public/_app/immutable/entry/app.rqWQ6sX-.js +2 -0
  8. package/dist/public/_app/immutable/entry/start.Ce-oOvTl.js +1 -0
  9. package/dist/public/_app/immutable/nodes/0.CYP2J31a.js +4 -0
  10. package/dist/public/_app/immutable/nodes/{1.CtVuc9Pt.js → 1.HbFqS0yq.js} +1 -1
  11. package/dist/public/_app/immutable/nodes/{2.1BYcd1z3.js → 2.BvODlUud.js} +1 -1
  12. package/dist/public/_app/immutable/nodes/{3.DpYrUf-F.js → 3.C_LYr96e.js} +1 -1
  13. package/dist/public/_app/version.json +1 -1
  14. package/dist/public/gear/gear_bar.html +14 -14
  15. package/dist/public/gear/gear_epicycloid.html +14 -14
  16. package/dist/public/gear/gear_ring.html +14 -14
  17. package/dist/public/gear/gear_wheel.html +14 -14
  18. package/dist/public/heliostat/base.html +14 -14
  19. package/dist/public/heliostat/haxis_guidance.html +14 -14
  20. package/dist/public/heliostat/heliostat.html +14 -14
  21. package/dist/public/heliostat/heliostat_2.html +14 -14
  22. package/dist/public/heliostat/pole_static.html +17 -17
  23. package/dist/public/heliostat/rake.html +14 -14
  24. package/dist/public/heliostat/rake_stopper.html +14 -14
  25. package/dist/public/heliostat/ring.html +14 -14
  26. package/dist/public/heliostat/ring_guidance.html +14 -14
  27. package/dist/public/heliostat/rod.html +14 -14
  28. package/dist/public/heliostat/spider.html +14 -14
  29. package/dist/public/heliostat/surface.html +14 -14
  30. package/dist/public/heliostat/swing.html +14 -14
  31. package/dist/public/heliostat/trapeze.html +14 -14
  32. package/dist/public/heliostat/vaxis.html +14 -14
  33. package/dist/public/heliostat/vaxis_guidance.html +14 -14
  34. package/dist/public/heliostat/vaxis_holder.html +14 -14
  35. package/dist/public/index.html +12 -12
  36. package/package.json +15 -14
  37. package/dist/public/_app/immutable/chunks/entry.BfOQ8A-P.js +0 -3
  38. package/dist/public/_app/immutable/chunks/paths.UrvDPV07.js +0 -1
  39. package/dist/public/_app/immutable/entry/app.D8kejT9N.js +0 -2
  40. package/dist/public/_app/immutable/entry/start.CuG414Jl.js +0 -1
  41. package/dist/public/_app/immutable/nodes/0.CdCyE3mv.js +0 -4
@@ -12,7 +12,7 @@ import getport from "get-port";
12
12
  // package.json
13
13
  var package_default = {
14
14
  name: "designix-uis",
15
- version: "0.5.30",
15
+ version: "0.5.32",
16
16
  description: "mini-server for static content of designix-ui",
17
17
  private: false,
18
18
  repository: {
@@ -78,37 +78,38 @@ var package_default = {
78
78
  lint: "eslint .",
79
79
  "test:unit": "vitest",
80
80
  "test:unit:once": "vitest --run",
81
- clean_public: "shx rm -fr dist/public",
82
- copy: "shx cp -r ../designix-ui/build dist/public",
81
+ clean_public: "rimraf dist/public",
82
+ copy: "fse copy ../designix-ui/build dist/public",
83
83
  checkCopy: "ls -l dist/public/index.html",
84
84
  ci: "run-s check build pretty lint test:unit:once clean_public copy checkCopy",
85
85
  run: "node dist/designix-uis.js",
86
86
  "run-help": "node dist/designix-uis.js --help",
87
- clean: "shx rm -fr node_modules build dist tmp"
87
+ clean: "rimraf node_modules build dist tmp"
88
88
  },
89
89
  dependencies: {
90
- express: "^4.19.2",
90
+ express: "^4.21.1",
91
91
  "fs-extra": "^11.2.0",
92
92
  "get-port": "^7.1.0",
93
93
  open: "^10.1.0",
94
94
  yargs: "^17.7.2"
95
95
  },
96
96
  devDependencies: {
97
- "@eslint/js": "^9.8.0",
97
+ "@atao60/fse-cli": "^0.1.9",
98
+ "@eslint/js": "^9.10.0",
98
99
  "@types/eslint__js": "^8.42.3",
99
100
  "@types/express": "^4.17.21",
100
101
  "@types/fs-extra": "^11.0.4",
101
- "@types/node": "^22.5.4",
102
+ "@types/node": "^22.7.7",
102
103
  "@types/yargs": "^17.0.33",
103
- eslint: "^9.10.0",
104
+ eslint: "^9.13.0",
104
105
  "eslint-config-prettier": "^9.1.0",
105
- "npm-run-all": "^4.1.5",
106
+ "npm-run-all2": "^6.2.4",
106
107
  prettier: "^3.3.3",
107
- shx: "^0.3.4",
108
- tsup: "^8.2.4",
109
- typescript: "^5.6.2",
110
- "typescript-eslint": "^8.4.0",
111
- vitest: "^2.0.5"
108
+ rimraf: "^6.0.1",
109
+ tsup: "^8.3.0",
110
+ typescript: "^5.6.3",
111
+ "typescript-eslint": "^8.10.0",
112
+ vitest: "^2.1.3"
112
113
  }
113
114
  };
114
115
 
@@ -0,0 +1,3 @@
1
+ import{n as le,s as lt,x as ft}from"./scheduler.2BOoCPD3.js";import{a as ut,b as L}from"./paths.CnG5LrC8.js";new URL("sveltekit-internal://");function dt(e,n){return e==="/"||n==="ignore"?e:n==="never"?e.endsWith("/")?e.slice(0,-1):e:n==="always"&&!e.endsWith("/")?e+"/":e}function ht(e){return e.split("%25").map(decodeURI).join("%25")}function pt(e){for(const n in e)e[n]=decodeURIComponent(e[n]);return e}function fe({href:e}){return e.split("#")[0]}const gt=["href","pathname","search","toString","toJSON"];function mt(e,n,t){const r=new URL(e);Object.defineProperty(r,"searchParams",{value:new Proxy(r.searchParams,{get(a,o){if(o==="get"||o==="getAll"||o==="has")return s=>(t(s),a[o](s));n();const i=Reflect.get(a,o);return typeof i=="function"?i.bind(a):i}}),enumerable:!0,configurable:!0});for(const a of gt)Object.defineProperty(r,a,{get(){return n(),e[a]},enumerable:!0,configurable:!0});return r}const yt="/__data.json",_t=".html__data.json";function wt(e){return e.endsWith(".html")?e.replace(/\.html$/,_t):e.replace(/\/$/,"")+yt}function vt(...e){let n=5381;for(const t of e)if(typeof t=="string"){let r=t.length;for(;r;)n=n*33^t.charCodeAt(--r)}else if(ArrayBuffer.isView(t)){const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let a=r.length;for(;a;)n=n*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function bt(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return t.buffer}const $e=window.fetch;window.fetch=(e,n)=>((e instanceof Request?e.method:(n==null?void 0:n.method)||"GET")!=="GET"&&q.delete(me(e)),$e(e,n));const q=new Map;function At(e,n){const t=me(e,n),r=document.querySelector(t);if(r!=null&&r.textContent){let{body:a,...o}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&q.set(t,{body:a,init:o,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=bt(a)),Promise.resolve(new Response(a,o))}return window.fetch(e,n)}function kt(e,n,t){if(q.size>0){const r=me(e,t),a=q.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(t==null?void 0:t.cache))return new Response(a.body,a.init);q.delete(r)}}return window.fetch(n,t)}function me(e,n){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(n!=null&&n.headers||n!=null&&n.body){const a=[];n.headers&&a.push([...new Headers(n.headers)].join(",")),n.body&&(typeof n.body=="string"||ArrayBuffer.isView(n.body))&&a.push(n.body),r+=`[data-hash="${vt(...a)}"]`}return r}const Et=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function St(e){const n=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${It(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return n.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(o)return n.push({name:o[1],matcher:o[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 ue(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return ue(String.fromCharCode(...c.slice(2).split("-").map(f=>parseInt(f,16))));const d=Et.exec(c),[,h,y,u,g]=d;return n.push({name:u,matcher:g,optional:!!h,rest:!!y,chained:y?l===1&&i[0]==="":!1}),y?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return ue(c)}).join("")}).join("")}/?$`),params:n}}function Rt(e){return!/^\([^)]+\)$/.test(e)}function It(e){return e.slice(1).split("/").filter(Rt)}function Ut(e,n,t){const r={},a=e.slice(1),o=a.filter(s=>s!==void 0);let i=0;for(let s=0;s<n.length;s+=1){const c=n[s];let l=a[s-i];if(c.chained&&c.rest&&i&&(l=a.slice(s-i,s+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||t[c.matcher](l)){r[c.name]=l;const d=n[s+1],h=a[s+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===o.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function ue(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Lt({nodes:e,server_loads:n,dictionary:t,matchers:r}){const a=new Set(n);return Object.entries(t).map(([s,[c,l,d]])=>{const{pattern:h,params:y}=St(s),u={id:s,exec:g=>{const f=h.exec(g);if(f)return Ut(f,y,r)},errors:[1,...d||[]].map(g=>e[g]),layouts:[0,...l||[]].map(i),leaf:o(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function o(s){const c=s<0;return c&&(s=~s),[c,e[s]]}function i(s){return s===void 0?s:[a.has(s),e[s]]}}function Fe(e,n=JSON.parse){try{return n(sessionStorage[e])}catch{}}function Le(e,n,t=JSON.stringify){const r=t(n);try{sessionStorage[e]=r}catch{}}const N=[];function ye(e,n=le){let t;const r=new Set;function a(s){if(lt(e,s)&&(e=s,t)){const c=!N.length;for(const l of r)l[1](),N.push(l,e);if(c){for(let l=0;l<N.length;l+=2)N[l][0](N[l+1]);N.length=0}}}function o(s){a(s(e))}function i(s,c=le){const l=[s,c];return r.add(l),r.size===1&&(t=n(a,o)||le),s(e),()=>{r.delete(l),r.size===0&&t&&(t(),t=null)}}return{set:a,update:o,subscribe:i}}const Tt="1729460761320",Ve="sveltekit:snapshot",Be="sveltekit:scroll",qe="sveltekit:states",xt="sveltekit:pageurl",D="sveltekit:history",H="sveltekit:navigation",z={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},W=location.origin;function Ge(e){if(e instanceof URL)return e;let n=document.baseURI;if(!n){const t=document.getElementsByTagName("base");n=t.length?t[0].href:document.URL}return new URL(e,n)}function _e(){return{x:pageXOffset,y:pageYOffset}}function O(e,n){return e.getAttribute(`data-sveltekit-${n}`)}const Te={...z,"":z.hover};function He(e){let n=e.assignedSlot??e.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Me(e,n){for(;e&&e!==n;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=He(e)}}function he(e,n){let t;try{t=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,a=!t||!!r||re(t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(t==null?void 0:t.origin)===W&&e.hasAttribute("download");return{url:t,external:a,target:r,download:o}}function J(e){let n=null,t=null,r=null,a=null,o=null,i=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=O(s,"preload-code")),a===null&&(a=O(s,"preload-data")),n===null&&(n=O(s,"keepfocus")),t===null&&(t=O(s,"noscroll")),o===null&&(o=O(s,"reload")),i===null&&(i=O(s,"replacestate")),s=He(s);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(n),noscroll:c(t),reload:c(o),replace_state:c(i)}}function xe(e){const n=ye(e);let t=!0;function r(){t=!0,n.update(i=>i)}function a(i){t=!1,n.set(i)}function o(i){let s;return n.subscribe(c=>{(s===void 0||t&&c!==s)&&i(s=c)})}return{notify:r,set:a,subscribe:o}}function Pt(){const{set:e,subscribe:n}=ye(!1);let t;async function r(){clearTimeout(t);try{const a=await fetch(`${ut}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Tt;return i&&(e(!0),clearTimeout(t)),i}catch{return!1}}return{subscribe:n,check:r}}function re(e,n){return e.origin!==W||!e.pathname.startsWith(n)}function Pe(e){const n=Nt(e),t=new ArrayBuffer(n.length),r=new DataView(t);for(let a=0;a<t.byteLength;a++)r.setUint8(a,n.charCodeAt(a));return t}const Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Nt(e){e.length%4===0&&(e=e.replace(/==?$/,""));let n="",t=0,r=0;for(let a=0;a<e.length;a++)t<<=6,t|=Ct.indexOf(e[a]),r+=6,r===24&&(n+=String.fromCharCode((t&16711680)>>16),n+=String.fromCharCode((t&65280)>>8),n+=String.fromCharCode(t&255),t=r=0);return r===12?(t>>=4,n+=String.fromCharCode(t)):r===18&&(t>>=2,n+=String.fromCharCode((t&65280)>>8),n+=String.fromCharCode(t&255)),n}const Ot=-1,jt=-2,Dt=-3,$t=-4,Ft=-5,Vt=-6;function Bt(e,n){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const t=e,r=Array(t.length);function a(o,i=!1){if(o===Ot)return;if(o===Dt)return NaN;if(o===$t)return 1/0;if(o===Ft)return-1/0;if(o===Vt)return-0;if(i)throw new Error("Invalid input");if(o in r)return r[o];const s=t[o];if(!s||typeof s!="object")r[o]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const c=s[0],l=n==null?void 0:n[c];if(l)return r[o]=l(a(s[1]));switch(c){case"Date":r[o]=new Date(s[1]);break;case"Set":const d=new Set;r[o]=d;for(let u=1;u<s.length;u+=1)d.add(a(s[u]));break;case"Map":const h=new Map;r[o]=h;for(let u=1;u<s.length;u+=2)h.set(a(s[u]),a(s[u+1]));break;case"RegExp":r[o]=new RegExp(s[1],s[2]);break;case"Object":r[o]=Object(s[1]);break;case"BigInt":r[o]=BigInt(s[1]);break;case"null":const y=Object.create(null);r[o]=y;for(let u=1;u<s.length;u+=2)y[s[u]]=a(s[u+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 u=globalThis[c],g=s[1],f=Pe(g),m=new u(f);r[o]=m;break}case"ArrayBuffer":{const u=s[1],g=Pe(u);r[o]=g;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(s.length);r[o]=c;for(let l=0;l<s.length;l+=1){const d=s[l];d!==jt&&(c[l]=a(d))}}else{const c={};r[o]=c;for(const l in s){const d=s[l];c[l]=a(d)}}return r[o]}return a(0)}const Ke=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Ke];const qt=new Set([...Ke]);[...qt];function Gt(e){return e.filter(n=>n!=null)}class ae{constructor(n,t){this.status=n,typeof t=="string"?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class We{constructor(n,t){this.status=n,this.location=t}}class we extends Error{constructor(n,t,r){super(r),this.status=n,this.text=t}}const Ht="x-sveltekit-invalidated",Mt="x-sveltekit-trailing-slash";function X(e){return e instanceof ae||e instanceof we?e.status:500}function Kt(e){return e instanceof we?e.text:"Internal Error"}const C=Fe(Be)??{},M=Fe(Ve)??{},x={url:xe({}),page:xe({}),navigating:ye(null),updated:Pt()};function ve(e){C[e]=_e()}function Wt(e,n){let t=e+1;for(;C[t];)delete C[t],t+=1;for(t=n+1;M[t];)delete M[t],t+=1}function F(e){return location.href=e.href,new Promise(()=>{})}async function Ye(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Ce(){}let oe,pe,Z,T,ge,V;const ze=[],Q=[];let R=null;const Je=[],Yt=[];let j=[],_={branch:[],error:null,url:null},be=!1,ee=!1,Ne=!0,K=!1,B=!1,Xe=!1,Ae=!1,ke,E,U,I,te;const G=new Set;async function sn(e,n,t){var a,o;document.URL!==location.href&&(location.href=location.href),V=e,oe=Lt(e),T=document.documentElement,ge=n,pe=e.nodes[0],Z=e.nodes[1],pe(),Z(),E=(a=history.state)==null?void 0:a[D],U=(o=history.state)==null?void 0:o[H],E||(E=U=Date.now(),history.replaceState({...history.state,[D]:E,[H]:U},""));const r=C[E];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),t?await nn(ge,t):en(location.href,{replaceState:!0}),tn()}function zt(){ze.length=0,Ae=!1}function Ze(e){Q.some(n=>n==null?void 0:n.snapshot)&&(M[e]=Q.map(n=>{var t;return(t=n==null?void 0:n.snapshot)==null?void 0:t.capture()}))}function Qe(e){var n;(n=M[e])==null||n.forEach((t,r)=>{var a,o;(o=(a=Q[r])==null?void 0:a.snapshot)==null||o.restore(t)})}function Oe(){ve(E),Le(Be,C),Ze(U),Le(Ve,M)}async function et(e,n,t,r){return Y({type:"goto",url:Ge(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:t,nav_token:r,accept:()=>{n.invalidateAll&&(Ae=!0)}})}async function Jt(e){if(e.id!==(R==null?void 0:R.id)){const n={};G.add(n),R={id:e.id,token:n,promise:nt({...e,preload:n}).then(t=>(G.delete(n),t.type==="loaded"&&t.state.error&&(R=null),t))}}return R.promise}async function de(e){const n=oe.find(t=>t.exec(rt(e)));n&&await Promise.all([...n.layouts,n.leaf].map(t=>t==null?void 0:t[1]()))}function tt(e,n,t){var o;_=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),I=e.props.page,ke=new V.root({target:n,props:{...e.props,stores:x,components:Q},hydrate:t,sync:!1}),Qe(U);const a={from:null,to:{params:_.params,route:{id:((o=_.route)==null?void 0:o.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};j.forEach(i=>i(a)),ee=!0}function ne({url:e,params:n,branch:t,status:r,error:a,route:o,form:i}){let s="never";if(L&&(e.pathname===L||e.pathname===L+"/"))s="always";else for(const u of t)(u==null?void 0:u.slash)!==void 0&&(s=u.slash);e.pathname=dt(e.pathname,s),e.search=e.search;const c={type:"loaded",state:{url:e,params:n,branch:t,error:a,route:o},props:{constructors:Gt(t).map(u=>u.node.component),page:I}};i!==void 0&&(c.props.form=i);let l={},d=!I,h=0;for(let u=0;u<Math.max(t.length,_.branch.length);u+=1){const g=t[u],f=_.branch[u];(g==null?void 0:g.data)!==(f==null?void 0:f.data)&&(d=!0),g&&(l={...l,...g.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||i!==void 0&&i!==I.form||d)&&(c.props.page={error:a,params:n,route:{id:(o==null?void 0:o.id)??null},state:{},status:r,url:new URL(e),form:i??null,data:d?l:I.data}),c}async function Ee({loader:e,parent:n,url:t,params:r,route:a,server_data_node:o}){var d,h,y;let i=null,s=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if((d=l.universal)!=null&&d.load){let u=function(...f){for(const m of f){const{href:b}=new URL(m,t);c.dependencies.add(b)}};const g={route:new Proxy(a,{get:(f,m)=>(s&&(c.route=!0),f[m])}),params:new Proxy(r,{get:(f,m)=>(s&&c.params.add(m),f[m])}),data:(o==null?void 0:o.data)??null,url:mt(t,()=>{s&&(c.url=!0)},f=>{s&&c.search_params.add(f)}),async fetch(f,m){let b;f instanceof Request?(b=f.url,m={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:f.headers,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...m}):b=f;const S=new URL(b,t);return s&&u(S.href),S.origin===t.origin&&(b=S.href.slice(t.origin.length)),ee?kt(b,S.href,m):At(b,m)},setHeaders:()=>{},depends:u,parent(){return s&&(c.parent=!0),n()},untrack(f){s=!1;try{return f()}finally{s=!0}}};i=await l.universal.load.call(null,g)??null}return{node:l,loader:e,server:o,universal:(h=l.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(o==null?void 0:o.data)??null,slash:((y=l.universal)==null?void 0:y.trailingSlash)??(o==null?void 0:o.slash)}}function je(e,n,t,r,a,o){if(Ae)return!0;if(!a)return!1;if(a.parent&&e||a.route&&n||a.url&&t)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(o[i]!==_.params[i])return!0;for(const i of a.dependencies)if(ze.some(s=>s(new URL(i))))return!0;return!1}function Se(e,n){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?n??null:null}function Xt(e,n){if(!e)return new Set(n.searchParams.keys());const t=new Set([...e.searchParams.keys(),...n.searchParams.keys()]);for(const r of t){const a=e.searchParams.getAll(r),o=n.searchParams.getAll(r);a.every(i=>o.includes(i))&&o.every(i=>a.includes(i))&&t.delete(r)}return t}function De({error:e,url:n,route:t,params:r}){return{type:"loaded",state:{error:e,url:n,route:t,params:r,branch:[]},props:{page:I,constructors:[]}}}async function nt({id:e,invalidating:n,url:t,params:r,route:a,preload:o}){if((R==null?void 0:R.id)===e)return G.delete(R.token),R.promise;const{errors:i,layouts:s,leaf:c}=a,l=[...s,c];i.forEach(p=>p==null?void 0:p().catch(()=>{})),l.forEach(p=>p==null?void 0:p[1]().catch(()=>{}));let d=null;const h=_.url?e!==_.url.pathname+_.url.search:!1,y=_.route?a.id!==_.route.id:!1,u=Xt(_.url,t);let g=!1;const f=l.map((p,v)=>{var P;const A=_.branch[v],k=!!(p!=null&&p[0])&&((A==null?void 0:A.loader)!==p[1]||je(g,y,h,u,(P=A.server)==null?void 0:P.uses,r));return k&&(g=!0),k});if(f.some(Boolean)){try{d=await st(t,f)}catch(p){const v=await $(p,{url:t,params:r,route:{id:e}});return G.has(o)?De({error:v,url:t,params:r,route:a}):se({status:X(p),error:v,url:t,route:a})}if(d.type==="redirect")return d}const m=d==null?void 0:d.nodes;let b=!1;const S=l.map(async(p,v)=>{var ie;if(!p)return;const A=_.branch[v],k=m==null?void 0:m[v];if((!k||k.type==="skip")&&p[1]===(A==null?void 0:A.loader)&&!je(b,y,h,u,(ie=A.universal)==null?void 0:ie.uses,r))return A;if(b=!0,(k==null?void 0:k.type)==="error")throw k;return Ee({loader:p[1],url:t,params:r,route:a,parent:async()=>{var Ue;const Ie={};for(let ce=0;ce<v;ce+=1)Object.assign(Ie,(Ue=await S[ce])==null?void 0:Ue.data);return Ie},server_data_node:Se(k===void 0&&p[0]?{type:"skip"}:k??null,p[0]?A==null?void 0:A.server:void 0)})});for(const p of S)p.catch(()=>{});const w=[];for(let p=0;p<l.length;p+=1)if(l[p])try{w.push(await S[p])}catch(v){if(v instanceof We)return{type:"redirect",location:v.location};if(G.has(o))return De({error:await $(v,{params:r,url:t,route:{id:a.id}}),url:t,params:r,route:a});let A=X(v),k;if(m!=null&&m.includes(v))A=v.status??A,k=v.error;else if(v instanceof ae)k=v.body;else{if(await x.updated.check())return await Ye(),await F(t);k=await $(v,{params:r,url:t,route:{id:a.id}})}const P=await Zt(p,w,i);return P?ne({url:t,params:r,branch:w.slice(0,P.idx).concat(P.node),status:A,error:k,route:a}):await ot(t,{id:a.id},k,A)}else w.push(void 0);return ne({url:t,params:r,branch:w,status:200,error:null,route:a,form:n?void 0:null})}async function Zt(e,n,t){for(;e--;)if(t[e]){let r=e;for(;!n[r];)r-=1;try{return{idx:r+1,node:{node:await t[e](),loader:t[e],data:{},server:null,universal:null}}}catch{continue}}}async function se({status:e,error:n,url:t,route:r}){const a={};let o=null;if(V.server_loads[0]===0)try{const l=await st(t,[!0]);if(l.type!=="data"||l.nodes[0]&&l.nodes[0].type!=="data")throw 0;o=l.nodes[0]??null}catch{(t.origin!==W||t.pathname!==location.pathname||be)&&await F(t)}const s=await Ee({loader:pe,url:t,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Se(o)}),c={node:await Z(),loader:Z,universal:null,server:null,data:null};return ne({url:t,params:a,branch:[s,c],status:e,error:n,route:null})}function Re(e,n){if(!e||re(e,L))return;let t;try{t=V.hooks.reroute({url:new URL(e)})??e.pathname}catch{return}const r=rt(t);for(const a of oe){const o=a.exec(r);if(o)return{id:e.pathname+e.search,invalidating:n,route:a,params:pt(o),url:e}}}function rt(e){return ht(e.slice(L.length)||"/")}function at({url:e,type:n,intent:t,delta:r}){let a=!1;const o=ct(_,t,e,n);r!==void 0&&(o.navigation.delta=r);const i={...o.navigation,cancel:()=>{a=!0,o.reject(new Error("navigation cancelled"))}};return K||Je.forEach(s=>s(i)),a?null:o}async function Y({type:e,url:n,popped:t,keepfocus:r,noscroll:a,replace_state:o,state:i={},redirect_count:s=0,nav_token:c={},accept:l=Ce,block:d=Ce}){const h=Re(n,!1),y=at({url:n,type:e,delta:t==null?void 0:t.delta,intent:h});if(!y){d();return}const u=E,g=U;l(),K=!0,ee&&x.navigating.set(y.navigation),te=c;let f=h&&await nt(h);if(!f){if(re(n,L))return await F(n);f=await ot(n,{id:null},await $(new we(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(h==null?void 0:h.url)||n,te!==c)return y.reject(new Error("navigation aborted")),!1;if(f.type==="redirect")if(s>=20)f=await se({status:500,error:await $(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return et(new URL(f.location,n).href,{},s+1,c),!1;else f.props.page.status>=400&&await x.updated.check()&&(await Ye(),await F(n));if(zt(),ve(u),Ze(g),f.props.page.url.pathname!==n.pathname&&(n.pathname=f.props.page.url.pathname),i=t?t.state:i,!t){const w=o?0:1,p={[D]:E+=w,[H]:U+=w,[qe]:i};(o?history.replaceState:history.pushState).call(history,p,"",n),o||Wt(E,U)}if(R=null,f.props.page.state=i,ee){_=f.state,f.props.page&&(f.props.page.url=n);const w=(await Promise.all(Yt.map(p=>p(y.navigation)))).filter(p=>typeof p=="function");if(w.length>0){let p=function(){j=j.filter(v=>!w.includes(v))};w.push(p),j.push(...w)}ke.$set(f.props),Xe=!0}else tt(f,ge,!1);const{activeElement:m}=document;await ft();const b=t?t.scroll:a?_e():null;if(Ne){const w=n.hash&&document.getElementById(decodeURIComponent(n.hash.slice(1)));b?scrollTo(b.x,b.y):w?w.scrollIntoView():scrollTo(0,0)}const S=document.activeElement!==m&&document.activeElement!==document.body;!r&&!S&&rn(),Ne=!0,f.props.page&&(I=f.props.page),K=!1,e==="popstate"&&Qe(U),y.fulfil(void 0),j.forEach(w=>w(y.navigation)),x.navigating.set(null)}async function ot(e,n,t,r){return e.origin===W&&e.pathname===location.pathname&&!be?await se({status:r,error:t,url:e,route:n}):await F(e)}function Qt(){let e;T.addEventListener("mousemove",o=>{const i=o.target;clearTimeout(e),e=setTimeout(()=>{r(i,2)},20)});function n(o){r(o.composedPath()[0],1)}T.addEventListener("mousedown",n),T.addEventListener("touchstart",n,{passive:!0});const t=new IntersectionObserver(o=>{for(const i of o)i.isIntersecting&&(de(i.target.href),t.unobserve(i.target))},{threshold:0});function r(o,i){const s=Me(o,T);if(!s)return;const{url:c,external:l,download:d}=he(s,L);if(l||d)return;const h=J(s),y=c&&_.url.pathname+_.url.search===c.pathname+c.search;if(!h.reload&&!y)if(i<=h.preload_data){const u=Re(c,!1);u&&Jt(u)}else i<=h.preload_code&&de(c.pathname)}function a(){t.disconnect();for(const o of T.querySelectorAll("a")){const{url:i,external:s,download:c}=he(o,L);if(s||c)continue;const l=J(o);l.reload||(l.preload_code===z.viewport&&t.observe(o),l.preload_code===z.eager&&de(i.pathname))}}j.push(a),a()}function $(e,n){if(e instanceof ae)return e.body;const t=X(e),r=Kt(e);return V.hooks.handleError({error:e,event:n,status:t,message:r})??{message:r}}function en(e,n={}){return e=Ge(e),e.origin!==W?Promise.reject(new Error("goto: invalid URL")):et(e,n,0)}function tn(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Oe(),!K){const a=ct(_,void 0,null,"leave"),o={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};Je.forEach(i=>i(o))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Oe()}),(n=navigator.connection)!=null&&n.saveData||Qt(),T.addEventListener("click",async t=>{var y;if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=Me(t.composedPath()[0],T);if(!r)return;const{url:a,external:o,target:i,download:s}=he(r,L);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=J(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||s)return;if(o||c.reload){at({url:a,type:"link"})?K=!0:t.preventDefault();return}const[d,h]=a.href.split("#");if(h!==void 0&&d===fe(location)){const[,u]=_.url.href.split("#");if(u===h){t.preventDefault(),h===""||h==="top"&&r.ownerDocument.getElementById("top")===null?window.scrollTo({top:0}):(y=r.ownerDocument.getElementById(decodeURIComponent(h)))==null||y.scrollIntoView();return}if(B=!0,ve(E),e(a),!c.replace_state)return;B=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),Y({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),T.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const s=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(re(s,L))return;const c=t.target,l=J(c);if(l.reload)return;t.preventDefault(),t.stopPropagation();const d=new FormData(c),h=a==null?void 0:a.getAttribute("name");h&&d.append(h,(a==null?void 0:a.getAttribute("value"))??""),s.search=new URLSearchParams(d).toString(),Y({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href})}),addEventListener("popstate",async t=>{var r;if((r=t.state)!=null&&r[D]){const a=t.state[D];if(te={},a===E)return;const o=C[a],i=t.state[qe]??{},s=new URL(t.state[xt]??location.href),c=t.state[H],l=fe(location)===fe(_.url);if(c===U&&(Xe||l)){e(s),C[E]=_e(),o&&scrollTo(o.x,o.y),i!==I.state&&(I={...I,state:i},ke.$set({page:I})),E=a;return}const h=a-E;await Y({type:"popstate",url:s,popped:{state:i,scroll:o,delta:h},accept:()=>{E=a,U=c},block:()=>{history.go(-h)},nav_token:te})}else if(!B){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{B&&(B=!1,history.replaceState({...history.state,[D]:++E,[H]:U},"",location.href))});for(const t of document.querySelectorAll("link"))t.rel==="icon"&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&x.navigating.set(null)});function e(t){_.url=t,x.page.set({...I,url:t}),x.page.notify()}}async function nn(e,{status:n=200,error:t,node_ids:r,params:a,route:o,data:i,form:s}){be=!0;const c=new URL(location.href);({params:a={},route:o={id:null}}=Re(c,!1)||{});let l;try{const d=r.map(async(u,g)=>{const f=i[g];return f!=null&&f.uses&&(f.uses=it(f.uses)),Ee({loader:V.nodes[u],url:c,params:a,route:o,parent:async()=>{const m={};for(let b=0;b<g;b+=1)Object.assign(m,(await d[b]).data);return m},server_data_node:Se(f)})}),h=await Promise.all(d),y=oe.find(({id:u})=>u===o.id);if(y){const u=y.layouts;for(let g=0;g<u.length;g++)u[g]||h.splice(g,0,void 0)}l=ne({url:c,params:a,branch:h,status:n,error:t,form:s,route:y??null})}catch(d){if(d instanceof We){await F(new URL(d.location,location.href));return}l=await se({status:X(d),error:await $(d,{url:c,params:a,route:o}),url:c,route:o})}l.props.page&&(l.props.page.state={}),tt(l,e,!0)}async function st(e,n){var a;const t=new URL(e);t.pathname=wt(e.pathname),e.pathname.endsWith("/")&&t.searchParams.append(Mt,"1"),t.searchParams.append(Ht,n.map(o=>o?"1":"0").join(""));const r=await $e(t.href);if(!r.ok){let o;throw(a=r.headers.get("content-type"))!=null&&a.includes("application/json")?o=await r.json():r.status===404?o="Not Found":r.status===500&&(o="Internal Error"),new ae(r.status,o)}return new Promise(async o=>{var h;const i=new Map,s=r.body.getReader(),c=new TextDecoder;function l(y){return Bt(y,{Promise:u=>new Promise((g,f)=>{i.set(u,{fulfil:g,reject:f})})})}let d="";for(;;){const{done:y,value:u}=await s.read();if(y&&!d)break;for(d+=!u&&d?`
2
+ `:c.decode(u,{stream:!0});;){const g=d.indexOf(`
3
+ `);if(g===-1)break;const f=JSON.parse(d.slice(0,g));if(d=d.slice(g+1),f.type==="redirect")return o(f);if(f.type==="data")(h=f.nodes)==null||h.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=it(m.uses),m.data=l(m.data))}),o(f);else if(f.type==="chunk"){const{id:m,data:b,error:S}=f,w=i.get(m);i.delete(m),S?w.reject(l(S)):w.fulfil(l(b))}}}})}function it(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function rn(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const n=document.body,t=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),t!==null?n.setAttribute("tabindex",t):n.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let o=0;o<r.rangeCount;o+=1)a.push(r.getRangeAt(o));setTimeout(()=>{if(r.rangeCount===a.length){for(let o=0;o<r.rangeCount;o+=1){const i=a[o],s=r.getRangeAt(o);if(i.commonAncestorContainer!==s.commonAncestorContainer||i.startContainer!==s.startContainer||i.endContainer!==s.endContainer||i.startOffset!==s.startOffset||i.endOffset!==s.endOffset)return}r.removeAllRanges()}})}}}function ct(e,n,t,r){var c,l;let a,o;const i=new Promise((d,h)=>{a=d,o=h});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:t&&{params:(n==null?void 0:n.params)??null,route:{id:((l=n==null?void 0:n.route)==null?void 0:l.id)??null},url:t},willUnload:!n,type:r,complete:i},fulfil:a,reject:o}}export{ae as H,sn as a,en as g,x as s,ye as w};
@@ -12,7 +12,7 @@ var So=Object.defineProperty;var ko=(e,n,t)=>n in e?So(e,n,{enumerable:!0,config
12
12
  `+d+"}"}}return s.pop(),i=d,g}function x(f){if(f.length===0)return h(f);const d=String.fromCodePoint(f.codePointAt(0));if(!xe.isIdStartChar(d))return h(f);for(let p=d.length;p<f.length;p++)if(!xe.isIdContinueChar(String.fromCodePoint(f.codePointAt(p))))return h(f);return f}function b(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let d=i;i=i+u;let p=[];for(let g=0;g<f.length;g++){const v=c(String(g),f);p.push(v!==void 0?v:"null")}let D;if(p.length===0)D="[]";else if(u==="")D="["+p.join(",")+"]";else{let g=`,
13
13
  `+i,v=p.join(g);D=`[
14
14
  `+i+v+`,
15
- `+d+"]"}return s.pop(),i=d,D}};const Dc={parse:lc,stringify:xc};var gc=Dc,Gr=10**-4;function G0(e){return e*(Math.PI/180)}function Ie(e){return e/(Math.PI/180)}function te(e){let n=e;return Math.abs(n)<Gr&&(n=0),n}function Pt(e){let n=e%(2*Math.PI);return n<0&&(n+=2*Math.PI),n}function le(e){let n=Pt(e);return n>Math.PI&&(n-=2*Math.PI),n}function at(e){let n=e%Math.PI;return n<0&&(n+=Math.PI),n}function Ne(e){let n=at(e);return n>Math.PI/2&&(n-=Math.PI),n}function kr(e,n,t){const r=le(n)-le(e);return t?Pt(r):Pt(r)-2*Math.PI}function to(e,n,t,r){let s=!1;if(te(le(e-n))===0)s=!0;else if(te(le(e-t))===0)s=!0;else{const i=kr(n,t,r),o=kr(n,e,r);Math.abs(o)<Math.abs(i)&&(s=!0)}return s}function ct(e){return e.toFixed(2)}var me={point:"grey",line:"grey",vector:"DarkTurquoise",contour:"green",mainOuter:"SlateBlue",mainInner:"SteelBlue",mainB:"SlateGrey",second:"Violet",secondB:"SlateGrey",dynamics:"Tomato",ruler:"blue",origin:"red",reference:"blue",mouse:"yellow"};function Ot(e,n,t){const r=t.shiftX+(e-t.xMin)*t.scaleX,s=t.shiftY+(n-t.yMin)*t.scaleY;return[r,s]}function W0(e,n,t){const r=(e-t.shiftX)/t.scaleX+t.xMin,s=(n-t.shiftY)/t.scaleY+t.yMin;return[r,s]}function no(e,n){if(te(n.scaleX-Math.abs(n.scaleY))!==0)throw`err683: iAdjust.scaleX and scaleY differ ${n.scaleX} ${n.scaleY}`;if(n.scaleX<0)throw`err684: iAdjust.scaleX ${n.scaleX} is negative`;const t=e*n.scaleX;if(t<0)throw`err685: rRadius for canvas ${t} is negative`;return t}function Tr(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function Pr(e,n,t,r,s,i){const o=Tr(),a=Math.max(n-e,1),u=Math.max(r-t,1),l=s/a,c=i/u;let h=.9*l,m=a;return c<l&&(h=.9*c,m=u),o.init=1,o.xMin=e,o.yMin=t,o.xyDiff=m,o.shiftX=.05*s,o.scaleX=h,o.shiftY=i-.05*i,o.scaleY=-1*h,o}function H0(e,n,t){const r=structuredClone(t);return r.xMin=e-r.xyDiff/2,r.yMin=n-r.xyDiff/2,r}function Z0(e,n,t,r,s,i){const o=Math.min(e,t),a=Math.max(e,t),u=Math.min(n,r),l=Math.max(n,r);return Pr(o,a,u,l,s,i)}function Y0(e,n){const t=structuredClone(n),r=(1-e)/2;return t.xMin+=r*n.xyDiff,t.yMin+=r*n.xyDiff,t.xyDiff*=e,t.scaleX*=1/e,t.scaleY*=1/e,t}function X0(e,n,t,r,s){const i=structuredClone(s),o=t-e,a=r-n;return i.xMin+=-o,i.yMin+=-a,i}function Zn(e,n){let t=0;if(n>e)throw`err539: ila < ilc ${e} ${n}`;return t=Math.sqrt(e**2-n**2),t}function K0(e,n,t){return Math.sqrt(e**2+n**2-2*e*n*Math.cos(t))}function Xs(e,n,t){let r=0;const s=[e,n,t];for(let o=0;o<s.length;o++)if(s[o]<0)throw`err209: l3[${o}] = ${s[o]}`;const i=s.sort(function(o,a){return a-o});if(i[0]>i[1]+i[2])throw`err839: impossible triangle with length ${e}, ${n} and ${t}`;return r=Math.acos((e**2+n**2-t**2)/(2*e*n)),r}function Ks(e,n,t){let r=0;const s=[e,n,t];for(let u=0;u<s.length;u++)if(te(s[u])===0||s[u]<0)throw`err329: negative or zero triangle-args ${u} : ${s[u]}`;const i=at(n),o=at(t);if(i+o>Math.PI)throw`err939: impossible triangle with angles ${n} and ${t}`;return r=e*Math.sin(t)/Math.sin(n),r}function z0(e,n,t){let r=0;const s=[e,n,t];for(let i=0;i<s.length;i++)if(s[i]<=0)throw`err429: negative or zero triangle-args ${i} : ${s[i]}`;return r=Math.asin(n*Math.sin(t)/e),r}var wc=(e=>(e[e.eDefault=0]="eDefault",e[e.eCircle=1]="eCircle",e[e.eCross=2]="eCross",e[e.eSquare=3]="eSquare",e[e.eBigSquare=4]="eBigSquare",e[e.eTwoTri=5]="eTwoTri",e[e.eTri1=6]="eTri1",e[e.eTri2=7]="eTri2",e[e.eTri3=8]="eTri3",e[e.eTri4=9]="eTri4",e))(wc||{}),Ue=class Zt{constructor(n,t,r=0){I(this,"cx");I(this,"cy");I(this,"shape");this.cx=n,this.cy=t,this.shape=r}draw(n,t,r=me.point,s=0){if(isFinite(this.cx)&&isFinite(this.cy)){const i=n.canvas.width*.006999999999999999,o=2*i,[a,u]=Ot(this.cx,this.cy,t);let l=s;switch(l===0&&(l=this.shape),n.beginPath(),l){case 2:n.moveTo(a-o,u),n.lineTo(a+o,u),n.moveTo(a,u-o),n.lineTo(a,u+o);break;case 3:n.rect(a-i,u-i,2*i,2*i);break;case 4:n.rect(a-2*i,u-2*i,4*i,4*i);break;case 5:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o),n.lineTo(a-o,u);break;case 6:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 7:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 8:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 9:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 1:default:n.arc(a,u,i,0,2*Math.PI)}n.strokeStyle=r,n.stroke()}else console.log(`INFO489: point not draw because of infinity ${this.cx} ${this.cy}`)}distanceOrig(){return Math.sqrt(this.cx**2+this.cy**2)}angleOrig(){return Math.atan2(this.cy,this.cx)}getPolar(){return[this.angleOrig(),this.distanceOrig()]}setPolar(n,t){return new Zt(t*Math.cos(n),t*Math.sin(n))}translate(n,t){return new Zt(this.cx+n,this.cy+t)}translatePolar(n,t){return new Zt(this.cx+t*Math.cos(n),this.cy+t*Math.sin(n))}clone(n=0){return new Zt(this.cx,this.cy,n)}rotateOrig(n){const t=this.getPolar();return this.setPolar(t[0]+n,t[1])}scaleOrig(n){const t=this.getPolar();return this.setPolar(t[0],t[1]*n)}rotate(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0]+t,s[1]).translate(n.cx,n.cy)}scale(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0],s[1]*t).translate(n.cx,n.cy)}isEqual(n){return te(this.cx-n.cx)===0&&te(this.cy-n.cy)===0}distanceToPoint(n){return Math.sqrt((n.cx-this.cx)**2+(n.cy-this.cy)**2)}angleToPoint(n){if(te(this.distanceToPoint(n))===0)throw`err434: no angle because points identical ${this.cx} ${n.cx} ${this.cy} ${n.cy}`;return Math.atan2(n.cy-this.cy,n.cx-this.cx)}angleFromToPoints(n,t){const r=this.angleToPoint(n),s=this.angleToPoint(t);return le(s-r)}middlePoint(n){const t=(this.cx+n.cx)/2,r=(this.cy+n.cy)/2;return new Zt(t,r)}equidistantPoint(n,t,r){const s=this.distanceToPoint(n)/2;if(this.isEqual(n))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(t<s)throw`err392: equidistance ${t} smaller than lp1p2h ${s}`;const i=this.middlePoint(n),o=this.angleToPoint(n)+Math.PI/2,a=Math.sqrt(t**2-s**2),u=i.translatePolar(o,a),l=i.translatePolar(o+Math.PI,a),c=r.distanceToPoint(u),h=r.distanceToPoint(l);if(a!==0&&c===h)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let m=u;return h<c&&(m=l),m}};function Z(e,n,t=0){return new Ue(e,n,t)}function ro(e){let n=0,t=0,r=0,s=0;if(e.length>0){const i=e[0];if(i.cx===Number.NEGATIVE_INFINITY||i.cx===Number.POSITIVE_INFINITY||i.cy===Number.NEGATIVE_INFINITY||i.cy===Number.POSITIVE_INFINITY)throw`err292: pointMinMax first point with infinity: ${i.cx} ${i.cy}`;n=e[0].cx,t=e[0].cx,r=e[0].cy,s=e[0].cy;for(const o of e)o.cx!==Number.NEGATIVE_INFINITY&&(n=Math.min(n,o.cx)),o.cx!==Number.POSITIVE_INFINITY&&(t=Math.max(t,o.cx)),o.cy!==Number.NEGATIVE_INFINITY&&(r=Math.min(r,o.cy)),o.cy!==Number.POSITIVE_INFINITY&&(s=Math.max(s,o.cy))}return[n,t,r,s]}var yc=class Te{constructor(n,t,r){I(this,"cx");I(this,"cy");I(this,"ca");this.cx=n,this.cy=t,this.ca=r}draw(n,t,r=me.line){const s=n.canvas.width*2,[i,o]=Ot(this.cx-s*Math.cos(this.ca),this.cy-s*Math.sin(this.ca),t),[a,u]=Ot(this.cx+2*s*Math.cos(this.ca),this.cy+2*s*Math.sin(this.ca),t);n.beginPath(),n.moveTo(i,o),n.lineTo(a,u),n.strokeStyle=r,n.stroke()}setFromPoints(n,t){return this.cx=n.cx,this.cy=n.cy,this.ca=n.angleToPoint(t),this}getAffine(){const n={quasiVertical:!1,ha:0,hb:0,va:0,vb:0};return Math.abs(Ne(this.ca))>Math.PI/4?(n.quasiVertical=!0,n.va=-1*Math.tan(Ne(this.ca-Math.PI/2)),n.vb=this.cx-n.va*this.cy):(n.ha=Math.tan(Ne(this.ca)),n.hb=this.cy-n.ha*this.cx),n}setAffine(n){const t=new Te(0,0,0);return n.quasiVertical?(t.ca=Math.PI/2-Math.atan(n.va),t.cx=n.vb,t.cy=0):(t.ca=Math.atan(n.ha),t.cx=0,t.cy=n.hb),t}intersection(n){if(this.isParallel(n))throw`err902: no intersection, lines are parallel ca1: ${this.ca} ca2: ${n.ca}`;let t=0,r=0;const s=this.getAffine(),i=n.getAffine();return s.quasiVertical?i.quasiVertical?(r=(s.vb-i.vb)/(i.va-s.va),t=s.va*r+s.vb):(t=(s.va*i.hb+s.vb)/(1-s.va*i.ha),r=i.ha*t+i.hb):i.quasiVertical?(r=(s.ha*i.vb+s.hb)/(1-s.ha*i.va),t=i.va*r+i.vb):(t=(s.hb-i.hb)/(i.ha-s.ha),r=s.ha*t+s.hb),Z(t,r)}getAxisXIntersection(){const n=new Te(0,0,0);return this.intersection(n).cx}getAxisYIntersection(){const n=new Te(0,0,Math.PI/2);return this.intersection(n).cy}getAxisXIntersecTri(){let n=1/0;if(te(Ne(this.ca))!==0){const t=new Ue(this.cx,this.cy),r=at(this.ca),s=t.angleOrig(),i=t.distanceOrig();if(te(i)===0)n=0;else if(te(Ne(r-s))===0)n=0;else{const o=Math.min(r,Math.PI-r),a=le(r-s),u=Math.min(Math.abs(a),Math.PI-Math.abs(a));n=Math.sign(a)*Ks(i,o,u)}}return n}getAxisYIntersecTri(){let n=1/0;if(te(Ne(this.ca-Math.PI/2))!==0){const t=new Ue(this.cx,this.cy),r=Ne(this.ca),s=t.angleOrig(),i=t.distanceOrig(),o=Ne(r-s);if(te(i)===0)n=0;else if(te(o)===0)n=0;else{const a=at(r-Math.PI/2),u=-1*le(r-s),l=Math.min(a,Math.PI-a),c=Math.min(Math.abs(u),Math.PI-Math.abs(u));n=Math.sign(u)*Ks(i,l,c)}}return n}angleOrig(){const t=new Ue(this.cx,this.cy).angleOrig(),r=Ne(this.ca),s=-1*le(r-t);let i=0;return s<0&&(i=-Math.PI),at(Math.PI/2+this.ca)+i}distanceOrig(){const n=this.angleOrig(),t=new Ue(this.cx,this.cy),r=t.angleOrig(),s=t.distanceOrig(),i=Ne(r-n);return s*Math.cos(i)}projectOrig(){const n=this.angleOrig(),t=this.distanceOrig();return Z(0,0).setPolar(n,t)}translate(n,t){return new Te(this.cx+n,this.cy+t,this.ca)}rotateOrig(n){const t=new Ue(this.cx,this.cy).rotateOrig(n);return new Te(t.cx,t.cy,le(this.ca+n))}scaleOrig(n){const t=new Ue(this.cx,this.cy).scaleOrig(n);return new Te(t.cx,t.cy,this.ca)}rotate(n,t){const r=new Ue(this.cx,this.cy).rotate(n,t);return new Te(r.cx,r.cy,le(this.ca+t))}scale(n,t){const r=new Ue(this.cx,this.cy).scale(n,t);return new Te(r.cx,r.cy,this.ca)}clone(){const n=new Ue(this.cx,this.cy);return new Te(n.cx,n.cy,this.ca)}lineOrthogonal(n){return new Te(n.cx,n.cy,this.ca+Math.PI/2)}lineParallel(n){return new Te(n.cx,n.cy,this.ca)}distanceToPoint(n){let t=0;const r=new Ue(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const i=r.angleToPoint(n),o=Ne(i-this.ca);t=s*Math.abs(Math.sin(o))}return t}projectPoint(n){let t=0;const r=new Ue(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const o=r.angleToPoint(n),a=le(o-this.ca);t=s*Math.cos(a)}return r.translatePolar(this.ca,t)}isParallel(n){return te(Ne(this.ca-n.ca))===0}isOrthogonal(n){return te(Ne(Math.PI/2+this.ca-n.ca))===0}isEqual(n){const t=Z(n.cx,n.cy),r=this.distanceToPoint(t);return te(r)===0&&this.isParallel(n)}bisector(n,t){const r=this.intersection(n),s=at(this.ca),i=at(n.ca),o=Math.min(s,i),a=Math.max(s,i),u=[o,a,o+Math.PI,a+Math.PI,o],l=r.angleToPoint(t);let c=0;for(let x=0;x<4;x++){const b=le(u[x]-l),f=le(u[x+1]-l);if(b===0||f===0)throw`err419: bad reference point for bisecor ${t.cx} ${t.cy}`;b<0&&f>0&&(c=x)}const m=at((o+a)/2)+c*Math.PI/2;return new Te(r.cx,r.cy,m)}lineParallelDistance(n,t,r){const s=Z(this.cx,this.cy),i=s.translatePolar(this.ca+Math.PI/2,n),o=s.translatePolar(this.ca-Math.PI/2,n);let a=o,u=t;return te(this.distanceToPoint(u))===0&&(u=r),u.distanceToPoint(i)<u.distanceToPoint(o)&&(a=i),new Te(a.cx,a.cy,this.ca)}};function Yn(e,n,t){return new yc(e,n,t)}function mn(e,n){return Yn(0,0,0).setFromPoints(e,n)}function Br(e,n){if(e.isEqual(n))throw`err546: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const t=e.middlePoint(n),r=at(e.angleToPoint(n)+Math.PI/2);return Yn(t.cx,t.cy,r)}function bc(e,n,t){if(e.isEqual(n)||n.isEqual(t)||e.isEqual(t))throw`err833: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const r=Br(e,n),s=Br(n,t);return r.intersection(s)}function Ke(e){let n=!1;return(e===0||e===1)&&(n=!0),n}function sn(e){let n=!1;return(Ke(e)||e===6)&&(n=!0),n}function In(e){let n=!1;return(e===3||e===4||e===5)&&(n=!0),n}function gr(e){let n=!1;return(e===2||In(e))&&(n=!0),n}var Qe=class so{constructor(n,t,r,s,i=!1,o=!1){I(this,"sType");I(this,"px");I(this,"py");I(this,"radius");I(this,"arcLarge");I(this,"arcCcw");this.sType=n,this.px=t,this.py=r,this.radius=s,this.arcLarge=i,this.arcCcw=o}clone(){return new so(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},Ge=class{constructor(e,n,t,r,s,i,o,a=!1){I(this,"sType");I(this,"p1");I(this,"p2");I(this,"pc");I(this,"radius");I(this,"a1");I(this,"a2");I(this,"arcCcw");this.sType=e,this.p1=n,this.p2=t,this.pc=r,this.radius=s,this.a1=i,this.a2=o,this.arcCcw=a}},Ac=class{constructor(){I(this,"debugPoints");I(this,"debugLines");I(this,"logMessage");this.debugPoints=[],this.debugLines=[],this.logMessage=""}addPoint(e){this.debugPoints.push(e)}getPoints(){return this.debugPoints}clearPoints(){this.debugPoints=[]}addLine(e){this.debugLines.push(e)}getLines(){return this.debugLines}clearLines(){this.debugLines=[]}addMsg(e){this.logMessage+=e}getMsg(){return this.logMessage}clearMsg(){this.logMessage=""}},Ft=new Ac;function St(e,n,t){if(t.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${t.sType}`;const r=Z(e,n),s=Z(t.px,t.py),i=r.distanceToPoint(s)/2;if(r.isEqual(s))throw`err638: no equidistance because identical point ${r.cx} ${s.cy}`;let o=0;if(te(t.radius-i)===0)o=0;else{if(t.radius<i)throw`err399: radius ${t.radius} smaller than lp1p2h ${i}`;o=Zn(t.radius,i)}const a=r.middlePoint(s),u=r.angleToPoint(s)+Math.PI/2,l=a.translatePolar(u,o),c=a.translatePolar(u+Math.PI,o);let h=l;(!t.arcLarge&&!t.arcCcw||t.arcLarge&&t.arcCcw)&&(h=c);const m=h.angleToPoint(r),x=h.angleToPoint(s);return new Ge(1,r,s,h,t.radius,m,x,t.arcCcw)}function _c(e){let n=Pt(e.a2-e.a1);e.arcCcw||(n=2*Math.PI-n);let t=!1;return n>Math.PI&&(t=!0),new Qe(1,e.p2.cx,e.p2.cy,e.radius,t,e.arcCcw)}function vc(e,n,t){const r=e.p1,s=e.p2,i=t.p1,o=t.p2;if(!s.isEqual(i))throw`err309: makeCorner-prepare p2 and p2b differ px ${s.cx} ${i.cx} py ${s.cy} ${i.cy}`;let a=s.angleToPoint(r);if(e.sType===1){const f=e.arcCcw?1:-1;a=e.a2-f*Math.PI/2}let u=s.angleToPoint(o);if(t.sType===1){const f=t.arcCcw?1:-1;u=t.a1+f*Math.PI/2}const l=u-a;let h=le(l)/2;if(te(h)===0){const f=Gr*.01;if(e.sType===0&&t.sType===1)h=t.arcCcw?f:-f;else if(e.sType===1&&t.sType===0)h=e.arcCcw?f:-f;else if(e.sType===0&&t.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${h}`}const m=a+h,x=s.translatePolar(m,n.radius);return{s1:e,s2:n,s3:t,ra:n.radius,p1:r,p2:s,p3:o,p4:e.pc,p5:t.pc,p6:x,at1:a,at3:u,abi:m,aph:h}}function Vn(e,n,t){if(n.sType!==1)throw`err510: modifRadius with wrong type ${n.sType}`;const r=e>0?1:-1,s=n.arcCcw?1:-1,i=te(e)===0?1:r*s,o=n.radius+i*t;if(o<=0)throw`err621: modifRadius with negative modified lenght ${o}`;return o}function Wr(e,n,t,r){const s=t.translatePolar(e,n),i=t.translatePolar(e+Math.PI,n),o=r.distanceToPoint(s),a=r.distanceToPoint(i);return o<a?s:i}function zs(e,n,t,r,s){const i=e.translatePolar(n-t,r),o=e.translatePolar(n+t,r),a=s.distanceToPoint(i),u=s.distanceToPoint(o);return a<u?-1:1}function Xn(e,n){const t=n.clone(),r=e.p1.clone(),s=e.p2;if(e.sType!==0)throw`err103: newStrokeFirst unexpected sType ${e.sType}`;const i=mn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err104: newStrokeFirst new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(te(le(a-o))!==0)throw`err105: newStrokeFirst new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err106: newStrokeFirst new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Z(0,0);return new Ge(0,r,t,c,0,0,0,!1)}function Kn(e,n){const t=n.clone(),r=e.p2.clone(),s=e.p1;if(e.sType!==0)throw`err203: newStrokeSecond unexpected sType ${e.sType}`;const i=mn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err204: newStrokeSecond new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(te(le(a-o))!==0)throw`err205: newStrokeSecond new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err206: newStrokeSecond new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Z(0,0);return new Ge(0,t,r,c,0,0,0,!1)}function zn(e,n){if(e.sType!==1)throw`err203: newArcFirst unexpected sType ${e.sType}`;const t=e.p1.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!to(i,e.a1,e.a2,e.arcCcw))throw`err908: newArcFirst a48 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new Ge(1,t,s,r,e.radius,e.a1,i,e.arcCcw)}function Jn(e,n){if(e.sType!==1)throw`err204: newArcSecond unexpected sType ${e.sType}`;const t=e.p2.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!to(i,e.a1,e.a2,e.arcCcw))throw`err907: newArcSecond a59 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new Ge(1,s,t,r,e.radius,i,e.a2,e.arcCcw)}function xn(e,n,t,r,s,i){const o=e.clone(),a=n.clone(),u=t.clone(),l=u.distanceToPoint(o),c=u.distanceToPoint(a);if(te(l-r)!==0||te(c-r)!==0)throw`err610: newRounded not on circle ${r} ${l} ${c}`;const h=u.angleToPoint(o),m=u.angleToPoint(a),x=le(h-i+Math.PI),b=le(m-i+Math.PI);Math.abs(b-x)>Math.PI+Gr&&Ft.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${ct(x)} ${ct(b)} at ${ct(u.cx)} ${ct(u.cy)}
15
+ `+d+"]"}return s.pop(),i=d,D}};const Dc={parse:lc,stringify:xc};var gc=Dc,Gr=10**-4;function G0(e){return e*Math.PI/180}function Ie(e){return 180*e/Math.PI}function te(e){let n=e;return Math.abs(n)<Gr&&(n=0),n}function Pt(e){let n=e%(2*Math.PI);return n<0&&(n+=2*Math.PI),n}function le(e){let n=Pt(e);return n>Math.PI&&(n-=2*Math.PI),n}function at(e){let n=e%Math.PI;return n<0&&(n+=Math.PI),n}function Ne(e){let n=at(e);return n>Math.PI/2&&(n-=Math.PI),n}function kr(e,n,t){const r=le(n)-le(e);return t?Pt(r):Pt(r)-2*Math.PI}function to(e,n,t,r){let s=!1;if(te(le(e-n))===0)s=!0;else if(te(le(e-t))===0)s=!0;else{const i=kr(n,t,r),o=kr(n,e,r);Math.abs(o)<Math.abs(i)&&(s=!0)}return s}function ct(e){return e.toFixed(2)}var me={point:"grey",line:"grey",vector:"DarkTurquoise",contour:"green",mainOuter:"SlateBlue",mainInner:"SteelBlue",mainB:"SlateGrey",second:"Violet",secondB:"SlateGrey",dynamics:"Tomato",ruler:"blue",origin:"red",reference:"blue",mouse:"yellow"};function Ot(e,n,t){const r=t.shiftX+(e-t.xMin)*t.scaleX,s=t.shiftY+(n-t.yMin)*t.scaleY;return[r,s]}function W0(e,n,t){const r=(e-t.shiftX)/t.scaleX+t.xMin,s=(n-t.shiftY)/t.scaleY+t.yMin;return[r,s]}function no(e,n){if(te(n.scaleX-Math.abs(n.scaleY))!==0)throw`err683: iAdjust.scaleX and scaleY differ ${n.scaleX} ${n.scaleY}`;if(n.scaleX<0)throw`err684: iAdjust.scaleX ${n.scaleX} is negative`;const t=e*n.scaleX;if(t<0)throw`err685: rRadius for canvas ${t} is negative`;return t}function Tr(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function Pr(e,n,t,r,s,i){const o=Tr(),a=Math.max(n-e,1),u=Math.max(r-t,1),l=s/a,c=i/u;let h=.9*l,m=a;return c<l&&(h=.9*c,m=u),o.init=1,o.xMin=e,o.yMin=t,o.xyDiff=m,o.shiftX=.05*s,o.scaleX=h,o.shiftY=i-.05*i,o.scaleY=-1*h,o}function H0(e,n,t){const r=structuredClone(t);return r.xMin=e-r.xyDiff/2,r.yMin=n-r.xyDiff/2,r}function Z0(e,n,t,r,s,i){const o=Math.min(e,t),a=Math.max(e,t),u=Math.min(n,r),l=Math.max(n,r);return Pr(o,a,u,l,s,i)}function Y0(e,n){const t=structuredClone(n),r=(1-e)/2;return t.xMin+=r*n.xyDiff,t.yMin+=r*n.xyDiff,t.xyDiff*=e,t.scaleX*=1/e,t.scaleY*=1/e,t}function X0(e,n,t,r,s){const i=structuredClone(s),o=t-e,a=r-n;return i.xMin+=-o,i.yMin+=-a,i}function Zn(e,n){let t=0;if(n>e)throw`err539: ila < ilc ${e} ${n}`;return t=Math.sqrt(e**2-n**2),t}function K0(e,n,t){return Math.sqrt(e**2+n**2-2*e*n*Math.cos(t))}function Xs(e,n,t){let r=0;const s=[e,n,t];for(let o=0;o<s.length;o++)if(s[o]<0)throw`err209: l3[${o}] = ${s[o]}`;const i=s.sort(function(o,a){return a-o});if(i[0]>i[1]+i[2])throw`err839: impossible triangle with length ${e}, ${n} and ${t}`;return r=Math.acos((e**2+n**2-t**2)/(2*e*n)),r}function Ks(e,n,t){let r=0;const s=[e,n,t];for(let u=0;u<s.length;u++)if(te(s[u])===0||s[u]<0)throw`err329: negative or zero triangle-args ${u} : ${s[u]}`;const i=at(n),o=at(t);if(i+o>Math.PI)throw`err939: impossible triangle with angles ${n} and ${t}`;return r=e*Math.sin(t)/Math.sin(n),r}function z0(e,n,t){let r=0;const s=[e,n,t];for(let i=0;i<s.length;i++)if(s[i]<=0)throw`err429: negative or zero triangle-args ${i} : ${s[i]}`;return r=Math.asin(n*Math.sin(t)/e),r}var wc=(e=>(e[e.eDefault=0]="eDefault",e[e.eCircle=1]="eCircle",e[e.eCross=2]="eCross",e[e.eSquare=3]="eSquare",e[e.eBigSquare=4]="eBigSquare",e[e.eTwoTri=5]="eTwoTri",e[e.eTri1=6]="eTri1",e[e.eTri2=7]="eTri2",e[e.eTri3=8]="eTri3",e[e.eTri4=9]="eTri4",e))(wc||{}),Ue=class Zt{constructor(n,t,r=0){I(this,"cx");I(this,"cy");I(this,"shape");this.cx=n,this.cy=t,this.shape=r}draw(n,t,r=me.point,s=0){if(isFinite(this.cx)&&isFinite(this.cy)){const i=n.canvas.width*.006999999999999999,o=2*i,[a,u]=Ot(this.cx,this.cy,t);let l=s;switch(l===0&&(l=this.shape),n.beginPath(),l){case 2:n.moveTo(a-o,u),n.lineTo(a+o,u),n.moveTo(a,u-o),n.lineTo(a,u+o);break;case 3:n.rect(a-i,u-i,2*i,2*i);break;case 4:n.rect(a-2*i,u-2*i,4*i,4*i);break;case 5:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o),n.lineTo(a-o,u);break;case 6:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 7:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 8:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 9:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 1:default:n.arc(a,u,i,0,2*Math.PI)}n.strokeStyle=r,n.stroke()}else console.log(`INFO489: point not draw because of infinity ${this.cx} ${this.cy}`)}distanceOrig(){return Math.sqrt(this.cx**2+this.cy**2)}angleOrig(){return Math.atan2(this.cy,this.cx)}getPolar(){return[this.angleOrig(),this.distanceOrig()]}setPolar(n,t){return new Zt(t*Math.cos(n),t*Math.sin(n))}translate(n,t){return new Zt(this.cx+n,this.cy+t)}translatePolar(n,t){return new Zt(this.cx+t*Math.cos(n),this.cy+t*Math.sin(n))}clone(n=0){return new Zt(this.cx,this.cy,n)}rotateOrig(n){const t=this.getPolar();return this.setPolar(t[0]+n,t[1])}scaleOrig(n){const t=this.getPolar();return this.setPolar(t[0],t[1]*n)}rotate(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0]+t,s[1]).translate(n.cx,n.cy)}scale(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0],s[1]*t).translate(n.cx,n.cy)}isEqual(n){return te(this.cx-n.cx)===0&&te(this.cy-n.cy)===0}distanceToPoint(n){return Math.sqrt((n.cx-this.cx)**2+(n.cy-this.cy)**2)}angleToPoint(n){if(te(this.distanceToPoint(n))===0)throw`err434: no angle because points identical ${this.cx} ${n.cx} ${this.cy} ${n.cy}`;return Math.atan2(n.cy-this.cy,n.cx-this.cx)}angleFromToPoints(n,t){const r=this.angleToPoint(n),s=this.angleToPoint(t);return le(s-r)}middlePoint(n){const t=(this.cx+n.cx)/2,r=(this.cy+n.cy)/2;return new Zt(t,r)}equidistantPoint(n,t,r){const s=this.distanceToPoint(n)/2;if(this.isEqual(n))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(t<s)throw`err392: equidistance ${t} smaller than lp1p2h ${s}`;const i=this.middlePoint(n),o=this.angleToPoint(n)+Math.PI/2,a=Math.sqrt(t**2-s**2),u=i.translatePolar(o,a),l=i.translatePolar(o+Math.PI,a),c=r.distanceToPoint(u),h=r.distanceToPoint(l);if(a!==0&&c===h)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let m=u;return h<c&&(m=l),m}};function Z(e,n,t=0){return new Ue(e,n,t)}function ro(e){let n=0,t=0,r=0,s=0;if(e.length>0){const i=e[0];if(i.cx===Number.NEGATIVE_INFINITY||i.cx===Number.POSITIVE_INFINITY||i.cy===Number.NEGATIVE_INFINITY||i.cy===Number.POSITIVE_INFINITY)throw`err292: pointMinMax first point with infinity: ${i.cx} ${i.cy}`;n=e[0].cx,t=e[0].cx,r=e[0].cy,s=e[0].cy;for(const o of e)o.cx!==Number.NEGATIVE_INFINITY&&(n=Math.min(n,o.cx)),o.cx!==Number.POSITIVE_INFINITY&&(t=Math.max(t,o.cx)),o.cy!==Number.NEGATIVE_INFINITY&&(r=Math.min(r,o.cy)),o.cy!==Number.POSITIVE_INFINITY&&(s=Math.max(s,o.cy))}return[n,t,r,s]}var yc=class Te{constructor(n,t,r){I(this,"cx");I(this,"cy");I(this,"ca");this.cx=n,this.cy=t,this.ca=r}draw(n,t,r=me.line){const s=n.canvas.width*2,[i,o]=Ot(this.cx-s*Math.cos(this.ca),this.cy-s*Math.sin(this.ca),t),[a,u]=Ot(this.cx+2*s*Math.cos(this.ca),this.cy+2*s*Math.sin(this.ca),t);n.beginPath(),n.moveTo(i,o),n.lineTo(a,u),n.strokeStyle=r,n.stroke()}setFromPoints(n,t){return this.cx=n.cx,this.cy=n.cy,this.ca=n.angleToPoint(t),this}getAffine(){const n={quasiVertical:!1,ha:0,hb:0,va:0,vb:0};return Math.abs(Ne(this.ca))>Math.PI/4?(n.quasiVertical=!0,n.va=-1*Math.tan(Ne(this.ca-Math.PI/2)),n.vb=this.cx-n.va*this.cy):(n.ha=Math.tan(Ne(this.ca)),n.hb=this.cy-n.ha*this.cx),n}setAffine(n){const t=new Te(0,0,0);return n.quasiVertical?(t.ca=Math.PI/2-Math.atan(n.va),t.cx=n.vb,t.cy=0):(t.ca=Math.atan(n.ha),t.cx=0,t.cy=n.hb),t}intersection(n){if(this.isParallel(n))throw`err902: no intersection, lines are parallel ca1: ${this.ca} ca2: ${n.ca}`;let t=0,r=0;const s=this.getAffine(),i=n.getAffine();return s.quasiVertical?i.quasiVertical?(r=(s.vb-i.vb)/(i.va-s.va),t=s.va*r+s.vb):(t=(s.va*i.hb+s.vb)/(1-s.va*i.ha),r=i.ha*t+i.hb):i.quasiVertical?(r=(s.ha*i.vb+s.hb)/(1-s.ha*i.va),t=i.va*r+i.vb):(t=(s.hb-i.hb)/(i.ha-s.ha),r=s.ha*t+s.hb),Z(t,r)}getAxisXIntersection(){const n=new Te(0,0,0);return this.intersection(n).cx}getAxisYIntersection(){const n=new Te(0,0,Math.PI/2);return this.intersection(n).cy}getAxisXIntersecTri(){let n=1/0;if(te(Ne(this.ca))!==0){const t=new Ue(this.cx,this.cy),r=at(this.ca),s=t.angleOrig(),i=t.distanceOrig();if(te(i)===0)n=0;else if(te(Ne(r-s))===0)n=0;else{const o=Math.min(r,Math.PI-r),a=le(r-s),u=Math.min(Math.abs(a),Math.PI-Math.abs(a));n=Math.sign(a)*Ks(i,o,u)}}return n}getAxisYIntersecTri(){let n=1/0;if(te(Ne(this.ca-Math.PI/2))!==0){const t=new Ue(this.cx,this.cy),r=Ne(this.ca),s=t.angleOrig(),i=t.distanceOrig(),o=Ne(r-s);if(te(i)===0)n=0;else if(te(o)===0)n=0;else{const a=at(r-Math.PI/2),u=-1*le(r-s),l=Math.min(a,Math.PI-a),c=Math.min(Math.abs(u),Math.PI-Math.abs(u));n=Math.sign(u)*Ks(i,l,c)}}return n}angleOrig(){const t=new Ue(this.cx,this.cy).angleOrig(),r=Ne(this.ca),s=-1*le(r-t);let i=0;return s<0&&(i=-Math.PI),at(Math.PI/2+this.ca)+i}distanceOrig(){const n=this.angleOrig(),t=new Ue(this.cx,this.cy),r=t.angleOrig(),s=t.distanceOrig(),i=Ne(r-n);return s*Math.cos(i)}projectOrig(){const n=this.angleOrig(),t=this.distanceOrig();return Z(0,0).setPolar(n,t)}translate(n,t){return new Te(this.cx+n,this.cy+t,this.ca)}rotateOrig(n){const t=new Ue(this.cx,this.cy).rotateOrig(n);return new Te(t.cx,t.cy,le(this.ca+n))}scaleOrig(n){const t=new Ue(this.cx,this.cy).scaleOrig(n);return new Te(t.cx,t.cy,this.ca)}rotate(n,t){const r=new Ue(this.cx,this.cy).rotate(n,t);return new Te(r.cx,r.cy,le(this.ca+t))}scale(n,t){const r=new Ue(this.cx,this.cy).scale(n,t);return new Te(r.cx,r.cy,this.ca)}clone(){const n=new Ue(this.cx,this.cy);return new Te(n.cx,n.cy,this.ca)}lineOrthogonal(n){return new Te(n.cx,n.cy,this.ca+Math.PI/2)}lineParallel(n){return new Te(n.cx,n.cy,this.ca)}distanceToPoint(n){let t=0;const r=new Ue(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const i=r.angleToPoint(n),o=Ne(i-this.ca);t=s*Math.abs(Math.sin(o))}return t}projectPoint(n){let t=0;const r=new Ue(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const o=r.angleToPoint(n),a=le(o-this.ca);t=s*Math.cos(a)}return r.translatePolar(this.ca,t)}isParallel(n){return te(Ne(this.ca-n.ca))===0}isOrthogonal(n){return te(Ne(Math.PI/2+this.ca-n.ca))===0}isEqual(n){const t=Z(n.cx,n.cy),r=this.distanceToPoint(t);return te(r)===0&&this.isParallel(n)}bisector(n,t){const r=this.intersection(n),s=at(this.ca),i=at(n.ca),o=Math.min(s,i),a=Math.max(s,i),u=[o,a,o+Math.PI,a+Math.PI,o],l=r.angleToPoint(t);let c=0;for(let x=0;x<4;x++){const b=le(u[x]-l),f=le(u[x+1]-l);if(b===0||f===0)throw`err419: bad reference point for bisecor ${t.cx} ${t.cy}`;b<0&&f>0&&(c=x)}const m=at((o+a)/2)+c*Math.PI/2;return new Te(r.cx,r.cy,m)}lineParallelDistance(n,t,r){const s=Z(this.cx,this.cy),i=s.translatePolar(this.ca+Math.PI/2,n),o=s.translatePolar(this.ca-Math.PI/2,n);let a=o,u=t;return te(this.distanceToPoint(u))===0&&(u=r),u.distanceToPoint(i)<u.distanceToPoint(o)&&(a=i),new Te(a.cx,a.cy,this.ca)}};function Yn(e,n,t){return new yc(e,n,t)}function mn(e,n){return Yn(0,0,0).setFromPoints(e,n)}function Br(e,n){if(e.isEqual(n))throw`err546: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const t=e.middlePoint(n),r=at(e.angleToPoint(n)+Math.PI/2);return Yn(t.cx,t.cy,r)}function bc(e,n,t){if(e.isEqual(n)||n.isEqual(t)||e.isEqual(t))throw`err833: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const r=Br(e,n),s=Br(n,t);return r.intersection(s)}function Ke(e){let n=!1;return(e===0||e===1)&&(n=!0),n}function sn(e){let n=!1;return(Ke(e)||e===6)&&(n=!0),n}function In(e){let n=!1;return(e===3||e===4||e===5)&&(n=!0),n}function gr(e){let n=!1;return(e===2||In(e))&&(n=!0),n}var Qe=class so{constructor(n,t,r,s,i=!1,o=!1){I(this,"sType");I(this,"px");I(this,"py");I(this,"radius");I(this,"arcLarge");I(this,"arcCcw");this.sType=n,this.px=t,this.py=r,this.radius=s,this.arcLarge=i,this.arcCcw=o}clone(){return new so(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},Ge=class{constructor(e,n,t,r,s,i,o,a=!1){I(this,"sType");I(this,"p1");I(this,"p2");I(this,"pc");I(this,"radius");I(this,"a1");I(this,"a2");I(this,"arcCcw");this.sType=e,this.p1=n,this.p2=t,this.pc=r,this.radius=s,this.a1=i,this.a2=o,this.arcCcw=a}},Ac=class{constructor(){I(this,"debugPoints");I(this,"debugLines");I(this,"logMessage");this.debugPoints=[],this.debugLines=[],this.logMessage=""}addPoint(e){this.debugPoints.push(e)}getPoints(){return this.debugPoints}clearPoints(){this.debugPoints=[]}addLine(e){this.debugLines.push(e)}getLines(){return this.debugLines}clearLines(){this.debugLines=[]}addMsg(e){this.logMessage+=e}getMsg(){return this.logMessage}clearMsg(){this.logMessage=""}},Ft=new Ac;function St(e,n,t){if(t.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${t.sType}`;const r=Z(e,n),s=Z(t.px,t.py),i=r.distanceToPoint(s)/2;if(r.isEqual(s))throw`err638: no equidistance because identical point ${r.cx} ${s.cy}`;let o=0;if(te(t.radius-i)===0)o=0;else{if(t.radius<i)throw`err399: radius ${t.radius} smaller than lp1p2h ${i}`;o=Zn(t.radius,i)}const a=r.middlePoint(s),u=r.angleToPoint(s)+Math.PI/2,l=a.translatePolar(u,o),c=a.translatePolar(u+Math.PI,o);let h=l;(!t.arcLarge&&!t.arcCcw||t.arcLarge&&t.arcCcw)&&(h=c);const m=h.angleToPoint(r),x=h.angleToPoint(s);return new Ge(1,r,s,h,t.radius,m,x,t.arcCcw)}function _c(e){let n=Pt(e.a2-e.a1);e.arcCcw||(n=2*Math.PI-n);let t=!1;return n>Math.PI&&(t=!0),new Qe(1,e.p2.cx,e.p2.cy,e.radius,t,e.arcCcw)}function vc(e,n,t){const r=e.p1,s=e.p2,i=t.p1,o=t.p2;if(!s.isEqual(i))throw`err309: makeCorner-prepare p2 and p2b differ px ${s.cx} ${i.cx} py ${s.cy} ${i.cy}`;let a=s.angleToPoint(r);if(e.sType===1){const f=e.arcCcw?1:-1;a=e.a2-f*Math.PI/2}let u=s.angleToPoint(o);if(t.sType===1){const f=t.arcCcw?1:-1;u=t.a1+f*Math.PI/2}const l=u-a;let h=le(l)/2;if(te(h)===0){const f=Gr*.01;if(e.sType===0&&t.sType===1)h=t.arcCcw?f:-f;else if(e.sType===1&&t.sType===0)h=e.arcCcw?f:-f;else if(e.sType===0&&t.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${h}`}const m=a+h,x=s.translatePolar(m,n.radius);return{s1:e,s2:n,s3:t,ra:n.radius,p1:r,p2:s,p3:o,p4:e.pc,p5:t.pc,p6:x,at1:a,at3:u,abi:m,aph:h}}function Vn(e,n,t){if(n.sType!==1)throw`err510: modifRadius with wrong type ${n.sType}`;const r=e>0?1:-1,s=n.arcCcw?1:-1,i=te(e)===0?1:r*s,o=n.radius+i*t;if(o<=0)throw`err621: modifRadius with negative modified lenght ${o}`;return o}function Wr(e,n,t,r){const s=t.translatePolar(e,n),i=t.translatePolar(e+Math.PI,n),o=r.distanceToPoint(s),a=r.distanceToPoint(i);return o<a?s:i}function zs(e,n,t,r,s){const i=e.translatePolar(n-t,r),o=e.translatePolar(n+t,r),a=s.distanceToPoint(i),u=s.distanceToPoint(o);return a<u?-1:1}function Xn(e,n){const t=n.clone(),r=e.p1.clone(),s=e.p2;if(e.sType!==0)throw`err103: newStrokeFirst unexpected sType ${e.sType}`;const i=mn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err104: newStrokeFirst new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(te(le(a-o))!==0)throw`err105: newStrokeFirst new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err106: newStrokeFirst new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Z(0,0);return new Ge(0,r,t,c,0,0,0,!1)}function Kn(e,n){const t=n.clone(),r=e.p2.clone(),s=e.p1;if(e.sType!==0)throw`err203: newStrokeSecond unexpected sType ${e.sType}`;const i=mn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err204: newStrokeSecond new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(te(le(a-o))!==0)throw`err205: newStrokeSecond new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err206: newStrokeSecond new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Z(0,0);return new Ge(0,t,r,c,0,0,0,!1)}function zn(e,n){if(e.sType!==1)throw`err203: newArcFirst unexpected sType ${e.sType}`;const t=e.p1.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!to(i,e.a1,e.a2,e.arcCcw))throw`err908: newArcFirst a48 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new Ge(1,t,s,r,e.radius,e.a1,i,e.arcCcw)}function Jn(e,n){if(e.sType!==1)throw`err204: newArcSecond unexpected sType ${e.sType}`;const t=e.p2.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!to(i,e.a1,e.a2,e.arcCcw))throw`err907: newArcSecond a59 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new Ge(1,s,t,r,e.radius,i,e.a2,e.arcCcw)}function xn(e,n,t,r,s,i){const o=e.clone(),a=n.clone(),u=t.clone(),l=u.distanceToPoint(o),c=u.distanceToPoint(a);if(te(l-r)!==0||te(c-r)!==0)throw`err610: newRounded not on circle ${r} ${l} ${c}`;const h=u.angleToPoint(o),m=u.angleToPoint(a),x=le(h-i+Math.PI),b=le(m-i+Math.PI);Math.abs(b-x)>Math.PI+Gr&&Ft.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${ct(x)} ${ct(b)} at ${ct(u.cx)} ${ct(u.cy)}
16
16
  `);const f=!(s>0);return new Ge(1,o,a,u,r,h,m,f)}function Cc(e){const n=Math.abs(e.ra/Math.sin(e.aph)),t=n*Math.cos(e.aph),r=e.p2.translatePolar(e.abi,n),s=e.p2.translatePolar(e.at1,t),i=e.p2.translatePolar(e.at3,t),o=[];return o.push(Xn(e.s1,s)),o.push(xn(s,i,r,e.ra,e.aph,e.abi)),o.push(Kn(e.s3,i)),o}function Ec(e){const t=mn(e.p1,e.p2).lineParallelDistance(e.ra,e.p6,e.p5),r=t.projectPoint(e.p5),s=r.distanceToPoint(e.p5),i=Vn(e.aph,e.s3,e.ra),o=Zn(i,s),a=Wr(t.ca,o,r,e.p6),u=e.p5.angleToPoint(a),l=e.p5.translatePolar(u,e.s3.radius),c=e.p2.angleFromToPoints(e.p1,a),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p1),b=e.p2.translatePolar(x,m),f=[];return f.push(Xn(e.s1,b)),f.push(xn(b,l,a,e.ra,e.aph,e.abi)),f.push(Jn(e.s3,l)),f}function Fc(e){const t=mn(e.p3,e.p2).lineParallelDistance(e.ra,e.p6,e.p4),r=t.projectPoint(e.p4),s=r.distanceToPoint(e.p4),i=Vn(e.aph,e.s1,e.ra),o=Zn(i,s),a=Wr(t.ca,o,r,e.p6),u=e.p4.angleToPoint(a),l=e.p4.translatePolar(u,e.s1.radius),c=e.p2.angleFromToPoints(e.p3,a),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p3),b=e.p2.translatePolar(x,m),f=[];return f.push(zn(e.s1,l)),f.push(xn(l,b,a,e.ra,e.aph,e.abi)),f.push(Kn(e.s3,b)),f}function Sc(e){const n=Vn(e.aph,e.s1,e.ra),t=Vn(e.aph,e.s3,e.ra),r=e.p4.distanceToPoint(e.p5),s=e.p4.angleToPoint(e.p5),i=Xs(r,n,t),o=zs(e.p4,s,i,n,e.p6),a=s+o*i,u=e.p4.translatePolar(a,n),l=e.p4.translatePolar(a,e.s1.radius),c=Math.PI+s,h=Xs(r,t,n),m=zs(e.p5,c,h,t,e.p6),x=c+m*h,b=e.p5.translatePolar(x,t);if(!b.isEqual(u))throw`err909: roundArcArc p7 anf p7b differ ${u.cx} ${b.cx} ${u.cy} ${b.cy} 0`;const f=e.p5.translatePolar(x,e.s3.radius),d=[];return d.push(zn(e.s1,l)),d.push(xn(l,f,u,e.ra,e.aph,e.abi)),d.push(Jn(e.s3,f)),d}function io(e){const n=e.abi-2*e.aph,t=e.abi+2*e.aph;let r=e.p6.translatePolar(n,e.ra),s=e.p6.translatePolar(t,e.ra);if(e.s1.sType===1){const u=e.p4.angleFromToPoints(e.p2,e.p6),c=e.p4.angleToPoint(e.p2)+2*u;r=e.p4.translatePolar(c,e.s1.radius)}if(e.s3.sType===1){const u=e.p5.angleFromToPoints(e.p2,e.p6),c=e.p5.angleToPoint(e.p2)+2*u;s=e.p5.translatePolar(c,e.s3.radius)}const i=!(e.aph>0),o=new Ge(1,r,s,e.p6,e.ra,n,t,i),a=[];return e.s1.sType===0?a.push(Xn(e.s1,r)):e.s1.sType===1&&a.push(zn(e.s1,r)),a.push(o),e.s3.sType===0?a.push(Kn(e.s3,s)):e.s3.sType===1&&a.push(Jn(e.s3,s)),a}function Js(e,n,t,r){let s=t,i=t;const o=r.p6.angleFromToPoints(r.p2,t);if(Math.abs(o)>Math.PI/2){i=r.p6.translatePolar(r.abi+e*Math.PI/2,r.ra);const a=Yn(i.cx,i.cy,r.abi);if(n.sType===0)s=mn(n.p1,n.p2).intersection(a);else if(n.sType===1){const u=a.projectPoint(n.pc),l=u.distanceToPoint(n.pc);if(l<n.radius){const c=Zn(n.radius,l);s=Wr(r.abi,c,u,t)}else Ft.addMsg(`warn222: wideAccess not possible on arc ${ct(n.radius)} ${ct(l)} at ${ct(t.cx)} ${ct(t.cy)}
17
17
  `),s=t,i=t}}return[s,i]}function kc(e){const n=io(e),t=n[1].arcCcw?1:-1,[r,s]=Js(t,e.s1,n[1].p1,e),[i,o]=Js(-t,e.s3,n[1].p2,e),a=[];if(r.isEqual(s))a.push(n[0]);else{e.s1.sType===0?a.push(Xn(e.s1,r)):e.s1.sType===1&&a.push(zn(e.s1,r));const u=Z(0,0),l=new Ge(0,r,s,u,0,0,0,!1);a.push(l)}if(a.push(xn(s,o,e.p6,e.ra,e.aph,e.abi)),i.isEqual(o))a.push(n[2]);else{const u=Z(0,0),l=new Ge(0,o,i,u,0,0,0,!1);a.push(l),e.s3.sType===0?a.push(Kn(e.s3,i)):e.s3.sType===1&&a.push(Jn(e.s3,i))}return a}function Qs(e,n,t){const r=vc(e,n,t),s=[];if(n.sType===3)if(e.sType===0&&t.sType===0)s.push(...Cc(r));else if(e.sType===0&&t.sType===1)s.push(...Ec(r));else if(e.sType===1&&t.sType===0)s.push(...Fc(r));else if(e.sType===1&&t.sType===1)s.push(...Sc(r));else throw`err123: makeCorner unexpected s1s3.sType ${e.sType} ${t.sType}`;else if(n.sType===4)s.push(...io(r));else if(n.sType===5)s.push(...kc(r));else throw`err723: makeCorner unexpected s2.sType ${n.sType}`;return s}function ot(e){return e.toFixed(4)}function Tc(e,n,t,r=""){let s=r;return s===""&&(s="black"),`<circle cx="${ot(e)}" cy="${ot(n)}" r="${ot(t)}" stroke="${s}" stroke-width="1" fill="none" />`}var Pc=class{constructor(){I(this,"pathD");this.pathD=""}addStart(e,n){this.pathD=`M ${ot(e)} ${ot(n)}`}addStroke(e,n){this.pathD+=` L ${ot(e)} ${ot(n)}`}addArc(e,n,t,r,s){const i=ot(t),o=r?1:0,a=s?1:0;this.pathD+=` A ${i} ${i} 0 ${o} ${a} ${ot(e)} ${ot(n)}`}stringify(e=""){let n=e;return n===""&&(n="black"),`<path d="${this.pathD} Z" stroke="${n}" stroke-width="1" fill="none" />`}};function Bc(){return new Pc}var Mc=class{constructor(){I(this,"svgStr");I(this,"payloadStr");I(this,"groupActive");this.payloadStr="",this.svgStr="",this.groupActive=!1}addHeader(e,n,t,r){const s=`${e} ${t} ${n} ${r}`;this.svgStr=`<svg width="${n}" height="${r}" viewBox="${s}" xmlns="http://www.w3.org/2000/svg">`}addSvgString(e){this.payloadStr+=e}addGroup(e){if(this.groupActive)throw"err321: group must be closed before opening a new one";this.groupActive=!0,this.payloadStr+=`<g id="${e}">`}closeGroup(){if(!this.groupActive)throw"err331: group is not active so can not be closed";this.groupActive=!1,this.payloadStr+="</g>"}closeSvg(){if(this.svgStr==="")throw"err301: no header set for the svg";if(this.groupActive)throw"err311: group is not closed";this.svgStr+=this.payloadStr,this.svgStr+="</svg>"}stringify(){return this.closeSvg(),this.svgStr}};function Ic(){return new Mc}function Ve(e){return e.toFixed(4)}var Hr=class{constructor(e,n,t,r,s,i,o,a){I(this,"arc");I(this,"p1x");I(this,"p1y");I(this,"radius");I(this,"a1");I(this,"a2");I(this,"p2x");I(this,"p2y");this.arc=e,this.p1x=n,this.p1y=t,this.radius=r,this.a1=s,this.a2=i,this.p2x=o,this.p2y=a}};function $c(e,n,t,r){return new Hr(!1,e,n,0,0,0,t,r)}function Lc(e,n,t,r,s,i){const o=i?r:s,a=i?s:r,u=Ie(Pt(o)),l=Ie(Pt(a));return new Hr(!0,e,n,t,u,l,0,0)}function Nc(e,n,t){return new Hr(!1,e,n,t,0,0,0,0)}var Rc=class{constructor(){I(this,"dxfStr");this.dxfStr=`0
18
18
  SECTION
@@ -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,d as ve,f as L,g as J,E as U,h as re,j as P,k as le,t as Ke,r as ae,l as At,m as Le,n as He,o as De,q as kt,s as X,u as ge,v as Me,w as B,x as Se,y as ye,z as Oe,A as ze,S as ke,B as Rt}from"./index.VmH-9d5B.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 It=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)}
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,d as ve,f as L,g as J,E as U,h as re,j as P,k as le,t as Ke,r as ae,l as At,m as Le,n as He,o as De,q as kt,s as X,u as ge,v as Me,w as B,x as Se,y as ye,z as Oe,A as ze,S as ke,B as Rt}from"./index.7KyUWpqJ.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 It=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,[I,$]=g.ptc(O+i),m=g.ptcta(O),q=g.ptcta(O+i)+Math.PI,F=le(I,$).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,[I,$]=M.ptc(O-d),m=M.ptcta(O)+Math.PI,q=M.ptcta(O-d),F=le(I,$).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 It}function Ct(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)}
@@ -0,0 +1 @@
1
+ var s;const e=((s=globalThis.__sveltekit_1x43onv)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_1x43onv)==null?void 0:a.assets)??e;export{t as a,e as b};
@@ -1 +1 @@
1
- import{s as e}from"./entry.BfOQ8A-P.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
1
+ import{s as e}from"./entry.D_exCd0f.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.CYP2J31a.js","_app/immutable/chunks/scheduler.2BOoCPD3.js","_app/immutable/chunks/index.RMmEH_Pi.js","_app/immutable/chunks/index.7KyUWpqJ.js","_app/immutable/chunks/paths.CnG5LrC8.js","_app/immutable/assets/0.BNk8pMG6.css","_app/immutable/nodes/1.HbFqS0yq.js","_app/immutable/chunks/stores.BdytS9Df.js","_app/immutable/chunks/entry.D_exCd0f.js","_app/immutable/nodes/2.BvODlUud.js","_app/immutable/chunks/makeList.C3agm0IL.js","_app/immutable/assets/2.CTp7BhB8.css","_app/immutable/nodes/3.C_LYr96e.js","_app/immutable/assets/3.Bup7ghXO.css"])))=>i.map(i=>d[i]);
2
+ import{s as N,a as U,p as h,g as j,i as b,f as p,q as B,r as W,e as z,c as F,b as G,m as A,u as m,t as H,d as J,j as K,v as D,w as k,x as Q}from"../chunks/scheduler.2BOoCPD3.js";import{S as X,i as Y,t as g,c as S,a as w,g as L,b as E,d as I,m as v,e as y}from"../chunks/index.RMmEH_Pi.js";const Z="modulepreload",M=function(a){return"/"+a},O={},P=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),i=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));s=Promise.allSettled(n.map(o=>{if(o=M(o),o in O)return;O[o]=!0;const c=o.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${f}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":Z,c||(u.as="script"),u.crossOrigin="",u.href=o,i&&u.setAttribute("nonce",i),document.head.appendChild(u),c)return new Promise((d,R)=>{u.addEventListener("load",d),u.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${o}`)))})}))}function _(t){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=t,window.dispatchEvent(i),!i.defaultPrevented)throw t}return s.then(t=>{for(const i of t||[])i.status==="rejected"&&_(i.reason);return e().catch(_)})},re={};function $(a){let e,n,r;var s=a[1][0];function _(t,i){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,_(a)),a[12](e)),{c(){e&&E(e.$$.fragment),n=h()},l(t){e&&I(e.$$.fragment,t),n=h()},m(t,i){e&&v(e,t,i),b(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][0])){if(e){L();const o=e;g(o.$$.fragment,1,0,()=>{y(o,1)}),S()}s?(e=k(s,_(t)),t[12](e),E(e.$$.fragment),w(e.$$.fragment,1),v(e,n.parentNode,n)):e=null}else if(s){const o={};i&8&&(o.data=t[3]),i&4&&(o.form=t[2]),e.$set(o)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&p(n),a[12](null),e&&y(e,t)}}}function x(a){let e,n,r;var s=a[1][0];function _(t,i){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return s&&(e=k(s,_(a)),a[11](e)),{c(){e&&E(e.$$.fragment),n=h()},l(t){e&&I(e.$$.fragment,t),n=h()},m(t,i){e&&v(e,t,i),b(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][0])){if(e){L();const o=e;g(o.$$.fragment,1,0,()=>{y(o,1)}),S()}s?(e=k(s,_(t)),t[11](e),E(e.$$.fragment),w(e.$$.fragment,1),v(e,n.parentNode,n)):e=null}else if(s){const o={};i&8&&(o.data=t[3]),i&8215&&(o.$$scope={dirty:i,ctx:t}),e.$set(o)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&p(n),a[11](null),e&&y(e,t)}}}function ee(a){let e,n,r;var s=a[1][1];function _(t,i){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,_(a)),a[10](e)),{c(){e&&E(e.$$.fragment),n=h()},l(t){e&&I(e.$$.fragment,t),n=h()},m(t,i){e&&v(e,t,i),b(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][1])){if(e){L();const o=e;g(o.$$.fragment,1,0,()=>{y(o,1)}),S()}s?(e=k(s,_(t)),t[10](e),E(e.$$.fragment),w(e.$$.fragment,1),v(e,n.parentNode,n)):e=null}else if(s){const o={};i&16&&(o.data=t[4]),i&4&&(o.form=t[2]),e.$set(o)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&p(n),a[10](null),e&&y(e,t)}}}function T(a){let e,n=a[6]&&V(a);return{c(){e=z("div"),n&&n.c(),this.h()},l(r){e=F(r,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=G(e);n&&n.l(s),s.forEach(p),this.h()},h(){A(e,"id","svelte-announcer"),A(e,"aria-live","assertive"),A(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(r,s){b(r,e,s),n&&n.m(e,null)},p(r,s){r[6]?n?n.p(r,s):(n=V(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(r){r&&p(e),n&&n.d()}}}function V(a){let e;return{c(){e=H(a[7])},l(n){e=J(n,a[7])},m(n,r){b(n,e,r)},p(n,r){r&128&&K(e,n[7])},d(n){n&&p(e)}}}function te(a){let e,n,r,s,_;const t=[x,$],i=[];function o(f,u){return f[1][1]?0:1}e=o(a),n=i[e]=t[e](a);let c=a[5]&&T(a);return{c(){n.c(),r=U(),c&&c.c(),s=h()},l(f){n.l(f),r=j(f),c&&c.l(f),s=h()},m(f,u){i[e].m(f,u),b(f,r,u),c&&c.m(f,u),b(f,s,u),_=!0},p(f,[u]){let d=e;e=o(f),e===d?i[e].p(f,u):(L(),g(i[d],1,1,()=>{i[d]=null}),S(),n=i[e],n?n.p(f,u):(n=i[e]=t[e](f),n.c()),w(n,1),n.m(r.parentNode,r)),f[5]?c?c.p(f,u):(c=T(f),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(f){_||(w(n),_=!0)},o(f){g(n),_=!1},d(f){f&&(p(r),p(s)),i[e].d(f),c&&c.d(f)}}}function ne(a,e,n){let{stores:r}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:i}=e,{data_0:o=null}=e,{data_1:c=null}=e;B(r.page.notify);let f=!1,u=!1,d=null;W(()=>{const l=r.page.subscribe(()=>{f&&(n(6,u=!0),Q().then(()=>{n(7,d=document.title||"untitled page")}))});return n(5,f=!0),l});function R(l){D[l?"unshift":"push"](()=>{t[1]=l,n(0,t)})}function q(l){D[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}function C(l){D[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}return a.$$set=l=>{"stores"in l&&n(8,r=l.stores),"page"in l&&n(9,s=l.page),"constructors"in l&&n(1,_=l.constructors),"components"in l&&n(0,t=l.components),"form"in l&&n(2,i=l.form),"data_0"in l&&n(3,o=l.data_0),"data_1"in l&&n(4,c=l.data_1)},a.$$.update=()=>{a.$$.dirty&768&&r.page.set(s)},[t,_,i,o,c,f,u,d,r,s,R,q,C]}class oe extends X{constructor(e){super(),Y(this,e,ne,te,N,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const ae=[()=>P(()=>import("../nodes/0.CYP2J31a.js"),__vite__mapDeps([0,1,2,3,4,5])),()=>P(()=>import("../nodes/1.HbFqS0yq.js"),__vite__mapDeps([6,1,2,7,8,4])),()=>P(()=>import("../nodes/2.BvODlUud.js"),__vite__mapDeps([9,1,3,2,10,4,11])),()=>P(()=>import("../nodes/3.C_LYr96e.js"),__vite__mapDeps([12,10,3,8,1,4,2,7,13]))],fe=[],le={"/":[2],"/[...design]":[3]},ce={handleError:({error:a})=>{console.error(a)},reroute:()=>{}};export{le as dictionary,ce as hooks,re as matchers,ae as nodes,oe as root,fe as server_loads};
@@ -0,0 +1 @@
1
+ import{a as t}from"../chunks/entry.D_exCd0f.js";export{t as start};
@@ -0,0 +1,4 @@
1
+ import{s as Q,y as V,e as h,a as j,c as v,l as L,g as $,b as A,f as a,m as E,i as u,h as H,z as G,A as J,B as K,o as U,t as X,d as Y,n as Z}from"../chunks/scheduler.2BOoCPD3.js";import{S as ee,i as te,a as se,t as ie}from"../chunks/index.RMmEH_Pi.js";import{e as W,C as le}from"../chunks/index.7KyUWpqJ.js";import{b as ne}from"../chunks/paths.CnG5LrC8.js";const ae=!0,$e=Object.freeze(Object.defineProperty({__proto__:null,prerender:ae},Symbol.toStringTag,{value:"Module"})),oe="designix-ui",re="0.5.5",ce="The svelte-kit app built on top of designix",pe={type:"git",url:"git+https://github.com/charlyoleg2/parametrix.git"},ue="https://charlyoleg2.github.io/parametrix/",he="charlyoleg2",ve="ISC",fe=["cad","programmatic","2D","circle","stroke","arc","gear"],de="module",me={useTabs:!0,singleQuote:!0,trailingComma:"none",printWidth:100,plugins:["prettier-plugin-svelte"],overrides:[{files:"*.svelte",options:{parser:"svelte"}}]},ge={cp_pgdsvg:"fse copy ../../node_modules/designix/dist/pgdsvg static/pgdsvg",dev:"vite dev",build:"vite build",preview:"vite preview",check:"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","test:unit":"vitest","test:unit:once":"vitest --run",lint:"prettier --check . && eslint .",ci:"run-s cp_pgdsvg build lint check test:unit:once",format:"prettier --write .",clean:"rimraf .svelte-kit build node_modules static/pgdsvg"},_e={designix:"^0.5.50",geometrix:"^0.5.49",geomui:"^0.5.51"},ye={"@atao60/fse-cli":"^0.1.9","@sveltejs/adapter-auto":"^3.2.5","@sveltejs/adapter-static":"^3.0.5","@sveltejs/kit":"^2.7.2","@sveltejs/vite-plugin-svelte":"^3.1.2","@types/eslint":"^9.6.1",eslint:"^9.13.0","eslint-config-prettier":"^9.1.0","eslint-plugin-svelte":"^2.45.1",globals:"^15.11.0","npm-run-all2":"^6.2.4",prettier:"^3.3.3","prettier-plugin-svelte":"^3.2.7",rimraf:"^6.0.1",sass:"^1.80.3",svelte:"^4.2.19","svelte-check":"^4.0.5",typescript:"^5.6.3","typescript-eslint":"^8.10.0",vite:"^5.4.9",vitest:"^2.1.3"},xe={name:oe,version:re,description:ce,private:!0,repository:pe,homepage:ue,author:he,license:ve,keywords:fe,type:de,prettier:me,scripts:ge,dependencies:_e,devDependencies:ye};function q(c,i,p){const o=c.slice();return o[3]=i[p],o}function F(c){let i=c[3]+"",p,o;return{c(){p=X(i),o=h("br")},l(s){p=Y(s,i),o=v(s,"BR",{})},m(s,m){u(s,p,m),u(s,o,m)},p:Z,d(s){s&&(a(p),a(o))}}}function be(c){let i,p="Welcome to designix-ui",o,s,m=`Showcasing the usage of the <a href="https://svelte.dev/">svelte</a> library
2
+ <a href="https://www.npmjs.com/">geomui</a>.`,g,d,R=`<a href="${`${ne}/`}" class="svelte-im9xuh">index: list of designs</a>`,M,_,S,f,b,B=`<a href="https://github.com/charlyoleg2/parametrix">designix-ui</a>, a minimalist showcase
3
+ of
4
+ <a href="https://www.npmjs.com/">geomui</a>.`,D,y,k,N="Designix-ui version",O,w,C;const z=c[2].default,r=V(z,c,c[1],null);let T=W(c[0]),l=[];for(let e=0;e<T.length;e+=1)l[e]=F(q(c,T,e));return{c(){i=h("h1"),i.textContent=p,o=j(),s=h("h6"),s.innerHTML=m,g=j(),d=h("nav"),d.innerHTML=R,M=j(),_=h("main"),r&&r.c(),S=j(),f=h("footer"),b=h("article"),b.innerHTML=B,D=j(),y=h("article"),k=h("h3"),k.textContent=N,O=j(),w=h("code");for(let e=0;e<l.length;e+=1)l[e].c();this.h()},l(e){i=v(e,"H1",{class:!0,"data-svelte-h":!0}),L(i)!=="svelte-1ow6r3d"&&(i.textContent=p),o=$(e),s=v(e,"H6",{class:!0,"data-svelte-h":!0}),L(s)!=="svelte-7mn22s"&&(s.innerHTML=m),g=$(e),d=v(e,"NAV",{class:!0,"data-svelte-h":!0}),L(d)!=="svelte-ww4mf0"&&(d.innerHTML=R),M=$(e),_=v(e,"MAIN",{class:!0});var n=A(_);r&&r.l(n),n.forEach(a),S=$(e),f=v(e,"FOOTER",{class:!0});var t=A(f);b=v(t,"ARTICLE",{"data-svelte-h":!0}),L(b)!=="svelte-1pwhz7h"&&(b.innerHTML=B),D=$(t),y=v(t,"ARTICLE",{});var x=A(y);k=v(x,"H3",{"data-svelte-h":!0}),L(k)!=="svelte-18yz28i"&&(k.textContent=N),O=$(x),w=v(x,"CODE",{});var P=A(w);for(let I=0;I<l.length;I+=1)l[I].l(P);P.forEach(a),x.forEach(a),t.forEach(a),this.h()},h(){E(i,"class","svelte-im9xuh"),E(s,"class","svelte-im9xuh"),E(d,"class","svelte-im9xuh"),E(_,"class","svelte-im9xuh"),E(f,"class","svelte-im9xuh")},m(e,n){u(e,i,n),u(e,o,n),u(e,s,n),u(e,g,n),u(e,d,n),u(e,M,n),u(e,_,n),r&&r.m(_,null),u(e,S,n),u(e,f,n),H(f,b),H(f,D),H(f,y),H(y,k),H(y,O),H(y,w);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(w,null);C=!0},p(e,[n]){if(r&&r.p&&(!C||n&2)&&G(r,z,e,e[1],C?K(z,e[1],n,null):J(e[1]),null),n&1){T=W(e[0]);let t;for(t=0;t<T.length;t+=1){const x=q(e,T,t);l[t]?l[t].p(x,n):(l[t]=F(x),l[t].c(),l[t].m(w,null))}for(;t<l.length;t+=1)l[t].d(1);l.length=T.length}},i(e){C||(se(r,e),C=!0)},o(e){ie(r,e),C=!1},d(e){e&&(a(i),a(o),a(s),a(g),a(d),a(M),a(_),a(S),a(f)),r&&r.d(e),U(l,e)}}}function ke(c,i,p){let{$$slots:o={},$$scope:s}=i;const m=le(xe);return c.$$set=g=>{"$$scope"in g&&p(1,s=g.$$scope)},[m,s,o]}class He extends ee{constructor(i){super(),te(this,i,ke,be,Q,{})}}export{He as component,$e as universal};
@@ -1 +1 @@
1
- import{s as x,e as u,t as h,a as S,c as d,b as v,d as g,f as m,g as j,i as _,h as b,j as E,n as $,k}from"../chunks/scheduler.2BOoCPD3.js";import{S as q,i as y}from"../chunks/index.RMmEH_Pi.js";import{p as C}from"../chunks/stores.CBY9bGtC.js";function H(i){var f;let a,s=i[0].status+"",r,o,n,p=((f=i[0].error)==null?void 0:f.message)+"",c;return{c(){a=u("h1"),r=h(s),o=S(),n=u("p"),c=h(p)},l(e){a=d(e,"H1",{});var t=v(a);r=g(t,s),t.forEach(m),o=j(e),n=d(e,"P",{});var l=v(n);c=g(l,p),l.forEach(m)},m(e,t){_(e,a,t),b(a,r),_(e,o,t),_(e,n,t),b(n,c)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&E(r,s),t&1&&p!==(p=((l=e[0].error)==null?void 0:l.message)+"")&&E(c,p)},i:$,o:$,d(e){e&&(m(a),m(o),m(n))}}}function P(i,a,s){let r;return k(i,C,o=>s(0,r=o)),[r]}class B extends q{constructor(a){super(),y(this,a,P,H,x,{})}}export{B as component};
1
+ import{s as x,e as u,t as h,a as S,c as d,b as v,d as g,f as m,g as j,i as _,h as b,j as E,n as $,k}from"../chunks/scheduler.2BOoCPD3.js";import{S as q,i as y}from"../chunks/index.RMmEH_Pi.js";import{p as C}from"../chunks/stores.BdytS9Df.js";function H(i){var f;let a,s=i[0].status+"",r,o,n,p=((f=i[0].error)==null?void 0:f.message)+"",c;return{c(){a=u("h1"),r=h(s),o=S(),n=u("p"),c=h(p)},l(e){a=d(e,"H1",{});var t=v(a);r=g(t,s),t.forEach(m),o=j(e),n=d(e,"P",{});var l=v(n);c=g(l,p),l.forEach(m)},m(e,t){_(e,a,t),b(a,r),_(e,o,t),_(e,n,t),b(n,c)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&E(r,s),t&1&&p!==(p=((l=e[0].error)==null?void 0:l.message)+"")&&E(c,p)},i:$,o:$,d(e){e&&(m(a),m(o),m(n))}}}function P(i,a,s){let r;return k(i,C,o=>s(0,r=o)),[r]}class B extends q{constructor(a){super(),y(this,a,P,H,x,{})}}export{B as component};
@@ -1 +1 @@
1
- import{s as g,e as _,a as x,c as d,l as b,g as y,b as p,f as c,m as v,i as f,n as m,o as C,t as L,d as k,h as u}from"../chunks/scheduler.2BOoCPD3.js";import{e as E}from"../chunks/index.VmH-9d5B.js";import{S,i as $}from"../chunks/index.RMmEH_Pi.js";import{d as q}from"../chunks/makeList.OAfyhA_q.js";import{b as A}from"../chunks/paths.UrvDPV07.js";function H(r,e,l){const o=r.slice();return o[0]=e[l],o}function I(r){let e,l,o;return{c(){e=_("li"),l=_("a"),o=L(r[0]),this.h()},l(a){e=d(a,"LI",{});var n=p(e);l=d(n,"A",{href:!0});var s=p(l);o=k(s,r[0]),s.forEach(c),n.forEach(c),this.h()},h(){v(l,"href",`${A}/${r[0]}`)},m(a,n){f(a,e,n),u(e,l),u(l,o)},p:m,d(a){a&&c(e)}}}function N(r){let e,l="List of designs:",o,a,n=E(q),s=[];for(let t=0;t<n.length;t+=1)s[t]=I(H(r,n,t));return{c(){e=_("h2"),e.textContent=l,o=x(),a=_("ol");for(let t=0;t<s.length;t+=1)s[t].c();this.h()},l(t){e=d(t,"H2",{class:!0,"data-svelte-h":!0}),b(e)!=="svelte-96cxme"&&(e.textContent=l),o=y(t),a=d(t,"OL",{});var h=p(a);for(let i=0;i<s.length;i+=1)s[i].l(h);h.forEach(c),this.h()},h(){v(e,"class","svelte-1r3d1r")},m(t,h){f(t,e,h),f(t,o,h),f(t,a,h);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(a,null)},p:m,i:m,o:m,d(t){t&&(c(e),c(o),c(a)),C(s,t)}}}class B extends S{constructor(e){super(),$(this,e,null,N,g,{})}}export{B as component};
1
+ import{s as g,e as _,a as x,c as d,l as b,g as y,b as p,f as c,m as v,i as f,n as m,o as C,t as L,d as k,h as u}from"../chunks/scheduler.2BOoCPD3.js";import{e as E}from"../chunks/index.7KyUWpqJ.js";import{S,i as $}from"../chunks/index.RMmEH_Pi.js";import{d as q}from"../chunks/makeList.C3agm0IL.js";import{b as A}from"../chunks/paths.CnG5LrC8.js";function H(r,e,l){const o=r.slice();return o[0]=e[l],o}function I(r){let e,l,o;return{c(){e=_("li"),l=_("a"),o=L(r[0]),this.h()},l(a){e=d(a,"LI",{});var n=p(e);l=d(n,"A",{href:!0});var s=p(l);o=k(s,r[0]),s.forEach(c),n.forEach(c),this.h()},h(){v(l,"href",`${A}/${r[0]}`)},m(a,n){f(a,e,n),u(e,l),u(l,o)},p:m,d(a){a&&c(e)}}}function N(r){let e,l="List of designs:",o,a,n=E(q),s=[];for(let t=0;t<n.length;t+=1)s[t]=I(H(r,n,t));return{c(){e=_("h2"),e.textContent=l,o=x(),a=_("ol");for(let t=0;t<s.length;t+=1)s[t].c();this.h()},l(t){e=d(t,"H2",{class:!0,"data-svelte-h":!0}),b(e)!=="svelte-96cxme"&&(e.textContent=l),o=y(t),a=d(t,"OL",{});var h=p(a);for(let i=0;i<s.length;i+=1)s[i].l(h);h.forEach(c),this.h()},h(){v(e,"class","svelte-1r3d1r")},m(t,h){f(t,e,h),f(t,o,h),f(t,a,h);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(a,null)},p:m,i:m,o:m,d(t){t&&(c(e),c(o),c(a)),C(s,t)}}}class B extends S{constructor(e){super(),$(this,e,null,N,g,{})}}export{B as component};
@@ -1,4 +1,4 @@
1
- import{a as Pt,b as wl}from"../chunks/makeList.OAfyhA_q.js";import{H as Cl,w as ul,g as Ol}from"../chunks/entry.BfOQ8A-P.js";import{Q as Dl,s as Me,p as st,i as J,n as ze,f as k,e as _,c as p,b as S,R as ht,m as f,h as o,S as G,v as Ie,a as j,g as I,T as Ae,o as Ke,y as El,t as Y,l as ie,d as K,U as He,z as Ll,A as Sl,B as jl,j as ge,C as qe,V as be,k as at,r as Et,W as ml,X as _t,Y as Ct,Z as Il,H as bt,_ as ot,$ as Pl,a0 as Al}from"../chunks/scheduler.2BOoCPD3.js";import{S as ye,i as Fe,f as Ue,b as Ee,d as Le,m as Se,a as we,t as Oe,e as je,g as Ul,c as zl}from"../chunks/index.RMmEH_Pi.js";import{e as De,D as Ml,F as dl,G as yl,H as hl,I as _l,P as wt,J as Fl,K as Nt,L as ct,M as Bl,N as Rl,O as Ot,Q as Hl,R as At,f as dt,r as Dt,T as Ge,U as Vl,V as Wl,W as Xl,X as Yl,Y as Kl}from"../chunks/index.VmH-9d5B.js";import{b as vt}from"../chunks/paths.UrvDPV07.js";import{p as ql}from"../chunks/stores.CBY9bGtC.js";function Gl(t,e){throw new Cl(t,e)}new TextEncoder;function Zl({params:t}){const e=t.design;if(Object.keys(Pt).includes(e))return{pageDef:Pt[e],allLink:wl};Gl(404,"Design undefined!")}const vs=Object.freeze(Object.defineProperty({__proto__:null,load:Zl},Symbol.toStringTag,{value:"Module"})),Ze=ul({});function pl(t,e,l){const n=Dl(Ze);if(Object.keys(n).includes(t)){const s=n[t],a=Object.keys(s);for(const c of Object.keys(e))a.includes(c)?l&&(s[c]=e[c]):s[c]=e[c];n[t]=s}else n[t]=e;Ze.set(n)}function Jl(t){const e=t.pDef.partName,l={};for(const n of t.pDef.params)l[n.name]=n.init;pl(e,l,!1)}function Ut(t){let e,l,n,r,s,a,c;return{c(){e=_("aside"),l=_("div"),n=_("button"),r=_("img"),this.h()},l(u){e=p(u,"ASIDE",{class:!0});var i=S(e);l=p(i,"DIV",{class:!0});var m=S(l);n=p(m,"BUTTON",{class:!0});var h=S(n);r=p(h,"IMG",{src:!0,alt:!0}),h.forEach(k),m.forEach(k),i.forEach(k),this.h()},h(){ht(r.src,s=t[1])||f(r,"src",s),f(r,"alt",t[1]),f(n,"class","svelte-sjxf1e"),f(l,"class","dialog svelte-sjxf1e"),f(e,"class","backdrop svelte-sjxf1e")},m(u,i){J(u,e,i),o(e,l),o(l,n),o(n,r),a||(c=G(n,"click",t[2]),a=!0)},p(u,i){i&2&&!ht(r.src,s=u[1])&&f(r,"src",s),i&2&&f(r,"alt",u[1])},d(u){u&&k(e),a=!1,c()}}}function Ql(t){let e,l=t[0]&&Ut(t);return{c(){l&&l.c(),e=st()},l(n){l&&l.l(n),e=st()},m(n,r){l&&l.m(n,r),J(n,e,r)},p(n,[r]){n[0]?l?l.p(n,r):(l=Ut(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:ze,o:ze,d(n){n&&k(e),l&&l.d(n)}}}function $l(t,e,l){let{svgPath:n}=e,{modalOpen:r}=e;function s(){l(0,r=!1)}return t.$$set=a=>{"svgPath"in a&&l(1,n=a.svgPath),"modalOpen"in a&&l(0,r=a.modalOpen)},[r,n,s]}class gl extends ye{constructor(e){super(),Fe(this,e,$l,Ql,Me,{svgPath:1,modalOpen:0})}}function zt(t,e,l){const n=t.slice();return n[8]=e[l],n}function Mt(t){let e,l,n,r,s,a,c;function u(){return t[6](t[8])}return{c(){e=_("button"),l=_("img"),s=j(),this.h()},l(i){e=p(i,"BUTTON",{class:!0});var m=S(e);l=p(m,"IMG",{src:!0,alt:!0,class:!0}),s=I(m),m.forEach(k),this.h()},h(){ht(l.src,n=t[8])||f(l,"src",n),f(l,"alt",r=t[8]),f(l,"class","svelte-fxmnfh"),f(e,"class","svelte-fxmnfh")},m(i,m){J(i,e,m),o(e,l),o(e,s),a||(c=G(e,"click",u),a=!0)},p(i,m){t=i,m&1&&!ht(l.src,n=t[8])&&f(l,"src",n),m&1&&r!==(r=t[8])&&f(l,"alt",r)},d(i){i&&k(e),a=!1,c()}}}function xl(t){let e,l,n,r,s;function a(m){t[5](m)}let c={svgPath:t[2]};t[1]!==void 0&&(c.modalOpen=t[1]),l=new gl({props:c}),Ie.push(()=>Ue(l,"modalOpen",a));let u=De(t[0]),i=[];for(let m=0;m<u.length;m+=1)i[m]=Mt(zt(t,u,m));return{c(){e=_("section"),Ee(l.$$.fragment),r=j();for(let m=0;m<i.length;m+=1)i[m].c();this.h()},l(m){e=p(m,"SECTION",{class:!0});var h=S(e);Le(l.$$.fragment,h),r=I(h);for(let N=0;N<i.length;N+=1)i[N].l(h);h.forEach(k),this.h()},h(){f(e,"class","svelte-fxmnfh")},m(m,h){J(m,e,h),Se(l,e,null),o(e,r);for(let N=0;N<i.length;N+=1)i[N]&&i[N].m(e,null);s=!0},p(m,[h]){const N={};if(h&4&&(N.svgPath=m[2]),!n&&h&2&&(n=!0,N.modalOpen=m[1],Ae(()=>n=!1)),l.$set(N),h&9){u=De(m[0]);let v;for(v=0;v<u.length;v+=1){const d=zt(m,u,v);i[v]?i[v].p(d,h):(i[v]=Mt(d),i[v].c(),i[v].m(e,null))}for(;v<i.length;v+=1)i[v].d(1);i.length=u.length}},i(m){s||(we(l.$$.fragment,m),s=!0)},o(m){Oe(l.$$.fragment,m),s=!1},d(m){m&&k(e),je(l),Ke(i,m)}}}function en(t){const e=[];for(const l of Object.values(t.paramSvg))e.includes(l)||e.push(l);return e}function tn(t,e,l){let{pDef:n}=e;function r(h){const N=en(n),v=[];for(const d of N)v.push(`${vt}/pgdsvg/${d}`);return v}let s=[],a=!1,c;function u(h){l(2,c=h),l(1,a=!0)}function i(h){a=h,l(1,a)}const m=h=>u(h);return t.$$set=h=>{"pDef"in h&&l(4,n=h.pDef)},t.$$.update=()=>{t.$$.dirty&16&&l(0,s=r(n.partName))},[s,a,c,u,n,i,m]}class ln extends ye{constructor(e){super(),Fe(this,e,tn,xl,Me,{pDef:4})}}function yt(t){let e,l,n,r,s,a,c="Cancel",u,i,m,h,N,v;const d=t[7].default,b=El(d,t,t[6],null);return{c(){e=_("aside"),l=_("div"),n=_("article"),b&&b.c(),r=j(),s=_("footer"),a=_("button"),a.textContent=c,u=j(),i=_("button"),m=Y(t[1]),this.h()},l(T){e=p(T,"ASIDE",{class:!0});var g=S(e);l=p(g,"DIV",{class:!0});var C=S(l);n=p(C,"ARTICLE",{class:!0});var D=S(n);b&&b.l(D),D.forEach(k),r=I(C),s=p(C,"FOOTER",{class:!0});var O=S(s);a=p(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-hcvk9s"&&(a.textContent=c),u=I(O),i=p(O,"BUTTON",{class:!0});var z=S(i);m=K(z,t[1]),z.forEach(k),O.forEach(k),C.forEach(k),g.forEach(k),this.h()},h(){f(n,"class","question svelte-weruk7"),f(a,"class","cancel svelte-weruk7"),f(i,"class","ok svelte-weruk7"),f(s,"class","svelte-weruk7"),f(l,"class","dialog svelte-weruk7"),He(l,"sizeLarge",t[2]),f(e,"class","backdrop svelte-weruk7")},m(T,g){J(T,e,g),o(e,l),o(l,n),b&&b.m(n,null),o(l,r),o(l,s),o(s,a),o(s,u),o(s,i),o(i,m),h=!0,N||(v=[G(a,"click",t[3]),G(i,"click",t[4])],N=!0)},p(T,g){b&&b.p&&(!h||g&64)&&Ll(b,d,T,T[6],h?jl(d,T[6],g,null):Sl(T[6]),null),(!h||g&2)&&ge(m,T[1]),(!h||g&4)&&He(l,"sizeLarge",T[2])},i(T){h||(we(b,T),h=!0)},o(T){Oe(b,T),h=!1},d(T){T&&k(e),b&&b.d(T),N=!1,qe(v)}}}function nn(t){let e,l,n=t[0]&&yt(t);return{c(){n&&n.c(),e=st()},l(r){n&&n.l(r),e=st()},m(r,s){n&&n.m(r,s),J(r,e,s),l=!0},p(r,[s]){r[0]?n?(n.p(r,s),s&1&&we(n,1)):(n=yt(r),n.c(),we(n,1),n.m(e.parentNode,e)):n&&(Ul(),Oe(n,1,1,()=>{n=null}),zl())},i(r){l||(we(n),l=!0)},o(r){Oe(n),l=!1},d(r){r&&k(e),n&&n.d(r)}}}function sn(t,e,l){let{$$slots:n={},$$scope:r}=e,{okName:s="Ok"}=e,{okFunc:a}=e,{modalOpen:c}=e,{sizeLarge:u=!1}=e;function i(){l(0,c=!1)}function m(){a(),l(0,c=!1)}return t.$$set=h=>{"okName"in h&&l(1,s=h.okName),"okFunc"in h&&l(5,a=h.okFunc),"modalOpen"in h&&l(0,c=h.modalOpen),"sizeLarge"in h&&l(2,u=h.sizeLarge),"$$scope"in h&&l(6,r=h.$$scope)},[c,s,u,i,m,a,r,n]}class gt extends ye{constructor(e){super(),Fe(this,e,sn,nn,Me,{okName:1,okFunc:5,modalOpen:0,sizeLarge:2})}}function Ft(t,e,l){const n=t.slice();return n[17]=e[l],n[18]=e,n[19]=l,n}function Bt(t,e,l){const n=t.slice();return n[17]=e[l],n}function Rt(t){let e,l=t[17]+"",n;return{c(){e=_("p"),n=Y(l),this.h()},l(r){e=p(r,"P",{class:!0});var s=S(e);n=K(s,l),s.forEach(k),this.h()},h(){f(e,"class","diagItem svelte-12dj9tj")},m(r,s){J(r,e,s),o(e,n)},p(r,s){s&1&&l!==(l=r[17]+"")&&ge(n,l)},d(r){r&&k(e)}}}function Ht(t){let e,l=t[3][t[17]]&&Rt(t);return{c(){l&&l.c(),e=st()},l(n){l&&l.l(n),e=st()},m(n,r){l&&l.m(n,r),J(n,e,r)},p(n,r){n[3][n[17]]?l?l.p(n,r):(l=Rt(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(n){n&&k(e),l&&l.d(n)}}}function an(t){let e,l="Do you really want to delete the following localStorage keys?",n,r,s=De(t[0]),a=[];for(let c=0;c<s.length;c+=1)a[c]=Ht(Bt(t,s,c));return{c(){e=_("p"),e.textContent=l,n=j();for(let c=0;c<a.length;c+=1)a[c].c();r=st(),this.h()},l(c){e=p(c,"P",{class:!0,"data-svelte-h":!0}),ie(e)!=="svelte-12r0p0q"&&(e.textContent=l),n=I(c);for(let u=0;u<a.length;u+=1)a[u].l(c);r=st(),this.h()},h(){f(e,"class","diagTitle svelte-12dj9tj")},m(c,u){J(c,e,u),J(c,n,u);for(let i=0;i<a.length;i+=1)a[i]&&a[i].m(c,u);J(c,r,u)},p(c,u){if(u&9){s=De(c[0]);let i;for(i=0;i<s.length;i+=1){const m=Bt(c,s,i);a[i]?a[i].p(m,u):(a[i]=Ht(m),a[i].c(),a[i].m(r.parentNode,r))}for(;i<a.length;i+=1)a[i].d(1);a.length=s.length}},d(c){c&&(k(e),k(n),k(r)),Ke(a,c)}}}function Vt(t){let e,l,n,r,s,a,c=t[17]+"",u,i,m,h=t[2][t[17]]+"",N,v,d,b;function T(){t[12].call(n,t[17])}function g(){return t[13](t[17])}return{c(){e=_("tr"),l=_("td"),n=_("input"),r=j(),s=_("td"),a=_("button"),u=Y(c),i=j(),m=_("td"),N=Y(h),v=j(),this.h()},l(C){e=p(C,"TR",{class:!0});var D=S(e);l=p(D,"TD",{});var O=S(l);n=p(O,"INPUT",{type:!0}),O.forEach(k),r=I(D),s=p(D,"TD",{class:!0});var z=S(s);a=p(z,"BUTTON",{class:!0});var F=S(a);u=K(F,c),F.forEach(k),z.forEach(k),i=I(D),m=p(D,"TD",{});var U=S(m);N=K(U,h),U.forEach(k),v=I(D),D.forEach(k),this.h()},h(){f(n,"type","checkbox"),f(a,"class","svelte-12dj9tj"),f(s,"class","svelte-12dj9tj"),f(e,"class","svelte-12dj9tj")},m(C,D){J(C,e,D),o(e,l),o(l,n),n.checked=t[3][t[17]],o(e,r),o(e,s),o(s,a),o(a,u),o(e,i),o(e,m),o(m,N),o(e,v),d||(b=[G(n,"change",T),G(a,"click",g)],d=!0)},p(C,D){t=C,D&9&&(n.checked=t[3][t[17]]),D&1&&c!==(c=t[17]+"")&&ge(u,c),D&5&&h!==(h=t[2][t[17]]+"")&&ge(N,h)},d(C){C&&k(e),d=!1,qe(b)}}}function on(t){let e,l,n="Delete",r,s,a,c,u,i,m,h="<td>Delete</td> <td>Key name</td> <td>Last modification</td>",N,v,d,b,T,g,C="delete all",D,O,z,F,U,w,E;function M(y){t[10](y)}let P={okName:"Confirm",okFunc:t[6],$$slots:{default:[an]},$$scope:{ctx:t}};t[4]!==void 0&&(P.modalOpen=t[4]),s=new gt({props:P}),Ie.push(()=>Ue(s,"modalOpen",M));let X=De(t[0]),R=[];for(let y=0;y<X.length;y+=1)R[y]=Vt(Ft(t,X,y));return{c(){e=_("div"),l=_("button"),l.textContent=n,r=j(),Ee(s.$$.fragment),c=j(),u=_("table"),i=_("thead"),m=_("tr"),m.innerHTML=h,N=j(),v=_("tr"),d=_("td"),b=_("input"),T=j(),g=_("td"),g.textContent=C,D=j(),O=_("td"),z=j(),F=_("tbody");for(let y=0;y<R.length;y+=1)R[y].c();this.h()},l(y){e=p(y,"DIV",{class:!0});var V=S(e);l=p(V,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-1tbm4xl"&&(l.textContent=n),r=I(V),Le(s.$$.fragment,V),c=I(V),u=p(V,"TABLE",{class:!0});var x=S(u);i=p(x,"THEAD",{class:!0});var Z=S(i);m=p(Z,"TR",{"data-svelte-h":!0}),ie(m)!=="svelte-xt53kn"&&(m.innerHTML=h),N=I(Z),v=p(Z,"TR",{});var le=S(v);d=p(le,"TD",{});var _e=S(d);b=p(_e,"INPUT",{type:!0}),_e.forEach(k),T=I(le),g=p(le,"TD",{class:!0,"data-svelte-h":!0}),ie(g)!=="svelte-1s4wssd"&&(g.textContent=C),D=I(le),O=p(le,"TD",{}),S(O).forEach(k),le.forEach(k),Z.forEach(k),z=I(x),F=p(x,"TBODY",{class:!0});var ce=S(F);for(let pe=0;pe<R.length;pe+=1)R[pe].l(ce);ce.forEach(k),x.forEach(k),V.forEach(k),this.h()},h(){f(l,"class","svelte-12dj9tj"),f(b,"type","checkbox"),f(g,"class","instruction"),f(i,"class","svelte-12dj9tj"),f(F,"class","svelte-12dj9tj"),f(u,"class","svelte-12dj9tj"),f(e,"class","deleteKeys svelte-12dj9tj")},m(y,V){J(y,e,V),o(e,l),o(e,r),Se(s,e,null),o(e,c),o(e,u),o(u,i),o(i,m),o(i,N),o(i,v),o(v,d),o(d,b),b.checked=t[1],o(v,T),o(v,g),o(v,D),o(v,O),o(u,z),o(u,F);for(let x=0;x<R.length;x+=1)R[x]&&R[x].m(F,null);U=!0,w||(E=[G(l,"click",t[9]),G(b,"change",t[11])],w=!0)},p(y,[V]){const x={};if(V&4194313&&(x.$$scope={dirty:V,ctx:y}),!a&&V&16&&(a=!0,x.modalOpen=y[4],Ae(()=>a=!1)),s.$set(x),V&2&&(b.checked=y[1]),V&45){X=De(y[0]);let Z;for(Z=0;Z<X.length;Z+=1){const le=Ft(y,X,Z);R[Z]?R[Z].p(le,V):(R[Z]=Vt(le),R[Z].c(),R[Z].m(F,null))}for(;Z<R.length;Z+=1)R[Z].d(1);R.length=X.length}},i(y){U||(we(s.$$.fragment,y),U=!0)},o(y){Oe(s.$$.fragment,y),U=!1},d(y){y&&k(e),je(s),Ke(R,y),w=!1,qe(E)}}}function rn(t){let e={};for(const l of t)e[l]=!1;return e}function cn(t,e,l){let{pageName:n}=e,{storeName:r}=e,{localKeys:s}=e;function a(){let O=[];const z=new RegExp(`^${n}_`);return O=Object.keys(window.localStorage).filter(U=>z.test(U)).map(U=>U.replace(z,"")),O}s=a();function c(O){l(7,r=O)}let u={};function i(O){let z={};for(const F of O){let U="";const w=`${n}_${F}`,E=window.localStorage.getItem(w);E!==null&&(U=JSON.parse(E).lastModif),z[F]=U}return z}u=i(s);let m={};m=rn(s);let h=!1;function N(O){for(const z of s)l(3,m[z]=O,m)}function v(){for(const O of s)if(m[O]){const z=`${n}_${O}`;window.localStorage.removeItem(z)}l(0,s=a())}let d=!1;const b=()=>{l(4,d=!0)};function T(O){d=O,l(4,d)}function g(){h=this.checked,l(1,h)}function C(O){m[O]=this.checked,l(3,m)}const D=O=>c(O);return t.$$set=O=>{"pageName"in O&&l(8,n=O.pageName),"storeName"in O&&l(7,r=O.storeName),"localKeys"in O&&l(0,s=O.localKeys)},t.$$.update=()=>{t.$$.dirty&2&&N(h)},[s,h,u,m,d,c,v,r,n,b,T,g,C,D]}class vl extends ye{constructor(e){super(),Fe(this,e,cn,on,Me,{pageName:8,storeName:7,localKeys:0})}}function Wt(t){let e,l,n,r;return{c(){e=_("p"),l=Y("Warning: name "),n=Y(t[0]),r=Y(" already used"),this.h()},l(s){e=p(s,"P",{class:!0});var a=S(e);l=K(a,"Warning: name "),n=K(a,t[0]),r=K(a," already used"),a.forEach(k),this.h()},h(){f(e,"class","warnMsg svelte-1rkdwo")},m(s,a){J(s,e,a),o(e,l),o(e,n),o(e,r)},p(s,a){a&1&&ge(n,s[0])},d(s){s&&k(e)}}}function fn(t){let e,l,n,r,s,a,c="Give a name to your parameter-set:",u,i,m,h,N,v;function d(C){t[5](C)}function b(C){t[6](C)}let T={pageName:t[1]};t[0]!==void 0&&(T.storeName=t[0]),t[2]!==void 0&&(T.localKeys=t[2]),e=new vl({props:T}),Ie.push(()=>Ue(e,"storeName",d)),Ie.push(()=>Ue(e,"localKeys",b));let g=t[3]&&Wt(t);return{c(){Ee(e.$$.fragment),r=j(),s=_("div"),a=_("label"),a.textContent=c,u=j(),i=_("input"),m=j(),g&&g.c(),this.h()},l(C){Le(e.$$.fragment,C),r=I(C),s=p(C,"DIV",{class:!0});var D=S(s);a=p(D,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-1vdq35w"&&(a.textContent=c),u=I(D),i=p(D,"INPUT",{type:!0,id:!0,minlength:!0,maxlength:!0,size:!0,class:!0}),m=I(D),g&&g.l(D),D.forEach(k),this.h()},h(){f(a,"for","storName"),f(a,"class","svelte-1rkdwo"),f(i,"type","text"),f(i,"id","storName"),i.required=!0,f(i,"minlength","4"),f(i,"maxlength","30"),f(i,"size","32"),f(i,"class","svelte-1rkdwo"),f(s,"class","svelte-1rkdwo")},m(C,D){Se(e,C,D),J(C,r,D),J(C,s,D),o(s,a),o(s,u),o(s,i),be(i,t[0]),o(s,m),g&&g.m(s,null),h=!0,N||(v=[G(i,"input",t[7]),G(i,"input",t[4])],N=!0)},p(C,[D]){const O={};D&2&&(O.pageName=C[1]),!l&&D&1&&(l=!0,O.storeName=C[0],Ae(()=>l=!1)),!n&&D&4&&(n=!0,O.localKeys=C[2],Ae(()=>n=!1)),e.$set(O),D&1&&i.value!==C[0]&&be(i,C[0]),C[3]?g?g.p(C,D):(g=Wt(C),g.c(),g.m(s,null)):g&&(g.d(1),g=null)},i(C){h||(we(e.$$.fragment,C),h=!0)},o(C){Oe(e.$$.fragment,C),h=!1},d(C){C&&(k(r),k(s)),je(e,C),g&&g.d(),N=!1,qe(v)}}}function un(t){const e=/[-:]/g,l=/\..*$/;return`${t}_${new Date().toISOString().replace(e,"").replace(l,"").replace("T","_")}`}function mn(t,e,l){let{pageName:n}=e,{storeName:r}=e,s=[];r=un(n);let a=!1;function c(N){l(3,a=s.includes(N))}function u(N){const v=N.target.value;c(v)}function i(N){r=N,l(0,r)}function m(N){s=N,l(2,s)}function h(){r=this.value,l(0,r)}return t.$$set=N=>{"pageName"in N&&l(1,n=N.pageName),"storeName"in N&&l(0,r=N.storeName)},t.$$.update=()=>{t.$$.dirty&1&&c(r)},[r,n,s,a,u,i,m,h]}class dn extends ye{constructor(e){super(),Fe(this,e,mn,fn,Me,{pageName:1,storeName:0})}}function hn(t){let e,l,n,r,s,a,c="Select a parameter-set:",u,i,m;function h(d){t[3](d)}function N(d){t[4](d)}let v={pageName:t[1]};return t[0]!==void 0&&(v.storeName=t[0]),t[2]!==void 0&&(v.localKeys=t[2]),e=new vl({props:v}),Ie.push(()=>Ue(e,"storeName",h)),Ie.push(()=>Ue(e,"localKeys",N)),{c(){Ee(e.$$.fragment),r=j(),s=_("div"),a=_("label"),a.textContent=c,u=j(),i=_("input"),this.h()},l(d){Le(e.$$.fragment,d),r=I(d),s=p(d,"DIV",{class:!0});var b=S(s);a=p(b,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-rajgc0"&&(a.textContent=c),u=I(b),i=p(b,"INPUT",{type:!0,id:!0,minlength:!0,maxlength:!0,size:!0,class:!0}),b.forEach(k),this.h()},h(){f(a,"for","storName"),f(a,"class","svelte-1ozd0ey"),f(i,"type","text"),f(i,"id","storName"),i.value=t[0],i.readOnly=!0,f(i,"minlength","4"),f(i,"maxlength","30"),f(i,"size","32"),f(i,"class","svelte-1ozd0ey"),f(s,"class","svelte-1ozd0ey")},m(d,b){Se(e,d,b),J(d,r,b),J(d,s,b),o(s,a),o(s,u),o(s,i),m=!0},p(d,[b]){const T={};b&2&&(T.pageName=d[1]),!l&&b&1&&(l=!0,T.storeName=d[0],Ae(()=>l=!1)),!n&&b&4&&(n=!0,T.localKeys=d[2],Ae(()=>n=!1)),e.$set(T),(!m||b&1&&i.value!==d[0])&&(i.value=d[0])},i(d){m||(we(e.$$.fragment,d),m=!0)},o(d){Oe(e.$$.fragment,d),m=!1},d(d){d&&(k(r),k(s)),je(e,d)}}}function _n(t,e,l){let{pageName:n}=e,{storeName:r}=e,s=[];function a(i){let m=r;return!i.includes(m)&&(i.length>0?m=i[0]:m=""),m}function c(i){r=i,l(0,r),l(2,s)}function u(i){s=i,l(2,s)}return t.$$set=i=>{"pageName"in i&&l(1,n=i.pageName),"storeName"in i&&l(0,r=i.storeName)},t.$$.update=()=>{t.$$.dirty&4&&l(0,r=a(s))},[r,n,s,c,u]}class pn extends ye{constructor(e){super(),Fe(this,e,_n,hn,Me,{pageName:1,storeName:0})}}const Ve=ul(Ml());function gn(t){let e;return{c(){e=_("canvas"),this.h()},l(l){e=p(l,"CANVAS",{class:!0,width:!0,height:!0}),S(e).forEach(k),this.h()},h(){f(e,"class","mini svelte-z8e4tz"),f(e,"width",Xt),f(e,"height",Xt)},m(l,n){J(l,e,n),t[9](e)},p:ze,i:ze,o:ze,d(l){l&&k(e),t[9](null)}}}const Xt=200;function vn(t,e,l){let n,r;at(t,Ve,T=>l(7,n=T)),at(t,Ze,T=>l(8,r=T));let{pageName:s}=e,{fgeom:a}=e,{selFace:c}=e,{zAdjust:u}=e,{simTime:i=0}=e,m,h;function N(T,g){const C=yl(g);C.ruler=!1;const D=m.getContext("2d");D.clearRect(0,0,D.canvas.width,D.canvas.height);try{u.init===0?h=T.getAdjustFull(D.canvas.width,D.canvas.height):h=u,T.draw(D,h,C)}catch(O){console.log(O)}}let v=0;function d(T,g,C,D){const O=a(T,g).fig;if(Object.keys(O).includes(C)){const z=O[C];N(z,D)}else{const z=dl(O);N(z,D)}}Et(()=>{d(i,r[s],c,n),l(6,v=1)});function b(T){Ie[T?"unshift":"push"](()=>{m=T,l(0,m)})}return t.$$set=T=>{"pageName"in T&&l(1,s=T.pageName),"fgeom"in T&&l(2,a=T.fgeom),"selFace"in T&&l(3,c=T.selFace),"zAdjust"in T&&l(4,u=T.zAdjust),"simTime"in T&&l(5,i=T.simTime)},t.$$.update=()=>{t.$$.dirty&490&&v===1&&d(i,r[s],c,n)},[m,s,a,c,u,i,v,n,r,b]}class Yt extends ye{constructor(e){super(),Fe(this,e,vn,gn,Me,{pageName:1,fgeom:2,selFace:3,zAdjust:4,simTime:5})}}function bn(t,e){const l=document.createElement("a");l.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),l.setAttribute("download",t),l.click(),l.remove()}function bl(t,e,l){const n=/[-:]/g,r=/\..*$/,s=new Date().toISOString().replace(n,"").replace(r,"").replace("T","_"),a=`px_${t}_${s}.json`,c=hl(s,t,e,l);bn(a,c)}function kn(t,e,l){const n=new URL(t),r=2e3;let s=n.toString().length;for(const a of Object.keys(e)){const c=e[a].toString(),u=2+a.length+c.length;n.searchParams.append(encodeURIComponent(a),encodeURIComponent(c)),s+=u}return s>=r&&console.log(`warn547: generateUrl: strLength ${s} larger than strLengthLimit ${r}`),n.toString()}function Kt(t,e,l){const n=t.slice();return n[58]=e[l],n[59]=e,n[60]=l,n}function qt(t,e,l){const n=t.slice();return n[61]=e[l],n[62]=e,n[63]=l,n}function Gt(t,e,l){const n=t.slice();return n[64]=e[l],n[66]=l,n}function Nn(t,e,l){const n=t.slice();return n[64]=e[l],n[66]=l,n}function Tn(t){let e;return{c(){e=Y("Load the default parameters ?")},l(l){e=K(l,"Load the default parameters ?")},m(l,n){J(l,e,n)},d(l){l&&k(e)}}}function wn(t){let e,l,n;function r(a){t[34](a)}let s={pageName:t[0].partName};return t[13]!==void 0&&(s.storeName=t[13]),e=new pn({props:s}),Ie.push(()=>Ue(e,"storeName",r)),{c(){Ee(e.$$.fragment)},l(a){Le(e.$$.fragment,a)},m(a,c){Se(e,a,c),n=!0},p(a,c){const u={};c[0]&1&&(u.pageName=a[0].partName),!l&&c[0]&8192&&(l=!0,u.storeName=a[13],Ae(()=>l=!1)),e.$set(u)},i(a){n||(we(e.$$.fragment,a),n=!0)},o(a){Oe(e.$$.fragment,a),n=!1},d(a){je(e,a)}}}function Cn(t){let e;return{c(){e=Y("unknown")},l(l){e=K(l,"unknown")},m(l,n){J(l,e,n)},p:ze,d(l){l&&k(e)}}}function On(t){let e,l,n,r=De(t[61].dropdown),s=[];for(let c=0;c<r.length;c+=1)s[c]=Zt(Gt(t,r,c));function a(){t[41].call(e,t[61])}return{c(){e=_("select");for(let c=0;c<s.length;c+=1)s[c].c();this.h()},l(c){e=p(c,"SELECT",{});var u=S(e);for(let i=0;i<s.length;i+=1)s[i].l(u);u.forEach(k),this.h()},h(){t[19][t[0].partName][t[61].name]===void 0&&bt(a)},m(c,u){J(c,e,u);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(e,null);ot(e,t[19][t[0].partName][t[61].name],!0),l||(n=G(e,"change",a),l=!0)},p(c,u){if(t=c,u[0]&32){r=De(t[61].dropdown);let i;for(i=0;i<r.length;i+=1){const m=Gt(t,r,i);s[i]?s[i].p(m,u):(s[i]=Zt(m),s[i].c(),s[i].m(e,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}u[0]&524321&&ot(e,t[19][t[0].partName][t[61].name])},d(c){c&&k(e),Ke(s,c),l=!1,n()}}}function Dn(t){let e,l,n,r=De(["Off","On"]),s=[];for(let c=0;c<2;c+=1)s[c]=Ln(Nn(t,r,c));function a(){t[40].call(e,t[61])}return{c(){e=_("select");for(let c=0;c<2;c+=1)s[c].c();this.h()},l(c){e=p(c,"SELECT",{});var u=S(e);for(let i=0;i<2;i+=1)s[i].l(u);u.forEach(k),this.h()},h(){t[19][t[0].partName][t[61].name]===void 0&&bt(a)},m(c,u){J(c,e,u);for(let i=0;i<2;i+=1)s[i]&&s[i].m(e,null);ot(e,t[19][t[0].partName][t[61].name],!0),l||(n=G(e,"change",a),l=!0)},p(c,u){t=c,u[0]&524321&&ot(e,t[19][t[0].partName][t[61].name])},d(c){c&&k(e),Ke(s,c),l=!1,n()}}}function En(t){let e,l,n,r,s,a,c,u,i,m,h;function N(){t[38].call(e,t[61])}function v(){t[39].call(a,t[61])}return{c(){e=_("input"),s=j(),a=_("input"),this.h()},l(d){e=p(d,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),s=I(d),a=p(d,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),this.h()},h(){f(e,"type","number"),f(e,"min",l=t[61].min),f(e,"max",n=t[61].max),f(e,"step",r=t[61].step),f(e,"class","input-number svelte-1g5tt44"),f(a,"type","range"),f(a,"min",c=t[61].min),f(a,"max",u=t[61].max),f(a,"step",i=t[61].step),f(a,"class","svelte-1g5tt44")},m(d,b){J(d,e,b),be(e,t[19][t[0].partName][t[61].name]),J(d,s,b),J(d,a,b),be(a,t[19][t[0].partName][t[61].name]),m||(h=[G(e,"input",N),G(e,"change",t[21]),G(a,"change",v),G(a,"input",v),G(a,"change",t[21])],m=!0)},p(d,b){t=d,b[0]&32&&l!==(l=t[61].min)&&f(e,"min",l),b[0]&32&&n!==(n=t[61].max)&&f(e,"max",n),b[0]&32&&r!==(r=t[61].step)&&f(e,"step",r),b[0]&524321&&_t(e.value)!==t[19][t[0].partName][t[61].name]&&be(e,t[19][t[0].partName][t[61].name]),b[0]&32&&c!==(c=t[61].min)&&f(a,"min",c),b[0]&32&&u!==(u=t[61].max)&&f(a,"max",u),b[0]&32&&i!==(i=t[61].step)&&f(a,"step",i),b[0]&524321&&be(a,t[19][t[0].partName][t[61].name])},d(d){d&&(k(e),k(s),k(a)),m=!1,qe(h)}}}function Zt(t){let e,l=t[64]+"",n;return{c(){e=_("option"),n=Y(l),this.h()},l(r){e=p(r,"OPTION",{});var s=S(e);n=K(s,l),s.forEach(k),this.h()},h(){e.__value=t[66],be(e,e.__value)},m(r,s){J(r,e,s),o(e,n)},p(r,s){s[0]&32&&l!==(l=r[64]+"")&&ge(n,l)},d(r){r&&k(e)}}}function Ln(t){let e,l;return{c(){e=_("option"),l=Y(t[64]),this.h()},l(n){e=p(n,"OPTION",{});var r=S(e);l=K(r,t[64]),r.forEach(k),this.h()},h(){e.__value=t[66],be(e,e.__value)},m(n,r){J(n,e,r),o(e,l)},p:ze,d(n){n&&k(e)}}}function Jt(t){let e,l,n=t[60]+1+"",r,s,a=t[63]+1+"",c,u,i,m,h=t[61].name+"",N,v,d,b,T,g=t[61].unit+"",C,D,O,z=t[61].init+"",F,U,w,E=t[61].min+"",M,P,X,R=t[61].max+"",y,V,x,Z=t[61].step+"",le,_e,ce;function pe(){return t[37](t[61])}function Ce(ne,q){return ne[61].pType===wt.eNumber?En:ne[61].pType===wt.eCheckbox?Dn:ne[61].pType===wt.eDropdown?On:Cn}let L=Ce(t),B=L(t);return{c(){e=_("tr"),l=_("td"),r=Y(n),s=Y("."),c=Y(a),u=j(),i=_("td"),m=_("button"),N=Y(h),v=j(),d=_("td"),B.c(),b=j(),T=_("td"),C=Y(g),D=j(),O=_("td"),F=Y(z),U=j(),w=_("td"),M=Y(E),P=j(),X=_("td"),y=Y(R),V=j(),x=_("td"),le=Y(Z),this.h()},l(ne){e=p(ne,"TR",{class:!0});var q=S(e);l=p(q,"TD",{class:!0});var fe=S(l);r=K(fe,n),s=K(fe,"."),c=K(fe,a),fe.forEach(k),u=I(q),i=p(q,"TD",{class:!0});var ee=S(i);m=p(ee,"BUTTON",{class:!0});var ke=S(m);N=K(ke,h),ke.forEach(k),ee.forEach(k),v=I(q),d=p(q,"TD",{class:!0});var Te=S(d);B.l(Te),Te.forEach(k),b=I(q),T=p(q,"TD",{class:!0});var ue=S(T);C=K(ue,g),ue.forEach(k),D=I(q),O=p(q,"TD",{class:!0});var Q=S(O);F=K(Q,z),Q.forEach(k),U=I(q),w=p(q,"TD",{class:!0});var oe=S(w);M=K(oe,E),oe.forEach(k),P=I(q),X=p(q,"TD",{class:!0});var $=S(X);y=K($,R),$.forEach(k),V=I(q),x=p(q,"TD",{class:!0});var A=S(x);le=K(A,Z),A.forEach(k),q.forEach(k),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(m,"class","svelte-1g5tt44"),f(i,"class","svelte-1g5tt44"),f(d,"class","svelte-1g5tt44"),f(T,"class","svelte-1g5tt44"),f(O,"class","svelte-1g5tt44"),f(w,"class","svelte-1g5tt44"),f(X,"class","svelte-1g5tt44"),f(x,"class","svelte-1g5tt44"),f(e,"class","svelte-1g5tt44"),He(e,"changed",t[19][t[0].partName][t[61].name]!==t[61].init)},m(ne,q){J(ne,e,q),o(e,l),o(l,r),o(l,s),o(l,c),o(e,u),o(e,i),o(i,m),o(m,N),o(e,v),o(e,d),B.m(d,null),o(e,b),o(e,T),o(T,C),o(e,D),o(e,O),o(O,F),o(e,U),o(e,w),o(w,M),o(e,P),o(e,X),o(X,y),o(e,V),o(e,x),o(x,le),_e||(ce=G(m,"click",pe),_e=!0)},p(ne,q){t=ne,q[0]&32&&h!==(h=t[61].name+"")&&ge(N,h),L===(L=Ce(t))&&B?B.p(t,q):(B.d(1),B=L(t),B&&(B.c(),B.m(d,null))),q[0]&32&&g!==(g=t[61].unit+"")&&ge(C,g),q[0]&32&&z!==(z=t[61].init+"")&&ge(F,z),q[0]&32&&E!==(E=t[61].min+"")&&ge(M,E),q[0]&32&&R!==(R=t[61].max+"")&&ge(y,R),q[0]&32&&Z!==(Z=t[61].step+"")&&ge(le,Z),q[0]&524321&&He(e,"changed",t[19][t[0].partName][t[61].name]!==t[61].init)},d(ne){ne&&k(e),B.d(),_e=!1,ce()}}}function Qt(t){let e,l,n=t[60]+1+"",r,s,a,c=t[58].sectionName+"",u,i,m,h,N,v,d,b="",T,g,C,D,O;function z(){t[36].call(N,t[58])}let F=De(t[58].params),U=[];for(let w=0;w<F.length;w+=1)U[w]=Jt(qt(t,F,w));return{c(){e=_("tr"),l=_("td"),r=Y(n),s=j(),a=_("td"),u=Y(c),i=j(),m=_("td"),h=_("label"),N=_("input"),v=j(),d=_("span"),d.innerHTML=b,T=j(),g=_("tbody");for(let w=0;w<U.length;w+=1)U[w].c();C=j(),this.h()},l(w){e=p(w,"TR",{class:!0});var E=S(e);l=p(E,"TD",{class:!0});var M=S(l);r=K(M,n),M.forEach(k),s=I(E),a=p(E,"TD",{colspan:!0,class:!0});var P=S(a);u=K(P,c),P.forEach(k),i=I(E),m=p(E,"TD",{colspan:!0,class:!0});var X=S(m);h=p(X,"LABEL",{class:!0});var R=S(h);N=p(R,"INPUT",{type:!0,class:!0}),v=I(R),d=p(R,"SPAN",{class:!0,"data-svelte-h":!0}),ie(d)!=="svelte-1qufua2"&&(d.innerHTML=b),R.forEach(k),X.forEach(k),E.forEach(k),T=I(w),g=p(w,"TBODY",{class:!0});var y=S(g);for(let V=0;V<U.length;V+=1)U[V].l(y);C=I(y),y.forEach(k),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(a,"colspan","4"),f(a,"class","svelte-1g5tt44"),f(N,"type","checkbox"),f(N,"class","svelte-1g5tt44"),f(d,"class","svelte-1g5tt44"),f(h,"class","svelte-1g5tt44"),f(m,"colspan","3"),f(m,"class","svelte-1g5tt44"),f(e,"class","separator svelte-1g5tt44"),f(g,"class","svelte-1g5tt44"),He(g,"collaps",t[18][t[58].sectionID])},m(w,E){J(w,e,E),o(e,l),o(l,r),o(e,s),o(e,a),o(a,u),o(e,i),o(e,m),o(m,h),o(h,N),N.checked=t[18][t[58].sectionID],o(h,v),o(h,d),J(w,T,E),J(w,g,E);for(let M=0;M<U.length;M+=1)U[M]&&U[M].m(g,null);o(g,C),D||(O=G(N,"change",z),D=!0)},p(w,E){if(t=w,E[0]&32&&c!==(c=t[58].sectionName+"")&&ge(u,c),E[0]&262176&&(N.checked=t[18][t[58].sectionID]),E[0]&271056929){F=De(t[58].params);let M;for(M=0;M<F.length;M+=1){const P=qt(t,F,M);U[M]?U[M].p(P,E):(U[M]=Jt(P),U[M].c(),U[M].m(g,C))}for(;M<U.length;M+=1)U[M].d(1);U.length=F.length}E[0]&262176&&He(g,"collaps",t[18][t[58].sectionID])},d(w){w&&(k(e),k(T),k(g)),Ke(U,w),D=!1,O()}}}function Sn(t){let e,l="Copy this URL and send it to your friends!",n,r,s;return{c(){e=_("p"),e.textContent=l,n=j(),r=_("p"),s=Y(t[15]),this.h()},l(a){e=p(a,"P",{"data-svelte-h":!0}),ie(e)!=="svelte-1kscrpk"&&(e.textContent=l),n=I(a),r=p(a,"P",{class:!0});var c=S(r);s=K(c,t[15]),c.forEach(k),this.h()},h(){f(r,"class","cUrl svelte-1g5tt44")},m(a,c){J(a,e,c),J(a,n,c),J(a,r,c),o(r,s)},p(a,c){c[0]&32768&&ge(s,a[15])},d(a){a&&(k(e),k(n),k(r))}}}function jn(t){let e,l,n;function r(a){t[45](a)}let s={pageName:t[0].partName};return t[14]!==void 0&&(s.storeName=t[14]),e=new dn({props:s}),Ie.push(()=>Ue(e,"storeName",r)),{c(){Ee(e.$$.fragment)},l(a){Le(e.$$.fragment,a)},m(a,c){Se(e,a,c),n=!0},p(a,c){const u={};c[0]&1&&(u.pageName=a[0].partName),!l&&c[0]&16384&&(l=!0,u.storeName=a[14],Ae(()=>l=!1)),e.$set(u)},i(a){n||(we(e.$$.fragment,a),n=!0)},o(a){Oe(e.$$.fragment,a),n=!1},d(a){je(e,a)}}}function In(t){let e,l,n="Parameters",r,s,a,c="Load Params from File",u,i,m,h,N="Set Params Default",v,d,b="Load Params from localStorage",T,g,C,D,O,z,F,U,w,E,M,P='<tr class="svelte-1g5tt44"><td class="svelte-1g5tt44">#</td> <td class="svelte-1g5tt44">Parameter name</td> <td class="svelte-1g5tt44">Value</td> <td class="svelte-1g5tt44">Unit</td> <td class="svelte-1g5tt44">Default</td> <td class="svelte-1g5tt44">Min</td> <td class="svelte-1g5tt44">Max</td> <td class="svelte-1g5tt44">Step</td></tr>',X,R,y,V,x="Comment:",Z,le,_e,ce,pe="Save Parameters to File",Ce,L,B="Save Parameters as URL",ne,q,fe="Save Parameters to localStorage",ee,ke,Te,ue,Q,oe,$,A,te,ae,de,ve,he,Be,xe,Je,pt,H,re,Ne,Re,We;function $e(W){t[33](W)}let rt={okName:"Overwrite Parameters",okFunc:t[24],$$slots:{default:[Tn]},$$scope:{ctx:t}};t[9]!==void 0&&(rt.modalOpen=t[9]),g=new gt({props:rt}),Ie.push(()=>Ue(g,"modalOpen",$e));function kt(W){t[35](W)}let it={okName:"Load Parameters",okFunc:t[25],$$slots:{default:[wn]},$$scope:{ctx:t}};t[10]!==void 0&&(it.modalOpen=t[10]),O=new gt({props:it}),Ie.push(()=>Ue(O,"modalOpen",kt));let et=De(t[5]),Pe=[];for(let W=0;W<et.length;W+=1)Pe[W]=Qt(Kt(t,et,W));function Lt(W){t[44](W)}let Xe={okName:"Done",okFunc:Pn,sizeLarge:!0,$$slots:{default:[Sn]},$$scope:{ctx:t}};t[11]!==void 0&&(Xe.modalOpen=t[11]),ke=new gt({props:Xe}),Ie.push(()=>Ue(ke,"modalOpen",Lt));function Nl(W){t[46](W)}let St={okName:"Save into localStorage",okFunc:t[26],$$slots:{default:[jn]},$$scope:{ctx:t}};t[12]!==void 0&&(St.modalOpen=t[12]),Q=new gt({props:St}),Ie.push(()=>Ue(Q,"modalOpen",Nl));function Tl(W){t[47](W)}let jt={svgPath:t[16]};return t[17]!==void 0&&(jt.modalOpen=t[17]),A=new gl({props:jt}),Ie.push(()=>Ue(A,"modalOpen",Tl)),Je=new Yt({props:{pageName:t[0].partName,fgeom:t[1],selFace:t[2],zAdjust:t[20],simTime:t[4]}}),re=new Yt({props:{pageName:t[0].partName,fgeom:t[1],selFace:t[2],zAdjust:t[3],simTime:t[4]}}),{c(){e=_("section"),l=_("h2"),l.textContent=n,r=j(),s=_("main"),a=_("label"),a.textContent=c,u=j(),i=_("input"),m=j(),h=_("button"),h.textContent=N,v=j(),d=_("button"),d.textContent=b,T=j(),Ee(g.$$.fragment),D=j(),Ee(O.$$.fragment),F=j(),U=_("textarea"),w=j(),E=_("table"),M=_("thead"),M.innerHTML=P,X=j();for(let W=0;W<Pe.length;W+=1)Pe[W].c();R=j(),y=_("div"),V=_("label"),V.textContent=x,Z=j(),le=_("input"),_e=j(),ce=_("button"),ce.textContent=pe,Ce=j(),L=_("button"),L.textContent=B,ne=j(),q=_("button"),q.textContent=fe,ee=j(),Ee(ke.$$.fragment),ue=j(),Ee(Q.$$.fragment),$=j(),Ee(A.$$.fragment),ae=j(),de=_("button"),ve=_("img"),Be=j(),xe=_("div"),Ee(Je.$$.fragment),pt=j(),H=_("div"),Ee(re.$$.fragment),this.h()},l(W){e=p(W,"SECTION",{class:!0});var se=S(e);l=p(se,"H2",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-1mc497a"&&(l.textContent=n),r=I(se),s=p(se,"MAIN",{class:!0});var me=S(s);a=p(me,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-zt7rok"&&(a.textContent=c),u=I(me),i=p(me,"INPUT",{id:!0,type:!0,accept:!0,class:!0}),m=I(me),h=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(h)!=="svelte-1typ5"&&(h.textContent=N),v=I(me),d=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(d)!=="svelte-187bpo6"&&(d.textContent=b),T=I(me),Le(g.$$.fragment,me),D=I(me),Le(O.$$.fragment,me),F=I(me),U=p(me,"TEXTAREA",{rows:!0,cols:!0,wrap:!0,class:!0}),S(U).forEach(k),w=I(me),E=p(me,"TABLE",{class:!0});var tt=S(E);M=p(tt,"THEAD",{class:!0,"data-svelte-h":!0}),ie(M)!=="svelte-1szl7uo"&&(M.innerHTML=P),X=I(tt);for(let Qe=0;Qe<Pe.length;Qe+=1)Pe[Qe].l(tt);tt.forEach(k),R=I(me),y=p(me,"DIV",{class:!0});var lt=S(y);V=p(lt,"LABEL",{for:!0,"data-svelte-h":!0}),ie(V)!=="svelte-gqskth"&&(V.textContent=x),Z=I(lt),le=p(lt,"INPUT",{type:!0,id:!0,maxlength:!0,size:!0}),lt.forEach(k),_e=I(me),ce=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(ce)!=="svelte-1ny58g0"&&(ce.textContent=pe),Ce=I(me),L=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(L)!=="svelte-11or0m2"&&(L.textContent=B),ne=I(me),q=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(q)!=="svelte-5zdtrl"&&(q.textContent=fe),ee=I(me),Le(ke.$$.fragment,me),ue=I(me),Le(Q.$$.fragment,me),me.forEach(k),$=I(se),Le(A.$$.fragment,se),ae=I(se),de=p(se,"BUTTON",{class:!0});var ut=S(de);ve=p(ut,"IMG",{src:!0,alt:!0,class:!0}),ut.forEach(k),Be=I(se),xe=p(se,"DIV",{class:!0});var mt=S(xe);Le(Je.$$.fragment,mt),mt.forEach(k),pt=I(se),H=p(se,"DIV",{class:!0});var nt=S(H);Le(re.$$.fragment,nt),nt.forEach(k),se.forEach(k),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(a,"for","loadFParams"),f(a,"class","fileUpload svelte-1g5tt44"),f(i,"id","loadFParams"),f(i,"type","file"),f(i,"accept","text/plain, application/json"),f(i,"class","svelte-1g5tt44"),f(h,"class","svelte-1g5tt44"),f(d,"class","svelte-1g5tt44"),f(U,"rows","3"),f(U,"cols","80"),U.readOnly=!0,f(U,"wrap","off"),U.value=t[7],f(U,"class","svelte-1g5tt44"),He(U,"colorWarn",t[8]),f(M,"class","svelte-1g5tt44"),f(E,"class","svelte-1g5tt44"),f(V,"for","inComment"),f(le,"type","text"),f(le,"id","inComment"),f(le,"maxlength","150"),f(le,"size","70"),f(y,"class","comment svelte-1g5tt44"),f(ce,"class","svelte-1g5tt44"),f(L,"class","svelte-1g5tt44"),f(q,"class","svelte-1g5tt44"),f(s,"class","svelte-1g5tt44"),ht(ve.src,he=t[16])||f(ve,"src",he),f(ve,"alt",t[16]),f(ve,"class","svelte-1g5tt44"),f(de,"class","side-img svelte-1g5tt44"),f(xe,"class","mini-canvas svelte-1g5tt44"),f(H,"class","mini-canvas svelte-1g5tt44"),f(e,"class","svelte-1g5tt44")},m(W,se){J(W,e,se),o(e,l),o(e,r),o(e,s),o(s,a),o(s,u),o(s,i),o(s,m),o(s,h),o(s,v),o(s,d),o(s,T),Se(g,s,null),o(s,D),Se(O,s,null),o(s,F),o(s,U),o(s,w),o(s,E),o(E,M),o(E,X);for(let me=0;me<Pe.length;me+=1)Pe[me]&&Pe[me].m(E,null);o(s,R),o(s,y),o(y,V),o(y,Z),o(y,le),be(le,t[6]),o(s,_e),o(s,ce),o(s,Ce),o(s,L),o(s,ne),o(s,q),o(s,ee),Se(ke,s,null),o(s,ue),Se(Q,s,null),o(e,$),Se(A,e,null),o(e,ae),o(e,de),o(de,ve),o(e,Be),o(e,xe),Se(Je,xe,null),o(e,pt),o(e,H),Se(re,H,null),Ne=!0,Re||(We=[G(i,"change",t[22]),G(h,"click",t[31]),G(d,"click",t[32]),G(le,"input",t[42]),G(ce,"click",t[23]),G(L,"click",t[27]),G(q,"click",t[43]),G(de,"click",t[29])],Re=!0)},p(W,se){const me={};se[2]&64&&(me.$$scope={dirty:se,ctx:W}),!C&&se[0]&512&&(C=!0,me.modalOpen=W[9],Ae(()=>C=!1)),g.$set(me);const tt={};if(se[0]&8193|se[2]&64&&(tt.$$scope={dirty:se,ctx:W}),!z&&se[0]&1024&&(z=!0,tt.modalOpen=W[10],Ae(()=>z=!1)),O.$set(tt),(!Ne||se[0]&128)&&(U.value=W[7]),(!Ne||se[0]&256)&&He(U,"colorWarn",W[8]),se[0]&271319073){et=De(W[5]);let Ye;for(Ye=0;Ye<et.length;Ye+=1){const It=Kt(W,et,Ye);Pe[Ye]?Pe[Ye].p(It,se):(Pe[Ye]=Qt(It),Pe[Ye].c(),Pe[Ye].m(E,null))}for(;Ye<Pe.length;Ye+=1)Pe[Ye].d(1);Pe.length=et.length}se[0]&64&&le.value!==W[6]&&be(le,W[6]);const lt={};se[0]&32768|se[2]&64&&(lt.$$scope={dirty:se,ctx:W}),!Te&&se[0]&2048&&(Te=!0,lt.modalOpen=W[11],Ae(()=>Te=!1)),ke.$set(lt);const ut={};se[0]&16385|se[2]&64&&(ut.$$scope={dirty:se,ctx:W}),!oe&&se[0]&4096&&(oe=!0,ut.modalOpen=W[12],Ae(()=>oe=!1)),Q.$set(ut);const mt={};se[0]&65536&&(mt.svgPath=W[16]),!te&&se[0]&131072&&(te=!0,mt.modalOpen=W[17],Ae(()=>te=!1)),A.$set(mt),(!Ne||se[0]&65536&&!ht(ve.src,he=W[16]))&&f(ve,"src",he),(!Ne||se[0]&65536)&&f(ve,"alt",W[16]);const nt={};se[0]&1&&(nt.pageName=W[0].partName),se[0]&2&&(nt.fgeom=W[1]),se[0]&4&&(nt.selFace=W[2]),se[0]&16&&(nt.simTime=W[4]),Je.$set(nt);const Qe={};se[0]&1&&(Qe.pageName=W[0].partName),se[0]&2&&(Qe.fgeom=W[1]),se[0]&4&&(Qe.selFace=W[2]),se[0]&8&&(Qe.zAdjust=W[3]),se[0]&16&&(Qe.simTime=W[4]),re.$set(Qe)},i(W){Ne||(we(g.$$.fragment,W),we(O.$$.fragment,W),we(ke.$$.fragment,W),we(Q.$$.fragment,W),we(A.$$.fragment,W),we(Je.$$.fragment,W),we(re.$$.fragment,W),Ne=!0)},o(W){Oe(g.$$.fragment,W),Oe(O.$$.fragment,W),Oe(ke.$$.fragment,W),Oe(Q.$$.fragment,W),Oe(A.$$.fragment,W),Oe(Je.$$.fragment,W),Oe(re.$$.fragment,W),Ne=!1},d(W){W&&k(e),je(g),je(O),Ke(Pe,W),je(ke),je(Q),je(A),je(Je),je(re),Re=!1,qe(We)}}}function Pn(){}function An(t){const e={};for(const l of t)e[l.sectionID]=l.sectionVisible;return e}function Un(t,e,l){let n,r;at(t,Ze,H=>l(19,n=H)),at(t,ql,H=>l(48,r=H));const s=ml();let{pDef:a}=e,{fgeom:c}=e,{selFace:u}=e,{zAdjust:i}=e,{simTime:m=0}=e;const h=_l();let N="";function v(){s("paramChg",{foo:"bla"})}function d(H,re){let Ne="",Re=!1;H!==a.partName&&(Ne+=`warn361: read partName: '${H}' expected partName: '${a.partName}'
1
+ import{a as Pt,b as wl}from"../chunks/makeList.C3agm0IL.js";import{H as Cl,w as ul,g as Ol}from"../chunks/entry.D_exCd0f.js";import{Q as Dl,s as Me,p as st,i as J,n as ze,f as k,e as _,c as p,b as S,R as ht,m as f,h as o,S as G,v as Ie,a as j,g as I,T as Ae,o as Ke,y as El,t as Y,l as ie,d as K,U as He,z as Ll,A as Sl,B as jl,j as ge,C as qe,V as be,k as at,r as Et,W as ml,X as _t,Y as Ct,Z as Il,H as bt,_ as ot,$ as Pl,a0 as Al}from"../chunks/scheduler.2BOoCPD3.js";import{S as ye,i as Fe,f as Ue,b as Ee,d as Le,m as Se,a as we,t as Oe,e as je,g as Ul,c as zl}from"../chunks/index.RMmEH_Pi.js";import{e as De,D as Ml,F as dl,G as yl,H as hl,I as _l,P as wt,J as Fl,K as Nt,L as ct,M as Bl,N as Rl,O as Ot,Q as Hl,R as At,f as dt,r as Dt,T as Ge,U as Vl,V as Wl,W as Xl,X as Yl,Y as Kl}from"../chunks/index.7KyUWpqJ.js";import{b as vt}from"../chunks/paths.CnG5LrC8.js";import{p as ql}from"../chunks/stores.BdytS9Df.js";function Gl(t,e){throw new Cl(t,e)}new TextEncoder;function Zl({params:t}){const e=t.design;if(Object.keys(Pt).includes(e))return{pageDef:Pt[e],allLink:wl};Gl(404,"Design undefined!")}const vs=Object.freeze(Object.defineProperty({__proto__:null,load:Zl},Symbol.toStringTag,{value:"Module"})),Ze=ul({});function pl(t,e,l){const n=Dl(Ze);if(Object.keys(n).includes(t)){const s=n[t],a=Object.keys(s);for(const c of Object.keys(e))a.includes(c)?l&&(s[c]=e[c]):s[c]=e[c];n[t]=s}else n[t]=e;Ze.set(n)}function Jl(t){const e=t.pDef.partName,l={};for(const n of t.pDef.params)l[n.name]=n.init;pl(e,l,!1)}function Ut(t){let e,l,n,r,s,a,c;return{c(){e=_("aside"),l=_("div"),n=_("button"),r=_("img"),this.h()},l(u){e=p(u,"ASIDE",{class:!0});var i=S(e);l=p(i,"DIV",{class:!0});var m=S(l);n=p(m,"BUTTON",{class:!0});var h=S(n);r=p(h,"IMG",{src:!0,alt:!0}),h.forEach(k),m.forEach(k),i.forEach(k),this.h()},h(){ht(r.src,s=t[1])||f(r,"src",s),f(r,"alt",t[1]),f(n,"class","svelte-sjxf1e"),f(l,"class","dialog svelte-sjxf1e"),f(e,"class","backdrop svelte-sjxf1e")},m(u,i){J(u,e,i),o(e,l),o(l,n),o(n,r),a||(c=G(n,"click",t[2]),a=!0)},p(u,i){i&2&&!ht(r.src,s=u[1])&&f(r,"src",s),i&2&&f(r,"alt",u[1])},d(u){u&&k(e),a=!1,c()}}}function Ql(t){let e,l=t[0]&&Ut(t);return{c(){l&&l.c(),e=st()},l(n){l&&l.l(n),e=st()},m(n,r){l&&l.m(n,r),J(n,e,r)},p(n,[r]){n[0]?l?l.p(n,r):(l=Ut(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:ze,o:ze,d(n){n&&k(e),l&&l.d(n)}}}function $l(t,e,l){let{svgPath:n}=e,{modalOpen:r}=e;function s(){l(0,r=!1)}return t.$$set=a=>{"svgPath"in a&&l(1,n=a.svgPath),"modalOpen"in a&&l(0,r=a.modalOpen)},[r,n,s]}class gl extends ye{constructor(e){super(),Fe(this,e,$l,Ql,Me,{svgPath:1,modalOpen:0})}}function zt(t,e,l){const n=t.slice();return n[8]=e[l],n}function Mt(t){let e,l,n,r,s,a,c;function u(){return t[6](t[8])}return{c(){e=_("button"),l=_("img"),s=j(),this.h()},l(i){e=p(i,"BUTTON",{class:!0});var m=S(e);l=p(m,"IMG",{src:!0,alt:!0,class:!0}),s=I(m),m.forEach(k),this.h()},h(){ht(l.src,n=t[8])||f(l,"src",n),f(l,"alt",r=t[8]),f(l,"class","svelte-fxmnfh"),f(e,"class","svelte-fxmnfh")},m(i,m){J(i,e,m),o(e,l),o(e,s),a||(c=G(e,"click",u),a=!0)},p(i,m){t=i,m&1&&!ht(l.src,n=t[8])&&f(l,"src",n),m&1&&r!==(r=t[8])&&f(l,"alt",r)},d(i){i&&k(e),a=!1,c()}}}function xl(t){let e,l,n,r,s;function a(m){t[5](m)}let c={svgPath:t[2]};t[1]!==void 0&&(c.modalOpen=t[1]),l=new gl({props:c}),Ie.push(()=>Ue(l,"modalOpen",a));let u=De(t[0]),i=[];for(let m=0;m<u.length;m+=1)i[m]=Mt(zt(t,u,m));return{c(){e=_("section"),Ee(l.$$.fragment),r=j();for(let m=0;m<i.length;m+=1)i[m].c();this.h()},l(m){e=p(m,"SECTION",{class:!0});var h=S(e);Le(l.$$.fragment,h),r=I(h);for(let N=0;N<i.length;N+=1)i[N].l(h);h.forEach(k),this.h()},h(){f(e,"class","svelte-fxmnfh")},m(m,h){J(m,e,h),Se(l,e,null),o(e,r);for(let N=0;N<i.length;N+=1)i[N]&&i[N].m(e,null);s=!0},p(m,[h]){const N={};if(h&4&&(N.svgPath=m[2]),!n&&h&2&&(n=!0,N.modalOpen=m[1],Ae(()=>n=!1)),l.$set(N),h&9){u=De(m[0]);let v;for(v=0;v<u.length;v+=1){const d=zt(m,u,v);i[v]?i[v].p(d,h):(i[v]=Mt(d),i[v].c(),i[v].m(e,null))}for(;v<i.length;v+=1)i[v].d(1);i.length=u.length}},i(m){s||(we(l.$$.fragment,m),s=!0)},o(m){Oe(l.$$.fragment,m),s=!1},d(m){m&&k(e),je(l),Ke(i,m)}}}function en(t){const e=[];for(const l of Object.values(t.paramSvg))e.includes(l)||e.push(l);return e}function tn(t,e,l){let{pDef:n}=e;function r(h){const N=en(n),v=[];for(const d of N)v.push(`${vt}/pgdsvg/${d}`);return v}let s=[],a=!1,c;function u(h){l(2,c=h),l(1,a=!0)}function i(h){a=h,l(1,a)}const m=h=>u(h);return t.$$set=h=>{"pDef"in h&&l(4,n=h.pDef)},t.$$.update=()=>{t.$$.dirty&16&&l(0,s=r(n.partName))},[s,a,c,u,n,i,m]}class ln extends ye{constructor(e){super(),Fe(this,e,tn,xl,Me,{pDef:4})}}function yt(t){let e,l,n,r,s,a,c="Cancel",u,i,m,h,N,v;const d=t[7].default,b=El(d,t,t[6],null);return{c(){e=_("aside"),l=_("div"),n=_("article"),b&&b.c(),r=j(),s=_("footer"),a=_("button"),a.textContent=c,u=j(),i=_("button"),m=Y(t[1]),this.h()},l(T){e=p(T,"ASIDE",{class:!0});var g=S(e);l=p(g,"DIV",{class:!0});var C=S(l);n=p(C,"ARTICLE",{class:!0});var D=S(n);b&&b.l(D),D.forEach(k),r=I(C),s=p(C,"FOOTER",{class:!0});var O=S(s);a=p(O,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-hcvk9s"&&(a.textContent=c),u=I(O),i=p(O,"BUTTON",{class:!0});var z=S(i);m=K(z,t[1]),z.forEach(k),O.forEach(k),C.forEach(k),g.forEach(k),this.h()},h(){f(n,"class","question svelte-weruk7"),f(a,"class","cancel svelte-weruk7"),f(i,"class","ok svelte-weruk7"),f(s,"class","svelte-weruk7"),f(l,"class","dialog svelte-weruk7"),He(l,"sizeLarge",t[2]),f(e,"class","backdrop svelte-weruk7")},m(T,g){J(T,e,g),o(e,l),o(l,n),b&&b.m(n,null),o(l,r),o(l,s),o(s,a),o(s,u),o(s,i),o(i,m),h=!0,N||(v=[G(a,"click",t[3]),G(i,"click",t[4])],N=!0)},p(T,g){b&&b.p&&(!h||g&64)&&Ll(b,d,T,T[6],h?jl(d,T[6],g,null):Sl(T[6]),null),(!h||g&2)&&ge(m,T[1]),(!h||g&4)&&He(l,"sizeLarge",T[2])},i(T){h||(we(b,T),h=!0)},o(T){Oe(b,T),h=!1},d(T){T&&k(e),b&&b.d(T),N=!1,qe(v)}}}function nn(t){let e,l,n=t[0]&&yt(t);return{c(){n&&n.c(),e=st()},l(r){n&&n.l(r),e=st()},m(r,s){n&&n.m(r,s),J(r,e,s),l=!0},p(r,[s]){r[0]?n?(n.p(r,s),s&1&&we(n,1)):(n=yt(r),n.c(),we(n,1),n.m(e.parentNode,e)):n&&(Ul(),Oe(n,1,1,()=>{n=null}),zl())},i(r){l||(we(n),l=!0)},o(r){Oe(n),l=!1},d(r){r&&k(e),n&&n.d(r)}}}function sn(t,e,l){let{$$slots:n={},$$scope:r}=e,{okName:s="Ok"}=e,{okFunc:a}=e,{modalOpen:c}=e,{sizeLarge:u=!1}=e;function i(){l(0,c=!1)}function m(){a(),l(0,c=!1)}return t.$$set=h=>{"okName"in h&&l(1,s=h.okName),"okFunc"in h&&l(5,a=h.okFunc),"modalOpen"in h&&l(0,c=h.modalOpen),"sizeLarge"in h&&l(2,u=h.sizeLarge),"$$scope"in h&&l(6,r=h.$$scope)},[c,s,u,i,m,a,r,n]}class gt extends ye{constructor(e){super(),Fe(this,e,sn,nn,Me,{okName:1,okFunc:5,modalOpen:0,sizeLarge:2})}}function Ft(t,e,l){const n=t.slice();return n[17]=e[l],n[18]=e,n[19]=l,n}function Bt(t,e,l){const n=t.slice();return n[17]=e[l],n}function Rt(t){let e,l=t[17]+"",n;return{c(){e=_("p"),n=Y(l),this.h()},l(r){e=p(r,"P",{class:!0});var s=S(e);n=K(s,l),s.forEach(k),this.h()},h(){f(e,"class","diagItem svelte-12dj9tj")},m(r,s){J(r,e,s),o(e,n)},p(r,s){s&1&&l!==(l=r[17]+"")&&ge(n,l)},d(r){r&&k(e)}}}function Ht(t){let e,l=t[3][t[17]]&&Rt(t);return{c(){l&&l.c(),e=st()},l(n){l&&l.l(n),e=st()},m(n,r){l&&l.m(n,r),J(n,e,r)},p(n,r){n[3][n[17]]?l?l.p(n,r):(l=Rt(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(n){n&&k(e),l&&l.d(n)}}}function an(t){let e,l="Do you really want to delete the following localStorage keys?",n,r,s=De(t[0]),a=[];for(let c=0;c<s.length;c+=1)a[c]=Ht(Bt(t,s,c));return{c(){e=_("p"),e.textContent=l,n=j();for(let c=0;c<a.length;c+=1)a[c].c();r=st(),this.h()},l(c){e=p(c,"P",{class:!0,"data-svelte-h":!0}),ie(e)!=="svelte-12r0p0q"&&(e.textContent=l),n=I(c);for(let u=0;u<a.length;u+=1)a[u].l(c);r=st(),this.h()},h(){f(e,"class","diagTitle svelte-12dj9tj")},m(c,u){J(c,e,u),J(c,n,u);for(let i=0;i<a.length;i+=1)a[i]&&a[i].m(c,u);J(c,r,u)},p(c,u){if(u&9){s=De(c[0]);let i;for(i=0;i<s.length;i+=1){const m=Bt(c,s,i);a[i]?a[i].p(m,u):(a[i]=Ht(m),a[i].c(),a[i].m(r.parentNode,r))}for(;i<a.length;i+=1)a[i].d(1);a.length=s.length}},d(c){c&&(k(e),k(n),k(r)),Ke(a,c)}}}function Vt(t){let e,l,n,r,s,a,c=t[17]+"",u,i,m,h=t[2][t[17]]+"",N,v,d,b;function T(){t[12].call(n,t[17])}function g(){return t[13](t[17])}return{c(){e=_("tr"),l=_("td"),n=_("input"),r=j(),s=_("td"),a=_("button"),u=Y(c),i=j(),m=_("td"),N=Y(h),v=j(),this.h()},l(C){e=p(C,"TR",{class:!0});var D=S(e);l=p(D,"TD",{});var O=S(l);n=p(O,"INPUT",{type:!0}),O.forEach(k),r=I(D),s=p(D,"TD",{class:!0});var z=S(s);a=p(z,"BUTTON",{class:!0});var F=S(a);u=K(F,c),F.forEach(k),z.forEach(k),i=I(D),m=p(D,"TD",{});var U=S(m);N=K(U,h),U.forEach(k),v=I(D),D.forEach(k),this.h()},h(){f(n,"type","checkbox"),f(a,"class","svelte-12dj9tj"),f(s,"class","svelte-12dj9tj"),f(e,"class","svelte-12dj9tj")},m(C,D){J(C,e,D),o(e,l),o(l,n),n.checked=t[3][t[17]],o(e,r),o(e,s),o(s,a),o(a,u),o(e,i),o(e,m),o(m,N),o(e,v),d||(b=[G(n,"change",T),G(a,"click",g)],d=!0)},p(C,D){t=C,D&9&&(n.checked=t[3][t[17]]),D&1&&c!==(c=t[17]+"")&&ge(u,c),D&5&&h!==(h=t[2][t[17]]+"")&&ge(N,h)},d(C){C&&k(e),d=!1,qe(b)}}}function on(t){let e,l,n="Delete",r,s,a,c,u,i,m,h="<td>Delete</td> <td>Key name</td> <td>Last modification</td>",N,v,d,b,T,g,C="delete all",D,O,z,F,U,w,E;function M(y){t[10](y)}let P={okName:"Confirm",okFunc:t[6],$$slots:{default:[an]},$$scope:{ctx:t}};t[4]!==void 0&&(P.modalOpen=t[4]),s=new gt({props:P}),Ie.push(()=>Ue(s,"modalOpen",M));let X=De(t[0]),R=[];for(let y=0;y<X.length;y+=1)R[y]=Vt(Ft(t,X,y));return{c(){e=_("div"),l=_("button"),l.textContent=n,r=j(),Ee(s.$$.fragment),c=j(),u=_("table"),i=_("thead"),m=_("tr"),m.innerHTML=h,N=j(),v=_("tr"),d=_("td"),b=_("input"),T=j(),g=_("td"),g.textContent=C,D=j(),O=_("td"),z=j(),F=_("tbody");for(let y=0;y<R.length;y+=1)R[y].c();this.h()},l(y){e=p(y,"DIV",{class:!0});var V=S(e);l=p(V,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-1tbm4xl"&&(l.textContent=n),r=I(V),Le(s.$$.fragment,V),c=I(V),u=p(V,"TABLE",{class:!0});var x=S(u);i=p(x,"THEAD",{class:!0});var Z=S(i);m=p(Z,"TR",{"data-svelte-h":!0}),ie(m)!=="svelte-xt53kn"&&(m.innerHTML=h),N=I(Z),v=p(Z,"TR",{});var le=S(v);d=p(le,"TD",{});var _e=S(d);b=p(_e,"INPUT",{type:!0}),_e.forEach(k),T=I(le),g=p(le,"TD",{class:!0,"data-svelte-h":!0}),ie(g)!=="svelte-1s4wssd"&&(g.textContent=C),D=I(le),O=p(le,"TD",{}),S(O).forEach(k),le.forEach(k),Z.forEach(k),z=I(x),F=p(x,"TBODY",{class:!0});var ce=S(F);for(let pe=0;pe<R.length;pe+=1)R[pe].l(ce);ce.forEach(k),x.forEach(k),V.forEach(k),this.h()},h(){f(l,"class","svelte-12dj9tj"),f(b,"type","checkbox"),f(g,"class","instruction"),f(i,"class","svelte-12dj9tj"),f(F,"class","svelte-12dj9tj"),f(u,"class","svelte-12dj9tj"),f(e,"class","deleteKeys svelte-12dj9tj")},m(y,V){J(y,e,V),o(e,l),o(e,r),Se(s,e,null),o(e,c),o(e,u),o(u,i),o(i,m),o(i,N),o(i,v),o(v,d),o(d,b),b.checked=t[1],o(v,T),o(v,g),o(v,D),o(v,O),o(u,z),o(u,F);for(let x=0;x<R.length;x+=1)R[x]&&R[x].m(F,null);U=!0,w||(E=[G(l,"click",t[9]),G(b,"change",t[11])],w=!0)},p(y,[V]){const x={};if(V&4194313&&(x.$$scope={dirty:V,ctx:y}),!a&&V&16&&(a=!0,x.modalOpen=y[4],Ae(()=>a=!1)),s.$set(x),V&2&&(b.checked=y[1]),V&45){X=De(y[0]);let Z;for(Z=0;Z<X.length;Z+=1){const le=Ft(y,X,Z);R[Z]?R[Z].p(le,V):(R[Z]=Vt(le),R[Z].c(),R[Z].m(F,null))}for(;Z<R.length;Z+=1)R[Z].d(1);R.length=X.length}},i(y){U||(we(s.$$.fragment,y),U=!0)},o(y){Oe(s.$$.fragment,y),U=!1},d(y){y&&k(e),je(s),Ke(R,y),w=!1,qe(E)}}}function rn(t){let e={};for(const l of t)e[l]=!1;return e}function cn(t,e,l){let{pageName:n}=e,{storeName:r}=e,{localKeys:s}=e;function a(){let O=[];const z=new RegExp(`^${n}_`);return O=Object.keys(window.localStorage).filter(U=>z.test(U)).map(U=>U.replace(z,"")),O}s=a();function c(O){l(7,r=O)}let u={};function i(O){let z={};for(const F of O){let U="";const w=`${n}_${F}`,E=window.localStorage.getItem(w);E!==null&&(U=JSON.parse(E).lastModif),z[F]=U}return z}u=i(s);let m={};m=rn(s);let h=!1;function N(O){for(const z of s)l(3,m[z]=O,m)}function v(){for(const O of s)if(m[O]){const z=`${n}_${O}`;window.localStorage.removeItem(z)}l(0,s=a())}let d=!1;const b=()=>{l(4,d=!0)};function T(O){d=O,l(4,d)}function g(){h=this.checked,l(1,h)}function C(O){m[O]=this.checked,l(3,m)}const D=O=>c(O);return t.$$set=O=>{"pageName"in O&&l(8,n=O.pageName),"storeName"in O&&l(7,r=O.storeName),"localKeys"in O&&l(0,s=O.localKeys)},t.$$.update=()=>{t.$$.dirty&2&&N(h)},[s,h,u,m,d,c,v,r,n,b,T,g,C,D]}class vl extends ye{constructor(e){super(),Fe(this,e,cn,on,Me,{pageName:8,storeName:7,localKeys:0})}}function Wt(t){let e,l,n,r;return{c(){e=_("p"),l=Y("Warning: name "),n=Y(t[0]),r=Y(" already used"),this.h()},l(s){e=p(s,"P",{class:!0});var a=S(e);l=K(a,"Warning: name "),n=K(a,t[0]),r=K(a," already used"),a.forEach(k),this.h()},h(){f(e,"class","warnMsg svelte-1rkdwo")},m(s,a){J(s,e,a),o(e,l),o(e,n),o(e,r)},p(s,a){a&1&&ge(n,s[0])},d(s){s&&k(e)}}}function fn(t){let e,l,n,r,s,a,c="Give a name to your parameter-set:",u,i,m,h,N,v;function d(C){t[5](C)}function b(C){t[6](C)}let T={pageName:t[1]};t[0]!==void 0&&(T.storeName=t[0]),t[2]!==void 0&&(T.localKeys=t[2]),e=new vl({props:T}),Ie.push(()=>Ue(e,"storeName",d)),Ie.push(()=>Ue(e,"localKeys",b));let g=t[3]&&Wt(t);return{c(){Ee(e.$$.fragment),r=j(),s=_("div"),a=_("label"),a.textContent=c,u=j(),i=_("input"),m=j(),g&&g.c(),this.h()},l(C){Le(e.$$.fragment,C),r=I(C),s=p(C,"DIV",{class:!0});var D=S(s);a=p(D,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-1vdq35w"&&(a.textContent=c),u=I(D),i=p(D,"INPUT",{type:!0,id:!0,minlength:!0,maxlength:!0,size:!0,class:!0}),m=I(D),g&&g.l(D),D.forEach(k),this.h()},h(){f(a,"for","storName"),f(a,"class","svelte-1rkdwo"),f(i,"type","text"),f(i,"id","storName"),i.required=!0,f(i,"minlength","4"),f(i,"maxlength","30"),f(i,"size","32"),f(i,"class","svelte-1rkdwo"),f(s,"class","svelte-1rkdwo")},m(C,D){Se(e,C,D),J(C,r,D),J(C,s,D),o(s,a),o(s,u),o(s,i),be(i,t[0]),o(s,m),g&&g.m(s,null),h=!0,N||(v=[G(i,"input",t[7]),G(i,"input",t[4])],N=!0)},p(C,[D]){const O={};D&2&&(O.pageName=C[1]),!l&&D&1&&(l=!0,O.storeName=C[0],Ae(()=>l=!1)),!n&&D&4&&(n=!0,O.localKeys=C[2],Ae(()=>n=!1)),e.$set(O),D&1&&i.value!==C[0]&&be(i,C[0]),C[3]?g?g.p(C,D):(g=Wt(C),g.c(),g.m(s,null)):g&&(g.d(1),g=null)},i(C){h||(we(e.$$.fragment,C),h=!0)},o(C){Oe(e.$$.fragment,C),h=!1},d(C){C&&(k(r),k(s)),je(e,C),g&&g.d(),N=!1,qe(v)}}}function un(t){const e=/[-:]/g,l=/\..*$/;return`${t}_${new Date().toISOString().replace(e,"").replace(l,"").replace("T","_")}`}function mn(t,e,l){let{pageName:n}=e,{storeName:r}=e,s=[];r=un(n);let a=!1;function c(N){l(3,a=s.includes(N))}function u(N){const v=N.target.value;c(v)}function i(N){r=N,l(0,r)}function m(N){s=N,l(2,s)}function h(){r=this.value,l(0,r)}return t.$$set=N=>{"pageName"in N&&l(1,n=N.pageName),"storeName"in N&&l(0,r=N.storeName)},t.$$.update=()=>{t.$$.dirty&1&&c(r)},[r,n,s,a,u,i,m,h]}class dn extends ye{constructor(e){super(),Fe(this,e,mn,fn,Me,{pageName:1,storeName:0})}}function hn(t){let e,l,n,r,s,a,c="Select a parameter-set:",u,i,m;function h(d){t[3](d)}function N(d){t[4](d)}let v={pageName:t[1]};return t[0]!==void 0&&(v.storeName=t[0]),t[2]!==void 0&&(v.localKeys=t[2]),e=new vl({props:v}),Ie.push(()=>Ue(e,"storeName",h)),Ie.push(()=>Ue(e,"localKeys",N)),{c(){Ee(e.$$.fragment),r=j(),s=_("div"),a=_("label"),a.textContent=c,u=j(),i=_("input"),this.h()},l(d){Le(e.$$.fragment,d),r=I(d),s=p(d,"DIV",{class:!0});var b=S(s);a=p(b,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-rajgc0"&&(a.textContent=c),u=I(b),i=p(b,"INPUT",{type:!0,id:!0,minlength:!0,maxlength:!0,size:!0,class:!0}),b.forEach(k),this.h()},h(){f(a,"for","storName"),f(a,"class","svelte-1ozd0ey"),f(i,"type","text"),f(i,"id","storName"),i.value=t[0],i.readOnly=!0,f(i,"minlength","4"),f(i,"maxlength","30"),f(i,"size","32"),f(i,"class","svelte-1ozd0ey"),f(s,"class","svelte-1ozd0ey")},m(d,b){Se(e,d,b),J(d,r,b),J(d,s,b),o(s,a),o(s,u),o(s,i),m=!0},p(d,[b]){const T={};b&2&&(T.pageName=d[1]),!l&&b&1&&(l=!0,T.storeName=d[0],Ae(()=>l=!1)),!n&&b&4&&(n=!0,T.localKeys=d[2],Ae(()=>n=!1)),e.$set(T),(!m||b&1&&i.value!==d[0])&&(i.value=d[0])},i(d){m||(we(e.$$.fragment,d),m=!0)},o(d){Oe(e.$$.fragment,d),m=!1},d(d){d&&(k(r),k(s)),je(e,d)}}}function _n(t,e,l){let{pageName:n}=e,{storeName:r}=e,s=[];function a(i){let m=r;return!i.includes(m)&&(i.length>0?m=i[0]:m=""),m}function c(i){r=i,l(0,r),l(2,s)}function u(i){s=i,l(2,s)}return t.$$set=i=>{"pageName"in i&&l(1,n=i.pageName),"storeName"in i&&l(0,r=i.storeName)},t.$$.update=()=>{t.$$.dirty&4&&l(0,r=a(s))},[r,n,s,c,u]}class pn extends ye{constructor(e){super(),Fe(this,e,_n,hn,Me,{pageName:1,storeName:0})}}const Ve=ul(Ml());function gn(t){let e;return{c(){e=_("canvas"),this.h()},l(l){e=p(l,"CANVAS",{class:!0,width:!0,height:!0}),S(e).forEach(k),this.h()},h(){f(e,"class","mini svelte-z8e4tz"),f(e,"width",Xt),f(e,"height",Xt)},m(l,n){J(l,e,n),t[9](e)},p:ze,i:ze,o:ze,d(l){l&&k(e),t[9](null)}}}const Xt=200;function vn(t,e,l){let n,r;at(t,Ve,T=>l(7,n=T)),at(t,Ze,T=>l(8,r=T));let{pageName:s}=e,{fgeom:a}=e,{selFace:c}=e,{zAdjust:u}=e,{simTime:i=0}=e,m,h;function N(T,g){const C=yl(g);C.ruler=!1;const D=m.getContext("2d");D.clearRect(0,0,D.canvas.width,D.canvas.height);try{u.init===0?h=T.getAdjustFull(D.canvas.width,D.canvas.height):h=u,T.draw(D,h,C)}catch(O){console.log(O)}}let v=0;function d(T,g,C,D){const O=a(T,g).fig;if(Object.keys(O).includes(C)){const z=O[C];N(z,D)}else{const z=dl(O);N(z,D)}}Et(()=>{d(i,r[s],c,n),l(6,v=1)});function b(T){Ie[T?"unshift":"push"](()=>{m=T,l(0,m)})}return t.$$set=T=>{"pageName"in T&&l(1,s=T.pageName),"fgeom"in T&&l(2,a=T.fgeom),"selFace"in T&&l(3,c=T.selFace),"zAdjust"in T&&l(4,u=T.zAdjust),"simTime"in T&&l(5,i=T.simTime)},t.$$.update=()=>{t.$$.dirty&490&&v===1&&d(i,r[s],c,n)},[m,s,a,c,u,i,v,n,r,b]}class Yt extends ye{constructor(e){super(),Fe(this,e,vn,gn,Me,{pageName:1,fgeom:2,selFace:3,zAdjust:4,simTime:5})}}function bn(t,e){const l=document.createElement("a");l.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),l.setAttribute("download",t),l.click(),l.remove()}function bl(t,e,l){const n=/[-:]/g,r=/\..*$/,s=new Date().toISOString().replace(n,"").replace(r,"").replace("T","_"),a=`px_${t}_${s}.json`,c=hl(s,t,e,l);bn(a,c)}function kn(t,e,l){const n=new URL(t),r=2e3;let s=n.toString().length;for(const a of Object.keys(e)){const c=e[a].toString(),u=2+a.length+c.length;n.searchParams.append(encodeURIComponent(a),encodeURIComponent(c)),s+=u}return s>=r&&console.log(`warn547: generateUrl: strLength ${s} larger than strLengthLimit ${r}`),n.toString()}function Kt(t,e,l){const n=t.slice();return n[58]=e[l],n[59]=e,n[60]=l,n}function qt(t,e,l){const n=t.slice();return n[61]=e[l],n[62]=e,n[63]=l,n}function Gt(t,e,l){const n=t.slice();return n[64]=e[l],n[66]=l,n}function Nn(t,e,l){const n=t.slice();return n[64]=e[l],n[66]=l,n}function Tn(t){let e;return{c(){e=Y("Load the default parameters ?")},l(l){e=K(l,"Load the default parameters ?")},m(l,n){J(l,e,n)},d(l){l&&k(e)}}}function wn(t){let e,l,n;function r(a){t[34](a)}let s={pageName:t[0].partName};return t[13]!==void 0&&(s.storeName=t[13]),e=new pn({props:s}),Ie.push(()=>Ue(e,"storeName",r)),{c(){Ee(e.$$.fragment)},l(a){Le(e.$$.fragment,a)},m(a,c){Se(e,a,c),n=!0},p(a,c){const u={};c[0]&1&&(u.pageName=a[0].partName),!l&&c[0]&8192&&(l=!0,u.storeName=a[13],Ae(()=>l=!1)),e.$set(u)},i(a){n||(we(e.$$.fragment,a),n=!0)},o(a){Oe(e.$$.fragment,a),n=!1},d(a){je(e,a)}}}function Cn(t){let e;return{c(){e=Y("unknown")},l(l){e=K(l,"unknown")},m(l,n){J(l,e,n)},p:ze,d(l){l&&k(e)}}}function On(t){let e,l,n,r=De(t[61].dropdown),s=[];for(let c=0;c<r.length;c+=1)s[c]=Zt(Gt(t,r,c));function a(){t[41].call(e,t[61])}return{c(){e=_("select");for(let c=0;c<s.length;c+=1)s[c].c();this.h()},l(c){e=p(c,"SELECT",{});var u=S(e);for(let i=0;i<s.length;i+=1)s[i].l(u);u.forEach(k),this.h()},h(){t[19][t[0].partName][t[61].name]===void 0&&bt(a)},m(c,u){J(c,e,u);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(e,null);ot(e,t[19][t[0].partName][t[61].name],!0),l||(n=G(e,"change",a),l=!0)},p(c,u){if(t=c,u[0]&32){r=De(t[61].dropdown);let i;for(i=0;i<r.length;i+=1){const m=Gt(t,r,i);s[i]?s[i].p(m,u):(s[i]=Zt(m),s[i].c(),s[i].m(e,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}u[0]&524321&&ot(e,t[19][t[0].partName][t[61].name])},d(c){c&&k(e),Ke(s,c),l=!1,n()}}}function Dn(t){let e,l,n,r=De(["Off","On"]),s=[];for(let c=0;c<2;c+=1)s[c]=Ln(Nn(t,r,c));function a(){t[40].call(e,t[61])}return{c(){e=_("select");for(let c=0;c<2;c+=1)s[c].c();this.h()},l(c){e=p(c,"SELECT",{});var u=S(e);for(let i=0;i<2;i+=1)s[i].l(u);u.forEach(k),this.h()},h(){t[19][t[0].partName][t[61].name]===void 0&&bt(a)},m(c,u){J(c,e,u);for(let i=0;i<2;i+=1)s[i]&&s[i].m(e,null);ot(e,t[19][t[0].partName][t[61].name],!0),l||(n=G(e,"change",a),l=!0)},p(c,u){t=c,u[0]&524321&&ot(e,t[19][t[0].partName][t[61].name])},d(c){c&&k(e),Ke(s,c),l=!1,n()}}}function En(t){let e,l,n,r,s,a,c,u,i,m,h;function N(){t[38].call(e,t[61])}function v(){t[39].call(a,t[61])}return{c(){e=_("input"),s=j(),a=_("input"),this.h()},l(d){e=p(d,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),s=I(d),a=p(d,"INPUT",{type:!0,min:!0,max:!0,step:!0,class:!0}),this.h()},h(){f(e,"type","number"),f(e,"min",l=t[61].min),f(e,"max",n=t[61].max),f(e,"step",r=t[61].step),f(e,"class","input-number svelte-1g5tt44"),f(a,"type","range"),f(a,"min",c=t[61].min),f(a,"max",u=t[61].max),f(a,"step",i=t[61].step),f(a,"class","svelte-1g5tt44")},m(d,b){J(d,e,b),be(e,t[19][t[0].partName][t[61].name]),J(d,s,b),J(d,a,b),be(a,t[19][t[0].partName][t[61].name]),m||(h=[G(e,"input",N),G(e,"change",t[21]),G(a,"change",v),G(a,"input",v),G(a,"change",t[21])],m=!0)},p(d,b){t=d,b[0]&32&&l!==(l=t[61].min)&&f(e,"min",l),b[0]&32&&n!==(n=t[61].max)&&f(e,"max",n),b[0]&32&&r!==(r=t[61].step)&&f(e,"step",r),b[0]&524321&&_t(e.value)!==t[19][t[0].partName][t[61].name]&&be(e,t[19][t[0].partName][t[61].name]),b[0]&32&&c!==(c=t[61].min)&&f(a,"min",c),b[0]&32&&u!==(u=t[61].max)&&f(a,"max",u),b[0]&32&&i!==(i=t[61].step)&&f(a,"step",i),b[0]&524321&&be(a,t[19][t[0].partName][t[61].name])},d(d){d&&(k(e),k(s),k(a)),m=!1,qe(h)}}}function Zt(t){let e,l=t[64]+"",n;return{c(){e=_("option"),n=Y(l),this.h()},l(r){e=p(r,"OPTION",{});var s=S(e);n=K(s,l),s.forEach(k),this.h()},h(){e.__value=t[66],be(e,e.__value)},m(r,s){J(r,e,s),o(e,n)},p(r,s){s[0]&32&&l!==(l=r[64]+"")&&ge(n,l)},d(r){r&&k(e)}}}function Ln(t){let e,l;return{c(){e=_("option"),l=Y(t[64]),this.h()},l(n){e=p(n,"OPTION",{});var r=S(e);l=K(r,t[64]),r.forEach(k),this.h()},h(){e.__value=t[66],be(e,e.__value)},m(n,r){J(n,e,r),o(e,l)},p:ze,d(n){n&&k(e)}}}function Jt(t){let e,l,n=t[60]+1+"",r,s,a=t[63]+1+"",c,u,i,m,h=t[61].name+"",N,v,d,b,T,g=t[61].unit+"",C,D,O,z=t[61].init+"",F,U,w,E=t[61].min+"",M,P,X,R=t[61].max+"",y,V,x,Z=t[61].step+"",le,_e,ce;function pe(){return t[37](t[61])}function Ce(ne,q){return ne[61].pType===wt.eNumber?En:ne[61].pType===wt.eCheckbox?Dn:ne[61].pType===wt.eDropdown?On:Cn}let L=Ce(t),B=L(t);return{c(){e=_("tr"),l=_("td"),r=Y(n),s=Y("."),c=Y(a),u=j(),i=_("td"),m=_("button"),N=Y(h),v=j(),d=_("td"),B.c(),b=j(),T=_("td"),C=Y(g),D=j(),O=_("td"),F=Y(z),U=j(),w=_("td"),M=Y(E),P=j(),X=_("td"),y=Y(R),V=j(),x=_("td"),le=Y(Z),this.h()},l(ne){e=p(ne,"TR",{class:!0});var q=S(e);l=p(q,"TD",{class:!0});var fe=S(l);r=K(fe,n),s=K(fe,"."),c=K(fe,a),fe.forEach(k),u=I(q),i=p(q,"TD",{class:!0});var ee=S(i);m=p(ee,"BUTTON",{class:!0});var ke=S(m);N=K(ke,h),ke.forEach(k),ee.forEach(k),v=I(q),d=p(q,"TD",{class:!0});var Te=S(d);B.l(Te),Te.forEach(k),b=I(q),T=p(q,"TD",{class:!0});var ue=S(T);C=K(ue,g),ue.forEach(k),D=I(q),O=p(q,"TD",{class:!0});var Q=S(O);F=K(Q,z),Q.forEach(k),U=I(q),w=p(q,"TD",{class:!0});var oe=S(w);M=K(oe,E),oe.forEach(k),P=I(q),X=p(q,"TD",{class:!0});var $=S(X);y=K($,R),$.forEach(k),V=I(q),x=p(q,"TD",{class:!0});var A=S(x);le=K(A,Z),A.forEach(k),q.forEach(k),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(m,"class","svelte-1g5tt44"),f(i,"class","svelte-1g5tt44"),f(d,"class","svelte-1g5tt44"),f(T,"class","svelte-1g5tt44"),f(O,"class","svelte-1g5tt44"),f(w,"class","svelte-1g5tt44"),f(X,"class","svelte-1g5tt44"),f(x,"class","svelte-1g5tt44"),f(e,"class","svelte-1g5tt44"),He(e,"changed",t[19][t[0].partName][t[61].name]!==t[61].init)},m(ne,q){J(ne,e,q),o(e,l),o(l,r),o(l,s),o(l,c),o(e,u),o(e,i),o(i,m),o(m,N),o(e,v),o(e,d),B.m(d,null),o(e,b),o(e,T),o(T,C),o(e,D),o(e,O),o(O,F),o(e,U),o(e,w),o(w,M),o(e,P),o(e,X),o(X,y),o(e,V),o(e,x),o(x,le),_e||(ce=G(m,"click",pe),_e=!0)},p(ne,q){t=ne,q[0]&32&&h!==(h=t[61].name+"")&&ge(N,h),L===(L=Ce(t))&&B?B.p(t,q):(B.d(1),B=L(t),B&&(B.c(),B.m(d,null))),q[0]&32&&g!==(g=t[61].unit+"")&&ge(C,g),q[0]&32&&z!==(z=t[61].init+"")&&ge(F,z),q[0]&32&&E!==(E=t[61].min+"")&&ge(M,E),q[0]&32&&R!==(R=t[61].max+"")&&ge(y,R),q[0]&32&&Z!==(Z=t[61].step+"")&&ge(le,Z),q[0]&524321&&He(e,"changed",t[19][t[0].partName][t[61].name]!==t[61].init)},d(ne){ne&&k(e),B.d(),_e=!1,ce()}}}function Qt(t){let e,l,n=t[60]+1+"",r,s,a,c=t[58].sectionName+"",u,i,m,h,N,v,d,b="",T,g,C,D,O;function z(){t[36].call(N,t[58])}let F=De(t[58].params),U=[];for(let w=0;w<F.length;w+=1)U[w]=Jt(qt(t,F,w));return{c(){e=_("tr"),l=_("td"),r=Y(n),s=j(),a=_("td"),u=Y(c),i=j(),m=_("td"),h=_("label"),N=_("input"),v=j(),d=_("span"),d.innerHTML=b,T=j(),g=_("tbody");for(let w=0;w<U.length;w+=1)U[w].c();C=j(),this.h()},l(w){e=p(w,"TR",{class:!0});var E=S(e);l=p(E,"TD",{class:!0});var M=S(l);r=K(M,n),M.forEach(k),s=I(E),a=p(E,"TD",{colspan:!0,class:!0});var P=S(a);u=K(P,c),P.forEach(k),i=I(E),m=p(E,"TD",{colspan:!0,class:!0});var X=S(m);h=p(X,"LABEL",{class:!0});var R=S(h);N=p(R,"INPUT",{type:!0,class:!0}),v=I(R),d=p(R,"SPAN",{class:!0,"data-svelte-h":!0}),ie(d)!=="svelte-1qufua2"&&(d.innerHTML=b),R.forEach(k),X.forEach(k),E.forEach(k),T=I(w),g=p(w,"TBODY",{class:!0});var y=S(g);for(let V=0;V<U.length;V+=1)U[V].l(y);C=I(y),y.forEach(k),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(a,"colspan","4"),f(a,"class","svelte-1g5tt44"),f(N,"type","checkbox"),f(N,"class","svelte-1g5tt44"),f(d,"class","svelte-1g5tt44"),f(h,"class","svelte-1g5tt44"),f(m,"colspan","3"),f(m,"class","svelte-1g5tt44"),f(e,"class","separator svelte-1g5tt44"),f(g,"class","svelte-1g5tt44"),He(g,"collaps",t[18][t[58].sectionID])},m(w,E){J(w,e,E),o(e,l),o(l,r),o(e,s),o(e,a),o(a,u),o(e,i),o(e,m),o(m,h),o(h,N),N.checked=t[18][t[58].sectionID],o(h,v),o(h,d),J(w,T,E),J(w,g,E);for(let M=0;M<U.length;M+=1)U[M]&&U[M].m(g,null);o(g,C),D||(O=G(N,"change",z),D=!0)},p(w,E){if(t=w,E[0]&32&&c!==(c=t[58].sectionName+"")&&ge(u,c),E[0]&262176&&(N.checked=t[18][t[58].sectionID]),E[0]&271056929){F=De(t[58].params);let M;for(M=0;M<F.length;M+=1){const P=qt(t,F,M);U[M]?U[M].p(P,E):(U[M]=Jt(P),U[M].c(),U[M].m(g,C))}for(;M<U.length;M+=1)U[M].d(1);U.length=F.length}E[0]&262176&&He(g,"collaps",t[18][t[58].sectionID])},d(w){w&&(k(e),k(T),k(g)),Ke(U,w),D=!1,O()}}}function Sn(t){let e,l="Copy this URL and send it to your friends!",n,r,s;return{c(){e=_("p"),e.textContent=l,n=j(),r=_("p"),s=Y(t[15]),this.h()},l(a){e=p(a,"P",{"data-svelte-h":!0}),ie(e)!=="svelte-1kscrpk"&&(e.textContent=l),n=I(a),r=p(a,"P",{class:!0});var c=S(r);s=K(c,t[15]),c.forEach(k),this.h()},h(){f(r,"class","cUrl svelte-1g5tt44")},m(a,c){J(a,e,c),J(a,n,c),J(a,r,c),o(r,s)},p(a,c){c[0]&32768&&ge(s,a[15])},d(a){a&&(k(e),k(n),k(r))}}}function jn(t){let e,l,n;function r(a){t[45](a)}let s={pageName:t[0].partName};return t[14]!==void 0&&(s.storeName=t[14]),e=new dn({props:s}),Ie.push(()=>Ue(e,"storeName",r)),{c(){Ee(e.$$.fragment)},l(a){Le(e.$$.fragment,a)},m(a,c){Se(e,a,c),n=!0},p(a,c){const u={};c[0]&1&&(u.pageName=a[0].partName),!l&&c[0]&16384&&(l=!0,u.storeName=a[14],Ae(()=>l=!1)),e.$set(u)},i(a){n||(we(e.$$.fragment,a),n=!0)},o(a){Oe(e.$$.fragment,a),n=!1},d(a){je(e,a)}}}function In(t){let e,l,n="Parameters",r,s,a,c="Load Params from File",u,i,m,h,N="Set Params Default",v,d,b="Load Params from localStorage",T,g,C,D,O,z,F,U,w,E,M,P='<tr class="svelte-1g5tt44"><td class="svelte-1g5tt44">#</td> <td class="svelte-1g5tt44">Parameter name</td> <td class="svelte-1g5tt44">Value</td> <td class="svelte-1g5tt44">Unit</td> <td class="svelte-1g5tt44">Default</td> <td class="svelte-1g5tt44">Min</td> <td class="svelte-1g5tt44">Max</td> <td class="svelte-1g5tt44">Step</td></tr>',X,R,y,V,x="Comment:",Z,le,_e,ce,pe="Save Parameters to File",Ce,L,B="Save Parameters as URL",ne,q,fe="Save Parameters to localStorage",ee,ke,Te,ue,Q,oe,$,A,te,ae,de,ve,he,Be,xe,Je,pt,H,re,Ne,Re,We;function $e(W){t[33](W)}let rt={okName:"Overwrite Parameters",okFunc:t[24],$$slots:{default:[Tn]},$$scope:{ctx:t}};t[9]!==void 0&&(rt.modalOpen=t[9]),g=new gt({props:rt}),Ie.push(()=>Ue(g,"modalOpen",$e));function kt(W){t[35](W)}let it={okName:"Load Parameters",okFunc:t[25],$$slots:{default:[wn]},$$scope:{ctx:t}};t[10]!==void 0&&(it.modalOpen=t[10]),O=new gt({props:it}),Ie.push(()=>Ue(O,"modalOpen",kt));let et=De(t[5]),Pe=[];for(let W=0;W<et.length;W+=1)Pe[W]=Qt(Kt(t,et,W));function Lt(W){t[44](W)}let Xe={okName:"Done",okFunc:Pn,sizeLarge:!0,$$slots:{default:[Sn]},$$scope:{ctx:t}};t[11]!==void 0&&(Xe.modalOpen=t[11]),ke=new gt({props:Xe}),Ie.push(()=>Ue(ke,"modalOpen",Lt));function Nl(W){t[46](W)}let St={okName:"Save into localStorage",okFunc:t[26],$$slots:{default:[jn]},$$scope:{ctx:t}};t[12]!==void 0&&(St.modalOpen=t[12]),Q=new gt({props:St}),Ie.push(()=>Ue(Q,"modalOpen",Nl));function Tl(W){t[47](W)}let jt={svgPath:t[16]};return t[17]!==void 0&&(jt.modalOpen=t[17]),A=new gl({props:jt}),Ie.push(()=>Ue(A,"modalOpen",Tl)),Je=new Yt({props:{pageName:t[0].partName,fgeom:t[1],selFace:t[2],zAdjust:t[20],simTime:t[4]}}),re=new Yt({props:{pageName:t[0].partName,fgeom:t[1],selFace:t[2],zAdjust:t[3],simTime:t[4]}}),{c(){e=_("section"),l=_("h2"),l.textContent=n,r=j(),s=_("main"),a=_("label"),a.textContent=c,u=j(),i=_("input"),m=j(),h=_("button"),h.textContent=N,v=j(),d=_("button"),d.textContent=b,T=j(),Ee(g.$$.fragment),D=j(),Ee(O.$$.fragment),F=j(),U=_("textarea"),w=j(),E=_("table"),M=_("thead"),M.innerHTML=P,X=j();for(let W=0;W<Pe.length;W+=1)Pe[W].c();R=j(),y=_("div"),V=_("label"),V.textContent=x,Z=j(),le=_("input"),_e=j(),ce=_("button"),ce.textContent=pe,Ce=j(),L=_("button"),L.textContent=B,ne=j(),q=_("button"),q.textContent=fe,ee=j(),Ee(ke.$$.fragment),ue=j(),Ee(Q.$$.fragment),$=j(),Ee(A.$$.fragment),ae=j(),de=_("button"),ve=_("img"),Be=j(),xe=_("div"),Ee(Je.$$.fragment),pt=j(),H=_("div"),Ee(re.$$.fragment),this.h()},l(W){e=p(W,"SECTION",{class:!0});var se=S(e);l=p(se,"H2",{class:!0,"data-svelte-h":!0}),ie(l)!=="svelte-1mc497a"&&(l.textContent=n),r=I(se),s=p(se,"MAIN",{class:!0});var me=S(s);a=p(me,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),ie(a)!=="svelte-zt7rok"&&(a.textContent=c),u=I(me),i=p(me,"INPUT",{id:!0,type:!0,accept:!0,class:!0}),m=I(me),h=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(h)!=="svelte-1typ5"&&(h.textContent=N),v=I(me),d=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(d)!=="svelte-187bpo6"&&(d.textContent=b),T=I(me),Le(g.$$.fragment,me),D=I(me),Le(O.$$.fragment,me),F=I(me),U=p(me,"TEXTAREA",{rows:!0,cols:!0,wrap:!0,class:!0}),S(U).forEach(k),w=I(me),E=p(me,"TABLE",{class:!0});var tt=S(E);M=p(tt,"THEAD",{class:!0,"data-svelte-h":!0}),ie(M)!=="svelte-1szl7uo"&&(M.innerHTML=P),X=I(tt);for(let Qe=0;Qe<Pe.length;Qe+=1)Pe[Qe].l(tt);tt.forEach(k),R=I(me),y=p(me,"DIV",{class:!0});var lt=S(y);V=p(lt,"LABEL",{for:!0,"data-svelte-h":!0}),ie(V)!=="svelte-gqskth"&&(V.textContent=x),Z=I(lt),le=p(lt,"INPUT",{type:!0,id:!0,maxlength:!0,size:!0}),lt.forEach(k),_e=I(me),ce=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(ce)!=="svelte-1ny58g0"&&(ce.textContent=pe),Ce=I(me),L=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(L)!=="svelte-11or0m2"&&(L.textContent=B),ne=I(me),q=p(me,"BUTTON",{class:!0,"data-svelte-h":!0}),ie(q)!=="svelte-5zdtrl"&&(q.textContent=fe),ee=I(me),Le(ke.$$.fragment,me),ue=I(me),Le(Q.$$.fragment,me),me.forEach(k),$=I(se),Le(A.$$.fragment,se),ae=I(se),de=p(se,"BUTTON",{class:!0});var ut=S(de);ve=p(ut,"IMG",{src:!0,alt:!0,class:!0}),ut.forEach(k),Be=I(se),xe=p(se,"DIV",{class:!0});var mt=S(xe);Le(Je.$$.fragment,mt),mt.forEach(k),pt=I(se),H=p(se,"DIV",{class:!0});var nt=S(H);Le(re.$$.fragment,nt),nt.forEach(k),se.forEach(k),this.h()},h(){f(l,"class","svelte-1g5tt44"),f(a,"for","loadFParams"),f(a,"class","fileUpload svelte-1g5tt44"),f(i,"id","loadFParams"),f(i,"type","file"),f(i,"accept","text/plain, application/json"),f(i,"class","svelte-1g5tt44"),f(h,"class","svelte-1g5tt44"),f(d,"class","svelte-1g5tt44"),f(U,"rows","3"),f(U,"cols","80"),U.readOnly=!0,f(U,"wrap","off"),U.value=t[7],f(U,"class","svelte-1g5tt44"),He(U,"colorWarn",t[8]),f(M,"class","svelte-1g5tt44"),f(E,"class","svelte-1g5tt44"),f(V,"for","inComment"),f(le,"type","text"),f(le,"id","inComment"),f(le,"maxlength","150"),f(le,"size","70"),f(y,"class","comment svelte-1g5tt44"),f(ce,"class","svelte-1g5tt44"),f(L,"class","svelte-1g5tt44"),f(q,"class","svelte-1g5tt44"),f(s,"class","svelte-1g5tt44"),ht(ve.src,he=t[16])||f(ve,"src",he),f(ve,"alt",t[16]),f(ve,"class","svelte-1g5tt44"),f(de,"class","side-img svelte-1g5tt44"),f(xe,"class","mini-canvas svelte-1g5tt44"),f(H,"class","mini-canvas svelte-1g5tt44"),f(e,"class","svelte-1g5tt44")},m(W,se){J(W,e,se),o(e,l),o(e,r),o(e,s),o(s,a),o(s,u),o(s,i),o(s,m),o(s,h),o(s,v),o(s,d),o(s,T),Se(g,s,null),o(s,D),Se(O,s,null),o(s,F),o(s,U),o(s,w),o(s,E),o(E,M),o(E,X);for(let me=0;me<Pe.length;me+=1)Pe[me]&&Pe[me].m(E,null);o(s,R),o(s,y),o(y,V),o(y,Z),o(y,le),be(le,t[6]),o(s,_e),o(s,ce),o(s,Ce),o(s,L),o(s,ne),o(s,q),o(s,ee),Se(ke,s,null),o(s,ue),Se(Q,s,null),o(e,$),Se(A,e,null),o(e,ae),o(e,de),o(de,ve),o(e,Be),o(e,xe),Se(Je,xe,null),o(e,pt),o(e,H),Se(re,H,null),Ne=!0,Re||(We=[G(i,"change",t[22]),G(h,"click",t[31]),G(d,"click",t[32]),G(le,"input",t[42]),G(ce,"click",t[23]),G(L,"click",t[27]),G(q,"click",t[43]),G(de,"click",t[29])],Re=!0)},p(W,se){const me={};se[2]&64&&(me.$$scope={dirty:se,ctx:W}),!C&&se[0]&512&&(C=!0,me.modalOpen=W[9],Ae(()=>C=!1)),g.$set(me);const tt={};if(se[0]&8193|se[2]&64&&(tt.$$scope={dirty:se,ctx:W}),!z&&se[0]&1024&&(z=!0,tt.modalOpen=W[10],Ae(()=>z=!1)),O.$set(tt),(!Ne||se[0]&128)&&(U.value=W[7]),(!Ne||se[0]&256)&&He(U,"colorWarn",W[8]),se[0]&271319073){et=De(W[5]);let Ye;for(Ye=0;Ye<et.length;Ye+=1){const It=Kt(W,et,Ye);Pe[Ye]?Pe[Ye].p(It,se):(Pe[Ye]=Qt(It),Pe[Ye].c(),Pe[Ye].m(E,null))}for(;Ye<Pe.length;Ye+=1)Pe[Ye].d(1);Pe.length=et.length}se[0]&64&&le.value!==W[6]&&be(le,W[6]);const lt={};se[0]&32768|se[2]&64&&(lt.$$scope={dirty:se,ctx:W}),!Te&&se[0]&2048&&(Te=!0,lt.modalOpen=W[11],Ae(()=>Te=!1)),ke.$set(lt);const ut={};se[0]&16385|se[2]&64&&(ut.$$scope={dirty:se,ctx:W}),!oe&&se[0]&4096&&(oe=!0,ut.modalOpen=W[12],Ae(()=>oe=!1)),Q.$set(ut);const mt={};se[0]&65536&&(mt.svgPath=W[16]),!te&&se[0]&131072&&(te=!0,mt.modalOpen=W[17],Ae(()=>te=!1)),A.$set(mt),(!Ne||se[0]&65536&&!ht(ve.src,he=W[16]))&&f(ve,"src",he),(!Ne||se[0]&65536)&&f(ve,"alt",W[16]);const nt={};se[0]&1&&(nt.pageName=W[0].partName),se[0]&2&&(nt.fgeom=W[1]),se[0]&4&&(nt.selFace=W[2]),se[0]&16&&(nt.simTime=W[4]),Je.$set(nt);const Qe={};se[0]&1&&(Qe.pageName=W[0].partName),se[0]&2&&(Qe.fgeom=W[1]),se[0]&4&&(Qe.selFace=W[2]),se[0]&8&&(Qe.zAdjust=W[3]),se[0]&16&&(Qe.simTime=W[4]),re.$set(Qe)},i(W){Ne||(we(g.$$.fragment,W),we(O.$$.fragment,W),we(ke.$$.fragment,W),we(Q.$$.fragment,W),we(A.$$.fragment,W),we(Je.$$.fragment,W),we(re.$$.fragment,W),Ne=!0)},o(W){Oe(g.$$.fragment,W),Oe(O.$$.fragment,W),Oe(ke.$$.fragment,W),Oe(Q.$$.fragment,W),Oe(A.$$.fragment,W),Oe(Je.$$.fragment,W),Oe(re.$$.fragment,W),Ne=!1},d(W){W&&k(e),je(g),je(O),Ke(Pe,W),je(ke),je(Q),je(A),je(Je),je(re),Re=!1,qe(We)}}}function Pn(){}function An(t){const e={};for(const l of t)e[l.sectionID]=l.sectionVisible;return e}function Un(t,e,l){let n,r;at(t,Ze,H=>l(19,n=H)),at(t,ql,H=>l(48,r=H));const s=ml();let{pDef:a}=e,{fgeom:c}=e,{selFace:u}=e,{zAdjust:i}=e,{simTime:m=0}=e;const h=_l();let N="";function v(){s("paramChg",{foo:"bla"})}function d(H,re){let Ne="",Re=!1;H!==a.partName&&(Ne+=`warn361: read partName: '${H}' expected partName: '${a.partName}'
2
2
  `,Re=!0);let We=0,$e=0,rt=0;const kt=[];for(const Xe of a.params)kt.push(Xe.name),Object.hasOwn(re,Xe.name)?(We+=1,n[a.partName][Xe.name]===re[Xe.name]?rt+=1:Il(Ze,n[a.partName][Xe.name]=re[Xe.name],n)):$e+=1;let it=0;for(const Xe of Object.keys(re))kt.includes(Xe)||(it+=1,Ne+=`warn363: parameter ${Xe} not in the scope of the design (${it})
3
3
  `);const et=it>0;return Ne+=`Params loaded at ${new Date().toLocaleTimeString()} :`,Ne+=` def-nb: ${Object.keys(a.params).length}`,Ne+=`, cover-nb: ${We}, uncover-nb: ${$e}
4
4
  `,Ne+=` load-nb: ${Object.keys(re).length}`,Ne+=`, equal-nb: ${rt}, changed-nb: ${We-rt}`,Ne+=`, out-of-scope: ${it}`,[Ne,Re||et]}let b="",T=!1;function g(){{const H=new URLSearchParams(r.url.search),re={};for(const[Ne,Re]of H){const We=Number(Re);isNaN(We)||(re[Ne]=We)}Object.keys(re).length>0&&l(7,[b,T]=d(a.partName,re),b,l(8,T))}}function C(){g(),v()}Et(()=>{C()});function D(H){try{const[re]=Fl(H);l(7,[b,T]=d(re.partName,re.pVal),b,l(8,T)),l(6,N=re.comment),v()}catch(re){let Ne=`err723: error by parsing parameter file
@@ -1 +1 @@
1
- {"version":"1725899119302"}
1
+ {"version":"1729460761320"}