@carandesign/drawui 0.2.3 → 0.2.4
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/CHANGELOG.md +4 -0
- package/LICENSE.md +21 -0
- package/dist/drawui.cjs.js +3 -3
- package/dist/drawui.css +1 -1
- package/dist/drawui.es.js +47 -47
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CaranDesign
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/drawui.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react");var ie={exports:{}},B={};var Ae;function et(){if(Ae)return B;Ae=1;var o=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function s(t,n,r){var a=null;if(r!==void 0&&(a=""+r),n.key!==void 0&&(a=""+n.key),"key"in n){r={};for(var i in n)i!=="key"&&(r[i]=n[i])}else r=n;return n=r.ref,{$$typeof:o,type:t,key:a,ref:n!==void 0?n:null,props:r}}return B.Fragment=e,B.jsx=s,B.jsxs=s,B}var Y={};var je;function tt(){return je||(je=1,process.env.NODE_ENV!=="production"&&(function(){function o(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===se?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case k:return"Fragment";case _:return"Profiler";case v:return"StrictMode";case J:return"Suspense";case K:return"SuspenseList";case te:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case m:return"Portal";case W:return p.displayName||"Context";case $:return(p._context.displayName||"Context")+".Consumer";case H:var M=p.render;return p=p.displayName,p||(p=M.displayName||M.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case ee:return M=p.displayName||null,M!==null?M:o(p.type)||"Memo";case j:M=p._payload,p=p._init;try{return o(p(M))}catch{}}return null}function e(p){return""+p}function s(p){try{e(p);var M=!1}catch{M=!0}if(M){M=console;var S=M.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return S.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),e(p)}}function t(p){if(p===k)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===j)return"<...>";try{var M=o(p);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function n(){var p=T.A;return p===null?null:p.getOwner()}function r(){return Error("react-stack-top-frame")}function a(p){if(P.call(p,"key")){var M=Object.getOwnPropertyDescriptor(p,"key").get;if(M&&M.isReactWarning)return!1}return p.key!==void 0}function i(p,M){function S(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}S.isReactWarning=!0,Object.defineProperty(p,"key",{get:S,configurable:!0})}function c(){var p=o(this.type);return F[p]||(F[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function l(p,M,S,R,oe,ve){var E=S.ref;return p={$$typeof:g,type:p,key:M,props:S,_owner:R},(E!==void 0?E:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:c}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ve}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function u(p,M,S,R,oe,ve){var E=M.children;if(E!==void 0)if(R)if(A(E)){for(R=0;R<E.length;R++)h(E[R]);Object.freeze&&Object.freeze(E)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(E);if(P.call(M,"key")){E=o(p);var q=Object.keys(M).filter(function(Ke){return Ke!=="key"});R=0<q.length?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}",V[E+R]||(q=0<q.length?"{"+q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,R,T,q,T),V[T+R]=!0)}if(T=null,S!==void 0&&(s(S),T=""+S),a(M)&&(s(M.key),T=""+M.key),"key"in M){S={};for(var ve in M)ve!=="key"&&(S[ve]=M[ve])}else S=M;return T&&i(S,typeof p=="function"?p.displayName||p.name||"Unknown":p),l(p,T,S,n(),oe,we)}function h(p){f(p)?p._store&&(p._store.validated=1):typeof p=="object"&&p!==null&&p.$$typeof===j&&(p._payload.status==="fulfilled"?f(p._payload.value)&&p._payload.value._store&&(p._payload.value._store.validated=1):p._store&&(p._store.validated=1))}function f(p){return typeof p=="object"&&p!==null&&p.$$typeof===g}var d=v,g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),W=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),se=Symbol.for("react.client.reference"),E=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,A=Array.isArray,I=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(p){return p()}};var D,F={},ne=d.react_stack_bottom_frame.bind(d,r)(),re=I(t(r)),V={};Y.Fragment=k,Y.jsx=function(p,M,S){var R=1e4>E.recentlyCreatedOwnerStacks++;return u(p,M,S,!1,R?Error("react-stack-top-frame"):ne,R?I(t(p)):re)},Y.jsxs=function(p,M,S){var R=1e4>E.recentlyCreatedOwnerStacks++;return u(p,M,S,!0,R?Error("react-stack-top-frame"):ne,R?I(t(p)):re)}})()),Y}var $e;function st(){return $e||($e=1,process.env.NODE_ENV==="production"?ie.exports=et():ie.exports=tt()),ie.exports}var y=st();function Se(o,e,s){if(o&&o.length){const[t,n]=e,r=Math.PI/180*s,a=Math.cos(r),i=Math.sin(r);for(const c of o){const[l,u]=c;c[0]=(l-t)*a-(u-n)*i+t,c[1]=(l-t)*i+(u-n)*a+n}}}function nt(o,e,s){const t=[];o.forEach(n=>t.push(...n)),Se(t,e,s)}function rt(o,e){return o[0]===e[0]&&o[1]===e[1]}function ot(o,e,s,t=1){const n=s,r=Math.max(e,.1),a=o[0]&&o[0][0]&&typeof o[0][0]=="number"?[o]:o,i=[0,0];if(n)for(const l of a)Se(l,i,n);const c=it(a,r,t);if(n){for(const l of a)Se(l,i,-n);nt(c,i,-n)}return c}function it(o,e,s){const t=[];for(const l of o){const u=[...l];rt(u[0],u[u.length-1])||u.push([u[0][0],u[0][1]]),u.length>2&&t.push(u)}const n=[];e=Math.max(e,.1);const r=[];for(const l of t)for(let u=0;u<l.length-1;u++){const h=l[u],f=l[u+1];if(h[1]!==f[1]){const d=Math.min(h[1],f[1]);r.push({ymin:d,ymax:Math.max(h[1],f[1]),x:d===h[1]?h[0]:f[0],islope:(f[0]-h[0])/(f[1]-h[1])})}}if(r.sort((l,u)=>l.ymin<u.ymin?-1:l.ymin>u.ymin?1:l.x<u.x?-1:l.x>u.x?1:l.ymax===u.ymax?0:(l.ymax-u.ymax)/Math.abs(l.ymax-u.ymax)),!r.length)return n;let a=[],i=r[0].ymin,c=0;for(;a.length||r.length;){if(r.length){let l=-1;for(let h=0;h<r.length&&!(r[h].ymin>i);h++)l=h;r.splice(0,l+1).forEach(h=>{a.push({s:i,edge:h})})}if(a=a.filter(l=>!(l.edge.ymax<=i)),a.sort((l,u)=>l.edge.x===u.edge.x?0:(l.edge.x-u.edge.x)/Math.abs(l.edge.x-u.edge.x)),(s!==1||c%e===0)&&a.length>1)for(let l=0;l<a.length;l=l+2){const u=l+1;if(u>=a.length)break;const h=a[l].edge,f=a[u].edge;n.push([[Math.round(h.x),i],[Math.round(f.x),i]])}i+=s,a.forEach(l=>{l.edge.x=l.edge.x+s*l.edge.islope}),c++}return n}function X(o,e){var s;const t=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=e.strokeWidth*4),n=Math.round(Math.max(n,.1));let r=1;return e.roughness>=1&&(((s=e.randomizer)===null||s===void 0?void 0:s.next())||Math.random())>.7&&(r=n),ot(o,n,t,r||1)}class Ce{constructor(e){this.helper=e}fillPolygons(e,s){return this._fillPolygons(e,s)}_fillPolygons(e,s){const t=X(e,s);return{type:"fillSketch",ops:this.renderLines(t,s)}}renderLines(e,s){const t=[];for(const n of e)t.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],s));return t}}function be(o){const e=o[0],s=o[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class at extends Ce{fillPolygons(e,s){let t=s.hachureGap;t<0&&(t=s.strokeWidth*4),t=Math.max(t,.1);const n=Object.assign({},s,{hachureGap:t}),r=X(e,n),a=Math.PI/180*s.hachureAngle,i=[],c=t*.5*Math.cos(a),l=t*.5*Math.sin(a);for(const[h,f]of r)be([h,f])&&i.push([[h[0]-c,h[1]+l],[...f]],[[h[0]+c,h[1]-l],[...f]]);return{type:"fillSketch",ops:this.renderLines(i,s)}}}class ct extends Ce{fillPolygons(e,s){const t=this._fillPolygons(e,s),n=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),r=this._fillPolygons(e,n);return t.ops=t.ops.concat(r.ops),t}}class ut{constructor(e){this.helper=e}fillPolygons(e,s){s=Object.assign({},s,{hachureAngle:0});const t=X(e,s);return this.dotsOnLines(t,s)}dotsOnLines(e,s){const t=[];let n=s.hachureGap;n<0&&(n=s.strokeWidth*4),n=Math.max(n,.1);let r=s.fillWeight;r<0&&(r=s.strokeWidth/2);const a=n/4;for(const i of e){const c=be(i),l=c/n,u=Math.ceil(l)-1,h=c-u*n,f=(i[0][0]+i[1][0])/2-n/4,d=Math.min(i[0][1],i[1][1]);for(let g=0;g<u;g++){const m=d+h+g*n,k=f-a+Math.random()*2*a,w=m-a+Math.random()*2*a,_=this.helper.ellipse(k,w,r,r,s);t.push(..._.ops)}}return{type:"fillSketch",ops:t}}}class lt{constructor(e){this.helper=e}fillPolygons(e,s){const t=X(e,s);return{type:"fillSketch",ops:this.dashedLine(t,s)}}dashedLine(e,s){const t=s.dashOffset<0?s.hachureGap<0?s.strokeWidth*4:s.hachureGap:s.dashOffset,n=s.dashGap<0?s.hachureGap<0?s.strokeWidth*4:s.hachureGap:s.dashGap,r=[];return e.forEach(a=>{const i=be(a),c=Math.floor(i/(t+n)),l=(i+n-c*(t+n))/2;let u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);const f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d<c;d++){const g=d*(t+n),m=g+t,k=[u[0]+g*Math.cos(f)+l*Math.cos(f),u[1]+g*Math.sin(f)+l*Math.sin(f)],w=[u[0]+m*Math.cos(f)+l*Math.cos(f),u[1]+m*Math.sin(f)+l*Math.sin(f)];r.push(...this.helper.doubleLineOps(k[0],k[1],w[0],w[1],s))}}),r}}class ht{constructor(e){this.helper=e}fillPolygons(e,s){const t=s.hachureGap<0?s.strokeWidth*4:s.hachureGap,n=s.zigzagOffset<0?t:s.zigzagOffset;s=Object.assign({},s,{hachureGap:t+n});const r=X(e,s);return{type:"fillSketch",ops:this.zigzagLines(r,n,s)}}zigzagLines(e,s,t){const n=[];return e.forEach(r=>{const a=be(r),i=Math.round(a/(2*s));let c=r[0],l=r[1];c[0]>l[0]&&(c=r[1],l=r[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let h=0;h<i;h++){const f=h*2*s,d=(h+1)*2*s,g=Math.sqrt(2*Math.pow(s,2)),m=[c[0]+f*Math.cos(u),c[1]+f*Math.sin(u)],k=[c[0]+d*Math.cos(u),c[1]+d*Math.sin(u)],w=[m[0]+g*Math.cos(u+Math.PI/4),m[1]+g*Math.sin(u+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],w[0],w[1],t),...this.helper.doubleLineOps(w[0],w[1],k[0],k[1],t))}}),n}}const O={};function ft(o,e){let s=o.fillStyle||"hachure";if(!O[s])switch(s){case"zigzag":O[s]||(O[s]=new at(e));break;case"cross-hatch":O[s]||(O[s]=new ct(e));break;case"dots":O[s]||(O[s]=new ut(e));break;case"dashed":O[s]||(O[s]=new lt(e));break;case"zigzag-line":O[s]||(O[s]=new ht(e));break;default:s="hachure",O[s]||(O[s]=new Ce(e));break}return O[s]}function dt(){return Math.floor(Math.random()*2**31)}class pt{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const gt=0,Pe=1,Ve=2,ae={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function mt(o){const e=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:gt,text:RegExp.$1},o=o.substr(RegExp.$1.length);else if(o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))e[e.length]={type:Pe,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length);else return[];return e[e.length]={type:Ve,text:""},e}function Me(o,e){return o.type===e}function Le(o){const e=[],s=mt(o);let t="BOD",n=0,r=s[n];for(;!Me(r,Ve);){let a=0;const i=[];if(t==="BOD")if(r.text==="M"||r.text==="m")n++,a=ae[r.text],t=r.text;else return Le("M0,0"+o);else Me(r,Pe)?a=ae[t]:(n++,a=ae[r.text],t=r.text);if(n+a<s.length){for(let c=n;c<n+a;c++){const l=s[c];if(Me(l,Pe))i[i.length]=+l.text;else throw new Error("Param not a number: "+t+","+l.text)}if(typeof ae[t]=="number"){const c={key:t,data:i};e.push(c),n+=a,r=s[n],t==="M"&&(t="L"),t==="m"&&(t="l")}else throw new Error("Bad segment: "+t)}else throw new Error("Path data ended short")}return e}function Be(o){let e=0,s=0,t=0,n=0;const r=[];for(const{key:a,data:i}of o)switch(a){case"M":r.push({key:"M",data:[...i]}),[e,s]=i,[t,n]=i;break;case"m":e+=i[0],s+=i[1],r.push({key:"M",data:[e,s]}),t=e,n=s;break;case"L":r.push({key:"L",data:[...i]}),[e,s]=i;break;case"l":e+=i[0],s+=i[1],r.push({key:"L",data:[e,s]});break;case"C":r.push({key:"C",data:[...i]}),e=i[4],s=i[5];break;case"c":{const c=i.map((l,u)=>u%2?l+s:l+e);r.push({key:"C",data:c}),e=c[4],s=c[5];break}case"Q":r.push({key:"Q",data:[...i]}),e=i[2],s=i[3];break;case"q":{const c=i.map((l,u)=>u%2?l+s:l+e);r.push({key:"Q",data:c}),e=c[2],s=c[3];break}case"A":r.push({key:"A",data:[...i]}),e=i[5],s=i[6];break;case"a":e+=i[5],s+=i[6],r.push({key:"A",data:[i[0],i[1],i[2],i[3],i[4],e,s]});break;case"H":r.push({key:"H",data:[...i]}),e=i[0];break;case"h":e+=i[0],r.push({key:"H",data:[e]});break;case"V":r.push({key:"V",data:[...i]}),s=i[0];break;case"v":s+=i[0],r.push({key:"V",data:[s]});break;case"S":r.push({key:"S",data:[...i]}),e=i[2],s=i[3];break;case"s":{const c=i.map((l,u)=>u%2?l+s:l+e);r.push({key:"S",data:c}),e=c[2],s=c[3];break}case"T":r.push({key:"T",data:[...i]}),e=i[0],s=i[1];break;case"t":e+=i[0],s+=i[1],r.push({key:"T",data:[e,s]});break;case"Z":case"z":r.push({key:"Z",data:[]}),e=t,s=n;break}return r}function Ye(o){const e=[];let s="",t=0,n=0,r=0,a=0,i=0,c=0;for(const{key:l,data:u}of o){switch(l){case"M":e.push({key:"M",data:[...u]}),[t,n]=u,[r,a]=u;break;case"C":e.push({key:"C",data:[...u]}),t=u[4],n=u[5],i=u[2],c=u[3];break;case"L":e.push({key:"L",data:[...u]}),[t,n]=u;break;case"H":t=u[0],e.push({key:"L",data:[t,n]});break;case"V":n=u[0],e.push({key:"L",data:[t,n]});break;case"S":{let h=0,f=0;s==="C"||s==="S"?(h=t+(t-i),f=n+(n-c)):(h=t,f=n),e.push({key:"C",data:[h,f,...u]}),i=u[0],c=u[1],t=u[2],n=u[3];break}case"T":{const[h,f]=u;let d=0,g=0;s==="Q"||s==="T"?(d=t+(t-i),g=n+(n-c)):(d=t,g=n);const m=t+2*(d-t)/3,k=n+2*(g-n)/3,w=h+2*(d-h)/3,_=f+2*(g-f)/3;e.push({key:"C",data:[m,k,w,_,h,f]}),i=d,c=g,t=h,n=f;break}case"Q":{const[h,f,d,g]=u,m=t+2*(h-t)/3,k=n+2*(f-n)/3,w=d+2*(h-d)/3,_=g+2*(f-g)/3;e.push({key:"C",data:[m,k,w,_,d,g]}),i=h,c=f,t=d,n=g;break}case"A":{const h=Math.abs(u[0]),f=Math.abs(u[1]),d=u[2],g=u[3],m=u[4],k=u[5],w=u[6];h===0||f===0?(e.push({key:"C",data:[t,n,k,w,k,w]}),t=k,n=w):(t!==k||n!==w)&&(Ze(t,n,k,w,h,f,d,g,m).forEach(function($){e.push({key:"C",data:$})}),t=k,n=w);break}case"Z":e.push({key:"Z",data:[]}),t=r,n=a;break}s=l}return e}function kt(o){return Math.PI*o/180}function Z(o,e,s){const t=o*Math.cos(s)-e*Math.sin(s),n=o*Math.sin(s)+e*Math.cos(s);return[t,n]}function Ze(o,e,s,t,n,r,a,i,c,l){const u=kt(a);let h=[],f=0,d=0,g=0,m=0;if(l)[f,d,g,m]=l;else{[o,e]=Z(o,e,-u),[s,t]=Z(s,t,-u);const E=(o-s)/2,P=(e-t)/2;let A=E*E/(n*n)+P*P/(r*r);A>1&&(A=Math.sqrt(A),n=A*n,r=A*r);const I=i===c?-1:1,D=n*n,F=r*r,ne=D*F-D*P*P-F*E*E,re=D*P*P+F*E*E,V=I*Math.sqrt(Math.abs(ne/re));g=V*n*P/r+(o+s)/2,m=V*-r*E/n+(e+t)/2,f=Math.asin(parseFloat(((e-m)/r).toFixed(9))),d=Math.asin(parseFloat(((t-m)/r).toFixed(9))),o<g&&(f=Math.PI-f),s<g&&(d=Math.PI-d),f<0&&(f=Math.PI*2+f),d<0&&(d=Math.PI*2+d),c&&f>d&&(f=f-Math.PI*2),!c&&d>f&&(d=d-Math.PI*2)}let k=d-f;if(Math.abs(k)>Math.PI*120/180){const E=d,P=s,A=t;c&&d>f?d=f+Math.PI*120/180*1:d=f+Math.PI*120/180*-1,s=g+n*Math.cos(d),t=m+r*Math.sin(d),h=Ze(s,t,P,A,n,r,a,0,c,[d,E,g,m])}k=d-f;const w=Math.cos(f),_=Math.sin(f),$=Math.cos(d),W=Math.sin(d),H=Math.tan(k/4),J=4/3*n*H,K=4/3*r*H,ee=[o,e],j=[o+J*_,e-K*w],te=[s+J*W,t-K*$],se=[s,t];if(j[0]=2*ee[0]-j[0],j[1]=2*ee[1]-j[1],l)return[j,te,se].concat(h);{h=[j,te,se].concat(h);const E=[];for(let P=0;P<h.length;P+=3){const A=Z(h[P][0],h[P][1],u),I=Z(h[P+1][0],h[P+1][1],u),D=Z(h[P+2][0],h[P+2][1],u);E.push([A[0],A[1],I[0],I[1],D[0],D[1]])}return E}}const bt={randOffset:_t,randOffsetWithRange:St,ellipse:Mt,doubleLineOps:Pt};function Ue(o,e,s,t,n){return{type:"path",ops:z(o,e,s,t,n)}}function he(o,e,s){const t=(o||[]).length;if(t>2){const n=[];for(let r=0;r<t-1;r++)n.push(...z(o[r][0],o[r][1],o[r+1][0],o[r+1][1],s));return e&&n.push(...z(o[t-1][0],o[t-1][1],o[0][0],o[0][1],s)),{type:"path",ops:n}}else if(t===2)return Ue(o[0][0],o[0][1],o[1][0],o[1][1],s);return{type:"path",ops:[]}}function wt(o,e){return he(o,!0,e)}function vt(o,e,s,t,n){const r=[[o,e],[o+s,e],[o+s,e+t],[o,e+t]];return wt(r,n)}function De(o,e){if(o.length){const t=typeof o[0][0]=="number"?[o]:o,n=ce(t[0],1*(1+e.roughness*.2),e),r=e.disableMultiStroke?[]:ce(t[0],1.5*(1+e.roughness*.22),Ne(e));for(let a=1;a<t.length;a++){const i=t[a];if(i.length){const c=ce(i,1*(1+e.roughness*.2),e),l=e.disableMultiStroke?[]:ce(i,1.5*(1+e.roughness*.22),Ne(e));for(const u of c)u.op!=="move"&&n.push(u);for(const u of l)u.op!=="move"&&r.push(u)}}return{type:"path",ops:n.concat(r)}}return{type:"path",ops:[]}}function Mt(o,e,s,t,n){const r=Xe(s,t,n);return Re(o,e,n,r).opset}function Xe(o,e,s){const t=Math.sqrt(Math.PI*2*Math.sqrt((Math.pow(o/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*t)),r=Math.PI*2/n;let a=Math.abs(o/2),i=Math.abs(e/2);const c=1-s.curveFitting;return a+=b(a*c,s),i+=b(i*c,s),{increment:r,rx:a,ry:i}}function Re(o,e,s,t){const[n,r]=We(t.increment,o,e,t.rx,t.ry,1,t.increment*pe(.1,pe(.4,1,s),s),s);let a=ge(n,null,s);if(!s.disableMultiStroke&&s.roughness!==0){const[i]=We(t.increment,o,e,t.rx,t.ry,1.5,0,s),c=ge(i,null,s);a=a.concat(c)}return{estimatedPoints:r,opset:{type:"path",ops:a}}}function Ie(o,e,s,t,n,r,a,i,c){const l=o,u=e;let h=Math.abs(s/2),f=Math.abs(t/2);h+=b(h*.01,c),f+=b(f*.01,c);let d=n,g=r;for(;d<0;)d+=Math.PI*2,g+=Math.PI*2;g-d>Math.PI*2&&(d=0,g=Math.PI*2);const m=Math.PI*2/c.curveStepCount,k=Math.min(m/2,(g-d)/2),w=He(k,l,u,h,f,d,g,1,c);if(!c.disableMultiStroke){const _=He(k,l,u,h,f,d,g,1.5,c);w.push(..._)}return a&&(i?w.push(...z(l,u,l+h*Math.cos(d),u+f*Math.sin(d),c),...z(l,u,l+h*Math.cos(g),u+f*Math.sin(g),c)):w.push({op:"lineTo",data:[l,u]},{op:"lineTo",data:[l+h*Math.cos(d),u+f*Math.sin(d)]})),{type:"path",ops:w}}function ze(o,e){const s=Ye(Be(Le(o))),t=[];let n=[0,0],r=[0,0];for(const{key:a,data:i}of s)switch(a){case"M":{r=[i[0],i[1]],n=[i[0],i[1]];break}case"L":t.push(...z(r[0],r[1],i[0],i[1],e)),r=[i[0],i[1]];break;case"C":{const[c,l,u,h,f,d]=i;t.push(...Rt(c,l,u,h,f,d,r,e)),r=[f,d];break}case"Z":t.push(...z(r[0],r[1],n[0],n[1],e)),r=[n[0],n[1]];break}return{type:"path",ops:t}}function ye(o,e){const s=[];for(const t of o)if(t.length){const n=e.maxRandomnessOffset||0,r=t.length;if(r>2){s.push({op:"move",data:[t[0][0]+b(n,e),t[0][1]+b(n,e)]});for(let a=1;a<r;a++)s.push({op:"lineTo",data:[t[a][0]+b(n,e),t[a][1]+b(n,e)]})}}return{type:"fillPath",ops:s}}function G(o,e){return ft(e,bt).fillPolygons(o,e)}function yt(o,e,s,t,n,r,a){const i=o,c=e;let l=Math.abs(s/2),u=Math.abs(t/2);l+=b(l*.01,a),u+=b(u*.01,a);let h=n,f=r;for(;h<0;)h+=Math.PI*2,f+=Math.PI*2;f-h>Math.PI*2&&(h=0,f=Math.PI*2);const d=(f-h)/a.curveStepCount,g=[];for(let m=h;m<=f;m=m+d)g.push([i+l*Math.cos(m),c+u*Math.sin(m)]);return g.push([i+l*Math.cos(f),c+u*Math.sin(f)]),g.push([i,c]),G([g],a)}function _t(o,e){return b(o,e)}function St(o,e,s){return pe(o,e,s)}function Pt(o,e,s,t,n){return z(o,e,s,t,n,!0)}function Ne(o){const e=Object.assign({},o);return e.randomizer=void 0,o.seed&&(e.seed=o.seed+1),e}function Qe(o){return o.randomizer||(o.randomizer=new pt(o.seed||0)),o.randomizer.next()}function pe(o,e,s,t=1){return s.roughness*t*(Qe(s)*(e-o)+o)}function b(o,e,s=1){return pe(-o,o,e,s)}function z(o,e,s,t,n,r=!1){const a=r?n.disableMultiStrokeFill:n.disableMultiStroke,i=Te(o,e,s,t,n,!0,!1);if(a)return i;const c=Te(o,e,s,t,n,!0,!0);return i.concat(c)}function Te(o,e,s,t,n,r,a){const i=Math.pow(o-s,2)+Math.pow(e-t,2),c=Math.sqrt(i);let l=1;c<200?l=1:c>500?l=.4:l=-.0016668*c+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>i&&(u=c/10);const h=u/2,f=.2+Qe(n)*.2;let d=n.bowing*n.maxRandomnessOffset*(t-e)/200,g=n.bowing*n.maxRandomnessOffset*(o-s)/200;d=b(d,n,l),g=b(g,n,l);const m=[],k=()=>b(h,n,l),w=()=>b(u,n,l),_=n.preserveVertices;return a?m.push({op:"move",data:[o+(_?0:k()),e+(_?0:k())]}):m.push({op:"move",data:[o+(_?0:b(u,n,l)),e+(_?0:b(u,n,l))]}),a?m.push({op:"bcurveTo",data:[d+o+(s-o)*f+k(),g+e+(t-e)*f+k(),d+o+2*(s-o)*f+k(),g+e+2*(t-e)*f+k(),s+(_?0:k()),t+(_?0:k())]}):m.push({op:"bcurveTo",data:[d+o+(s-o)*f+w(),g+e+(t-e)*f+w(),d+o+2*(s-o)*f+w(),g+e+2*(t-e)*f+w(),s+(_?0:w()),t+(_?0:w())]}),m}function ce(o,e,s){if(!o.length)return[];const t=[];t.push([o[0][0]+b(e,s),o[0][1]+b(e,s)]),t.push([o[0][0]+b(e,s),o[0][1]+b(e,s)]);for(let n=1;n<o.length;n++)t.push([o[n][0]+b(e,s),o[n][1]+b(e,s)]),n===o.length-1&&t.push([o[n][0]+b(e,s),o[n][1]+b(e,s)]);return ge(t,null,s)}function ge(o,e,s){const t=o.length,n=[];if(t>3){const r=[],a=1-s.curveTightness;n.push({op:"move",data:[o[1][0],o[1][1]]});for(let i=1;i+2<t;i++){const c=o[i];r[0]=[c[0],c[1]],r[1]=[c[0]+(a*o[i+1][0]-a*o[i-1][0])/6,c[1]+(a*o[i+1][1]-a*o[i-1][1])/6],r[2]=[o[i+1][0]+(a*o[i][0]-a*o[i+2][0])/6,o[i+1][1]+(a*o[i][1]-a*o[i+2][1])/6],r[3]=[o[i+1][0],o[i+1][1]],n.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[3][0],r[3][1]]})}}else t===3?(n.push({op:"move",data:[o[1][0],o[1][1]]}),n.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[2][0],o[2][1]]})):t===2&&n.push(...Te(o[0][0],o[0][1],o[1][0],o[1][1],s,!0,!0));return n}function We(o,e,s,t,n,r,a,i){const c=i.roughness===0,l=[],u=[];if(c){o=o/4,u.push([e+t*Math.cos(-o),s+n*Math.sin(-o)]);for(let h=0;h<=Math.PI*2;h=h+o){const f=[e+t*Math.cos(h),s+n*Math.sin(h)];l.push(f),u.push(f)}u.push([e+t*Math.cos(0),s+n*Math.sin(0)]),u.push([e+t*Math.cos(o),s+n*Math.sin(o)])}else{const h=b(.5,i)-Math.PI/2;u.push([b(r,i)+e+.9*t*Math.cos(h-o),b(r,i)+s+.9*n*Math.sin(h-o)]);const f=Math.PI*2+h-.01;for(let d=h;d<f;d=d+o){const g=[b(r,i)+e+t*Math.cos(d),b(r,i)+s+n*Math.sin(d)];l.push(g),u.push(g)}u.push([b(r,i)+e+t*Math.cos(h+Math.PI*2+a*.5),b(r,i)+s+n*Math.sin(h+Math.PI*2+a*.5)]),u.push([b(r,i)+e+.98*t*Math.cos(h+a),b(r,i)+s+.98*n*Math.sin(h+a)]),u.push([b(r,i)+e+.9*t*Math.cos(h+a*.5),b(r,i)+s+.9*n*Math.sin(h+a*.5)])}return[u,l]}function He(o,e,s,t,n,r,a,i,c){const l=r+b(.1,c),u=[];u.push([b(i,c)+e+.9*t*Math.cos(l-o),b(i,c)+s+.9*n*Math.sin(l-o)]);for(let h=l;h<=a;h=h+o)u.push([b(i,c)+e+t*Math.cos(h),b(i,c)+s+n*Math.sin(h)]);return u.push([e+t*Math.cos(a),s+n*Math.sin(a)]),u.push([e+t*Math.cos(a),s+n*Math.sin(a)]),ge(u,null,c)}function Rt(o,e,s,t,n,r,a,i){const c=[],l=[i.maxRandomnessOffset||1,(i.maxRandomnessOffset||1)+.3];let u=[0,0];const h=i.disableMultiStroke?1:2,f=i.preserveVertices;for(let d=0;d<h;d++)d===0?c.push({op:"move",data:[a[0],a[1]]}):c.push({op:"move",data:[a[0]+(f?0:b(l[0],i)),a[1]+(f?0:b(l[0],i))]}),u=f?[n,r]:[n+b(l[d],i),r+b(l[d],i)],c.push({op:"bcurveTo",data:[o+b(l[d],i),e+b(l[d],i),s+b(l[d],i),t+b(l[d],i),u[0],u[1]]});return c}function U(o){return[...o]}function Fe(o,e=0){const s=o.length;if(s<3)throw new Error("A curve must have at least three points.");const t=[];if(s===3)t.push(U(o[0]),U(o[1]),U(o[2]),U(o[2]));else{const n=[];n.push(o[0],o[0]);for(let i=1;i<o.length;i++)n.push(o[i]),i===o.length-1&&n.push(o[i]);const r=[],a=1-e;t.push(U(n[0]));for(let i=1;i+2<n.length;i++){const c=n[i];r[0]=[c[0],c[1]],r[1]=[c[0]+(a*n[i+1][0]-a*n[i-1][0])/6,c[1]+(a*n[i+1][1]-a*n[i-1][1])/6],r[2]=[n[i+1][0]+(a*n[i][0]-a*n[i+2][0])/6,n[i+1][1]+(a*n[i][1]-a*n[i+2][1])/6],r[3]=[n[i+1][0],n[i+1][1]],t.push(r[1],r[2],r[3])}}return t}function Tt(o,e){return Math.sqrt(fe(o,e))}function fe(o,e){return Math.pow(o[0]-e[0],2)+Math.pow(o[1]-e[1],2)}function Et(o,e,s){const t=fe(e,s);if(t===0)return fe(o,e);let n=((o[0]-e[0])*(s[0]-e[0])+(o[1]-e[1])*(s[1]-e[1]))/t;return n=Math.max(0,Math.min(1,n)),fe(o,N(e,s,n))}function N(o,e,s){return[o[0]+(e[0]-o[0])*s,o[1]+(e[1]-o[1])*s]}function xt(o,e){const s=o[e+0],t=o[e+1],n=o[e+2],r=o[e+3];let a=3*t[0]-2*s[0]-r[0];a*=a;let i=3*t[1]-2*s[1]-r[1];i*=i;let c=3*n[0]-2*r[0]-s[0];c*=c;let l=3*n[1]-2*r[1]-s[1];return l*=l,a<c&&(a=c),i<l&&(i=l),a+i}function Ee(o,e,s,t){const n=t||[];if(xt(o,e)<s){const r=o[e+0];n.length?Tt(n[n.length-1],r)>1&&n.push(r):n.push(r),n.push(o[e+3])}else{const a=o[e+0],i=o[e+1],c=o[e+2],l=o[e+3],u=N(a,i,.5),h=N(i,c,.5),f=N(c,l,.5),d=N(u,h,.5),g=N(h,f,.5),m=N(d,g,.5);Ee([a,u,d,m],0,s,n),Ee([m,g,f,l],0,s,n)}return n}function Ot(o,e){return me(o,0,o.length,e)}function me(o,e,s,t,n){const r=n||[],a=o[e],i=o[s-1];let c=0,l=1;for(let u=e+1;u<s-1;++u){const h=Et(o[u],a,i);h>c&&(c=h,l=u)}return Math.sqrt(c)>t?(me(o,e,l+1,t,r),me(o,l,s,t,r)):(r.length||r.push(a),r.push(i)),r}function xe(o,e=.15,s){const t=[],n=(o.length-1)/3;for(let r=0;r<n;r++){const a=r*3;Ee(o,a,e,t)}return s&&s>0?me(t,0,t.length,s):t}function Ct(o,e,s){const t=Le(o),n=Ye(Be(t)),r=[];let a=[],i=[0,0],c=[];const l=()=>{c.length>=4&&a.push(...xe(c,e)),c=[]},u=()=>{l(),a.length&&(r.push(a),a=[])};for(const{key:f,data:d}of n)switch(f){case"M":u(),i=[d[0],d[1]],a.push(i);break;case"L":l(),a.push([d[0],d[1]]);break;case"C":if(!c.length){const g=a.length?a[a.length-1]:i;c.push([g[0],g[1]])}c.push([d[0],d[1]]),c.push([d[2],d[3]]),c.push([d[4],d[5]]);break;case"Z":l(),a.push([i[0],i[1]]);break}if(u(),!s)return r;const h=[];for(const f of r){const d=Ot(f,s);d.length&&h.push(d)}return h}const L="none";class ke{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return dt()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,s,t){return{shape:e,sets:s||[],options:t||this.defaultOptions}}line(e,s,t,n,r){const a=this._o(r);return this._d("line",[Ue(e,s,t,n,a)],a)}rectangle(e,s,t,n,r){const a=this._o(r),i=[],c=vt(e,s,t,n,a);if(a.fill){const l=[[e,s],[e+t,s],[e+t,s+n],[e,s+n]];a.fillStyle==="solid"?i.push(ye([l],a)):i.push(G([l],a))}return a.stroke!==L&&i.push(c),this._d("rectangle",i,a)}ellipse(e,s,t,n,r){const a=this._o(r),i=[],c=Xe(t,n,a),l=Re(e,s,a,c);if(a.fill)if(a.fillStyle==="solid"){const u=Re(e,s,a,c).opset;u.type="fillPath",i.push(u)}else i.push(G([l.estimatedPoints],a));return a.stroke!==L&&i.push(l.opset),this._d("ellipse",i,a)}circle(e,s,t,n){const r=this.ellipse(e,s,t,t,n);return r.shape="circle",r}linearPath(e,s){const t=this._o(s);return this._d("linearPath",[he(e,!1,t)],t)}arc(e,s,t,n,r,a,i=!1,c){const l=this._o(c),u=[],h=Ie(e,s,t,n,r,a,i,!0,l);if(i&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const d=Ie(e,s,t,n,r,a,!0,!1,f);d.type="fillPath",u.push(d)}else u.push(yt(e,s,t,n,r,a,l));return l.stroke!==L&&u.push(h),this._d("arc",u,l)}curve(e,s){const t=this._o(s),n=[],r=De(e,t);if(t.fill&&t.fill!==L)if(t.fillStyle==="solid"){const a=De(e,Object.assign(Object.assign({},t),{disableMultiStroke:!0,roughness:t.roughness?t.roughness+t.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],i=e;if(i.length){const l=typeof i[0][0]=="number"?[i]:i;for(const u of l)u.length<3?a.push(...u):u.length===3?a.push(...xe(Fe([u[0],u[0],u[1],u[2]]),10,(1+t.roughness)/2)):a.push(...xe(Fe(u),10,(1+t.roughness)/2))}a.length&&n.push(G([a],t))}return t.stroke!==L&&n.push(r),this._d("curve",n,t)}polygon(e,s){const t=this._o(s),n=[],r=he(e,!0,t);return t.fill&&(t.fillStyle==="solid"?n.push(ye([e],t)):n.push(G([e],t))),t.stroke!==L&&n.push(r),this._d("polygon",n,t)}path(e,s){const t=this._o(s),n=[];if(!e)return this._d("path",n,t);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const r=t.fill&&t.fill!=="transparent"&&t.fill!==L,a=t.stroke!==L,i=!!(t.simplification&&t.simplification<1),c=i?4-4*(t.simplification||1):(1+t.roughness)/2,l=Ct(e,1,c),u=ze(e,t);if(r)if(t.fillStyle==="solid")if(l.length===1){const h=ze(e,Object.assign(Object.assign({},t),{disableMultiStroke:!0,roughness:t.roughness?t.roughness+t.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(ye(l,t));else n.push(G(l,t));return a&&(i?l.forEach(h=>{n.push(he(h,!1,t))}):n.push(u)),this._d("path",n,t)}opsToPath(e,s){let t="";for(const n of e.ops){const r=typeof s=="number"&&s>=0?n.data.map(a=>+a.toFixed(s)):n.data;switch(n.op){case"move":t+=`M${r[0]} ${r[1]} `;break;case"bcurveTo":t+=`C${r[0]} ${r[1]}, ${r[2]} ${r[3]}, ${r[4]} ${r[5]} `;break;case"lineTo":t+=`L${r[0]} ${r[1]} `;break}}return t.trim()}toPaths(e){const s=e.sets||[],t=e.options||this.defaultOptions,n=[];for(const r of s){let a=null;switch(r.type){case"path":a={d:this.opsToPath(r),stroke:t.stroke,strokeWidth:t.strokeWidth,fill:L};break;case"fillPath":a={d:this.opsToPath(r),stroke:L,strokeWidth:0,fill:t.fill||L};break;case"fillSketch":a=this.fillSketch(r,t);break}a&&n.push(a)}return n}fillSketch(e,s){let t=s.fillWeight;return t<0&&(t=s.strokeWidth/2),{d:this.opsToPath(e),stroke:s.fill||L,strokeWidth:t,fill:L}}_mergedShape(e){return e.filter((s,t)=>t===0?!0:s.op!=="move")}}class Lt{constructor(e,s){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new ke(s)}draw(e){const s=e.sets||[],t=e.options||this.getDefaultOptions(),n=this.ctx,r=e.options.fixedDecimalPlaceDigits;for(const a of s)switch(a.type){case"path":n.save(),n.strokeStyle=t.stroke==="none"?"transparent":t.stroke,n.lineWidth=t.strokeWidth,t.strokeLineDash&&n.setLineDash(t.strokeLineDash),t.strokeLineDashOffset&&(n.lineDashOffset=t.strokeLineDashOffset),this._drawToContext(n,a,r),n.restore();break;case"fillPath":{n.save(),n.fillStyle=t.fill||"";const i=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,a,r,i),n.restore();break}case"fillSketch":this.fillSketch(n,a,t);break}}fillSketch(e,s,t){let n=t.fillWeight;n<0&&(n=t.strokeWidth/2),e.save(),t.fillLineDash&&e.setLineDash(t.fillLineDash),t.fillLineDashOffset&&(e.lineDashOffset=t.fillLineDashOffset),e.strokeStyle=t.fill||"",e.lineWidth=n,this._drawToContext(e,s,t.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,s,t,n="nonzero"){e.beginPath();for(const r of s.ops){const a=typeof t=="number"&&t>=0?r.data.map(i=>+i.toFixed(t)):r.data;switch(r.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1]);break}}s.type==="fillPath"?e.fill(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,s,t,n,r){const a=this.gen.line(e,s,t,n,r);return this.draw(a),a}rectangle(e,s,t,n,r){const a=this.gen.rectangle(e,s,t,n,r);return this.draw(a),a}ellipse(e,s,t,n,r){const a=this.gen.ellipse(e,s,t,n,r);return this.draw(a),a}circle(e,s,t,n){const r=this.gen.circle(e,s,t,n);return this.draw(r),r}linearPath(e,s){const t=this.gen.linearPath(e,s);return this.draw(t),t}polygon(e,s){const t=this.gen.polygon(e,s);return this.draw(t),t}arc(e,s,t,n,r,a,i=!1,c){const l=this.gen.arc(e,s,t,n,r,a,i,c);return this.draw(l),l}curve(e,s){const t=this.gen.curve(e,s);return this.draw(t),t}path(e,s){const t=this.gen.path(e,s);return this.draw(t),t}}const ue="http://www.w3.org/2000/svg";class At{constructor(e,s){this.svg=e,this.gen=new ke(s)}draw(e){const s=e.sets||[],t=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,r=n.createElementNS(ue,"g"),a=e.options.fixedDecimalPlaceDigits;for(const i of s){let c=null;switch(i.type){case"path":{c=n.createElementNS(ue,"path"),c.setAttribute("d",this.opsToPath(i,a)),c.setAttribute("stroke",t.stroke),c.setAttribute("stroke-width",t.strokeWidth+""),c.setAttribute("fill","none"),t.strokeLineDash&&c.setAttribute("stroke-dasharray",t.strokeLineDash.join(" ").trim()),t.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${t.strokeLineDashOffset}`);break}case"fillPath":{c=n.createElementNS(ue,"path"),c.setAttribute("d",this.opsToPath(i,a)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",t.fill||""),(e.shape==="curve"||e.shape==="polygon")&&c.setAttribute("fill-rule","evenodd");break}case"fillSketch":{c=this.fillSketch(n,i,t);break}}c&&r.appendChild(c)}return r}fillSketch(e,s,t){let n=t.fillWeight;n<0&&(n=t.strokeWidth/2);const r=e.createElementNS(ue,"path");return r.setAttribute("d",this.opsToPath(s,t.fixedDecimalPlaceDigits)),r.setAttribute("stroke",t.fill||""),r.setAttribute("stroke-width",n+""),r.setAttribute("fill","none"),t.fillLineDash&&r.setAttribute("stroke-dasharray",t.fillLineDash.join(" ").trim()),t.fillLineDashOffset&&r.setAttribute("stroke-dashoffset",`${t.fillLineDashOffset}`),r}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,s){return this.gen.opsToPath(e,s)}line(e,s,t,n,r){const a=this.gen.line(e,s,t,n,r);return this.draw(a)}rectangle(e,s,t,n,r){const a=this.gen.rectangle(e,s,t,n,r);return this.draw(a)}ellipse(e,s,t,n,r){const a=this.gen.ellipse(e,s,t,n,r);return this.draw(a)}circle(e,s,t,n){const r=this.gen.circle(e,s,t,n);return this.draw(r)}linearPath(e,s){const t=this.gen.linearPath(e,s);return this.draw(t)}polygon(e,s){const t=this.gen.polygon(e,s);return this.draw(t)}arc(e,s,t,n,r,a,i=!1,c){const l=this.gen.arc(e,s,t,n,r,a,i,c);return this.draw(l)}curve(e,s){const t=this.gen.curve(e,s);return this.draw(t)}path(e,s){const t=this.gen.path(e,s);return this.draw(t)}}const C={canvas(o,e){return new Lt(o,e)},svg(o,e){return new At(o,e)},generator(o){return new ke(o)},newSeed(){return ke.newSeed()}},Q=(o,e,s,t,n)=>`M${o+n},${e}
|
|
6
|
+
<%s key={someKey} {...props} />`,R,E,q,E),V[E+R]=!0)}if(E=null,S!==void 0&&(s(S),E=""+S),a(M)&&(s(M.key),E=""+M.key),"key"in M){S={};for(var we in M)we!=="key"&&(S[we]=M[we])}else S=M;return E&&i(S,typeof p=="function"?p.displayName||p.name||"Unknown":p),l(p,E,S,n(),oe,ve)}function h(p){f(p)?p._store&&(p._store.validated=1):typeof p=="object"&&p!==null&&p.$$typeof===j&&(p._payload.status==="fulfilled"?f(p._payload.value)&&p._payload.value._store&&(p._payload.value._store.validated=1):p._store&&(p._store.validated=1))}function f(p){return typeof p=="object"&&p!==null&&p.$$typeof===g}var d=w,g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),W=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),se=Symbol.for("react.client.reference"),T=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,A=Array.isArray,I=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(p){return p()}};var D,F={},ne=d.react_stack_bottom_frame.bind(d,r)(),re=I(t(r)),V={};Y.Fragment=k,Y.jsx=function(p,M,S){var R=1e4>T.recentlyCreatedOwnerStacks++;return u(p,M,S,!1,R?Error("react-stack-top-frame"):ne,R?I(t(p)):re)},Y.jsxs=function(p,M,S){var R=1e4>T.recentlyCreatedOwnerStacks++;return u(p,M,S,!0,R?Error("react-stack-top-frame"):ne,R?I(t(p)):re)}})()),Y}var $e;function st(){return $e||($e=1,process.env.NODE_ENV==="production"?ie.exports=et():ie.exports=tt()),ie.exports}var y=st();function Se(o,e,s){if(o&&o.length){const[t,n]=e,r=Math.PI/180*s,a=Math.cos(r),i=Math.sin(r);for(const c of o){const[l,u]=c;c[0]=(l-t)*a-(u-n)*i+t,c[1]=(l-t)*i+(u-n)*a+n}}}function nt(o,e,s){const t=[];o.forEach(n=>t.push(...n)),Se(t,e,s)}function rt(o,e){return o[0]===e[0]&&o[1]===e[1]}function ot(o,e,s,t=1){const n=s,r=Math.max(e,.1),a=o[0]&&o[0][0]&&typeof o[0][0]=="number"?[o]:o,i=[0,0];if(n)for(const l of a)Se(l,i,n);const c=it(a,r,t);if(n){for(const l of a)Se(l,i,-n);nt(c,i,-n)}return c}function it(o,e,s){const t=[];for(const l of o){const u=[...l];rt(u[0],u[u.length-1])||u.push([u[0][0],u[0][1]]),u.length>2&&t.push(u)}const n=[];e=Math.max(e,.1);const r=[];for(const l of t)for(let u=0;u<l.length-1;u++){const h=l[u],f=l[u+1];if(h[1]!==f[1]){const d=Math.min(h[1],f[1]);r.push({ymin:d,ymax:Math.max(h[1],f[1]),x:d===h[1]?h[0]:f[0],islope:(f[0]-h[0])/(f[1]-h[1])})}}if(r.sort((l,u)=>l.ymin<u.ymin?-1:l.ymin>u.ymin?1:l.x<u.x?-1:l.x>u.x?1:l.ymax===u.ymax?0:(l.ymax-u.ymax)/Math.abs(l.ymax-u.ymax)),!r.length)return n;let a=[],i=r[0].ymin,c=0;for(;a.length||r.length;){if(r.length){let l=-1;for(let h=0;h<r.length&&!(r[h].ymin>i);h++)l=h;r.splice(0,l+1).forEach(h=>{a.push({s:i,edge:h})})}if(a=a.filter(l=>!(l.edge.ymax<=i)),a.sort((l,u)=>l.edge.x===u.edge.x?0:(l.edge.x-u.edge.x)/Math.abs(l.edge.x-u.edge.x)),(s!==1||c%e===0)&&a.length>1)for(let l=0;l<a.length;l=l+2){const u=l+1;if(u>=a.length)break;const h=a[l].edge,f=a[u].edge;n.push([[Math.round(h.x),i],[Math.round(f.x),i]])}i+=s,a.forEach(l=>{l.edge.x=l.edge.x+s*l.edge.islope}),c++}return n}function X(o,e){var s;const t=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=e.strokeWidth*4),n=Math.round(Math.max(n,.1));let r=1;return e.roughness>=1&&(((s=e.randomizer)===null||s===void 0?void 0:s.next())||Math.random())>.7&&(r=n),ot(o,n,t,r||1)}class Ce{constructor(e){this.helper=e}fillPolygons(e,s){return this._fillPolygons(e,s)}_fillPolygons(e,s){const t=X(e,s);return{type:"fillSketch",ops:this.renderLines(t,s)}}renderLines(e,s){const t=[];for(const n of e)t.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],s));return t}}function be(o){const e=o[0],s=o[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class at extends Ce{fillPolygons(e,s){let t=s.hachureGap;t<0&&(t=s.strokeWidth*4),t=Math.max(t,.1);const n=Object.assign({},s,{hachureGap:t}),r=X(e,n),a=Math.PI/180*s.hachureAngle,i=[],c=t*.5*Math.cos(a),l=t*.5*Math.sin(a);for(const[h,f]of r)be([h,f])&&i.push([[h[0]-c,h[1]+l],[...f]],[[h[0]+c,h[1]-l],[...f]]);return{type:"fillSketch",ops:this.renderLines(i,s)}}}class ct extends Ce{fillPolygons(e,s){const t=this._fillPolygons(e,s),n=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),r=this._fillPolygons(e,n);return t.ops=t.ops.concat(r.ops),t}}class ut{constructor(e){this.helper=e}fillPolygons(e,s){s=Object.assign({},s,{hachureAngle:0});const t=X(e,s);return this.dotsOnLines(t,s)}dotsOnLines(e,s){const t=[];let n=s.hachureGap;n<0&&(n=s.strokeWidth*4),n=Math.max(n,.1);let r=s.fillWeight;r<0&&(r=s.strokeWidth/2);const a=n/4;for(const i of e){const c=be(i),l=c/n,u=Math.ceil(l)-1,h=c-u*n,f=(i[0][0]+i[1][0])/2-n/4,d=Math.min(i[0][1],i[1][1]);for(let g=0;g<u;g++){const m=d+h+g*n,k=f-a+Math.random()*2*a,v=m-a+Math.random()*2*a,_=this.helper.ellipse(k,v,r,r,s);t.push(..._.ops)}}return{type:"fillSketch",ops:t}}}class lt{constructor(e){this.helper=e}fillPolygons(e,s){const t=X(e,s);return{type:"fillSketch",ops:this.dashedLine(t,s)}}dashedLine(e,s){const t=s.dashOffset<0?s.hachureGap<0?s.strokeWidth*4:s.hachureGap:s.dashOffset,n=s.dashGap<0?s.hachureGap<0?s.strokeWidth*4:s.hachureGap:s.dashGap,r=[];return e.forEach(a=>{const i=be(a),c=Math.floor(i/(t+n)),l=(i+n-c*(t+n))/2;let u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);const f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d<c;d++){const g=d*(t+n),m=g+t,k=[u[0]+g*Math.cos(f)+l*Math.cos(f),u[1]+g*Math.sin(f)+l*Math.sin(f)],v=[u[0]+m*Math.cos(f)+l*Math.cos(f),u[1]+m*Math.sin(f)+l*Math.sin(f)];r.push(...this.helper.doubleLineOps(k[0],k[1],v[0],v[1],s))}}),r}}class ht{constructor(e){this.helper=e}fillPolygons(e,s){const t=s.hachureGap<0?s.strokeWidth*4:s.hachureGap,n=s.zigzagOffset<0?t:s.zigzagOffset;s=Object.assign({},s,{hachureGap:t+n});const r=X(e,s);return{type:"fillSketch",ops:this.zigzagLines(r,n,s)}}zigzagLines(e,s,t){const n=[];return e.forEach(r=>{const a=be(r),i=Math.round(a/(2*s));let c=r[0],l=r[1];c[0]>l[0]&&(c=r[1],l=r[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let h=0;h<i;h++){const f=h*2*s,d=(h+1)*2*s,g=Math.sqrt(2*Math.pow(s,2)),m=[c[0]+f*Math.cos(u),c[1]+f*Math.sin(u)],k=[c[0]+d*Math.cos(u),c[1]+d*Math.sin(u)],v=[m[0]+g*Math.cos(u+Math.PI/4),m[1]+g*Math.sin(u+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],v[0],v[1],t),...this.helper.doubleLineOps(v[0],v[1],k[0],k[1],t))}}),n}}const O={};function ft(o,e){let s=o.fillStyle||"hachure";if(!O[s])switch(s){case"zigzag":O[s]||(O[s]=new at(e));break;case"cross-hatch":O[s]||(O[s]=new ct(e));break;case"dots":O[s]||(O[s]=new ut(e));break;case"dashed":O[s]||(O[s]=new lt(e));break;case"zigzag-line":O[s]||(O[s]=new ht(e));break;default:s="hachure",O[s]||(O[s]=new Ce(e));break}return O[s]}function dt(){return Math.floor(Math.random()*2**31)}class pt{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const gt=0,Pe=1,Ve=2,ae={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function mt(o){const e=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:gt,text:RegExp.$1},o=o.substr(RegExp.$1.length);else if(o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))e[e.length]={type:Pe,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length);else return[];return e[e.length]={type:Ve,text:""},e}function Me(o,e){return o.type===e}function Le(o){const e=[],s=mt(o);let t="BOD",n=0,r=s[n];for(;!Me(r,Ve);){let a=0;const i=[];if(t==="BOD")if(r.text==="M"||r.text==="m")n++,a=ae[r.text],t=r.text;else return Le("M0,0"+o);else Me(r,Pe)?a=ae[t]:(n++,a=ae[r.text],t=r.text);if(n+a<s.length){for(let c=n;c<n+a;c++){const l=s[c];if(Me(l,Pe))i[i.length]=+l.text;else throw new Error("Param not a number: "+t+","+l.text)}if(typeof ae[t]=="number"){const c={key:t,data:i};e.push(c),n+=a,r=s[n],t==="M"&&(t="L"),t==="m"&&(t="l")}else throw new Error("Bad segment: "+t)}else throw new Error("Path data ended short")}return e}function Be(o){let e=0,s=0,t=0,n=0;const r=[];for(const{key:a,data:i}of o)switch(a){case"M":r.push({key:"M",data:[...i]}),[e,s]=i,[t,n]=i;break;case"m":e+=i[0],s+=i[1],r.push({key:"M",data:[e,s]}),t=e,n=s;break;case"L":r.push({key:"L",data:[...i]}),[e,s]=i;break;case"l":e+=i[0],s+=i[1],r.push({key:"L",data:[e,s]});break;case"C":r.push({key:"C",data:[...i]}),e=i[4],s=i[5];break;case"c":{const c=i.map((l,u)=>u%2?l+s:l+e);r.push({key:"C",data:c}),e=c[4],s=c[5];break}case"Q":r.push({key:"Q",data:[...i]}),e=i[2],s=i[3];break;case"q":{const c=i.map((l,u)=>u%2?l+s:l+e);r.push({key:"Q",data:c}),e=c[2],s=c[3];break}case"A":r.push({key:"A",data:[...i]}),e=i[5],s=i[6];break;case"a":e+=i[5],s+=i[6],r.push({key:"A",data:[i[0],i[1],i[2],i[3],i[4],e,s]});break;case"H":r.push({key:"H",data:[...i]}),e=i[0];break;case"h":e+=i[0],r.push({key:"H",data:[e]});break;case"V":r.push({key:"V",data:[...i]}),s=i[0];break;case"v":s+=i[0],r.push({key:"V",data:[s]});break;case"S":r.push({key:"S",data:[...i]}),e=i[2],s=i[3];break;case"s":{const c=i.map((l,u)=>u%2?l+s:l+e);r.push({key:"S",data:c}),e=c[2],s=c[3];break}case"T":r.push({key:"T",data:[...i]}),e=i[0],s=i[1];break;case"t":e+=i[0],s+=i[1],r.push({key:"T",data:[e,s]});break;case"Z":case"z":r.push({key:"Z",data:[]}),e=t,s=n;break}return r}function Ye(o){const e=[];let s="",t=0,n=0,r=0,a=0,i=0,c=0;for(const{key:l,data:u}of o){switch(l){case"M":e.push({key:"M",data:[...u]}),[t,n]=u,[r,a]=u;break;case"C":e.push({key:"C",data:[...u]}),t=u[4],n=u[5],i=u[2],c=u[3];break;case"L":e.push({key:"L",data:[...u]}),[t,n]=u;break;case"H":t=u[0],e.push({key:"L",data:[t,n]});break;case"V":n=u[0],e.push({key:"L",data:[t,n]});break;case"S":{let h=0,f=0;s==="C"||s==="S"?(h=t+(t-i),f=n+(n-c)):(h=t,f=n),e.push({key:"C",data:[h,f,...u]}),i=u[0],c=u[1],t=u[2],n=u[3];break}case"T":{const[h,f]=u;let d=0,g=0;s==="Q"||s==="T"?(d=t+(t-i),g=n+(n-c)):(d=t,g=n);const m=t+2*(d-t)/3,k=n+2*(g-n)/3,v=h+2*(d-h)/3,_=f+2*(g-f)/3;e.push({key:"C",data:[m,k,v,_,h,f]}),i=d,c=g,t=h,n=f;break}case"Q":{const[h,f,d,g]=u,m=t+2*(h-t)/3,k=n+2*(f-n)/3,v=d+2*(h-d)/3,_=g+2*(f-g)/3;e.push({key:"C",data:[m,k,v,_,d,g]}),i=h,c=f,t=d,n=g;break}case"A":{const h=Math.abs(u[0]),f=Math.abs(u[1]),d=u[2],g=u[3],m=u[4],k=u[5],v=u[6];h===0||f===0?(e.push({key:"C",data:[t,n,k,v,k,v]}),t=k,n=v):(t!==k||n!==v)&&(Ze(t,n,k,v,h,f,d,g,m).forEach(function($){e.push({key:"C",data:$})}),t=k,n=v);break}case"Z":e.push({key:"Z",data:[]}),t=r,n=a;break}s=l}return e}function kt(o){return Math.PI*o/180}function Z(o,e,s){const t=o*Math.cos(s)-e*Math.sin(s),n=o*Math.sin(s)+e*Math.cos(s);return[t,n]}function Ze(o,e,s,t,n,r,a,i,c,l){const u=kt(a);let h=[],f=0,d=0,g=0,m=0;if(l)[f,d,g,m]=l;else{[o,e]=Z(o,e,-u),[s,t]=Z(s,t,-u);const T=(o-s)/2,P=(e-t)/2;let A=T*T/(n*n)+P*P/(r*r);A>1&&(A=Math.sqrt(A),n=A*n,r=A*r);const I=i===c?-1:1,D=n*n,F=r*r,ne=D*F-D*P*P-F*T*T,re=D*P*P+F*T*T,V=I*Math.sqrt(Math.abs(ne/re));g=V*n*P/r+(o+s)/2,m=V*-r*T/n+(e+t)/2,f=Math.asin(parseFloat(((e-m)/r).toFixed(9))),d=Math.asin(parseFloat(((t-m)/r).toFixed(9))),o<g&&(f=Math.PI-f),s<g&&(d=Math.PI-d),f<0&&(f=Math.PI*2+f),d<0&&(d=Math.PI*2+d),c&&f>d&&(f=f-Math.PI*2),!c&&d>f&&(d=d-Math.PI*2)}let k=d-f;if(Math.abs(k)>Math.PI*120/180){const T=d,P=s,A=t;c&&d>f?d=f+Math.PI*120/180*1:d=f+Math.PI*120/180*-1,s=g+n*Math.cos(d),t=m+r*Math.sin(d),h=Ze(s,t,P,A,n,r,a,0,c,[d,T,g,m])}k=d-f;const v=Math.cos(f),_=Math.sin(f),$=Math.cos(d),W=Math.sin(d),H=Math.tan(k/4),J=4/3*n*H,K=4/3*r*H,ee=[o,e],j=[o+J*_,e-K*v],te=[s+J*W,t-K*$],se=[s,t];if(j[0]=2*ee[0]-j[0],j[1]=2*ee[1]-j[1],l)return[j,te,se].concat(h);{h=[j,te,se].concat(h);const T=[];for(let P=0;P<h.length;P+=3){const A=Z(h[P][0],h[P][1],u),I=Z(h[P+1][0],h[P+1][1],u),D=Z(h[P+2][0],h[P+2][1],u);T.push([A[0],A[1],I[0],I[1],D[0],D[1]])}return T}}const bt={randOffset:_t,randOffsetWithRange:St,ellipse:Mt,doubleLineOps:Pt};function Ue(o,e,s,t,n){return{type:"path",ops:z(o,e,s,t,n)}}function he(o,e,s){const t=(o||[]).length;if(t>2){const n=[];for(let r=0;r<t-1;r++)n.push(...z(o[r][0],o[r][1],o[r+1][0],o[r+1][1],s));return e&&n.push(...z(o[t-1][0],o[t-1][1],o[0][0],o[0][1],s)),{type:"path",ops:n}}else if(t===2)return Ue(o[0][0],o[0][1],o[1][0],o[1][1],s);return{type:"path",ops:[]}}function vt(o,e){return he(o,!0,e)}function wt(o,e,s,t,n){const r=[[o,e],[o+s,e],[o+s,e+t],[o,e+t]];return vt(r,n)}function De(o,e){if(o.length){const t=typeof o[0][0]=="number"?[o]:o,n=ce(t[0],1*(1+e.roughness*.2),e),r=e.disableMultiStroke?[]:ce(t[0],1.5*(1+e.roughness*.22),Ne(e));for(let a=1;a<t.length;a++){const i=t[a];if(i.length){const c=ce(i,1*(1+e.roughness*.2),e),l=e.disableMultiStroke?[]:ce(i,1.5*(1+e.roughness*.22),Ne(e));for(const u of c)u.op!=="move"&&n.push(u);for(const u of l)u.op!=="move"&&r.push(u)}}return{type:"path",ops:n.concat(r)}}return{type:"path",ops:[]}}function Mt(o,e,s,t,n){const r=Xe(s,t,n);return Re(o,e,n,r).opset}function Xe(o,e,s){const t=Math.sqrt(Math.PI*2*Math.sqrt((Math.pow(o/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*t)),r=Math.PI*2/n;let a=Math.abs(o/2),i=Math.abs(e/2);const c=1-s.curveFitting;return a+=b(a*c,s),i+=b(i*c,s),{increment:r,rx:a,ry:i}}function Re(o,e,s,t){const[n,r]=We(t.increment,o,e,t.rx,t.ry,1,t.increment*pe(.1,pe(.4,1,s),s),s);let a=ge(n,null,s);if(!s.disableMultiStroke&&s.roughness!==0){const[i]=We(t.increment,o,e,t.rx,t.ry,1.5,0,s),c=ge(i,null,s);a=a.concat(c)}return{estimatedPoints:r,opset:{type:"path",ops:a}}}function Ie(o,e,s,t,n,r,a,i,c){const l=o,u=e;let h=Math.abs(s/2),f=Math.abs(t/2);h+=b(h*.01,c),f+=b(f*.01,c);let d=n,g=r;for(;d<0;)d+=Math.PI*2,g+=Math.PI*2;g-d>Math.PI*2&&(d=0,g=Math.PI*2);const m=Math.PI*2/c.curveStepCount,k=Math.min(m/2,(g-d)/2),v=He(k,l,u,h,f,d,g,1,c);if(!c.disableMultiStroke){const _=He(k,l,u,h,f,d,g,1.5,c);v.push(..._)}return a&&(i?v.push(...z(l,u,l+h*Math.cos(d),u+f*Math.sin(d),c),...z(l,u,l+h*Math.cos(g),u+f*Math.sin(g),c)):v.push({op:"lineTo",data:[l,u]},{op:"lineTo",data:[l+h*Math.cos(d),u+f*Math.sin(d)]})),{type:"path",ops:v}}function ze(o,e){const s=Ye(Be(Le(o))),t=[];let n=[0,0],r=[0,0];for(const{key:a,data:i}of s)switch(a){case"M":{r=[i[0],i[1]],n=[i[0],i[1]];break}case"L":t.push(...z(r[0],r[1],i[0],i[1],e)),r=[i[0],i[1]];break;case"C":{const[c,l,u,h,f,d]=i;t.push(...Rt(c,l,u,h,f,d,r,e)),r=[f,d];break}case"Z":t.push(...z(r[0],r[1],n[0],n[1],e)),r=[n[0],n[1]];break}return{type:"path",ops:t}}function ye(o,e){const s=[];for(const t of o)if(t.length){const n=e.maxRandomnessOffset||0,r=t.length;if(r>2){s.push({op:"move",data:[t[0][0]+b(n,e),t[0][1]+b(n,e)]});for(let a=1;a<r;a++)s.push({op:"lineTo",data:[t[a][0]+b(n,e),t[a][1]+b(n,e)]})}}return{type:"fillPath",ops:s}}function G(o,e){return ft(e,bt).fillPolygons(o,e)}function yt(o,e,s,t,n,r,a){const i=o,c=e;let l=Math.abs(s/2),u=Math.abs(t/2);l+=b(l*.01,a),u+=b(u*.01,a);let h=n,f=r;for(;h<0;)h+=Math.PI*2,f+=Math.PI*2;f-h>Math.PI*2&&(h=0,f=Math.PI*2);const d=(f-h)/a.curveStepCount,g=[];for(let m=h;m<=f;m=m+d)g.push([i+l*Math.cos(m),c+u*Math.sin(m)]);return g.push([i+l*Math.cos(f),c+u*Math.sin(f)]),g.push([i,c]),G([g],a)}function _t(o,e){return b(o,e)}function St(o,e,s){return pe(o,e,s)}function Pt(o,e,s,t,n){return z(o,e,s,t,n,!0)}function Ne(o){const e=Object.assign({},o);return e.randomizer=void 0,o.seed&&(e.seed=o.seed+1),e}function Qe(o){return o.randomizer||(o.randomizer=new pt(o.seed||0)),o.randomizer.next()}function pe(o,e,s,t=1){return s.roughness*t*(Qe(s)*(e-o)+o)}function b(o,e,s=1){return pe(-o,o,e,s)}function z(o,e,s,t,n,r=!1){const a=r?n.disableMultiStrokeFill:n.disableMultiStroke,i=Ee(o,e,s,t,n,!0,!1);if(a)return i;const c=Ee(o,e,s,t,n,!0,!0);return i.concat(c)}function Ee(o,e,s,t,n,r,a){const i=Math.pow(o-s,2)+Math.pow(e-t,2),c=Math.sqrt(i);let l=1;c<200?l=1:c>500?l=.4:l=-.0016668*c+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>i&&(u=c/10);const h=u/2,f=.2+Qe(n)*.2;let d=n.bowing*n.maxRandomnessOffset*(t-e)/200,g=n.bowing*n.maxRandomnessOffset*(o-s)/200;d=b(d,n,l),g=b(g,n,l);const m=[],k=()=>b(h,n,l),v=()=>b(u,n,l),_=n.preserveVertices;return a?m.push({op:"move",data:[o+(_?0:k()),e+(_?0:k())]}):m.push({op:"move",data:[o+(_?0:b(u,n,l)),e+(_?0:b(u,n,l))]}),a?m.push({op:"bcurveTo",data:[d+o+(s-o)*f+k(),g+e+(t-e)*f+k(),d+o+2*(s-o)*f+k(),g+e+2*(t-e)*f+k(),s+(_?0:k()),t+(_?0:k())]}):m.push({op:"bcurveTo",data:[d+o+(s-o)*f+v(),g+e+(t-e)*f+v(),d+o+2*(s-o)*f+v(),g+e+2*(t-e)*f+v(),s+(_?0:v()),t+(_?0:v())]}),m}function ce(o,e,s){if(!o.length)return[];const t=[];t.push([o[0][0]+b(e,s),o[0][1]+b(e,s)]),t.push([o[0][0]+b(e,s),o[0][1]+b(e,s)]);for(let n=1;n<o.length;n++)t.push([o[n][0]+b(e,s),o[n][1]+b(e,s)]),n===o.length-1&&t.push([o[n][0]+b(e,s),o[n][1]+b(e,s)]);return ge(t,null,s)}function ge(o,e,s){const t=o.length,n=[];if(t>3){const r=[],a=1-s.curveTightness;n.push({op:"move",data:[o[1][0],o[1][1]]});for(let i=1;i+2<t;i++){const c=o[i];r[0]=[c[0],c[1]],r[1]=[c[0]+(a*o[i+1][0]-a*o[i-1][0])/6,c[1]+(a*o[i+1][1]-a*o[i-1][1])/6],r[2]=[o[i+1][0]+(a*o[i][0]-a*o[i+2][0])/6,o[i+1][1]+(a*o[i][1]-a*o[i+2][1])/6],r[3]=[o[i+1][0],o[i+1][1]],n.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[3][0],r[3][1]]})}}else t===3?(n.push({op:"move",data:[o[1][0],o[1][1]]}),n.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[2][0],o[2][1]]})):t===2&&n.push(...Ee(o[0][0],o[0][1],o[1][0],o[1][1],s,!0,!0));return n}function We(o,e,s,t,n,r,a,i){const c=i.roughness===0,l=[],u=[];if(c){o=o/4,u.push([e+t*Math.cos(-o),s+n*Math.sin(-o)]);for(let h=0;h<=Math.PI*2;h=h+o){const f=[e+t*Math.cos(h),s+n*Math.sin(h)];l.push(f),u.push(f)}u.push([e+t*Math.cos(0),s+n*Math.sin(0)]),u.push([e+t*Math.cos(o),s+n*Math.sin(o)])}else{const h=b(.5,i)-Math.PI/2;u.push([b(r,i)+e+.9*t*Math.cos(h-o),b(r,i)+s+.9*n*Math.sin(h-o)]);const f=Math.PI*2+h-.01;for(let d=h;d<f;d=d+o){const g=[b(r,i)+e+t*Math.cos(d),b(r,i)+s+n*Math.sin(d)];l.push(g),u.push(g)}u.push([b(r,i)+e+t*Math.cos(h+Math.PI*2+a*.5),b(r,i)+s+n*Math.sin(h+Math.PI*2+a*.5)]),u.push([b(r,i)+e+.98*t*Math.cos(h+a),b(r,i)+s+.98*n*Math.sin(h+a)]),u.push([b(r,i)+e+.9*t*Math.cos(h+a*.5),b(r,i)+s+.9*n*Math.sin(h+a*.5)])}return[u,l]}function He(o,e,s,t,n,r,a,i,c){const l=r+b(.1,c),u=[];u.push([b(i,c)+e+.9*t*Math.cos(l-o),b(i,c)+s+.9*n*Math.sin(l-o)]);for(let h=l;h<=a;h=h+o)u.push([b(i,c)+e+t*Math.cos(h),b(i,c)+s+n*Math.sin(h)]);return u.push([e+t*Math.cos(a),s+n*Math.sin(a)]),u.push([e+t*Math.cos(a),s+n*Math.sin(a)]),ge(u,null,c)}function Rt(o,e,s,t,n,r,a,i){const c=[],l=[i.maxRandomnessOffset||1,(i.maxRandomnessOffset||1)+.3];let u=[0,0];const h=i.disableMultiStroke?1:2,f=i.preserveVertices;for(let d=0;d<h;d++)d===0?c.push({op:"move",data:[a[0],a[1]]}):c.push({op:"move",data:[a[0]+(f?0:b(l[0],i)),a[1]+(f?0:b(l[0],i))]}),u=f?[n,r]:[n+b(l[d],i),r+b(l[d],i)],c.push({op:"bcurveTo",data:[o+b(l[d],i),e+b(l[d],i),s+b(l[d],i),t+b(l[d],i),u[0],u[1]]});return c}function U(o){return[...o]}function Fe(o,e=0){const s=o.length;if(s<3)throw new Error("A curve must have at least three points.");const t=[];if(s===3)t.push(U(o[0]),U(o[1]),U(o[2]),U(o[2]));else{const n=[];n.push(o[0],o[0]);for(let i=1;i<o.length;i++)n.push(o[i]),i===o.length-1&&n.push(o[i]);const r=[],a=1-e;t.push(U(n[0]));for(let i=1;i+2<n.length;i++){const c=n[i];r[0]=[c[0],c[1]],r[1]=[c[0]+(a*n[i+1][0]-a*n[i-1][0])/6,c[1]+(a*n[i+1][1]-a*n[i-1][1])/6],r[2]=[n[i+1][0]+(a*n[i][0]-a*n[i+2][0])/6,n[i+1][1]+(a*n[i][1]-a*n[i+2][1])/6],r[3]=[n[i+1][0],n[i+1][1]],t.push(r[1],r[2],r[3])}}return t}function Et(o,e){return Math.sqrt(fe(o,e))}function fe(o,e){return Math.pow(o[0]-e[0],2)+Math.pow(o[1]-e[1],2)}function Tt(o,e,s){const t=fe(e,s);if(t===0)return fe(o,e);let n=((o[0]-e[0])*(s[0]-e[0])+(o[1]-e[1])*(s[1]-e[1]))/t;return n=Math.max(0,Math.min(1,n)),fe(o,N(e,s,n))}function N(o,e,s){return[o[0]+(e[0]-o[0])*s,o[1]+(e[1]-o[1])*s]}function xt(o,e){const s=o[e+0],t=o[e+1],n=o[e+2],r=o[e+3];let a=3*t[0]-2*s[0]-r[0];a*=a;let i=3*t[1]-2*s[1]-r[1];i*=i;let c=3*n[0]-2*r[0]-s[0];c*=c;let l=3*n[1]-2*r[1]-s[1];return l*=l,a<c&&(a=c),i<l&&(i=l),a+i}function Te(o,e,s,t){const n=t||[];if(xt(o,e)<s){const r=o[e+0];n.length?Et(n[n.length-1],r)>1&&n.push(r):n.push(r),n.push(o[e+3])}else{const a=o[e+0],i=o[e+1],c=o[e+2],l=o[e+3],u=N(a,i,.5),h=N(i,c,.5),f=N(c,l,.5),d=N(u,h,.5),g=N(h,f,.5),m=N(d,g,.5);Te([a,u,d,m],0,s,n),Te([m,g,f,l],0,s,n)}return n}function Ot(o,e){return me(o,0,o.length,e)}function me(o,e,s,t,n){const r=n||[],a=o[e],i=o[s-1];let c=0,l=1;for(let u=e+1;u<s-1;++u){const h=Tt(o[u],a,i);h>c&&(c=h,l=u)}return Math.sqrt(c)>t?(me(o,e,l+1,t,r),me(o,l,s,t,r)):(r.length||r.push(a),r.push(i)),r}function xe(o,e=.15,s){const t=[],n=(o.length-1)/3;for(let r=0;r<n;r++){const a=r*3;Te(o,a,e,t)}return s&&s>0?me(t,0,t.length,s):t}function Ct(o,e,s){const t=Le(o),n=Ye(Be(t)),r=[];let a=[],i=[0,0],c=[];const l=()=>{c.length>=4&&a.push(...xe(c,e)),c=[]},u=()=>{l(),a.length&&(r.push(a),a=[])};for(const{key:f,data:d}of n)switch(f){case"M":u(),i=[d[0],d[1]],a.push(i);break;case"L":l(),a.push([d[0],d[1]]);break;case"C":if(!c.length){const g=a.length?a[a.length-1]:i;c.push([g[0],g[1]])}c.push([d[0],d[1]]),c.push([d[2],d[3]]),c.push([d[4],d[5]]);break;case"Z":l(),a.push([i[0],i[1]]);break}if(u(),!s)return r;const h=[];for(const f of r){const d=Ot(f,s);d.length&&h.push(d)}return h}const L="none";class ke{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return dt()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,s,t){return{shape:e,sets:s||[],options:t||this.defaultOptions}}line(e,s,t,n,r){const a=this._o(r);return this._d("line",[Ue(e,s,t,n,a)],a)}rectangle(e,s,t,n,r){const a=this._o(r),i=[],c=wt(e,s,t,n,a);if(a.fill){const l=[[e,s],[e+t,s],[e+t,s+n],[e,s+n]];a.fillStyle==="solid"?i.push(ye([l],a)):i.push(G([l],a))}return a.stroke!==L&&i.push(c),this._d("rectangle",i,a)}ellipse(e,s,t,n,r){const a=this._o(r),i=[],c=Xe(t,n,a),l=Re(e,s,a,c);if(a.fill)if(a.fillStyle==="solid"){const u=Re(e,s,a,c).opset;u.type="fillPath",i.push(u)}else i.push(G([l.estimatedPoints],a));return a.stroke!==L&&i.push(l.opset),this._d("ellipse",i,a)}circle(e,s,t,n){const r=this.ellipse(e,s,t,t,n);return r.shape="circle",r}linearPath(e,s){const t=this._o(s);return this._d("linearPath",[he(e,!1,t)],t)}arc(e,s,t,n,r,a,i=!1,c){const l=this._o(c),u=[],h=Ie(e,s,t,n,r,a,i,!0,l);if(i&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const d=Ie(e,s,t,n,r,a,!0,!1,f);d.type="fillPath",u.push(d)}else u.push(yt(e,s,t,n,r,a,l));return l.stroke!==L&&u.push(h),this._d("arc",u,l)}curve(e,s){const t=this._o(s),n=[],r=De(e,t);if(t.fill&&t.fill!==L)if(t.fillStyle==="solid"){const a=De(e,Object.assign(Object.assign({},t),{disableMultiStroke:!0,roughness:t.roughness?t.roughness+t.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],i=e;if(i.length){const l=typeof i[0][0]=="number"?[i]:i;for(const u of l)u.length<3?a.push(...u):u.length===3?a.push(...xe(Fe([u[0],u[0],u[1],u[2]]),10,(1+t.roughness)/2)):a.push(...xe(Fe(u),10,(1+t.roughness)/2))}a.length&&n.push(G([a],t))}return t.stroke!==L&&n.push(r),this._d("curve",n,t)}polygon(e,s){const t=this._o(s),n=[],r=he(e,!0,t);return t.fill&&(t.fillStyle==="solid"?n.push(ye([e],t)):n.push(G([e],t))),t.stroke!==L&&n.push(r),this._d("polygon",n,t)}path(e,s){const t=this._o(s),n=[];if(!e)return this._d("path",n,t);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const r=t.fill&&t.fill!=="transparent"&&t.fill!==L,a=t.stroke!==L,i=!!(t.simplification&&t.simplification<1),c=i?4-4*(t.simplification||1):(1+t.roughness)/2,l=Ct(e,1,c),u=ze(e,t);if(r)if(t.fillStyle==="solid")if(l.length===1){const h=ze(e,Object.assign(Object.assign({},t),{disableMultiStroke:!0,roughness:t.roughness?t.roughness+t.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(ye(l,t));else n.push(G(l,t));return a&&(i?l.forEach(h=>{n.push(he(h,!1,t))}):n.push(u)),this._d("path",n,t)}opsToPath(e,s){let t="";for(const n of e.ops){const r=typeof s=="number"&&s>=0?n.data.map(a=>+a.toFixed(s)):n.data;switch(n.op){case"move":t+=`M${r[0]} ${r[1]} `;break;case"bcurveTo":t+=`C${r[0]} ${r[1]}, ${r[2]} ${r[3]}, ${r[4]} ${r[5]} `;break;case"lineTo":t+=`L${r[0]} ${r[1]} `;break}}return t.trim()}toPaths(e){const s=e.sets||[],t=e.options||this.defaultOptions,n=[];for(const r of s){let a=null;switch(r.type){case"path":a={d:this.opsToPath(r),stroke:t.stroke,strokeWidth:t.strokeWidth,fill:L};break;case"fillPath":a={d:this.opsToPath(r),stroke:L,strokeWidth:0,fill:t.fill||L};break;case"fillSketch":a=this.fillSketch(r,t);break}a&&n.push(a)}return n}fillSketch(e,s){let t=s.fillWeight;return t<0&&(t=s.strokeWidth/2),{d:this.opsToPath(e),stroke:s.fill||L,strokeWidth:t,fill:L}}_mergedShape(e){return e.filter((s,t)=>t===0?!0:s.op!=="move")}}class Lt{constructor(e,s){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new ke(s)}draw(e){const s=e.sets||[],t=e.options||this.getDefaultOptions(),n=this.ctx,r=e.options.fixedDecimalPlaceDigits;for(const a of s)switch(a.type){case"path":n.save(),n.strokeStyle=t.stroke==="none"?"transparent":t.stroke,n.lineWidth=t.strokeWidth,t.strokeLineDash&&n.setLineDash(t.strokeLineDash),t.strokeLineDashOffset&&(n.lineDashOffset=t.strokeLineDashOffset),this._drawToContext(n,a,r),n.restore();break;case"fillPath":{n.save(),n.fillStyle=t.fill||"";const i=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,a,r,i),n.restore();break}case"fillSketch":this.fillSketch(n,a,t);break}}fillSketch(e,s,t){let n=t.fillWeight;n<0&&(n=t.strokeWidth/2),e.save(),t.fillLineDash&&e.setLineDash(t.fillLineDash),t.fillLineDashOffset&&(e.lineDashOffset=t.fillLineDashOffset),e.strokeStyle=t.fill||"",e.lineWidth=n,this._drawToContext(e,s,t.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,s,t,n="nonzero"){e.beginPath();for(const r of s.ops){const a=typeof t=="number"&&t>=0?r.data.map(i=>+i.toFixed(t)):r.data;switch(r.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1]);break}}s.type==="fillPath"?e.fill(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,s,t,n,r){const a=this.gen.line(e,s,t,n,r);return this.draw(a),a}rectangle(e,s,t,n,r){const a=this.gen.rectangle(e,s,t,n,r);return this.draw(a),a}ellipse(e,s,t,n,r){const a=this.gen.ellipse(e,s,t,n,r);return this.draw(a),a}circle(e,s,t,n){const r=this.gen.circle(e,s,t,n);return this.draw(r),r}linearPath(e,s){const t=this.gen.linearPath(e,s);return this.draw(t),t}polygon(e,s){const t=this.gen.polygon(e,s);return this.draw(t),t}arc(e,s,t,n,r,a,i=!1,c){const l=this.gen.arc(e,s,t,n,r,a,i,c);return this.draw(l),l}curve(e,s){const t=this.gen.curve(e,s);return this.draw(t),t}path(e,s){const t=this.gen.path(e,s);return this.draw(t),t}}const ue="http://www.w3.org/2000/svg";class At{constructor(e,s){this.svg=e,this.gen=new ke(s)}draw(e){const s=e.sets||[],t=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,r=n.createElementNS(ue,"g"),a=e.options.fixedDecimalPlaceDigits;for(const i of s){let c=null;switch(i.type){case"path":{c=n.createElementNS(ue,"path"),c.setAttribute("d",this.opsToPath(i,a)),c.setAttribute("stroke",t.stroke),c.setAttribute("stroke-width",t.strokeWidth+""),c.setAttribute("fill","none"),t.strokeLineDash&&c.setAttribute("stroke-dasharray",t.strokeLineDash.join(" ").trim()),t.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${t.strokeLineDashOffset}`);break}case"fillPath":{c=n.createElementNS(ue,"path"),c.setAttribute("d",this.opsToPath(i,a)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",t.fill||""),(e.shape==="curve"||e.shape==="polygon")&&c.setAttribute("fill-rule","evenodd");break}case"fillSketch":{c=this.fillSketch(n,i,t);break}}c&&r.appendChild(c)}return r}fillSketch(e,s,t){let n=t.fillWeight;n<0&&(n=t.strokeWidth/2);const r=e.createElementNS(ue,"path");return r.setAttribute("d",this.opsToPath(s,t.fixedDecimalPlaceDigits)),r.setAttribute("stroke",t.fill||""),r.setAttribute("stroke-width",n+""),r.setAttribute("fill","none"),t.fillLineDash&&r.setAttribute("stroke-dasharray",t.fillLineDash.join(" ").trim()),t.fillLineDashOffset&&r.setAttribute("stroke-dashoffset",`${t.fillLineDashOffset}`),r}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,s){return this.gen.opsToPath(e,s)}line(e,s,t,n,r){const a=this.gen.line(e,s,t,n,r);return this.draw(a)}rectangle(e,s,t,n,r){const a=this.gen.rectangle(e,s,t,n,r);return this.draw(a)}ellipse(e,s,t,n,r){const a=this.gen.ellipse(e,s,t,n,r);return this.draw(a)}circle(e,s,t,n){const r=this.gen.circle(e,s,t,n);return this.draw(r)}linearPath(e,s){const t=this.gen.linearPath(e,s);return this.draw(t)}polygon(e,s){const t=this.gen.polygon(e,s);return this.draw(t)}arc(e,s,t,n,r,a,i=!1,c){const l=this.gen.arc(e,s,t,n,r,a,i,c);return this.draw(l)}curve(e,s){const t=this.gen.curve(e,s);return this.draw(t)}path(e,s){const t=this.gen.path(e,s);return this.draw(t)}}const C={canvas(o,e){return new Lt(o,e)},svg(o,e){return new At(o,e)},generator(o){return new ke(o)},newSeed(){return ke.newSeed()}},Q=(o,e,s,t,n)=>`M${o+n},${e}
|
|
7
7
|
H${o+s-n}
|
|
8
8
|
A${n},${n} 0 0 1 ${o+s},${e+n}
|
|
9
9
|
V${e+t-n}
|
|
@@ -12,4 +12,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
12
12
|
A${n},${n} 0 0 1 ${o},${e+t-n}
|
|
13
13
|
V${e+n}
|
|
14
14
|
A${n},${n} 0 0 1 ${o+n},${e}
|
|
15
|
-
Z`,jt={"drawui-button":"_drawui-button_1nx7z_1"},de={stroke:{thin:{color:"#333",width:1.5},medium:{color:"#333",width:2.5},thick:{color:"#333",width:4}},roughness:{roughness:3,bowing:2},fill:{background:"#ccccccff"},radius:{none:0,sm:6,md:10,lg:16,full:30},buttonSize:{sm:{width:100,height:40,fontSize:12},md:{width:130,height:50,fontSize:15},lg:{width:150,height:60,fontSize:18},xl:{width:170,height:70,fontSize:20}},inputSize:{sm:{height:32,fontSize:12,paddingX:8},md:{height:40,fontSize:14,paddingX:12},lg:{height:48,fontSize:16,paddingX:16},xl:{height:48,fontSize:16,paddingX:16}}},Je=v.createContext(de),$t=({theme:o,children:e})=>{const s={...de,...o,stroke:{...de.stroke,...o?.stroke},radius:{...de.radius,...o?.radius}};return y.jsx(Je.Provider,{value:s,children:e})},x=()=>v.useContext(Je),Dt=({strokeWeight:o="medium",radius:e="md",size:s="sm",backgroundColor:t,children:n,fillStyle:r,...a})=>{const i=x(),c=v.useRef(null),[l,u]=v.useState(!1),h=i.buttonSize[s].width,f=i.buttonSize[s].height,d=i.buttonSize[s].fontSize;return v.useEffect(()=>{if(!c.current)return;const g=C.svg(c.current);c.current.innerHTML="";const m=i.stroke[o],k=g.path(Q(0,0,h,f,i.radius[e]),{stroke:m.color,strokeWidth:m.width,fill:t??i.fill.background,fillStyle:r,roughness:l?i.roughness.roughness+1:i.roughness.roughness,bowing:i.roughness.bowing});c.current.appendChild(k)},[l,o,e,i]),y.jsxs("button",{...a,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:`${jt["drawui-button"]} ${a.className??""}`,style:{position:"relative",width:h,height:f,border:"none",background:"transparent",cursor:"pointer"},children:[y.jsx("svg",{ref:c,width:h,height:f,style:{position:"absolute",inset:0}}),y.jsx("span",{style:{position:"relative",fontSize:d,pointerEvents:"none"},children:n})]})},le={"drawui-card":"_drawui-card_vhoat_1","drawui-card-header":"_drawui-card-header_vhoat_7","drawui-card-body":"_drawui-card-body_vhoat_12","drawui-card-footer":"_drawui-card-footer_vhoat_17"},It="_vertical_1tdom_6",zt="_horizontal_1tdom_11",_e={"drawui-divider":"_drawui-divider_1tdom_1",vertical:It,horizontal:zt},Oe=({strokeWeight:o="medium",width:e="100%",vertical:s=!1,className:t,fillStyle:n})=>{const r=x(),a=v.useRef(null);return v.useEffect(()=>{if(!a.current)return;a.current.innerHTML="";const i=C.svg(a.current),c=r.stroke[o];if(s){const l=typeof e=="number"?e:100,u=i.line(0,0,0,l,{stroke:c.color,strokeWidth:c.width,roughness:r.roughness.roughness,bowing:r.roughness.bowing});a.current.appendChild(u)}else{const l=typeof e=="number"?e:300,u=i.line(0,0,l,0,{stroke:c.color,strokeWidth:c.width,roughness:r.roughness.roughness,bowing:r.roughness.bowing,fillStyle:n});a.current.appendChild(u)}},[r,o,e,s]),y.jsx("div",{className:`${_e["drawui-divider"]} ${s?_e.vertical:_e.horizontal} ${t??""}`,style:{width:s?void 0:e},children:y.jsx("svg",{ref:a,width:s?2:e,height:s?e:2,style:{display:"block"}})})},Nt=({strokeWeight:o="medium",radius:e="md",width:s=300,height:t,backgroundColor:n,header:r,footer:a,fillStyle:i,children:c,...l})=>{const u=x(),h=v.useRef(null),f=v.useRef(null),[d,g]=v.useState(t??200);v.useEffect(()=>{if(!f.current||t)return;const k=()=>{if(f.current){const _=f.current.scrollHeight;g(_)}};k();const w=new ResizeObserver(k);return w.observe(f.current),()=>w.disconnect()},[c,r,a,t]),v.useEffect(()=>{if(!h.current)return;const k=C.svg(h.current);h.current.innerHTML="";const w=u.stroke[o],_=t??d,$=k.path(Q(0,0,s,_,u.radius[e]),{stroke:w.color,strokeWidth:w.width,fill:n??u.fill.background,roughness:u.roughness.roughness,bowing:u.roughness.bowing,fillStyle:i});h.current.appendChild($)},[o,e,s,d,t,n,u,i]);const m=t??d;return y.jsxs("div",{...l,ref:f,className:`${le["drawui-card"]} ${l.className??""}`,style:{position:"relative",width:s,minHeight:t||"auto",height:t||"auto",cursor:"default",display:"flex",flexDirection:"column",overflow:"hidden"},children:[y.jsx("svg",{ref:h,width:s,height:m,style:{position:"absolute",inset:0,pointerEvents:"none"}}),r&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:le["drawui-card-header"],style:{position:"relative",zIndex:1},children:r}),y.jsx(Oe,{width:s,strokeWeight:"thick"})]}),y.jsx("div",{className:le["drawui-card-body"],style:{position:"relative",zIndex:1,flex:1},children:c}),a&&y.jsxs(y.Fragment,{children:[y.jsx(Oe,{width:s,strokeWeight:"thick"}),y.jsx("div",{className:le["drawui-card-footer"],style:{position:"relative",zIndex:1},children:a})]})]})},qe={"drawui-collapse":"_drawui-collapse_mgu8u_1","drawui-collapse-content":"_drawui-collapse-content_mgu8u_22"},Wt=({header:o,children:e,strokeWeight:s="medium",radius:t="md",width:n=300,fillStyle:r,className:a})=>{const i=x(),c=v.useRef(null);return v.useEffect(()=>{if(!c.current)return;const l=C.svg(c.current);c.current.innerHTML="";const u=i.stroke[s],h=l.path(Q(0,0,n,40,i.radius[t]),{stroke:u.color,strokeWidth:u.width,fill:"transparent",roughness:i.roughness.roughness,bowing:i.roughness.bowing,fillStyle:r});c.current.appendChild(h)},[i,s,t,n]),y.jsx("div",{className:`${qe["drawui-collapse"]} ${a??""}`,style:{width:n},children:y.jsxs("details",{children:[y.jsxs("summary",{style:{position:"relative"},children:[y.jsx("svg",{ref:c,width:n,height:40,style:{position:"absolute",inset:0,pointerEvents:"none"}}),y.jsx("span",{style:{position:"relative",zIndex:1},children:o})]}),y.jsx("div",{className:qe["drawui-collapse-content"],children:e})]})})},Ht={},Ft=({strokeWeight:o="medium",radius:e="md",size:s="sm",icon:t,fillStyle:n,backgroundColor:r,...a})=>{const i=x(),c=v.useRef(null),[l,u]=v.useState(!1),h=i.buttonSize[s].height;return v.useEffect(()=>{if(!c.current)return;const f=C.svg(c.current);c.current.innerHTML="";const d=i.stroke[o],g=f.path(Q(0,0,h,h,i.radius[e]),{stroke:d.color,strokeWidth:d.width,fill:r??i.fill.background,roughness:l?i.roughness.roughness+1:i.roughness.roughness,bowing:i.roughness.bowing,fillStyle:n});c.current.appendChild(g)},[l,o,e,i,h,r]),y.jsxs("button",{...a,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:`${Ht["drawui-button"]} ${a.className??""}`,style:{position:"relative",width:h,height:h,border:"none",background:"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:0},children:[y.jsx("svg",{ref:c,width:h,height:h,style:{position:"absolute",inset:0,pointerEvents:"none"}}),y.jsx("span",{style:{position:"relative",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:t})]})},Ge={"drawui-input":"_drawui-input_15az9_1","drawui-input-field":"_drawui-input-field_15az9_8"},qt=({strokeWeight:o="medium",backgroundColor:e,radius:s="md",inputSize:t="md",className:n,fillStyle:r,style:a,...i})=>{const c=x(),l=v.useRef(null),u=v.useRef(null),[h,f]=v.useState(!1),[d,g]=v.useState(!1),m=c.inputSize[t].height,k=c.inputSize[t].fontSize,w=c.inputSize[t].paddingX;return v.useEffect(()=>{if(!l.current||!u.current)return;const _=u.current.offsetWidth,$=C.svg(l.current);l.current.innerHTML="";const W=c.stroke[o],H=$.path(Q(0,0,_,m,c.radius[s]),{stroke:W.color,strokeWidth:W.width,fill:e??c.fill.background,roughness:h?c.roughness.roughness+1:c.roughness.roughness,bowing:c.roughness.bowing,fillStyle:r});l.current.appendChild(H)},[h,d,o,s,t,c,e]),y.jsxs("div",{ref:u,className:`${Ge["drawui-input"]} ${n??""}`,style:{height:m,...a},onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[y.jsx("svg",{ref:l,width:"100%",height:m,style:{position:"absolute",inset:0}}),y.jsx("input",{...i,className:Ge["drawui-input-field"],style:{height:m,fontSize:k,paddingLeft:w,paddingRight:w},onFocus:_=>{f(!0),i.onFocus?.(_)},onBlur:_=>{f(!1),i.onBlur?.(_)}})]})},Gt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.path("M6 18 H18 L16 12 A6 6 0 0 0 8 12 Z",{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l);const u=a.circle(12,18,2,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Vt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.path("M2 12 L12 2 L22 12 V22 H2 Z",{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Bt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.line(4,12,20,12,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(l)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Yt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.line(12,4,12,20,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing}),u=a.line(4,12,20,12,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(l),r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Zt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.circle(10,10,14,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"}),u=a.line(16,16,22,22,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(l),r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Ut=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.circle(12,12,14,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l);for(let u=0;u<8;u++){const h=u*Math.PI*2/8,f=12+7*Math.cos(h),d=12+7*Math.sin(h),g=12+10*Math.cos(h),m=12+10*Math.sin(h),k=a.line(f,d,g,m,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(k)}},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Xt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.circle(12,8,6,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l);const u=a.path("M4 20 Q12 16 20 20",{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Qt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=v.useRef(null);return v.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],l={stroke:s??i.color,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing};r.current.appendChild(a.line(4,7,20,7,l)),r.current.appendChild(a.line(4,12,20,12,l)),r.current.appendChild(a.line(4,17,20,17,l))},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})};exports.DrawuiButton=Dt;exports.DrawuiCard=Nt;exports.DrawuiCollapse=Wt;exports.DrawuiDivider=Oe;exports.DrawuiIconButton=Ft;exports.DrawuiInput=qt;exports.DrawuiThemeProvider=$t;exports.IconBell=Gt;exports.IconHamburger=Qt;exports.IconHome=Vt;exports.IconMinus=Bt;exports.IconPlus=Yt;exports.IconSearch=Zt;exports.IconSettings=Ut;exports.IconUser=Xt;exports.useDrawuiTheme=x;
|
|
15
|
+
Z`,jt={"drawui-button":"_drawui-button_1nx7z_1"},de={stroke:{thin:{color:"#333",width:1.5},medium:{color:"#333",width:2.5},thick:{color:"#333",width:4}},roughness:{roughness:3,bowing:2},fill:{background:"#ccccccff"},radius:{none:0,sm:6,md:10,lg:16,full:30},buttonSize:{sm:{width:100,height:40,fontSize:12},md:{width:130,height:50,fontSize:15},lg:{width:150,height:60,fontSize:18},xl:{width:170,height:70,fontSize:20}},inputSize:{sm:{height:32,fontSize:12,paddingX:8},md:{height:40,fontSize:14,paddingX:12},lg:{height:48,fontSize:16,paddingX:16},xl:{height:48,fontSize:16,paddingX:16}}},Je=w.createContext(de),$t=({theme:o,children:e})=>{const s={...de,...o,stroke:{...de.stroke,...o?.stroke},radius:{...de.radius,...o?.radius}};return y.jsx(Je.Provider,{value:s,children:e})},x=()=>w.useContext(Je),Dt=({strokeWeight:o="medium",radius:e="md",size:s="sm",backgroundColor:t,children:n,fillStyle:r,...a})=>{const i=x(),c=w.useRef(null),[l,u]=w.useState(!1),h=i.buttonSize[s].width,f=i.buttonSize[s].height,d=i.buttonSize[s].fontSize;return w.useEffect(()=>{if(!c.current)return;const g=C.svg(c.current);c.current.innerHTML="";const m=i.stroke[o],k=g.path(Q(0,0,h,f,i.radius[e]),{stroke:m.color,strokeWidth:m.width,fill:t??i.fill.background,fillStyle:r,roughness:l?i.roughness.roughness+1:i.roughness.roughness,bowing:i.roughness.bowing});c.current.appendChild(k)},[l,o,e,i]),y.jsxs("button",{...a,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:`${jt["drawui-button"]} ${a.className??""}`,style:{position:"relative",width:h,height:f,border:"none",background:"transparent",cursor:"pointer"},children:[y.jsx("svg",{ref:c,width:h,height:f,style:{position:"absolute",inset:0}}),y.jsx("span",{style:{position:"relative",fontSize:d,pointerEvents:"none"},children:n})]})},le={"drawui-card":"_drawui-card_vhoat_1","drawui-card-header":"_drawui-card-header_vhoat_7","drawui-card-body":"_drawui-card-body_vhoat_12","drawui-card-footer":"_drawui-card-footer_vhoat_17"},It="_vertical_1tdom_6",zt="_horizontal_1tdom_11",_e={"drawui-divider":"_drawui-divider_1tdom_1",vertical:It,horizontal:zt},Oe=({strokeWeight:o="medium",width:e="100%",vertical:s=!1,className:t,fillStyle:n})=>{const r=x(),a=w.useRef(null);return w.useEffect(()=>{if(!a.current)return;a.current.innerHTML="";const i=C.svg(a.current),c=r.stroke[o];if(s){const l=typeof e=="number"?e:100,u=i.line(0,0,0,l,{stroke:c.color,strokeWidth:c.width,roughness:r.roughness.roughness,bowing:r.roughness.bowing});a.current.appendChild(u)}else{const l=typeof e=="number"?e:300,u=i.line(0,0,l,0,{stroke:c.color,strokeWidth:c.width,roughness:r.roughness.roughness,bowing:r.roughness.bowing,fillStyle:n});a.current.appendChild(u)}},[r,o,e,s]),y.jsx("div",{className:`${_e["drawui-divider"]} ${s?_e.vertical:_e.horizontal} ${t??""}`,style:{width:s?void 0:e},children:y.jsx("svg",{ref:a,width:s?2:e,height:s?e:2,style:{display:"block"}})})},Nt=({strokeWeight:o="medium",radius:e="md",width:s=300,height:t,backgroundColor:n,header:r,footer:a,fillStyle:i,children:c,...l})=>{const u=x(),h=w.useRef(null),f=w.useRef(null),[d,g]=w.useState(t??200);w.useEffect(()=>{if(!f.current||t)return;const k=()=>{if(f.current){const _=f.current.scrollHeight;g(_)}};k();const v=new ResizeObserver(k);return v.observe(f.current),()=>v.disconnect()},[c,r,a,t]),w.useEffect(()=>{if(!h.current)return;const k=C.svg(h.current);h.current.innerHTML="";const v=u.stroke[o],_=t??d,$=k.path(Q(0,0,s,_,u.radius[e]),{stroke:v.color,strokeWidth:v.width,fill:n??u.fill.background,roughness:u.roughness.roughness,bowing:u.roughness.bowing,fillStyle:i});h.current.appendChild($)},[o,e,s,d,t,n,u,i]);const m=t??d;return y.jsxs("div",{...l,ref:f,className:`${le["drawui-card"]} ${l.className??""}`,style:{position:"relative",width:s,minHeight:t||"auto",height:t||"auto",cursor:"default",display:"flex",flexDirection:"column",overflow:"hidden"},children:[y.jsx("svg",{ref:h,width:s,height:m,style:{position:"absolute",inset:0,pointerEvents:"none"}}),r&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:le["drawui-card-header"],style:{position:"relative",zIndex:1},children:r}),y.jsx(Oe,{width:s,strokeWeight:"thick"})]}),y.jsx("div",{className:le["drawui-card-body"],style:{position:"relative",zIndex:1,flex:1},children:c}),a&&y.jsxs(y.Fragment,{children:[y.jsx(Oe,{width:s,strokeWeight:"thick"}),y.jsx("div",{className:le["drawui-card-footer"],style:{position:"relative",zIndex:1},children:a})]})]})},qe={"drawui-collapse":"_drawui-collapse_mgu8u_1","drawui-collapse-content":"_drawui-collapse-content_mgu8u_22"},Wt=({header:o,children:e,strokeWeight:s="medium",radius:t="md",width:n=300,fillStyle:r,className:a})=>{const i=x(),c=w.useRef(null);return w.useEffect(()=>{if(!c.current)return;const l=C.svg(c.current);c.current.innerHTML="";const u=i.stroke[s],h=l.path(Q(0,0,n,40,i.radius[t]),{stroke:u.color,strokeWidth:u.width,fill:"transparent",roughness:i.roughness.roughness,bowing:i.roughness.bowing,fillStyle:r});c.current.appendChild(h)},[i,s,t,n]),y.jsx("div",{className:`${qe["drawui-collapse"]} ${a??""}`,style:{width:n},children:y.jsxs("details",{children:[y.jsxs("summary",{style:{position:"relative"},children:[y.jsx("svg",{ref:c,width:n,height:40,style:{position:"absolute",inset:0,pointerEvents:"none"}}),y.jsx("span",{style:{position:"relative",zIndex:1},children:o})]}),y.jsx("div",{className:qe["drawui-collapse-content"],children:e})]})})},Ht={},Ft=({strokeWeight:o="medium",radius:e="md",size:s="sm",icon:t,fillStyle:n,backgroundColor:r,...a})=>{const i=x(),c=w.useRef(null),[l,u]=w.useState(!1),h=i.buttonSize[s].height;return w.useEffect(()=>{if(!c.current)return;const f=C.svg(c.current);c.current.innerHTML="";const d=i.stroke[o],g=f.path(Q(0,0,h,h,i.radius[e]),{stroke:d.color,strokeWidth:d.width,fill:r??i.fill.background,roughness:l?i.roughness.roughness+1:i.roughness.roughness,bowing:i.roughness.bowing,fillStyle:n});c.current.appendChild(g)},[l,o,e,i,h,r]),y.jsxs("button",{...a,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:`${Ht["drawui-button"]} ${a.className??""}`,style:{position:"relative",width:h,height:h,border:"none",background:"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:0},children:[y.jsx("svg",{ref:c,width:h,height:h,style:{position:"absolute",inset:0,pointerEvents:"none"}}),y.jsx("span",{style:{position:"relative",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:t})]})},Ge={"drawui-input":"_drawui-input_1mof8_1","drawui-input-field":"_drawui-input-field_1mof8_8"},qt=({strokeWeight:o="medium",backgroundColor:e,radius:s="md",inputSize:t="md",className:n,fillStyle:r,style:a,...i})=>{const c=x(),l=w.useRef(null),u=w.useRef(null),[h,f]=w.useState(!1),[d,g]=w.useState(!1),m=c.inputSize[t].height,k=c.inputSize[t].fontSize,v=c.inputSize[t].paddingX;return w.useEffect(()=>{if(!l.current||!u.current)return;const _=u.current.offsetWidth,$=C.svg(l.current);l.current.innerHTML="";const W=c.stroke[o],H=$.path(Q(0,0,_,m,c.radius[s]),{stroke:W.color,strokeWidth:W.width,fill:e??c.fill.background,roughness:h?c.roughness.roughness+1:c.roughness.roughness,bowing:c.roughness.bowing,fillStyle:r});l.current.appendChild(H)},[h,d,o,s,t,c,e]),y.jsxs("div",{ref:u,className:`${Ge["drawui-input"]} ${n??""}`,style:{height:m,...a},onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[y.jsx("input",{...i,className:Ge["drawui-input-field"],style:{height:m,fontSize:k,paddingLeft:v,paddingRight:v},onFocus:_=>{f(!0),i.onFocus?.(_)},onBlur:_=>{f(!1),i.onBlur?.(_)}}),y.jsx("svg",{ref:l,width:"100%",height:m,style:{position:"absolute",inset:0,pointerEvents:"none"}})]})},Gt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.path("M6 18 H18 L16 12 A6 6 0 0 0 8 12 Z",{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l);const u=a.circle(12,18,2,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Vt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.path("M2 12 L12 2 L22 12 V22 H2 Z",{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Bt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.line(4,12,20,12,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(l)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Yt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.line(12,4,12,20,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing}),u=a.line(4,12,20,12,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(l),r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Zt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.circle(10,10,14,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"}),u=a.line(16,16,22,22,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(l),r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Ut=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.circle(12,12,14,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l);for(let u=0;u<8;u++){const h=u*Math.PI*2/8,f=12+7*Math.cos(h),d=12+7*Math.sin(h),g=12+10*Math.cos(h),m=12+10*Math.sin(h),k=a.line(f,d,g,m,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing});r.current.appendChild(k)}},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Xt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],c=s??i.color,l=a.circle(12,8,6,{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(l);const u=a.path("M4 20 Q12 16 20 20",{stroke:c,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing,fill:"transparent"});r.current.appendChild(u)},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})},Qt=({size:o=24,strokeWeight:e="medium",color:s,className:t})=>{const n=x(),r=w.useRef(null);return w.useEffect(()=>{if(!r.current)return;const a=C.svg(r.current);r.current.innerHTML="";const i=n.stroke[e],l={stroke:s??i.color,strokeWidth:i.width,roughness:n.roughness.roughness,bowing:n.roughness.bowing};r.current.appendChild(a.line(4,7,20,7,l)),r.current.appendChild(a.line(4,12,20,12,l)),r.current.appendChild(a.line(4,17,20,17,l))},[n,e,s]),y.jsx("svg",{ref:r,width:o,height:o,viewBox:"0 0 24 24",className:t})};exports.DrawuiButton=Dt;exports.DrawuiCard=Nt;exports.DrawuiCollapse=Wt;exports.DrawuiDivider=Oe;exports.DrawuiIconButton=Ft;exports.DrawuiInput=qt;exports.DrawuiThemeProvider=$t;exports.IconBell=Gt;exports.IconHamburger=Qt;exports.IconHome=Vt;exports.IconMinus=Bt;exports.IconPlus=Yt;exports.IconSearch=Zt;exports.IconSettings=Ut;exports.IconUser=Xt;exports.useDrawuiTheme=x;
|
package/dist/drawui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._drawui-button_1nx7z_1{display:inline-flex;align-items:center;justify-content:center;position:relative;cursor:pointer;padding:.5rem 1rem;font-weight:600;background:transparent;border:none;outline:none}._drawui-card_vhoat_1{display:flex;flex-direction:column;overflow:hidden}._drawui-card-header_vhoat_7{padding:12px;border-bottom:1px solid transparent}._drawui-card-body_vhoat_12{padding:12px;flex:1}._drawui-card-footer_vhoat_17{padding:12px;border-top:1px solid transparent}._drawui-divider_1tdom_1{position:relative;display:block}._drawui-divider_1tdom_1._vertical_1tdom_6{height:100%;width:auto}._drawui-divider_1tdom_1._horizontal_1tdom_11{width:100%;height:auto}._drawui-collapse_mgu8u_1{position:relative;width:fit-content;display:block;margin-bottom:30px}._drawui-collapse_mgu8u_1 details{position:relative}._drawui-collapse_mgu8u_1 summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none}._drawui-collapse_mgu8u_1 summary::-webkit-details-marker{display:block}._drawui-collapse-content_mgu8u_22{margin-top:10px}._drawui-icon-button_18srz_1{display:inline-flex;align-items:center;justify-content:center;position:relative;cursor:pointer;padding:.5rem 1rem;font-weight:600;background:transparent;border:none;outline:none}._drawui-
|
|
1
|
+
._drawui-button_1nx7z_1{display:inline-flex;align-items:center;justify-content:center;position:relative;cursor:pointer;padding:.5rem 1rem;font-weight:600;background:transparent;border:none;outline:none}._drawui-card_vhoat_1{display:flex;flex-direction:column;overflow:hidden}._drawui-card-header_vhoat_7{padding:12px;border-bottom:1px solid transparent}._drawui-card-body_vhoat_12{padding:12px;flex:1}._drawui-card-footer_vhoat_17{padding:12px;border-top:1px solid transparent}._drawui-divider_1tdom_1{position:relative;display:block}._drawui-divider_1tdom_1._vertical_1tdom_6{height:100%;width:auto}._drawui-divider_1tdom_1._horizontal_1tdom_11{width:100%;height:auto}._drawui-collapse_mgu8u_1{position:relative;width:fit-content;display:block;margin-bottom:30px}._drawui-collapse_mgu8u_1 details{position:relative}._drawui-collapse_mgu8u_1 summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none}._drawui-collapse_mgu8u_1 summary::-webkit-details-marker{display:block}._drawui-collapse-content_mgu8u_22{margin-top:10px}._drawui-icon-button_18srz_1{display:inline-flex;align-items:center;justify-content:center;position:relative;cursor:pointer;padding:.5rem 1rem;font-weight:600;background:transparent;border:none;outline:none}._drawui-input_1mof8_1{position:relative!important;display:inline-flex;align-items:center;width:100%}._drawui-input-field_1mof8_8{position:relative;width:100%;background:transparent;border:none;outline:none;z-index:1}._drawui-input-icon_1mof8_17{position:relative;z-index:1;display:flex;align-items:center;pointer-events:none}
|
package/dist/drawui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import st, { createContext as nt, useContext as rt, useRef as O, useState as Q, useEffect as
|
|
1
|
+
import st, { createContext as nt, useContext as rt, useRef as O, useState as Q, useEffect as E } from "react";
|
|
2
2
|
var ce = { exports: {} }, B = {};
|
|
3
3
|
var je;
|
|
4
4
|
function ot() {
|
|
@@ -463,31 +463,31 @@ class mt {
|
|
|
463
463
|
}), n;
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
const
|
|
466
|
+
const R = {};
|
|
467
467
|
function kt(o, e) {
|
|
468
468
|
let s = o.fillStyle || "hachure";
|
|
469
|
-
if (!
|
|
469
|
+
if (!R[s])
|
|
470
470
|
switch (s) {
|
|
471
471
|
case "zigzag":
|
|
472
|
-
|
|
472
|
+
R[s] || (R[s] = new ft(e));
|
|
473
473
|
break;
|
|
474
474
|
case "cross-hatch":
|
|
475
|
-
|
|
475
|
+
R[s] || (R[s] = new dt(e));
|
|
476
476
|
break;
|
|
477
477
|
case "dots":
|
|
478
|
-
|
|
478
|
+
R[s] || (R[s] = new pt(e));
|
|
479
479
|
break;
|
|
480
480
|
case "dashed":
|
|
481
|
-
|
|
481
|
+
R[s] || (R[s] = new gt(e));
|
|
482
482
|
break;
|
|
483
483
|
case "zigzag-line":
|
|
484
|
-
|
|
484
|
+
R[s] || (R[s] = new mt(e));
|
|
485
485
|
break;
|
|
486
486
|
default:
|
|
487
|
-
s = "hachure",
|
|
487
|
+
s = "hachure", R[s] || (R[s] = new Le(e));
|
|
488
488
|
break;
|
|
489
489
|
}
|
|
490
|
-
return
|
|
490
|
+
return R[s];
|
|
491
491
|
}
|
|
492
492
|
function bt() {
|
|
493
493
|
return Math.floor(Math.random() * 2 ** 31);
|
|
@@ -713,9 +713,9 @@ function Ue(o, e, s, t, n, r, a, i, c, u) {
|
|
|
713
713
|
}
|
|
714
714
|
const _t = {
|
|
715
715
|
randOffset: Ot,
|
|
716
|
-
randOffsetWithRange:
|
|
716
|
+
randOffsetWithRange: Et,
|
|
717
717
|
ellipse: Tt,
|
|
718
|
-
doubleLineOps:
|
|
718
|
+
doubleLineOps: Rt
|
|
719
719
|
};
|
|
720
720
|
function Qe(o, e, s, t, n) {
|
|
721
721
|
return { type: "path", ops: N(o, e, s, t, n) };
|
|
@@ -852,10 +852,10 @@ function xt(o, e, s, t, n, r, a) {
|
|
|
852
852
|
function Ot(o, e) {
|
|
853
853
|
return b(o, e);
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function Et(o, e, s) {
|
|
856
856
|
return me(o, e, s);
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Rt(o, e, s, t, n) {
|
|
859
859
|
return N(o, e, s, t, n, !0);
|
|
860
860
|
}
|
|
861
861
|
function We(o) {
|
|
@@ -872,13 +872,13 @@ function b(o, e, s = 1) {
|
|
|
872
872
|
return me(-o, o, e, s);
|
|
873
873
|
}
|
|
874
874
|
function N(o, e, s, t, n, r = !1) {
|
|
875
|
-
const a = r ? n.disableMultiStrokeFill : n.disableMultiStroke, i =
|
|
875
|
+
const a = r ? n.disableMultiStrokeFill : n.disableMultiStroke, i = Ee(o, e, s, t, n, !0, !1);
|
|
876
876
|
if (a)
|
|
877
877
|
return i;
|
|
878
|
-
const c =
|
|
878
|
+
const c = Ee(o, e, s, t, n, !0, !0);
|
|
879
879
|
return i.concat(c);
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function Ee(o, e, s, t, n, r, a) {
|
|
882
882
|
const i = Math.pow(o - s, 2) + Math.pow(e - t, 2), c = Math.sqrt(i);
|
|
883
883
|
let u = 1;
|
|
884
884
|
c < 200 ? u = 1 : c > 500 ? u = 0.4 : u = -16668e-7 * c + 1.233334;
|
|
@@ -962,7 +962,7 @@ function ke(o, e, s) {
|
|
|
962
962
|
o[2][0],
|
|
963
963
|
o[2][1]
|
|
964
964
|
]
|
|
965
|
-
})) : t === 2 && n.push(...
|
|
965
|
+
})) : t === 2 && n.push(...Ee(o[0][0], o[0][1], o[1][0], o[1][1], s, !0, !0));
|
|
966
966
|
return n;
|
|
967
967
|
}
|
|
968
968
|
function He(o, e, s, t, n, r, a, i) {
|
|
@@ -1104,14 +1104,14 @@ function jt(o, e) {
|
|
|
1104
1104
|
let u = 3 * n[1] - 2 * r[1] - s[1];
|
|
1105
1105
|
return u *= u, a < c && (a = c), i < u && (i = u), a + i;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function Re(o, e, s, t) {
|
|
1108
1108
|
const n = t || [];
|
|
1109
1109
|
if (jt(o, e) < s) {
|
|
1110
1110
|
const r = o[e + 0];
|
|
1111
1111
|
n.length ? Lt(n[n.length - 1], r) > 1 && n.push(r) : n.push(r), n.push(o[e + 3]);
|
|
1112
1112
|
} else {
|
|
1113
1113
|
const a = o[e + 0], i = o[e + 1], c = o[e + 2], u = o[e + 3], l = W(a, i, 0.5), h = W(i, c, 0.5), f = W(c, u, 0.5), d = W(l, h, 0.5), g = W(h, f, 0.5), m = W(d, g, 0.5);
|
|
1114
|
-
|
|
1114
|
+
Re([a, l, d, m], 0, s, n), Re([m, g, f, u], 0, s, n);
|
|
1115
1115
|
}
|
|
1116
1116
|
return n;
|
|
1117
1117
|
}
|
|
@@ -1131,7 +1131,7 @@ function Ce(o, e = 0.15, s) {
|
|
|
1131
1131
|
const t = [], n = (o.length - 1) / 3;
|
|
1132
1132
|
for (let r = 0; r < n; r++) {
|
|
1133
1133
|
const a = r * 3;
|
|
1134
|
-
|
|
1134
|
+
Re(o, a, e, t);
|
|
1135
1135
|
}
|
|
1136
1136
|
return s && s > 0 ? be(t, 0, t.length, s) : t;
|
|
1137
1137
|
}
|
|
@@ -1646,7 +1646,7 @@ const C = {
|
|
|
1646
1646
|
...a
|
|
1647
1647
|
}) => {
|
|
1648
1648
|
const i = L(), c = O(null), [u, l] = Q(!1), h = i.buttonSize[s].width, f = i.buttonSize[s].height, d = i.buttonSize[s].fontSize;
|
|
1649
|
-
return
|
|
1649
|
+
return E(() => {
|
|
1650
1650
|
if (!c.current) return;
|
|
1651
1651
|
const g = C.svg(c.current);
|
|
1652
1652
|
c.current.innerHTML = "";
|
|
@@ -1718,7 +1718,7 @@ const C = {
|
|
|
1718
1718
|
fillStyle: n
|
|
1719
1719
|
}) => {
|
|
1720
1720
|
const r = L(), a = O(null);
|
|
1721
|
-
return
|
|
1721
|
+
return E(() => {
|
|
1722
1722
|
if (!a.current) return;
|
|
1723
1723
|
a.current.innerHTML = "";
|
|
1724
1724
|
const i = C.svg(a.current), c = r.stroke[o];
|
|
@@ -1770,7 +1770,7 @@ const C = {
|
|
|
1770
1770
|
...u
|
|
1771
1771
|
}) => {
|
|
1772
1772
|
const l = L(), h = O(null), f = O(null), [d, g] = Q(t ?? 200);
|
|
1773
|
-
|
|
1773
|
+
E(() => {
|
|
1774
1774
|
if (!f.current || t) return;
|
|
1775
1775
|
const k = () => {
|
|
1776
1776
|
if (f.current) {
|
|
@@ -1781,7 +1781,7 @@ const C = {
|
|
|
1781
1781
|
k();
|
|
1782
1782
|
const v = new ResizeObserver(k);
|
|
1783
1783
|
return v.observe(f.current), () => v.disconnect();
|
|
1784
|
-
}, [c, r, a, t]),
|
|
1784
|
+
}, [c, r, a, t]), E(() => {
|
|
1785
1785
|
if (!h.current) return;
|
|
1786
1786
|
const k = C.svg(h.current);
|
|
1787
1787
|
h.current.innerHTML = "";
|
|
@@ -1880,7 +1880,7 @@ const C = {
|
|
|
1880
1880
|
className: a
|
|
1881
1881
|
}) => {
|
|
1882
1882
|
const i = L(), c = O(null);
|
|
1883
|
-
return
|
|
1883
|
+
return E(() => {
|
|
1884
1884
|
if (!c.current) return;
|
|
1885
1885
|
const u = C.svg(c.current);
|
|
1886
1886
|
c.current.innerHTML = "";
|
|
@@ -1921,7 +1921,7 @@ const C = {
|
|
|
1921
1921
|
...a
|
|
1922
1922
|
}) => {
|
|
1923
1923
|
const i = L(), c = O(null), [u, l] = Q(!1), h = i.buttonSize[s].height;
|
|
1924
|
-
return
|
|
1924
|
+
return E(() => {
|
|
1925
1925
|
if (!c.current) return;
|
|
1926
1926
|
const f = C.svg(c.current);
|
|
1927
1927
|
c.current.innerHTML = "";
|
|
@@ -1988,8 +1988,8 @@ const C = {
|
|
|
1988
1988
|
}
|
|
1989
1989
|
);
|
|
1990
1990
|
}, Ye = {
|
|
1991
|
-
"drawui-input": "_drawui-
|
|
1992
|
-
"drawui-input-field": "_drawui-input-
|
|
1991
|
+
"drawui-input": "_drawui-input_1mof8_1",
|
|
1992
|
+
"drawui-input-field": "_drawui-input-field_1mof8_8"
|
|
1993
1993
|
}, Xt = ({
|
|
1994
1994
|
strokeWeight: o = "medium",
|
|
1995
1995
|
backgroundColor: e,
|
|
@@ -2001,7 +2001,7 @@ const C = {
|
|
|
2001
2001
|
...i
|
|
2002
2002
|
}) => {
|
|
2003
2003
|
const c = L(), u = O(null), l = O(null), [h, f] = Q(!1), [d, g] = Q(!1), m = c.inputSize[t].height, k = c.inputSize[t].fontSize, v = c.inputSize[t].paddingX;
|
|
2004
|
-
return
|
|
2004
|
+
return E(() => {
|
|
2005
2005
|
if (!u.current || !l.current) return;
|
|
2006
2006
|
const y = l.current.offsetWidth, D = C.svg(u.current);
|
|
2007
2007
|
u.current.innerHTML = "";
|
|
@@ -2026,15 +2026,6 @@ const C = {
|
|
|
2026
2026
|
onMouseEnter: () => g(!0),
|
|
2027
2027
|
onMouseLeave: () => g(!1),
|
|
2028
2028
|
children: [
|
|
2029
|
-
/* @__PURE__ */ M.jsx(
|
|
2030
|
-
"svg",
|
|
2031
|
-
{
|
|
2032
|
-
ref: u,
|
|
2033
|
-
width: "100%",
|
|
2034
|
-
height: m,
|
|
2035
|
-
style: { position: "absolute", inset: 0 }
|
|
2036
|
-
}
|
|
2037
|
-
),
|
|
2038
2029
|
/* @__PURE__ */ M.jsx(
|
|
2039
2030
|
"input",
|
|
2040
2031
|
{
|
|
@@ -2053,6 +2044,15 @@ const C = {
|
|
|
2053
2044
|
f(!1), i.onBlur?.(y);
|
|
2054
2045
|
}
|
|
2055
2046
|
}
|
|
2047
|
+
),
|
|
2048
|
+
/* @__PURE__ */ M.jsx(
|
|
2049
|
+
"svg",
|
|
2050
|
+
{
|
|
2051
|
+
ref: u,
|
|
2052
|
+
width: "100%",
|
|
2053
|
+
height: m,
|
|
2054
|
+
style: { position: "absolute", inset: 0, pointerEvents: "none" }
|
|
2055
|
+
}
|
|
2056
2056
|
)
|
|
2057
2057
|
]
|
|
2058
2058
|
}
|
|
@@ -2064,7 +2064,7 @@ const C = {
|
|
|
2064
2064
|
className: t
|
|
2065
2065
|
}) => {
|
|
2066
2066
|
const n = L(), r = O(null);
|
|
2067
|
-
return
|
|
2067
|
+
return E(() => {
|
|
2068
2068
|
if (!r.current) return;
|
|
2069
2069
|
const a = C.svg(r.current);
|
|
2070
2070
|
r.current.innerHTML = "";
|
|
@@ -2095,7 +2095,7 @@ const C = {
|
|
|
2095
2095
|
className: t
|
|
2096
2096
|
}) => {
|
|
2097
2097
|
const n = L(), r = O(null);
|
|
2098
|
-
return
|
|
2098
|
+
return E(() => {
|
|
2099
2099
|
if (!r.current) return;
|
|
2100
2100
|
const a = C.svg(r.current);
|
|
2101
2101
|
r.current.innerHTML = "";
|
|
@@ -2127,7 +2127,7 @@ const C = {
|
|
|
2127
2127
|
className: t
|
|
2128
2128
|
}) => {
|
|
2129
2129
|
const n = L(), r = O(null);
|
|
2130
|
-
return
|
|
2130
|
+
return E(() => {
|
|
2131
2131
|
if (!r.current) return;
|
|
2132
2132
|
const a = C.svg(r.current);
|
|
2133
2133
|
r.current.innerHTML = "";
|
|
@@ -2146,7 +2146,7 @@ const C = {
|
|
|
2146
2146
|
className: t
|
|
2147
2147
|
}) => {
|
|
2148
2148
|
const n = L(), r = O(null);
|
|
2149
|
-
return
|
|
2149
|
+
return E(() => {
|
|
2150
2150
|
if (!r.current) return;
|
|
2151
2151
|
const a = C.svg(r.current);
|
|
2152
2152
|
r.current.innerHTML = "";
|
|
@@ -2170,7 +2170,7 @@ const C = {
|
|
|
2170
2170
|
className: t
|
|
2171
2171
|
}) => {
|
|
2172
2172
|
const n = L(), r = O(null);
|
|
2173
|
-
return
|
|
2173
|
+
return E(() => {
|
|
2174
2174
|
if (!r.current) return;
|
|
2175
2175
|
const a = C.svg(r.current);
|
|
2176
2176
|
r.current.innerHTML = "";
|
|
@@ -2204,7 +2204,7 @@ const C = {
|
|
|
2204
2204
|
className: t
|
|
2205
2205
|
}) => {
|
|
2206
2206
|
const n = L(), r = O(null);
|
|
2207
|
-
return
|
|
2207
|
+
return E(() => {
|
|
2208
2208
|
if (!r.current) return;
|
|
2209
2209
|
const a = C.svg(r.current);
|
|
2210
2210
|
r.current.innerHTML = "";
|
|
@@ -2233,7 +2233,7 @@ const C = {
|
|
|
2233
2233
|
className: t
|
|
2234
2234
|
}) => {
|
|
2235
2235
|
const n = L(), r = O(null);
|
|
2236
|
-
return
|
|
2236
|
+
return E(() => {
|
|
2237
2237
|
if (!r.current) return;
|
|
2238
2238
|
const a = C.svg(r.current);
|
|
2239
2239
|
r.current.innerHTML = "";
|
|
@@ -2264,7 +2264,7 @@ const C = {
|
|
|
2264
2264
|
className: t
|
|
2265
2265
|
}) => {
|
|
2266
2266
|
const n = L(), r = O(null);
|
|
2267
|
-
return
|
|
2267
|
+
return E(() => {
|
|
2268
2268
|
if (!r.current) return;
|
|
2269
2269
|
const a = C.svg(r.current);
|
|
2270
2270
|
r.current.innerHTML = "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carandesign/drawui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Sketch-style React UI component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/drawui.cjs.js",
|
|
@@ -27,9 +27,12 @@
|
|
|
27
27
|
"@types/react": "^19.2.5",
|
|
28
28
|
"@types/react-dom": "^19.2.3",
|
|
29
29
|
"@vitejs/plugin-react": "^5.1.1",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"autoprefixer": "^10.4.23",
|
|
31
|
+
"eslint": "^9.39.1",
|
|
32
|
+
"postcss": "^8.5.6",
|
|
33
|
+
"tailwindcss": "^4.1.18",
|
|
32
34
|
"typescript": "~5.9.3",
|
|
33
|
-
"
|
|
35
|
+
"vite": "^7.2.4",
|
|
36
|
+
"vite-plugin-dts": "^4.5.4"
|
|
34
37
|
}
|
|
35
38
|
}
|