designix-uis 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/designix-uis.js +1 -1
- package/dist/public/_app/immutable/chunks/B9LEqcDW.js +1 -0
- package/dist/public/_app/immutable/chunks/BNTg8d7T.js +216 -0
- package/dist/public/_app/immutable/chunks/CjXMHH7z.js +125 -0
- package/dist/public/_app/immutable/chunks/{UedIxzRF.js → DBCXyUAB.js} +1 -1
- package/dist/public/_app/immutable/chunks/{CNuAIbK8.js → oCTXG48S.js} +1 -1
- package/dist/public/_app/immutable/entry/{app.CG242Ik5.js → app.oLn9oN2b.js} +2 -2
- package/dist/public/_app/immutable/entry/start.BP1-jhXq.js +1 -0
- package/dist/public/_app/immutable/nodes/0.BHplsTkl.js +2 -0
- package/dist/public/_app/immutable/nodes/{1.CRPDCYJR.js → 1.Dj4Mt8Su.js} +1 -1
- package/dist/public/_app/immutable/nodes/{2.DywDsvzu.js → 2.IW_99nu3.js} +1 -1
- package/dist/public/_app/immutable/nodes/3.OSFXp_S0.js +9 -0
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_bar.html +13 -13
- package/dist/public/gear/gear_epicycloid.html +13 -13
- package/dist/public/gear/gear_ring.html +13 -13
- package/dist/public/gear/gear_wheel.html +13 -13
- package/dist/public/heliostat/base.html +13 -13
- package/dist/public/heliostat/haxis_guidance.html +13 -13
- package/dist/public/heliostat/heliostat.html +13 -13
- package/dist/public/heliostat/heliostat_2.html +13 -13
- package/dist/public/heliostat/pole_static.html +13 -13
- package/dist/public/heliostat/rake.html +13 -13
- package/dist/public/heliostat/rake_stopper.html +13 -13
- package/dist/public/heliostat/ring.html +13 -13
- package/dist/public/heliostat/ring_guidance.html +13 -13
- package/dist/public/heliostat/rod.html +13 -13
- package/dist/public/heliostat/spider.html +13 -13
- package/dist/public/heliostat/surface.html +13 -13
- package/dist/public/heliostat/swing.html +13 -13
- package/dist/public/heliostat/trapeze.html +13 -13
- package/dist/public/heliostat/vaxis.html +13 -13
- package/dist/public/heliostat/vaxis_guidance.html +13 -13
- package/dist/public/heliostat/vaxis_holder.html +13 -13
- package/dist/public/index.html +11 -11
- package/package.json +1 -1
- package/dist/public/_app/immutable/chunks/71jGndfk.js +0 -1
- package/dist/public/_app/immutable/chunks/Cfb4YnNO.js +0 -131
- package/dist/public/_app/immutable/chunks/vc0esDx2.js +0 -2
- package/dist/public/_app/immutable/entry/start.B5keCfEW.js +0 -1
- package/dist/public/_app/immutable/nodes/0.BBqlSwyG.js +0 -2
- package/dist/public/_app/immutable/nodes/3.Qz57JPTx.js +0 -217
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
var Yr=Object.defineProperty;var Xr=(t,e,u)=>e in t?Yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u;var Y=(t,e,u)=>Xr(t,typeof e!="symbol"?e+"":e,u);import{a as dn,b as Zr}from"../chunks/Cfb4YnNO.js";import{H as qr,a as Vn,g as Gr}from"../chunks/UedIxzRF.js";import{l as Ku,e as Wr,w as Hr,f as ft,c as Kt,a as J,t as ie,s as De,b as mn,r as $n,g as An}from"../chunks/Cyy3J-St.js";import{aF as Jr,m as Un,T as Yn,h as Xn,R as Zn,D as M,j as c,B as Kr,f as Qe,c as E,r as p,t as Ce,p as Ve,a as $e,s as d,ab as he,x as ze,y as He,u as Qu,aG as Qr}from"../chunks/C6gpjNdh.js";import{c as es,a as K,p as et,i as Nt,b as Yu}from"../chunks/Bpmoxeo_.js";import{U as be,C as Tu,F as ts,g as us,D as Pu,a as Iu,M as Ye,b as Ze,S as ns,c as rs,E as ss,d as as,f as is,Z as os,h as cs,V as ls,j as Ds,k as qn,l as Fn,m as fs,n as gn,o as hn,p as pn,q as En,L as ds,r as ms,t as As,u as Fs,v as gs,w as hs,x as Cn,y as ps,z as Es,A as Cs,B as vs,G as _s,H as bs,I as ys,J as ws,s as Ae,e as st,i as at,K as xe,N as en,O as xs}from"../chunks/vc0esDx2.js";import{b as fu}from"../chunks/71jGndfk.js";import{s as Ss}from"../chunks/BxEGwKtU.js";import{p as vn,i as Bs}from"../chunks/CNuAIbK8.js";import{a as ks,o as Ns}from"../chunks/DzodC9Fi.js";import"../chunks/B6f9MN2N.js";function Ke(t,e,u){if(u){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function Rt(t,e,u=e){var n=Jr();Ku(t,"input",r=>{var s=r?t.defaultValue:t.value;if(s=Ou(t)?zu(s):s,u(s),n&&s!==(s=e())){var a=t.selectionStart,i=t.selectionEnd;t.value=s??"",i!==null&&(t.selectionStart=a,t.selectionEnd=Math.min(i,t.value.length))}}),(Xn&&t.defaultValue!==t.value||Un(e)==null&&t.value)&&u(Ou(t)?zu(t.value):t.value),Yn(()=>{var r=e();Ou(t)&&r===zu(t.value)||t.type==="date"&&!r&&!t.value||r!==t.value&&(t.value=r??"")})}function Je(t,e,u=e){Ku(t,"change",n=>{var r=n?t.defaultChecked:t.checked;u(r)}),(Xn&&t.defaultChecked!==t.checked||Un(e)==null)&&u(t.checked),Yn(()=>{var n=e();t.checked=!!n})}function Ou(t){var e=t.type;return e==="number"||e==="range"}function zu(t){return t===""?null:+t}function Gn(t,e,u){if(t.multiple)return Ms(t,e);for(var n of t.options){var r=Ht(n);if(es(r,e)){n.selected=!0;return}}(!u||e!==void 0)&&(t.selectedIndex=-1)}function Ls(t,e){Zn(()=>{var u=new MutationObserver(()=>{var n=t.__value;Gn(t,n)});return u.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{u.disconnect()}})}function du(t,e,u=e){var n=!0;Ku(t,"change",r=>{var s=r?"[selected]":":checked",a;if(t.multiple)a=[].map.call(t.querySelectorAll(s),Ht);else{var i=t.querySelector(s)??t.querySelector("option:not([disabled])");a=i&&Ht(i)}u(a)}),Zn(()=>{var r=e();if(Gn(t,r,n),n&&r===void 0){var s=t.querySelector(":checked");s!==null&&(r=Ht(s),u(r))}t.__value=r,n=!1}),Ls(t)}function Ms(t,e){for(var u of t.options)u.selected=~e.indexOf(Ht(u))}function Ht(t){return"__value"in t?t.__value:t.value}function Ts(t,e){Wr(window,["resize"],()=>Hr(()=>e(window[t])))}function Ps(t){var e=Kr(0);return function(){return arguments.length===1?(M(e,c(e)+1),arguments[0]):(c(e),t())}}let kt=[];const ju=[];let _n=0;async function Is(t,e){const{options:u,config:n}=e,{transferStreams:r,useWebWorkers:s,useCompressionStream:a,codecType:i,compressed:o,signed:D,encrypted:l}=u,{workerScripts:f,maxWorkers:v}=n;e.transferStreams=r||r===be;const F=!o&&!D&&!l&&!e.transferStreams;return e.useWebWorkers=!F&&(s||s===be&&n.useWebWorkers),e.scripts=e.useWebWorkers&&f?f[i]:[],u.useCompressionStream=a||a===be&&n.useCompressionStream,(await A()).run();async function A(){const C=kt.find(g=>!g.busy);if(C)return bn(C),new Tu(C,t,e,h);if(kt.length<v){const g={indexWorker:_n};return _n++,kt.push(g),new Tu(g,t,e,h)}else return new Promise(g=>ju.push({resolve:g,stream:t,workerOptions:e}))}function h(C){if(ju.length){const[{resolve:g,stream:b,workerOptions:_}]=ju.splice(0,1);g(new Tu(C,b,_,h))}else C.worker?(bn(C),Os(C,e)):kt=kt.filter(g=>g!=C)}}function Os(t,e){const{config:u}=e,{terminateWorkerTimeout:n}=u;Number.isFinite(n)&&n>=0&&(t.terminated?t.terminated=!1:t.terminateTimeout=setTimeout(async()=>{kt=kt.filter(r=>r!=t);try{await t.terminate()}catch{}},n))}function bn(t){const{terminateTimeout:e}=t;e&&(clearTimeout(e),t.terminateTimeout=null)}const zs="Writer iterator completed too soon",js="text/plain",Rs="Content-Type",Vs=64*1024,Wn="writable";class tn{constructor(){this.size=0}init(){this.initialized=!0}}class Hn extends tn{get readable(){const e=this,{chunkSize:u=Vs}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a,diskNumberStart:i}=n,{chunkOffset:o}=this;r.enqueue(await Xu(e,s+o,Math.min(u,a-o),i)),o+u>a?r.close():this.chunkOffset+=u}});return n}}class $s extends Hn{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,u){const n=this,r=e+u;let a=await(e||r<n.size?n.blob.slice(e,r):n.blob).arrayBuffer();return a.byteLength>u&&(a=a.slice(e,r)),new Uint8Array(a)}}class Us extends tn{constructor(e){super();const u=this,n=new TransformStream,r=[];e&&r.push([Rs,e]),Object.defineProperty(u,Wn,{get(){return n.writable}}),u.blob=new Response(n.readable,{headers:r}).blob()}getData(){return this.blob}}class Oe extends $s{constructor(e){super(new Blob([e],{type:js}))}}class Ys extends Hn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:u}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(u.map(async(n,r)=>{await n.init(),r!=u.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,u,n=0){const r=this,{readers:s}=this;let a,i=n;i==-1&&(i=s.length-1);let o=e;for(;o>=s[i].size;)o-=s[i].size,i++;const D=s[i],l=D.size;if(o+u<=l)a=await Xu(D,o,u);else{const f=l-o;a=new Uint8Array(u),a.set(await Xu(D,o,f)),a.set(await r.readUint8Array(e+f,u-f,n),f)}return r.lastDiskNumber=Math.max(i,r.lastDiskNumber),a}}class yn extends tn{constructor(e,u=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:u,availableSize:u});let r,s,a;const i=new WritableStream({async write(l){const{availableSize:f}=n;if(a)l.length>=f?(await o(l.slice(0,f)),await D(),n.diskOffset+=r.size,n.diskNumber++,a=null,await this.write(l.slice(f))):await o(l);else{const{value:v,done:F}=await e.next();if(F&&!v)throw new Error(zs);r=v,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await Qt(r),s=v.writable,a=s.getWriter(),await this.write(l)}},async close(){await a.ready,await D()}});Object.defineProperty(n,Wn,{get(){return i}});async function o(l){const f=l.length;f&&(await a.ready,await a.write(l),r.size+=f,n.size+=f,n.availableSize-=f)}async function D(){s.size=r.size,await a.close()}}}async function Qt(t,e){if(t.init&&!t.initialized)await t.init(e);else return Promise.resolve()}function Xs(t){return Array.isArray(t)&&(t=new Ys(t)),t instanceof ReadableStream&&(t={readable:t}),t}function Zs(t){t.writable===be&&typeof t.next==ts&&(t=new yn(t)),t instanceof WritableStream&&(t={writable:t});const{writable:e}=t;return e.size===be&&(e.size=0),t instanceof yn||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}function Xu(t,e,u,n){return t.readUint8Array(e,u,n)}const qs="filename",Gs="rawFilename",Ws="comment",Hs="rawComment",Js="uncompressedSize",Ks="compressedSize",Qs="offset",wn="diskNumberStart",Jn="lastModDate",ea="rawLastModDate",Kn="lastAccessDate",Qn="creationDate",er="internalFileAttribute",tr="externalFileAttribute",ur="msDosCompatible",un="zip64",nr="encrypted",rr="version",sr="versionMadeBy",ar="zipCrypto",ta=[qs,Gs,Ks,Js,Jn,ea,Ws,Hs,Kn,Qn,Qs,wn,wn,er,tr,ur,un,nr,rr,sr,ar,"directory","bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class ir{constructor(e){ta.forEach(u=>this[u]=e[u])}}const ua="File already exists",na="Zip file comment exceeds 64KB",ra="File entry comment exceeds 64KB",sa="File entry name exceeds 64KB",xn="Version exceeds 65535",aa="The strength must equal 1, 2, or 3",ia="Extra field type exceeds 65535",oa="Extra field data exceeds 64KB",nn="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",ca="Undefined uncompressed size",Sn=new Uint8Array([7,0,2,0,65,69,3,0,0]);let Ru=0;const Bn=[];class la{constructor(e,u={}){e=Zs(e);const n=e.availableSize!==be&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==be&&e.maxSize>0&&e.maxSize!==1/0;Object.assign(this,{writer:e,addSplitZipSignature:n,options:u,config:us(),files:new Map,filenames:new Set,offset:u.offset===be?e.writable.size:u.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(e="",u,n={}){const r=this,{pendingAddFileCalls:s,config:a}=r;Ru<a.maxWorkers?Ru++:await new Promise(o=>Bn.push(o));let i;try{if(e=e.trim(),r.filenames.has(e))throw new Error(ua);return r.filenames.add(e),i=Da(r,e,u,n),s.add(i),await i}catch(o){throw r.filenames.delete(e),o}finally{s.delete(i);const o=Bn.shift();o?o():Ru--}}async close(e=new Uint8Array,u={}){const n=this,{pendingAddFileCalls:r,writer:s}=this,{writable:a}=s;for(;r.size;)await Promise.allSettled(Array.from(r));return await Ea(this,e,u),ce(n,u,"preventClose")||await a.getWriter().close(),s.getData?s.getData():a}}async function Da(t,e,u,n){e=e.trim(),n.directory&&!e.endsWith(Pu)?e+=Pu:n.directory=e.endsWith(Pu);const r=ce(t,n,"encodeText",Iu);let s=r(e);if(s===be&&(s=Iu(e)),re(s)>Ye)throw new Error(sa);const a=n.comment||"";let i=r(a);if(i===be&&(i=Iu(a)),re(i)>Ye)throw new Error(ra);const o=ce(t,n,rr,ls);if(o>Ye)throw new Error(xn);const D=ce(t,n,sr,20);if(D>Ye)throw new Error(xn);const l=ce(t,n,Jn,new Date),f=ce(t,n,Kn),v=ce(t,n,Qn),F=ce(t,n,ur,!0),A=ce(t,n,er,0),h=ce(t,n,tr,0),C=ce(t,n,"passThrough");let g,b;C||(g=ce(t,n,"password"),b=ce(t,n,"rawPassword"));const _=ce(t,n,"encryptionStrength",3),B=ce(t,n,ar),N=ce(t,n,"extendedTimestamp",!0),w=ce(t,n,"keepOrder",!0),x=ce(t,n,"level"),S=ce(t,n,"useWebWorkers"),T=ce(t,n,"bufferedWrite"),W=ce(t,n,"dataDescriptorSignature",!1),R=ce(t,n,"signal"),q=ce(t,n,"useUnicodeFileNames",!0),se=ce(t,n,"useCompressionStream"),Q=ce(t,n,"compressionMethod");let X=ce(t,n,"dataDescriptor",!0),V=ce(t,n,un);if(!B&&(g!==be||b!==be)&&!(_>=1&&_<=3))throw new Error(aa);let oe=new Uint8Array;const{extraField:ee}=n;if(ee){let tt=0,Ue=0;ee.forEach(Ie=>tt+=4+re(Ie)),oe=new Uint8Array(tt),ee.forEach((Ie,ot)=>{if(ot>Ye)throw new Error(ia);if(re(Ie)>Ye)throw new Error(oa);Se(oe,new Uint16Array([ot]),Ue),Se(oe,new Uint16Array([re(Ie)]),Ue+2),Se(oe,Ie,Ue+4),Ue+=4+re(Ie)})}let fe=0,y=0,k=0;if(C&&({uncompressedSize:k}=n,k===be))throw new Error(ca);const j=V===!0;u&&(u=Xs(u),await Qt(u),C?fe=kn(k):u.size===be?(X=!0,(V||V===be)&&(V=!0,k=fe=Ze+1)):(k=u.size,fe=kn(k)));const{diskOffset:te,diskNumber:ye,maxSize:Pe}=t.writer,Be=j||k>Ze,Ne=j||fe>Ze,L=j||t.offset+t.pendingEntriesSize-te>Ze,I=ce(t,n,"supportZip64SplitFile",!0)&&j||ye+Math.ceil(t.pendingEntriesSize/Pe)>Ye;if(L||Be||Ne||I){if(V===!1||!w)throw new Error(nn);V=!0}V=V||!1;const $=ce(t,n,nr),{signature:pe}=n;n=Object.assign({},n,{rawFilename:s,rawComment:i,version:o,versionMadeBy:D,lastModDate:l,lastAccessDate:f,creationDate:v,rawExtraField:oe,zip64:V,zip64UncompressedSize:Be,zip64CompressedSize:Ne,zip64Offset:L,zip64DiskNumberStart:I,password:g,rawPassword:b,level:!se&&t.config.CompressionStream===be&&t.config.CompressionStreamNative===be?0:x,useWebWorkers:S,encryptionStrength:_,extendedTimestamp:N,zipCrypto:B,bufferedWrite:T,keepOrder:w,useUnicodeFileNames:q,dataDescriptor:X,dataDescriptorSignature:W,signal:R,msDosCompatible:F,internalFileAttribute:A,externalFileAttribute:h,useCompressionStream:se,passThrough:C,encrypted:!!(g&&re(g)||b&&re(b))||C&&$,signature:pe,compressionMethod:Q});const ht=ma(n),mt=Fa(n),qe=re(ht.localHeaderArray,mt.dataDescriptorArray);y=qe+fe,t.options.usdz&&(y+=y+64),t.pendingEntriesSize+=y;let it;try{it=await fa(t,e,u,{headerInfo:ht,dataDescriptorInfo:mt,metadataSize:qe},n)}finally{t.pendingEntriesSize-=y}return Object.assign(it,{name:e,comment:a,extraField:ee}),new ir(it)}async function fa(t,e,u,n,r){const{files:s,writer:a}=t,{keepOrder:i,dataDescriptor:o,signal:D}=r,{headerInfo:l}=n,{usdz:f}=t.options,v=Array.from(s.values()).pop();let F={},A,h,C,g,b,_,B;s.set(e,F);try{let S;i&&(S=v&&v.lock,N()),(r.bufferedWrite||t.writerLocked||t.bufferedWrites&&i||!o)&&!f?(_=new TransformStream,B=new Response(_.readable).blob(),_.writable.size=0,A=!0,t.bufferedWrites++,await Qt(a)):(_=a,await w()),await Qt(_);const{writable:T}=a;let{diskOffset:W}=a;if(t.addSplitZipSignature){delete t.addSplitZipSignature;const q=new Uint8Array(4),se=Te(q);ne(se,0,ns),await dt(T,q),t.offset+=4}f&&Aa(n,t.offset-W),A||(await S,await x(T));const{diskNumber:R}=a;if(b=!0,F.diskNumberStart=R,F=await da(u,_,F,n,t.config,r),b=!1,s.set(e,F),F.filename=e,A){await _.writable.getWriter().close();let q=await B;await S,await w(),g=!0,o||(q=await ha(F,q,T,r)),await x(T),F.diskNumberStart=a.diskNumber,W=a.diskOffset,await q.stream().pipeTo(T,{preventClose:!0,preventAbort:!0,signal:D}),T.size+=q.size,g=!1}if(F.offset=t.offset-W,F.zip64)pa(F,r);else if(F.offset>Ze)throw new Error(nn);return t.offset+=F.size,F}catch(S){if(A&&g||!A&&b){if(t.hasCorruptedEntries=!0,S)try{S.corruptedEntry=!0}catch{}A?t.offset+=_.writable.size:t.offset=_.writable.size}throw s.delete(e),S}finally{A&&t.bufferedWrites--,C&&C(),h&&h()}function N(){F.lock=new Promise(S=>C=S)}async function w(){t.writerLocked=!0;const{lockWriter:S}=t;t.lockWriter=new Promise(T=>h=()=>{t.writerLocked=!1,T()}),await S}async function x(S){re(l.localHeaderArray)>a.availableSize&&(a.availableSize=0,await dt(S,new Uint8Array))}}async function da(t,e,{diskNumberStart:u,lock:n},r,s,a){const{headerInfo:i,dataDescriptorInfo:o,metadataSize:D}=r,{localHeaderArray:l,headerArray:f,lastModDate:v,rawLastModDate:F,encrypted:A,compressed:h,version:C,compressionMethod:g,rawExtraFieldExtendedTimestamp:b,extraFieldExtendedTimestampFlag:_,rawExtraFieldNTFS:B,rawExtraFieldAES:N}=i,{dataDescriptorArray:w}=o,{rawFilename:x,lastAccessDate:S,creationDate:T,password:W,rawPassword:R,level:q,zip64:se,zip64UncompressedSize:Q,zip64CompressedSize:X,zip64Offset:V,zip64DiskNumberStart:oe,zipCrypto:ee,dataDescriptor:fe,directory:y,versionMadeBy:k,rawComment:j,rawExtraField:te,useWebWorkers:ye,onstart:Pe,onprogress:Be,onend:Ne,signal:L,encryptionStrength:U,extendedTimestamp:I,msDosCompatible:$,internalFileAttribute:pe,externalFileAttribute:ht,useCompressionStream:mt,passThrough:qe}=a,it={lock:n,versionMadeBy:k,zip64:se,directory:!!y,filenameUTF8:!0,rawFilename:x,commentUTF8:!0,rawComment:j,rawExtraFieldExtendedTimestamp:b,rawExtraFieldNTFS:B,rawExtraFieldAES:N,rawExtraField:te,extendedTimestamp:I,msDosCompatible:$,internalFileAttribute:pe,externalFileAttribute:ht,diskNumberStart:u};let{signature:tt,uncompressedSize:Ue}=a,Ie=0;qe||(Ue=0);const{writable:ot}=e;if(t){t.chunkSize=rs(s),await dt(ot,l);const ct=t.readable,tu=ct.size=t.size,vu={options:{codecType:vs,level:q,rawPassword:R,password:W,encryptionStrength:U,zipCrypto:A&&ee,passwordVerification:A&&ee&&F>>8&255,signed:!qe,compressed:h&&!qe,encrypted:A&&!qe,useWebWorkers:ye,useCompressionStream:mt,transferStreams:!1},config:s,streamOptions:{signal:L,size:tu,onstart:Pe,onprogress:Be,onend:Ne}},Mt=await Is({readable:ct,writable:ot},vu);Ie=Mt.outputSize,qe||(Ue=Mt.inputSize,tt=Mt.signature),ot.size+=Ue}else await dt(ot,l);let vt;if(se){let ct=4;Q&&(ct+=8),X&&(ct+=8),V&&(ct+=8),oe&&(ct+=4),vt=new Uint8Array(ct)}else vt=new Uint8Array;return ga({signature:tt,rawExtraFieldZip64:vt,compressedSize:Ie,uncompressedSize:Ue,headerInfo:i,dataDescriptorInfo:o},a),fe&&await dt(ot,w),Object.assign(it,{uncompressedSize:Ue,compressedSize:Ie,lastModDate:v,rawLastModDate:F,creationDate:T,lastAccessDate:S,encrypted:A,zipCrypto:ee,size:D+Ie,compressionMethod:g,version:C,headerArray:f,signature:tt,rawExtraFieldZip64:vt,extraFieldExtendedTimestampFlag:_,zip64UncompressedSize:Q,zip64CompressedSize:X,zip64Offset:V,zip64DiskNumberStart:oe}),it}function ma(t){const{rawFilename:e,lastModDate:u,lastAccessDate:n,creationDate:r,level:s,zip64:a,zipCrypto:i,useUnicodeFileNames:o,dataDescriptor:D,directory:l,rawExtraField:f,encryptionStrength:v,extendedTimestamp:F,encrypted:A}=t;let{version:h,compressionMethod:C}=t;const g=!l&&(s>0||s===be&&C!==0);let b;if(A&&!i){b=new Uint8Array(re(Sn)+2);const V=Te(b);ae(V,0,Ds),Se(b,Sn,2),mu(V,8,v)}else b=new Uint8Array;let _,B,N;if(F){B=new Uint8Array(9+(n?4:0)+(r?4:0));const V=Te(B);ae(V,0,qn),ae(V,2,re(B)-4),N=1+(n?2:0)+(r?4:0),mu(V,4,N);let oe=5;ne(V,oe,Math.floor(u.getTime()/1e3)),oe+=4,n&&(ne(V,oe,Math.floor(n.getTime()/1e3)),oe+=4),r&&ne(V,oe,Math.floor(r.getTime()/1e3));try{_=new Uint8Array(36);const ee=Te(_),fe=Vu(u);ae(ee,0,ss),ae(ee,2,32),ae(ee,8,as),ae(ee,10,24),Xe(ee,12,fe),Xe(ee,20,Vu(n)||fe),Xe(ee,28,Vu(r)||fe)}catch{_=new Uint8Array}}else _=B=new Uint8Array;let w=0;o&&(w=w|_s),D&&(w=w|bs),C===be&&(C=g?Fn:fs),C==Fn&&(s>=1&&s<3&&(w=w|6),s>=3&&s<5&&(w=w|1),s===9&&(w=w|2)),a&&(h=h>gn?h:gn),A&&(w=w|ys,i||(h=h>hn?h:hn,b[9]=C,C=is));const x=new Uint8Array(26),S=Te(x);ae(S,0,h),ae(S,2,w),ae(S,4,C);const T=new Uint32Array(1),W=Te(T);let R;u<pn?R=pn:u>En?R=En:R=u,ae(W,0,(R.getHours()<<6|R.getMinutes())<<5|R.getSeconds()/2),ae(W,2,(R.getFullYear()-1980<<4|R.getMonth()+1)<<5|R.getDate());const q=T[0];ne(S,6,q),ae(S,22,re(e));const se=re(b,B,_,f);ae(S,24,se);const Q=new Uint8Array(30+re(e)+se),X=Te(Q);return ne(X,0,ds),Se(Q,x,4),Se(Q,e,30),Se(Q,b,30+re(e)),Se(Q,B,30+re(e,b)),Se(Q,_,30+re(e,b,B)),Se(Q,f,30+re(e,b,B,_)),{localHeaderArray:Q,headerArray:x,headerView:S,lastModDate:u,rawLastModDate:q,encrypted:A,compressed:g,version:h,compressionMethod:C,extraFieldExtendedTimestampFlag:N,rawExtraFieldExtendedTimestamp:B,rawExtraFieldNTFS:_,rawExtraFieldAES:b,extraFieldLength:se}}function Aa(t,e){const{headerInfo:u}=t;let{localHeaderArray:n,extraFieldLength:r}=u,s=Te(n),a=64-(e+re(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),o=Te(i);ae(o,0,ms),ae(o,2,a-2);const D=n;u.localHeaderArray=n=new Uint8Array(re(D)+a),Se(n,D),Se(n,i,re(D)),s=Te(n),ae(s,28,r+a),t.metadataSize+=a}function Fa(t){const{zip64:e,dataDescriptor:u,dataDescriptorSignature:n}=t;let r=new Uint8Array,s,a=0;return u&&(r=new Uint8Array(e?n?24:20:n?16:12),s=Te(r),n&&(a=4,ne(s,0,As))),{dataDescriptorArray:r,dataDescriptorView:s,dataDescriptorOffset:a}}function ga(t,e){const{signature:u,rawExtraFieldZip64:n,compressedSize:r,uncompressedSize:s,headerInfo:a,dataDescriptorInfo:i}=t,{headerView:o,encrypted:D}=a,{dataDescriptorView:l,dataDescriptorOffset:f}=i,{zip64:v,zip64UncompressedSize:F,zip64CompressedSize:A,zipCrypto:h,dataDescriptor:C}=e;if((!D||h)&&u!==be&&(ne(o,10,u),C&&ne(l,f,u)),v){const g=Te(n);ae(g,0,Fs),ae(g,2,re(n)-4);let b=4;F&&(ne(o,18,Ze),Xe(g,b,BigInt(s)),b+=8),A&&(ne(o,14,Ze),Xe(g,b,BigInt(r))),C&&(Xe(l,f+4,BigInt(r)),Xe(l,f+12,BigInt(s)))}else ne(o,14,r),ne(o,18,s),C&&(ne(l,f+4,r),ne(l,f+8,s))}async function ha(t,e,u,{zipCrypto:n}){let r;r=await e.slice(0,26).arrayBuffer(),r.byteLength!=26&&(r=r.slice(0,26));const s=new DataView(r);return(!t.encrypted||n)&&ne(s,14,t.signature),t.zip64?(ne(s,18,Ze),ne(s,22,Ze)):(ne(s,18,t.compressedSize),ne(s,22,t.uncompressedSize)),await dt(u,new Uint8Array(r)),e.slice(r.byteLength)}function pa(t,e){const{rawExtraFieldZip64:u,offset:n,diskNumberStart:r}=t,{zip64UncompressedSize:s,zip64CompressedSize:a,zip64Offset:i,zip64DiskNumberStart:o}=e,D=Te(u);let l=4;s&&(l+=8),a&&(l+=8),i&&(Xe(D,l,BigInt(n)),l+=8),o&&ne(D,l,r)}async function Ea(t,e,u){const{files:n,writer:r}=t,{diskOffset:s,writable:a}=r;let{diskNumber:i}=r,o=0,D=0,l=t.offset-s,f=n.size;for(const[,N]of n){const{rawFilename:w,rawExtraFieldZip64:x,rawExtraFieldAES:S,rawComment:T,rawExtraFieldNTFS:W,rawExtraField:R,extendedTimestamp:q,extraFieldExtendedTimestampFlag:se,lastModDate:Q}=N;let X;if(q){X=new Uint8Array(9);const V=Te(X);ae(V,0,qn),ae(V,2,5),mu(V,4,se),ne(V,5,Math.floor(Q.getTime()/1e3))}else X=new Uint8Array;N.rawExtraFieldCDExtendedTimestamp=X,D+=46+re(w,T,x,S,W,X,R)}const v=new Uint8Array(D),F=Te(v);await Qt(r);let A=0;for(const[N,w]of Array.from(n.values()).entries()){const{offset:x,rawFilename:S,rawExtraFieldZip64:T,rawExtraFieldAES:W,rawExtraFieldCDExtendedTimestamp:R,rawExtraFieldNTFS:q,rawExtraField:se,rawComment:Q,versionMadeBy:X,headerArray:V,directory:oe,zip64:ee,zip64UncompressedSize:fe,zip64CompressedSize:y,zip64DiskNumberStart:k,zip64Offset:j,msDosCompatible:te,internalFileAttribute:ye,externalFileAttribute:Pe,diskNumberStart:Be,uncompressedSize:Ne,compressedSize:L}=w,U=re(T,W,R,q,se);ne(F,o,gs),ae(F,o+4,X);const I=Te(V);fe||ne(I,18,Ne),y||ne(I,14,L),Se(v,V,o+6),ae(F,o+30,U),ae(F,o+32,re(Q)),ae(F,o+34,ee&&k?Ye:Be),ae(F,o+36,ye),Pe?ne(F,o+38,Pe):oe&&te&&mu(F,o+38,hs),ne(F,o+42,ee&&j?Ze:x),Se(v,S,o+46),Se(v,T,o+46+re(S)),Se(v,W,o+46+re(S,T)),Se(v,R,o+46+re(S,T,W)),Se(v,q,o+46+re(S,T,W,R)),Se(v,se,o+46+re(S,T,W,R,q)),Se(v,Q,o+46+re(S)+U);const $=46+re(S,Q)+U;if(o-A>r.availableSize&&(r.availableSize=0,await dt(a,v.slice(A,o)),A=o),o+=$,u.onprogress)try{await u.onprogress(N+1,n.size,new ir(w))}catch{}}await dt(a,A?v.slice(A):v);let h=r.diskNumber;const{availableSize:C}=r;C<Cn&&h++;let g=ce(t,u,un);if(l>Ze||D>Ze||f>Ye||h>Ye){if(g===!1)throw new Error(nn);g=!0}const b=new Uint8Array(g?ws:Cn),_=Te(b);o=0,g&&(ne(_,0,ps),Xe(_,4,BigInt(44)),ae(_,12,45),ae(_,14,45),ne(_,16,h),ne(_,20,i),Xe(_,24,BigInt(f)),Xe(_,32,BigInt(f)),Xe(_,40,BigInt(D)),Xe(_,48,BigInt(l)),ne(_,56,Es),Xe(_,64,BigInt(l)+BigInt(D)),ne(_,72,h+1),ce(t,u,"supportZip64SplitFile",!0)&&(h=Ye,i=Ye),f=Ye,l=Ze,D=Ze,o+=os+cs),ne(_,o,Cs),ae(_,o+4,h),ae(_,o+6,i),ae(_,o+8,f),ae(_,o+10,f),ne(_,o+12,D),ne(_,o+16,l);const B=re(e);if(B)if(B<=Ye)ae(_,o+20,B);else throw new Error(na);await dt(a,b),B&&await dt(a,e)}async function dt(t,e){const u=t.getWriter();try{await u.ready,t.size+=re(e),await u.write(e)}finally{u.releaseLock()}}function Vu(t){if(t)return(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4)}function ce(t,e,u,n){const r=e[u]===be?t.options[u]:e[u];return r===be?n:r}function kn(t){return t+5*(Math.floor(t/16383)+1)}function mu(t,e,u){t.setUint8(e,u)}function ae(t,e,u){t.setUint16(e,u,!0)}function ne(t,e,u){t.setUint32(e,u,!0)}function Xe(t,e,u){t.setBigUint64(e,u,!0)}function Se(t,e,u){t.set(e,u)}function Te(t){return new DataView(t.buffer)}function re(...t){let e=0;return t.forEach(u=>u&&(e+=u.length)),e}var Ca=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,va=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,_a=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,$u={Space_Separator:Ca,ID_Start:va,ID_Continue:_a},we={isSpaceSeparator(t){return typeof t=="string"&&$u.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||$u.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t===""||t===""||$u.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}};let Zu,Re,Ft,Au,Ct,Dt,ke,rn,Jt;var ba=function(e,u){Zu=String(e),Re="start",Ft=[],Au=0,Ct=1,Dt=0,ke=void 0,rn=void 0,Jt=void 0;do ke=ya(),Sa[Re]();while(ke.type!=="eof");return typeof u=="function"?qu({"":Jt},"",u):Jt};function qu(t,e,u){const n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let r=0;r<n.length;r++){const s=String(r),a=qu(n,s,u);a===void 0?delete n[s]:Object.defineProperty(n,s,{value:a,writable:!0,enumerable:!0,configurable:!0})}else for(const r in n){const s=qu(n,r,u);s===void 0?delete n[r]:Object.defineProperty(n,r,{value:s,writable:!0,enumerable:!0,configurable:!0})}return u.call(t,e,n)}let H,Z,qt,At,ue;function ya(){for(H="default",Z="",qt=!1,At=1;;){ue=gt();const t=or[H]();if(t)return t}}function gt(){if(Zu[Au])return String.fromCodePoint(Zu.codePointAt(Au))}function m(){const t=gt();return t===`
|
|
2
|
-
`?(Ct++,Dt=0):t?Dt+=t.length:Dt++,t&&(Au+=t.length),t}const or={default(){switch(ue){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
3
|
-
`:case"\r":case"\u2028":case"\u2029":m();return;case"/":m(),H="comment";return;case void 0:return m(),Fe("eof")}if(we.isSpaceSeparator(ue)){m();return}return or[Re]()},comment(){switch(ue){case"*":m(),H="multiLineComment";return;case"/":m(),H="singleLineComment";return}throw ge(m())},multiLineComment(){switch(ue){case"*":m(),H="multiLineCommentAsterisk";return;case void 0:throw ge(m())}m()},multiLineCommentAsterisk(){switch(ue){case"*":m();return;case"/":m(),H="default";return;case void 0:throw ge(m())}m(),H="multiLineComment"},singleLineComment(){switch(ue){case`
|
|
4
|
-
`:case"\r":case"\u2028":case"\u2029":m(),H="default";return;case void 0:return m(),Fe("eof")}m()},value(){switch(ue){case"{":case"[":return Fe("punctuator",m());case"n":return m(),xt("ull"),Fe("null",null);case"t":return m(),xt("rue"),Fe("boolean",!0);case"f":return m(),xt("alse"),Fe("boolean",!1);case"-":case"+":m()==="-"&&(At=-1),H="sign";return;case".":Z=m(),H="decimalPointLeading";return;case"0":Z=m(),H="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Z=m(),H="decimalInteger";return;case"I":return m(),xt("nfinity"),Fe("numeric",1/0);case"N":return m(),xt("aN"),Fe("numeric",NaN);case'"':case"'":qt=m()==='"',Z="",H="string";return}throw ge(m())},identifierNameStartEscape(){if(ue!=="u")throw ge(m());m();const t=Gu();switch(t){case"$":case"_":break;default:if(!we.isIdStartChar(t))throw Nn();break}Z+=t,H="identifierName"},identifierName(){switch(ue){case"$":case"_":case"":case"":Z+=m();return;case"\\":m(),H="identifierNameEscape";return}if(we.isIdContinueChar(ue)){Z+=m();return}return Fe("identifier",Z)},identifierNameEscape(){if(ue!=="u")throw ge(m());m();const t=Gu();switch(t){case"$":case"_":case"":case"":break;default:if(!we.isIdContinueChar(t))throw Nn();break}Z+=t,H="identifierName"},sign(){switch(ue){case".":Z=m(),H="decimalPointLeading";return;case"0":Z=m(),H="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Z=m(),H="decimalInteger";return;case"I":return m(),xt("nfinity"),Fe("numeric",At*(1/0));case"N":return m(),xt("aN"),Fe("numeric",NaN)}throw ge(m())},zero(){switch(ue){case".":Z+=m(),H="decimalPoint";return;case"e":case"E":Z+=m(),H="decimalExponent";return;case"x":case"X":Z+=m(),H="hexadecimal";return}return Fe("numeric",At*0)},decimalInteger(){switch(ue){case".":Z+=m(),H="decimalPoint";return;case"e":case"E":Z+=m(),H="decimalExponent";return}if(we.isDigit(ue)){Z+=m();return}return Fe("numeric",At*Number(Z))},decimalPointLeading(){if(we.isDigit(ue)){Z+=m(),H="decimalFraction";return}throw ge(m())},decimalPoint(){switch(ue){case"e":case"E":Z+=m(),H="decimalExponent";return}if(we.isDigit(ue)){Z+=m(),H="decimalFraction";return}return Fe("numeric",At*Number(Z))},decimalFraction(){switch(ue){case"e":case"E":Z+=m(),H="decimalExponent";return}if(we.isDigit(ue)){Z+=m();return}return Fe("numeric",At*Number(Z))},decimalExponent(){switch(ue){case"+":case"-":Z+=m(),H="decimalExponentSign";return}if(we.isDigit(ue)){Z+=m(),H="decimalExponentInteger";return}throw ge(m())},decimalExponentSign(){if(we.isDigit(ue)){Z+=m(),H="decimalExponentInteger";return}throw ge(m())},decimalExponentInteger(){if(we.isDigit(ue)){Z+=m();return}return Fe("numeric",At*Number(Z))},hexadecimal(){if(we.isHexDigit(ue)){Z+=m(),H="hexadecimalInteger";return}throw ge(m())},hexadecimalInteger(){if(we.isHexDigit(ue)){Z+=m();return}return Fe("numeric",At*Number(Z))},string(){switch(ue){case"\\":m(),Z+=wa();return;case'"':if(qt)return m(),Fe("string",Z);Z+=m();return;case"'":if(!qt)return m(),Fe("string",Z);Z+=m();return;case`
|
|
5
|
-
`:case"\r":throw ge(m());case"\u2028":case"\u2029":Ba(ue);break;case void 0:throw ge(m())}Z+=m()},start(){switch(ue){case"{":case"[":return Fe("punctuator",m())}H="value"},beforePropertyName(){switch(ue){case"$":case"_":Z=m(),H="identifierName";return;case"\\":m(),H="identifierNameStartEscape";return;case"}":return Fe("punctuator",m());case'"':case"'":qt=m()==='"',H="string";return}if(we.isIdStartChar(ue)){Z+=m(),H="identifierName";return}throw ge(m())},afterPropertyName(){if(ue===":")return Fe("punctuator",m());throw ge(m())},beforePropertyValue(){H="value"},afterPropertyValue(){switch(ue){case",":case"}":return Fe("punctuator",m())}throw ge(m())},beforeArrayValue(){if(ue==="]")return Fe("punctuator",m());H="value"},afterArrayValue(){switch(ue){case",":case"]":return Fe("punctuator",m())}throw ge(m())},end(){throw ge(m())}};function Fe(t,e){return{type:t,value:e,line:Ct,column:Dt}}function xt(t){for(const e of t){if(gt()!==e)throw ge(m());m()}}function wa(){switch(gt()){case"b":return m(),"\b";case"f":return m(),"\f";case"n":return m(),`
|
|
6
|
-
`;case"r":return m(),"\r";case"t":return m()," ";case"v":return m(),"\v";case"0":if(m(),we.isDigit(gt()))throw ge(m());return"\0";case"x":return m(),xa();case"u":return m(),Gu();case`
|
|
7
|
-
`:case"\u2028":case"\u2029":return m(),"";case"\r":return m(),gt()===`
|
|
8
|
-
`&&m(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ge(m());case void 0:throw ge(m())}return m()}function xa(){let t="",e=gt();if(!we.isHexDigit(e)||(t+=m(),e=gt(),!we.isHexDigit(e)))throw ge(m());return t+=m(),String.fromCodePoint(parseInt(t,16))}function Gu(){let t="",e=4;for(;e-- >0;){const u=gt();if(!we.isHexDigit(u))throw ge(m());t+=m()}return String.fromCodePoint(parseInt(t,16))}const Sa={start(){if(ke.type==="eof")throw St();Uu()},beforePropertyName(){switch(ke.type){case"identifier":case"string":rn=ke.value,Re="afterPropertyName";return;case"punctuator":ou();return;case"eof":throw St()}},afterPropertyName(){if(ke.type==="eof")throw St();Re="beforePropertyValue"},beforePropertyValue(){if(ke.type==="eof")throw St();Uu()},beforeArrayValue(){if(ke.type==="eof")throw St();if(ke.type==="punctuator"&&ke.value==="]"){ou();return}Uu()},afterPropertyValue(){if(ke.type==="eof")throw St();switch(ke.value){case",":Re="beforePropertyName";return;case"}":ou()}},afterArrayValue(){if(ke.type==="eof")throw St();switch(ke.value){case",":Re="beforeArrayValue";return;case"]":ou()}},end(){}};function Uu(){let t;switch(ke.type){case"punctuator":switch(ke.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=ke.value;break}if(Jt===void 0)Jt=t;else{const e=Ft[Ft.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,rn,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Ft.push(t),Array.isArray(t)?Re="beforeArrayValue":Re="beforePropertyName";else{const e=Ft[Ft.length-1];e==null?Re="end":Array.isArray(e)?Re="afterArrayValue":Re="afterPropertyValue"}}function ou(){Ft.pop();const t=Ft[Ft.length-1];t==null?Re="end":Array.isArray(t)?Re="afterArrayValue":Re="afterPropertyValue"}function ge(t){return Fu(t===void 0?`JSON5: invalid end of input at ${Ct}:${Dt}`:`JSON5: invalid character '${cr(t)}' at ${Ct}:${Dt}`)}function St(){return Fu(`JSON5: invalid end of input at ${Ct}:${Dt}`)}function Nn(){return Dt-=5,Fu(`JSON5: invalid identifier character at ${Ct}:${Dt}`)}function Ba(t){console.warn(`JSON5: '${cr(t)}' in strings is not valid ECMAScript; consider escaping`)}function cr(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const u=t.charCodeAt(0).toString(16);return"\\x"+("00"+u).substring(u.length)}return t}function Fu(t){const e=new SyntaxError(t);return e.lineNumber=Ct,e.columnNumber=Dt,e}var ka=function(e,u,n){const r=[];let s="",a,i,o="",D;if(u!=null&&typeof u=="object"&&!Array.isArray(u)&&(n=u.space,D=u.quote,u=u.replacer),typeof u=="function")i=u;else if(Array.isArray(u)){a=[];for(const h of u){let C;typeof h=="string"?C=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(C=String(h)),C!==void 0&&a.indexOf(C)<0&&a.push(C)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),o=" ".substr(0,n)):typeof n=="string"&&(o=n.substr(0,10)),l("",{"":e});function l(h,C){let g=C[h];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(h):typeof g.toJSON=="function"&&(g=g.toJSON(h))),i&&(g=i.call(C,h,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return f(g);if(typeof g=="number")return String(g);if(typeof g=="object")return Array.isArray(g)?A(g):v(g)}function f(h){const C={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let b="";for(let B=0;B<h.length;B++){const N=h[B];switch(N){case"'":case'"':C[N]++,b+=N;continue;case"\0":if(we.isDigit(h[B+1])){b+="\\x00";continue}}if(g[N]){b+=g[N];continue}if(N<" "){let w=N.charCodeAt(0).toString(16);b+="\\x"+("00"+w).substring(w.length);continue}b+=N}const _=D||Object.keys(C).reduce((B,N)=>C[B]<C[N]?B:N);return b=b.replace(new RegExp(_,"g"),g[_]),_+b+_}function v(h){if(r.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let C=s;s=s+o;let g=a||Object.keys(h),b=[];for(const B of g){const N=l(B,h);if(N!==void 0){let w=F(B)+":";o!==""&&(w+=" "),w+=N,b.push(w)}}let _;if(b.length===0)_="{}";else{let B;if(o==="")B=b.join(","),_="{"+B+"}";else{let N=`,
|
|
9
|
-
`+s;B=b.join(N),_=`{
|
|
10
|
-
`+s+B+`,
|
|
11
|
-
`+C+"}"}}return r.pop(),s=C,_}function F(h){if(h.length===0)return f(h);const C=String.fromCodePoint(h.codePointAt(0));if(!we.isIdStartChar(C))return f(h);for(let g=C.length;g<h.length;g++)if(!we.isIdContinueChar(String.fromCodePoint(h.codePointAt(g))))return f(h);return h}function A(h){if(r.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let C=s;s=s+o;let g=[];for(let _=0;_<h.length;_++){const B=l(String(_),h);g.push(B!==void 0?B:"null")}let b;if(g.length===0)b="[]";else if(o==="")b="["+g.join(",")+"]";else{let _=`,
|
|
12
|
-
`+s,B=g.join(_);b=`[
|
|
13
|
-
`+s+B+`,
|
|
14
|
-
`+C+"]"}return r.pop(),s=C,b}};const Na={parse:ba,stringify:ka};var La=Na;function Ma(t,e){throw new qr(t,e)}new TextEncoder;function Ta({params:t}){const e=t.design;if(Object.keys(dn).includes(e))return{pageDef:dn[e],allLink:Zr};Ma(404,"Design undefined!")}const lc=Object.freeze(Object.defineProperty({__proto__:null,load:Ta},Symbol.toStringTag,{value:"Module"})),ve=K({});function lr(t,e,u){if(Object.keys(ve).includes(t)){const r=ve[t],s=Object.keys(r);for(const a of Object.keys(e))s.includes(a)?u&&(r[a]=e[a]):r[a]=e[a];ve[t]=r}else ve[t]=e}function Pa(t){const e=t.pDef.partName,u={};for(const n of t.pDef.params)u[n.name]=n.init;lr(e,u,!1)}function Ia(t,e){e(!1)}var Oa=ie('<aside class="backdrop svelte-sjxf1e"><div class="dialog svelte-sjxf1e"><button class="svelte-sjxf1e"><img></button></div></aside>');function Dr(t,e){let u=et(e,"modalOpen",15);var n=Kt(),r=Qe(n);{var s=a=>{var i=Oa(),o=E(i),D=E(o);D.__click=[Ia,u];var l=E(D);p(D),p(o),p(i),Ce(()=>{Ae(l,"src",e.svgPath),Ae(l,"alt",e.svgPath)}),J(a,i)};Nt(r,a=>{u()&&a(s)})}J(t,n)}ft(["click"]);var za=(t,e,u)=>e(c(u)),ja=ie('<button class="svelte-fxmnfh"><img class="svelte-fxmnfh"></button>'),Ra=ie('<section class="svelte-fxmnfh"><!> <!></section>');function Va(t,e){Ve(e,!0);function u(l){const f=[];for(const v of Object.values(l.paramSvg))f.includes(v)||f.push(v);return f}let n=he(!1),r=he(""),s=ze(()=>u(e.pDef).map(l=>`${fu}/pgdsvg/${l}`));function a(l){M(r,K(l)),M(n,!0)}var i=Ra(),o=E(i);Dr(o,{get svgPath(){return c(r)},get modalOpen(){return c(n)},set modalOpen(l){M(n,K(l))}});var D=d(o,2);st(D,17,()=>c(s),at,(l,f)=>{var v=ja();v.__click=[za,a,f];var F=E(v);p(v),Ce(()=>{Ae(F,"src",c(f)),Ae(F,"alt",c(f))}),J(l,v)}),p(i),J(t,i),$e()}ft(["click"]);var $a=10**-4;function je(t){return 180*t/Math.PI}function Du(t){let e=t;return Math.abs(e)<$a&&(e=0),e}function Wu(t){let e=t%(2*Math.PI);return e<0&&(e+=2*Math.PI),e}function gu(t){let e=Wu(t);return e>Math.PI&&(e-=2*Math.PI),e}function Ua(t,e,u){const n=gu(e)-gu(t);return u?Wu(n):Wu(n)-2*Math.PI}function Ot(t){return t.toFixed(2)}var _e={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"},jt=.05;function Ya(t,e,u){const n=u.shiftX+(t-u.xMin)*u.scaleX,r=u.shiftY+(e-u.yMin)*u.scaleY;return[n,r]}function Bt(t,e,u){const n=(t-u.shiftX)/u.scaleX+u.xMin,r=(e-u.shiftY)/u.scaleY+u.yMin;return[n,r]}function hu(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function eu(t){return{init:t.init,xMin:t.xMin,yMin:t.yMin,xyDiff:t.xyDiff,shiftX:t.shiftX,shiftY:t.shiftY,scaleX:t.scaleX,scaleY:t.scaleY}}function Hu(t,e,u,n,r,s){const a=hu(),i=Math.max(e-t,1),o=Math.max(n-u,1),D=r/i,l=s/o;let f=.9*D,v=i;return l<D&&(f=.9*l,v=o),a.init=1,a.xMin=t,a.yMin=u,a.xyDiff=v,a.shiftX=jt*r,a.scaleX=f,a.shiftY=s-jt*s,a.scaleY=-1*f,a}function Xa(t,e,u){const n=eu(u);return n.xMin=t-n.xyDiff/2,n.yMin=e-n.xyDiff/2,n}function Za(t,e,u,n,r,s){const a=Math.min(t,u),i=Math.max(t,u),o=Math.min(e,n),D=Math.max(e,n);return Hu(a,i,o,D,r,s)}function cu(t,e){const u=eu(e),n=(1-t)/2;return u.xMin+=n*e.xyDiff,u.yMin+=n*e.xyDiff,u.xyDiff*=t,u.scaleX*=1/t,u.scaleY*=1/t,u}function qa(t,e,u,n,r){const s=eu(r),a=u-t,i=n-e;return s.xMin+=-a,s.yMin+=-i,s}function Ga(t,e,u){const n=eu(u);if(t>0&&e>0){const r=t/e;n.xyDiff*=r,n.scaleX*=1/r,n.scaleY*=1/r,n.shiftX+=jt*e-jt*t,n.shiftY+=(1-jt)*e-(1-jt)*t}return n}function Wa(t,e){let u=0;if(e>t)throw`err539: ila < ilc ${t} ${e}`;return u=Math.sqrt(t**2-e**2),u}var Ha=class zt{constructor(e,u,n=0){Y(this,"cx");Y(this,"cy");Y(this,"shape");this.cx=e,this.cy=u,this.shape=n}draw(e,u,n=_e.point,r=0){if(isFinite(this.cx)&&isFinite(this.cy)){const s=e.canvas.width*.006999999999999999,a=2*s,[i,o]=Ya(this.cx,this.cy,u);let D=r;switch(D===0&&(D=this.shape),e.beginPath(),D){case 2:e.moveTo(i-a,o),e.lineTo(i+a,o),e.moveTo(i,o-a),e.lineTo(i,o+a);break;case 3:e.rect(i-s,o-s,2*s,2*s);break;case 4:e.rect(i-2*s,o-2*s,4*s,4*s);break;case 5:e.moveTo(i-a,o),e.lineTo(i+a,o),e.lineTo(i,o+a),e.lineTo(i,o-a),e.lineTo(i-a,o);break;case 6:e.moveTo(i-a,o),e.lineTo(i+a,o),e.lineTo(i,o-a),e.lineTo(i,o+a);break;case 7:e.moveTo(i+a,o),e.lineTo(i-a,o),e.lineTo(i,o-a),e.lineTo(i,o+a);break;case 8:e.moveTo(i+a,o),e.lineTo(i-a,o),e.lineTo(i,o+a),e.lineTo(i,o-a);break;case 9:e.moveTo(i-a,o),e.lineTo(i+a,o),e.lineTo(i,o+a),e.lineTo(i,o-a);break;case 1:default:e.arc(i,o,s,0,2*Math.PI)}e.strokeStyle=n,e.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(e,u){return new zt(u*Math.cos(e),u*Math.sin(e))}translate(e,u){return new zt(this.cx+e,this.cy+u)}translatePolar(e,u){return new zt(this.cx+u*Math.cos(e),this.cy+u*Math.sin(e))}clone(e=0){return new zt(this.cx,this.cy,e)}rotateOrig(e){const u=this.getPolar();return this.setPolar(u[0]+e,u[1])}scaleOrig(e){const u=this.getPolar();return this.setPolar(u[0],u[1]*e)}rotate(e,u){const r=this.translate(-1*e.cx,-1*e.cy).getPolar();return this.setPolar(r[0]+u,r[1]).translate(e.cx,e.cy)}scale(e,u){const r=this.translate(-1*e.cx,-1*e.cy).getPolar();return this.setPolar(r[0],r[1]*u).translate(e.cx,e.cy)}isEqual(e){return Du(this.cx-e.cx)===0&&Du(this.cy-e.cy)===0}distanceToPoint(e){return Math.sqrt((e.cx-this.cx)**2+(e.cy-this.cy)**2)}angleToPoint(e){if(Du(this.distanceToPoint(e))===0)throw`err434: no angle because points identical ${this.cx} ${e.cx} ${this.cy} ${e.cy}`;return Math.atan2(e.cy-this.cy,e.cx-this.cx)}angleFromToPoints(e,u){const n=this.angleToPoint(e),r=this.angleToPoint(u);return gu(r-n)}middlePoint(e){const u=(this.cx+e.cx)/2,n=(this.cy+e.cy)/2;return new zt(u,n)}equidistantPoint(e,u,n){const r=this.distanceToPoint(e)/2;if(this.isEqual(e))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(u<r)throw`err392: equidistance ${u} smaller than lp1p2h ${r}`;const s=this.middlePoint(e),a=this.angleToPoint(e)+Math.PI/2,i=Math.sqrt(u**2-r**2),o=s.translatePolar(a,i),D=s.translatePolar(a+Math.PI,i),l=n.distanceToPoint(o),f=n.distanceToPoint(D);if(i!==0&&l===f)throw`err284: magnet point p3 is on line p1p2. cx ${n.cx} cy: ${n.cy}`;let v=o;return f<l&&(v=D),v}};function lt(t,e,u=0){return new Ha(t,e,u)}function fr(t){let e=0,u=0,n=0,r=0;if(t.length>0){const s=t[0];if(s.cx===Number.NEGATIVE_INFINITY||s.cx===Number.POSITIVE_INFINITY||s.cy===Number.NEGATIVE_INFINITY||s.cy===Number.POSITIVE_INFINITY)throw`err292: pointMinMax first point with infinity: ${s.cx} ${s.cy}`;e=t[0].cx,u=t[0].cx,n=t[0].cy,r=t[0].cy;for(const a of t)a.cx!==Number.NEGATIVE_INFINITY&&(e=Math.min(e,a.cx)),a.cx!==Number.POSITIVE_INFINITY&&(u=Math.max(u,a.cx)),a.cy!==Number.NEGATIVE_INFINITY&&(n=Math.min(n,a.cy)),a.cy!==Number.POSITIVE_INFINITY&&(r=Math.max(r,a.cy))}return[e,u,n,r]}var sn=class dr{constructor(e,u,n,r,s=!1,a=!1){Y(this,"sType");Y(this,"px");Y(this,"py");Y(this,"radius");Y(this,"arcLarge");Y(this,"arcCcw");this.sType=e,this.px=u,this.py=n,this.radius=r,this.arcLarge=s,this.arcCcw=a}clone(){return new dr(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},Ja=class{constructor(t,e,u,n,r,s,a,i=!1){Y(this,"sType");Y(this,"p1");Y(this,"p2");Y(this,"pc");Y(this,"radius");Y(this,"a1");Y(this,"a2");Y(this,"arcCcw");this.sType=t,this.p1=e,this.p2=u,this.pc=n,this.radius=r,this.a1=s,this.a2=a,this.arcCcw=i}};function an(t,e,u){if(u.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${u.sType}`;const n=lt(t,e),r=lt(u.px,u.py),s=n.distanceToPoint(r)/2;if(n.isEqual(r))throw`err638: no equidistance because identical point ${n.cx} ${r.cy}`;let a=0;if(Du(u.radius-s)===0)a=0;else{if(u.radius<s)throw`err399: radius ${u.radius} smaller than lp1p2h ${s}`;a=Wa(u.radius,s)}const i=n.middlePoint(r),o=n.angleToPoint(r)+Math.PI/2,D=i.translatePolar(o,a),l=i.translatePolar(o+Math.PI,a);let f=D;(!u.arcLarge&&!u.arcCcw||u.arcLarge&&u.arcCcw)&&(f=l);const v=f.angleToPoint(n),F=f.angleToPoint(r);return new Ja(1,n,r,f,u.radius,v,F,u.arcCcw)}var Ka=class{constructor(){Y(this,"svgStr");Y(this,"payloadStr");Y(this,"groupActive");this.payloadStr="",this.svgStr="",this.groupActive=!1}addHeader(t,e,u,n){const r=`${t} ${u} ${e} ${n}`;this.svgStr=`<svg width="${e}" height="${n}" viewBox="${r}" xmlns="http://www.w3.org/2000/svg">`}addSvgString(t){this.payloadStr+=t}addGroup(t){if(this.groupActive)throw"err321: group must be closed before opening a new one";this.groupActive=!0,this.payloadStr+=`<g id="${t}">`}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 Qa(){return new Ka}function nt(t){return t.toFixed(4)}var ei=class{constructor(){Y(this,"dxfStr");this.dxfStr=`0
|
|
15
|
-
SECTION
|
|
16
|
-
2
|
|
17
|
-
ENTITIES
|
|
18
|
-
`}addCircle(t,e,u){this.dxfStr+=`0
|
|
19
|
-
CIRCLE
|
|
20
|
-
8
|
|
21
|
-
PARAMETRIX
|
|
22
|
-
`,this.dxfStr+=`10
|
|
23
|
-
${nt(t)}
|
|
24
|
-
20
|
|
25
|
-
${nt(e)}
|
|
26
|
-
40
|
|
27
|
-
${nt(u)}
|
|
28
|
-
`}addLine(t,e,u,n){this.dxfStr+=`0
|
|
29
|
-
LINE
|
|
30
|
-
8
|
|
31
|
-
PARAMETRIX
|
|
32
|
-
`,this.dxfStr+=`10
|
|
33
|
-
${nt(t)}
|
|
34
|
-
20
|
|
35
|
-
${nt(e)}
|
|
36
|
-
11
|
|
37
|
-
${nt(u)}
|
|
38
|
-
21
|
|
39
|
-
${nt(n)}
|
|
40
|
-
`}addArc(t,e,u,n,r){this.dxfStr+=`0
|
|
41
|
-
ARC
|
|
42
|
-
8
|
|
43
|
-
PARAMETRIX
|
|
44
|
-
`,this.dxfStr+=`10
|
|
45
|
-
${nt(t)}
|
|
46
|
-
20
|
|
47
|
-
${nt(e)}
|
|
48
|
-
40
|
|
49
|
-
${nt(u)}
|
|
50
|
-
50
|
|
51
|
-
${nt(n)}
|
|
52
|
-
51
|
|
53
|
-
${nt(r)}
|
|
54
|
-
`}close(){this.dxfStr+=`0
|
|
55
|
-
ENDSEC
|
|
56
|
-
0
|
|
57
|
-
EOF
|
|
58
|
-
`}stringify(){return this.close(),this.dxfStr}};function ti(){return new ei}function ui(t,e,u){const n=an(t,e,u),r=lt(n.pc.cx,n.pc.cy),s=gu((n.a2-n.a1)/2);let a=n.a1+s;return(Math.sign(s)>0&&!u.arcCcw||Math.sign(s)<0&&u.arcCcw)&&(a+=Math.PI),r.translatePolar(a,u.radius)}var ni=class Ju{constructor(){Y(this,"pointList");Y(this,"lineList");Y(this,"vectorList");Y(this,"mainList");Y(this,"mainBList");Y(this,"secondList");Y(this,"secondBList");Y(this,"dynamicsList");Y(this,"xMin");Y(this,"xMax");Y(this,"yMin");Y(this,"yMax");this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(e){this.pointList.push(e)}addPoints(e){this.pointList.push(...e)}addLine(e){this.lineList.push(e)}addLines(e){for(const u of e)this.lineList.push(u)}addVector(e){this.vectorList.push(e)}addMainOI(e){const u=[];for(const n of e){const r=n.generateContour();this.addPoints(r.generatePoints()),this.addLines(r.generateLines()),u.push(r),this.mainBList.push(n.extractSkeleton())}this.mainList.push(u)}addMainO(e){const u=[e];this.addMainOI(u)}addSecond(e){const u=e.generateContour();this.addPoints(u.generatePoints()),this.addLines(u.generateLines()),this.secondList.push(u),this.secondBList.push(e.extractSkeleton())}addDynamics(e){this.addPoints(e.generatePoints()),this.addLines(e.generateLines()),this.dynamicsList.push(e)}translate(e,u){const n=new Ju;for(const r of this.pointList)n.addPoint(r.translate(e,u));for(const r of this.lineList)n.addLine(r.translate(e,u));for(const r of this.vectorList)n.addVector(r.translate(e,u));for(const r of this.mainList){const s=[];for(const a of r)s.push(a.translate(e,u));n.addMainOI(s)}for(const r of this.secondList)n.addSecond(r.translate(e,u));for(const r of this.dynamicsList)n.addDynamics(r.translate(e,u));return n}translatePolar(e,u){return this.translate(u*Math.cos(e),u*Math.sin(e))}rotate(e,u,n){const r=new Ju,s=lt(e,u);for(const a of this.pointList)r.addPoint(a.rotate(s,n));for(const a of this.lineList)r.addLine(a.rotate(s,n));for(const a of this.vectorList)r.addVector(a.rotate(s,n));for(const a of this.mainList){const i=[];for(const o of a)i.push(o.rotate(e,u,n));r.addMainOI(i)}for(const a of this.secondList)r.addSecond(a.rotate(e,u,n));for(const a of this.dynamicsList)r.addDynamics(a.rotate(e,u,n));return r}mergeFigure(e,u=!1){for(const n of e.pointList)this.addPoint(n.clone());for(const n of e.lineList)this.addLine(n.clone());for(const n of e.vectorList)this.addVector(n.clone());for(const n of e.mainList){const r=[];for(const s of n)r.push(s.clone());if(u)for(const s of r)this.addSecond(s);else this.addMainOI(r)}for(const n of e.secondList)this.addSecond(n.clone());for(const n of e.dynamicsList)this.addDynamics(n.clone())}mainListC(){const e=[];for(const u of this.mainList)for(const n of u)e.push(n);return e}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=fr(this.pointList)}getAdjustFull(e,u){let n=hu();return this.pointList.length>0&&(this.getMinMax(),n=Hu(this.xMin,this.xMax,this.yMin,this.yMax,e,u)),n}getAdjustZoom(e,u){let n=hu();if(this.pointList.length>0){this.getMinMax();const r=(this.xMin+this.xMax)/2,s=(this.yMin+this.yMax)/2;n=Hu(r,this.xMax,s,this.yMax,e,u)}return n}quantifyRuler(e,u){const r=e/10/u.scaleX;let s=1e-4;for(;s<r;)s*=10;s/5>r?s/=5:s/2>r&&(s/=2);const a=s*u.scaleX;return[s,a]}drawRuler(e,u,n){const[r,s]=this.quantifyRuler(e.canvas.width,u),a=e.canvas.width-10-s;e.font="15px Arial",e.fillStyle=n,e.fillText(`${r.toFixed(4)}`,a,20),e.beginPath(),e.moveTo(a,25),e.lineTo(a+s,25),e.lineTo(a+s,25+s),e.strokeStyle=n,e.stroke()}draw(e,u,n){if(n.points)for(const r of this.pointList)r.draw(e,u);if(n.lines)for(const r of this.lineList)r.draw(e,u);if(n.vectors)for(const r of this.vectorList)r.draw(e,u);if(n.main)for(const r of this.mainList)for(const[s,a]of r.entries()){let i=_e.mainOuter;s>0&&(i=_e.mainInner),a.draw(e,u,i)}if(n.mainB)for(const r of this.mainBList)r.draw(e,u,_e.mainB);if(n.second)for(const r of this.secondList)r.draw(e,u,_e.second);if(n.secondB)for(const r of this.secondBList)r.draw(e,u,_e.secondB);if(n.dynamics)for(const r of this.dynamicsList)r.draw(e,u,_e.dynamics);if(n.ruler&&this.drawRuler(e,u,_e.ruler),n.refframe){for(const r of[10,100,200])lt(r,0).draw(e,u,_e.reference,2),lt(-r,0).draw(e,u,_e.reference,2),lt(0,r).draw(e,u,_e.reference,2),lt(0,-r).draw(e,u,_e.reference,2);lt(0,0).draw(e,u,_e.origin,2)}}};function ri(){return new ni}function pu(t){const e=ri();for(const u in t){const n=t[u];for(const r of n.pointList)e.pointList.push(r);for(const r of n.lineList)e.lineList.push(r);for(const r of n.vectorList)e.vectorList.push(r);for(const r of n.mainList)e.mainList.push(r);for(const r of n.mainBList)e.mainBList.push(r);for(const r of n.secondList)e.secondList.push(r);for(const r of n.secondBList)e.secondBList.push(r);for(const r of n.dynamicsList)e.dynamicsList.push(r)}return e}function si(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function ai(t){return{points:t.points,lines:t.lines,vectors:t.vectors,main:t.main,mainB:t.mainB,second:t.second,secondB:t.secondB,dynamics:t.dynamics,ruler:t.ruler,refframe:t.refframe}}var Gt=(t=>(t[t.eNumber=0]="eNumber",t[t.eCheckbox=1]="eCheckbox",t[t.eDropdown=2]="eDropdown",t[t.eSectionSeparator=3]="eSectionSeparator",t))(Gt||{}),Vt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function Ln(t){const e={};for(const u of Object.keys(t))e[u]=t[u].val;return e}var ii=class{figureToPaxF(t){const e=[];for(const u of t){const n=[];for(const r of u)n.push(r.toPax());e.push(n)}return e}getFigures(t){const e={};for(const u in t){const n=this.figureToPaxF(t[u].mainList);e[u]=n}return e}getPaxJson(t,e,u){return{partName:e.partName,pDef:u,params:t,figures:this.getFigures(e.fig),volume:e.vol,subs:e.sub,log:e.logstr}}getPaxStr(t,e,u){const n=this.getPaxJson(t,e,u);return JSON.stringify(n,null,2)}};function Lt(){return new ii}function on(t){let e=6;return t===1?e=0:t===2&&(e=1),e}function oi(t){return new sn(on(t.typ),t.px,t.py,t.radius,t.large,t.ccw)}function mr(t,e,u,n){let r=Math.PI/2;e<2*u&&(r=2*Math.asin(e/(2*u)));const s=Math.min(t,r),a=Math.ceil(n/s),i=n/a;return[a,i]}function Ar(t,e,u,n=Math.PI/6,r=2){const[s,a]=mr(n,r,u,2*Math.PI),i=[];for(let l=0;l<s;l++){const f=t+u*Math.cos(l*a),v=e+u*Math.sin(l*a);i.push([f,v])}const o=i[0][0],D=i[0][1];return i.push([o,D]),i}function Fr(t,e,u,n,r,s,a=Math.PI/6,i=2){const o=Ua(n,r,s),[D,l]=mr(a,i,u,Math.abs(o)),f=s?l:-l,v=D+1,F=[];for(let A=1;A<v;A++){const h=n+A*f,C=t+u*Math.cos(h),g=e+u*Math.sin(h);F.push([C,g])}return F}var gr=Math.PI/16,hr=2;function Mn(t){return t.toFixed(4)}function Tn(t){return t.toString().padStart(3,"0")}function Pn(t,e){return[[t,e]]}function ci(t,e,u,n,r,s){return Fr(t,e,u,n,r,s,gr,hr)}function li(t,e,u){return Ar(t,e,u,gr,hr)}function Di(t){const e=[];let u=0,n=0;for(const r of t){if(r.typ===0)e.push(...Pn(r.px,r.py));else if(r.typ===1)e.push(...Pn(r.px,r.py));else if(r.typ===2)try{const s=r,a=new sn(on(s.typ),s.px,s.py,s.radius,s.large,s.ccw),i=an(u,n,a);e.push(...ci(i.pc.cx,i.pc.cy,a.radius,i.a1,i.a2,i.arcCcw))}catch(s){console.log("err730: "+s)}u=r.px,n=r.py}return e}var fi=class{constructor(){Y(this,"pts");Y(this,"ptIdx");Y(this,"idx");this.pts=[],this.ptIdx=[],this.idx=0}addContour(t){const e=[],u=[];for(const s of t){const[a,i]=s;e.push(`[ ${Mn(a)}, ${Mn(i)} ]`),u.push(` ${this.idx}`),this.idx+=1}const n=`[ ${e.join(",")} ]`,r=`[ ${u.join(",")} ]`;this.pts.push(n),this.ptIdx.push(r)}getFigure(t){let e="";const u=[],n=[];for(const a of this.pts.keys()){const i=`ca_${t}_${Tn(a)}`,o=`cb_${t}_${Tn(a)}`;e+=`${i} = ${this.pts[a]};
|
|
59
|
-
`,e+=`${o} = ${this.ptIdx[a]};
|
|
60
|
-
`,u.push(i),n.push(o)}const r=u.join(", "),s=n.join(", ");return e+=`a_${t} = concat(${r});
|
|
61
|
-
`,e+=`b_${t} = [${s}];
|
|
62
|
-
`,e}},di=class{getHeader(){return`// Generated by Parametrix
|
|
63
|
-
`}getOneFigure(t,e){const u=new fi;for(const r of t)for(const s of r)if(s.circle===!0){const a=s,i=li(a.cx,a.cy,a.radius);u.addContour(i)}else{const i=Di(s.seg);u.addContour(i)}return u.getFigure(e)}getAllFigures(t,e){let u="";for(const n in t){const r=this.getOneFigure(t[n],`${e}_${n}`);u+=r}return u}getOneExtrude(t){let e="rotate_extrude",u="";return t.extrudeMethod===0&&(t.length===void 0&&console.log("err103: design error: scad-linear_extrude length undefined!"),e="linear_extrude",u=`height = ${t.length}`),`
|
|
64
|
-
module ${t.outName} () {
|
|
65
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]} ])
|
|
66
|
-
rotate( [ ${je(t.rotate[0])}, ${je(t.rotate[1])}, ${je(t.rotate[2])} ])
|
|
67
|
-
${e}(${u}) polygon(a_${t.face}, b_${t.face});
|
|
68
|
-
}
|
|
69
|
-
`}getAllExtrudes(t){let e="";for(const u of t){const n=this.getOneExtrude(u);e+=n}return e}getOneVolume(t){let e="identity";switch(t.boolMethod){case 1:e="intersection";break;case 2:e="union";break;case 3:e="difference";break}const u=[];for(const s of t.inList)u.push(`${s}();`);const n=u.join(`
|
|
70
|
-
`);let r=`
|
|
71
|
-
module ${t.outName} () {
|
|
72
|
-
${e} () {
|
|
73
|
-
${n}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
`;return t.boolMethod===0&&(r=`
|
|
77
|
-
module ${t.outName} () {
|
|
78
|
-
${n}
|
|
79
|
-
}
|
|
80
|
-
`),r}getAllVolumes(t){let e="";for(const u of t){const n=this.getOneVolume(u);e+=n}return e}getAllSubGeoms(t){const e=[];for(const u of t)e.includes(u.subgeom)||e.push(u.subgeom);return e}getOneInherit(t){return`
|
|
81
|
-
module ${t.outName} () {
|
|
82
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]} ])
|
|
83
|
-
rotate( [ ${je(t.rotate[0])}, ${je(t.rotate[1])}, ${je(t.rotate[2])} ])
|
|
84
|
-
${t.subdesign}();
|
|
85
|
-
}
|
|
86
|
-
`}getAllInherits(t){let e="";for(const u of t){const n=this.getOneInherit(u);e+=n}return e}getVolume(t){let e="";if(t.inherits!==void 0){const u=this.getAllSubGeoms(t.inherits);for(const n of u){const r=Lt().getPaxJson({},n,Vt);e+=this.getAllFigures(r.figures,r.partName),e+=this.getVolume(n.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
87
|
-
pax_${t}();
|
|
88
|
-
`}getExportFile(t){let e=this.getHeader();return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function mi(){return new di}var pr=Math.PI/16,Er=2;function In(t){return t.toFixed(4)}function On(t){return t.toString().padStart(3,"0")}function zn(t,e){return[[t,e]]}function Ai(t,e,u,n,r,s){return Fr(t,e,u,n,r,s,pr,Er)}function Fi(t){const e=[];let u=0,n=0;for(const r of t){if(r.typ===0)e.push(...zn(r.px,r.py));else if(r.typ===1)e.push(...zn(r.px,r.py));else if(r.typ===2)try{const s=r,a=new sn(on(s.typ),s.px,s.py,s.radius,s.large,s.ccw),i=an(u,n,a);e.push(...Ai(i.pc.cx,i.pc.cy,a.radius,i.a1,i.a2,i.arcCcw))}catch(s){console.log("err730: "+s)}u=r.px,n=r.py}return e}function gi(t,e,u){return Ar(t,e,u,pr,Er)}function Cr(t,e){const u=[];for(const s of t){const[a,i]=s;u.push(`[ ${In(a)}, ${In(i)} ]`)}const n=`[ ${u.join(`,
|
|
89
|
-
`)} ]`;return`const ${e} = polygon({ points: ${n} });
|
|
90
|
-
|
|
91
|
-
`}function hi(t,e,u,n){const r=gi(t,e,u);return Cr(r,n)}function pi(t,e){const u=Fi(t);return Cr(u,e)}function Ei(t,e){let u="";const n=t[0];return t.slice(1).length>0?u+=`${e} = subtract( ${t.join(", ")} );
|
|
92
|
-
`:u+=`${e} = ${n};
|
|
93
|
-
`,u}function Ci(t,e){let u="";const n=t[0];return t.slice(1).length>0?u+=`${e} = union( ${t.join(", ")} );
|
|
94
|
-
`:u+=`${e} = ${n};
|
|
95
|
-
`,u}var vi=class{getHeader(){return`// Generated by Parametrix
|
|
96
|
-
|
|
97
|
-
const { polygon } = require('@jscad/modeling').primitives;
|
|
98
|
-
//const { subtract } = require('@jscad/modeling').booleans;
|
|
99
|
-
//const { union, intersect, scission, subtract } = require('@jscad/modeling').booleans;
|
|
100
|
-
const { union, intersect, subtract } = require('@jscad/modeling').booleans;
|
|
101
|
-
const { extrudeLinear, extrudeRotate } = require('@jscad/modeling').extrusions;
|
|
102
|
-
const { translate, rotate } = require('@jscad/modeling').transforms;
|
|
103
|
-
|
|
104
|
-
const main = () => {
|
|
105
|
-
|
|
106
|
-
`}getOneFigure(t,e){let u="";const n=[];for(const[r,s]of t.entries()){const a=`face_${e}_Fa${On(r)}`,i=[];for(const[o,D]of s.entries()){const l=`ctr_${a}_Ctr${On(o)}`;if(D.circle===!0){const f=D;u+=hi(f.cx,f.cy,f.radius,l)}else u+=pi(D.seg,l);i.push(l)}u+=Ei(i,a),n.push(a)}return u+=Ci(n,e),u}getAllFigures(t,e){let u="";for(const n in t){const r=this.getOneFigure(t[n],`fig_${e}_${n}`);u+=r}return u}getOneExtrude(t){let e="extrudeRotate",u="{segments: 32}";return t.extrudeMethod===0&&(t.length===void 0&&console.log("err079: design error: extrudeLinear length undefined!"),e="extrudeLinear",u=`{height: ${t.length}}`),`
|
|
107
|
-
const ${t.outName} =
|
|
108
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]}, ],
|
|
109
|
-
rotate( [ ${t.rotate[0]}, ${t.rotate[1]}, ${t.rotate[2]}, ],
|
|
110
|
-
${e}( ${u}, fig_${t.face} )
|
|
111
|
-
)
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
`}getAllExtrudes(t){let e="";for(const u of t){const n=this.getOneExtrude(u);e+=n}return e}getOneVolume(t){let e="identity";switch(t.boolMethod){case 1:e="intersect";break;case 2:e="union";break;case 3:e="subtract";break}const u=t.inList.join(", ");let n=`const ${t.outName} = ${e}( ${u} );
|
|
115
|
-
`;return t.boolMethod===0&&(n=`const ${t.outName} = ${t.inList[0]};
|
|
116
|
-
`),n}getAllVolumes(t){let e="";for(const u of t){const n=this.getOneVolume(u);e+=n}return e}getAllSubGeoms(t){const e=[];for(const u of t)e.includes(u.subgeom)||e.push(u.subgeom);return e}getOneInherit(t){return`
|
|
117
|
-
const ${t.outName} =
|
|
118
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]}, ],
|
|
119
|
-
rotate( [ ${t.rotate[0]}, ${t.rotate[1]}, ${t.rotate[2]}, ],
|
|
120
|
-
${t.subdesign}
|
|
121
|
-
)
|
|
122
|
-
);
|
|
123
|
-
`}getAllInherits(t){let e="";for(const u of t){const n=this.getOneInherit(u);e+=n}return e}getVolume(t){let e="";if(t.inherits!==void 0){const u=this.getAllSubGeoms(t.inherits);for(const n of u){const r=Lt().getPaxJson({},n,Vt);e+=this.getAllFigures(r.figures,r.partName),e+=this.getVolume(n.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
124
|
-
return pax_${t};
|
|
125
|
-
}
|
|
126
|
-
module.exports = { main };
|
|
127
|
-
`}getExportFile(t){let e=this.getHeader();return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function _i(){return new vi}function Ee(t){return t.toFixed(4)}function Me(t){return t.toString().padStart(3,"0")}function bi(t,e,u,n){return`def ${n}():
|
|
128
|
-
# Radius, XYZ-position, orientation
|
|
129
|
-
aCircle = Part.makeCircle(${Ee(u)}, App.Vector(${Ee(t)}, ${Ee(e)}, 0), App.Vector(0, 0, 1))
|
|
130
|
-
aWire = Part.Wire(aCircle)
|
|
131
|
-
rFace = Part.Face(aWire)
|
|
132
|
-
return rFace
|
|
133
|
-
|
|
134
|
-
`}function yi(t,e){let u=`def ${e}():
|
|
135
|
-
`,n=0,r=0,s=0,a=0,i=0;for(const[D,l]of t.entries()){if(l.typ===0)u+=` P${Me(s)} = App.Vector(${Ee(l.px)}, ${Ee(l.py)}, 0)
|
|
136
|
-
`,s+=1;else if(l.typ===1)u+=` P${Me(s)} = App.Vector(${Ee(l.px)}, ${Ee(l.py)}, 0)
|
|
137
|
-
`,D<t.length-1?a=s:a=0,u+=` S${Me(i)} = Part.LineSegment(P${Me(s-1)}, P${Me(a)})
|
|
138
|
-
`,s+=1,i+=1;else if(l.typ===2){try{const f=oi(l),v=ui(n,r,f);u+=` P${Me(s)} = App.Vector(${Ee(v.cx)}, ${Ee(v.cy)}, 0)
|
|
139
|
-
`,s+=1}catch(f){console.log("err730: "+f)}u+=` P${Me(s)} = App.Vector(${Ee(l.px)}, ${Ee(l.py)}, 0)
|
|
140
|
-
`,D<t.length-1?a=s:a=0,u+=` S${Me(i)} = Part.Arc(P${Me(s-2)}, P${Me(s-1)}, P${Me(a)})
|
|
141
|
-
`,s+=1,i+=1}n=l.px,r=l.py}const o=Array.from({length:i},(D,l)=>`S${Me(l)}`);return u+=` aShape = Part.Shape([${o.join(", ")}])
|
|
142
|
-
aWire = Part.Wire(aShape.Edges)
|
|
143
|
-
subFace = Part.Face(aWire)
|
|
144
|
-
subFace.check()
|
|
145
|
-
return subFace
|
|
146
|
-
|
|
147
|
-
`,u}function wi(t,e){let u=`def ${e}():
|
|
148
|
-
`;const n=[];for(const[a,i]of t.entries()){const o=`FC${Me(a)}`;u+=` ${o} = ${i}()
|
|
149
|
-
`,n.push(o)}const r=n[0],s=n.slice(1);return s.length>0?u+=` rOneFace = ${r}.cut([${s.join(", ")}])
|
|
150
|
-
`:u+=` rOneFace = ${r}
|
|
151
|
-
`,u+=` rOneFace.check()
|
|
152
|
-
return rOneFace
|
|
153
|
-
|
|
154
|
-
`,u}function xi(t,e){let u=`def ${e}():
|
|
155
|
-
`;const n=[];for(const[a,i]of t.entries()){const o=`FA${Me(a)}`;u+=` ${o} = ${i}()
|
|
156
|
-
`,n.push(o)}const r=n[0],s=n.slice(1);return s.length>0?u+=` rOneFig = ${r}.fuse([${s.join(", ")}])
|
|
157
|
-
`:u+=` rOneFig = ${r}
|
|
158
|
-
`,u+=` rOneFig.check()
|
|
159
|
-
return rOneFig
|
|
160
|
-
|
|
161
|
-
`,u}var Si=class{getHeader(t){return`# freecad-python generated by Parametrix
|
|
162
|
-
# run the script with:
|
|
163
|
-
# freecad.cmd myScript.py
|
|
164
|
-
|
|
165
|
-
import FreeCAD as App
|
|
166
|
-
import Part
|
|
167
|
-
|
|
168
|
-
#print(sys.argv)
|
|
169
|
-
outFileName = "${t}"
|
|
170
|
-
if (len(sys.argv) == 3):
|
|
171
|
-
outFileName = sys.argv[2]
|
|
172
|
-
print(f"outFileName: {outFileName}")
|
|
173
|
-
|
|
174
|
-
`}getOneFigure(t,e){let u="";const n=[];for(const[r,s]of t.entries()){const a=`face_${e}_Fa${r}`,i=[];for(const[o,D]of s.entries()){const l=`ctr_${a}_Ctr${o}`;if(D.circle===!0){const f=D;u+=bi(f.cx,f.cy,f.radius,l)}else u+=yi(D.seg,l);i.push(l)}u+=wi(i,a),n.push(a)}return u+=xi(n,e),u}getAllFigures(t,e){let u="";for(const n in t){const r=this.getOneFigure(t[n],`${e}_${n}`);u+=r}return u}getOneExtrude(t){let e=`def fex_${t.outName}():
|
|
175
|
-
FIG = ${t.face}()
|
|
176
|
-
`;return t.extrudeMethod===0?(t.length===void 0&&console.log(`err103: ${t.face} ${t.outName} design error: eLinearOrtho length undefined!`),e+=` VEX = FIG.extrude(App.Vector(0, 0, ${t.length}))`):t.extrudeMethod===1&&(e+=" VEX = FIG.revolve(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 360).rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 90)"),e+=`
|
|
177
|
-
VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${Ee(je(t.rotate[0]))})
|
|
178
|
-
VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${Ee(je(t.rotate[1]))})
|
|
179
|
-
VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${Ee(je(t.rotate[2]))})
|
|
180
|
-
VFP = VR3.translate(App.Vector(${Ee(t.translate[0])}, ${Ee(t.translate[1])}, ${Ee(t.translate[2])}))
|
|
181
|
-
return VFP
|
|
182
|
-
${t.outName} = fex_${t.outName}()
|
|
183
|
-
|
|
184
|
-
`,e}getAllExtrudes(t){let e="";for(const u of t){const n=this.getOneExtrude(u);e+=n}return e}getOneVolume(t){let e="";if(t.inList.length===0)console.log(`err215: ${t.outName} has an empty inList`);else if(t.inList.length===1||t.boolMethod===0)e+=`${t.outName} = ${t.inList[0]}
|
|
185
|
-
`;else{const u=t.inList[0],n=t.inList.slice(1);let r="dbg897";switch(t.boolMethod){case 1:r="common";break;case 2:r="fuse";break;case 3:r="cut";break}e+=`def fvol_${t.outName}():
|
|
186
|
-
V000 = ${u}
|
|
187
|
-
`;let s=0;for(const a of n)e+=` V${Me(s+1)} = V${Me(s)}.${r}(${a})
|
|
188
|
-
`,s+=1;e+=` VFC = V${Me(s)}.removeSplitter()
|
|
189
|
-
return VFC
|
|
190
|
-
${t.outName} = fvol_${t.outName}()
|
|
191
|
-
|
|
192
|
-
`}return e}getAllVolumes(t){let e="";for(const u of t){const n=this.getOneVolume(u);e+=n}return e}getAllSubGeoms(t){const e=[];for(const u of t)e.includes(u.subgeom)||e.push(u.subgeom);return e}getOneInherit(t){return`def finh_${t.outName}():
|
|
193
|
-
IVR1 = ${t.subdesign}.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${Ee(je(t.rotate[0]))})
|
|
194
|
-
IVR2 = IVR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${Ee(je(t.rotate[1]))})
|
|
195
|
-
IVR3 = IVR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${Ee(je(t.rotate[2]))})
|
|
196
|
-
IVF = IVR3.translate(App.Vector(${Ee(t.translate[0])}, ${Ee(t.translate[1])}, ${Ee(t.translate[2])}))
|
|
197
|
-
return IVF
|
|
198
|
-
${t.outName} = finh_${t.outName}()
|
|
199
|
-
|
|
200
|
-
`}getAllInherits(t){let e="";for(const u of t){const n=this.getOneInherit(u);e+=n}return e}getVolume(t){let e="";if(t.inherits!==void 0){const u=this.getAllSubGeoms(t.inherits);for(const n of u){const r=Lt().getPaxJson({},n,Vt);e+=this.getAllFigures(r.figures,r.partName),e+=this.getVolume(n.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
201
|
-
pax_${t}.check()
|
|
202
|
-
#pax_${t}.exportBrep(f"{outFileName}.brep")
|
|
203
|
-
#pax_${t}.exportIges(f"{outFileName}.igs")
|
|
204
|
-
#pax_${t}.exportStep(f"{outFileName}.stp")
|
|
205
|
-
pax_${t}.exportStl(f"{outFileName}.stl")
|
|
206
|
-
|
|
207
|
-
`}getExportFile(t){let e=this.getHeader(t.partName);return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function Bi(){return new Si}var ki=class{constructor(){Y(this,"xMin");Y(this,"xMax");Y(this,"yMin");Y(this,"yMax");Y(this,"firstDone");this.firstDone=!1,this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addAContour(t){if(t.length>0){const e=[];this.firstDone&&(e.push(lt(this.xMin,this.yMin)),e.push(lt(this.xMax,this.yMax)));for(const a of t)e.push(...a.generatePoints());const[u,n,r,s]=fr(e);this.xMin=u,this.xMax=n,this.yMin=r,this.yMax=s}}getViewBox(){const t=Math.round((this.xMax-this.xMin)*1.1)+10,e=Math.round((this.yMax-this.yMin)*1.1)+10,u=Math.round(this.xMin-t*.05),n=Math.round(this.yMin-e*.05);return[u,t,n,e]}},Ni=class{constructor(){Y(this,"minMax");Y(this,"groups");Y(this,"svg");this.minMax=new ki,this.groups=[],this.svg=Qa()}addAContour(t,e="",u=_e.contour){this.minMax.addAContour(t);const n={gpName:e,gpColor:u,ctrs:t};this.groups.push(n)}makeSvg(t){for(const e of this.groups){e.gpName!==""&&this.svg.addGroup(e.gpName);for(const u of e.ctrs){let n=u.imposedColor;n===""&&(n=e.gpColor),this.svg.addSvgString(u.toSvg(t,n))}e.gpName!==""&&this.svg.closeGroup()}}stringify(){const[t,e,u,n]=this.minMax.getViewBox();return this.svg.addHeader(t,e,u,n),this.makeSvg(this.minMax.yMax+this.minMax.yMin),this.svg.stringify()}};function vr(){return new Ni}function Eu(t){const e=vr();return e.addAContour(t),e.stringify()}function lu(t){const e=vr();return e.addAContour(t.mainListC(),"main",_e.mainInner),e.addAContour(t.mainBList,"mainB",_e.mainB),e.addAContour(t.secondList,"second",_e.second),e.addAContour(t.secondBList,"secondB",_e.secondB),e.addAContour(t.dynamicsList,"dynamics",_e.dynamics),e.stringify()}function Cu(t){const e=ti();for(const n of t)if(n.circle){const r=n.toDxfSeg()[0];e.addCircle(r.p1x,r.p1y,r.radius)}else for(const r of n.toDxfSeg())r.arc?e.addArc(r.p1x,r.p1y,r.radius,r.a1,r.a2):e.addLine(r.p1x,r.p1y,r.p2x,r.p2y);return e.stringify()}function Li(t){let e="";return e+=t.logstr,e}function _r(t,e,u){return Lt().getPaxStr(t,e,u)}function br(t){const e=Lt().getPaxJson({},t,Vt);return mi().getExportFile(e)}function yr(t){const e=Lt().getPaxJson({},t,Vt);return _i().getExportFile(e)}function wr(t){const e=Lt().getPaxJson({},t,Vt);return Bi().getExportFile(e)}async function Mi(t,e,u,n,r){const s=new Us("application/zip"),a=new la(s),i=e.partName,o=new Oe(JSON.stringify(t,null,2));await a.add(`param_${i}.json`,o);const D=new Oe(e.logstr);await a.add(`geom_${i}_log.txt`,D);const l=new Oe(n.logstr);await a.add(`geom_${i}_t${u}_log.txt`,l);for(const N in e.fig){const w=new Oe(Eu(e.fig[N].mainListC()));await a.add(`face_${i}_${N}.svg`,w);const x=new Oe(Cu(e.fig[N].mainListC()));await a.add(`face_${i}_${N}.dxf`,x);const S=new Oe(lu(e.fig[N]));await a.add(`deco_${i}_${N}.svg`,S);const T=new Oe(lu(n.fig[N]));await a.add(`deco_${i}_${N}_t${u}.svg`,T)}const f=pu(e.fig),v=new Oe(Eu(f.mainListC()));await a.add(`face_${i}_all_merged.svg`,v);const F=new Oe(Cu(f.mainListC()));await a.add(`face_${i}_all_merged.dxf`,F);const A=new Oe(lu(f));await a.add(`deco_${i}_all_merged.svg`,A);const h=new Oe(lu(f));await a.add(`deco_${i}_all_merged_t${u}.svg`,h);const C=new Oe(_r(t,e,r));await a.add(`${i}.pax.json`,C);const g=new Oe(br(e));await a.add(`${i}_noarc_openscad.scad`,g);const b=new Oe(yr(e));await a.add(`${i}_noarc_jscad.js`,b);const _=new Oe(wr(e));return await a.add(`${i}_freecad.py`,_),await a.close(),await s.getData()}var rt=(t=>(t[t.eSVG=0]="eSVG",t[t.eSVGALL=1]="eSVGALL",t[t.eDXF=2]="eDXF",t[t.eDXFALL=3]="eDXFALL",t[t.eTXTLOG=4]="eTXTLOG",t[t.ePAX=5]="ePAX",t[t.eOPENSCAD=6]="eOPENSCAD",t[t.eJSCAD=7]="eJSCAD",t[t.eFREECAD=8]="eFREECAD",t[t.eZIP=9]="eZIP",t))(rt||{});function Ti(t,e,u,n,r){const s=t(0,e);let a="";if(s.calcErr)console.log("err931: error by calling geome ${geome0.calcErr}");else{const i=Object.keys(s.fig);if(r===0)if(i.includes(n)){const o=s.fig[n];a=Eu(o.mainListC())}else console.log(`err749: fileTextContent eFace ${n} invalid`);else if(r===1){const o=pu(s.fig);a=Eu(o.mainListC())}else if(r===2)if(i.includes(n)){const o=s.fig[n];a=Cu(o.mainListC())}else console.log(`err759: fileTextContent eFace ${n} invalid`);else if(r===3){const o=pu(s.fig);a=Cu(o.mainListC())}else r===4?a=Li(s):r===5?a=_r(e,s,u):r===6?a=br(s):r===7?a=yr(s):r===8?a=wr(s):console.log(`err912: unknown exportFormat ${r}`)}return a}async function Pi(t,e,u,n,r){const s=t(0,u),a=t(e,u);let i=new Blob;return!s.calcErr&&!a.calcErr?r===9?i=await Mi(u,s,e,a,n):console.log(`err913: unknown exportFormat ${r}`):console.log("err932: error by calling geome ${geome0.calcErr} ${geome1.calcErr}"),i}function Ii(t){let e="";return t===0||t===1?e="image/svg+xml":t===2||t===3?e="application/dxf":t===4?e="text/plain":t===5?e="application/json":t===6||t===7||t===8?e="text/plain":t===9&&(e="application/zip"),e}function Oi(t){let e="";return t===0||t===1?e=".svg":t===2||t===3?e=".dxf":t===4?e=".log":t===5?e=".pax.json":t===6?e="_noarc_openscad.scad":t===7?e="_noarc_jscad.js":t===8?e="_freecad.py":t===9&&(e=".zip"),e}function zi(t){let e=!1;return t===9&&(e=!0),e}function xr(t,e,u,n){return JSON.stringify({lastModif:t,partName:e,pVal:u,comment:n},null," ")}function jn(t){const e=La.parse(t),u="lastModif",n="partName",r="pVal",s="comment";let a="";const i={lastModif:"",partName:"",pVal:{},comment:""};if(Object.hasOwn(e,u)&&(i[u]=e[u]),Object.hasOwn(e,n)&&(i[n]=e[n]),Object.hasOwn(e,r)){const o=e[r];for(const D of Object.keys(o)){const l=o[D];if(isNaN(l))throw`err905: ${l} is not a number!`;i[r][D]=l}a+=`info398: parsing file has found ${Object.keys(i[r]).length} parameters
|
|
208
|
-
`}else throw`err489: parameter-json-file has no key ${r}
|
|
209
|
-
`;return Object.hasOwn(e,s)&&(i[s]=e[s]),[i,a]}function ji(t,e){e(!1)}function Ri(t,e,u){e.okFunc(),u(!1)}var Vi=ie('<aside class="backdrop svelte-weruk7"><div class="dialog svelte-weruk7"><article class="question svelte-weruk7"><!></article> <footer class="svelte-weruk7"><button class="cancel svelte-weruk7">Cancel</button> <button class="ok svelte-weruk7"> </button></footer></div></aside>');function Wt(t,e){Ve(e,!0);let u=et(e,"okName",3,"Ok"),n=et(e,"modalOpen",15),r=et(e,"sizeLarge",3,!1);var s=Kt(),a=Qe(s);{var i=o=>{var D=Vi(),l=E(D),f=E(l),v=E(f);Ss(v,()=>e.children),p(f);var F=d(f,2),A=E(F);A.__click=[ji,n];var h=d(A,2);h.__click=[Ri,e,n];var C=E(h,!0);p(h),p(F),p(l),p(D),Ce(()=>{Ke(l,"sizeLarge",r()),De(C,u())}),J(o,D)};Nt(a,o=>{n()&&o(i)})}J(t,s),$e()}ft(["click"]);function $i(t,e,u,n){for(const r of e())c(u)[r]=c(n)}var Ui=(t,e)=>{M(e,!0)},Yi=ie('<p class="diagItem svelte-12dj9tj"> </p>'),Xi=ie('<p class="diagTitle svelte-12dj9tj">Do you really want to delete the following localStorage keys?</p> <!>',1),Zi=(t,e,u)=>e(c(u)),qi=ie('<tr class="svelte-12dj9tj"><td><input type="checkbox"></td><td class="svelte-12dj9tj"><button class="svelte-12dj9tj"> </button></td><td> </td></tr>'),Gi=ie('<div class="deleteKeys svelte-12dj9tj"><button class="svelte-12dj9tj">Delete</button> <!> <table class="svelte-12dj9tj"><thead class="svelte-12dj9tj"><tr><td>Delete</td><td>Key name</td><td>Last modification</td></tr><tr><td><input type="checkbox"></td><td class="instruction">delete all</td><td></td></tr></thead><tbody class="svelte-12dj9tj"></tbody></table></div>');function Sr(t,e){Ve(e,!0);let u=et(e,"storeName",15),n=et(e,"localKeys",15),r=he(K({})),s=he(!1),a=he(!1);function i(){let w=[];const x=new RegExp(`^${e.pageName}_`);return w=Object.keys(window.localStorage).filter(T=>x.test(T)).map(T=>T.replace(x,"")),w.sort(),w}n(i());function o(w){u(w)}function D(w){let x={};for(const S of w){let T="";const W=`${e.pageName}_${S}`,R=window.localStorage.getItem(W);R!==null&&(T=JSON.parse(R).lastModif),x[S]=T}return x}let l=ze(()=>D(n()));function f(w){let x={};for(const S of w)x[S]=!1;return x}M(r,K(f(n())));function v(){for(const w of n())if(c(r)[w]){const x=`${e.pageName}_${w}`;window.localStorage.removeItem(x)}M(s,!1),n(i())}var F=Gi(),A=E(F);A.__click=[Ui,a];var h=d(A,2);Wt(h,{okName:"Confirm",okFunc:v,get modalOpen(){return c(a)},set modalOpen(w){M(a,K(w))},children:(w,x)=>{var S=Xi(),T=d(Qe(S),2);st(T,17,n,at,(W,R)=>{var q=Kt(),se=Qe(q);{var Q=X=>{var V=Yi(),oe=E(V,!0);p(V),Ce(()=>De(oe,c(R))),J(X,V)};Nt(se,X=>{c(r)[c(R)]&&X(Q)})}J(W,q)}),J(w,S)},$$slots:{default:!0}});var C=d(h,2),g=E(C),b=d(E(g)),_=E(b),B=E(_);xe(B),B.__change=[$i,n,r,s],p(_),He(2),p(b),p(g);var N=d(g);st(N,21,n,at,(w,x)=>{var S=qi(),T=E(S),W=E(T);xe(W),p(T);var R=d(T),q=E(R);q.__click=[Zi,o,x];var se=E(q,!0);p(q),p(R);var Q=d(R),X=E(Q,!0);p(Q),p(S),Ce(()=>{De(se,c(x)),De(X,c(l)[c(x)])}),Je(W,()=>c(r)[c(x)],V=>c(r)[c(x)]=V),J(w,S)}),p(N),p(C),p(F),Je(B,()=>c(s),w=>M(s,w)),J(t,F),$e()}ft(["click","change"]);var Wi=ie('<p class="warnMsg svelte-1rkdwo"> </p>'),Hi=ie('<!> <div class="svelte-1rkdwo"><label for="storName" class="svelte-1rkdwo">Give a name to your parameter-set:</label> <input type="text" id="storName" required minlength="4" maxlength="30" size="32" class="svelte-1rkdwo"> <!></div>',1);function Ji(t,e){Ve(e,!0);let u=et(e,"storeName",15),n=he(K([]));function r(v){const F=/[-:]/g,A=/\..*$/,h=new Date().toISOString().replace(F,"").replace(A,"").replace("T","_");return`${v}_${h}`}u(r(e.pageName));let s=ze(()=>c(n).includes(u()));var a=Hi(),i=Qe(a);Sr(i,{get pageName(){return e.pageName},get storeName(){return u()},set storeName(v){u(v)},get localKeys(){return c(n)},set localKeys(v){M(n,K(v))}});var o=d(i,2),D=d(E(o),2);xe(D);var l=d(D,2);{var f=v=>{var F=Wi(),A=E(F);p(F),Ce(()=>De(A,`Warning: name ${u()??""} already used`)),J(v,F)};Nt(l,v=>{c(s)&&v(f)})}p(o),Rt(D,u),J(t,a),$e()}var Ki=ie('<!> <div class="svelte-1ozd0ey"><label for="storName" class="svelte-1ozd0ey">Select a parameter-set:</label> <input type="text" id="storName" readonly="" minlength="4" maxlength="30" size="32" class="svelte-1ozd0ey"></div>',1);function Qi(t,e){Ve(e,!0);let u=et(e,"storeName",15),n=he(K([]));function r(D){let l=u();return!D.includes(l)&&(D.length>0?l=D[0]:l=""),l}Qu(()=>{u(r(c(n)))});var s=Ki(),a=Qe(s);Sr(a,{get pageName(){return e.pageName},get storeName(){return u()},set storeName(D){u(D)},get localKeys(){return c(n)},set localKeys(D){M(n,K(D))}});var i=d(a,2),o=d(E(i),2);xe(o),p(i),Ce(()=>en(o,u())),J(t,s),$e()}const z=K({dLayers:si(),zAdjust:hu(),canvasZWidth:0});var eo=ie('<canvas class="mini svelte-z8e4tz"></canvas>');function Rn(t,e){Ve(e,!0);const u=200,n=.6;let r;function s(o,D,l,f){const v=ai(f);v.ruler=!1;let F;if(r){const A=r.getContext("2d");A.clearRect(0,0,A.canvas.width,A.canvas.height);const h=A.canvas.width;try{e.full?F=o.getAdjustFull(A.canvas.width,A.canvas.height):F=Ga(l,h,D),o.draw(A,F,v)}catch(C){console.log(C)}}}Qu(()=>{s(e.pFig,z.zAdjust,z.canvasZWidth,z.dLayers)});function a(o){const D=o.offsetX,l=o.offsetY,f=r.getContext("2d"),v=f.canvas.width/2,F=f.canvas.height/2;if(o.button===0){let A=1;D>v&&(A+=1*n),l>F&&(A+=2*n),f.canvas.width=A*u,f.canvas.height=A*u,s(e.pFig,z.zAdjust,z.canvasZWidth,z.dLayers)}}var i=eo();Ae(i,"width",u),Ae(i,"height",u),i.__click=a,Yu(i,o=>r=o,()=>r),J(t,i),$e()}ft(["click"]);function to(t,e){const u=document.createElement("a");u.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),u.setAttribute("download",t),u.click(),u.remove()}function Br(t,e,u){const n=/[-:]/g,r=/\..*$/,s=new Date().toISOString().replace(n,"").replace(r,"").replace("T","_"),a=`px_${t}_${s}.json`,i=xr(s,t,e,u);to(a,i)}function uo(t,e,u){const n=new URL(t),r=2e3;let s=n.toString().length;for(const a of Object.keys(e)){const i=e[a].toString(),o=2+a.length+i.length;n.searchParams.append(encodeURIComponent(a),encodeURIComponent(i)),s+=o}return s>=r&&console.log(`warn547: generateUrl: strLength ${s} larger than strLengthLimit ${r}`),n.toString()}function no(t,e){if(t.target){const u=t.target.files;u&&e(u[0])}}function ro(t,e,u,n){M(e,K(u())),M(n,!0)}function so(t,e){M(e,!0)}function ao(t,e){M(e,!0)}function io(t,e){M(e,!1)}var oo=(t,e)=>{M(e,!0)},co=(t,e)=>{M(e,!0)},lo=(t,e,u)=>e(c(u).name),Do=ie('<input type="number" class="input-number svelte-jonk14"> <input type="range" class="svelte-jonk14">',1),fo=ie("<option> </option>"),mo=ie("<select></select>"),Ao=ie("<option> </option>"),Fo=ie("<select></select>"),go=ie('<tr class="svelte-jonk14"><td class="svelte-jonk14"></td><td class="svelte-jonk14"><button class="svelte-jonk14"> </button></td><td class="svelte-jonk14"><!></td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"> </td></tr>'),ho=ie('<tbody class="svelte-jonk14"><tr class="separator svelte-jonk14"><td class="svelte-jonk14"></td><td class="svelte-jonk14"> </td><td class="svelte-jonk14"><label class="svelte-jonk14"><input type="checkbox" class="svelte-jonk14"> <span class="svelte-jonk14"></span></label></td></tr></tbody> <tbody class="svelte-jonk14"></tbody>',1),po=(t,e)=>{M(e,!0)},Eo=ie('<p>Copy this URL and send it to your friends!</p> <p class="cUrl svelte-jonk14"> </p>',1),Co=ie('<section class="svelte-jonk14"><h2 class="svelte-jonk14">Parameters</h2> <main class="svelte-jonk14"><label for="loadFParams" class="fileUpload svelte-jonk14">Load Params from File</label> <input id="loadFParams" type="file" accept="text/plain, application/json" class="svelte-jonk14"> <button class="svelte-jonk14">Set Params Default</button> <button class="svelte-jonk14">Load Params from localStorage</button> <!> <!> <textarea rows="3" cols="80" readonly="" wrap="soft" class="svelte-jonk14"></textarea> <table class="svelte-jonk14"><thead class="svelte-jonk14"><tr class="svelte-jonk14"><td class="svelte-jonk14">#</td><td class="svelte-jonk14">Parameter name</td><td class="svelte-jonk14">Value<span class="svelte-jonk14"><button class="svelte-jonk14">−</button><button class="svelte-jonk14">+</button></span></td><td class="svelte-jonk14">Unit</td><td class="svelte-jonk14">Default</td><td class="svelte-jonk14">Min</td><td class="svelte-jonk14">Max</td><td class="svelte-jonk14">Step</td></tr></thead><!></table> <div class="comment svelte-jonk14"><label for="inComment">Comment:</label> <input type="text" id="inComment" maxlength="150"></div> <button class="svelte-jonk14">Save Parameters to File</button> <button class="svelte-jonk14">Save Parameters as URL</button> <button class="svelte-jonk14">Save Parameters to localStorage</button> <!> <!></main> <!> <button class="side-img svelte-jonk14"><img class="svelte-jonk14"></button> <div class="mini-canvas svelte-jonk14"><!></div> <div class="mini-canvas svelte-jonk14"><!></div></section>');function vo(t,e){Ve(e,!0);let u=he(""),n=he(!1),r=he(""),s=he(!1),a=he(!1),i=he(!1),o=he(!1),D=he(!1),l=he(""),f=he(""),v=he(""),F=he(K(R(e.pDef.params[0].name))),A=he(!1),h=he(K(Q(se(e.pDef.params))));Vn(()=>{M(F,K(R(e.pDef.params[0].name))),M(h,K(Q(se(e.pDef.params))))});function C(P,O){let G="",de=!1;P!==e.pDef.partName&&(G+=`warn361: read partName: '${P}' expected partName: '${e.pDef.partName}'
|
|
210
|
-
`,de=!0);let Le=0,Ge=0,_t=0;const bt=[];for(const We of e.pDef.params)bt.push(We.name),Object.hasOwn(O,We.name)?(Le+=1,ve[e.pDef.partName][We.name]===O[We.name]?_t+=1:ve[e.pDef.partName][We.name]=O[We.name]):Ge+=1;let Tt=0;for(const We of Object.keys(O))bt.includes(We)||(Tt+=1,G+=`warn363: parameter ${We} not in the scope of the design (${Tt})
|
|
211
|
-
`);const $t=Tt>0,nu=new Date().toLocaleTimeString();return G+=`Params loaded at ${nu} :`,G+=` def-nb: ${Object.keys(e.pDef.params).length}`,G+=`, cover-nb: ${Le}, uncover-nb: ${Ge}
|
|
212
|
-
`,G+=` load-nb: ${Object.keys(O).length}`,G+=`, equal-nb: ${_t}, changed-nb: ${Le-_t}`,G+=`, out-of-scope: ${Tt}`,[G,de||$t]}async function g(P){try{const O=await fetch(P);if(!O.ok)throw`err627: error while fetching ${P}`;const G=await O.text(),[de]=jn(G);(Le=>(M(r,K(Le[0])),M(s,K(Le[1]))))(C(de.partName,de.pVal)),M(u,K(de.comment))}catch(O){let G=`err223: error by fetching px file
|
|
213
|
-
`;G+=O,M(r,K(G)),M(s,!0)}}async function b(){{const P=new URLSearchParams(vn.url.search),O="pxUrl";if(P.has(O)){const de=P.get(O);P.delete(O),de?await g(de):(M(r,`err123: error by parsing URL-search-params
|
|
214
|
-
`),M(s,!0))}const G={};for(const[de,Le]of P){const Ge=Number(Le);isNaN(Ge)||(G[de]=Ge)}Object.keys(G).length>0&&(de=>(M(r,K(de[0])),M(s,K(de[1]))))(C(e.pDef.partName,G))}}b();function _(P){try{const[O]=jn(P);(G=>(M(r,K(G[0])),M(s,K(G[1]))))(C(O.partName,O.pVal)),M(u,K(O.comment))}catch(O){let G=`err723: error by parsing parameter file
|
|
215
|
-
`;G+=O,M(r,K(G)),M(s,!0)}}async function B(P){const O=await P.text();_(O)}function N(){Br(e.pDef.partName,ve[e.pDef.partName],c(u))}function w(){const P={};for(const O of e.pDef.params)P[O.name]=O.init;(O=>(M(r,K(O[0])),M(s,K(O[1]))))(C(e.pDef.partName,P))}function x(){if(c(l)!==void 0&&c(l)!==""){const P=`${e.pDef.partName}_${c(l)}`;{const O=window.localStorage.getItem(P);O===null?(M(r,`Warn157: localStorage key ${P} is null`),M(s,!0)):_(O)}}else M(r,"Warn239: No valid name for loading from localStorage!"),M(s,!0)}function S(){if(c(f)!==void 0&&c(f)!==""){const P=`${e.pDef.partName}_${c(f)}`,O=/\..*$/,G=new Date().toISOString().replace(O,""),de=xr(G,e.pDef.partName,ve[e.pDef.partName],c(u));window.localStorage.setItem(P,de)}else console.log("Warn639: No valid name for writing to localStorage!")}function T(){return uo(vn.url.href,ve[e.pDef.partName]).toString()}function W(){}function R(P){let O=`${fu}/pgdsvg/default_param_blank.svg`;return Object.keys(e.pDef.paramSvg).includes(P)&&(O=`${fu}/pgdsvg/${e.pDef.paramSvg[P]}`),O}function q(P){M(F,K(R(P)))}function se(P){const O=[];let de={sectionName:"main",sectionID:"g0main",sectionVisCollapse:!1,params:[]},Le=0;for(const Ge of P)Ge.pType===Gt.eSectionSeparator?(O.push(de),Le+=1,de={sectionName:Ge.name,sectionID:`g${Le}${Ge.name}`,sectionVisCollapse:!0,params:[]}):de.params.push(Ge);return O.push(de),O}function Q(P){const O={};for(const G of P)O[G.sectionID]=G.sectionVisCollapse;return O}let X=ze(()=>se(e.pDef.params)),V=ze(()=>c(n)?2:4),oe=ze(()=>c(n)?2:3),ee=ze(()=>c(n)?50:70);var fe=Co(),y=d(E(fe),2),k=d(E(y),2);k.__change=[no,B];var j=d(k,2);j.__click=[oo,a];var te=d(j,2);te.__click=[co,i];var ye=d(te,2);Wt(ye,{okName:"Overwrite Parameters",okFunc:w,get modalOpen(){return c(a)},set modalOpen(P){M(a,K(P))},children:(P,O)=>{He();var G=mn("Load the default parameters ?");J(P,G)},$$slots:{default:!0}});var Pe=d(ye,2);Wt(Pe,{okName:"Load Parameters",okFunc:x,get modalOpen(){return c(i)},set modalOpen(P){M(i,K(P))},children:(P,O)=>{Qi(P,{get pageName(){return e.pDef.partName},get storeName(){return c(l)},set storeName(G){M(l,K(G))}})},$$slots:{default:!0}});var Be=d(Pe,2);$n(Be);var Ne=d(Be,2),L=E(Ne),U=E(L),I=d(E(U),2),$=d(E(I)),pe=E($);pe.__click=[ao,n];var ht=d(pe);ht.__click=[io,n],p($),p(I);var mt=d(I),qe=d(mt),it=d(qe,3);p(U),p(L);var tt=d(L);st(tt,17,()=>c(X),at,(P,O,G)=>{var de=ho(),Le=Qe(de),Ge=E(Le),_t=E(Ge);_t.textContent=G+1;var bt=d(_t),Tt=E(bt,!0);p(bt);var $t=d(bt),nu=E($t),bu=E(nu);xe(bu),He(2),p(nu),p($t),p(Ge),p(Le);var We=d(Le,2);st(We,21,()=>c(O).params,at,(yu,me,Lr)=>{var ru=go(),Dn=E(ru);Dn.textContent=`${G+1}.${Lr+1}`;var wu=d(Dn),xu=E(wu);xu.__click=[lo,q,me];var Mr=E(xu,!0);p(xu),p(wu);var Su=d(wu),Tr=E(Su);{var Pr=Pt=>{var Ut=Do(),pt=Qe(Ut);xe(pt);var yt=d(pt,2);xe(yt),Ce(()=>{Ae(pt,"min",c(me).min),Ae(pt,"max",c(me).max),Ae(pt,"step",c(me).step),Ae(yt,"min",c(me).min),Ae(yt,"max",c(me).max),Ae(yt,"step",c(me).step)}),Rt(pt,()=>ve[e.pDef.partName][c(me).name],Yt=>ve[e.pDef.partName][c(me).name]=Yt),Rt(yt,()=>ve[e.pDef.partName][c(me).name],Yt=>ve[e.pDef.partName][c(me).name]=Yt),J(Pt,Ut)},Ir=Pt=>{var Ut=Kt(),pt=Qe(Ut);{var yt=It=>{var wt=mo();st(wt,20,()=>["Off","On"],at,(Xt,Lu,iu)=>{var ut=fo();ut.value=(ut.__value=iu)==null?"":iu;var Et=E(ut,!0);p(ut),Ce(()=>De(Et,Lu)),J(Xt,ut)}),p(wt),du(wt,()=>ve[e.pDef.partName][c(me).name],Xt=>ve[e.pDef.partName][c(me).name]=Xt),J(It,wt)},Yt=It=>{var wt=Kt(),Xt=Qe(wt);{var Lu=ut=>{var Et=Fo();st(Et,21,()=>c(me).dropdown,at,(Mu,$r,fn)=>{var Zt=Ao();Zt.value=(Zt.__value=fn)==null?"":fn;var Ur=E(Zt,!0);p(Zt),Ce(()=>De(Ur,c($r))),J(Mu,Zt)}),p(Et),du(Et,()=>ve[e.pDef.partName][c(me).name],Mu=>ve[e.pDef.partName][c(me).name]=Mu),J(ut,Et)},iu=ut=>{var Et=mn("unknown");J(ut,Et)};Nt(Xt,ut=>{c(me).pType===Gt.eDropdown?ut(Lu):ut(iu,!1)},!0)}J(It,wt)};Nt(pt,It=>{c(me).pType===Gt.eCheckbox?It(yt):It(Yt,!1)},!0)}J(Pt,Ut)};Nt(Tr,Pt=>{c(me).pType===Gt.eNumber?Pt(Pr):Pt(Ir,!1)})}p(Su);var su=d(Su),Or=E(su,!0);p(su);var au=d(su),zr=E(au,!0);p(au);var Bu=d(au),jr=E(Bu,!0);p(Bu);var ku=d(Bu),Rr=E(ku,!0);p(ku);var Nu=d(ku),Vr=E(Nu,!0);p(Nu),p(ru),Ce(()=>{Ke(ru,"changed",ve[e.pDef.partName][c(me).name]!==c(me).init),De(Mr,c(me).name),Ke(su,"hideColumn",c(n)),De(Or,c(me).unit),Ke(au,"hideColumn",c(n)),De(zr,c(me).init),De(jr,c(me).min),De(Rr,c(me).max),Ke(Nu,"hideColumn",c(n)),De(Vr,c(me).step)}),J(yu,ru)}),p(We),Ce(()=>{Ae(bt,"colspan",c(V)),De(Tt,c(O).sectionName),Ae($t,"colspan",c(oe)),Ke(We,"collaps",c(h)[c(O).sectionID])}),Je(bu,()=>c(h)[c(O).sectionID],yu=>c(h)[c(O).sectionID]=yu),J(P,de)}),p(Ne);var Ue=d(Ne,2),Ie=d(E(Ue),2);xe(Ie),p(Ue);var ot=d(Ue,2);ot.__click=N;var vt=d(ot,2);vt.__click=[ro,v,T,o];var ct=d(vt,2);ct.__click=[po,D];var tu=d(ct,2);Wt(tu,{okName:"Done",okFunc:W,sizeLarge:!0,get modalOpen(){return c(o)},set modalOpen(P){M(o,K(P))},children:(P,O)=>{var G=Eo(),de=d(Qe(G),2),Le=E(de,!0);p(de),Ce(()=>De(Le,c(v))),J(P,G)},$$slots:{default:!0}});var vu=d(tu,2);Wt(vu,{okName:"Save into localStorage",okFunc:S,get modalOpen(){return c(D)},set modalOpen(P){M(D,K(P))},children:(P,O)=>{Ji(P,{get pageName(){return e.pDef.partName},get storeName(){return c(f)},set storeName(G){M(f,K(G))}})},$$slots:{default:!0}}),p(y);var Mt=d(y,2);Dr(Mt,{get svgPath(){return c(F)},get modalOpen(){return c(A)},set modalOpen(P){M(A,K(P))}});var uu=d(Mt,2);uu.__click=[so,A];var cn=E(uu);p(uu);var _u=d(uu,2),kr=E(_u);Rn(kr,{get pFig(){return e.pFig},full:!0}),p(_u);var ln=d(_u,2),Nr=E(ln);Rn(Nr,{get pFig(){return e.pFig},full:!1}),p(ln),p(fe),Ce(()=>{en(Be,c(r)),Ke(Be,"colorWarn",c(s)),Ke(mt,"hideColumn",c(n)),Ke(qe,"hideColumn",c(n)),Ke(it,"hideColumn",c(n)),Ae(Ie,"size",c(ee)),Ae(cn,"src",c(F)),Ae(cn,"alt",c(F))}),Rt(Ie,()=>c(u),P=>M(u,P)),J(t,fe),$e()}ft(["change","click"]);var _o=ie('<nav class="svelte-1lpxlzz"><button class="svelte-1lpxlzz">0</button> <button class="svelte-1lpxlzz"><-</button> <button class="svelte-1lpxlzz">|<</button> <button class="svelte-1lpxlzz">||</button> <button class="svelte-1lpxlzz">>|</button> <button class="svelte-1lpxlzz">-></button> <input type="range" min="0" class="svelte-1lpxlzz"> <input type="number" min="0" class="svelte-1lpxlzz"></nav>');function bo(t,e){Ve(e,!0);let u=et(e,"tMax",3,10),n=et(e,"tStep",3,.1),r=et(e,"tUpdate",3,500),s=et(e,"simTime",15,0),a=null,i=0,o;const D=4;function l(){a!==null&&(clearInterval(a),a=null)}function f(){o<0&&s()<=0?s(u()):o>0&&s()>=u()?s(0):s(s()+o)}function v(){const q=r()/2**(Math.abs(i)-1);o=i<0?-n():n(),a=setInterval(f,q)}function F(){l(),s(0),i=0}function A(){l(),i=0,o=-n(),f()}function h(){l(),i=0,o=n(),f()}function C(){l(),i=Math.max(i-1,-4),v()}function g(){l(),i=Math.min(i+1,D),v()}function b(){l(),i=0}ks(()=>{l()});var _=_o(),B=E(_);B.__click=F;var N=d(B,2);N.__click=C;var w=d(N,2);w.__click=A;var x=d(w,2);x.__click=b;var S=d(x,2);S.__click=h;var T=d(S,2);T.__click=g;var W=d(T,2);xe(W);var R=d(W,2);xe(R),p(_),Ce(()=>{Ae(W,"max",u()),Ae(W,"step",n()),Ae(R,"max",u()),Ae(R,"step",n())}),Rt(W,s),Rt(R,s),J(t,_),$e()}ft(["click"]);var yo=(t,e)=>e.zoomClick("zoomInit"),wo=(t,e)=>e.zoomClick("zoomIn"),xo=(t,e)=>e.zoomClick("zoomOut"),So=(t,e)=>e.zoomClick("moveLeft"),Bo=(t,e)=>e.zoomClick("moveRight"),ko=(t,e)=>e.zoomClick("moveUp"),No=(t,e)=>e.zoomClick("moveDown"),Lo=ie('<nav class="svelte-et5lcr"><button aria-labelledby="zoomInit" class="svelte-et5lcr"><div class="zero svelte-et5lcr"></div></button><button aria-labelledby="zoomIn" class="svelte-et5lcr"><div class="zoomin svelte-et5lcr"></div></button><button aria-labelledby="zoomOut" class="svelte-et5lcr"><div class="zoomout svelte-et5lcr"></div></button><button aria-labelledby="moveLeft" class="svelte-et5lcr"><div class="arrowleft svelte-et5lcr"></div></button><button aria-labelledby="moveRight" class="svelte-et5lcr"><div class="arrowright svelte-et5lcr"></div></button><button aria-labelledby="moveUp" class="svelte-et5lcr"><div class="arrowup svelte-et5lcr"></div></button><button aria-labelledby="moveDown" class="svelte-et5lcr"><div class="arrowdown svelte-et5lcr"></div></button></nav>');function Mo(t,e){Ve(e,!0);var u=Lo(),n=E(u);n.__click=[yo,e];var r=d(n);r.__click=[wo,e];var s=d(r);s.__click=[xo,e];var a=d(s);a.__click=[So,e];var i=d(a);i.__click=[Bo,e];var o=d(i);o.__click=[ko,e];var D=d(o);D.__click=[No,e],p(u),J(t,u),$e()}ft(["click"]);var le=Ps(()=>z),To=ie('<div class="svelte-1rsbkj"><label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">main part</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">main skeleton</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">second parts</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">second skeletons</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">dynamics</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">ruler</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">frame of reference</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">points</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">lines</label> <label class="svelte-1rsbkj"><input type="checkbox" class="svelte-1rsbkj">vectors</label></div>');function Po(t,e){Ve(e,!1),Bs();var u=To(),n=E(u),r=E(n);xe(r),He(),p(n);var s=d(n,2),a=E(s);xe(a),He(),p(s);var i=d(s,2),o=E(i);xe(o),He(),p(i);var D=d(i,2),l=E(D);xe(l),He(),p(D);var f=d(D,2),v=E(f);xe(v),He(),p(f);var F=d(f,2),A=E(F);xe(A),He(),p(F);var h=d(F,2),C=E(h);xe(C),He(),p(h);var g=d(h,2),b=E(g);xe(b),He(),p(g);var _=d(g,2),B=E(_);xe(B),He(),p(_);var N=d(_,2),w=E(N);xe(w),He(),p(N),p(u),Je(r,()=>le().dLayers.main,x=>le(le().dLayers.main=x)),Je(a,()=>le().dLayers.mainB,x=>le(le().dLayers.mainB=x)),Je(o,()=>le().dLayers.second,x=>le(le().dLayers.second=x)),Je(l,()=>le().dLayers.secondB,x=>le(le().dLayers.secondB=x)),Je(v,()=>le().dLayers.dynamics,x=>le(le().dLayers.dynamics=x)),Je(A,()=>le().dLayers.ruler,x=>le(le().dLayers.ruler=x)),Je(C,()=>le().dLayers.refframe,x=>le(le().dLayers.refframe=x)),Je(b,()=>le().dLayers.points,x=>le(le().dLayers.points=x)),Je(B,()=>le().dLayers.lines,x=>le(le().dLayers.lines=x)),Je(w,()=>le().dLayers.vectors,x=>le(le().dLayers.vectors=x)),J(t,u),$e()}var Io=ie('<section class="svelte-1lstqwr"><!> <div class="rack svelte-1lstqwr"><canvas class="full svelte-1lstqwr"></canvas> <!></div> <div class="rack svelte-1lstqwr"><canvas class="zoom svelte-1lstqwr"></canvas> <!></div></section>');function Oo(t,e){Ve(e,!0);let u=et(e,"simTime",15,0);const n=400,r=1200;let s=he(n),a,i,o;function D(y,k){if(a){const j=a.getContext("2d");j.clearRect(0,0,j.canvas.width,j.canvas.height);try{o=y.getAdjustFull(j.canvas.width,j.canvas.height),y.draw(j,o,k)}catch(te){console.log(te)}}}function l(y,k,j){if(i){const te=i.getContext("2d");te.clearRect(0,0,te.canvas.width,te.canvas.height);try{(k===void 0||k.init===0)&&(k=y.getAdjustZoom(te.canvas.width,te.canvas.height)),y.draw(te,k,j)}catch(ye){console.log(ye)}}}function f(){const y=a.getContext("2d"),k=i.getContext("2d"),j=Math.min(Math.max(.4*c(s),n),r);y.canvas.width=j,y.canvas.height=j,k.canvas.width=j,k.canvas.height=j,z.canvasZWidth=j,z.zAdjust.init===0&&(z.zAdjust=e.pFig.getAdjustZoom(k.canvas.width,k.canvas.height))}function v(){f(),D(e.pFig,z.dLayers),l(e.pFig,z.zAdjust,z.dLayers)}function F(y,k,j){D(y,j),l(y,k,j)}Ns(()=>{f()}),Qu(()=>{F(e.pFig,z.zAdjust,z.dLayers)});function A(y){const k=i.getContext("2d");switch(y){case"zoomInit":z.zAdjust=e.pFig.getAdjustZoom(k.canvas.width,k.canvas.height);break;case"zoomIn":z.zAdjust=cu(.7,z.zAdjust);break;case"zoomOut":z.zAdjust=cu(1.3,z.zAdjust);break;case"moveLeft":z.zAdjust.xMin+=-.2*z.zAdjust.xyDiff;break;case"moveRight":z.zAdjust.xMin+=.2*z.zAdjust.xyDiff;break;case"moveUp":z.zAdjust.yMin+=.2*z.zAdjust.xyDiff;break;case"moveDown":z.zAdjust.yMin+=-.2*z.zAdjust.xyDiff;break;default:console.log(`ERR423: ${y} has no case!`)}l(e.pFig,z.zAdjust,z.dLayers)}const h=3e3,C=10,g=3;let b={timestamp:0,offsetX:0,offsetY:0};function _(y){y.button===0&&(b.timestamp=Date.now(),b.offsetX=y.offsetX,b.offsetY=y.offsetY)}function B(y){if(y.button===0)if(Date.now()-b.timestamp<h){const k=Math.abs(b.offsetX-y.offsetX),j=Math.abs(b.offsetY-y.offsetY);if(k<C&&j<C){const[te,ye]=Bt(y.offsetX,y.offsetY,o);z.zAdjust=Xa(te,ye,z.zAdjust),F(e.pFig,z.zAdjust,z.dLayers)}if(k>C&&j>C){const te=k/j,ye=1/te;if(te<g&&ye<g){const[Pe,Be]=Bt(y.offsetX,y.offsetY,o),[Ne,L]=Bt(b.offsetX,b.offsetY,o),I=i.getContext("2d").canvas.width;z.zAdjust=Za(Pe,Be,Ne,L,I,I),F(e.pFig,z.zAdjust,z.dLayers)}}}else console.log(`Warn205: ignore ${y.offsetX} ${y.offsetY} because too slow`)}function N(y){if(a){const k=a.getContext("2d");if(y.buttons===1){const j=y.offsetX-b.offsetX,te=y.offsetY-b.offsetY;D(e.pFig,z.dLayers),k.beginPath(),k.rect(b.offsetX,b.offsetY,j,te),k.strokeStyle=_e.mouse,k.stroke()}if(z.dLayers.ruler){const[j,te]=Bt(y.offsetX,y.offsetY,o);k.clearRect(5,5,200,25),k.font="15px Arial",k.fillStyle=_e.ruler,k.fillText(`x: ${j.toFixed(4)} y: ${te.toFixed(4)}`,5,20)}}}let w,x,S;function T(y){if(y.button===0){const[k,j]=Bt(y.offsetX,y.offsetY,z.zAdjust);w=k,x=j,S=eu(z.zAdjust)}}function W(y){if(y.buttons===1){const[k,j]=Bt(y.offsetX,y.offsetY,S);z.zAdjust=qa(w,x,k,j,S),l(e.pFig,z.zAdjust,z.dLayers)}else if(z.dLayers.ruler&&i){const k=i.getContext("2d"),[j,te]=Bt(y.offsetX,y.offsetY,z.zAdjust);k.clearRect(5,5,200,25),k.font="15px Arial",k.fillStyle=_e.ruler,k.fillText(`x: ${j.toFixed(4)} y: ${te.toFixed(4)}`,5,20)}}function R(y){y.preventDefault(),y.deltaY>0?z.zAdjust=cu(.7,z.zAdjust):z.zAdjust=cu(1.3,z.zAdjust),l(e.pFig,z.zAdjust,z.dLayers)}var q=Io();An("resize",Qr,v);var se=E(q);Po(se,{});var Q=d(se,2),X=E(Q);Ae(X,"width",n),Ae(X,"height",n),X.__mousedown=_,X.__mouseup=B,X.__mousemove=N,Yu(X,y=>a=y,()=>a);var V=d(X,2);bo(V,{get tMax(){return e.pDefSim.tMax},get tStep(){return e.pDefSim.tStep},get tUpdate(){return e.pDefSim.tUpdate},get simTime(){return u()},set simTime(y){u(y)}}),p(Q);var oe=d(Q,2),ee=E(oe);Ae(ee,"width",n),Ae(ee,"height",n),ee.__mousedown=T,ee.__mousemove=W,Yu(ee,y=>i=y,()=>i);var fe=d(ee,2);Mo(fe,{zoomClick:A}),p(oe),p(q),Ts("innerWidth",y=>M(s,K(y))),An("wheel",ee,R),J(t,q),$e()}ft(["mousedown","mouseup","mousemove"]);var zo=(t,e,u)=>e(c(u)),jo=(t,e,u)=>e(c(u)),Ro=ie('<tr class="svelte-lzdpo0"><td></td><td> </td><td> </td><td><i> </i></td><td><i> </i></td></tr>'),Vo=ie('<li class="svelte-lzdpo0"><input type="checkbox" class="toggle svelte-lzdpo0"> <label class="label svelte-lzdpo0"><div class="arrow svelte-lzdpo0"></div> </label> <button class="svelte-lzdpo0"> </button> <button class="svelte-lzdpo0">Export parameters</button> <div class="nested svelte-lzdpo0"><article class="svelte-lzdpo0"> <strong> </strong> </article> <table class="svelte-lzdpo0"><thead class="svelte-lzdpo0"><tr><td>Num</td><td>Name</td><td>Value</td><td>Init</td><td>Set?</td></tr></thead><tbody class="svelte-lzdpo0"></tbody></table></div></li>'),$o=ie('<section class="svelte-lzdpo0"><h2 class="svelte-lzdpo0">Sub-designs <span class="svelte-lzdpo0"> </span></h2> <ol class="svelte-lzdpo0"></ol></section>');function Uo(t,e){Ve(e,!0);const u=ze(()=>Object.keys(e.subD));async function n(F){const A=e.subD[F];lr(A.partName,Ln(A.dparam),!0);const h=`${fu}${e.pLink[A.partName]}`;Gr(h)}function r(F){const A=e.subD[F].partName,h=e.subD[F].dparam,C=`sub-design parameters of ${A} from ${e.origPartName}`;Br(A,Ln(h),C)}function s(F){let A="[ ";return A+=`${Ot(je(F[0]))}, `,A+=`${Ot(je(F[1]))}, `,A+=`${Ot(je(F[2]))} ]`,A}function a(F){let A="[ ";return A+=`${Ot(F[0])}, `,A+=`${Ot(F[1])}, `,A+=`${Ot(F[2])} ]`,A}function i(F){return F?"Yes":""}var o=$o(),D=E(o),l=d(E(D)),f=E(l);p(l),p(D);var v=d(D,2);st(v,21,()=>c(u),at,(F,A)=>{var h=Vo(),C=E(h);xe(C),xs(C,!1);var g=d(C,2),b=d(E(g));p(g);var _=d(g,2);_.__click=[zo,n,A];var B=E(_);p(_);var N=d(_,2);N.__click=[jo,r,A];var w=d(N,2),x=E(w),S=E(x),T=d(S),W=E(T,!0);p(T);var R=d(T);p(x);var q=d(x,2),se=d(E(q));st(se,21,()=>Object.keys(e.subD[c(A)].dparam),at,(Q,X,V)=>{var oe=Ro(),ee=E(oe);ee.textContent=V+1;var fe=d(ee),y=E(fe,!0);p(fe);var k=d(fe),j=E(k,!0);p(k);var te=d(k),ye=E(te),Pe=E(ye,!0);p(ye),p(te);var Be=d(te),Ne=E(Be),L=E(Ne,!0);p(Ne),p(Be),p(oe),Ce(U=>{Ke(oe,"changed",e.subD[c(A)].dparam[c(X)].chg),De(y,c(X)),De(j,e.subD[c(A)].dparam[c(X)].val),De(Pe,e.subD[c(A)].dparam[c(X)].init),De(L,U)},[()=>i(e.subD[c(A)].dparam[c(X)].chg)]),J(Q,oe)}),p(se),p(q),p(w),p(h),Ce((Q,X,V)=>{Ae(C,"id",`cb_${c(A)??""}`),Ae(g,"for",`cb_${c(A)??""}`),De(b,` ${c(A)??""}`),De(B,`Go to ${e.pLink[e.subD[c(A)].partName]??""}`),De(S,`${Q??""} parameters of `),De(W,e.subD[c(A)].partName),De(R,` with orientation ${X??""} (degree) at position
|
|
216
|
-
${V??""} (mm)`)},[()=>Object.keys(e.subD[c(A)].dparam).length,()=>s(e.subD[c(A)].orientation),()=>a(e.subD[c(A)].position)]),J(F,h)}),p(v),p(o),Ce(()=>De(f,`(Number of sub-instances: ${c(u).length??""})`)),J(t,o),$e()}ft(["click"]);async function Yo(t,e,u){await e(c(u))}var Xo=ie("<option> </option>"),Zo=ie("<option> </option>"),qo=ie("<option> </option>"),Go=ie('<!> <section class="svelte-1ez8qwq"><h2 class="svelte-1ez8qwq">Log</h2> <textarea rows="5" cols="94" readonly="" wrap="soft" class="svelte-1ez8qwq"></textarea></section> <section class="svelte-1ez8qwq"><h2 class="svelte-1ez8qwq">Drawing <select class="svelte-1ez8qwq"><!><option>All faces merged</option></select></h2></section> <!> <section class="svelte-1ez8qwq"><h2 class="svelte-1ez8qwq">Export</h2> <select class="svelte-1ez8qwq"><!><option>all faces merged as svg</option><!><option>all faces merged as dxf</option><option>compute.log as log-file</option><option>all faces as pax.json</option><option>all faces as openscad.scad</option><option>all faces as OpenJScad.js</option><option>all faces as Freecad.py</option><option>all faces and more as zip</option></select> <button class="svelte-1ez8qwq">Save to File</button> <!></section>',1);function Wo(t,e){Ve(e,!0);const u="ParametrixAll";function n(L){let U=!0;const I=/warn/i;return L.search(I)<0&&(U=!1),U}function r(L,U){let I=U;if(L.length===0)console.log("warn404: Drawing has an empty face list");else{const $=L.slice();$.push(u),$.includes(I)||(I=L[0])}return I}function s(L,U){let I;const $=Object.keys(L),pe=r($,U);return $.includes(pe)?I=L[pe]:I=pu(L),I}let a=he(0),i=he(u);Vn(()=>{M(i,K(r(Object.keys(e.fgeom(0,ve[e.pDef.partName]).fig),"")))});let o=he("zip"),D=ze(()=>e.fgeom(c(a),ve[e.pDef.partName])),l=ze(()=>{const L=new Date().toLocaleTimeString();let U=`Geometry ${e.pDef.partName} computed at ${L}
|
|
217
|
-
`;return U+=c(D).logstr,U}),f=ze(()=>Object.keys(c(D).fig)),v=ze(()=>c(D).calcErr),F=ze(()=>n(c(D).logstr)),A=ze(()=>s(c(D).fig,c(i))),h=ze(()=>c(D).sub);function C(L,U){const I=document.createElement("a"),$=URL.createObjectURL(U);I.setAttribute("href",$),I.setAttribute("download",L),I.click(),I.remove(),URL.revokeObjectURL($)}function g(L,U,I){const $=document.createElement("a"),pe="data:"+I+";utf-8,"+encodeURIComponent(U);$.setAttribute("href",pe),$.setAttribute("download",L),$.click(),$.remove()}function b(){const L=/[-:]/g,U=/\..*$/;return new Date().toISOString().replace(L,"").replace(U,"").replace("T","_")}async function _(L){const U=/^svg_/,I=/^dxf_/;let $=rt.eSVG,pe="all";L.match(U)?($=rt.eSVG,pe=L.replace(U,"")):L.match(I)?($=rt.eDXF,pe=L.replace(I,"")):L==="allsvg"?$=rt.eSVGALL:L==="alldxf"?$=rt.eDXFALL:L==="compute_log"?$=rt.eTXTLOG:L==="pax"?$=rt.ePAX:L==="oscad"?$=rt.eOPENSCAD:L==="ojscad"?$=rt.eJSCAD:L==="freecad"?$=rt.eFREECAD:L==="zip"?$=rt.eZIP:console.log(`err883: downloadExport iExportFace ${L} invalid`);const ht=Oi($),mt=Ii($),qe=zi($),it=e.pDef.partName+"_"+pe+"_"+b()+ht;if(qe){const tt=await Pi(e.fgeom,c(a),ve[e.pDef.partName],e.pDef,$);C(it,tt)}else{const tt=Ti(e.fgeom,ve[e.pDef.partName],e.pDef,pe,$);g(it,tt,mt)}}var B=Go(),N=Qe(B);vo(N,{get pDef(){return e.pDef},get pFig(){return c(A)}});var w=d(N,2),x=d(E(w),2);$n(x),p(w);var S=d(w,2),T=E(S),W=d(E(T)),R=E(W);st(R,17,()=>c(f),at,(L,U)=>{var I=Xo(),$={},pe=E(I,!0);p(I),Ce(()=>{$!==($=c(U))&&(I.value=(I.__value=c(U))==null?"":c(U)),De(pe,c(U))}),J(L,I)});var q=d(R);q.value=(q.__value=u)==null?"":u,p(W),p(T),p(S);var se=d(S,2);Oo(se,{get pDefSim(){return e.pDef.sim},get pFig(){return c(A)},get simTime(){return c(a)},set simTime(L){M(a,K(L))}});var Q=d(se,2),X=d(E(Q),2),V=E(X);st(V,17,()=>c(f),at,(L,U)=>{var I=Zo(),$={},pe=E(I);p(I),Ce(()=>{$!==($=`svg_${c(U)??""}`)&&(I.value=(I.__value=`svg_${c(U)??""}`)==null?"":`svg_${c(U)??""}`),De(pe,`face ${c(U)??""} as svg`)}),J(L,I)});var oe=d(V);oe.value=(oe.__value="allsvg")==null?"":"allsvg";var ee=d(oe);st(ee,17,()=>c(f),at,(L,U)=>{var I=qo(),$={},pe=E(I);p(I),Ce(()=>{$!==($=`dxf_${c(U)??""}`)&&(I.value=(I.__value=`dxf_${c(U)??""}`)==null?"":`dxf_${c(U)??""}`),De(pe,`face ${c(U)??""} as dxf`)}),J(L,I)});var fe=d(ee);fe.value=(fe.__value="alldxf")==null?"":"alldxf";var y=d(fe);y.value=(y.__value="compute_log")==null?"":"compute_log";var k=d(y);k.value=(k.__value="pax")==null?"":"pax";var j=d(k);j.value=(j.__value="oscad")==null?"":"oscad";var te=d(j);te.value=(te.__value="ojscad")==null?"":"ojscad";var ye=d(te);ye.value=(ye.__value="freecad")==null?"":"freecad";var Pe=d(ye);Pe.value=(Pe.__value="zip")==null?"":"zip",p(X);var Be=d(X,2);Be.__click=[Yo,_,o];var Ne=d(Be,2);Uo(Ne,{get subD(){return c(h)},get origPartName(){return e.pDef.partName},get pLink(){return e.pLink}}),p(Q),Ce(()=>{en(x,c(l)),Ke(x,"colorErr",c(v)),Ke(x,"colorWarn",c(F))}),du(W,()=>c(i),L=>M(i,L)),du(X,()=>c(o),L=>M(o,L)),J(t,B),$e()}ft(["click"]);var Ho=ie('<h1 class="svelte-1aya6oa"> </h1> <article class="svelte-1aya6oa"> </article> <!> <!>',1);function Jo(t,e){Ve(e,!0),Pa(e.pageDef);var u=Ho(),n=Qe(u),r=E(n,!0);p(n);var s=d(n,2),a=E(s);p(s);var i=d(s,2);Va(i,{get pDef(){return e.pageDef.pDef}});var o=d(i,2);Wo(o,{get pDef(){return e.pageDef.pDef},get fgeom(){return e.pageDef.pGeom},get pLink(){return e.pLink}}),Ce(()=>{De(r,e.pageDef.pTitle),De(a,`[${e.pageDef.pDef.partName??""}]: ${e.pageDef.pDescription??""}`)}),J(t,u),$e()}function Dc(t,e){Ve(e,!0),Jo(t,{get pageDef(){return e.data.pageDef},get pLink(){return e.data.allLink}}),$e()}export{Dc as component,lc as universal};
|