@urpflanze/js
Version:
A library for developers who want to approach to creative coding, artists who want to approach coding and for those who find it fun to play with math.
2 lines • 469 kB
JavaScript
/*! For license information please see urpflanze.min.js.LICENSE.txt */
var t={4076:(t,e,r)=>{r(5072);const{devDependencies:n}=r(3681);t.exports={corePath:`https://unpkg.com/@ffmpeg/core@${n["@ffmpeg/core"].substring(1)}/dist/ffmpeg-core.js`}},2339:(t,e,r)=>{const n=r(5072);t.exports=async t=>{let e=t;if(void 0===t)return new Uint8Array;if("string"==typeof t)if(/data:_data\/([a-zA-Z]*);base64,([^"]*)/.test(t))e=atob(t.split(",")[1]).split("").map((t=>t.charCodeAt(0)));else{const r=await fetch(n(t));e=await r.arrayBuffer()}else(t instanceof File||t instanceof Blob)&&(e=await(r=t,new Promise(((t,e)=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.onerror=({target:{error:{code:t}}})=>{e(Error(`File could not be read! Code=${t}`))},n.readAsArrayBuffer(r)}))));var r;return new Uint8Array(e)}},1440:(t,e,r)=>{const n=r(5072),{log:i}=r(888),s=async(t,e)=>{i("info",`fetch ${t}`);const r=await(await fetch(t)).arrayBuffer();i("info",`${t} file size = ${r.byteLength} bytes`);const n=new Blob([r],{type:e}),s=URL.createObjectURL(n);return i("info",`${t} blob URL = ${s}`),s};t.exports=async({corePath:t})=>{if("string"!=typeof t)throw Error("corePath should be a string!");const e=n(t),r=await s(e,"application/javascript"),a=await s(e.replace("ffmpeg-core.js","ffmpeg-core.wasm"),"application/wasm"),o=await s(e.replace("ffmpeg-core.js","ffmpeg-core.worker.js"),"application/javascript");return"undefined"==typeof createFFmpegCore?new Promise((t=>{const e=document.createElement("script"),n=()=>{e.removeEventListener("load",n),i("info","ffmpeg-core.js script loaded"),t({createFFmpegCore,corePath:r,wasmPath:a,workerPath:o})};e.src=r,e.type="text/javascript",e.addEventListener("load",n),document.getElementsByTagName("head")[0].appendChild(e)})):(i("info","ffmpeg-core.js script is loaded already"),Promise.resolve({createFFmpegCore,corePath:r,wasmPath:a,workerPath:o}))}},3451:(t,e,r)=>{const n=r(4076),i=r(1440),s=r(2339);t.exports={defaultOptions:n,getCreateFFmpegCore:i,fetchFile:s}},1617:t=>{t.exports={defaultArgs:["./ffmpeg","-nostdin","-y"],baseOptions:{log:!1,logger:()=>{},progress:()=>{},corePath:""}}},9289:(t,e,r)=>{const{defaultArgs:n,baseOptions:i}=r(1617),{setLogging:s,setCustomLogger:a,log:o}=r(888),h=r(6405),u=r(7010),{defaultOptions:c,getCreateFFmpegCore:l}=r(3451),{version:f}=r(3681),d=Error("ffmpeg.wasm is not ready, make sure you have completed load().");t.exports=(t={})=>{const{log:e,logger:r,progress:p,...m}={...i,...c,...t};let g=null,v=null,b=null,y=!1,w=p;const _=({type:t,message:e})=>{o(t,e),h(e,w),(t=>{"FFMPEG_END"===t&&null!==b&&(b(),b=null,y=!1)})(e)};return s(e),a(r),o("info",`use ffmpeg.wasm v${f}`),{setProgress:t=>{w=t},setLogger:t=>{a(t)},setLogging:s,load:async()=>{if(o("info","load ffmpeg-core"),null!==g)throw Error("ffmpeg.wasm was loaded, you should not load it again, use ffmpeg.isLoaded() to check next time.");{o("info","loading ffmpeg-core");const{createFFmpegCore:t,corePath:e,workerPath:r,wasmPath:n}=await l(m);g=await t({mainScriptUrlOrBlob:e,printErr:t=>_({type:"fferr",message:t}),print:t=>_({type:"ffout",message:t}),locateFile:(t,e)=>{if("undefined"!=typeof window){if(void 0!==n&&t.endsWith("ffmpeg-core.wasm"))return n;if(void 0!==r&&t.endsWith("ffmpeg-core.worker.js"))return r}return e+t}}),v=g.cwrap("proxy_main","number",["number","number"]),o("info","ffmpeg-core loaded")}},isLoaded:()=>null!==g,run:(...t)=>{if(o("info",`run ffmpeg command: ${t.join(" ")}`),null===g)throw d;if(y)throw Error("ffmpeg.wasm can only run one command at a time");return y=!0,new Promise((e=>{const r=[...n,...t].filter((t=>0!==t.length));b=e,v(...u(g,r))}))},exit:()=>{if(null===g)throw d;y=!1,g.exit(1),g=null,v=null,b=null},FS:(t,...e)=>{if(o("info",`run FS.${t} ${e.map((t=>"string"==typeof t?t:`<${t.length} bytes binary file>`)).join(" ")}`),null===g)throw d;{let r=null;try{r=g.FS[t](...e)}catch(r){throw"readdir"===t?Error(`ffmpeg.FS('readdir', '${e[0]}') error. Check if the path exists, ex: ffmpeg.FS('readdir', '/')`):"readFile"===t?Error(`ffmpeg.FS('readFile', '${e[0]}') error. Check if the path exists`):Error("Oops, something went wrong in FS operation.")}return r}}}}},5045:(t,e,r)=>{r(5666);const n=r(9289),{fetchFile:i}=r(3451);t.exports={createFFmpeg:n,fetchFile:i}},888:t=>{let e=!1,r=()=>{};t.exports={logging:e,setLogging:t=>{e=t},setCustomLogger:t=>{r=t},log:(t,n)=>{r({type:t,message:n}),e&&console.log(`[${t}] ${n}`)}}},7010:t=>{t.exports=(t,e)=>{const r=t._malloc(e.length*Uint32Array.BYTES_PER_ELEMENT);return e.forEach(((e,n)=>{const i=t._malloc(e.length+1);t.writeAsciiToMemory(e,i),t.setValue(r+Uint32Array.BYTES_PER_ELEMENT*n,i,"i32")})),[e.length,r]}},6405:t=>{let e=0,r=0;const n=t=>{const[e,r,n]=t.split(":");return 60*parseFloat(e)*60+60*parseFloat(r)+parseFloat(n)};t.exports=(t,i)=>{if("string"==typeof t)if(t.startsWith(" Duration")){const s=t.split(", ")[0].split(": ")[1],a=n(s);i({duration:a,ratio:r}),(0===e||e>a)&&(e=a)}else if(t.startsWith("frame")||t.startsWith("size")){const s=t.split("time=")[1].split(" ")[0],a=n(s);r=a/e,i({ratio:r,time:a})}else t.startsWith("video:")&&(i({ratio:1}),e=0)}},2894:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UncontrolledLoop=e.Static=e.Loop=e.Compose=e.Simple=e.resolveSimpleAnimation=void 0;const n=r(4825),i=r(2765);function s(t){const e=i.createAnimation(t);if(e)return t=>{var r;const n="number"==typeof t?t:(null===(r=t.shape.scene)||void 0===r?void 0:r.currentTime)||0;return e.update(n),e.value}}e.resolveSimpleAnimation=s,e.Simple=s,e.Compose=function(t){const e=n.composeAnimations(t);if(e)return t=>{var r;const n="number"==typeof t?t:(null===(r=t.shape.scene)||void 0===r?void 0:r.currentTime)||0;return e(n)}},e.Loop=function(t){const e=t;return void 0===e.interpolator&&(e.interpolator="wave"),e.interpolator&&("string"==typeof e.interpolator?"wave"!==e.interpolator&&(e.direction="alternate"):"object"==typeof e.interpolator&&"wave"!==e.interpolator.type&&(e.direction="alternate")),e.loop=!0,s(e)},e.Static=function(t){const e=t;return e.direction="normal",e.loop=!1,s(e)},e.UncontrolledLoop=function(t){const e=t;return e.direction="normal",e.loop=!0,s(e)}},9727:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=void 0,e.Easings={linear:(t,e,r,n=1)=>r*t/n+e,quadraticIn:(t,e,r,n=1)=>r*(t/=n)*t+e,quadraticOut:(t,e,r,n=1)=>-r*(t/=n)*(t-2)+e,quadraticInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t+e:-r/2*(--t*(t-2)-1)+e,cubicIn:(t,e,r,n=1)=>r*(t/=n)*t*t+e,cubicOut:(t,e,r,n=1)=>(t/=n,r*(--t*t*t+1)+e),cubicInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t*t+e:r/2*((t-=2)*t*t+2)+e,quarticIn:(t,e,r,n=1)=>r*(t/=n)*t*t*t+e,quarticOut:(t,e,r,n=1)=>(t/=n,-r*(--t*t*t*t-1)+e),quarticInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t*t*t+e:-r/2*((t-=2)*t*t*t-2)+e,quinticIn:(t,e,r,n=1)=>r*(t/=n)*t*t*t*t+e,quinticOut:(t,e,r,n=1)=>(t/=n,r*(--t*t*t*t*t+1)+e),quinticInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*t*t*t*t*t+e:r/2*((t-=2)*t*t*t*t+2)+e,sinusoidalIn:(t,e,r,n=1)=>-r*Math.cos(t/n*(Math.PI/2))+r+e,sinusoidalOut:(t,e,r,n=1)=>r*Math.sin(t/n*(Math.PI/2))+e,sinusoidalInOut:(t,e,r,n=1)=>-r/2*(Math.cos(Math.PI*t/n)-1)+e,exponentialIn:(t,e,r,n=1)=>r*Math.pow(2,10*(t/n-1))+e,exponentialOut:(t,e,r,n=1)=>r*(1-Math.pow(2,-10*t/n))+e,exponentialInOut:(t,e,r,n=1)=>(t/=n/2)<1?r/2*Math.pow(2,10*(t-1))+e:(t--,r/2*(2-Math.pow(2,-10*t))+e),circularIn:(t,e,r,n=1)=>(t/=n,-r*(Math.sqrt(1-t*t)-1)+e),circularOut:(t,e,r,n=1)=>(t/=n,t--,r*Math.sqrt(1-t*t)+e),circularInOut:(t,e,r,n=1)=>(t/=n/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+e:(t-=2,r/2*(Math.sqrt(1-t*t)+1)+e),elasticIn:(t,e,r,n=1,i=1,s=.5)=>{if(0===t)return e;if(1==(t/=n))return e+r;s*=n;let a=0;return i<Math.abs(r)?(i=r,a=s/4):a=s/(2*Math.PI)*Math.asin(r/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t*n-a)*(2*Math.PI)/s)+e},elasticOut:(t,e,r,n=1,i=1,s=.5)=>{if(0===t)return e;if(1==(t/=n))return e+r;s*=n;let a=0;return i<Math.abs(r)?(i=r,a=s/4):a=s/(2*Math.PI)*Math.asin(r/i),i*Math.pow(2,-10*t)*Math.sin((t*n-a)*(2*Math.PI)/s)+r+e},elasticInOut:(t,e,r,n=1,i=1,s=.5)=>{if(0===t)return e;if(2==(t/=n/2))return e+r;s*=n;let a=0;return i<Math.abs(r)?(i=r,a=s/4):a=s/(2*Math.PI)*Math.asin(r/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t*n-a)*(2*Math.PI)/s)*-.5+e:i*Math.pow(2,-10*(t-=1))*Math.sin((t*n-a)*(2*Math.PI)/s)*.5+r+e},backIn:(t,e,r,n=1,i=1.70158)=>r*(t/=n)*t*((i+1)*t-i)+e,backOut:(t,e,r,n=1,i=1.70158)=>r*((t=t/n-1)*t*((i+1)*t+i)+1)+e,backInOut:(t,e,r,n=1,i=1.70158)=>(t/=n/2)<1?r/2*(t*t*((1+(i*=1.525))*t-i))+e:r/2*((t-=2)*t*((1+(i*=1.525))*t+i)+2)+e,bounceIn:(t,r,n,i=1)=>n-e.Easings.bounceOut(i-t,0,n,i)+r,bounceOut:(t,e,r,n=1)=>(t/=n)<1/2.75?r*(7.5625*t*t)+e:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+e:r*(7.5625*(t-=2.625/2.75)*t+.984375)+e,bounceInOut:(t,r,n,i=1)=>t<i/2?.5*e.Easings.bounceIn(2*t,0,n,i)+r:.5*e.Easings.bounceOut(2*t-i,0,n,i)+.5*n+r}},4825:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.composeAnimations=void 0;const n=r(9968),i=r(2765),s=r(8782);function a(t,e,r=.5){const i=Array.isArray(t)?t:[t],a=Array.isArray(e)?e:[e],o=[];for(let t=0,e=i.length;t<e;t++){if(typeof i[t]!=typeof a[t])return void console.error("[@urpflanze/animation]: cannot interpolate");if("string"!=typeof i[t]){const e=i[t],n=a[t];o.push(e+r*(n-e))}else{const e=i[t],h=a[t],u=n.parseColorAndConvert(e),c=n.parseColorAndConvert(h);void 0!==u&&void 0!==c&&o.push(s.interpolateColorRGB(u,c,r))}}return 1===o.length?o[0]:o}e.composeAnimations=function(t){const e=t.map(i.createAnimation).filter((t=>void 0!==t)),r=e.length;if(r>0)return t=>{let n;for(let i=0;i<r;i++){const r=e[i];r.update(t),n=void 0===n?r.value:a(n,r.value)}return n}}},2765:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createAnimation=void 0;const n=r(9298);e.createAnimation=function(t){const e=n.createInterpolationCallback(t);if(void 0===e)return;const r=t.delay||0,i=t.afterDelay||0,s=t.direction||"normal",a=t.duration||1e3,o="normal"===s||"reverse"===s?a+r:2*a+r+i,h={delay:r,afterDelay:i,direction:s,duration:a,totalDuration:o,loop:"number"==typeof t.loop?t.loop:!!t.loop},u=n.createInterpolator(t.interpolator),c={loop:0,offset:0,loopDuration:o,direction:"alternate"===s?"normal":s,started:!1,ended:!1,value:void 0};return c.update=function(t,e,r,n){const{loop:i,totalDuration:s,delay:a,afterDelay:o,direction:h,duration:u}=e;return c=>{if("number"==typeof i&&c>=s*i||!1===i&&c>=e.totalDuration)return t.started=!1,t.ended=!0,t.offset=r("normal"===h?u:0,u),void(t.value=n(t.offset));if(t.loop=Math.ceil(c/s),c%=s,(c-=a)<=0)return t.started=!1,t.offset=r(0,u),void(t.value=n(t.offset));if(t.started=!0,"alternate"===h)c<=u?(t.direction="normal",t.offset=r(c,u)):(t.direction="reverse",c-=u,(c-=o)>=0?t.offset=1-r(c>=u?u:c,u):t.offset=1);else{const e=r(c>=u?u:c,u);t.offset="normal"===h?e:1-e}t.value=n(t.offset)}}(c,h,u,e),c}},9298:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createInterpolator=e.createInterpolationCallback=void 0;const n=r(9968),i=r(3431),s=r(9727),a=r(8782);e.createInterpolationCallback=function(t){const e=Array.isArray(t.from)?t.from:[t.from],r=Array.isArray(t.to)?t.to:[t.to],i=t.round,s="hue"===t.colorTransitionMode?a.interpolateColorHSL:a.interpolateColorRGB;if(e.length!==r.length)return;const o=[];for(let t=0,a=e.length;t<a;t++){if(typeof e[t]!=typeof r[t])return void console.warn("[@urpflanze/animation]: `from` and `to` values mismatch");if("string"!=typeof e[t]){const n=e[t],s=r[t];o.push(void 0!==i?t=>1===t?s:0===t?n:Math.round((n+t*(s-n))*i)/i:t=>1===t?s:0===t?n:n+t*(s-n))}else{const i=e[t],a=r[t],h=n.parseColorAndConvert(i),u=n.parseColorAndConvert(a);void 0!==h&&void 0!==u&&o.push((t=>1===t?a:0===t?i:s(h,u,t)))}}return t=>{const e=o.map((e=>e(t)));return 1===e.length?e[0]:e}},e.createInterpolator=function(t){var e,r;switch(typeof t){case"function":return(e,r)=>t(e/r,e);case"string":if("wave"===t)return(t,e)=>.5+.5*Math.sin(t*Math.PI*2/e+1.5*Math.PI);if(t in s.Easings){const e=s.Easings[t];return(t,r)=>e(t,0,1,r)}return(t,e)=>s.Easings.linear(t,0,1,e);case"object":switch(t.type){case"wave":{const r=1.5*Math.PI+((null===(e=t.params)||void 0===e?void 0:e.phase)||0);return(t,e)=>.5+.5*Math.sin(t*Math.PI*2/e+r)}case"elasticIn":case"elasticOut":case"elasticInOut":{const e=s.Easings[t.type],{amplitude:r,period:n}=t.params||{};return(t,i)=>e(t,0,1,i,r,n)}case"backIn":case"backOut":case"backInOut":{const e=s.Easings[t.type],n=(null===(r=t.params)||void 0===r?void 0:r.overshoot)||void 0;return(t,r)=>e(t,0,1,r,n)}case"cubicBezier":{const e=i.default(t.params[0],t.params[1],t.params[2],t.params[3]);return(t,r)=>e(t/r)}}}return(t,e)=>s.Easings.linear(t,0,1,e)}},7518:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(5240),e),i(r(8782),e),i(r(2765),e),i(r(9298),e),i(r(9727),e),i(r(2894),e)},5240:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},8782:(t,e)=>{function r(t,e,r=!0,n="alternate",i=0,s=0){const a="normal"===n||"reverse"===n?e+i:2*e+i+s;return"number"==typeof r&&t>=a*r||!1===r&&t>=a?"normal"===n?e:0:(t%=a,(t-=i)<=0?0:"alternate"===n?t<=e?t:(t-=e,(t-=s)>=0?e-(t>=e?e:t):e):t>=e?e:t)}Object.defineProperty(e,"__esModule",{value:!0}),e.interpolateColorHSL=e.interpolateColorRGB=e.cosp=e.sinp=e.clockOffset=e.clock=void 0,e.clock=r,e.clockOffset=function(t,e,n=!0,i="alternate",s=0,a=0){return r(t,e,n,i,s,a)/e};const n=2*Math.PI;e.sinp=function(t,e,r=0,i=!1){const s=Math.sin(t*n/e+r);return i?.5+.5*s:s},e.cosp=function(t,e,r=0,i=!1){const s=Math.cos(t*n/e+r);return i?.5+.5*s:s},e.interpolateColorRGB=function(t,e,r){const n=t.r+r*(e.r-t.r),i=t.g+r*(e.g-t.g),s=t.b+r*(e.b-t.b),a=t.alpha+r*(e.alpha-t.alpha);return`rgba(${Math.floor(n)},${Math.floor(i)},${Math.floor(s)},${a})`},e.interpolateColorHSL=function(t,e,r){return`hsla(${t.h+r*(e.h-t.h)},${t.s+r*(e.s-t.s)}%,${t.l+r*(e.l-t.l)}%,${t.alpha+r*(e.alpha-t.alpha)})`}},9968:t=>{var e;window,e=function(){return(()=>{var t=[function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(1),e),i(r(2),e),i(r(3),e)},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.rgbToHsl=e.hslToRgb=e.rgbToHex=void 0,e.rgbToHex=function(t,e,r){return`#${((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1)}`},e.hslToRgb=function(t,e,r){let n,i,s;if(t/=360,r/=100,0==(e/=100))n=i=s=r;else{const a=(t,e,r)=>(r+=r<0?1:r>1?-1:0)<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t,o=r<.5?r*(1+e):r+e-r*e,h=2*r-o;n=a(h,o,t+1/3),i=a(h,o,t),s=a(h,o,t-1/3)}return[.5+255*n<<0,.5+255*i<<0,.5+255*s<<0]},e.rgbToHsl=function(t,e,r){t/=255,e/=255,r/=255;const n=Math.max(t,e,r),i=Math.min(t,e,r),s=(n+i)/2;let a,o;if(n===i)a=o=0;else{const h=n-i;switch(o=s>.5?h/(2-n-i):h/(n+i),n){case t:a=(e-r)/h+(e<r?6:0);break;case e:a=(r-t)/h+2;break;case r:a=(t-e)/h+4}a/=6}return[.5+360*a<<0,.5+100*o<<0,.5+100*s<<0]}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.parseColorAndConvert=void 0;const n=r(4),i=r(2);function s(t){if("number"==typeof t)return t>16777215?{type:"rgb",a:t>>24&255,b:t>>16&255,c:t>>8&255,alpha:(255&t)/255}:{type:"rgb",a:t>>16&255,b:t>>8&255,c:255&t,alpha:1};t=t.replace(/\s/g,""),n.default[t]&&(t=n.default[t]);let e=/^#([0-9a-f]{3,8})$/i.exec(t);if(e){const t=e[1];return 3===t.length?{type:"rgb",a:parseInt(t[0]+t[0],16),b:parseInt(t[1]+t[1],16),c:parseInt(t[2]+t[2],16),alpha:1}:{type:"rgb",a:parseInt(t[0]+t[1],16),b:parseInt(t[2]+t[3],16),c:parseInt(t[4]+t[5],16),alpha:t.length>6?parseInt(t.substring(6),16)/255:1}}if(e=/^((hsl|rgb)a?)\((\d+),(\d+)%?,(\d+)%?,?(.+)?\)$/i.exec(t),e){const[,,t,r,n,i,s]=e;return{type:t,a:+r,b:+n,c:+i,alpha:s?+s:1}}}e.parseColorAndConvert=function(t){const e=s(t);if(e){if("hsl"===e.type){const[t,r,n]=i.hslToRgb(e.a,e.b,e.c);return{r:t,g:r,b:n,h:e.a,s:e.b,l:e.c,alpha:e.alpha}}{const[t,r,n]=i.rgbToHsl(e.a,e.b,e.c);return{h:t,s:r,l:n,r:e.a,g:e.b,b:e.c,alpha:e.alpha}}}},e.parseColor=s},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}],e={},r=function r(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,r),s.exports}(0);return r})()},t.exports=e()},814:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.rgbToHsl=e.hslToRgb=e.rgbToHex=void 0,e.rgbToHex=function(t,e,r){return`#${((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1)}`},e.hslToRgb=function(t,e,r){let n,i,s;if(t/=360,r/=100,0==(e/=100))n=i=s=r;else{const a=(t,e,r)=>(r+=r<0?1:r>1?-1:0)<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t,o=r<.5?r*(1+e):r+e-r*e,h=2*r-o;n=a(h,o,t+1/3),i=a(h,o,t),s=a(h,o,t-1/3)}return[.5+255*n<<0,.5+255*i<<0,.5+255*s<<0]},e.rgbToHsl=function(t,e,r){t/=255,e/=255,r/=255;const n=Math.max(t,e,r),i=Math.min(t,e,r),s=(n+i)/2;let a,o;if(n===i)a=o=0;else{const h=n-i;switch(o=s>.5?h/(2-n-i):h/(n+i),n){case t:a=(e-r)/h+(e<r?6:0);break;case e:a=(r-t)/h+2;break;case r:a=(t-e)/h+4}a/=6}return[.5+360*a<<0,.5+100*o<<0,.5+100*s<<0]}},4947:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},7358:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(6097),e),i(r(814),e),i(r(5576),e)},5576:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.parseColorAndConvert=void 0;const n=r(4947),i=r(814);function s(t){if("number"==typeof t)return t>16777215?{type:"rgb",a:t>>24&255,b:t>>16&255,c:t>>8&255,alpha:(255&t)/255}:{type:"rgb",a:t>>16&255,b:t>>8&255,c:255&t,alpha:1};t=t.replace(/\s/g,""),n.default[t]&&(t=n.default[t]);let e=/^#([0-9a-f]{3,8})$/i.exec(t);if(e){const t=e[1];return 3===t.length?{type:"rgb",a:parseInt(t[0]+t[0],16),b:parseInt(t[1]+t[1],16),c:parseInt(t[2]+t[2],16),alpha:1}:{type:"rgb",a:parseInt(t[0]+t[1],16),b:parseInt(t[2]+t[3],16),c:parseInt(t[4]+t[5],16),alpha:t.length>6?parseInt(t.substring(6),16)/255:1}}if(e=/^((hsl|rgb)a?)\((\d+),(\d+)%?,(\d+)%?,?(.+)?\)$/i.exec(t),e){const[,,t,r,n,i,s]=e;return{type:t,a:+r,b:+n,c:+i,alpha:s?+s:1}}}e.parseColorAndConvert=function(t){const e=s(t);if(e){if("hsl"===e.type){const[t,r,n]=i.hslToRgb(e.a,e.b,e.c);return{r:t,g:r,b:n,h:e.a,s:e.b,l:e.c,alpha:e.alpha}}{const[t,r,n]=i.rgbToHsl(e.a,e.b,e.c);return{h:t,s:r,l:n,r:e.a,g:e.b,b:e.c,alpha:e.alpha}}}},e.parseColor=s},6097:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2513:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;const n=r(1378),i=r(541),s=r(2648),a=r(5511);class o extends i.SceneChild{constructor(t={}){t.type="Group",super(t),this.children=[],["id","name","data","order","type"].forEach((e=>{e in t&&delete t[e]})),this.props=t}isStatic(){const t=this.children;for(let e=0,r=t.length;e<r;e++)if(!t[e].isStatic())return!1;return!0}isStaticIndexed(){const t=this.children;for(let e=0,r=t.length;e<r;e++)if(!t[e].isStaticIndexed())return!1;return!0}add(...t){for(let e=0,r=t.length;e<r;e++){const r=t[e],i=r.getProps();Object.keys(this.props).forEach((t=>{void 0===i[t]&&r.setProp(t,this.props[t])})),r.order=void 0!==r.order?r.order:this.children.length>0?Math.max.apply(this,this.children.map((t=>t.order||0)))+1:0,this.scene&&n.Scene.propagateToChilden(r,this.scene),this.children.push(r)}this.sortChildren()}sortChildren(){this.children.sort(((t,e)=>t.order-e.order)),this.children=this.children.map(((t,e)=>(t.order=e,t))),this.clearBuffer(!0)}getChildren(){return this.children}find(t){if(this.id===t||this.name===t)return this;const e=this.getChildren();for(let r=0,n=e.length;r<n;r++){const n=e[r].find(t);if(null!==n)return n}return null}get(t){return t>=0&&t<this.children.length?this.children[t]:null}remove(t){if(t>=0&&t<this.children.length){const e=this.children.splice(t,1);return this.clearBuffer(!0),e}return!1}removeFromId(t){for(let e=0,r=this.children.length;e<r;e++)if(this.children[e].id==t)return this.children.splice(e,1),this.clearBuffer(!0)}generate(t,e=!1,r){this.generateId=t,this.children.forEach((n=>n.generate(t,e,r)))}getBounding(){const t=[],e=a.Bounding.empty();if(this.children.length>0){this.children.forEach((e=>t.push(e.getBounding())));for(let r=0,n=this.children.length;r<n;r++)e.x=e.x>t[r].x?t[r].x:e.x,e.y=e.y>t[r].y?t[r].y:e.y,e.width=e.width<t[r].width?t[r].width:e.width,e.height=e.height<t[r].height?t[r].height:e.height;e.cx=e.x+e.width/2,e.cy=e.y+e.height/2}return e}clearBuffer(t=!1,e=!0){if(this.children.forEach((e=>e.clearBuffer(t,!1))),this.scene&&e){const r=this.scene.getParentsOfSceneChild(this);r.length>0&&r[r.length-1].clearBuffer(t,e)}}setProp(t,e){"object"==typeof t?Object.keys(t).forEach((e=>this.props[e]=t[e])):this.props[t]=e,this.children.forEach((r=>r.setProp(t,e)))}setPropUnsafe(t,e){super.setPropUnsafe(t,e),this.children.forEach((r=>r.setPropUnsafe(t,e)))}getBufferLength(t){return this.children.map((e=>e.getBufferLength(t))).reduce(((t,e)=>t+e),0)}getBuffer(){const t=this.children.map((t=>t.getBuffer())).filter((t=>void 0!==t)),e=t.reduce(((t,e)=>t+e.length),0);if(e>0){const r=new Float32Array(e);r.set(t[0],0);for(let e=1,n=0,i=t.length;e<i;e++)n+=t[e-1].length,r.set(t[e],n);return r}return s.ShapeBase.EMPTY_BUFFER}getIndexedBuffer(){const t=this.children.map((t=>t.getIndexedBuffer())).filter((t=>void 0!==t));return[].concat.apply([],t)}stream(t){this.children.forEach((e=>e.stream(t)))}}e.Group=o},1378:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=void 0;const n=r(541),i=r(2513),s=r(6448),a=r(313);class o{constructor(t={}){this.width=400,this.height=400,this.background="hsla(0, 0%, 0%, 1)",this.color="hsla(0, 0%, 100%, 1)",this.currentTime=0,void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height),void 0!==t.background&&(this.background=t.background),void 0!==t.color&&(this.color=t.color),this.children=[],this.anchorSettings=t.anchor,this.setSize(t.width||this.width,t.height||this.height,t.anchor)}setSize(t,e,r){this.width=t,this.height=e,this.center=[this.width/2,this.height/2],this.anchor=r&&Array.isArray(r)?["number"==typeof r[0]?(.5+.5*a.clamp(-1,1,r[0]))*this.width:"left"===r[0]?0:"right"===r[0]?this.width:this.center[0],"number"==typeof r[1]?(.5+.5*a.clamp(-1,1,r[1]))*this.height:"top"===r[1]?0:"bottom"===r[1]?this.height:this.center[1]]:[this.center[0],this.center[1]]}getWidth(t=100){return this.width*t/100}getHeight(t=100){return this.height*t/100}resize(t,e=t){this.setSize(t,e,this.anchorSettings),this.children.forEach((t=>t.clearBuffer(!0,!1)))}update(t=0){this.currentTime=t;for(let t=0,e=this.children.length;t<e;t++)this.children[t].generate(this.currentTime,!0)}stream(t){this.children.forEach((e=>e.stream(t)))}getChildren(){return this.children}add(...t){const e="number"==typeof t[t.length-1]?t[t.length-1]:void 0,r=t.length-(void 0===e?0:1);for(let n=0;n<r;n++){const r=t[n];r.order=void 0!==e?e+n:void 0!==r.order?r.order:this.children.length>0?Math.max.apply(this,this.children.map((t=>t.order||0)))+1:0,o.propagateToChilden(r,this),this.children.push(r),r.clearBuffer(!0,!1),r.generate(0,!0)}this.sortChildren()}sortChildren(){this.children.sort(((t,e)=>t.order-e.order)),this.children=this.children.map(((t,e)=>(t.order=e,t)))}find(t){const e=this.getChildren();for(let r=0,n=e.length;r<n;r++){const n=e[r].find(t);if(null!==n)return n}return null}get(t){return t>=0&&t<this.children.length?this.children[t]:null}remove(t){t>=0&&t<this.children.length&&this.children.splice(t,1)}removeChildren(){this.children=[]}removeFromId(t){for(let e=0,r=this.children.length;e<r;e++)if(this.children[e].id===t||this.children[e].name===t)return void this.children.splice(e,1)}isFirstLevelChild(t){for(let e=0,r=this.children.length;e<r;e++)if(this.children[e].id===t.id)return!0;const e=this.getParentsOfSceneChild(t);return 1===e.length&&e[0]instanceof i.Group}getParentsOfSceneChild(t){const e=o.getParentsOfSceneChild(this,t);return e?(e.splice(0,1),e):[]}static getParentsOfSceneChild(t,e,r=[]){let a;if(t instanceof n.SceneChild){if(t.id==e.id)return r;if(t instanceof s.Shape&&t.shape){const n=r.slice();if(n.push(t),a=o.getParentsOfSceneChild(t.shape,e,n))return a}}if(t instanceof o||t instanceof i.Group){const n=t.getChildren();r.push(t);for(let t=0,i=n.length;t<i;t++){const i=n[t];if(a=o.getParentsOfSceneChild(i,e,r))return a}r.pop()}return null}static walk(t,e){if(e instanceof n.SceneChild){if(!1===t(e))return!1;if(e instanceof s.Shape&&e.shape&&!1===o.walk(t,e.shape))return!1}if(e instanceof o||e instanceof i.Group){const r=e.getChildren();for(let e=0,n=r.length;e<n;e++){const n=r[e];if(!1===o.walk(t,n))return!1}}}static propagateToChilden(t,e){t.scene=e,t instanceof i.Group?t.getChildren().forEach((t=>{o.propagateToChilden(t,e)})):t instanceof s.Shape&&t.shape&&(t.shape.scene=e,o.propagateToChilden(t.shape,e))}}e.Scene=o},541:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SceneChild=void 0;let r=0;e.SceneChild=class{constructor(t){var e;this.generateId=-1,this.id=null!==(e=t.id)&&void 0!==e?e:++r,this.type=t.type||"SceneChild",this.name=t.name||this.type+"_"+this.id,this.data=t.data||{},this.props={}}find(t){return this.id===t||this.name===t?this:null}getProps(){return this.props}getProp(t,e,r){var n;return null!==(n=this.props[t])&&void 0!==n?n:r}hasProp(t){return void 0!==this.props[t]}setPropUnsafe(t,e){"string"==typeof t?this.props[t]=e:Object.keys(t).forEach((e=>this.props[e]=t[e]))}}},313:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.interpolate=e.prepareBufferForInterpolation=e.distributePointsInBuffer=e.distanceFromRepetition=e.angle2FromRepetition=e.angleFromRepetition=e.random=e.noise=e.relativeClamp=e.clamp=e.lerp=e.toRadians=e.toDegrees=e.now=void 0;const n=r(21),i=r(2769),s=r(795),a="undefined"!=typeof performance?performance:Date;function o(t,e,r){return r<=t?t:r>=e?e:r}e.now=function(){return a.now()},e.toDegrees=function(t){return 180*t/Math.PI},e.toRadians=function(t){return t*Math.PI/180},e.lerp=function(t,e,r){return(1-r)*t+r*e},e.clamp=o,e.relativeClamp=function(t,e,r,n,i){return o(n,i,(r-t)/(e-t)*(i-n)+n)};const h={random:new n(Math.random)};e.noise=function(t="random",e=0,r=0,i=0,s=-1,a=1){void 0===h[t]&&(h[t]=new n(t));const o=h[t].noise3D(e,r,i);return-1!==s||1!==a?(.5+.5*o)*(a-s)+s:o};const u={};function c(t,e){const r=t.length,n=r/2,i=2*(n+e),s=n-1;if(s>1){const n=r-2,a=Math.floor(e/s);let o=(i-(r+a*n))/2;const h=Math.round(s/o),u=new Float32Array(i);for(let e=0,r=0,i=0;e<n;e+=2,r++,i+=2){const s=t[e],c=t[e+1],l=t[e+2],f=t[e+3];u[i]=s,u[i+1]=c;const d=o>0&&(r%h==0||e===n-2),p=a+(d?1:0),m=1/(p+1);for(let t=0;t<p;t++,i+=2){const e=m*(t+1);u[i+2]=(1-e)*s+e*l,u[i+3]=(1-e)*c+e*f}d&&o--}return u[i-2]=t[r-2],u[i-1]=t[r-1],u}const a=new Float32Array(i);for(let e=0;e<i;e+=2)a[e]=t[e%r],a[e+1]=t[(e+1)%r];return a}function l(t,e){const r=t.length,n=e.length;if(r===n)return[t,e];const i=Math.abs(r-n),s=r<n?e:t,a=c(r<n?t:e,Math.floor(i/2));return r>n?[s,a]:[a,s]}e.random=function(t,e=0,r=1,n){const i=t+"";if(void 0===u[i]){const t=function(t){let e=0,r=1779033703^t.length;for(;e<t.length;e++)r=Math.imul(r^t.charCodeAt(e),3432918353),r=r<<13|r>>>19;return function(){return r=Math.imul(r^r>>>16,2246822507),r=Math.imul(r^r>>>13,3266489909),(r^=r>>>16)>>>0}}(i);u[i]=(s=t(),a=t(),o=t(),h=t(),function(){let t=(s>>>=0)+(a>>>=0)|0;return s=a^a>>>9,a=(o>>>=0)+(o<<3)|0,t=t+(h=1+(h>>>=0)|0)|0,o=(o=o<<21|o>>>11)+t|0,(t>>>0)/4294967296})}var s,a,o,h;const c=e+u[i]()*(r-e);return void 0!==n?Math.round(c*10**n)/10**n:c},e.angleFromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[(t.col.count-1)/2,(t.row.count-1)/2];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=t.col.index-1-r[0],i=t.row.index-1-r[1];return 0===n?0:Math.atan(i/n)}return(t.angle-Math.PI)/2},e.angle2FromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[(t.col.count-1)/2,(t.row.count-1)/2];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=t.col.index-1-r[0],i=t.row.index-1-r[1];return 0===n?0:Math.atan2(i,n)}return t.angle-Math.PI},e.distanceFromRepetition=function(t,e=[0,0]){if(t.type===i.ERepetitionType.Matrix){const r=[.5,.5];r[0]+=r[0]*e[0],r[1]+=r[1]*e[1];const n=[t.col.offset,t.row.offset];return s.default.distance(n,r)}return 1},e.distributePointsInBuffer=c,e.prepareBufferForInterpolation=l,e.interpolate=function(t,e,r=.5){const[n,i]=l(t,e),s=Math.max(n.length,i.length),a="number"==typeof r?[r]:r,o=s/2;if(a.length!==o){const t=a.length;for(let e=0;e<o;e++)a[e]=a[e%t]}const h=new Float32Array(s);for(let t=0,e=0;t<s;t+=2,e++)h[t]=(1-a[e])*n[t]+a[e]*i[t],h[t+1]=(1-a[e])*n[t+1]+a[e]*i[t+1];return h}},795:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});const r=new Array(4),n={from:(t=0,e)=>{const r=new Array(2);return"number"==typeof t?(r[0]=t,r[1]=null!=e?e:t):(r[0]=t[0],r[1]=t[1]),r},normalize:t=>{const e=n.length(t);return 0!==e?[t[0]/e,t[1]/e]:[0,0]},distance:(t,e)=>Math.hypot(t[0]-e[0],t[1]-e[1]),dot:(t,e)=>t[0]*e[0]+t[1]*e[1],length:t=>Math.hypot(t[0],t[1]),angle:(t,e)=>(t=n.normalize(t),e=n.normalize(e),Math.acos(n.dot(t,e))),skewX:(t,e)=>{t[0]+=Math.tan(e)*t[1]},skewY:(t,e)=>{t[1]+=Math.tan(e)*t[0]},squeezeX:(t,e)=>{t[1]+=t[1]*(t[0]*-e)},squeezeY:(t,e)=>{t[0]+=t[0]*(t[1]*e)},rotate:(t,e,r)=>{const n=t[0]-r[0],i=t[1]-r[1];t[0]=n*e[0]+i*e[1]+r[0],t[1]=n*e[2]+i*e[3]+r[1]},rotateX:(t,e,i)=>{r[0]=1,r[1]=0,r[2]=0,r[3]=Math.cos(i),n.rotate(t,r,e)},rotateY:(t,e,i)=>{r[0]=Math.cos(i),r[1]=0,r[2]=0,r[3]=1,n.rotate(t,r,e)},rotateZ:(t,e,i)=>{r[0]=Math.cos(i),r[1]=-Math.sin(i),r[2]=Math.sin(i),r[3]=Math.cos(i),n.rotate(t,r,e)},translate:(t,e)=>{t[0]+=e[0],t[1]+=e[1]},scale:(t,e)=>{t[0]*=e[0],t[1]*=e[1]},divide:(t,e)=>{t[0]/=e[0],t[1]/=e[1]},toString:t=>`x: ${t[0]}, y: ${t[1]}`,ZERO:Array.from([0,0]),ONE:Array.from([1,1])};e.default=n},8721:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.toVec3=e.toVec2=e.fromSkew=e.VEC2_ONE=e.VEC2_ZERO=e.VEC3_ONE=e.VEC3_ZERO=void 0;const n=r(887);e.VEC3_ZERO=[0,0,0],e.VEC3_ONE=[1,1,1],e.VEC2_ZERO=[0,0],e.VEC2_ONE=[1,1],n.glMatrix.setMatrixArrayType(Array),e.fromSkew=function(t,e){return t[0]=1,t[1]=Math.tan(e[1]),t[2]=0,t[3]=0,t[4]=Math.tan(e[0]),t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.toVec2=function(t){return Array.isArray(t)?[t[0],t[1]]:[t,t]},e.toVec3=function(t,e=0){return Array.isArray(t)?[t[0],t[1],e]:[t,t,e]}},3792:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mod=e.PHI=e.PI2=e.log=void 0,e.log=(t,e)=>Math.log(t)/Math.log(e),e.PI2=2*Math.PI,e.PHI=(1+Math.sqrt(5))/2,e.mod=(t,e)=>{const r=t%e;return r<0?r+e:r}},5511:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Adapt=e.Bounding=e.EAdaptMode=void 0;const n=r(9958);var i;!function(t){t[t.None=0]="None",t[t.Scale=2]="Scale",t[t.Center=4]="Center",t[t.Fill=8]="Fill"}(i=e.EAdaptMode||(e.EAdaptMode={})),e.Bounding={empty:()=>({cx:0,cy:0,x:-1,y:-1,width:2,height:2}),clear:t=>{t[0]=void 0,t[1]=void 0,t[2]=void 0,t[3]=void 0},add:(t,e,r)=>{(void 0===t[0]||e<t[0])&&(t[0]=e),(void 0===t[2]||e>t[2])&&(t[2]=e),(void 0===t[1]||r<t[1])&&(t[1]=r),(void 0===t[3]||r>t[3])&&(t[3]=r)},sum:(t,e)=>{void 0!==e[0]&&void 0!==e[1]&&void 0!==e[2]&&void 0!==e[3]?void 0===t[0]||void 0===t[1]||void 0===t[2]||void 0===t[3]?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):(t[0]<e[0]&&(t[0]=e[0]),t[2]>e[2]&&(t[2]=e[2]),t[1]<e[1]&&(t[1]=e[1]),t[3]>e[3]&&(t[3]=e[3])):console.warn("[Urplfanze:Bounding] cannot sum bounding")},bind:(t,e)=>{void 0!==e[0]&&void 0!==e[1]&&void 0!==e[2]&&void 0!==e[3]?(t.x=e[0],t.y=e[1],t.width=e[2]-e[0],t.height=e[3]-e[1],t.cx=t.x+t.width/2,t.cy=t.y+t.height/2):console.warn("[Urplfanze:Bounding] cannot bind bounding")}};class s extends n.Modifier{constructor(t){super(),this.mode=t.mode||i.Fill,this.rect=t.rect}apply(t,e){return s.adapt(t,this.mode,this.rect)}static adapt(t,e,r){if(e===i.None)return Float32Array.from(t);const n=new Float32Array(t.length);r||(r=s.getBounding(t));const a=r.width>=2||r.height>=2||e>=i.Fill&&(r.width<2||r.height<2)?2/Math.max(r.width,r.height):1,o=e>=i.Center?r.cx:0,h=e>=i.Center?r.cy:0;for(let e=0,r=t.length;e<r;e+=2)n[e]=(t[e]-o)*a,n[e+1]=(t[e+1]-h)*a;return n}static getBounding(t,r){void 0===r&&(r=e.Bounding.empty());const n=[void 0,void 0,void 0,void 0];for(let r=0,i=t.length;r<i;r+=2)e.Bounding.add(n,t[r],t[r+1]);return e.Bounding.bind(r,n),r}}e.Adapt=s,s.MODES=i},8301:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Close=void 0;const n=r(9958);class i extends n.Modifier{constructor(){super()}apply(t,e,r){return i.call(t)}static call(t){const e=t.length;if(i.isClosed(t))return t;const r=new Float32Array(e+2);return r.set(t,0),r[e]=r[0],r[e+1]=r[1],r}static isClosed(t){const e=t.length;return t[0]===t[e-2]&&t[1]===t[e-1]}}e.Close=i},1740:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Mirror=void 0;const n=r(9958);class i extends n.Modifier{constructor(t={x:!0,y:!0}){super(),this.x=!0===t.x,this.y=!0===t.y}apply(t,e){const r=t.length,n=new Float32Array(r*(this.x?2:1)*(this.y?2:1));if(this.x&&this.y){const e=r+r,i=e+r;for(let s=0;s<r;s+=2)n[s]=t[s]-1,n[s+1]=t[s+1]-1,n[r+s]=-1*t[r-2-s]+1,n[r+s+1]=t[r-2-s+1]-1,n[e+s]=-1*t[s]+1,n[e+s+1]=-1*t[s+1]+1,n[i+s]=t[r-2-s]-1,n[i+s+1]=-1*t[r-2-s+1]+1}else if(this.x)for(let e=0;e<r;e+=2)n[e]=t[e]-1,n[e+1]=t[e+1],n[r+e]=-1*t[r-2-e]+1,n[r+e+1]=t[r-2-e+1];else{if(!this.y)return t;for(let e=0;e<r;e+=2)n[e]=t[e],n[e+1]=t[e+1]-1,n[r+e]=t[r-2-e],n[r+e+1]=-1*t[r-2-e+1]+1}return n}}e.Mirror=i},9958:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Modifier=void 0,e.Modifier=class{}},3315:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Offset=void 0;const n=r(9958);class i extends n.Modifier{constructor(t={from:0,to:void 0}){super(),this.from=t.from,this.to=t.to}apply(t,e){return t.subarray(this.from,this.to?this.to<0?t.length+this.to:this.to:void 0)}}e.Offset=i},4660:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Smooth=void 0;const n=r(313),i=r(8301),s=r(9958);class a extends s.Modifier{constructor(t={}){super(),this.level=t.level||1;const e=Array.isArray(t.tension)?t.tension:[t.tension];this.tension=new Array(this.level).fill(.5).map(((t,r)=>n.clamp(0,1,e[r]||t))),this.level=this.level<1?1:this.level,this.closed=!0===t.closed}apply(t,e){if(e&&!i.Close.isClosed(t)){const e=t.length,r=new Float32Array(e+2);r.set(t,0),r[e]=t[0],r[e+1]=t[1],t=r}let r=t;for(let t=0,n=this.level;t<n;t++)r=a.smooth(r,this.tension[t],e||this.closed);return r}static smooth(t,e=.5,r=!1){const n=t.length,i=new Float32Array(2*(t.length-(r?1:0)));r||(i[0]=t[0],i[1]=t[1]);const s=.05+.4*e,a=1-s;let o=r?0:2;for(let e=0,r=n-2;e<r;e+=2,o+=4)i[o]=a*t[e]+s*t[e+2],i[o+1]=a*t[e+1]+s*t[e+3],i[o+2]=s*t[e]+a*t[e+2],i[o+3]=s*t[e+1]+a*t[e+3];return r?(i[o]=i[0],i[o+1]=i[1]):(i[o]=t[n-2],i[o+1]=t[n-1]),i}}e.Smooth=a},5838:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Solidify=void 0;const n=r(9958);class i extends n.Modifier{constructor(t={}){super(),this.closed=!0===t.closed,this.thickness=t.thickness||.2,this.error=t.error}apply(t,e){return i.solidify(t,this.thickness,this.closed,this.error)}static solidify(t,e,r=!1,n){const s=[],a=(e="number"==typeof e?[e]:e).length;let o,h,u=[[0,0],[0,0]],c=[[0,0],[0,0]];for(let r=0,l=0,f=t.length-2;r<f;r+=2,l++){o=0===r,h=r===f-2;const d={index:r+1,offset:r/f,count:f},p={index:r+2,offset:(r+1)/f,count:f},m="function"==typeof e?e(d):e[l%a],g="function"==typeof e?e(p):e[(l+1)%a],v=i.getOffsets(t[r],t[r+1],t[r+2],t[r+3],m),b=i.getOffsets(t[r],t[r+1],t[r+2],t[r+3],g),y=[t[r]+v[0],t[r+1]+v[1]],w=[t[r+2]+b[0],t[r+3]+b[1]],_=[t[r]-v[0],t[r+1]-v[1]],x=[t[r+2]-b[0],t[r+3]-b[1]];if(!o){const t=i.getIntersection(u[0],u[1],y,w,n);t&&(s.unshift(t[1]),s.unshift(t[0]));const e=i.getIntersection(c[0],c[1],_,x,n);e&&(s.push(e[0]),s.push(e[1]))}o&&(s.unshift(y[1]),s.unshift(y[0]),s.push(_[0]),s.push(_[1])),h&&(s.unshift(w[1]),s.unshift(w[0]),s.push(x[0]),s.push(x[1])),h||(u=[y,w],c=[_,x])}if(r){const e=t.length-2,r=s.length-2,n=.5*s[0]+.5*s[e],i=.5*s[1]+.5*s[e+1],a=.5*s[e+2]+.5*s[r],o=.5*s[e+3]+.5*s[r+1];s[0]=n,s[1]=i,s[e]=n,s[e+1]=i,s[e+2]=a,s[e+3]=o,s[r]=a,s[r+1]=o}return Float32Array.from(s)}static getOffsets(t,e,r,n,i){const s=r-t,a=n-e,o=i/(2*Math.sqrt(s*s+a*a));return[-o*a,o*s]}static getIntersection(t,e,r,n,i=1e-5){const s=(e[1]-t[1])/(e[0]-t[0]),a=(n[1]-r[1])/(n[0]-r[0]);if(Math.abs(s-a)<i)return;const o=t[1]-s*t[0],h=(o-(r[1]-a*r[0]))/(a-s);return[h,s*h+o]}}e.Solidify=i},5588:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Subdivide=void 0;const n=r(9958);class i extends n.Modifier{constructor(t={}){super(),this.level=t.level||1,this.level=this.level<1?1:this.level}apply(t,e){const r=this.level;let n=t;if(n&&n.length>0)for(let t=0;t<r;t++)n=i.subdivide(n,e);return n}static subdivide(t,e=!1){const r=t.length,n=new Float32Array(2*r-(e?0:2));for(let e=0;e<r;e+=2)if(0===e)n[0]=t[0],n[1]=t[1];else{const r=t[e-2],i=t[e-1],s=t[e],a=t[e+1],o=(s+r)/2,h=(a+i)/2;n[2*(e-1)]=o,n[2*(e-1)+1]=h,n[2*e]=s,n[2*e+1]=a}return e&&(n[2*(r-1)]=(t[0]+t[r-2])/2,n[2*(r-1)+1]=(t[1]+t[r-1])/2),n}}e.Subdivide=i},9514:(t,e,r)=>{e.q=void 0;const n=r(5511),i=r(1740),s=r(4660),a=r(5838),o=r(5588),h=r(8301),u=r(3315),c={Adapt:n.Adapt,Mirror:i.Mirror,Smooth:s.Smooth,Solidify:a.Solidify,Subdivide:o.Subdivide,Close:h.Close,Offset:u.Offset};e.q=c},6448:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=void 0;const n=r(1378),i=r(541),s=r(2648);class a extends s.ShapeBase{constructor(t){t.type=t.type||"Shape",super(t),t.shape instanceof i.SceneChild?this.shape=t.shape:console.warn("[Urpflanze:Shape] requires the 'shape' property to be instance of SceneChild,\nYou passed:",t.shape),this.shapeUseParent=!!t.shapeUseParent,this.bStatic=this.isStatic(),this.bStaticIndexed=this.isStaticIndexed()}isStatic(){return super.isStatic()&&(!this.shape||this.shape.isStatic())}isStaticIndexed(){return super.isStaticIndexed()&&(!this.shape||this.shape.isStaticIndexed())}find(t){return this.id===t||this.name===t?this:this.shape?this.shape.find(t):null}getBufferLength(t){return this.bStatic&&this.buffer&&this.buffer.length>0?this.buffer.length:(this.shape?this.shape.getBufferLength(t):0)*this.getRepetitionCount()}generateBuffer(t,e){return this.shape?((this.shapeUseParent||this.shape.generateId!==t)&&(this.shapeUseParent&&this.shape.clearBuffer(!0,!1),this.shape.generate(t,!1,e)),this.shape.getBuffer()):a.EMPTY_BUFFER}getShapeBounding(){return this.shape?this.shape.getBounding():this.bounding}addIndex(t,e,r){if(this.shape){const n=this.shape.getIndexedBuffer()||[],i={shape:this,frameLength:t,singleRepetitionBounding:r,repetition:{type:e.type,angle:e.angle,index:e.index,count:e.count,offset:e.offset,row:{index:e.row.index,count:e.row.count,offset:e.row.offset},col:{index:e.col.index,count:e.col.count,offset:e.col.offset}}};for(let t=0,e=n.length;t<e;t++){const e={...n[t]},r=e.parent?a.setIndexedParent(e.parent,i):i;this.indexedBuffer.push({...e,parent:r})}}}static setIndexedParent(t,e){const r={...t};return r.parent=t.parent?a.setIndexedParent(t.parent,e):e,r}setShape(t){void 0===t?(this.shape=void 0,this.clearBuffer(!0,!0)):(this.scene&&n.Scene.propagateToChilden(t,this.scene),this.shape=t,this.shape.clearBuffer(!0,!0))}}e.Shape=a},2648:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShapeBase=void 0;const n=r(887),i=r(3757),s=r(8721),a=r(795),o=r(3792),h=r(5511),u=r(313),c=r(541),l=n.mat4.create(),f=n.mat4.create(),d=n.mat4.create(),p=n.mat4.create();class m extends c.SceneChild{constructor(t={}){super(t),this.bIndexed=!1,this.indexedBuffer=[],this.bounding={cx:0,cy:0,x:-1,y:-1,width:2,height:2},this.props={distance:t.distance,repetitions:t.repetitions,rotateX:t.rotateX,rotateY:t.rotateY,rotateZ:t.rotateZ,skewX:t.skewX,skewY:t.skewY,squeezeX:t.squeezeX,squeezeY:t.squeezeY,displace:t.displace,translate:t.translate,scale:t.scale,transformOrigin:t.transformOrigin,perspective:t.perspective,perspectiveOrigin:t.perspectiveOrigin},this.anchor=t.anchor&&Array.isArray(t.anchor)?["number"==typeof t.anchor[0]?-1*u.clamp(-1,1,t.anchor[0]):"left"===t.anchor[0]?1:"right"===t.anchor[0]?-1:0,"number"==typeof t.anchor[1]?-1*u.clamp(-1,1,t.anchor[1]):"top"===t.anchor[1]?1:"bottom"===t.anchor[1]?-1:0]:[0,0],this.boundingType="string"==typeof t.boundingType?"relative"===t.boundingType?i.EBoundingType.Relative:i.EBoundingType.Fixed:t.boundingType||i.EBoundingType.Fixed,this.vertexCallback=t.vertexCallback}isStatic(){const t=this.props;return"function"!=typeof t.repetitions&&"function"!=typeof t.distance&&"function"!=typeof t.displace&&"function"!=typeof t.scale&&"function"!=typeof t.translate&&"function"!=typeof t.skewX&&"function"!=typeof t.skewY&&"function"!=typeof t.squeezeX&&"function"!=typeof t.squeezeY&&"function"!=typeof t.rotateX&&"function"!=typeof t.rotateY&&"function"!=typeof t.rotateZ&&"function"!=typeof t.transformOrigin&&"function"!=typeof t.perspective&&"function"!=typeof t.perspectiveOrigin}isStaticIndexed(){return"function"!=typeof this.props.repetitions}getProp(t,e,r){let n=this.props[t];return"function"==typeof n&&(n=n(e)),void 0===n||Number.isNaN(n)?r:n}setProp(t,e,r=!1){"string"==typeof t?(r=r||"repetitions"==t,this.props[t]=e):(r=r||"repetitions"in t,Object.keys(t).forEach((e=>this.props[e]=t[e]))),this.clearBuffer(r,!0)}clearBuffer(t=!1,e=!0){if(this.buffer=void 0,t&&(this.bIndexed=!1,this.indexedBuffer=[]),this.bStatic=this.isStatic(),this.bStaticIndexed=this.isStaticIndexed(),e&&this.scene&&!this.scene.isFirstLevelChild(this)){const r=this.scene.getParentsOfSceneChild(this);r.length>0&&r[r.length-1].clearBuffer(t,e)}}generate(t=0,e=!1,r){var c,g;if(this.buffer&&this.bStatic)return;this.generateId=t,this.bStaticIndexed&&this.bIndexed||(this.indexedBuffer=[]);const v=m.getEmptyPropArguments(this,r),b=v.repetition,y=this.getProp("repetitions",v,1),w=Array.isArray(y)?i.ERepetitionType.Matrix:i.ERepetitionType.Ring,_=Array.isArray(y)?y[0]*(null!==(c=y[1])&&void 0!==c?c:y[0]):y,x=Array.isArray(y)?y[0]:_,M=Array.isArray(y)?null!==(g=y[1])&&void 0!==g?g:y[0]:1,S=b.row;S.count=x;const k=b.col;k.count=M,b.count=_,b.col.count=M,b.row.count=x,b.type=w;let A=0;const E=[];let P=0;const O=n.vec2.fromValues((M-1)/2,(x-1)/2),C=this.scene?[this.scene.anchor[0],this.scene.anchor[1],0]:[0,0,0],I=[void 0,void 0,void 0,void 0],T=[void 0,void 0,void 0,void 0];for(let r=0;r<x;r++)for(let c=0;c<M;c++,P++){b.index=P+1,b.offset=_>1?P/(_-1):1,b.angle=w===i.ERepetitionType.Ring?o.PI2/_*P:0,k.index=c+1,k.offset=M>1?c/(M-1):1,S.index=r+1,S.offset=x>1?r/(x-1):1;const m=this.generateBuffer(t,v),g=m.length,y=this.getShapeBounding();E[P]=new Float32Array(g),A+=g;{const t=s.toVec2(this.getProp("distance",v,s.VEC2_ZERO)),o=this.getProp("displace",v,0),_=s.toVec3(this.getProp("scale",v,s.VEC2_ONE),1),x=s.toVec3(this.getProp("translate",v,s.VEC2_ZERO),0),M=this.getProp("skewX",v,0),S=this.getProp("skewY",v,0),k=this.getProp("squeezeX",v,0),A=this.getProp("squeezeY",v,0),R=this.getProp("rotateX",v,0),B=this.getProp("rotateY",v,0),F=this.getProp("rotateZ",v,0),L=u.clamp(0,1,this.getProp("perspective",v,0)),z=s.toVec3(this.getProp("perspectiveOrigin",v,s.VEC2_ZERO),0),j=s.toVec3(this.getProp("transformOrigin",v,s.VEC2_ZERO),0);let D;switch(w){case i.ERepetitionType.Ring:D=n.vec3.fromValues(t[0],0,0),n.vec3.rotateZ(D,D,s.VEC3_ZERO,b.angle+o);break;case i.ERepetitionType.Matrix:D=n.vec3.fromValues(t[1]*(c-O[0]),t[0]*(r-O[1]),0)}const N=L>0?Math.max(y.width,y.height)/2:1,q=L>0?N+10*N*(1-L):0,Y=this.boundingType!==i.EBoundingType.Relative||0!==y.cx||0!==y.cy||0!==L||0!==j[0]||0!==j[1],U=0!==z[0]||0!==z[1];Y&&(this.boundingType===i.EBoundingType.Relative?(j[0]=j[0]*(y.width/2)+y.cx,j[1]=j[1]*(y.height/2)+y.cy):(j[0]*=y.width/2,j[1]*=y.height/2),j[2]=q);{n.mat4.identity(f),Y&&n.m