leafer-ui 1.0.0-alpha.8 → 1.0.0-bate.1
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/README.md +1 -1
- package/dist/index.js +1 -2
- package/package.json +4 -4
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
class t{constructor(t){this.list=[],this.leafer=t}add(t){t.manager=this,this.list.push(t)}get(t){let e;const{list:i}=this;for(let s=0,o=i.length;s<o;s++)if(e=i[s],e.recycled&&e.isSameSize(t))return e.recycled=!1,e;const s=this.leafer.creator.canvas(t);return this.add(s),s}recycle(t){t.recycled||(t.clear(),t.recycled=!0)}clearRecycled(){let t;const e=[];for(let i=0,s=this.list.length;i<s;i++)t=this.list[i],t.recycled?t.destroy():e.push(t);this.list=e}clear(){this.list.forEach((t=>{t.destroy()})),this.list.length=0}destory(){this.clear(),this.leafer=void 0}}class e{constructor(t){this.reset(),t&&(t instanceof Array?this.pushList(t):this.push(t))}get length(){return this.list.length}has(t){return void 0!==this.keys[t.innerId]}indexAt(t){return this.list[t]}indexOf(t){const e=this.keys[t.innerId];return void 0===e?-1:e}pushList(t){t.forEach((t=>{this.push(t)}))}unshift(t){const{keys:e}=this;void 0===e[t.innerId]&&(this.list.unshift(t),Object.keys(e).forEach((t=>{void 0!==e[t]&&e[t]++})),e[t.innerId]=0)}push(t){const{list:e,keys:i}=this;void 0===i[t.innerId]&&(e.push(t),i[t.innerId]=e.length-1)}sort(t){const{list:e}=this;t?e.sort(((t,e)=>e.__level-t.__level)):e.sort(((t,e)=>t.__level-e.__level))}remove(t){const{list:e}=this;let i;for(let s=0,o=e.length;s<o;s++)void 0!==i?this.keys[e[s].innerId]=s-1:e[s].innerId===t.innerId&&(i=s,delete this.keys[t.innerId]);void 0!==i&&e.splice(i,1)}forEach(t){this.list.forEach(t)}clone(){const t=new e;return this.list.forEach((e=>{t.push(e)})),t}reset(){this.list=[],this.keys={}}destroy(){this.list=void 0}}class i{constructor(t){this._length=0,this.reset(),t&&(t instanceof Array?this.pushList(t):this.push(t))}get length(){return this._length}has(t){return void 0!==this.keys[t.innerId]}without(t){return void 0===this.keys[t.innerId]}sort(t){const{levels:e}=this;t?e.sort(((t,e)=>e-t)):e.sort(((t,e)=>t-e))}pushList(t){t.forEach((t=>{this.push(t)}))}push(t){const{keys:e,levelMap:i}=this;e[t.innerId]||(e[t.innerId]=1,i[t.__level]?i[t.__level].push(t):(i[t.__level]=[t],this.levels.push(t.__level)),this._length++)}forEach(t){let e;this.levels.forEach((i=>{e=this.levelMap[i];for(let i=0,s=e.length;i<s;i++)t(e[i])}))}reset(){this.levelMap={},this.keys={},this.levels=[],this._length=0}destroy(){this.levelMap=void 0}}class s extends t{constructor(){super(...arguments),this.pathTypeList=new e,this.imageTypeList=new e}get(t){}getImageType(t,e){return this.imageTypeList.push(t),this.leafer.creator.hitCanvas(e)}getPathType(t){return this.pathTypeList.push(t),this.leafer.creator.hitCanvas()}clearImageType(){this.__clearLeafList(this.imageTypeList)}clearPathType(){this.__clearLeafList(this.pathTypeList)}__clearLeafList(t){t.forEach((t=>{t.__hitCanvas&&(t.__hitCanvas.destroy(),t.__hitCanvas=void 0)})),t.reset()}clear(){this.clearPathType(),this.clearImageType()}}const o={default:(t,e)=>(n(e,t),n(t,e),t),assign(t,e){let i;Object.keys(e).forEach((s=>{var o;i=e[s],(null==i?void 0:i.constructor)===Object&&(null===(o=t[s])||void 0===o?void 0:o.constructor)===Object?n(t[s],e[s]):t[s]=e[s]}))},clone:t=>JSON.parse(JSON.stringify(t))},{assign:n}=o;class r{constructor(t){this.__leaf=t}__setInput(t,e){this.__input||(this.__input={}),this.__input[t]=e}__getInput(t){if(this.__input){const e=this.__input[t];return void 0===e?this[t]:e}return this[t]}__setMiddle(t,e){this.__middle||(this.__middle={}),this.__middle[t]=e}__getMiddle(t){return this.__middle&&this.__middle[t]}destroy(){this.__leaf=void 0}}const a={RUNTIME:"runtime",LEAF:"leaf",TASK:"task",CNAVAS:"canvas",types:{},create(t){const{types:e}=h;return e[t]?e[t]++:(e[t]=1,0)}},h=a,d={within:(t,e,i)=>(t<e&&(t=e),t>i&&(t=i),t)},l=Math.PI/180,{sin:c,cos:u}=Math,p={defaultMatrix:{a:1,b:0,c:0,d:1,e:0,f:0},tempMatrix:{},set(t,e=1,i=0,s=0,o=1,n=0,r=0){t.a=e,t.b=i,t.c=s,t.d=o,t.e=n,t.f=r},copy(t,e){t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f},translate(t,e,i){t.e+=e,t.f+=i},scale(t,e,i=e){t.a*=e,t.d*=i,t.c*=e,t.b*=i,t.e*=e,t.f*=i},rotate(t,e){const i=e*l,s=u(i),o=c(i),{a:n,b:r,c:a,d:h,e:d,f:p}=t;t.a=n*s-r*o,t.b=n*o+r*s,t.c=a*s-h*o,t.d=a*o+h*s,t.e=d*s-p*o,t.f=d*o+p*s},times(t,e){const{a:i,b:s,c:o,d:n,e:r,f:a}=t;t.a=e.a*i+e.b*o,t.b=e.a*s+e.b*n,t.c=e.c*i+e.d*o,t.d=e.c*s+e.d*n,t.e=e.e*i+e.f*o+r,t.f=e.e*s+e.f*n+a},divide(t,e){_.times(t,_.tempInvert(e))},tempInvert(t){const{tempMatrix:e}=_;return _.copy(e,t),_.invert(e),e},invert(t){const{a:e,b:i,c:s,d:o,e:n,f:r}=t,a=1/(e*o-i*s);t.a=o*a,t.b=-i*a,t.c=-s*a,t.d=e*a,t.e=-(n*o-r*s)*a,t.f=-(r*e-n*i)*a},toWorldPoint(t,e,i){const{x:s,y:o}=e;i||(i=e),i.x=s*t.a+o*t.c+t.e,i.y=s*t.b+o*t.d+t.f},toLocalPoint(t,e,i,s){const{x:o,y:n}=e,{a:r,b:a,c:h,d:d}=t,l=1/(r*d-a*h);if(i||(i=e),i.x=(o*d-n*h)*l,i.y=(n*r-o*a)*l,!s){const{e:e,f:s}=t;i.x-=(e*d-s*h)*l,i.y-=(s*r-e*a)*l}},empty(t){t.a=1,t.b=0,t.c=0,t.d=1,t.e=0,t.f=0}},_=p,{toLocalPoint:g,toWorldPoint:v}=p,{sin:y,cos:f,abs:m,sqrt:x,atan2:w}=Math,B={defaultPoint:{x:0,y:0},tempPoint:{},tempRadiusPoint:{},set(t,e=0,i=0){t.x=e,t.y=i},copy(t,e){t.x=e.x,t.y=e.y},rotate(t,e,i){i||(i=E.defaultPoint);const s=f(e*l),o=y(e*l),n=t.x-i.x,r=t.y-i.y;t.x=i.x+n*s-r*o,t.y=i.y+n*o-r*s},tempToLocal(t,e){const{tempPoint:i}=E;return E.copy(i,t),g(e,i,i),i},tempToLocalRadiusPoint(t,e){const{tempRadiusPoint:i}=E;return E.copy(i,t),E.toLocalRadiusPoint(t,e,i),i},toLocalRadiusPoint(t,e,i){i||(i=t),g(e,t,i),i.radiusX=t.radiusX/e.a,i.radiusY=t.radiusY/e.d},toLocal(t,e,i){g(e,t,i)},toWorld(t,e,i){v(e,t,i)},getCenter:(t,e)=>({x:t.x+(e.x-t.x)/2,y:t.y+(e.y-t.y)/2}),getDistance(t,e){const i=m(e.x-t.x),s=m(e.y-t.y);return x(i*i+s*s)},getAngle:(t,e)=>E.getAtan2(t,e)/l,getAtan2:(t,e)=>w(e.y-t.y,e.x-t.x),getDistancePoint(t,e,i){const s=E.getAtan2(t,e);return{x:t.x+f(s)*i,y:t.y+y(s)*i}}},E=B;class b{constructor(t,e){"object"==typeof t?B.copy(this,t):B.set(this,t,e)}set(t,e){B.set(this,t,e)}copy(t){return B.copy(this,t),this}clone(){return new b(this)}rotate(t,e){B.rotate(this,t,e)}toLocal(t,e){B.toLocal(this,t,e)}toWorld(t,e){B.toWorld(this,t,e)}getCenter(t){return B.getCenter(this,t)}getDistance(t){return B.getDistance(this,t)}getAngle(t){return B.getAngle(this,t)}getAtan2(t){return B.getAtan2(this,t)}}class T{constructor(t,e,i,s,o,n){"object"==typeof t?p.copy(this,t):p.set(this,t,e,i,s,o,n)}set(t,e,i,s,o,n){p.set(this,t,e,i,s,o,n)}copy(t){return p.copy(this,t),this}clone(){return new T(this)}translate(t,e){return this.e+=t,this.f+=e,this}scale(t,e){return p.scale(this,t,e),this}rotate(t){return p.rotate(this,t),this}times(t){p.times(this,t)}divide(t){p.divide(this,t)}invert(){p.invert(this)}toWorldPoint(t,e){p.toWorldPoint(this,t,e)}toLocalPoint(t,e){p.toLocalPoint(this,t,e)}empty(){p.empty(this)}}const R={tempPointBounds:{},setPoint(t,e,i){t.minX=t.maxX=e,t.minY=t.maxY=i},addPoint(t,e,i){t.minX=e<t.minX?e:t.minX,t.minY=i<t.minY?i:t.minY,t.maxX=e>t.maxX?e:t.maxX,t.maxY=i>t.maxY?i:t.maxY},add(t,e){t.minX=e.minX<t.minX?e.minX:t.minX,t.minY=e.minY<t.minY?e.minY:t.minY,t.maxX=e.maxX>t.maxX?e.maxX:t.maxX,t.maxY=e.maxY>t.maxY?e.maxY:t.maxY},toBounds(t,e){e.x=t.minX,e.y=t.minY,e.width=t.maxX-t.minX,e.height=t.maxY-t.minY}},{tempPointBounds:C,setPoint:P,addPoint:L,toBounds:k}=R,{toWorldPoint:S}=p;let M,D,O,A;const W={},I={},N={tempBounds:{},set(t,e=0,i=0,s=0,o=0){t.x=e,t.y=i,t.width=s,t.height=o},copy(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},copyAndSpread(t,e,i){z.set(t,e.x-i,e.y-i,e.width+2*i,e.height+2*i)},right:t=>t.x+t.width,bottom:t=>t.y+t.height,move(t,e,i){t.x+=e,t.y+=i},getByMove:(t,e,i)=>(t=Object.assign({},t),z.move(t,e,i),t),getOutOfBounds(t,e){const i=-(z.right(e)-t.x),s=-(z.bottom(e)-t.y),o=Object.assign(Object.assign({},t),{offsetX:i,offsetY:s});return z.move(o,-i,-s),o},tempTimesMatrix:(t,e)=>(z.copy(z.tempBounds,t),z.setByBoundsTimesMatrix(z.tempBounds,z.tempBounds,e),z.tempBounds),timesMatrix(t,e){z.setByBoundsTimesMatrix(t,t,e)},getByTimesMatrix:(t,e)=>(t=Object.assign({},t),z.setByBoundsTimesMatrix(t,t,e),t),divideMatrix(t,e){t.x=(t.x-e.e)/e.a,t.y=(t.y-e.f)/e.d,t.width/=e.a,t.height/=e.d},getFitMatrix(t,e){const i=Math.min(1,Math.min(t.width/e.width,t.height/e.height));return new T(i,0,0,i,-e.x*i,-e.y*i)},getSpread(t,e){const i={};return z.copyAndSpread(i,t,e),i},spread(t,e){z.copyAndSpread(t,t,e)},ceil(t){t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height)},add(t,e){M=t.x+t.width,D=t.y+t.height,O=e.x+e.width,A=e.y+e.height,M=M>O?M:O,D=D>A?D:A,t.x=t.x<e.x?t.x:e.x,t.y=t.y<e.y?t.y:e.y,t.width=M-t.x,t.height=D-t.y},addList(t,e){z.setByListWithHandle(t,e,void 0,!0)},setByList(t,e,i=!1){z.setByListWithHandle(t,e,void 0,i)},addListWithHandle(t,e,i){z.setByListWithHandle(t,e,i,!0)},setByListWithHandle(t,e,i,s=!1){if(!e.length)return void z.empty(t);let o,n=!0;for(let r=0,a=e.length;r<a;r++)o=i?i(e[r]):e[r],(o.width||o.height)&&(n?(n=!1,s||j(t,o)):F(t,o))},setByBoundsTimesMatrix(t,e,i){0===i.b&&0===i.c?(t.x=i.e+e.x*i.a,t.y=i.f+e.y*i.d,t.width=e.width*i.a,t.height=e.height*i.d):(W.x=e.x,W.y=e.y,S(i,W,I),P(C,I.x,I.y),W.x=e.x+e.width,S(i,W,I),L(C,I.x,I.y),W.y=e.y+e.height,S(i,W,I),L(C,I.x,I.y),W.x=e.x,S(i,W,I),L(C,I.x,I.y),k(C,t))},setByPoints(t,e){e.forEach(((t,e)=>{0===e?P(C,t.x,t.y):L(C,t.x,t.y)})),k(C,t)},hitRadiusPoint:(t,e,i)=>(i&&(e=B.tempToLocalRadiusPoint(e,i)),e.x>=t.x-e.radiusX&&e.x<=t.x+t.width+e.radiusX&&e.y>=t.y-e.radiusY&&e.y<=t.y+t.height+e.radiusY),hitPoint:(t,e,i)=>(i&&(e=B.tempToLocal(e,i)),e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height),hit:(t,e,i)=>(i&&(e=z.tempTimesMatrix(e,i)),!(t.y+t.height<e.y||e.y+e.height<t.y||t.x+t.width<e.x||e.x+e.width<t.x)),includes:(t,e,i)=>(i&&(e=z.tempTimesMatrix(e,i)),t.x<=e.x&&t.y<=e.y&&t.x+t.width>=e.x+e.width&&t.y+t.height>=e.y+e.height),getIntersectData(t,e,i){i&&(e=z.tempTimesMatrix(e,i));let{x:s,y:o,width:n,height:r}=e;return M=s+n,D=o+r,O=t.x+t.width,A=t.y+t.height,s=s>t.x?s:t.x,o=o>t.y?o:t.y,M=M<O?M:O,D=D<A?D:A,n=M-s,r=D-o,{x:s,y:o,width:n,height:r}},setByIntersect(t,e,i){z.copy(t,z.getIntersectData(t,e,i))},isSame:(t,e)=>t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height,isEmpty:t=>0===t.x&&0===t.y&&0===t.width&&0===t.height,empty(t){t.x=0,t.y=0,t.width=0,t.height=0}},z=N,{add:F,copy:j}=z;class Y{constructor(t,e,i,s){"object"==typeof t?N.copy(this,t):N.set(this,t,e,i,s)}set(t,e,i,s){N.set(this,t,e,i,s)}copy(t){return N.copy(this,t),this}clone(){return new Y(this)}timesMatrix(t){return N.timesMatrix(this,t),this}divideMatrix(t){return N.divideMatrix(this,t),this}getFitMatrix(t){return N.getFitMatrix(this,t)}spread(t){N.spread(this,t)}ceil(){N.ceil(this)}add(t){N.add(this,t)}addList(t){N.setByList(this,t,!0)}setByList(t,e){N.setByList(this,t,e)}addListWithHandle(t,e){N.setByListWithHandle(this,t,e,!0)}setByListWithHandle(t,e,i){N.setByListWithHandle(this,t,e,i)}setByBoundsTimesMatrix(t,e){N.setByBoundsTimesMatrix(this,t,e)}setByPoints(t){N.setByPoints(this,t)}hitPoint(t,e){return N.hitPoint(this,t,e)}hitRadiusPoint(t,e){return N.hitRadiusPoint(this,t,e)}hit(t,e){return N.hit(this,t,e)}includes(t,e){return N.includes(this,t,e)}getIntersect(t,e){return new Y(N.getIntersectData(this,t,e))}setByIntersect(t,e){N.setByIntersect(this,t,e)}isSame(t){return N.isSame(this,t)}isEmpty(){return N.isEmpty(this)}empty(){N.empty(this)}}class X{constructor(t,e,i,s,o,n){"object"==typeof t?this.copy(t):this.set(t,e,i,s,o,n)}set(t=0,e=0,i=0,s=0,o=0,n=0){this.top=t,this.right=e,this.bottom=i,this.left=s,this.width=o,this.height=n}copy(t){const{top:e,right:i,bottom:s,left:o,width:n,height:r}=t;this.set(e,i,s,o,n,r)}getBoundsFrom(t){const{top:e,right:i,bottom:s,left:o,width:n,height:r}=this;return new Y(o,e,n||t.width-o-i,r||t.height-e-s)}}class H{constructor(t,e){R.setPoint(this,t,e)}addPoint(t,e){R.addPoint(this,t,e)}add(t){R.add(this,t)}}const G={0:1,1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1,".":1,e:1,E:1};function U(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r}function K(t,e,i,s){return new(i||(i=Promise))((function(o,n){function r(t){try{h(s.next(t))}catch(t){n(t)}}function a(t){try{h(s.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,a)}h((s=s.apply(t,e||[])).next())}))}class V{constructor(t){this.name=t}static get(t){return new V(t)}static set filter(t){t?"string"==typeof t&&(t=[t]):t=[],this.filterList=t}static set exclude(t){t?"string"==typeof t&&(t=[t]):t=[],this.excludeList=t}log(...t){if(Q.enable){if(Q.filterList.length&&Q.filterList.every((t=>t!==this.name)))return;if(Q.excludeList.length&&Q.excludeList.some((t=>t===this.name)))return;console.log("%c"+this.name,"color:#21ae62",...t)}}warn(...t){console.warn(this.name,...t)}error(...t){console.error(this.name,...t)}}var q;V.filterList=[],V.excludeList=[],V.__={},U([(t,e)=>{Object.defineProperty(t,e,{get:()=>t.enable?t.__[e]:q,set(t){this.__[e]=t}})}],V,"showRepaint",void 0);const Q=V;const Z=V.get("RunTime");class ${static start(t,e){const i=a.create(a.RUNTIME);return J.currentId=J.idMap[i]=e?performance.now():Date.now(),J.currentName=J.nameMap[i]=t,J.nameToIdMap[t]=i,i}static end(t,e){const i=J.idMap[t],s=J.nameMap[t];J.idMap[t]=void 0,J.nameMap[t]=void 0,J.nameToIdMap[s]=void 0,e?Z.log(s,performance.now()-i,"µs"):Z.log(s,Date.now()-i,"ms")}static endOfName(t,e){const i=J.nameToIdMap[t];i&&J.end(i,e)}}$.idMap={},$.nameMap={},$.nameToIdMap={};const J=$;function tt(t,e,i){Object.defineProperty(t,e,i)}function et(t,e){return Object.getOwnPropertyDescriptor(t,e)}function it(t){return(e,i)=>{tt(e,i,{get(){return this.__get(t)},set(e){this.root?this.__set(t,e):this.__[t]=e}})}}function st(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t}}),vt(e,i,t)}}function ot(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.positionChanged||this.__layout.positionChange()}}),vt(e,i,t)}}function nt(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.scaleChanged||this.__layout.scaleChange()}}),vt(e,i,t)}}function rt(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.rotationChanged||this.__layout.rotationChange()}}),vt(e,i,t)}}function at(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.boxBoundsChanged||this.__layout.boxBoundsChange()}}),vt(e,i,t)}}const ht=at;function dt(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.eventBoundsChanged||this.__layout.eventBoundsChange()}}),vt(e,i,t)}}function lt(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.renderBoundsChanged||this.__layout.renderBoundsChange()}}),vt(e,i,t)}}function ct(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.surfaceChanged||this.__layout.surfaceChange()}}),vt(e,i,t)}}function ut(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.opacityChanged||this.__layout.opacityChange()}}),vt(e,i,t)}}function pt(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.surfaceChanged||this.__layout.surfaceChange(),this.parent?this.parent.__layout.childrenSortChanged||(this.parent.__layout.childrenSortChanged=!0):this.__addParentWait((()=>{this.parent.__layout.childrenSortChanged||(this.parent.__layout.childrenSortChanged=!0)}))}}),vt(e,i,t)}}function _t(t){return(e,i)=>{tt(e,"__DataProcessor",{get:()=>t})}}function gt(t){return(e,i)=>{tt(e,"__LayoutProcessor",{get:()=>t})}}function vt(t,e,i){const s=t.__DataProcessor.prototype,o="_"+e,n=function(t){return"set"+t.charAt(0).toUpperCase()+t.slice(1)}(e),r={get(){const t=this[o];return void 0===t?i:t},set(t){this[o]=t}};void 0===i&&(r.get=function(){return this[o]});const a=et(s,e);a&&(a.set&&(r.set=a.set),a.get&&(r.get=a.get)),s[n]&&(r.set=s[n],delete s[n]),Object.defineProperty(s,e,r)}const yt=new V("rewrite"),ft=[],mt=["destroy","constructor"];function xt(t){return(e,i)=>{ft.push({name:e.constructor.name+"."+i,run:()=>{e[i]=t}})}}function wt(){return t=>{Bt()}}function Bt(t){ft.length&&(ft.forEach((e=>{t&&yt.error(e.name,"需在Class上装饰@rewriteAble()"),e.run()})),ft.length=0)}function Et(t){return e=>{var i;(t.prototype?(i=t.prototype,Object.getOwnPropertyNames(i)):Object.keys(t)).forEach((i=>{if(!mt.includes(i))if(t.prototype){et(t.prototype,i).writable&&(e.prototype[i]=t.prototype[i])}else e.prototype[i]=t[i]}))}}setTimeout((()=>Bt(!0)));const bt={},Tt=V.get("EventCreator"),Rt={typeList:{},register(t){let e;Object.keys(t).forEach((i=>{e=t[i],"string"==typeof e&&(Ct[e]?Tt.error("register the repeat EventType: ",e):Ct[e]=t)}))},get:(t,...e)=>new Ct[t](...e)},{typeList:Ct}=Rt,Pt=V.get("UICreator"),Lt={list:{},register(t){const{tag:e}=t.prototype;kt[e]?Pt.error("register the repeat UI: ",e):kt[e]=t},get:(t,e)=>new kt[t](e)},{list:kt}=Lt,St={ui:(t,e)=>Lt.get(t,e),event:(t,...e)=>Rt.get(t,...e)};function Mt(){return t=>{Lt.register(t)}}function Dt(){return t=>{Rt.register(t)}}const{setByBoundsTimesMatrix:Ot}=N;class At{constructor(t){this.leaf=t,this.renderBounds=this.eventBounds=this.boxBounds={x:0,y:0,width:0,height:0},this.relativeRenderBounds=this.relativeEventBounds=t.__relative}update(){const{leafer:t}=this.leaf;t&&t.watcher.changed&&(t.running||t.start(),t.layouter.layout())}getTransform(t){return this.update(),"world"===t?this.leaf.__world:this.leaf.__relative}getBounds(t,e){if(this.update(),"world"===t)switch(e){case"render":return this.leaf.__world;case"box":return this.getWorldBoxBounds();case"event":return this.getWorldEventBounds()}else if("local"===t)switch(e){case"render":return this.renderBounds;case"box":return this.boxBounds;case"event":return this.eventBounds}else switch(e){case"render":return this.relativeRenderBounds;case"box":return this.leaf.__relative;case"event":return this.relativeEventBounds}return this.leaf.__world}getWorldBoxBounds(){return this._worldBoxBounds||(this._worldBoxBounds={}),Ot(this._worldBoxBounds,this.boxBounds,this.leaf.__world),this._worldBoxBounds}getWorldEventBounds(){return this._worldEventBounds||(this._worldEventBounds={}),Ot(this._worldEventBounds,this.eventBounds,this.leaf.__world),this._worldEventBounds}eventBoundsSpreadCancel(){const t=this.renderBounds===this.eventBounds;this.eventBounds=this.boxBounds,this.relativeEventBounds=this.leaf.__relative,t&&this.renderBoundsSpreadCancel()}renderBoundsSpreadCancel(){this.renderBounds=this.eventBounds,this.relativeRenderBounds=this.relativeEventBounds}eventBoundsSpread(){const{x:t,y:e,width:i,height:s}=this.eventBounds;this.eventBounds={x:t,y:e,width:i,height:s},this.relativeEventBounds={x:t,y:e,width:i,height:s},this.renderBoundsSpreadWidth||this.renderBoundsSpreadCancel()}renderBoundsSpread(){const{x:t,y:e,width:i,height:s}=this.renderBounds;this.renderBounds={x:t,y:e,width:i,height:s},this.relativeRenderBounds={x:t,y:e,width:i,height:s}}boxBoundsChange(){this.boxBoundsChanged=!0,this.localBoxBoundsChanged||this.localBoxBoundsChange(),this.hitCanvasChanged||(this.hitCanvasChanged=!0)}localBoxBoundsChange(){this.localBoxBoundsChanged=!0,this.boundsChanged||(this.boundsChanged=!0)}eventBoundsChange(){this.eventBoundsChanged=!0,this.eventBoundsSpreadWidth||(this.eventBoundsSpreadWidth=1),this.boundsChanged||(this.boundsChanged=!0)}renderBoundsChange(){this.renderBoundsChanged=!0,this.renderBoundsSpreadWidth||(this.renderBoundsSpreadWidth=1),this.boundsChanged||(this.boundsChanged=!0)}positionChange(){this.positionChanged=!0,this.matrixChanged||(this.matrixChanged=!0),this.localBoxBoundsChanged||this.localBoxBoundsChange()}scaleChange(){this.scaleChanged=!0,this._scaleOrRotationChange()}rotationChange(){this.rotationChanged=!0,this.affectRotation||(this.affectRotation=!0),this._scaleOrRotationChange()}_scaleOrRotationChange(){this.affectScaleOrRotation||(this.affectScaleOrRotation=!0),this.matrixChanged||(this.matrixChanged=!0),this.localBoxBoundsChanged||this.localBoxBoundsChange()}surfaceChange(){this.surfaceChanged=!0}opacityChange(){this.opacityChanged=!0,this.surfaceChanged||this.surfaceChange()}destroy(){this.leaf=void 0}}const Wt={},It={on(t,e,i){let s,o,n;if(i){const t="boolean"==typeof i;s=t?i:i.capture,o=!t&&i.once}const r=Nt(this,s,!0),a="string"==typeof t?t.split(" "):t,h=o?{listener:e,once:o}:{listener:e};a.forEach((t=>{t&&(n=r[t],n?-1===n.findIndex((t=>t.listener===e))&&n.push(h):r[t]=[h])}))},off(t,e,i){let s,o,n;i&&(s="boolean"==typeof i?i:i.capture);const r=Nt(this,s);("string"==typeof t?t.split(" "):t).forEach((t=>{t&&(o=r[t],o&&(n=o.findIndex((t=>t.listener===e)),n>-1&&o.splice(n,1),o.length||delete r[t]))}))},on__(t,e,i,s){return i&&(e=e.bind(i)),this.on(t,e,s),{type:t,listener:e,options:s}},off__(t){if(!t)return;const e=t instanceof Array?t:[t];e.forEach((t=>{this.off(t.type,t.listener,t.options)})),e.length=0},once(t,e,i){this.on(t,e,{once:!0,capture:i})},emit(t,e,i){const s=Nt(this,i)[t];if(s){let o;for(let n=0,r=s.length;n<r&&(o=s[n],o.listener(e),o.once&&this.off(t,o.listener,i),!e||!e.isStopNow);n++);}},emitEvent(t,e){t.current=this,this.emit(t.type,t,e)},hasEvent(t,e){const{__bubbleMap:i,__captureMap:s}=this;return void 0===e?!!(s&&s[t]||i&&i[t]):!!(e?s&&s[t]:i&&i[t])}};function Nt(t,e,i){if(e){const{__captureMap:e}=t;return e||(i?t.__captureMap={}:Wt)}{const{__bubbleMap:e}=t;return e||(i?t.__bubbleMap={}:Wt)}}class zt{constructor(t,e){this.bubbles=!1,this.type=t,e&&(this.target=e)}stopDefault(){this.isStopDefault=!0}stopNow(){this.isStopNow=!0,this.isStop=!0}stop(){this.isStop=!0}}let Ft=class extends zt{constructor(t,e,i){super(t,e),this.parent=i,this.child=e}};Ft.ADD="child.add",Ft.REMOVE="child.remove",Ft=U([Dt()],Ft);let jt=class extends zt{constructor(t,e,i,s,o){super(t,e),this.attrName=i,this.oldValue=s,this.newValue=o}};var Yt;jt.CHANGE="attr.change",jt=U([Dt()],jt);let Xt=Yt=class extends zt{constructor(t,e){const i="object"==typeof t;super(i?Yt.RESIZE:t),i&&Object.assign(this,t),this.old=e}get bigger(){if(!this.old)return!0;const{width:t,height:e}=this.old;return this.width>=t&&this.height>=e}get smaller(){return!this.bigger}get samePixelRatio(){return!this.old||this.pixelRatio===this.old.pixelRatio}};Xt.RESIZE="resize",Xt=Yt=U([Dt()],Xt);let Ht=class extends zt{constructor(t,e){super(t),e&&Object.assign(this,e)}};Ht.BEFORE="transform.before",Ht.CHANGE="transform.change",Ht.AFTER="transform.after",Ht.PRE_BEFORE="transform.pre_before",Ht.PRE_CHANGE="transform.pre_change",Ht.PRE_AFTER="transform.pre_after",Ht=U([Dt()],Ht);let Gt=class extends zt{constructor(t,e){super(t),this.data=e}};Gt.REQUEST="watch.request",Gt.DATA="watch.data",Gt=U([Dt()],Gt);let Ut=class extends zt{constructor(t,e){super(t),e&&(this.data=e)}};Ut.REQUEST="layout.request",Ut.START="layout.start",Ut.BEFORE_ONCE="layout.before_once",Ut.ONCE="layout.once",Ut.AFTER_ONCE="layout.after_once",Ut.AGAIN="layout.again",Ut.LAYOUT="layout",Ut.END="layout.end",Ut=U([Dt()],Ut);let Kt=class extends zt{};Kt.REQUEST="render.request",Kt.START="render.start",Kt.BEFORE_ONCE="render.before_once",Kt.ONCE="render.once",Kt.AFTER_ONCE="render.after_once",Kt.AGAIN="render.again",Kt.RENDER="render",Kt.END="render.end",Kt=U([Dt()],Kt);const Vt={__set(t,e){const i=this.__.__getInput(t);i!==e&&(this.__[t]=e,this.root.emitEvent(new jt(jt.CHANGE,this,t,i,e)))},__get(t){return this.__.__getInput(t)},__updateAttr(t){var e;const i=this.__.__getInput(t);null===(e=this.root)||void 0===e||e.emitEvent(new jt(jt.CHANGE,this,t,i,i))}},{defaultMatrix:qt}=p,{sin:Qt,cos:Zt}=Math,$t={__updateWorldMatrix(){const t=this.parent?this.parent.__world:qt,e=this.__relative,i=this.__world;this.__layout.matrixChanged&&this.__updateRelativeMatrix(),this.__layout.affectScaleOrRotation?(i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.e=e.e*t.a+e.f*t.c+t.e,i.f=e.e*t.b+e.f*t.d+t.f):(i.a=t.a,i.b=t.b,i.c=t.c,i.d=t.d,i.e=e.e*t.a+e.f*t.c+t.e,i.f=e.e*t.b+e.f*t.d+t.f)},__updateRelativeMatrix(){const t=this.__relative,e=this.__layout;if(e.affectScaleOrRotation){const{scaleX:i,scaleY:s}=this.__;if(e.affectRotation){if(e.scaleChanged||e.rotationChanged){let{rotation:o,skewX:n,skewY:r}=this.__;o||n||r?(o*=l,n&&(n*=l),r&&(r*=l),t.a=i*Zt(o+r),t.b=i*Qt(o+r),t.c=s*-Qt(o-n),t.d=s*Zt(o-n)):(t.a=i,t.b=0,t.c=0,t.d=s,e.affectRotation=!1),e.scaleChanged=!1,e.rotationChanged=!1}}else e.scaleChanged&&(t.a=i,t.d=s,e.scaleChanged=!1)}e.positionChanged&&(t.e=this.__.x,t.f=this.__.y,e.positionChanged=!1),this.__layout.matrixChanged=!1}},{setByBoundsTimesMatrix:Jt}=N,te={__updateWorldBounds(){var t,e,i;if(this.__layout.boundsChanged){let s;const o=this.__layout;o.boxBoundsChanged&&(this.__updatePath(),this.__updateRenderPath(),this.__updateBoxBounds(),o.boxBoundsChanged=!1,s=!0),o.localBoxBoundsChanged&&(this.__updateRelativeBoxBounds(),o.localBoxBoundsChanged=!1,o.eventBoundsSpreadWidth&&(o.eventBoundsChanged=!0),o.renderBoundsSpreadWidth&&(o.renderBoundsChanged=!0),null===(t=this.parent)||void 0===t||t.__layout.boxBoundsChange()),o.eventBoundsChanged&&(o.eventBoundsSpreadWidth=this.__updateEventBoundsSpreadWidth(),o.eventBoundsSpreadWidth?(o.eventBounds===o.boxBounds&&o.eventBoundsSpread(),this.__updateEventBounds(),this.__updateRelativeEventBounds(),o.eventBoundsChanged=!1,o.renderBoundsSpreadWidth&&(o.renderBoundsChanged=!0)):o.eventBoundsSpreadCancel(),null===(e=this.parent)||void 0===e||e.__layout.eventBoundsChange(),s||(s=!0)),o.renderBoundsChanged&&(o.renderBoundsSpreadWidth=this.__updateRenderBoundsSpreadWidth(),o.renderBoundsSpreadWidth?(o.renderBounds!==o.boxBounds&&o.renderBounds!==o.eventBounds||o.renderBoundsSpread(),this.__updateRenderBounds(),this.__updateRelativeRenderBounds(),o.renderBoundsChanged=!1):o.renderBoundsSpreadCancel(),null===(i=this.parent)||void 0===i||i.__layout.renderBoundsChange()),o.boundsChanged=!1,Jt(this.__world,this.__layout.renderBounds,this.__world),s&&this.__onUpdateSize()}else Jt(this.__world,this.__layout.renderBounds,this.__world)},__updateRelativeBoxBounds(){Jt(this.__relative,this.__layout.boxBounds,this.__relative)},__updateRelativeEventBounds(){Jt(this.__layout.relativeEventBounds,this.__layout.eventBounds,this.__relative)},__updateRelativeRenderBounds(){Jt(this.__layout.relativeRenderBounds,this.__layout.renderBounds,this.__relative)},__updateBoxBounds(){const t=this.__layout.boxBounds;t.x=0,t.y=0,t.width=this.__.width,t.height=this.__.height}},{toLocalRadiusPoint:ee}=B,ie={},se={__updateHitCanvas(){this.__hitCanvas||(this.__hitCanvas=this.leafer.hitCanvasManager.getPathType(this)),this.__drawRenderPath(this.__hitCanvas)},__hitWorld(t){return this.__layout.hitCanvasChanged&&(this.__updateHitCanvas(),this.__layout.hitCanvasChanged=!1),ee(t,this.__world,ie),this.__hit(ie)}},oe={__render(t,e){this.__worldOpacity&&(t.setWorld(this.__world,e.matrix),t.opacity=this.__worldOpacity,this.__complex?this.__draw(t,e):this.__drawFast(t,e))},__updateWorldOpacity(){this.__worldOpacity=this.__.visible?this.parent?this.parent.__worldOpacity*this.__.opacity:this.__.opacity:0,this.__layout.opacityChanged&&(this.__layout.opacityChanged=!1)}},{LEAF:ne,create:re}=a;let ae=class{constructor(t){this.innerId=re(ne),this.__relative={a:1,b:0,c:0,d:1,e:0,f:0,x:0,y:0,width:0,height:0},this.__world={a:1,b:0,c:0,d:1,e:0,f:0,x:0,y:0,width:0,height:0},this.__worldOpacity=1,this.__renderTime=2,this.__=new this.__DataProcessor(this),this.__layout=new this.__LayoutProcessor(this),t&&Object.assign(this,t)}get tag(){return this.constructor.name}get __DataProcessor(){return r}get __LayoutProcessor(){return At}__addParentWait(t){this.__parentWait?this.__parentWait.push(t):this.__parentWait=[t]}__runParentWait(){const t=this.__parentWait.length;for(let e=0;e<t;e++)this.__parentWait[e]();this.__parentWait=void 0}__setAsLeafer(){this.leafer=this}__setAsRoot(){this.__bindRoot(this),this.__isRoot=!0}__bindRoot(t){if(!this.__isRoot&&(this.root=t,this.leafer=t.leafer,this.__level=this.parent?this.parent.__level+1:1,this.__isBranch)){const{children:e}=this;for(let i=0,s=e.length;i<s;i++)e[i].__bindRoot(t)}}__set(t,e){}__get(t){}__updateAttr(t){}__updateWorldOpacity(){}__updateWorldMatrix(){}__updateRelativeMatrix(){}__updateWorldBounds(){}__updateRelativeBoxBounds(){}__updateRelativeEventBounds(){}__updateRelativeRenderBounds(){}__updateBoxBounds(){}__updateEventBounds(){}__updateRenderBounds(){}__updateEventBoundsSpreadWidth(){return 0}__updateRenderBoundsSpreadWidth(){return 0}__onUpdateSize(){}__hitWorld(t){return!0}__hit(t){return!0}__updateHitCanvas(){}__render(t,e){}__drawFast(t,e){}__draw(t,e){}__updateChange(){}__drawPath(t){}__drawRenderPath(t){}__updatePath(){}__updateRenderPath(){}__updateSortChildren(){}add(t,e){}remove(t){}on(t,e,i){}off(t,e,i){}on__(t,e,i,s){}off__(t){}once(t,e,i){}emit(t,e,i){}emitEvent(t,e){}hasEvent(t,e){return!1}destroy(){this.__&&(this.__isBranch&&(this.children.forEach((t=>{t.destroy()})),this.children=void 0),this.__hitCanvas&&(this.__hitCanvas.destroy(),this.__hitCanvas=void 0),this.leafer=void 0,this.root=void 0,this.parent=void 0,this.__.destroy(),this.__layout.destroy(),this.__=void 0,this.__layout=void 0,this.__captureMap=void 0,this.__bubbleMap=void 0)}};ae=U([Et(Vt),Et($t),Et(te),Et(se),Et(It),Et(oe)],ae);const he={updateAllWorldMatrix(t){if(t.__updateWorldMatrix(),t.__isBranch){const{children:e}=t;for(let t=0,i=e.length;t<i;t++)le(e[t])}},updateAllWorldOpacity(t){if(t.__updateWorldOpacity(),t.__isBranch){const{children:e}=t;for(let t=0,i=e.length;t<i;t++)ce(e[t])}},updateAllChange(t){if(ce(t),t.__updateChange(),t.__isBranch){const{children:e}=t;for(let t=0,i=e.length;t<i;t++)ue(e[t])}},moveByWorld(t,e,i){const s={x:e,y:i};t.parent&&p.toLocalPoint(t.parent.__world,s,s,!0),de.move(t,s.x,s.y)},move(t,e,i){t.x=t.__.x+e,t.y=t.__.y+i},zoomByWorld(t,e,i,s){const o=t.parent?B.tempToLocal(i,t.parent.__world):i;this.zoom(t,e,o,s)},zoom(t,e,i,s){s||(s=t);const{x:o,y:n}=s.__,{scaleX:r,scaleY:a}=t.__,h=i.x-o,d=i.y-n,l=(new T).translate(h,d).scale(e).translate(-h,-d);s.x=o-l.e,s.y=n-l.f,t.scaleX=r*e,t.scaleY=a*e},rotateByWorld(t,e,i,s){const o=t.parent?B.tempToLocal(i,t.parent.__world):i;this.rotate(t,e,o,s)},rotate(t,e,i,s){s||(s=t);const{x:o,y:n}=s.__,{rotation:r}=t.__,a=i.x-o,h=i.y-n,d=(new T).translate(a,h).rotate(e).translate(-a,-h);s.x=o-d.e,s.y=n-d.f,t.rotation=r+e}},de=he,{updateAllWorldMatrix:le,updateAllWorldOpacity:ce,updateAllChange:ue}=de,pe={worldBounds:t=>t.__world,relativeBoxBounds:t=>t.__relative,relativeEventBounds:t=>t.__layout.relativeEventBounds,relativeRenderBounds:t=>t.__layout.relativeRenderBounds},_e={sort:(t,e)=>t.__.zIndex===e.__.zIndex?t.__tempNumber-e.__tempNumber:t.__.zIndex-e.__.zIndex,pushAllChildBranch(t,e){if(t.__tempNumber=1,t.__childBranchNumber){const{children:i}=t;for(let s=0,o=i.length;s<o;s++)(t=i[s]).__isBranch&&(t.__tempNumber=1,e.push(t),ge(t,e))}},pushAllParent(t,e){const{keys:i}=e;if(i)for(;t.parent&&void 0===i[t.parent.innerId];)e.push(t.parent),t=t.parent;else for(;t.parent;)e.push(t.parent),t=t.parent},pushAllBranchStack(t,e){let i=e.length;const{children:s}=t;for(let t=0,i=s.length;t<i;t++)s[t].__isBranch&&e.push(s[t]);for(let t=i,s=e.length;t<s;t++)ve(e[t],e)},updateWorldBoundsByBranchStack(t){let e;for(let i=t.length-1;i>-1;i--){e=t[i];for(let t=0,i=e.children.length;t<i;t++)e.children[t].__updateWorldBounds()}e.__updateWorldBounds()}},{pushAllChildBranch:ge,pushAllBranchStack:ve}=_e,{setByListWithHandle:ye}=N,{sort:fe}=_e,{relativeBoxBounds:me,relativeEventBounds:xe,relativeRenderBounds:we}=pe;class Be extends ae{constructor(){super(),this.__isBranch=!0,this.children=[]}__updateEventBoundsSpreadWidth(){const{children:t}=this;for(let e=0,i=t.length;e<i;e++)if(t[e].__layout.eventBoundsSpreadWidth)return 1;return 0}__updateRenderBoundsSpreadWidth(){const{children:t}=this;for(let e=0,i=t.length;e<i;e++)if(t[e].__layout.renderBoundsSpreadWidth)return 1;return 0}__updateBoxBounds(){ye(this.__layout.boxBounds,this.children,me)}__updateEventBounds(){ye(this.__layout.eventBounds,this.children,xe)}__updateRenderBounds(){ye(this.__layout.renderBounds,this.children,we)}__updateChange(){const{__layout:t}=this;t.childrenSortChanged&&(this.__updateSortChildren(),t.childrenSortChanged=!1)}__updateSortChildren(){const{children:t}=this;if(t.length>1){for(let e=0,i=t.length;e<i;e++)t[e].__tempNumber=e;t.sort(fe)}}__render(t,e){if(this.__worldOpacity){let i;const{bounds:s,hideBounds:o}=e,{children:n}=this;for(let r=0,a=n.length;r<a;r++)i=n[r],s&&!s.hit(i.__world,e.matrix)||o&&o.includes(i.__world)||i.__render(t,e)}}add(t,e){if(t.parent)t.parent!==this&&console.warn("child had other parent, can not add to this, child innerId:"+t.innerId);else{if(t.parent=this,void 0===e?this.children.push(t):this.children.splice(e,0,t),t.__isBranch&&(this.__childBranchNumber?this.__childBranchNumber++:this.__childBranchNumber=1),this.root){t.__bindRoot(this.root);const e=new Ft(Ft.ADD,t,this);this.hasEvent(Ft.ADD)&&this.emitEvent(e),this.root.emitEvent(e)}t.__parentWait&&t.__runParentWait()}}remove(t){if(t){const e=this.children.indexOf(t);if(e>-1){if(this.children.splice(e,1),t.__isBranch&&(this.__childBranchNumber>1?this.__childBranchNumber--:this.__childBranchNumber=0),this.root){const e=new Ft(Ft.REMOVE,t,this);this.hasEvent(Ft.REMOVE)&&this.emitEvent(e),this.root.emitEvent(e),t.root=void 0}t.parent=void 0,this.__layout.boxBoundsChange()}}else this.parent&&this.parent.remove(this)}}const Ee={};class be{static isHoldSpaceKey(){return be.hasDownCode("Space")}static setDownCode(t){Ee[t]||(Ee[t]=!0)}static setUpCode(t){Ee[t]=!1}static hasDownCode(t){return Ee[t]}}class Te{static left(t){return 1===t.buttons}static right(t){return 2===t.buttons}static middle(t){return 4===t.buttons}}class Re extends zt{constructor(t){super(t.type),this.bubbles=!0,Object.assign(this,t)}get spaceKey(){return be.isHoldSpaceKey()}get left(){return Te.left(this)}get right(){return Te.right(this)}get middle(){return Te.middle(this)}}let Ce=class extends Re{};Ce.POINTER="pointer",Ce.BEFORE_DOWN="pointer.before_down",Ce.BEFORE_MOVE="pointer.before_move",Ce.BEFORE_UP="pointer.before_up",Ce.DOWN="pointer.down",Ce.MOVE="pointer.move",Ce.UP="pointer.up",Ce.ENTER="pointer.enter",Ce.LEAVE="pointer.leave",Ce.TAP="tap",Ce.CLICK="click",Ce.DOUBLE_CLICK="doubleclick",Ce.LONG_PRESS="longpress",Ce.LONG_TAP="longtap",Ce=U([Dt()],Ce);let Pe=class extends Ce{};var Le;Pe.DRAG="drag",Pe.START="drag.start",Pe.END="drag.end",Pe=U([Dt()],Pe);let ke=Le=class extends Ce{static setList(t){Le.dragList=t instanceof e?t:new e(t)}};ke.DROP="drop",ke.ENTER="drop.enter",ke.LEAVE="drop.leave",ke=Le=U([Dt()],ke);let Se=class extends Pe{};Se.MOVE="move",Se.START="move.start",Se.END="move.end",Se=U([Dt()],Se);let Me=class extends Re{};Me.ROTATE="rotate",Me.START="rotate.start",Me.END="rotate.end",Me=U([Dt()],Me);let De=class extends Pe{};De.SWIPE="swipe",De.LEFT="swipe.left",De.RIGHT="swipe.right",De.UP="swipe.up",De.DOWN="swipe.down",De=U([Dt()],De);let Oe=class extends Re{};Oe.ZOOM="zoom",Oe.START="zoom.start",Oe.END="zoom.end",Oe=U([Dt()],Oe);let Ae=class extends Re{};Ae.DOWN="key.down",Ae.PRESS="key.press",Ae.UP="key.up",Ae=U([Dt()],Ae);class We{constructor(t,e){this.list=[],this.leafer=t}load(){}destory(){this.leafer=void 0}}const Ie={M:1,m:10,L:2,l:20,H:3,h:30,V:4,v:40,C:5,c:50,S:6,s:60,Q:7,q:70,T:8,t:80,A:9,a:90,Z:11,z:11,rect:100,roundRect:101,ellipse:102,arc:103,arcTo:104},Ne={M:3,m:3,L:3,l:3,H:2,h:2,V:2,v:2,C:7,c:7,S:5,s:5,Q:5,q:5,T:3,t:3,A:8,a:8,Z:1,z:1,rect:5,roundRect:6,ellipse:9,arc:7,arcTo:6},ze={m:10,l:20,H:3,h:30,V:4,v:40,c:50,S:6,s:60,q:70,T:8,t:80,A:9,a:90,rect:100,roundRect:101,ellipse:102,arc:103,arcTo:104},Fe=Ie,je={};for(let t in Fe)je[Fe[t]]=t;const Ye={};for(let t in Fe)Ye[Fe[t]]=Ne[t];const Xe={},{sin:He,cos:Ge,sqrt:Ue,atan2:Ke,ceil:Ve,abs:qe,PI:Qe}=Math,{setPoint:Ze,addPoint:$e}=R,Je={getFromACommand(t,e,i,s,o,n,r,a,h){const d=a-t,l=h-e,c=o*Qe/180,u=He(c),p=Ge(c),_=-p*d*.5-u*l*.5,g=-p*l*.5+u*d*.5,v=i*i,y=s*s,f=g*g,m=_*_,x=v*y-v*f-y*m;let w=0;if(x<0){const t=Ue(1-x/(v*y));i*=t,s*=t}else{w=(n===r?-1:1)*Ue(x/(v*f+y*m))}const B=w*i*g/s,E=-w*s*_/i,b=p*B-u*E+.5*d,T=u*B+p*E+.5*l;let R=Ke((g-E)/s,(_-B)/i),C=Ke((-g-E)/s,(-_-B)/i),P=C-R;0===r&&P>0?P-=2*Qe:1===r&&P<0&&(P+=2*Qe);const L=[],k=Ve(qe(P/Qe*2)),S=P/k,M=He(S/2),D=He(S/4),O=8/3*D*D/M;R=0,C=Ke((g-E)/s,(_-B)/i);let A,W,I,N,z,F,j,Y,X=C-R,H=X+S,G=Ge(X),U=He(X),K=0,V=0;for(let o=0;o<k;o++)A=Ge(H),W=He(H),I=p*i*A-u*s*W+b,N=u*i*A+p*s*W+T,z=K+O*(-p*i*U-u*s*G),F=V+O*(-u*i*U+p*s*G),j=I+O*(p*i*W+u*s*A),Y=N+O*(u*i*W-p*s*A),L.push(Ie.C,z+t,F+e,j+t,Y+e,I+t,N+e),K=I,V=N,X=H,G=A,U=W,H+=S;return L},toTwoPointBounds(t,e,i,s,o,n,r,a,h){const d=[];let l,c,u,p,_,g,v,y,f=t,m=i,x=o,w=r;for(let t=0;t<2;++t)if(1==t&&(f=e,m=s,x=n,w=a),l=-3*f+9*m-9*x+3*w,c=6*f-12*m+6*x,u=3*m-3*f,Math.abs(l)<1e-12){if(Math.abs(c)<1e-12)continue;p=-u/c,0<p&&p<1&&d.push(p)}else v=c*c-4*u*l,y=Math.sqrt(v),v<0||(_=(-c+y)/(2*l),0<_&&_<1&&d.push(_),g=(-c-y)/(2*l),0<g&&g<1&&d.push(g));Ze(h,t,e),$e(h,r,a);for(let l=0,c=d.length;l<c;l++)ti.getPointAndSet(d[l],t,e,i,s,o,n,r,a,Xe),$e(h,Xe.x,Xe.y)},getPointAndSet(t,e,i,s,o,n,r,a,h,d){const l=1-t,c=l*l*l,u=3*l*l*t,p=3*l*t*t,_=t*t*t;d.x=c*e+u*s+p*n+_*a,d.y=c*i+u*o+p*r+_*h},getPoint(t,e,i,s,o,n,r,a,h){const d={};return ti.getPointAndSet(t,e,i,s,o,n,r,a,h,d),d}},ti=Je,{M:ei,m:ii,L:si,l:oi,H:ni,h:ri,V:ai,v:hi,C:di,c:li,S:ci,s:ui,Q:pi,q:_i,T:gi,t:vi,A:yi,a:fi,Z:mi,z:xi}=Ie,{getFromACommand:wi}=Je,Bi={current:{},stringify(t){let e,i,s,o=0,n=t.length,r="";for(;o<n;){i=t[o],e=Ye[i],r+=i===s?" ":je[i];for(let i=1;i<e;i++)r+=t[o+i],i===e-1||(r+=" ");s=i,o+=e}return r},parse(t,e=!0){let i,s,o="";const n=[];for(let e=0,r=t.length;e<r;e++)s=t[e],G[s]?o+=s:Ie[s]?(o&&(bi(n,Number(o)),o=""),Ei.name=Ie[s],Ei.length=Ne[s],Ei.index=0,bi(n,Ei.name),!i&&ze[s]&&(i=!0)):"-"===s?(o&&bi(n,Number(o)),o=s):o&&(bi(n,Number(o)),o="");return o&&bi(n,Number(o)),e&&i?Bi.convertToSimple(n):n},convertToSimple(t){let e,i,s,o,n,r=0,a=0,h=0,d=0,l=0,c=t.length;const u=[];for(;l<c;){switch(s=t[l],s){case ii:t[l+1]+=r,t[l+2]+=a;case ei:r=t[l+1],a=t[l+2],u.push(ei,r,a),l+=3;break;case ri:t[l+1]+=r;case ni:r=t[l+1],u.push(si,r,a),l+=2;break;case hi:t[l+1]+=a;case ai:a=t[l+1],u.push(si,r,a),l+=2;break;case oi:t[l+1]+=r,t[l+2]+=a;case si:r=t[l+1],a=t[l+2],u.push(si,r,a),l+=3;break;case ui:t[l+1]+=r,t[l+2]+=a,t[l+3]+=r,t[l+4]+=a,s=ci;case ci:n=o===di||o===ci,h=n?2*r-e:t[l+1],d=n?2*a-i:t[l+2],e=t[l+1],i=t[l+2],r=t[l+3],a=t[l+4],u.push(di,h,d,e,i,r,a),l+=5;break;case li:t[l+1]+=r,t[l+2]+=a,t[l+3]+=r,t[l+4]+=a,t[l+5]+=r,t[l+6]+=a,s=di;case di:e=t[l+3],i=t[l+4],r=t[l+5],a=t[l+6],u.push(di,t[l+1],t[l+2],e,i,r,a),l+=7;break;case vi:t[l+1]+=r,t[l+2]+=a,s=gi;case gi:n=o===pi||o===gi,e=n?2*r-e:t[l+1],i=n?2*a-i:t[l+2],r=t[l+1],a=t[l+2],u.push(pi,e,i,r,a),l+=3;break;case _i:t[l+1]+=r,t[l+2]+=a,t[l+3]+=r,t[l+4]+=a,s=pi;case pi:e=t[l+1],i=t[l+2],r=t[l+3],a=t[l+4],u.push(pi,e,i,r,a),l+=5;break;case fi:t[l+6]+=r,t[l+7]+=a;case yi:u.push(...wi(r,a,t[l+1],t[l+2],t[l+3],t[l+4],t[l+5],t[l+6],t[l+7])),r=t[l+6],a=t[l+7],l+=8;break;case xi:case mi:u.push(mi),l++}o=s}return u},pushData(t,e){Ei.index===Ei.length&&(Ei.index=1,t.push(Ei.name)),t.push(e),Ei.index++}},{current:Ei,pushData:bi}=Bi,{M:Ti,L:Ri,C:Ci,Q:Pi,Z:Li,ellipse:ki}=Ie,{toTwoPointBounds:Si}=Je,{add:Mi,addPoint:Di,setPoint:Oi}=R,Ai={},Wi={applyCorner:(t,e,i)=>t,toTwoPointBounds(t,e){let i,s,o,n,r,a,h,d=0;const l=t.length;for(;d<l;)switch(i=t[d],0===d&&(i===Ti?Oi(e,t[1],t[2]):Oi(e,0,0)),i){case Ti:case Ri:s=t[d+1],o=t[d+2],Di(e,s,o),d+=3;break;case Ci:a=t[d+5],h=t[d+6],Si(s,o,t[d+1],t[d+2],t[d+3],t[d+4],a,h,Ai),Mi(e,Ai),s=a,o=h,d+=7;break;case Pi:n=t[d+1],r=t[d+2],a=t[d+3],h=t[d+4],Si(s,o,n,r,n,r,a,h,Ai),Mi(e,Ai),s=a,o=h,d+=5;break;case Li:d+=1}e.minX--,e.minY--,e.maxX++,e.maxY++},drawData(t,e){let i,s=0,o=e.length;for(;s<o;)switch(i=e[s],i){case Ti:t.moveTo(e[s+1],e[s+2]),s+=3;break;case Ri:t.lineTo(e[s+1],e[s+2]),s+=3;break;case Ci:t.bezierCurveTo(e[s+1],e[s+2],e[s+3],e[s+4],e[s+5],e[s+6]),s+=7;break;case Pi:t.quadraticCurveTo(e[s+1],e[s+2],e[s+3],e[s+4]),s+=5;break;case Li:t.closePath(),s+=1;break;case ki:t.ellipse(e[s+1],e[s+2],e[s+3],e[s+4],e[s+5],e[s+6],e[s+7],e[s+8]),s+=9}}};let Ii;const{M:Ni,L:zi,C:Fi,Q:ji,Z:Yi,rect:Xi,roundRect:Hi,ellipse:Gi,arc:Ui,arcTo:Ki}=Ie,Vi={begin(t){Ii=t},end(){Ii=void 0},moveTo(t,e){Ii.push(Ni,t,e)},lineTo(t,e){Ii.push(zi,t,e)},bezierCurveTo(t,e,i,s,o,n){Ii.push(Fi,t,e,i,s,o,n)},quadraticCurveTo(t,e,i,s){Ii.push(ji,t,e,i,s)},close(t){Ii.push(Yi),t&&(Ii=void 0)},rect(t,e,i,s){Ii.push(Xi,t,e,i,s)},roundRect(t,e,i,s,o){Ii.push(Hi,t,e,i,s,o)},ellipse(t,e,i,s,o,n,r,a){Ii.push(Gi,t,e,i,s,o,n,r,a)},arc(t,e,i,s,o,n){Ii.push(Ui,t,e,i,s,o,n)},arcTo(t,e,i,s,o){Ii.push(Ki,t,e,i,s,o)}},qi=V.get("plugin"),Qi={list:[]};function Zi(t,e){if(Qi.list.push(t),t.dependencies){const i={};t.dependencies.forEach((t=>{e[t]?i[t]=e[t]:qi.error(t+" non-existent")})),t.run(i)}else qi.error("no dependencies")}class $i{constructor(t){this.taskTime=1,this.id=a.create(a.TASK),this.task=t}run(){return K(this,void 0,void 0,(function*(){this.task&&!this.isComplete&&this.parent.running&&(yield this.task())}))}complete(){this.isComplete=!0,this.parent=void 0,this.task=void 0}}const Ji=V.get("TaskProcessor");class ts{constructor(t){this.parallel=6,this.params={},this.list=[],this.index=0,t&&(this.params=t,t.parallel&&(this.parallel=t.parallel)),this.init()}get isComplete(){return this._isComplete}get running(){return this._running}get percent(){const t=this.list.length;let e=0,i=0;for(let s=0;s<t;s++)s<=this.index?(i+=this.list[s].taskTime,s===this.index&&(e=i)):e+=this.list[s].taskTime;let s=this._isComplete?1:i/e;return Number.isNaN(s)&&(s=0),s}get total(){return this.list.length}get runIndex(){return this.index}init(){this.empty(),this.index=0,this.parallelSuccessNumber=0,this._running=!1,this._isComplete=!1}empty(){this.list=[],this.parallelList=[]}start(){this._running=!0,this._isComplete=!1,this.run()}pause(){this._running=!1}resume(){this._running=!0,this._isComplete=!1,this.run()}skip(){this.index++,this.resume()}stop(){this._running=!1,this.list.forEach((t=>{t.complete()})),this.empty()}add(t,e){this.push(new $i(t),e)}addParallel(t,e){const i=new $i(t);i.parallel=!0,this.push(i,e)}addEmpty(t){this.push(new $i(t))}push(t,e){e&&(t.taskTime=e),t.parent=this,this.list.push(t)}run(){this._running&&(this.setParallelList(),this.parallelList.length>1?this.runParallelTask():this.runTask())}runTask(){const t=this.list[this.index];t.run().then((()=>{this.onTask(t),this.index++,this.nextTask()})).catch((t=>{this.onError(t)}))}runParallelTask(){this.parallelList.forEach((t=>{t.run().then((()=>{this.onTask(t),this.fillParallelTask()})).catch((t=>{this.onParallelError(t)}))}))}setParallelList(){let t;this.parallelList=[],this.parallelSuccessNumber=0;let e=this.index+this.parallel;e>this.list.length&&(e=this.list.length);for(let i=this.index;i<e&&(t=this.list[i],t.parallel);i++)this.parallelList.push(t)}fillParallelTask(){let t;const e=this.parallelList;this.parallelSuccessNumber++,e.pop();const i=e.length,s=this.index+this.parallelSuccessNumber+i;if(e.length){if(!this._running)return;s<this.list.length&&(t=this.list[s],t.parallel&&(e.push(t),t.run().then((()=>{this.onTask(t),this.fillParallelTask()})).catch((t=>{this.onParallelError(t)}))))}else this.index+=this.parallelSuccessNumber,this.nextTask()}nextTask(){setTimeout((()=>{this.run()}),0)}onComplete(){this.stop(),this._isComplete=!0,this.params.onComplete&&this.params.onComplete()}onTask(t){t.complete(),this.params.onTask&&this.params.onTask(),this.index===this.list.length-1&&this.onComplete()}onParallelError(t){Ji.error("ParallelError"),this.parallelList.forEach((t=>{t.parallel=!1})),this.parallelList.length=0,this.parallelSuccessNumber=0,this.onError(t)}onError(t){this.pause(),this.params.onError&&this.params.onError(t)}}class es{constructor(t,i){this.updatedList=new e,this.totalTimes=0,this.config={},this.changed=!0,this.target=t,i&&(this.config=o.default(i,this.config)),this.listenEvents()}start(){this.running=!0,this.changed=!1,this.update()}stop(){this.running=!1}listenEvents(){const{target:t}=this;this.eventIds=[t.on__(jt.CHANGE,this.onAttrChange,this),t.on__([Ft.ADD,Ft.REMOVE],this.onChildEvent,this),t.on__(Gt.REQUEST,this.onRquestData,this)]}removeListenEvents(){this.target.off__(this.eventIds)}onRquestData(){this.target.emitEvent(new Gt(Gt.DATA,{updatedList:this.updatedList})),this.updatedList=new e,this.totalTimes++,this.changed=!1}onAttrChange(t){this.updatedList.push(t.target),this.update()}onChildEvent(t){this.updatedList.push(t.type===Ft.REMOVE?t.parent:t.child),this.update()}update(){this.running&&(this.changed=!0,this.target.emit(Kt.REQUEST))}destroy(){this.target&&(this.removeListenEvents(),this.target=void 0,this.updatedList=void 0)}}const{updateAllWorldMatrix:is,updateAllWorldOpacity:ss}=he,{pushAllChildBranch:os,pushAllParent:ns}=_e;const{worldBounds:rs}=pe,{setByListWithHandle:as}=N;class hs{constructor(t){this.updatedBounds=new Y,this.beforeBounds=new Y,this.afterBounds=new Y,t instanceof Array&&(t=new e(t)),this.updatedList=t}setBefore(){as(this.beforeBounds,this.updatedList.list,rs)}setAfter(){as(this.afterBounds,this.updatedList.list,rs),this.__computeChange()}merge(t){this.updatedList.pushList(t.updatedList.list),this.beforeBounds.add(t.beforeBounds),this.afterBounds.add(t.afterBounds),this.updatedBounds.add(t.updatedBounds)}__computeChange(){const{updatedBounds:t}=this;t.setByList([this.beforeBounds,this.afterBounds]),t.isEmpty()||(t.spread(2),t.ceil())}destroy(){this.updatedList=void 0}}const{updateAllWorldMatrix:ds,updateAllChange:ls}=he,{pushAllBranchStack:cs,updateWorldBoundsByBranchStack:us}=_e;class ps{constructor(t,e){this.totalTimes=0,this.changed=!0,this.config={partLayout:{maxTimes:3}},this.levelList=new i,this.target=t,e&&(this.config=o.default(e,this.config)),this.listenEvents()}start(){this.running=!0}stop(){this.running=!1}listenEvents(){const{target:t}=this;this.eventIds=[t.on__(Ut.REQUEST,this.layout,this),t.on__(Ut.AGAIN,this.layoutOnce,this),t.on__(Gt.DATA,this.onReceiveWatchData,this),t.on__(Kt.REQUEST,this.onChange,this)]}removeListenEvents(){this.target.off__(this.eventIds)}onReceiveWatchData(t){this.updateList=t.data.updatedList}onChange(){this.changed=!0}layout(){if(!this.running)return;const{target:t}=this,{START:e,LAYOUT:i,END:s}=Ut;this.times=0,this.changed=!1,t.emit(e),this.layoutOnce(),t.emitEvent(new Ut(i,this.layoutedBlocks)),t.emitEvent(new Ut(s,this.layoutedBlocks)),this.layoutedBlocks=void 0}layoutOnce(){this.totalTimes++,this.times++,this.target.emit(Gt.REQUEST),this.totalTimes>1?this.partLayout():this.fullLayout()}partLayout(){var t;if(!(null===(t=this.updateList)||void 0===t?void 0:t.length))return;const e=$.start("part layout"),{target:i,updateList:s}=this,{BEFORE_ONCE:o,ONCE:n,AFTER_ONCE:r}=Ut,a=this.getBlocks(s);a.forEach((t=>{t.setBefore()})),i.emitEvent(new Ut(o,a)),s.sort(),function(t,e){let i;t.list.forEach((t=>{i=t.__layout,e.without(t)&&(i.matrixChanged?(is(t),e.push(t),t.__isBranch&&os(t,e),ns(t,e)):i.boundsChanged&&(e.push(t),t.__isBranch&&(t.__tempNumber=0),ns(t,e)))}))}(s,this.levelList),function(t){let e,i;t.sort(!0),t.levels.forEach((s=>{e=t.levelMap[s];for(let t=0,s=e.length;t<s;t++){if(i=e[t],i.__isBranch&&i.__tempNumber)for(let t=0,e=i.children.length;t<e;t++)i.children[t].__isBranch||i.children[t].__updateWorldBounds();i.__updateWorldBounds()}}))}(this.levelList),function(t){t.list.forEach((t=>{t.__layout.opacityChanged&&ss(t),t.__updateChange()}))}(s),a.forEach((t=>{t.setAfter()})),i.emitEvent(new Ut(n,a)),i.emitEvent(new Ut(r,a)),this.setBlocks(a),this.levelList.reset(),this.updateList=void 0,$.end(e),this.__checkAgain()}fullLayout(){const t=$.start("full layout"),{target:i}=this,{BEFORE_ONCE:s,ONCE:o,AFTER_ONCE:n}=Ut,r=this.getBlocks(new e(i));i.emitEvent(new Ut(s,r)),ps.fullLayout(i),r.forEach((t=>{t.setAfter()})),i.emitEvent(new Ut(o,r)),i.emitEvent(new Ut(n,r)),this.setBlocks(r),$.end(t),this.__checkAgain()}__checkAgain(){this.changed&&this.times<=this.config.partLayout.maxTimes&&this.target.emit(Ut.AGAIN)}createBlock(t){return new hs(t)}getBlocks(t){return[this.createBlock(t)]}setBlocks(t){this.layoutedBlocks?this.layoutedBlocks.push(...t):this.layoutedBlocks=t}static fullLayout(t){if(ds(t),t.__isBranch){const e=[t];cs(t,e),us(e)}else t.__updateWorldBounds();ls(t)}destroy(){this.target&&(this.removeListenEvents(),this.target=void 0)}}class _s{constructor(t,e,i){this.totalTimes=0,this.times=0,this.FPS=60,this.config={maxFPS:60},this._changed=!1,this.target=t,this.canvas=e,i&&(this.config=o.default(i,this.config)),this.listenEvents()}set changed(t){t?this._changed||(this._changed=!0,this.requestRender()):this._changed=!1}get changed(){return this._changed}start(){this.running=!0,this.changed=!0}stop(){this.running=!1}listenEvents(){const{target:t}=this;this.eventIds=[t.on__(Kt.REQUEST,this.onRequest,this),t.on__(Ut.END,this.onLayoutEnd,this),t.on__(Kt.AGAIN,this.renderOnce,this),t.on__(Xt.RESIZE,this.onResize,this)]}removeListenEvents(){this.target.off__(this.eventIds)}onResize(t){if(t.bigger||!t.samePixelRatio){const{width:e,height:i}=t.old;new Y(0,0,e,i).includes(this.target.__world)||(this.target.__updateAttr("fill"),this.changed=!0)}}onRequest(){this.changed=!0}requestLayout(){this.target.emit(Ut.REQUEST)}onLayoutEnd(t){this.layoutedBlocks=t.data}render(t){const{target:e}=this,{START:i,RENDER:s,END:o}=Kt;this.times=0,e.emit(i),this.renderOnce(t),e.emit(s),e.emit(o)}renderOnce(t){const{target:e}=this,{BEFORE_ONCE:i,ONCE:s,AFTER_ONCE:o}=Kt;this.times++,this.totalTimes++,this.changed=!1,t?(e.emit(i),t()):(this.requestLayout(),e.emit(i),this.totalTimes>1?this.layoutedBlocks&&this.partRender():this.fullRender()),e.emit(s),e.emit(o),this.layoutedBlocks&&(this.layoutedBlocks.forEach((t=>{t.destroy()})),this.layoutedBlocks=void 0),this.__checkAgain()}__checkAgain(){this.changed&&this.times<3&&this.target.emit(Kt.AGAIN)}partRender(){const{canvas:t,layoutedBlocks:e}=this;if(e.some((t=>t.updatedBounds.includes(this.target.__world))))this.fullRender(t.bounds);else{let i;e.forEach((e=>{i=e.updatedBounds,t.bounds.hit(i)&&!i.isEmpty()&&this.clipRender(i.getIntersect(t.bounds))}))}}clipRender(t){const e=$.start("part render"),{canvas:i,target:s}=this;i.save(),i.clearBounds(t),V.showRepaint&&i.strokeBounds(t,"red"),i.clipBounds(t),s.__render(i,{bounds:t}),i.restore(),$.end(e)}fullRender(t){const{canvas:e,target:i}=this;_s.fullRender(i,e,t),V.showRepaint&&e.strokeBounds(t||e.bounds,"red")}static fullRender(t,e,i){const s=$.start("full render");i||(i=e.bounds),e.save(),e.clear(),t.__render(e,e.bounds.includes(t.__world)?{}:{bounds:i}),e.restore(),$.end(s)}requestRender(){const t=Date.now();bt.requestRender((()=>{this.changed&&(this.FPS=Math.min(60,Math.ceil(1e3/(Date.now()-t))),this.running&&this.render())}))}destroy(){this.target&&(this.removeListenEvents(),this.target=void 0,this.canvas=void 0,this.config=void 0)}}const{hitRadiusPoint:gs}=N;class vs{constructor(t,e){this.target=t,this.selector=e}getHitPointPath(t,i,s){const o=!!s&&s.through;this.exclude=s?s.exclude:void 0,this.isStop=!1,this.point={x:t.x,y:t.y,radiusX:i,radiusY:i},this.eachFind(this.target.children);const{leaf:n}=this,{defaultPath:r}=this.selector,a=this.getPath(n);let h;if(a.pushList(r.list),o){const t=this.throughPath=new e;this.eachThroughFind(this.target.children),t.pushList(r.list),h={path:a,leaf:n,throughPath:t}}else h={path:a,leaf:n};return this.clear(),h}getPath(t){const i=new e;for(;t;)i.push(t),t=t.parent;return i}eachThroughFind(t){let e;const{point:i}=this;for(let s=t.length-1;s>-1;s--)if(e=t[s],!e.__interactionOff&&gs(e.__world,i)){if(e.__isBranch&&(e.__childrenInteractionOff||this.eachThroughFind(e.children)),this.exclude&&this.exclude.has(e))continue;e.__hitWorld(i)&&this.throughPath.push(e)}}eachFind(t){let e;const{point:i}=this;for(let s=t.length-1;s>-1&&(e=t[s],e.__interactionOff||(gs(e.__world,i)&&(e.__isBranch?(e.__childrenInteractionOff||this.eachFind(e.children),e.__isBranchLeaf&&(this.isStop||this.hitChild(e,i))):this.hitChild(e,i)),!this.isStop));s--);}hitChild(t,e){this.exclude&&this.exclude.has(t)||t.__hitWorld(e)&&(this.leaf=t,this.isStop=!0)}clear(){this.point=void 0,this.leaf=void 0,this.throughPath=void 0,this.exclude=void 0}destroy(){this.target=void 0,this.selector=void 0}}class ys{constructor(t){this.innerIdList={},this.idList={},this.classNameList={},this.tagNameList={},this.target=t,this.defaultPath=new e(t),this.pathFinder=new vs(t,this),this.listenEvents()}listenEvents(){this.eventIds=[this.target.on__(Ft.REMOVE,this.onRemoveChild,this)]}removeListenEvents(){this.target.off__(this.eventIds)}onRemoveChild(t){const e=t.target;this.idList[e.id]&&(this.idList[e.id]=void 0),this.innerIdList[e.id]&&(this.innerIdList[e.innerId]=void 0)}getHitPointPath(t,e,i){return this.pathFinder.getHitPointPath(t,e,i)}find(t,e){return"number"==typeof t?this.getByInnerId(t,e):t.startsWith("#")?this.getById(t.substring(1),e):t.startsWith(".")?this.getByClassName(t.substring(1),e):this.getByTagName(t,e)}getByInnerId(t,e){let i,s=this.innerIdList[t];return s||(e||(e=this.target),this.loopFind(e,(e=>e.innerId===t&&(i=e,this.innerIdList[t]=i,!0))),i)}getById(t,e){let i,s=this.idList[t];return s||(e||(e=this.target),this.loopFind(e,(e=>e.id===t&&(i=e,this.idList[t]=i,!0))),i)}getByClassName(t,e){e||(e=this.target);let i=[];return this.loopFind(e,(e=>(e.className===t&&i.push(e),!1))),i}getByTagName(t,e){e||(e=this.target);let i=[];return this.loopFind(e,(e=>(e.tag===t&&i.push(e),!1))),i}loopFind(t,e){if(e(t))return;const{children:i}=t;for(let s=0,o=i.length;s<o;s++){if(e(t=i[s]))return;t.__isBranch&&this.loopFind(t,e)}}destroy(){this.target&&(this.removeListenEvents(),this.pathFinder.destroy(),this.target=void 0,this.pathFinder=void 0,this.innerIdList=void 0,this.idList=void 0,this.classNameList=void 0,this.tagNameList=void 0)}}function fs(t){return(e,i)=>{t||(t=i);const s={get(){return this.context[t]},set(e){this.context[t]=e}};Object.defineProperty(e,i,s)}}const ms=[];function xs(){return(t,e)=>{ms.push(e)}}class ws{bindContextMethod(){let t;ms.forEach((e=>{t=this.context[e],t&&(this[e]=t.bind(this.context))}))}setTransform(t,e,i,s,o,n){}resetTransform(){}getTransform(){}save(){}restore(){}translate(t,e){}scale(t,e){}rotate(t){}fill(t,e){}stroke(t){}clip(t,e){}fillRect(t,e,i,s){}strokeRect(t,e,i,s){}clearRect(t,e,i,s){}drawImage(t,e,i,s,o,n,r,a,h){switch(arguments.length){case 9:if(e<0){const t=-e/s*a;s+=e,e=0,n+=t,a-=t}if(i<0){const t=-i/o*h;o+=i,i=0,r+=t,h-=t}this.context.drawImage(t,e,i,s,o,n,r,a,h);break;case 5:this.context.drawImage(t,e,i,s,o);break;case 3:this.context.drawImage(t,e,i)}}beginPath(){}moveTo(t,e){}lineTo(t,e){}bezierCurveTo(t,e,i,s,o,n){}quadraticCurveTo(t,e,i,s){}closePath(){}arc(t,e,i,s,o,n){}arcTo(t,e,i,s,o){}ellipse(t,e,i,s,o,n,r,a){}rect(t,e,i,s){}roundRect(t,e,i,s,o){}createConicGradient(t,e,i){}createLinearGradient(t,e,i,s){}createPattern(t,e){}createRadialGradient(t,e,i,s,o,n){}fillText(t,e,i,s){}measureText(t){}strokeText(t,e,i,s){}destroy(){this.context=void 0}}U([fs("imageSmoothingEnabled")],ws.prototype,"smooth",void 0),U([fs("imageSmoothingQuality")],ws.prototype,"smoothLevel",void 0),U([fs("globalAlpha")],ws.prototype,"opacity",void 0),U([fs("globalCompositeOperation")],ws.prototype,"blendMode",void 0),U([fs()],ws.prototype,"fillStyle",void 0),U([fs()],ws.prototype,"strokeStyle",void 0),U([fs("lineWidth")],ws.prototype,"strokeWidth",void 0),U([fs("lineCap")],ws.prototype,"strokeCap",void 0),U([fs("lineJoin")],ws.prototype,"strokeJoin",void 0),U([fs("lineDash")],ws.prototype,"dashPattern",void 0),U([fs("lineDashOffset")],ws.prototype,"dashOffset",void 0),U([fs()],ws.prototype,"miterLimit",void 0),U([fs()],ws.prototype,"shadowBlur",void 0),U([fs()],ws.prototype,"shadowColor",void 0),U([fs()],ws.prototype,"shadowOffsetX",void 0),U([fs()],ws.prototype,"shadowOffsetY",void 0),U([fs()],ws.prototype,"filter",void 0),U([fs()],ws.prototype,"font",void 0),U([fs()],ws.prototype,"fontKerning",void 0),U([fs()],ws.prototype,"fontStretch",void 0),U([fs()],ws.prototype,"fontVariantCaps",void 0),U([fs()],ws.prototype,"textAlign",void 0),U([fs()],ws.prototype,"textBaseline",void 0),U([fs()],ws.prototype,"textRendering",void 0),U([fs()],ws.prototype,"wordSpacing",void 0),U([fs()],ws.prototype,"letterSpacing",void 0),U([fs()],ws.prototype,"direction",void 0),U([xs()],ws.prototype,"setTransform",null),U([xs()],ws.prototype,"resetTransform",null),U([xs()],ws.prototype,"getTransform",null),U([xs()],ws.prototype,"save",null),U([xs()],ws.prototype,"restore",null),U([xs()],ws.prototype,"translate",null),U([xs()],ws.prototype,"scale",null),U([xs()],ws.prototype,"rotate",null),U([xs()],ws.prototype,"fill",null),U([xs()],ws.prototype,"stroke",null),U([xs()],ws.prototype,"clip",null),U([xs()],ws.prototype,"fillRect",null),U([xs()],ws.prototype,"strokeRect",null),U([xs()],ws.prototype,"clearRect",null),U([xs()],ws.prototype,"beginPath",null),U([xs()],ws.prototype,"moveTo",null),U([xs()],ws.prototype,"lineTo",null),U([xs()],ws.prototype,"bezierCurveTo",null),U([xs()],ws.prototype,"quadraticCurveTo",null),U([xs()],ws.prototype,"closePath",null),U([xs()],ws.prototype,"arc",null),U([xs()],ws.prototype,"arcTo",null),U([xs()],ws.prototype,"ellipse",null),U([xs()],ws.prototype,"rect",null),U([xs()],ws.prototype,"roundRect",null),U([xs()],ws.prototype,"createConicGradient",null),U([xs()],ws.prototype,"createLinearGradient",null),U([xs()],ws.prototype,"createPattern",null),U([xs()],ws.prototype,"createRadialGradient",null),U([xs()],ws.prototype,"fillText",null),U([xs()],ws.prototype,"measureText",null),U([xs()],ws.prototype,"strokeText",null);const Bs=V.get("LeaferCanvas"),Es={width:1,height:1,pixelRatio:1};class bs extends ws{constructor(t,e){if(super(),t||(t=Es),this.manager=e,this.innerId=a.create(a.CNAVAS),t.view){const{view:e}=t;let i="string"==typeof e?document.getElementById(e):e;if(i)if(i instanceof HTMLCanvasElement)this.view=i;else{if(i===window||i===document){const t=document.createElement("div"),{style:e}=t;e.position="absolute",e.top=e.bottom=e.left=e.right="0px",e.overflow="hidden",document.body.appendChild(t),i=t}this.view=document.createElement("canvas"),i.appendChild(this.view)}else Bs.error(`can't find view by id: ${e}`)}this.view||(this.view=document.createElement("canvas")),this.pixelRatio=t.pixelRatio,t.webgl||(this.context=this.view.getContext("2d"),this.smooth=!0,t.fill&&(this.view.style.backgroundColor=t.fill),t.width&&t.height&&this.resize(t),this.bindContextMethod())}get pixelWidth(){return this.width*this.pixelRatio}get pixelHeight(){return this.height*this.pixelRatio}debug(){}pixel(t){return t*this.pixelRatio}autoLayout(t,e){const i=i=>{const{x:s,y:o,width:n,height:r}=t.getBoundsFrom(i),{style:a}=this.view;if(a.marginLeft=s+"px",a.marginTop=o+"px",n!==this.width||r!==this.height){const{pixelRatio:t}=this,i={width:n,height:r,pixelRatio:t},s={width:this.width,height:this.height,pixelRatio:this.pixelRatio};this.resize(i),void 0!==this.width&&e(new Xt(i,s))}};this.resizeObserver=new ResizeObserver((t=>{for(const e of t)i(e.contentRect)}));const s=this.view.parentElement;s&&(this.resizeObserver.observe(s),i(s.getBoundingClientRect()))}stopAutoLayout(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}resize(t){const{style:e}=this.view,{width:i,height:s,pixelRatio:o}=t;if(this.isSameSize(t))return;let n;this.context&&this.width&&(n=this.getSameCanvas(),n.copy(this)),Object.assign(this,{width:i,height:s,pixelRatio:o}),this.bounds=new Y(0,0,i,s),e.width=i+"px",e.height=s+"px",this.view.width=i*o,this.view.height=s*o,this.context&&n&&(this.copy(n),n.recycle())}setWorld(t,e,i){const{pixelRatio:s}=this;if(e)if(i)this.setTransform(t.a*s,t.b*s,t.c*s,t.d*s,(t.e+e.e)*s,(t.f+e.f)*s);else{const{a:i,b:o,c:n,d:r,e:a,f:h}=e;this.setTransform((t.a*i+t.b*n)*s,(t.a*o+t.b*r)*s,(t.c*i+t.d*n)*s,(t.c*o+t.d*r)*s,(t.e*i+t.f*n+a)*s,(t.e*o+t.f*r+h)*s)}else this.setTransform(t.a*s,t.b*s,t.c*s,t.d*s,t.e*s,t.f*s)}useSameTransform(t){this.setTransform(t.getTransform())}setStroke(t,e,i){e&&(this.strokeWidth=e),t&&(this.strokeStyle=t),i&&(this.strokeCap=i.strokeCap,this.strokeJoin=i.strokeJoin,this.dashPattern=i.dashPattern,this.miterLimit=i.miterLimit)}setShadow(t,e,i,s){const{pixelRatio:o}=this;this.shadowOffsetX=t*o,this.shadowOffsetY=e*o,this.shadowBlur=i*o,this.shadowColor=s||"black"}setBlur(t){const{pixelRatio:e}=this;this.filter=`blur(${t*e}px)`}hitPath(t,e){return this.context.isPointInPath(t.x,t.y,e)}hitStroke(t){return this.context.isPointInStroke(t.x,t.y)}replaceBy(t,e,i){t.save(),this.blendMode="copy",this.copy(t,e,i),t.restore()}copy(t,e,i,s){if(e){i||(i=e);const{pixelRatio:o}=this;s&&(this.blendMode=s),this.drawImage(t.view,e.x*o,e.y*o,e.width*o,e.height*o,i.x*o,i.y*o,i.width*o,i.height*o),s&&(this.blendMode="normal")}else this.drawImage(t.view,0,0)}copyWorldToLocal(t,e,i,s){const{pixelRatio:o}=this;s&&(this.blendMode=s),e.b||e.c?(this.save(),this.resetTransform(),this.copy(t,e,N.tempTimesMatrix(i,e)),this.restore()):this.drawImage(t.view,e.x*o,e.y*o,e.width*o,e.height*o,i.x,i.y,i.width,i.height),s&&(this.blendMode="normal")}fillBounds(t,e,i){const{pixelRatio:s}=this;i&&(this.blendMode=i),this.fillStyle=e,this.fillRect(t.x*s,t.y*s,t.width*s,t.height*s),i&&(this.blendMode="normal")}strokeBounds(t,e,i){const{pixelRatio:s}=this;i&&(this.blendMode=i),this.strokeStyle=e,this.strokeRect(t.x*s,t.y*s,t.width*s,t.height*s),i&&(this.blendMode="normal")}clearBounds(t){const{pixelRatio:e}=this;this.clearRect(t.x*e,t.y*e,t.width*e,t.height*e)}clipBounds(t){const{pixelRatio:e}=this;this.beginPath(),this.rect(t.x*e,t.y*e,t.width*e,t.height*e),this.clip()}clear(){const{pixelRatio:t}=this;this.clearRect(0,0,this.width*t,this.height*t)}isSameSize(t){return this.width===t.width&&this.height===t.height&&this.pixelRatio===t.pixelRatio}getSameCanvas(t){const{width:e,height:i,pixelRatio:s}=this,o=this.manager.get({width:e,height:i,pixelRatio:s});return o.manager||(o.manager=this.manager),o.save(),t&&o.useSameTransform(this),o}getBiggerCanvas(t,e){let{width:i,height:s,pixelRatio:o}=this;t&&(i+=t),e&&(s+=e);const n=this.manager.get({width:i,height:s,pixelRatio:o});return n.manager||(n.manager=this.manager),n.save(),n}recycle(){this.restore(),this.manager.recycle(this)}destroy(){this.view&&(super.destroy(),this.stopAutoLayout(),this.manager=void 0,this.view&&this.view.parentElement&&this.view.remove(),this.view=void 0,this.bounds=void 0)}}CanvasRenderingContext2D.prototype.roundRect||(CanvasRenderingContext2D.prototype.roundRect=Path2D.prototype.roundRect=function(t,e,i,s,o){let n,r,a,h;if(o instanceof Array)switch(o.length){case 4:n=o[0],r=o[1],a=o[2],h=o[3];break;case 2:n=a=o[0],r=h=o[1];break;case 3:n=o[0],r=h=o[1],a=o[2];break;case 1:o=o[0];break;default:o=0}if(void 0===n){if(!o)return void this.rect(t,e,i,s);n=r=a=h=o}const d=Math.min(i/2,s/2);n>d&&(n=d),r>d&&(r=d),a>d&&(a=d),h>d&&(h=d);const l=this;n?l.moveTo(t+n,e):l.moveTo(t,e),r?l.arcTo(t+i,e,t+i,e+s,r):l.lineTo(t+i,e),a?l.arcTo(t+i,e+s,t,e+s,a):l.lineTo(t+i,e+s),h?l.arcTo(t,e+s,t,e,h):l.lineTo(t,e+s),n?l.arcTo(t,e,t+i,e,n):l.lineTo(t,e),l.closePath()});class Ts{constructor(t){}destory(){}}class Rs{constructor(t){this.interaction=t}move(t){const{interaction:e}=this;if(!this.moveData){const{path:i}=e.selector.getHitPointPath(t,e.hitRadius);t.path=i,this.moveData=Object.assign(Object.assign({},t),{moveX:0,moveY:0}),e.emit(Se.START,this.moveData)}t.path=this.moveData.path,e.emit(Se.MOVE,t),this.transformEndWait()}zoom(t){const{interaction:e}=this;if(!this.zoomData){const{path:i}=e.selector.getHitPointPath(t,e.hitRadius);t.path=i,this.zoomData=Object.assign(Object.assign({},t),{scale:1}),e.emit(Oe.START,this.zoomData)}t.path=this.zoomData.path,e.emit(Oe.ZOOM,t),this.transformEndWait()}rotate(t){const{interaction:e}=this;if(!this.rotateData){const{path:i}=e.selector.getHitPointPath(t,e.hitRadius);t.path=i,this.rotateData=Object.assign(Object.assign({},t),{rotation:0}),e.emit(Me.START,this.rotateData)}t.path=this.rotateData.path,e.emit(Me.ROTATE,t),this.transformEndWait()}transformEndWait(){clearTimeout(this.transformTimer),this.transformTimer=setTimeout((()=>{this.transformEnd()}),this.interaction.config.pointer.transformTime)}transformEnd(){this.moveEnd(),this.zoomEnd(),this.rotateEnd(),this.transformMode=void 0}moveEnd(){this.moveData&&(this.interaction.emit(Se.END,this.moveData),this.moveData=void 0)}zoomEnd(){this.zoomData&&(this.interaction.emit(Oe.END,this.zoomData),this.zoomData=void 0)}rotateEnd(){this.rotateData&&(this.interaction.emit(Me.END,this.rotateData),this.rotateData=void 0)}destroy(){clearTimeout(this.transformTimer),this.transformEnd(),this.interaction=void 0}}const Cs={getMoveEventData:(t,e,i)=>Object.assign(Object.assign({},i),{x:t.x,y:t.y,moveX:e.x,moveY:e.y}),getRotateEventData:(t,e,i)=>Object.assign(Object.assign({},i),{x:t.x,y:t.y,rotation:e}),getZoomEventData:(t,e,i)=>Object.assign(Object.assign({},i),{x:t.x,y:t.y,scale:e}),getDragEventData:(t,e,i)=>Object.assign(Object.assign({},i),{x:i.x,y:i.y,moveX:i.x-e.x,moveY:i.y-e.y,totalX:i.x-t.x,totalY:i.y-t.y}),getDropEventData:(t,e)=>Object.assign(Object.assign({},e),{list:t}),getSwipeDirection:t=>t<-45&&t>-135?De.UP:t>45&&t<135?De.DOWN:t<=45&&t>=-45?De.RIGHT:De.LEFT,getSwipeEventData:(t,e,i)=>Object.assign(Object.assign({},i),{moveX:e.moveX,moveY:e.moveY,totalX:i.x-t.x,totalY:i.y-t.y,type:Ps.getSwipeDirection(B.getAngle(t,i))}),getBase:t=>({altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,buttons:void 0===t.buttons?1:t.buttons}),pathHasEventType(t,e){const{list:i}=t;for(let t=0,s=i.length;t<s;t++)if(i[t].hasEvent(e))return!0;return!1},filterPathByEventType(t,i){const s=new e,{list:o}=t;for(let t=0,e=o.length;t<e;t++)o[t].hasEvent(i)&&s.push(o[t]);return s}},Ps=Cs,{getDragEventData:Ls,getDropEventData:ks,getSwipeEventData:Ss,filterPathByEventType:Ms}=Cs;class Ds{constructor(t){this.interaction=t}setDragData(t){this.dragData=Ls(t,t,t)}getDragList(){return this.dragging?ke.dragList||this.dragList:void 0}checkDrag(t,e){const{interaction:i}=this,{downData:s}=i;if(this.moving&&!Te.middle(t)&&!Te.left(t))return void i.pointerCancel();const{dragData:o}=this;this.moving||(this.moving=(Te.middle(t)||be.isHoldSpaceKey())&&e,this.moving&&i.emit(Se.START,o)),this.moving||this.dragStart(t,e);const{path:n,throughPath:r}=s;this.dragData=Ls(s,o,t),r&&(this.dragData.throughPath=r),this.dragData.path=n,this.moving?i.emit(Se.MOVE,this.dragData):this.dragging&&(i.emit(Pe.DRAG,this.dragData),this.dragDragableList())}dragStart(t,e){this.dragging||(this.dragging=Te.left(t)&&e,this.dragging&&(this.interaction.emit(Pe.START,this.dragData),this.dragList=Ms(this.dragData.path,Pe.DRAG),this.getDragableList(this.dragData.path)))}getDragableList(t){let e;for(let i=0,s=t.length;i<s;i++)if(e=t.list[i],e.draggable){this.dragableList=[e];break}}dragDragableList(){if(this.dragableList){const{moveX:t,moveY:e}=this.dragData;this.dragableList.forEach((i=>{he.moveByWorld(i,t,e)}))}}dropEnterOrLeave(t){const{interaction:e}=this,{dropEnterPath:i}=this,{path:s}=t;e.emit(ke.ENTER,t,s,i),e.emit(ke.LEAVE,t,i,s),this.dropEnterPath=s}dragEnd(t){const{interaction:e}=this,{downData:i}=e;if(!i)return;const{path:s,throughPath:o}=i,n=Ls(i,t,t);o&&(n.throughPath=o),n.path=s,this.moving&&e.emit(Se.END,n),this.dragging&&(e.emit(Pe.END,n),this.swipe(t,n),this.drop(t)),this.autoMoveCancel(),this.dragReset()}swipe(t,e){const{interaction:i}=this,{downData:s}=i;if(B.getDistance(s,t)>i.config.pointer.swipeDistance){const t=Ss(s,this.dragData,e);this.interaction.emit(t.type,t)}}drop(t){const e=ks(this.getDragList(),t);e.path=this.dropEnterPath,this.interaction.emit(ke.DROP,e),this.interaction.emit(ke.LEAVE,t,this.dropEnterPath)}dragReset(){ke.dragList=void 0,this.dragList=void 0,this.dragableList=void 0,this.dragData=void 0,this.dropEnterPath=void 0,this.dragging=void 0,this.moving=void 0}checkDragOut(t){const{interaction:e}=this;this.autoMoveCancel(),this.dragging&&!e.shrinkCanvasBounds.hitPoint(t)&&this.autoMoveOnDragOut(t)}autoMoveOnDragOut(t){const{interaction:e}=this,{downData:i}=e,{autoMoveDistance:s}=e.config.pointer;if(!s)return;const o=e.shrinkCanvasBounds,{x:n,y:r}=o,a=N.right(o),h=N.bottom(o),d=t.x<n?s:a<t.x?-s:0,l=t.y<r?s:h<t.y?-s:0;let c=0,u=0;this.autoMoveTimer=setInterval((()=>{c+=d,u+=l,N.move(i,d,l),N.move(this.dragData,d,l),e.move(Object.assign(Object.assign({},t),{moveX:d,moveY:l,totalX:c,totalY:u})),e.pointerMoveReal(t)}),10)}autoMoveCancel(){this.autoMoveTimer&&(clearInterval(this.autoMoveTimer),this.autoMoveTimer=0)}destroy(){this.interaction=void 0,this.dragableList=void 0}}const{pathHasEventType:Os}=Cs;class As{constructor(t,e,i,s){this.config={wheel:{zoomMode:!1,zoomSpeed:.5,moveSpeed:.5,rotateSpeed:.5,delta:{x:20,y:8}},pointer:{hitRadius:5,through:!1,clickTime:120,longPressTime:800,transformTime:500,dragDistance:2,swipeDistance:20,autoMoveDistance:2}},this.clickCount=0,this.target=t,this.canvas=e,this.selector=i,this.transformer=new Rs(this),this.dragger=new Ds(this),s&&(this.config=o.default(s,this.config)),this.listenEvents()}get hitRadius(){return this.config.pointer.hitRadius}start(){this.running=!0}stop(){this.running=!1}listenEvents(){const{target:t}=this;this.eventIds=[t.on__(Xt.RESIZE,this.onResize,this)]}removeListenEvents(){this.target.off__(this.eventIds)}onResize(){this.shrinkCanvasBounds=new Y(this.canvas.bounds),this.shrinkCanvasBounds.spread(-2)}pointerDown(t){this.emit(Ce.BEFORE_DOWN,t,this.selector.defaultPath);const{hitRadius:e,through:i}=this.config.pointer,s=this.selector.getHitPointPath(t,e,{through:i});s.throughPath&&(t.throughPath=s.throughPath),t.path=s.path,this.emit(Ce.DOWN,t),this.downData=t,this.downTime=Date.now(),this.dragger.setDragData(t),Te.left(t)&&(this.tapWait(),this.longPressWait(t))}pointerMove(t){(this.downData||this.canvas.bounds.hitPoint(t))&&(this.pointerMoveReal(t),this.dragger.checkDragOut(t))}pointerMoveReal(t){if(this.emit(Ce.BEFORE_MOVE,t,this.selector.defaultPath),this.downData){const e=B.getDistance(this.downData,t)>this.config.pointer.dragDistance;this.waitTap&&e&&this.pointerWaitCancel(),this.dragger.checkDrag(t,e)}if(this.dragger.moving||this.pointerMoveIgnore)return;const e=this.selector.getHitPointPath(t,this.hitRadius,{exclude:this.dragger.getDragList()});t.path=e.path,this.emit(Ce.MOVE,t),this.pointerEnterOrLeave(t),this.dragger.dragging&&this.dragger.dropEnterOrLeave(t)}pointerUp(t){if(!this.downData)return;this.emit(Ce.BEFORE_UP,t,this.selector.defaultPath);const{through:e}=this.config.pointer,i=this.selector.getHitPointPath(t,this.hitRadius,{through:e});i.throughPath&&(t.throughPath=i.throughPath),t.path=i.path,this.emit(Ce.UP,t),this.emit(Ce.UP,this.downData,void 0,t.path),this.touchLeave(t),this.tap(t),this.longTap(t),this.dragger.dragEnd(t),this.downData=void 0}pointerCancel(){this.pointerUp(this.dragger.dragData)}pointerEnterOrLeave(t){if(this.dragger.moving||this.dragger.dragging)return;const{path:e}=t;this.emit(Ce.ENTER,t,e,this.enterPath),this.emit(Ce.LEAVE,t,this.enterPath,e),this.enterPath=e}touchLeave(t){"touch"===t.pointerType&&this.enterPath&&(this.emit(Ce.LEAVE,t),this.dragger.dragging&&this.emit(ke.LEAVE,t))}tap(t){if(!this.waitTap)return;this.clickCount||this.emit(Ce.TAP,t);Date.now()-this.downTime<this.config.pointer.clickTime+50&&Os(t.path,Ce.DOUBLE_CLICK)?(this.clickCount++,2===this.clickCount?(this.tapWaitCancel(),this.emit(Ce.DOUBLE_CLICK,t)):(clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout((()=>{this.tapWaitCancel(),this.emit(Ce.CLICK,t)}),this.config.pointer.clickTime))):(this.tapWaitCancel(),this.emit(Ce.CLICK,t))}pointerWaitCancel(){this.tapWaitCancel(),this.longPressWaitCancel()}tapWait(){clearTimeout(this.clickTimer),this.waitTap=!0}tapWaitCancel(){clearTimeout(this.clickTimer),this.waitTap=!1,this.clickCount=0}longPressWait(t){clearTimeout(this.longPressTimer),this.longPressTimer=window.setTimeout((()=>{this.longPressed=!0,this.emit(Ce.LONG_PRESS,t)}),this.config.pointer.longPressTime)}longTap(t){this.longPressed&&this.emit(Ce.LONG_TAP,t),this.longPressWaitCancel()}longPressWaitCancel(){clearTimeout(this.longPressTimer),this.longPressed=void 0}move(t){this.transformer.move(t)}zoom(t){this.transformer.zoom(t)}rotate(t){this.transformer.rotate(t)}transformEnd(){this.transformer.transformEnd()}emit(t,e,i,s){this.running&&function(t,e,i,s){if(!i&&!e.path)return;let o;e.type=t,i?e=Object.assign(Object.assign({},e),{path:i}):i=e.path,e.target=i.indexAt(0);for(let n=i.length-1;n>-1;n--)if(o=i.list[n],o.hasEvent(t,!0)&&(!s||!s.has(o))){e.phase=1;const i=St.event(t,e);if(o.emitEvent(i,!0),i.isStop)return}for(let n=0,r=i.length;n<r;n++)if(o=i.list[n],o.hasEvent(t,!1)&&(!s||!s.has(o))){e.phase=o===e.target?2:3;const i=St.event(t,e);if(o.emitEvent(i),i.isStop)return}}(t,e,i,s)}destroy(){this.target&&(this.running=!1,this.removeListenEvents(),this.dragger.destroy(),this.transformer.destroy(),this.config=void 0,this.target=void 0,this.selector=void 0,this.canvas=void 0,this.dragger=void 0,this.transformer=void 0)}}const Ws={convert(t,e){const i=Cs.getBase(t),s=Object.assign(Object.assign({},i),{x:e.x,y:e.y,width:t.width,height:t.height,pointerType:t.pointerType,pressure:t.pressure});return"pen"===s.pointerType&&(s.tangentialPressure=t.tangentialPressure,s.tiltX=t.tiltX,s.tiltY=t.tiltY,s.twist=t.twist),s},convertMouse(t,e){const i=Cs.getBase(t);return Object.assign(Object.assign({},i),{x:e.x,y:e.y,width:1,height:1,pointerType:"mouse",pressure:.5})},convertTouch(t,e){const i=Ws.getTouch(t),s=Cs.getBase(t);return Object.assign(Object.assign({},s),{x:e.x,y:e.y,width:1,height:1,pointerType:"touch",pressure:i.force})},getTouch:t=>t.targetTouches[0]||t.changedTouches[0]},Is={getData(t,e){const i=B.getCenter(t[0],t[1]),s=B.getCenter(e[0],e[1]),o={x:s.x-i.x,y:s.y-i.y},n=B.getDistance(t[0],t[1]),r=B.getDistance(e[0],e[1])/n,a=B.getAngle(t[0],t[1]),h=B.getAngle(e[0],e[1]);return{move:o,scale:r,angle:this.getChangedAngle(a,h),center:s}},getTouches(t){const e=[];for(let i=0,s=t.length;i<s;i++)e.push(t[i]);return e},getChangedAngle(t,e){const i=(e=e<=-90?360+e:e)-(t=t<=-90?360+t:t);return i<0?i+360:i}};let Ns=0;const zs={getMove:(t,e)=>({x:-t.deltaX*e.moveSpeed*2,y:-t.deltaY*e.moveSpeed*2}),getScale(t,e){let i,s=1,{zoomMode:o,zoomSpeed:n}=e;const r=t.deltaY||t.deltaX;if(o){const e=t.mozInputSource&&t.deltaY%18==0;e?Ns++:Ns=0,i=(Math.floor(t.deltaY)!==t.deltaY||e&&Ns>2)&&0===t.deltaX,(t.shiftKey||t.metaKey||t.ctrlKey)&&(i=!0)}else i=!t.shiftKey&&(t.metaKey||t.ctrlKey);if(i){n=d.within(n,0,1);s=1-r/(25*(t.deltaY?e.delta.y:e.delta.x)*(1-n)+10),s<.5&&(s=.5),s>=1.5&&(s=1.5)}return s}},{getMoveEventData:Fs,getZoomEventData:js,getRotateEventData:Ys}=Cs;class Xs extends As{listenEvents(){super.listenEvents();const t=this.view=this.canvas.view;this.onResize(),this.viewEvents={pointerdown:this.onPointerDown.bind(this),mousedown:this.onMouseDown.bind(this),touchstart:this.onTouchStart.bind(this),wheel:this.onWheel.bind(this),gesturestart:this.onGesturestart.bind(this),gesturechange:this.onGesturechange.bind(this),gestureend:this.onGestureend.bind(this)},this.windowEvents={pointermove:this.onPointerMove.bind(this),pointerup:this.onPointerUp.bind(this),pointercancel:this.onPointerCancel.bind(this),mousemove:this.onMouseMove.bind(this),mouseup:this.onMouseUp.bind(this),touchmove:this.onTouchMove.bind(this),touchend:this.onTouchEnd.bind(this),touchcancel:this.onTouchCancel.bind(this),keydown:this.onKeyDown.bind(this),keyup:this.onKeyUp.bind(this)};for(let e in this.viewEvents)t.addEventListener(e,this.viewEvents[e]);for(let t in this.windowEvents)window.addEventListener(t,this.windowEvents[t]);window.oncontextmenu=function(t){return!1}}removeListenEvents(){super.removeListenEvents();for(let t in this.viewEvents)this.view.removeEventListener(t,this.viewEvents[t]),this.viewEvents={};for(let t in this.windowEvents)window.removeEventListener(t,this.windowEvents[t]),this.windowEvents={}}onResize(){super.onResize(),this.clientBounds=new Y(this.view.getBoundingClientRect())}getLocal(t){return{x:t.clientX-this.clientBounds.x,y:t.clientY-this.clientBounds.y}}onKeyDown(t){be.setDownCode(t.code)}onKeyUp(t){be.setUpCode(t.code)}onPointerDown(t){this.usePointer||(this.usePointer=!0),this.useMutiTouch||(t.preventDefault(),this.pointerDown(Ws.convert(t,this.getLocal(t))))}onPointerMove(t){this.usePointer||(this.usePointer=!0),this.useMutiTouch||this.pointerMove(Ws.convert(t,this.getLocal(t)))}onPointerUp(t){this.useMutiTouch||(t.preventDefault(),this.pointerUp(Ws.convert(t,this.getLocal(t))))}onPointerCancel(){this.useMutiTouch||this.pointerCancel()}onMouseDown(t){this.useTouch||this.usePointer||(t.preventDefault(),this.pointerDown(Ws.convertMouse(t,this.getLocal(t))))}onMouseMove(t){this.useTouch||this.usePointer||this.pointerMove(Ws.convertMouse(t,this.getLocal(t)))}onMouseUp(t){this.useTouch||this.usePointer||(t.preventDefault(),this.pointerUp(Ws.convertMouse(t,this.getLocal(t))))}onMouseCancel(){this.useTouch||this.usePointer||this.pointerCancel()}onTouchStart(t){if(t.preventDefault(),this.mutiTouchStart(t),this.usePointer)return;this.touchTimer&&(window.clearTimeout(this.touchTimer),this.touchTimer=0),this.useTouch=!0;const e=Ws.getTouch(t);this.pointerDown(Ws.convertTouch(t,this.getLocal(e)))}onTouchMove(t){if(this.mutiTouchMove(t),this.usePointer)return;const e=Ws.getTouch(t);this.pointerMove(Ws.convertTouch(t,this.getLocal(e)))}onTouchEnd(t){if(t.preventDefault(),this.mutiTouchEnd(),this.usePointer)return;this.touchTimer&&clearTimeout(this.touchTimer),this.touchTimer=window.setTimeout((()=>{this.useTouch=!1}),500);const e=Ws.getTouch(t);this.pointerUp(Ws.convertTouch(t,this.getLocal(e)))}onTouchCancel(){this.usePointer||this.pointerCancel()}mutiTouchStart(t){this.useMutiTouch=t.touches.length>=2,this.touches=this.useMutiTouch?Is.getTouches(t.touches):void 0,this.useMutiTouch&&this.pointerCancel()}mutiTouchMove(t){if(this.useMutiTouch&&t.touches.length>=2){const e=Is.getTouches(t.touches),i=e.find((t=>t.identifier===this.touches[0].identifier)),s=e.find((t=>t.identifier===this.touches[1].identifier));if(i&&s){const o=[this.getLocal(this.touches[0]),this.getLocal(this.touches[1])],n=[this.getLocal(i),this.getLocal(s)],{move:r,angle:a,scale:h,center:d}=Is.getData(o,n),l=Cs.getBase(t);this.rotate(Ys(d,a,l)),this.zoom(js(d,h,l)),this.move(Fs(d,r,l)),this.touches=e}}}mutiTouchEnd(){this.touches=void 0,this.useMutiTouch=!1,this.transformEnd()}onWheel(t){t.preventDefault();const{wheel:e}=this.config,i=e.getScale?e.getScale(t,e):zs.getScale(t,e),s=this.getLocal(t),o=Cs.getBase(t);1!==i?this.zoom(js(s,i,o)):this.move(Fs(s,e.getMove?e.getMove(t,e):zs.getMove(t,e),o))}onGesturestart(t){t.preventDefault(),this.lastGestureScale=1,this.lastGestureRotation=0}onGesturechange(t){t.preventDefault();const e=this.getLocal(t),i=Cs.getBase(t),s=t.scale/this.lastGestureScale,o=t.rotation-this.lastGestureRotation;let{rotateSpeed:n}=this.config.wheel;n=d.within(n,0,1),this.zoom(js(e,s*s,i)),this.rotate(Ys(e,o/Math.PI*180*(n/4+.1),i)),this.lastGestureScale=t.scale,this.lastGestureRotation=t.rotation}onGestureend(t){t.preventDefault(),this.transformEnd()}destroy(){this.view&&(super.destroy(),this.view=void 0,this.touches=void 0)}}function Hs(t){return(e,i)=>{tt(e,i,{get(){return this.__get(i)},set(t){this.root?this.__set(i,t):this.__[i]=t,this.__layout.renderBoundsChanged||this.__layout.renderBoundsChange(),this.__.__useEffect||(this.__.__useEffect=!0)}}),vt(e,i,t)}}Object.assign(St,{canvas:(t,e)=>new bs(t,e),image:t=>new Ts(t),hitCanvas:(t,e)=>new bs(t,e),watcher:t=>new es(t),layouter:t=>new ps(t),renderer:(t,e,i)=>new _s(t,e,i),selector:t=>new ys(t),interaction:(t,e,i,s)=>new Xs(t,e,i,s)}),bt.requestRender=function(t){window.requestAnimationFrame(t)},bt.canvas=St.canvas();class Gs extends r{setBorderWidth(t){"number"==typeof t&&(this._strokeWidth=t),this._borderWidth=t}setFill(t){"string"==typeof t?(this._fill=t,this.__isFills&&(this.__isFills=!1)):t instanceof Array?(this._fill=t,this.__isFills=!0):"object"==typeof t?(this._fill=[t],this.__isFills=!0):(this._fill=t,this.__isFills&&(this.__isFills=!1))}setStroke(t){"string"==typeof t?(this._stroke=t,this.__isStrokes&&(this.__isStrokes=!1)):t instanceof Array?(this._stroke=t,this.__isStrokes=!0):"object"==typeof t?(this._stroke=[t],this.__isStrokes=!0):(this._stroke=t,this.__isStrokes&&(this.__isStrokes=!1))}setShadow(t){this._shadow=t instanceof Array?t:[t]}setInnerShadow(t){this._innerShadow=t instanceof Array?t:[t]}}class Us extends Gs{}const{parse:Ks}=Bi;const{copyAndSpread:Vs}=N,qs={__updateEventBounds(){Vs(this.__layout.eventBounds,this.__layout.boxBounds,this.__layout.eventBoundsSpreadWidth)},__updateRenderBounds(){Vs(this.__layout.renderBounds,this.__layout.eventBounds,this.__layout.renderBoundsSpreadWidth)},__updateEventBoundsSpreadWidth(){let t=0;const{stroke:e,strokeAlign:i}=this.__;if(e&&"inside"!==i){const{strokeWidth:e,miterLimit:s,path:o}=this.__,n=o?1/Math.sin(s*l/2)*Math.sqrt(e):0;t="center"===i?e/2:e,this.__.__strokeOuterWidth=t,n&&(t+=n-t)}return t||(this.__.__strokeOuterWidth=0),t},__updateRenderBoundsSpreadWidth(){let t=0;const{shadow:e,innerShadow:i,blur:s,backgroundBlur:o}=this.__;e&&e.forEach((e=>{t=Math.max(t,Math.max(Math.abs(e.y),Math.abs(e.x))+(e.spread>0?e.spread:0)+1.5*e.blur)})),s&&(t=Math.max(t,s));let n=t=Math.ceil(t);return i&&i.forEach((t=>{n=Math.max(n,Math.max(Math.abs(t.y),Math.abs(t.x))+(t.spread<0?-t.spread:0)+1.5*t.blur)})),o&&(n=Math.max(n,o)),this.__layout.renderShapeBoundsSpreadWidth=n,t}},Qs={__hit(t){if(this.__.fill&&this.__hitCanvas.hitPath(t,this.__.windingRule))return!0;const e=2*((this.__.__strokeOuterWidth||0)+t.radiusX);if(e){const{__hitCanvas:i}=this;if(i.strokeWidth!==e&&(i.strokeWidth=e,i.stroke()),i.hitStroke(t))return!0}return!1}},Zs={},$s={},Js={},to={};function eo(t,e){t.forEach((t=>{e.strokeStyle=t.style,e.stroke()}))}var io=Object.freeze({__proto__:null,fill:function(t,e,i){e.fillStyle=i,e.fill(t.__.windingRule)},fills:function(t,e,i){let s;const{windingRule:o}=t.__;for(let t=0,n=i.length;t<n;t++)s=i[t],e.fillStyle=s.style,e.fill(o)},stroke:function(t,e,i){const s=t.__,{strokeWidth:o,strokeAlign:n}=s;switch(n){case"center":e.setStroke(void 0,o,s),e.strokeStyle=i,e.stroke();break;case"inside":e.save(),e.setStroke(void 0,2*o,s),e.clip(s.windingRule),e.strokeStyle=i,e.stroke(),e.restore();break;case"outside":const n=e.getSameCanvas(!0);t.__drawRenderPath(n),n.setStroke(void 0,2*o,t.__),n.strokeStyle=i,n.stroke(),n.clip(s.windingRule),n.clearBounds(t.__layout.renderBounds),e.copyWorldToLocal(n,t.__world,t.__layout.renderBounds),n.recycle()}},strokes:function(t,e,i){const s=t.__,{strokeWidth:o,strokeAlign:n}=s;switch(n){case"center":e.setStroke(void 0,o,s),eo(i,e);break;case"inside":e.save(),e.setStroke(void 0,2*o,s),e.clip(s.windingRule),eo(i,e),e.restore();break;case"outside":const{renderBounds:n}=t.__layout,r=e.getSameCanvas(!0);t.__drawRenderPath(r),r.setStroke(void 0,2*o,t.__),eo(i,r),r.clip(s.windingRule),r.clearBounds(n),e.copyWorldToLocal(r,t.__world,n),r.recycle()}}});Object.assign($s,io);const so={__updateChange(){let t=this.__;t.__isFills||t.__isStrokes||t.borderRadius||t.__useEffect?this.__complex||(this.__complex=!0):this.__complex&&(this.__complex=!1)},__drawFast(t,e){const{fill:i,stroke:s}=this.__;this.__drawRenderPath(t),i&&$s.fill(this,t,i),s&&$s.stroke(this,t,s)},__draw(t,e){const{fill:i,stroke:s}=this.__;this.__drawRenderPath(t),i&&(this.__.__isFills?$s.fills(this,t,i):$s.fill(this,t,i)),s&&(this.__.__isStrokes?$s.strokes(this,t,s):$s.stroke(this,t,s))}},oo={__render(t,e){const{fill:i,stroke:s}=this.__;s&&(this.__.stroke=void 0),this.__renderRect(t,e);const{clip:o}=this.__;o?(t.save(),t.clip(),this.__renderGroup(t,e),t.restore()):this.__renderGroup(t,e),s&&(this.__.stroke=s,i&&(this.__.fill=void 0),this.__renderRect(t,e),i&&(this.__.fill=i))}},no={__drawFast(t,e){const{width:i,height:s,fill:o,stroke:n}=this.__;if(o&&(t.fillStyle=o,t.fillRect(0,0,i,s)),n){const{strokeAlign:e,strokeWidth:o}=this.__;t.setStroke(n,o,this.__);const r=o/2;switch(e){case"center":t.strokeRect(0,0,i,s);break;case"inside":t.strokeRect(r,r,i-o,s-o);break;case"outside":t.strokeRect(-r,-r,i+o,s+o)}}}},ro={__drawFast(t,e){const{fill:i,stroke:s,content:o,__font:n}=this.__;t.font=n,i&&(t.fillStyle=i,t.fillText(o,0,0)),s&&(t.strokeStyle=s,t.strokeText(o,0,0))}};ro.__draw=ro.__drawFast;let ao=class extends ae{get worldTransform(){return this.__layout.getTransform("world")}get relativeTransform(){return this.__layout.getTransform("relative")}get worldBoxBounds(){return this.__layout.getBounds("world","box")}get worldRenderBounds(){return this.__layout.getBounds("world","render")}__updateRenderPath(){const{__:t}=this,{cornerRadius:e,path:i}=t;t.__renderPath=e&&i?Wi.applyCorner(i,e,t.cornerSmoothing):i}__drawRenderPath(t){t.beginPath(),this.__drawPathByData(t,this.__.__renderPath)}__drawPath(t){t.beginPath(),this.__drawPathByData(t,this.__.path)}__drawPathByData(t,e){}};U([_t(Gs)],ao.prototype,"__",void 0),U([st("")],ao.prototype,"id",void 0),U([st("")],ao.prototype,"name",void 0),U([st("")],ao.prototype,"className",void 0),U([ut(1)],ao.prototype,"opacity",void 0),U([ut(!0)],ao.prototype,"visible",void 0),U([pt(0)],ao.prototype,"zIndex",void 0),U([ot(0)],ao.prototype,"x",void 0),U([ot(0)],ao.prototype,"y",void 0),U([at(100)],ao.prototype,"width",void 0),U([at(100)],ao.prototype,"height",void 0),U([nt(1)],ao.prototype,"scaleX",void 0),U([nt(1)],ao.prototype,"scaleY",void 0),U([rt(0)],ao.prototype,"rotation",void 0),U([rt(0)],ao.prototype,"skewX",void 0),U([rt(0)],ao.prototype,"skewY",void 0),U([ct()],ao.prototype,"blendMode",void 0),U([at()],ao.prototype,"mask",void 0),U([st()],ao.prototype,"locked",void 0),U([ct()],ao.prototype,"fill",void 0),U([ht()],ao.prototype,"borderRadius",void 0),U([dt(1)],ao.prototype,"borderWidth",void 0),U([dt()],ao.prototype,"stroke",void 0),U([dt("center")],ao.prototype,"strokeAlign",void 0),U([dt(1)],ao.prototype,"strokeWidth",void 0),U([ct("none")],ao.prototype,"strokeCap",void 0),U([ct("miter")],ao.prototype,"strokeJoin",void 0),U([ct()],ao.prototype,"dashPattern",void 0),U([ct()],ao.prototype,"dashOffset",void 0),U([ct(10)],ao.prototype,"miterLimit",void 0),U([ht()],ao.prototype,"cornerRadius",void 0),U([ht()],ao.prototype,"cornerSmoothing",void 0),U([Hs()],ao.prototype,"shadow",void 0),U([Hs()],ao.prototype,"innerShadow",void 0),U([Hs()],ao.prototype,"blur",void 0),U([Hs()],ao.prototype,"backgroundBlur",void 0),U([Hs()],ao.prototype,"grayscale",void 0),U([xt(Wi.drawData)],ao.prototype,"__drawPathByData",null),ao=U([Et(qs),Et(Qs),Et(so),wt()],ao);let ho=class extends ao{constructor(t){super(t),this.__isBranch=!0,this.children=[]}__updatePath(){}add(t,e){}addAt(t,e){this.add(t,e)}addAfter(t,e){this.add(t,this.children.indexOf(e)+1)}addBefore(t,e){this.add(t,this.children.indexOf(e))}remove(t){}};U([_t(Us)],ho.prototype,"__",void 0),ho=U([Et(Be),Mt()],ho);let lo=class extends ao{constructor(t){super(t)}__updatePath(){}__drawPathByData(t,e){const{width:i,height:s,borderRadius:o}=this.__;o?t.roundRect(0,0,i,s,o):t.rect(0,0,i,s)}};U([_t(class extends Gs{})],lo.prototype,"__",void 0),lo=U([Et(no),Mt()],lo);const co=lo.prototype,uo=ho.prototype,po={},{copy:_o,add:go}=N;let vo=class extends ho{constructor(t){super(t),this.fill||(this.fill="#FFFFFF"),this.__isBranchLeaf=!0}__drawPathByData(t,e){}__updateBoxBounds(){if(this.__updateRectBoxBounds(),!this.__.clip){const{boxBounds:t}=this.__layout;_o(po,t),super.__updateBoxBounds(),go(t,po)}}__updateEventBounds(){if(this.__updateRectEventBounds(),!this.__.clip){const{eventBounds:t}=this.__layout;_o(po,t),super.__updateEventBounds(),go(t,po)}}__updateRenderBounds(){if(this.__updateRectRenderBounds(),!this.__.clip){const{renderBounds:t}=this.__layout;_o(po,t),super.__updateRenderBounds(),go(t,po)}}__updateRectBoxBounds(){}__updateRectEventBounds(){}__updateRectRenderBounds(){}__renderRect(t,e){}__renderGroup(t,e){}};U([_t(class extends Us{})],vo.prototype,"__",void 0),U([at(!0)],vo.prototype,"clip",void 0),U([xt(co.__drawPathByData)],vo.prototype,"__drawPathByData",null),U([xt(co.__updateBoxBounds)],vo.prototype,"__updateRectBoxBounds",null),U([xt(co.__updateEventBounds)],vo.prototype,"__updateRectEventBounds",null),U([xt(co.__updateRenderBounds)],vo.prototype,"__updateRectRenderBounds",null),U([xt(co.__render)],vo.prototype,"__renderRect",null),U([xt(uo.__render)],vo.prototype,"__renderGroup",null),vo=U([Et(oo),wt(),Mt()],vo);const{PI:yo}=Math,{begin:fo,moveTo:mo,close:xo,ellipse:wo}=Vi;let Bo=class extends ao{constructor(t){super(t)}__updatePath(){const{width:t,height:e,innerRadius:i,startAngle:s,endAngle:o}=this.__,n=t/2,r=e/2;fo(this.__.path=[]),i?s||o?(wo(n,r,n*(1-i),r*(1-i),0,s*l,o*l,!1),wo(n,r,n,r,0,o*l,s*l,!0),xo()):(wo(n,r,n*(1-i),r*(1-i),0,0,2*yo,!1),mo(t,r),wo(n,r,n,r,0,0,2*yo,!0)):s||o?(mo(n,r),wo(n,r,n,r,0,s*l,o*l,!1),xo()):wo(n,r,n,r,0,0,2*yo,!1)}};U([_t(class extends Gs{})],Bo.prototype,"__",void 0),U([ht(0)],Bo.prototype,"innerRadius",void 0),U([ht(0)],Bo.prototype,"startAngle",void 0),U([ht(0)],Bo.prototype,"endAngle",void 0),Bo=U([Mt()],Bo);const{sin:Eo,cos:bo,PI:To}=Math,{begin:Ro,moveTo:Co,lineTo:Po,close:Lo}=Vi;let ko=class extends ao{constructor(t){super(t)}__updatePath(){const{width:t,height:e,sides:i}=this.__,s=t/2,o=e/2;Ro(this.__.path=[]),Co(s,0);for(let t=1;t<i;t++)Po(s+s*Eo(2*t*To/i),o-o*bo(2*t*To/i));Lo()}};U([_t(class extends Gs{})],ko.prototype,"__",void 0),U([ht(3)],ko.prototype,"sides",void 0),ko=U([Mt()],ko);const{sin:So,cos:Mo,PI:Do}=Math,{begin:Oo,moveTo:Ao,lineTo:Wo,close:Io}=Vi;let No=class extends ao{constructor(t){super(t)}__updatePath(){const{width:t,height:e,points:i,innerRadius:s}=this.__,o=t/2,n=e/2;Oo(this.__.path=[]),Ao(o,0);for(let t=1;t<2*i;t++)Wo(o+(t%2==0?o:o*s)*So(t*Do/i),n-(t%2==0?n:n*s)*Mo(t*Do/i));Io()}};U([_t(class extends Gs{})],No.prototype,"__",void 0),U([ht(5)],No.prototype,"points",void 0),U([ht(.38)],No.prototype,"innerRadius",void 0),No=U([Mt()],No);const{begin:zo,moveTo:Fo,lineTo:jo,end:Yo}=Vi,{rotate:Xo,getAngle:Ho,getDistance:Go,defaultPoint:Uo}=B,{setPoint:Ko,addPoint:Vo,toBounds:qo}=R,Qo={};let Zo=class extends ao{constructor(t){super(t)}get toPoint(){if(this.__to&&!this.__layout.boxBoundsChanged)return this.__to;const{width:t,height:e,rotation:i}=this.__,s={x:0,y:0};return t&&(s.x=t),e&&(s.y=e),i&&Xo(s,i),this.__to=s,s}set toPoint(t){this.width=Go(Uo,t),this.rotation=Ho(Uo,t),this.height&&(this.height=0)}__updatePath(){zo(this.__.path=[]),Fo(0,0);const t=this.toPoint;jo(t.x,t.y),Yo()}__updateBoxBounds(){Ko(Qo,0,0),Vo(Qo,this.__to.x,this.__to.y),qo(Qo,this.__layout.boxBounds)}};U([_t(class extends Gs{})],Zo.prototype,"__",void 0),U([at()],Zo.prototype,"rotation",void 0),Zo=U([Mt()],Zo);const{toTwoPointBounds:$o}=Wi,{toBounds:Jo}=R,tn={};let en=class extends ao{constructor(t){super(t)}__drawRenderPath(t){t.beginPath(),this.__drawPathByData(t,this.__.path)}__updateBoxBounds(){$o(this.__.path,tn),Jo(tn,this.__layout.boxBounds)}};U([_t(class extends Gs{setPath(t){this._path="string"==typeof t?Ks(t):t}})],en.prototype,"__",void 0),U([ht()],en.prototype,"path",void 0),U([ht()],en.prototype,"windingRule",void 0),en=U([Mt()],en);let sn=class extends ho{constructor(t){super(t)}__updatePath(){}};U([_t(class extends Gs{})],sn.prototype,"__",void 0),U([ht()],sn.prototype,"paths",void 0),sn=U([Mt()],sn);let on=class extends ao{constructor(t){super(t)}__updatePath(){}__drawPathByData(t,e){const{width:i,height:s}=this.__;t.rect(0,0,i,s)}__updateBoxBounds(){const{fontFamily:t,fontSize:e,fontWeight:i,italic:s,textCase:o,lineHeight:n}=this.__,r=this.__layout.boxBounds;this.__.__font=bt.canvas.font=`${s?"italic":""} ${"small-caps"===o?"small-caps":"normal"} ${i||"normal"} ${e}px/${n||e}px ${t}`;const a=bt.canvas.measureText(this.content).width,h=e;r.x=0,r.y=.75*-e,r.width=a,r.height=h}};U([_t(class extends Gs{})],on.prototype,"__",void 0),U([at("")],on.prototype,"content",void 0),U([at("arial")],on.prototype,"fontFamily",void 0),U([at(12)],on.prototype,"fontSize",void 0),U([at("normal")],on.prototype,"fontWeight",void 0),U([at(!1)],on.prototype,"italic",void 0),U([at("normal")],on.prototype,"textCase",void 0),U([at("normal")],on.prototype,"textDecoration",void 0),U([at()],on.prototype,"letterSpacing",void 0),U([at()],on.prototype,"lineHeight",void 0),U([at()],on.prototype,"paragraphIndent",void 0),U([at()],on.prototype,"paragraphSpacing",void 0),on=U([Et(ro),Mt()],on);let nn=class extends lo{constructor(t){super(t)}};U([_t(class extends Gs{})],nn.prototype,"__",void 0),U([at("")],nn.prototype,"url",void 0),U([at("")],nn.prototype,"thumb",void 0),nn=U([Mt()],nn);let rn=class extends ho{constructor(e,i){var o;super(),this.config={zoom:!0,move:!0,start:!0,pixelRatio:devicePixelRatio},this.__eventIds=[],this.creator=St;const{config:n}=this;this.__setAsLeafer(),this.__setConfig(e),this.canvas=St.canvas(n),this.renderer=St.renderer(this,this.canvas,n),this.isSupperLeafer?this.__level=1:(this.watcher=St.watcher(this),this.layouter=St.layouter(this)),this.__checkAutoLayout(n),i?(null===(o=i.selector)||void 0===o||o.defaultPath.unshift(this),this.selector=i.selector,this.interaction=i.interaction,this.canvasManager=i.canvasManager,this.hitCanvasManager=i.hitCanvasManager,this.imageManager=i.imageManager,i.running&&setTimeout(this.start.bind(this))):(this.selector=St.selector(this),this.interaction=St.interaction(this,this.canvas,this.selector,n),this.canvasManager=new t(this),this.hitCanvasManager=new s(this),this.imageManager=new We(this,n),n.start&&setTimeout(this.start.bind(this))),this.canvasManager.add(this.canvas),this.__listenEvents()}get isSupperLeafer(){return!1}__listenEvents(){this.once(Ut.END,this.__setAsRoot.bind(this))}__removeListenEvents(){this.off__(this.__eventIds)}__setConfig(t){t&&(this.config=o.default(t,this.config))}__checkAutoLayout(t){t.width&&t.height||(this.autoLayout=new X(t),this.canvas.autoLayout(this.autoLayout,this.__onResize.bind(this)))}start(){var t;this.running||(this.__interactiveWindow(),null===(t=this.interaction)||void 0===t||t.start(),this.renderer.start(),this.layouter.start(),this.watcher.start(),this.running=!0)}stop(){var t;this.running&&(null===(t=this.interaction)||void 0===t||t.stop(),this.watcher.stop(),this.layouter.stop(),this.renderer.stop(),this.running=!1)}__interactiveWindow(){const{zoom:t,move:e}=this.config;if(e){const{MOVE:e}=Se,{ZOOM:i}=Oe;this.hasEvent(e)||this.__eventIds.push(this.on__(e,(t=>{he.moveByWorld(this,t.moveX,t.moveY)}))),t&&!this.hasEvent(i)&&this.__eventIds.push(this.on__(i,(t=>{he.zoomByWorld(this,t.scale,t)})))}}resize(t){if(this.canvas.isSameSize(t))return;const{width:e,height:i,pixelRatio:s}=this.canvas,o={width:e,height:i,pixelRatio:s};this.canvas.resize(t),this.__onResize(new Xt(t,o))}__onResize(t){this.emitEvent(t),setTimeout((()=>{this.canvasManager.clearRecycled()}),0)}destory(){var t;this.canvas&&(super.destroy(),this.__removeListenEvents(),this.parent||(null===(t=this.interaction)||void 0===t||t.destroy(),this.selector.destroy(),this.renderer.destroy(),this.watcher.destroy(),this.layouter.destroy(),this.canvasManager.destory(),this.hitCanvasManager.destory(),this.imageManager.destory()),this.canvas.destroy(),this.canvas=void 0,this.creator=void 0,this.config=void 0,this.interaction=void 0,this.selector=void 0,this.renderer=void 0,this.watcher=void 0,this.layouter=void 0,this.canvasManager=void 0,this.hitCanvasManager=void 0,this.imageManager=void 0,this.zoomLayer=void 0,this.moveLayer=void 0,this.parent=void 0)}};function an(){return(t,e)=>{const i={get(){return this.canvas[e]},set(t){const{width:i,height:s,pixelRatio:o}=this.canvas,n={width:i,height:s,pixelRatio:o};n[e]=t,this.resize(n)}};Object.defineProperty(t,e,i)}}U([an()],rn.prototype,"width",void 0),U([an()],rn.prototype,"height",void 0),U([an()],rn.prototype,"pixelRatio",void 0),rn=U([Mt()],rn);let hn=class extends rn{constructor(){super(...arguments),this.children=[]}get isSupperLeafer(){return!0}start(){this.running||(this.children.forEach((t=>{t.start()})),this.running=!1)}stop(){this.running&&(this.children.forEach((t=>{t.stop()})),this.running=!1)}addLeafer(t){const e=new rn(this.__getChildConfig(t),this);return this.add(e),this.__eventIds.push(e.on__(Kt.END,this.renderer.start,this.renderer)),e}__render(t,e){this.children.forEach((e=>{t.copy(e.canvas)}))}__onResize(t){this.emitEvent(t),this.children.forEach((e=>{e.resize(t)}))}__getChildConfig(t){let e=Object.assign({},this.config);return(t=t?o.default(t,e):e).view=void 0,this.autoLayout&&(t.width=this.width,t.height=this.height,t.pixelRatio=this.pixelRatio),t}destory(){this.children.length&&(super.destory(),this.children.forEach((t=>{t.destory()})),this.children.length=0)}};hn=U([Mt()],hn);export{Js as Animate,jt as AttrEvent,X as AutoBounds,Je as BezierHelper,Y as Bounds,N as BoundsHelper,Be as Branch,_e as BranchHelper,t as CanvasManager,Ft as ChildEvent,St as Creator,o as DataHelper,V as Debug,Pe as DragEvent,ke as DropEvent,Zs as Effect,Bo as Ellipse,zt as Event,Rt as EventCreator,to as Export,vo as Frame,oo as FrameRender,ho as Group,s as HitCanvasManager,nn as Image,We as ImageManager,a as IncrementId,Xs as Interaction,Ae as KeyEvent,be as Keyboard,Ut as LayoutEvent,ps as Layouter,ae as Leaf,te as LeafBounds,pe as LeafBoundsHelper,r as LeafData,Vt as LeafDataProxy,It as LeafEventer,he as LeafHelper,se as LeafHit,i as LeafLevelList,e as LeafList,$t as LeafMatrix,oe as LeafRender,rn as Leafer,bs as LeaferCanvas,Ts as LeaferImage,Zo as Line,d as MathHelper,T as Matrix,p as MatrixHelper,Se as MoveEvent,Ye as NumberPathCommandLengthMap,je as NumberPathCommandMap,l as OneRadian,$s as Paint,en as Path,Ie as PathCommandMap,ze as PathCommandNeedConvertMap,Bi as PathConvert,Vi as PathCreator,Wi as PathHelper,bt as Platform,Qi as Plugin,b as Point,B as PointHelper,Te as PointerButton,Ce as PointerEvent,ko as Polygon,lo as Rect,no as RectRender,Kt as RenderEvent,_s as Renderer,Xt as ResizeEvent,Me as RotateEvent,$ as Run,ys as Selector,No as Star,G as StringNumberMap,hn as SuperLeafer,De as SwipeEvent,$i as TaskItem,ts as TaskProcessor,on as Text,ro as TextRender,Ht as TransformEvent,H as TwoPointBounds,R as TwoPointBoundsHelper,ao as UI,qs as UIBounds,Lt as UICreator,Re as UIEvent,Qs as UIHit,so as UIRender,sn as Vector,Gt as WatchEvent,es as Watcher,Oe as ZoomEvent,dt as affectEventBoundsType,lt as affectRenderBoundsType,it as aliasType,at as boundsType,_t as dataProcessor,st as dataType,vt as defineDataProcessor,tt as defineKey,Hs as effectType,et as getDescriptor,gt as layoutProcessor,ut as opacityType,ht as pathType,ot as positionType,Dt as registerEvent,Mt as registerUI,xt as rewrite,wt as rewriteAble,rt as rotationType,nt as scaleType,pt as sortType,ct as surfaceType,Et as useModule,Zi as usePlugin};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
class t{constructor(t){this.list=[],this.leafer=t}add(t){t.manager=this,this.list.push(t)}get(t){let e;const{list:s}=this;for(let i=0,n=s.length;i<n;i++)if(e=s[i],e.recycled&&e.isSameSize(t))return e.recycled=!1,e;const i=this.leafer.creator.canvas(t);return this.add(i),i}recycle(t){t.recycled||(t.clear(),t.recycled=!0)}clearRecycled(){let t;const e=[];for(let s=0,i=this.list.length;s<i;s++)t=this.list[s],t.recycled?t.destroy():e.push(t);this.list=e}clear(){this.list.forEach((t=>{t.destroy()})),this.list.length=0}destory(){this.clear(),this.leafer=null}}class e{get length(){return this.list.length}constructor(t){this.reset(),t&&(t instanceof Array?this.pushList(t):this.push(t))}has(t){return void 0!==this.keys[t.innerId]}indexAt(t){return this.list[t]}indexOf(t){const e=this.keys[t.innerId];return void 0===e?-1:e}pushList(t){t.forEach((t=>{this.push(t)}))}unshift(t){const{keys:e}=this;void 0===e[t.innerId]&&(this.list.unshift(t),Object.keys(e).forEach((t=>{void 0!==e[t]&&e[t]++})),e[t.innerId]=0)}push(t){const{list:e,keys:s}=this;void 0===s[t.innerId]&&(e.push(t),s[t.innerId]=e.length-1)}sort(t){const{list:e}=this;t?e.sort(((t,e)=>e.__level-t.__level)):e.sort(((t,e)=>t.__level-e.__level))}remove(t){const{list:e}=this;let s;for(let i=0,n=e.length;i<n;i++)void 0!==s?this.keys[e[i].innerId]=i-1:e[i].innerId===t.innerId&&(s=i,delete this.keys[t.innerId]);void 0!==s&&e.splice(s,1)}forEach(t){this.list.forEach(t)}clone(){const t=new e;return this.list.forEach((e=>{t.push(e)})),t}reset(){this.list=[],this.keys={}}destroy(){this.list=null}}class s{get length(){return this._length}constructor(t){this._length=0,this.reset(),t&&(t instanceof Array?this.pushList(t):this.push(t))}has(t){return void 0!==this.keys[t.innerId]}without(t){return void 0===this.keys[t.innerId]}sort(t){const{levels:e}=this;t?e.sort(((t,e)=>e-t)):e.sort(((t,e)=>t-e))}pushList(t){t.forEach((t=>{this.push(t)}))}push(t){const{keys:e,levelMap:s}=this;e[t.innerId]||(e[t.innerId]=1,s[t.__level]?s[t.__level].push(t):(s[t.__level]=[t],this.levels.push(t.__level)),this._length++)}forEach(t){let e;this.levels.forEach((s=>{e=this.levelMap[s];for(let s=0,i=e.length;s<i;s++)t(e[s])}))}reset(){this.levelMap={},this.keys={},this.levels=[],this._length=0}destroy(){this.levelMap=null}}class i extends t{constructor(){super(...arguments),this.pathTypeList=new e,this.imageTypeList=new e}get(t){}getImageType(t,e){return this.imageTypeList.push(t),this.leafer.creator.hitCanvas(e)}getPathType(t){return this.pathTypeList.push(t),this.leafer.creator.hitCanvas()}clearImageType(){this.__clearLeafList(this.imageTypeList)}clearPathType(){this.__clearLeafList(this.pathTypeList)}__clearLeafList(t){t.forEach((t=>{t.__hitCanvas&&(t.__hitCanvas.destroy(),t.__hitCanvas=null)})),t.reset()}clear(){this.clearPathType(),this.clearImageType()}}const n={default:(t,e)=>(o(e,t),o(t,e),t),assign(t,e){let s;Object.keys(e).forEach((i=>{var n;s=e[i],(null==s?void 0:s.constructor)===Object&&(null===(n=t[i])||void 0===n?void 0:n.constructor)===Object?o(t[i],e[i]):t[i]=e[i]}))},clone:t=>JSON.parse(JSON.stringify(t))},{assign:o}=n;class r{constructor(t){this.__leaf=t}__setInput(t,e){this.__input||(this.__input={}),this.__input[t]=e}__getInput(t){if(this.__input){const e=this.__input[t];return void 0===e?this[t]:e}return this[t]}__setMiddle(t,e){this.__middle||(this.__middle={}),this.__middle[t]=e}__getMiddle(t){return this.__middle&&this.__middle[t]}destroy(){this.__leaf=null}}const a={RUNTIME:"runtime",LEAF:"leaf",TASK:"task",CNAVAS:"canvas",types:{},create(t){const{types:e}=h;return e[t]?e[t]++:(e[t]=1,0)}},h=a,d={within:(t,e,s)=>(t<e&&(t=e),t>s&&(t=s),t)},l=Math.PI/180,{sin:c,cos:u}=Math,_={defaultMatrix:{a:1,b:0,c:0,d:1,e:0,f:0},tempMatrix:{},set(t,e=1,s=0,i=0,n=1,o=0,r=0){t.a=e,t.b=s,t.c=i,t.d=n,t.e=o,t.f=r},copy(t,e){t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f},translate(t,e,s){t.e+=e,t.f+=s},scale(t,e,s=e){t.a*=e,t.d*=s,t.c*=e,t.b*=s,t.e*=e,t.f*=s},rotate(t,e){const s=e*l,i=u(s),n=c(s),{a:o,b:r,c:a,d:h,e:d,f:_}=t;t.a=o*i-r*n,t.b=o*n+r*i,t.c=a*i-h*n,t.d=a*n+h*i,t.e=d*i-_*n,t.f=d*n+_*i},times(t,e){const{a:s,b:i,c:n,d:o,e:r,f:a}=t;t.a=e.a*s+e.b*n,t.b=e.a*i+e.b*o,t.c=e.c*s+e.d*n,t.d=e.c*i+e.d*o,t.e=e.e*s+e.f*n+r,t.f=e.e*i+e.f*o+a},divide(t,e){p.times(t,p.tempInvert(e))},tempInvert(t){const{tempMatrix:e}=p;return p.copy(e,t),p.invert(e),e},invert(t){const{a:e,b:s,c:i,d:n,e:o,f:r}=t,a=1/(e*n-s*i);t.a=n*a,t.b=-s*a,t.c=-i*a,t.d=e*a,t.e=-(o*n-r*i)*a,t.f=-(r*e-o*s)*a},toWorldPoint(t,e,s){const{x:i,y:n}=e;s||(s=e),s.x=i*t.a+n*t.c+t.e,s.y=i*t.b+n*t.d+t.f},toLocalPoint(t,e,s,i){const{x:n,y:o}=e,{a:r,b:a,c:h,d:d}=t,l=1/(r*d-a*h);if(s||(s=e),s.x=(n*d-o*h)*l,s.y=(o*r-n*a)*l,!i){const{e:e,f:i}=t;s.x-=(e*d-i*h)*l,s.y-=(i*r-e*a)*l}},empty(t){t.a=1,t.b=0,t.c=0,t.d=1,t.e=0,t.f=0}},p=_,{toLocalPoint:g,toWorldPoint:y}=_,{sin:v,cos:f,abs:m,sqrt:x,atan2:w}=Math,B={defaultPoint:{x:0,y:0},tempPoint:{},tempRadiusPoint:{},set(t,e=0,s=0){t.x=e,t.y=s},copy(t,e){t.x=e.x,t.y=e.y},rotate(t,e,s){s||(s=E.defaultPoint);const i=f(e*l),n=v(e*l),o=t.x-s.x,r=t.y-s.y;t.x=s.x+o*i-r*n,t.y=s.y+o*n-r*i},tempToLocal(t,e){const{tempPoint:s}=E;return E.copy(s,t),g(e,s,s),s},tempToLocalRadiusPoint(t,e){const{tempRadiusPoint:s}=E;return E.copy(s,t),E.toLocalRadiusPoint(t,e,s),s},toLocalRadiusPoint(t,e,s){s||(s=t),g(e,t,s),s.radiusX=t.radiusX/e.a,s.radiusY=t.radiusY/e.d},toLocal(t,e,s){g(e,t,s)},toWorld(t,e,s){y(e,t,s)},getCenter:(t,e)=>({x:t.x+(e.x-t.x)/2,y:t.y+(e.y-t.y)/2}),getDistance(t,e){const s=m(e.x-t.x),i=m(e.y-t.y);return x(s*s+i*i)},getAngle:(t,e)=>E.getAtan2(t,e)/l,getAtan2:(t,e)=>w(e.y-t.y,e.x-t.x),getDistancePoint(t,e,s){const i=E.getAtan2(t,e);return{x:t.x+f(i)*s,y:t.y+v(i)*s}}},E=B;class b{constructor(t,e){"object"==typeof t?B.copy(this,t):B.set(this,t,e)}set(t,e){B.set(this,t,e)}copy(t){return B.copy(this,t),this}clone(){return new b(this)}rotate(t,e){B.rotate(this,t,e)}toLocal(t,e){B.toLocal(this,t,e)}toWorld(t,e){B.toWorld(this,t,e)}getCenter(t){return B.getCenter(this,t)}getDistance(t){return B.getDistance(this,t)}getAngle(t){return B.getAngle(this,t)}getAtan2(t){return B.getAtan2(this,t)}}class T{constructor(t,e,s,i,n,o){"object"==typeof t?_.copy(this,t):_.set(this,t,e,s,i,n,o)}set(t,e,s,i,n,o){_.set(this,t,e,s,i,n,o)}copy(t){return _.copy(this,t),this}clone(){return new T(this)}translate(t,e){return this.e+=t,this.f+=e,this}scale(t,e){return _.scale(this,t,e),this}rotate(t){return _.rotate(this,t),this}times(t){_.times(this,t)}divide(t){_.divide(this,t)}invert(){_.invert(this)}toWorldPoint(t,e){_.toWorldPoint(this,t,e)}toLocalPoint(t,e){_.toLocalPoint(this,t,e)}empty(){_.empty(this)}}const R={tempPointBounds:{},setPoint(t,e,s){t.minX=t.maxX=e,t.minY=t.maxY=s},addPoint(t,e,s){t.minX=e<t.minX?e:t.minX,t.minY=s<t.minY?s:t.minY,t.maxX=e>t.maxX?e:t.maxX,t.maxY=s>t.maxY?s:t.maxY},add(t,e){t.minX=e.minX<t.minX?e.minX:t.minX,t.minY=e.minY<t.minY?e.minY:t.minY,t.maxX=e.maxX>t.maxX?e.maxX:t.maxX,t.maxY=e.maxY>t.maxY?e.maxY:t.maxY},toBounds(t,e){e.x=t.minX,e.y=t.minY,e.width=t.maxX-t.minX,e.height=t.maxY-t.minY}},{tempPointBounds:C,setPoint:P,addPoint:L,toBounds:k}=R,{toWorldPoint:S}=_;let M,D,O,A;const W={},I={},N={tempBounds:{},set(t,e=0,s=0,i=0,n=0){t.x=e,t.y=s,t.width=i,t.height=n},copy(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},copyAndSpread(t,e,s){F.set(t,e.x-s,e.y-s,e.width+2*s,e.height+2*s)},right:t=>t.x+t.width,bottom:t=>t.y+t.height,move(t,e,s){t.x+=e,t.y+=s},getByMove:(t,e,s)=>(t=Object.assign({},t),F.move(t,e,s),t),getOutOfBounds(t,e){const s=-(F.right(e)-t.x),i=-(F.bottom(e)-t.y),n=Object.assign(Object.assign({},t),{offsetX:s,offsetY:i});return F.move(n,-s,-i),n},tempTimesMatrix:(t,e)=>(F.copy(F.tempBounds,t),F.setByBoundsTimesMatrix(F.tempBounds,F.tempBounds,e),F.tempBounds),timesMatrix(t,e){F.setByBoundsTimesMatrix(t,t,e)},getByTimesMatrix:(t,e)=>(t=Object.assign({},t),F.setByBoundsTimesMatrix(t,t,e),t),divideMatrix(t,e){t.x=(t.x-e.e)/e.a,t.y=(t.y-e.f)/e.d,t.width/=e.a,t.height/=e.d},getFitMatrix(t,e){const s=Math.min(1,Math.min(t.width/e.width,t.height/e.height));return new T(s,0,0,s,-e.x*s,-e.y*s)},getSpread(t,e){const s={};return F.copyAndSpread(s,t,e),s},spread(t,e){F.copyAndSpread(t,t,e)},ceil(t){t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height)},add(t,e){M=t.x+t.width,D=t.y+t.height,O=e.x+e.width,A=e.y+e.height,M=M>O?M:O,D=D>A?D:A,t.x=t.x<e.x?t.x:e.x,t.y=t.y<e.y?t.y:e.y,t.width=M-t.x,t.height=D-t.y},addList(t,e){F.setByListWithHandle(t,e,void 0,!0)},setByList(t,e,s=!1){F.setByListWithHandle(t,e,void 0,s)},addListWithHandle(t,e,s){F.setByListWithHandle(t,e,s,!0)},setByListWithHandle(t,e,s,i=!1){if(!e.length)return void F.empty(t);let n,o=!0;for(let r=0,a=e.length;r<a;r++)n=s?s(e[r]):e[r],(n.width||n.height)&&(o?(o=!1,i||j(t,n)):z(t,n))},setByBoundsTimesMatrix(t,e,s){0===s.b&&0===s.c?(t.x=s.e+e.x*s.a,t.y=s.f+e.y*s.d,t.width=e.width*s.a,t.height=e.height*s.d):(W.x=e.x,W.y=e.y,S(s,W,I),P(C,I.x,I.y),W.x=e.x+e.width,S(s,W,I),L(C,I.x,I.y),W.y=e.y+e.height,S(s,W,I),L(C,I.x,I.y),W.x=e.x,S(s,W,I),L(C,I.x,I.y),k(C,t))},setByPoints(t,e){e.forEach(((t,e)=>{0===e?P(C,t.x,t.y):L(C,t.x,t.y)})),k(C,t)},hitRadiusPoint:(t,e,s)=>(s&&(e=B.tempToLocalRadiusPoint(e,s)),e.x>=t.x-e.radiusX&&e.x<=t.x+t.width+e.radiusX&&e.y>=t.y-e.radiusY&&e.y<=t.y+t.height+e.radiusY),hitPoint:(t,e,s)=>(s&&(e=B.tempToLocal(e,s)),e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height),hit:(t,e,s)=>(s&&(e=F.tempTimesMatrix(e,s)),!(t.y+t.height<e.y||e.y+e.height<t.y||t.x+t.width<e.x||e.x+e.width<t.x)),includes:(t,e,s)=>(s&&(e=F.tempTimesMatrix(e,s)),t.x<=e.x&&t.y<=e.y&&t.x+t.width>=e.x+e.width&&t.y+t.height>=e.y+e.height),getIntersectData(t,e,s){s&&(e=F.tempTimesMatrix(e,s));let{x:i,y:n,width:o,height:r}=e;return M=i+o,D=n+r,O=t.x+t.width,A=t.y+t.height,i=i>t.x?i:t.x,n=n>t.y?n:t.y,M=M<O?M:O,D=D<A?D:A,o=M-i,r=D-n,{x:i,y:n,width:o,height:r}},setByIntersect(t,e,s){F.copy(t,F.getIntersectData(t,e,s))},isSame:(t,e)=>t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height,isEmpty:t=>0===t.x&&0===t.y&&0===t.width&&0===t.height,empty(t){t.x=0,t.y=0,t.width=0,t.height=0}},F=N,{add:z,copy:j}=F;class Y{constructor(t,e,s,i){"object"==typeof t?N.copy(this,t):N.set(this,t,e,s,i)}set(t,e,s,i){N.set(this,t,e,s,i)}copy(t){return N.copy(this,t),this}clone(){return new Y(this)}timesMatrix(t){return N.timesMatrix(this,t),this}divideMatrix(t){return N.divideMatrix(this,t),this}getFitMatrix(t){return N.getFitMatrix(this,t)}spread(t){N.spread(this,t)}ceil(){N.ceil(this)}add(t){N.add(this,t)}addList(t){N.setByList(this,t,!0)}setByList(t,e){N.setByList(this,t,e)}addListWithHandle(t,e){N.setByListWithHandle(this,t,e,!0)}setByListWithHandle(t,e,s){N.setByListWithHandle(this,t,e,s)}setByBoundsTimesMatrix(t,e){N.setByBoundsTimesMatrix(this,t,e)}setByPoints(t){N.setByPoints(this,t)}hitPoint(t,e){return N.hitPoint(this,t,e)}hitRadiusPoint(t,e){return N.hitRadiusPoint(this,t,e)}hit(t,e){return N.hit(this,t,e)}includes(t,e){return N.includes(this,t,e)}getIntersect(t,e){return new Y(N.getIntersectData(this,t,e))}setByIntersect(t,e){N.setByIntersect(this,t,e)}isSame(t){return N.isSame(this,t)}isEmpty(){return N.isEmpty(this)}empty(){N.empty(this)}}class X{constructor(t,e,s,i,n,o){"object"==typeof t?this.copy(t):this.set(t,e,s,i,n,o)}set(t=0,e=0,s=0,i=0,n=0,o=0){this.top=t,this.right=e,this.bottom=s,this.left=i,this.width=n,this.height=o}copy(t){const{top:e,right:s,bottom:i,left:n,width:o,height:r}=t;this.set(e,s,i,n,o,r)}getBoundsFrom(t){const{top:e,right:s,bottom:i,left:n,width:o,height:r}=this;return new Y(n,e,o||t.width-n-s,r||t.height-e-i)}}class H{constructor(t,e){R.setPoint(this,t,e)}addPoint(t,e){R.addPoint(this,t,e)}add(t){R.add(this,t)}}const U={0:1,1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1,".":1,e:1,E:1};function G(t,e,s,i){var n,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,s,r):n(e,s))||r);return o>3&&r&&Object.defineProperty(e,s,r),r}function K(t,e,s,i){return new(s||(s=Promise))((function(n,o){function r(t){try{h(i.next(t))}catch(t){o(t)}}function a(t){try{h(i.throw(t))}catch(t){o(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(r,a)}h((i=i.apply(t,e||[])).next())}))}class V{constructor(t){this.name=t}static get(t){return new V(t)}static set filter(t){t?"string"==typeof t&&(t=[t]):t=[],this.filterList=t}static set exclude(t){t?"string"==typeof t&&(t=[t]):t=[],this.excludeList=t}log(...t){if(Q.enable){if(Q.filterList.length&&Q.filterList.every((t=>t!==this.name)))return;if(Q.excludeList.length&&Q.excludeList.some((t=>t===this.name)))return;console.log("%c"+this.name,"color:#21ae62",...t)}}warn(...t){console.warn(this.name,...t)}error(...t){console.error(this.name,...t)}}var q;V.filterList=[],V.excludeList=[],V.__={},G([(t,e)=>{Object.defineProperty(t,e,{get:()=>t.enable?t.__[e]:q,set(t){this.__[e]=t}})}],V,"showRepaint",void 0);const Q=V;const Z=V.get("RunTime");class ${static start(t,e){const s=a.create(a.RUNTIME);return J.currentId=J.idMap[s]=e?performance.now():Date.now(),J.currentName=J.nameMap[s]=t,J.nameToIdMap[t]=s,s}static end(t,e){const s=J.idMap[t],i=J.nameMap[t];J.idMap[t]=void 0,J.nameMap[t]=void 0,J.nameToIdMap[i]=void 0,e?Z.log(i,performance.now()-s,"µs"):Z.log(i,Date.now()-s,"ms")}static endOfName(t,e){const s=J.nameToIdMap[t];void 0!==s&&J.end(s,e)}}$.idMap={},$.nameMap={},$.nameToIdMap={};const J=$;function tt(t,e,s){Object.defineProperty(t,e,s)}function et(t,e){return Object.getOwnPropertyDescriptor(t,e)}function st(t){return(e,s)=>{tt(e,s,{get(){return this.__get(t)},set(e){this.__set(t,e)}})}}function it(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t)}}),yt(e,s,t)}}function nt(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.positionChanged||this.__layout.positionChange()}}),yt(e,s,t)}}function ot(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.scaleChanged||this.__layout.scaleChange()}}),yt(e,s,t)}}function rt(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.rotationChanged||this.__layout.rotationChange()}}),yt(e,s,t)}}function at(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.boxBoundsChanged||this.__layout.boxBoundsChange()}}),yt(e,s,t)}}const ht=at;function dt(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.eventBoundsChanged||this.__layout.eventBoundsChange()}}),yt(e,s,t)}}function lt(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.renderBoundsChanged||this.__layout.renderBoundsChange()}}),yt(e,s,t)}}function ct(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.surfaceChanged||this.__layout.surfaceChange()}}),yt(e,s,t)}}function ut(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.root?this.__set(s,t):this.__[s]=t,this.__layout.opacityChanged||this.__layout.opacityChange()}}),yt(e,s,t)}}function _t(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__layout.surfaceChanged||this.__layout.surfaceChange(),this.parent?this.parent.__layout.childrenSortChanged=!0:this.__addParentWait((()=>{this.parent.__layout.childrenSortChanged=!0}))}}),yt(e,s,t)}}function pt(t){return(e,s)=>{tt(e,"__DataProcessor",{get:()=>t})}}function gt(t){return(e,s)=>{tt(e,"__LayoutProcessor",{get:()=>t})}}function yt(t,e,s){const i=t.__DataProcessor.prototype,n="_"+e,o=function(t){return"set"+t.charAt(0).toUpperCase()+t.slice(1)}(e),r={get(){const t=this[n];return void 0===t?s:t},set(t){this[n]=t}};void 0===s&&(r.get=function(){return this[n]});const a=et(i,e);a&&(a.set&&(r.set=a.set),a.get&&(r.get=a.get)),i[o]&&(r.set=i[o],delete i[o]),Object.defineProperty(i,e,r)}const vt=new V("rewrite"),ft=[],mt=["destroy","constructor"];function xt(t){return(e,s)=>{ft.push({name:e.constructor.name+"."+s,run:()=>{e[s]=t}})}}function wt(){return t=>{Bt()}}function Bt(t){ft.length&&(ft.forEach((e=>{t&&vt.error(e.name,"需在Class上装饰@rewriteAble()"),e.run()})),ft.length=0)}function Et(t){return e=>{var s;(t.prototype?(s=t.prototype,Object.getOwnPropertyNames(s)):Object.keys(t)).forEach((s=>{if(!mt.includes(s))if(t.prototype){et(t.prototype,s).writable&&(e.prototype[s]=t.prototype[s])}else e.prototype[s]=t[s]}))}}setTimeout((()=>Bt(!0)));const bt={},Tt=V.get("EventCreator"),Rt={typeList:{},register(t){let e;Object.keys(t).forEach((s=>{e=t[s],"string"==typeof e&&(Ct[e]?Tt.error("register the repeat EventType: ",e):Ct[e]=t)}))},get:(t,...e)=>new Ct[t](...e)},{typeList:Ct}=Rt,Pt=V.get("UICreator"),Lt={list:{},register(t){const{tag:e}=t.prototype;kt[e]?Pt.error("register the repeat UI: ",e):kt[e]=t},get:(t,e)=>new kt[t](e)},{list:kt}=Lt,St={ui:(t,e)=>Lt.get(t,e),event:(t,...e)=>Rt.get(t,...e)};function Mt(){return t=>{Lt.register(t)}}function Dt(){return t=>{Rt.register(t)}}const{setByBoundsTimesMatrix:Ot}=N;class At{constructor(t){this.leaf=t,this.renderBounds=this.eventBounds=this.boxBounds={x:0,y:0,width:0,height:0},this.relativeRenderBounds=this.relativeEventBounds=t.__relative,this.boxBoundsChange()}update(){const{leafer:t}=this.leaf;t&&t.watcher.changed&&(t.running||t.start(),t.layouter.layout())}getTransform(t){return this.update(),"world"===t?this.leaf.__world:this.leaf.__relative}getBounds(t,e){if(this.update(),"world"===t)switch(e){case"render":return this.leaf.__world;case"box":return this.getWorldBoxBounds();case"event":return this.getWorldEventBounds()}else if("local"===t)switch(e){case"render":return this.renderBounds;case"box":return this.boxBounds;case"event":return this.eventBounds}else switch(e){case"render":return this.relativeRenderBounds;case"box":return this.leaf.__relative;case"event":return this.relativeEventBounds}return this.leaf.__world}getWorldBoxBounds(){return this._worldBoxBounds||(this._worldBoxBounds={}),Ot(this._worldBoxBounds,this.boxBounds,this.leaf.__world),this._worldBoxBounds}getWorldEventBounds(){return this._worldEventBounds||(this._worldEventBounds={}),Ot(this._worldEventBounds,this.eventBounds,this.leaf.__world),this._worldEventBounds}eventBoundsSpreadCancel(){const t=this.renderBounds===this.eventBounds;this.eventBounds=this.boxBounds,this.relativeEventBounds=this.leaf.__relative,t&&this.renderBoundsSpreadCancel()}renderBoundsSpreadCancel(){this.renderBounds=this.eventBounds,this.relativeRenderBounds=this.relativeEventBounds}eventBoundsSpread(){const{x:t,y:e,width:s,height:i}=this.eventBounds;this.eventBounds={x:t,y:e,width:s,height:i},this.relativeEventBounds={x:t,y:e,width:s,height:i},this.renderBoundsSpreadWidth||this.renderBoundsSpreadCancel()}renderBoundsSpread(){const{x:t,y:e,width:s,height:i}=this.renderBounds;this.renderBounds={x:t,y:e,width:s,height:i},this.relativeRenderBounds={x:t,y:e,width:s,height:i}}boxBoundsChange(){this.boxBoundsChanged=!0,this.localBoxBoundsChanged||this.localBoxBoundsChange(),this.hitCanvasChanged=!0}localBoxBoundsChange(){this.localBoxBoundsChanged=!0,this.boundsChanged=!0}eventBoundsChange(){this.eventBoundsChanged=!0,this.eventBoundsSpreadWidth||(this.eventBoundsSpreadWidth=1),this.boundsChanged=!0}renderBoundsChange(){this.renderBoundsChanged=!0,this.renderBoundsSpreadWidth||(this.renderBoundsSpreadWidth=1),this.boundsChanged=!0}positionChange(){this.positionChanged=!0,this.matrixChanged=!0,this.localBoxBoundsChanged||this.localBoxBoundsChange()}scaleChange(){this.scaleChanged=!0,this._scaleOrRotationChange()}rotationChange(){this.rotationChanged=!0,this.affectRotation=!0,this._scaleOrRotationChange()}_scaleOrRotationChange(){this.affectScaleOrRotation=!0,this.matrixChanged=!0,this.localBoxBoundsChanged||this.localBoxBoundsChange()}surfaceChange(){this.surfaceChanged=!0}opacityChange(){this.opacityChanged=!0,this.surfaceChanged||this.surfaceChange()}destroy(){this.leaf=null}}const Wt=V.get("Life"),It={},Nt={on(t,e,s){let i,n,o;if(s){const t="boolean"==typeof s;i=t?s:s.capture,n=!t&&s.once}const r=Ft(this,i,!0),a="string"==typeof t?t.split(" "):t,h=n?{listener:e,once:n}:{listener:e};a.forEach((t=>{t&&(o=r[t],o?-1===o.findIndex((t=>t.listener===e))&&o.push(h):r[t]=[h])}))},off(t,e,s){let i,n,o;s&&(i="boolean"==typeof s?s:s.capture);const r=Ft(this,i);("string"==typeof t?t.split(" "):t).forEach((t=>{t&&(n=r[t],n&&(o=n.findIndex((t=>t.listener===e)),o>-1&&n.splice(o,1),n.length||delete r[t]))}))},on__(t,e,s,i){return s&&(e=e.bind(s)),this.on(t,e,i),{type:t,listener:e,options:i}},off__(t){if(!t)return;const e=t instanceof Array?t:[t];e.forEach((t=>{this.off(t.type,t.listener,t.options)})),e.length=0},once(t,e,s){this.on(t,e,{once:!0,capture:s})},emit(t,e,s){V.enable&&Wt.log(t);const i=Ft(this,s)[t];if(i){let n;for(let o=0,r=i.length;o<r&&(n=i[o],n.listener(e),n.once&&(this.off(t,n.listener,s),o--,r--),!e||!e.isStopNow);o++);}},emitEvent(t,e){t.current=this,this.emit(t.type,t,e)},hasEvent(t,e){const{__bubbleMap:s,__captureMap:i}=this;return void 0===e?!!(i&&i[t]||s&&s[t]):!!(e?i&&i[t]:s&&s[t])}};function Ft(t,e,s){if(e){const{__captureMap:e}=t;return e||(s?t.__captureMap={}:It)}{const{__bubbleMap:e}=t;return e||(s?t.__bubbleMap={}:It)}}class zt{constructor(t,e){this.bubbles=!1,this.type=t,e&&(this.target=e)}stopDefault(){this.isStopDefault=!0}stopNow(){this.isStopNow=!0,this.isStop=!0}stop(){this.isStop=!0}}let jt=class extends zt{constructor(t,e,s){super(t,e),this.parent=s,this.child=e}};jt.ADD="child.add",jt.REMOVE="child.remove",jt=G([Dt()],jt);let Yt=class extends zt{constructor(t,e,s,i,n){super(t,e),this.attrName=s,this.oldValue=i,this.newValue=n}};var Xt;Yt.CHANGE="attr.change",Yt=G([Dt()],Yt);let Ht=Xt=class extends zt{get bigger(){if(!this.old)return!0;const{width:t,height:e}=this.old;return this.width>=t&&this.height>=e}get smaller(){return!this.bigger}get samePixelRatio(){return!this.old||this.pixelRatio===this.old.pixelRatio}constructor(t,e){const s="object"==typeof t;super(s?Xt.RESIZE:t),s&&Object.assign(this,t),this.old=e}};Ht.RESIZE="resize",Ht=Xt=G([Dt()],Ht);let Ut=class extends zt{constructor(t,e){super(t),e&&Object.assign(this,e)}};Ut.BEFORE="transform.before",Ut.CHANGE="transform.change",Ut.AFTER="transform.after",Ut.PRE_BEFORE="transform.pre_before",Ut.PRE_CHANGE="transform.pre_change",Ut.PRE_AFTER="transform.pre_after",Ut=G([Dt()],Ut);let Gt=class extends zt{constructor(t,e){super(t),this.data=e}};Gt.REQUEST="watch.request",Gt.DATA="watch.data",Gt=G([Dt()],Gt);let Kt=class extends zt{constructor(t,e){super(t),e&&(this.data=e)}};Kt.REQUEST="layout.request",Kt.START="layout.start",Kt.BEFORE_ONCE="layout.before_once",Kt.ONCE="layout.once",Kt.AFTER_ONCE="layout.after_once",Kt.AGAIN="layout.again",Kt.LAYOUT="layout",Kt.END="layout.end",Kt=G([Dt()],Kt);let Vt=class extends zt{};Vt.REQUEST="render.request",Vt.START="render.start",Vt.BEFORE_ONCE="render.before_once",Vt.ONCE="render.once",Vt.AFTER_ONCE="render.after_once",Vt.AGAIN="render.again",Vt.RENDER="render",Vt.END="render.end",Vt=G([Dt()],Vt);const qt={__set(t,e){if(this.root){const s=this.__.__getInput(t);s!==e&&(this.__[t]=e,this.root.emitEvent(new Yt(Yt.CHANGE,this,t,s,e)))}else this.__[t]=e},__get(t){return this.__.__getInput(t)},__updateAttr(t){if(this.root){const e=this.__.__getInput(t);this.root.emitEvent(new Yt(Yt.CHANGE,this,t,e,e))}}},{defaultMatrix:Qt}=_,{sin:Zt,cos:$t}=Math,Jt={__updateWorldMatrix(){const t=this.parent?this.parent.__world:Qt,e=this.__relative,s=this.__world;this.__layout.matrixChanged&&this.__updateRelativeMatrix(),this.__layout.affectScaleOrRotation?(s.a=e.a*t.a+e.b*t.c,s.b=e.a*t.b+e.b*t.d,s.c=e.c*t.a+e.d*t.c,s.d=e.c*t.b+e.d*t.d,s.e=e.e*t.a+e.f*t.c+t.e,s.f=e.e*t.b+e.f*t.d+t.f):(s.a=t.a,s.b=t.b,s.c=t.c,s.d=t.d,s.e=e.e*t.a+e.f*t.c+t.e,s.f=e.e*t.b+e.f*t.d+t.f)},__updateRelativeMatrix(){const t=this.__relative,e=this.__layout;if(e.affectScaleOrRotation){const{scaleX:s,scaleY:i}=this.__;if(e.affectRotation){if(e.scaleChanged||e.rotationChanged){let{rotation:n,skewX:o,skewY:r}=this.__;n||o||r?(n*=l,o&&(o*=l),r&&(r*=l),t.a=s*$t(n+r),t.b=s*Zt(n+r),t.c=i*-Zt(n-o),t.d=i*$t(n-o)):(t.a=s,t.b=0,t.c=0,t.d=i,e.affectRotation=!1),e.scaleChanged=!1,e.rotationChanged=!1}}else e.scaleChanged&&(t.a=s,t.d=i,e.scaleChanged=!1)}e.positionChanged&&(t.e=this.__.x,t.f=this.__.y,e.positionChanged=!1),this.__layout.matrixChanged=!1}},{setByBoundsTimesMatrix:te}=N,ee={__updateWorldBounds(){var t,e,s;if(this.__layout.boundsChanged){let i;const n=this.__layout;n.boxBoundsChanged&&(this.__updatePath(),this.__updateRenderPath(),this.__updateBoxBounds(),n.boxBoundsChanged=!1,i=!0),n.localBoxBoundsChanged&&(this.__updateRelativeBoxBounds(),n.localBoxBoundsChanged=!1,n.eventBoundsSpreadWidth&&(n.eventBoundsChanged=!0),n.renderBoundsSpreadWidth&&(n.renderBoundsChanged=!0),null===(t=this.parent)||void 0===t||t.__layout.boxBoundsChange()),n.eventBoundsChanged&&(n.eventBoundsSpreadWidth=this.__updateEventBoundsSpreadWidth(),n.eventBoundsSpreadWidth?(n.eventBounds===n.boxBounds&&n.eventBoundsSpread(),this.__updateEventBounds(),this.__updateRelativeEventBounds(),n.eventBoundsChanged=!1,n.renderBoundsSpreadWidth&&(n.renderBoundsChanged=!0)):n.eventBoundsSpreadCancel(),null===(e=this.parent)||void 0===e||e.__layout.eventBoundsChange(),i||(i=!0)),n.renderBoundsChanged&&(n.renderBoundsSpreadWidth=this.__updateRenderBoundsSpreadWidth(),n.renderBoundsSpreadWidth?(n.renderBounds!==n.boxBounds&&n.renderBounds!==n.eventBounds||n.renderBoundsSpread(),this.__updateRenderBounds(),this.__updateRelativeRenderBounds(),n.renderBoundsChanged=!1):n.renderBoundsSpreadCancel(),null===(s=this.parent)||void 0===s||s.__layout.renderBoundsChange()),n.boundsChanged=!1,te(this.__world,this.__layout.renderBounds,this.__world),i&&this.__onUpdateSize()}else te(this.__world,this.__layout.renderBounds,this.__world)},__updateRelativeBoxBounds(){te(this.__relative,this.__layout.boxBounds,this.__relative)},__updateRelativeEventBounds(){te(this.__layout.relativeEventBounds,this.__layout.eventBounds,this.__relative)},__updateRelativeRenderBounds(){te(this.__layout.relativeRenderBounds,this.__layout.renderBounds,this.__relative)},__updateBoxBounds(){const t=this.__layout.boxBounds;t.x=0,t.y=0,t.width=this.__.width,t.height=this.__.height}},{toLocalRadiusPoint:se}=B,ie={},ne={__updateHitCanvas(){this.__hitCanvas||(this.__hitCanvas=this.leafer.hitCanvasManager.getPathType(this)),this.__drawRenderPath(this.__hitCanvas)},__hitWorld(t){return this.__layout.hitCanvasChanged&&(this.__updateHitCanvas(),this.__layout.hitCanvasChanged=!1),se(t,this.__world,ie),this.__hit(ie)}},oe={__render(t,e){this.__worldOpacity&&(t.setWorld(this.__world,e.matrix),t.opacity=this.__worldOpacity,this.__draw(t,e))},__updateWorldOpacity(){this.__worldOpacity=this.__.visible?this.parent?this.parent.__worldOpacity*this.__.opacity:this.__.opacity:0,this.__layout.opacityChanged&&(this.__layout.opacityChanged=!1)}},{LEAF:re,create:ae}=a;let he=class{get tag(){return this.constructor.name}get __DataProcessor(){return r}get __LayoutProcessor(){return At}constructor(t){this.innerId=ae(re),this.__relative={a:1,b:0,c:0,d:1,e:0,f:0,x:0,y:0,width:0,height:0},this.__world={a:1,b:0,c:0,d:1,e:0,f:0,x:0,y:0,width:0,height:0},this.__worldOpacity=1,this.__renderTime=2,this.__=new this.__DataProcessor(this),this.__layout=new this.__LayoutProcessor(this),t&&Object.assign(this,t)}__addParentWait(t){this.__parentWait?this.__parentWait.push(t):this.__parentWait=[t]}__runParentWait(){const t=this.__parentWait.length;for(let e=0;e<t;e++)this.__parentWait[e]();this.__parentWait=null}__setAsLeafer(){this.leafer=this}__setAsRoot(){this.__bindRoot(this),this.__isRoot=!0}__bindRoot(t){if(!this.__isRoot&&(this.root=t,this.leafer=t.leafer,this.__level=this.parent?this.parent.__level+1:1,this.__isBranch)){const{children:e}=this;for(let s=0,i=e.length;s<i;s++)e[s].__bindRoot(t)}}__set(t,e){}__get(t){}__updateAttr(t){}__updateWorldOpacity(){}__updateWorldMatrix(){}__updateRelativeMatrix(){}__updateWorldBounds(){}__updateRelativeBoxBounds(){}__updateRelativeEventBounds(){}__updateRelativeRenderBounds(){}__updateBoxBounds(){}__updateEventBounds(){}__updateRenderBounds(){}__updateEventBoundsSpreadWidth(){return 0}__updateRenderBoundsSpreadWidth(){return 0}__onUpdateSize(){}__hitWorld(t){return!0}__hit(t){return!0}__updateHitCanvas(){}__render(t,e){}__drawFast(t,e){}__draw(t,e){}__updateChange(){}__drawPath(t){}__drawRenderPath(t){}__updatePath(){}__updateRenderPath(){}__updateSortChildren(){}add(t,e){}remove(t){}on(t,e,s){}off(t,e,s){}on__(t,e,s,i){}off__(t){}once(t,e,s){}emit(t,e,s){}emitEvent(t,e){}hasEvent(t,e){return!1}destroy(){this.__&&(this.__isBranch&&(this.children.forEach((t=>{t.destroy()})),this.children=null),this.__hitCanvas&&(this.__hitCanvas.destroy(),this.__hitCanvas=null),this.leafer=null,this.root=null,this.parent=null,this.__.destroy(),this.__layout.destroy(),this.__=null,this.__layout=null,this.__captureMap=null,this.__bubbleMap=null)}};he=G([Et(qt),Et(Jt),Et(ee),Et(ne),Et(Nt),Et(oe)],he);const de={updateAllWorldMatrix(t){if(t.__updateWorldMatrix(),t.__isBranch){const{children:e}=t;for(let t=0,s=e.length;t<s;t++)ce(e[t])}},updateAllWorldOpacity(t){if(t.__updateWorldOpacity(),t.__isBranch){const{children:e}=t;for(let t=0,s=e.length;t<s;t++)ue(e[t])}},updateAllChange(t){if(ue(t),t.__updateChange(),t.__isBranch){const{children:e}=t;for(let t=0,s=e.length;t<s;t++)_e(e[t])}},moveOfWorld(t,e,s){const i={x:e,y:s};t.parent&&_.toLocalPoint(t.parent.__world,i,i,!0),le.move(t,i.x,i.y)},move(t,e,s){t.x=t.__.x+e,t.y=t.__.y+s},zoomOfWorld(t,e,s,i){const n=t.parent?B.tempToLocal(s,t.parent.__world):s;this.zoom(t,e,n,i)},zoom(t,e,s,i){i||(i=t);const{x:n,y:o}=i.__,{scaleX:r,scaleY:a}=t.__,h=s.x-n,d=s.y-o,l=(new T).translate(h,d).scale(e).translate(-h,-d);i.x=n-l.e,i.y=o-l.f,t.scaleX=r*e,t.scaleY=a*e},rotateOfWorld(t,e,s,i){const n=t.parent?B.tempToLocal(s,t.parent.__world):s;this.rotate(t,e,n,i)},rotate(t,e,s,i){i||(i=t);const{x:n,y:o}=i.__,{rotation:r}=t.__,a=s.x-n,h=s.y-o,d=(new T).translate(a,h).rotate(e).translate(-a,-h);i.x=n-d.e,i.y=o-d.f,t.rotation=r+e}},le=de,{updateAllWorldMatrix:ce,updateAllWorldOpacity:ue,updateAllChange:_e}=le,pe={worldBounds:t=>t.__world,relativeBoxBounds:t=>t.__relative,relativeEventBounds:t=>t.__layout.relativeEventBounds,relativeRenderBounds:t=>t.__layout.relativeRenderBounds},ge={sort:(t,e)=>t.__.zIndex===e.__.zIndex?t.__tempNumber-e.__tempNumber:t.__.zIndex-e.__.zIndex,pushAllChildBranch(t,e){if(t.__tempNumber=1,t.__childBranchNumber){const{children:s}=t;for(let i=0,n=s.length;i<n;i++)(t=s[i]).__isBranch&&(t.__tempNumber=1,e.push(t),ye(t,e))}},pushAllParent(t,e){const{keys:s}=e;if(s)for(;t.parent&&void 0===s[t.parent.innerId];)e.push(t.parent),t=t.parent;else for(;t.parent;)e.push(t.parent),t=t.parent},pushAllBranchStack(t,e){let s=e.length;const{children:i}=t;for(let t=0,s=i.length;t<s;t++)i[t].__isBranch&&e.push(i[t]);for(let t=s,i=e.length;t<i;t++)ve(e[t],e)},updateWorldBoundsByBranchStack(t){let e;for(let s=t.length-1;s>-1;s--){e=t[s];for(let t=0,s=e.children.length;t<s;t++)e.children[t].__updateWorldBounds()}e.__updateWorldBounds()}},{pushAllChildBranch:ye,pushAllBranchStack:ve}=ge,{setByListWithHandle:fe}=N,{sort:me}=ge,{relativeBoxBounds:xe,relativeEventBounds:we,relativeRenderBounds:Be}=pe;class Ee extends he{constructor(){super(),this.__isBranch=!0,this.children=[]}__updateEventBoundsSpreadWidth(){const{children:t}=this;for(let e=0,s=t.length;e<s;e++)if(t[e].__layout.eventBoundsSpreadWidth)return 1;return 0}__updateRenderBoundsSpreadWidth(){const{children:t}=this;for(let e=0,s=t.length;e<s;e++)if(t[e].__layout.renderBoundsSpreadWidth)return 1;return 0}__updateBoxBounds(){fe(this.__layout.boxBounds,this.children,xe)}__updateEventBounds(){fe(this.__layout.eventBounds,this.children,we)}__updateRenderBounds(){fe(this.__layout.renderBounds,this.children,Be)}__updateChange(){const{__layout:t}=this;t.childrenSortChanged&&(this.__updateSortChildren(),t.childrenSortChanged=!1)}__updateSortChildren(){const{children:t}=this;if(t.length>1){for(let e=0,s=t.length;e<s;e++)t[e].__tempNumber=e;t.sort(me)}}__render(t,e){if(this.__worldOpacity){let s;const{bounds:i,hideBounds:n}=e,{children:o}=this;for(let r=0,a=o.length;r<a;r++)s=o[r],i&&!i.hit(s.__world,e.matrix)||n&&n.includes(s.__world)||s.__render(t,e)}}add(t,e){if(t.parent)t.parent!==this&&console.warn("child had other parent, can not add to this, child innerId:"+t.innerId);else{if(t.parent=this,void 0===e?this.children.push(t):this.children.splice(e,0,t),t.__isBranch&&(this.__childBranchNumber?this.__childBranchNumber++:this.__childBranchNumber=1),this.root){t.__bindRoot(this.root);const e=new jt(jt.ADD,t,this);this.hasEvent(jt.ADD)&&this.emitEvent(e),this.root.emitEvent(e)}t.__parentWait&&t.__runParentWait()}}remove(t){if(t){const e=this.children.indexOf(t);if(e>-1){if(this.children.splice(e,1),t.__isBranch&&(this.__childBranchNumber>1?this.__childBranchNumber--:this.__childBranchNumber=0),this.root){const e=new jt(jt.REMOVE,t,this);this.hasEvent(jt.REMOVE)&&this.emitEvent(e),this.root.emitEvent(e),t.root=null}t.parent=null,this.__layout.boxBoundsChange()}}else this.parent&&this.parent.remove(this)}}const be={};class Te{static isHoldSpaceKey(){return Te.hasDownCode("Space")}static setDownCode(t){be[t]||(be[t]=!0)}static setUpCode(t){be[t]=!1}static hasDownCode(t){return be[t]}}class Re{static left(t){return 1===t.buttons}static right(t){return 2===t.buttons}static middle(t){return 4===t.buttons}}class Ce extends zt{get spaceKey(){return Te.isHoldSpaceKey()}get left(){return Re.left(this)}get right(){return Re.right(this)}get middle(){return Re.middle(this)}constructor(t){super(t.type),this.bubbles=!0,Object.assign(this,t)}}let Pe=class extends Ce{};Pe.POINTER="pointer",Pe.BEFORE_DOWN="pointer.before_down",Pe.BEFORE_MOVE="pointer.before_move",Pe.BEFORE_UP="pointer.before_up",Pe.DOWN="pointer.down",Pe.MOVE="pointer.move",Pe.UP="pointer.up",Pe.ENTER="pointer.enter",Pe.LEAVE="pointer.leave",Pe.TAP="tap",Pe.CLICK="click",Pe.DOUBLE_CLICK="doubleclick",Pe.LONG_PRESS="longpress",Pe.LONG_TAP="longtap",Pe=G([Dt()],Pe);let Le=class extends Pe{};var ke;Le.DRAG="drag",Le.START="drag.start",Le.END="drag.end",Le=G([Dt()],Le);let Se=ke=class extends Pe{static setList(t){ke.dragList=t instanceof e?t:new e(t)}};Se.DROP="drop",Se.ENTER="drop.enter",Se.LEAVE="drop.leave",Se=ke=G([Dt()],Se);let Me=class extends Le{};Me.MOVE="move",Me.START="move.start",Me.END="move.end",Me=G([Dt()],Me);let De=class extends Ce{};De.ROTATE="rotate",De.START="rotate.start",De.END="rotate.end",De=G([Dt()],De);let Oe=class extends Le{};Oe.SWIPE="swipe",Oe.LEFT="swipe.left",Oe.RIGHT="swipe.right",Oe.UP="swipe.up",Oe.DOWN="swipe.down",Oe=G([Dt()],Oe);let Ae=class extends Ce{};Ae.ZOOM="zoom",Ae.START="zoom.start",Ae.END="zoom.end",Ae=G([Dt()],Ae);let We=class extends Ce{};We.DOWN="key.down",We.PRESS="key.press",We.UP="key.up",We=G([Dt()],We);class Ie{constructor(t,e){this.list=[],this.leafer=t}load(){}destory(){this.leafer=null}}const Ne={M:1,m:10,L:2,l:20,H:3,h:30,V:4,v:40,C:5,c:50,S:6,s:60,Q:7,q:70,T:8,t:80,A:9,a:90,Z:11,z:11,rect:100,roundRect:101,ellipse:102,arc:103,arcTo:104},Fe={M:3,m:3,L:3,l:3,H:2,h:2,V:2,v:2,C:7,c:7,S:5,s:5,Q:5,q:5,T:3,t:3,A:8,a:8,Z:1,z:1,rect:5,roundRect:6,ellipse:9,arc:7,arcTo:6},ze={m:10,l:20,H:3,h:30,V:4,v:40,c:50,S:6,s:60,q:70,T:8,t:80,A:9,a:90,rect:100,roundRect:101,ellipse:102,arc:103,arcTo:104},je=Ne,Ye={};for(let t in je)Ye[je[t]]=t;const Xe={};for(let t in je)Xe[je[t]]=Fe[t];const He={},{sin:Ue,cos:Ge,sqrt:Ke,atan2:Ve,ceil:qe,abs:Qe,PI:Ze}=Math,{setPoint:$e,addPoint:Je}=R,ts={getFromACommand(t,e,s,i,n,o,r,a,h){const d=a-t,l=h-e,c=n*Ze/180,u=Ue(c),_=Ge(c),p=-_*d*.5-u*l*.5,g=-_*l*.5+u*d*.5,y=s*s,v=i*i,f=g*g,m=p*p,x=y*v-y*f-v*m;let w=0;if(x<0){const t=Ke(1-x/(y*v));s*=t,i*=t}else{w=(o===r?-1:1)*Ke(x/(y*f+v*m))}const B=w*s*g/i,E=-w*i*p/s,b=_*B-u*E+.5*d,T=u*B+_*E+.5*l;let R=Ve((g-E)/i,(p-B)/s),C=Ve((-g-E)/i,(-p-B)/s),P=C-R;0===r&&P>0?P-=2*Ze:1===r&&P<0&&(P+=2*Ze);const L=[],k=qe(Qe(P/Ze*2)),S=P/k,M=Ue(S/2),D=Ue(S/4),O=8/3*D*D/M;R=0,C=Ve((g-E)/i,(p-B)/s);let A,W,I,N,F,z,j,Y,X=C-R,H=X+S,U=Ge(X),G=Ue(X),K=0,V=0;for(let n=0;n<k;n++)A=Ge(H),W=Ue(H),I=_*s*A-u*i*W+b,N=u*s*A+_*i*W+T,F=K+O*(-_*s*G-u*i*U),z=V+O*(-u*s*G+_*i*U),j=I+O*(_*s*W+u*i*A),Y=N+O*(u*s*W-_*i*A),L.push(Ne.C,F+t,z+e,j+t,Y+e,I+t,N+e),K=I,V=N,X=H,U=A,G=W,H+=S;return L},toTwoPointBounds(t,e,s,i,n,o,r,a,h){const d=[];let l,c,u,_,p,g,y,v,f=t,m=s,x=n,w=r;for(let t=0;t<2;++t)if(1==t&&(f=e,m=i,x=o,w=a),l=-3*f+9*m-9*x+3*w,c=6*f-12*m+6*x,u=3*m-3*f,Math.abs(l)<1e-12){if(Math.abs(c)<1e-12)continue;_=-u/c,0<_&&_<1&&d.push(_)}else y=c*c-4*u*l,v=Math.sqrt(y),y<0||(p=(-c+v)/(2*l),0<p&&p<1&&d.push(p),g=(-c-v)/(2*l),0<g&&g<1&&d.push(g));$e(h,t,e),Je(h,r,a);for(let l=0,c=d.length;l<c;l++)es.getPointAndSet(d[l],t,e,s,i,n,o,r,a,He),Je(h,He.x,He.y)},getPointAndSet(t,e,s,i,n,o,r,a,h,d){const l=1-t,c=l*l*l,u=3*l*l*t,_=3*l*t*t,p=t*t*t;d.x=c*e+u*i+_*o+p*a,d.y=c*s+u*n+_*r+p*h},getPoint(t,e,s,i,n,o,r,a,h){const d={};return es.getPointAndSet(t,e,s,i,n,o,r,a,h,d),d}},es=ts,{M:ss,m:is,L:ns,l:os,H:rs,h:as,V:hs,v:ds,C:ls,c:cs,S:us,s:_s,Q:ps,q:gs,T:ys,t:vs,A:fs,a:ms,Z:xs,z:ws}=Ne,{getFromACommand:Bs}=ts,Es={current:{},stringify(t){let e,s,i,n=0,o=t.length,r="";for(;n<o;){s=t[n],e=Xe[s],r+=s===i?" ":Ye[s];for(let s=1;s<e;s++)r+=t[n+s],s===e-1||(r+=" ");i=s,n+=e}return r},parse(t,e=!0){let s,i,n="";const o=[];for(let e=0,r=t.length;e<r;e++)i=t[e],U[i]?n+=i:Ne[i]?(n&&(Ts(o,Number(n)),n=""),bs.name=Ne[i],bs.length=Fe[i],bs.index=0,Ts(o,bs.name),!s&&ze[i]&&(s=!0)):"-"===i?(n&&Ts(o,Number(n)),n=i):n&&(Ts(o,Number(n)),n="");return n&&Ts(o,Number(n)),e&&s?Es.convertToSimple(o):o},convertToSimple(t){let e,s,i,n,o,r=0,a=0,h=0,d=0,l=0,c=t.length;const u=[];for(;l<c;){switch(i=t[l],i){case is:t[l+1]+=r,t[l+2]+=a;case ss:r=t[l+1],a=t[l+2],u.push(ss,r,a),l+=3;break;case as:t[l+1]+=r;case rs:r=t[l+1],u.push(ns,r,a),l+=2;break;case ds:t[l+1]+=a;case hs:a=t[l+1],u.push(ns,r,a),l+=2;break;case os:t[l+1]+=r,t[l+2]+=a;case ns:r=t[l+1],a=t[l+2],u.push(ns,r,a),l+=3;break;case _s:t[l+1]+=r,t[l+2]+=a,t[l+3]+=r,t[l+4]+=a,i=us;case us:o=n===ls||n===us,h=o?2*r-e:t[l+1],d=o?2*a-s:t[l+2],e=t[l+1],s=t[l+2],r=t[l+3],a=t[l+4],u.push(ls,h,d,e,s,r,a),l+=5;break;case cs:t[l+1]+=r,t[l+2]+=a,t[l+3]+=r,t[l+4]+=a,t[l+5]+=r,t[l+6]+=a,i=ls;case ls:e=t[l+3],s=t[l+4],r=t[l+5],a=t[l+6],u.push(ls,t[l+1],t[l+2],e,s,r,a),l+=7;break;case vs:t[l+1]+=r,t[l+2]+=a,i=ys;case ys:o=n===ps||n===ys,e=o?2*r-e:t[l+1],s=o?2*a-s:t[l+2],r=t[l+1],a=t[l+2],u.push(ps,e,s,r,a),l+=3;break;case gs:t[l+1]+=r,t[l+2]+=a,t[l+3]+=r,t[l+4]+=a,i=ps;case ps:e=t[l+1],s=t[l+2],r=t[l+3],a=t[l+4],u.push(ps,e,s,r,a),l+=5;break;case ms:t[l+6]+=r,t[l+7]+=a;case fs:u.push(...Bs(r,a,t[l+1],t[l+2],t[l+3],t[l+4],t[l+5],t[l+6],t[l+7])),r=t[l+6],a=t[l+7],l+=8;break;case ws:case xs:u.push(xs),l++}n=i}return u},pushData(t,e){bs.index===bs.length&&(bs.index=1,t.push(bs.name)),t.push(e),bs.index++}},{current:bs,pushData:Ts}=Es,{M:Rs,L:Cs,C:Ps,Q:Ls,Z:ks,ellipse:Ss}=Ne,{toTwoPointBounds:Ms}=ts,{add:Ds,addPoint:Os,setPoint:As}=R,Ws={},Is={smoothCorner:(t,e,s)=>t,toTwoPointBounds(t,e){let s,i,n,o,r,a,h,d=0;const l=t.length;for(;d<l;)switch(s=t[d],0===d&&(s===Rs?As(e,t[1],t[2]):As(e,0,0)),s){case Rs:case Cs:i=t[d+1],n=t[d+2],Os(e,i,n),d+=3;break;case Ps:a=t[d+5],h=t[d+6],Ms(i,n,t[d+1],t[d+2],t[d+3],t[d+4],a,h,Ws),Ds(e,Ws),i=a,n=h,d+=7;break;case Ls:o=t[d+1],r=t[d+2],a=t[d+3],h=t[d+4],Ms(i,n,o,r,o,r,a,h,Ws),Ds(e,Ws),i=a,n=h,d+=5;break;case ks:d+=1}e.minX--,e.minY--,e.maxX++,e.maxY++},drawData(t,e){if(e){let s,i=0,n=e.length;for(;i<n;)switch(s=e[i],s){case Rs:t.moveTo(e[i+1],e[i+2]),i+=3;break;case Cs:t.lineTo(e[i+1],e[i+2]),i+=3;break;case Ps:t.bezierCurveTo(e[i+1],e[i+2],e[i+3],e[i+4],e[i+5],e[i+6]),i+=7;break;case Ls:t.quadraticCurveTo(e[i+1],e[i+2],e[i+3],e[i+4]),i+=5;break;case ks:t.closePath(),i+=1;break;case Ss:t.ellipse(e[i+1],e[i+2],e[i+3],e[i+4],e[i+5],e[i+6],e[i+7],e[i+8]),i+=9}}}};let Ns;const{M:Fs,L:zs,C:js,Q:Ys,Z:Xs,rect:Hs,roundRect:Us,ellipse:Gs,arc:Ks,arcTo:Vs}=Ne,qs={begin(t){Ns=t},end(){Ns=null},moveTo(t,e){Ns.push(Fs,t,e)},lineTo(t,e){Ns.push(zs,t,e)},bezierCurveTo(t,e,s,i,n,o){Ns.push(js,t,e,s,i,n,o)},quadraticCurveTo(t,e,s,i){Ns.push(Ys,t,e,s,i)},close(t){Ns.push(Xs),t&&(Ns=null)},rect(t,e,s,i){Ns.push(Hs,t,e,s,i)},roundRect(t,e,s,i,n){Ns.push(Us,t,e,s,i,n)},ellipse(t,e,s,i,n,o,r,a){Ns.push(Gs,t,e,s,i,n,o,r,a)},arc(t,e,s,i,n,o){Ns.push(Ks,t,e,s,i,n,o)},arcTo(t,e,s,i,n){Ns.push(Vs,t,e,s,i,n)}},Qs=V.get("plugin"),Zs={list:[]};function $s(t,e){if(Zs.list.push(t),t.dependencies){const s={};t.dependencies.forEach((t=>{e[t]?s[t]=e[t]:Qs.error(t+" non-existent")})),t.run(s)}else Qs.error("no dependencies")}class Js{constructor(t){this.taskTime=1,this.id=a.create(a.TASK),this.task=t}run(){return K(this,void 0,void 0,(function*(){this.task&&!this.isComplete&&this.parent.running&&(yield this.task())}))}complete(){this.isComplete=!0,this.parent=null,this.task=null}}const ti=V.get("TaskProcessor");class ei{get isComplete(){return this._isComplete}get running(){return this._running}constructor(t){this.parallel=6,this.params={},this.list=[],this.index=0,t&&(this.params=t,t.parallel&&(this.parallel=t.parallel)),this.init()}get percent(){const t=this.list.length;let e=0,s=0;for(let i=0;i<t;i++)i<=this.index?(s+=this.list[i].taskTime,i===this.index&&(e=s)):e+=this.list[i].taskTime;let i=this._isComplete?1:s/e;return Number.isNaN(i)&&(i=0),i}get total(){return this.list.length}get runIndex(){return this.index}init(){this.empty(),this.index=0,this.parallelSuccessNumber=0,this._running=!1,this._isComplete=!1}empty(){this.list=[],this.parallelList=[]}start(){this._running=!0,this._isComplete=!1,this.run()}pause(){this._running=!1}resume(){this._running=!0,this._isComplete=!1,this.run()}skip(){this.index++,this.resume()}stop(){this._running=!1,this.list.forEach((t=>{t.complete()})),this.empty()}add(t,e){this.push(new Js(t),e)}addParallel(t,e){const s=new Js(t);s.parallel=!0,this.push(s,e)}addEmpty(t){this.push(new Js(t))}push(t,e){e&&(t.taskTime=e),t.parent=this,this.list.push(t)}run(){this._running&&(this.setParallelList(),this.parallelList.length>1?this.runParallelTask():this.runTask())}runTask(){const t=this.list[this.index];t.run().then((()=>{this.onTask(t),this.index++,this.nextTask()})).catch((t=>{this.onError(t)}))}runParallelTask(){this.parallelList.forEach((t=>{t.run().then((()=>{this.onTask(t),this.fillParallelTask()})).catch((t=>{this.onParallelError(t)}))}))}setParallelList(){let t;this.parallelList=[],this.parallelSuccessNumber=0;let e=this.index+this.parallel;e>this.list.length&&(e=this.list.length);for(let s=this.index;s<e&&(t=this.list[s],t.parallel);s++)this.parallelList.push(t)}fillParallelTask(){let t;const e=this.parallelList;this.parallelSuccessNumber++,e.pop();const s=e.length,i=this.index+this.parallelSuccessNumber+s;if(e.length){if(!this._running)return;i<this.list.length&&(t=this.list[i],t.parallel&&(e.push(t),t.run().then((()=>{this.onTask(t),this.fillParallelTask()})).catch((t=>{this.onParallelError(t)}))))}else this.index+=this.parallelSuccessNumber,this.nextTask()}nextTask(){setTimeout((()=>{this.run()}),0)}onComplete(){this.stop(),this._isComplete=!0,this.params.onComplete&&this.params.onComplete()}onTask(t){t.complete(),this.params.onTask&&this.params.onTask(),this.index===this.list.length-1&&this.onComplete()}onParallelError(t){ti.error("ParallelError"),this.parallelList.forEach((t=>{t.parallel=!1})),this.parallelList.length=0,this.parallelSuccessNumber=0,this.onError(t)}onError(t){this.pause(),this.params.onError&&this.params.onError(t)}}class si{constructor(t,s){this.updatedList=new e,this.totalTimes=0,this.changed=!0,this.config={},this.target=t,s&&(this.config=n.default(s,this.config)),this.__listenEvents()}start(){this.running=!0,this.changed=!1,this.update()}stop(){this.running=!1}update(){this.running&&(this.changed=!0,this.target.emit(Vt.REQUEST))}__onAttrChange(t){this.updatedList.push(t.target),this.update()}__onChildEvent(t){this.updatedList.push(t.type===jt.REMOVE?t.parent:t.child),this.update()}__onRquestData(){this.target.emitEvent(new Gt(Gt.DATA,{updatedList:this.updatedList})),this.updatedList=new e,this.totalTimes++,this.changed=!1}__listenEvents(){const{target:t}=this;this.__eventIds=[t.on__(Yt.CHANGE,this.__onAttrChange,this),t.on__([jt.ADD,jt.REMOVE],this.__onChildEvent,this),t.on__(Gt.REQUEST,this.__onRquestData,this)]}__removeListenEvents(){this.target.off__(this.__eventIds)}destroy(){this.target&&(this.__removeListenEvents(),this.target=null,this.updatedList=null)}}const{updateAllWorldMatrix:ii,updateAllWorldOpacity:ni}=de,{pushAllChildBranch:oi,pushAllParent:ri}=ge;const{worldBounds:ai}=pe,{setByListWithHandle:hi}=N;class di{constructor(t){this.updatedBounds=new Y,this.beforeBounds=new Y,this.afterBounds=new Y,t instanceof Array&&(t=new e(t)),this.updatedList=t}setBefore(){hi(this.beforeBounds,this.updatedList.list,ai)}setAfter(){hi(this.afterBounds,this.updatedList.list,ai),this.__computeChange()}merge(t){this.updatedList.pushList(t.updatedList.list),this.beforeBounds.add(t.beforeBounds),this.afterBounds.add(t.afterBounds),this.updatedBounds.add(t.updatedBounds)}__computeChange(){const{updatedBounds:t}=this;t.setByList([this.beforeBounds,this.afterBounds]),t.isEmpty()||(t.spread(2),t.ceil())}destroy(){this.updatedList=null}}const{updateAllWorldMatrix:li,updateAllChange:ci}=de,{pushAllBranchStack:ui,updateWorldBoundsByBranchStack:_i}=ge;class pi{constructor(t,e){this.totalTimes=0,this.changed=!0,this.config={partLayout:{maxTimes:3}},this.__levelList=new s,this.target=t,e&&(this.config=n.default(e,this.config)),this.__listenEvents()}start(){this.running=!0}stop(){this.running=!1}update(){this.changed=!0}layout(){if(!this.running)return;const{target:t}=this,{LAYOUT:e,END:s}=Kt;this.times=0,this.changed=!1,t.emit(Kt.START),this.layoutOnce(),t.emitEvent(new Kt(e,this.layoutedBlocks)),t.emitEvent(new Kt(s,this.layoutedBlocks)),this.layoutedBlocks=null}layoutOnce(){this.totalTimes++,this.times++,this.target.emit(Gt.REQUEST),this.totalTimes>1?this.partLayout():this.fullLayout()}partLayout(){var t;if(!(null===(t=this.__updateList)||void 0===t?void 0:t.length))return;const e=$.start("PartLayout"),{target:s,__updateList:i}=this,{BEFORE_ONCE:n,ONCE:o,AFTER_ONCE:r}=Kt,a=this.getBlocks(i);a.forEach((t=>{t.setBefore()})),s.emitEvent(new Kt(n,a)),i.sort(),function(t,e){let s;t.list.forEach((t=>{s=t.__layout,e.without(t)&&(s.matrixChanged?(ii(t),e.push(t),t.__isBranch&&oi(t,e),ri(t,e)):s.boundsChanged&&(e.push(t),t.__isBranch&&(t.__tempNumber=0),ri(t,e)))}))}(i,this.__levelList),function(t){let e,s;t.sort(!0),t.levels.forEach((i=>{e=t.levelMap[i];for(let t=0,i=e.length;t<i;t++){if(s=e[t],s.__isBranch&&s.__tempNumber)for(let t=0,e=s.children.length;t<e;t++)s.children[t].__isBranch||s.children[t].__updateWorldBounds();s.__updateWorldBounds()}}))}(this.__levelList),function(t){t.list.forEach((t=>{t.__layout.opacityChanged&&ni(t),t.__updateChange()}))}(i),a.forEach((t=>{t.setAfter()})),s.emitEvent(new Kt(o,a)),s.emitEvent(new Kt(r,a)),this.setBlocks(a),this.__levelList.reset(),this.__updateList=null,$.end(e),this.__checkAgain()}fullLayout(){const t=$.start("FullLayout"),{target:s}=this,{BEFORE_ONCE:i,ONCE:n,AFTER_ONCE:o}=Kt,r=this.getBlocks(new e(s));s.emitEvent(new Kt(i,r)),pi.fullLayout(s),r.forEach((t=>{t.setAfter()})),s.emitEvent(new Kt(n,r)),s.emitEvent(new Kt(o,r)),this.setBlocks(r),$.end(t),this.__checkAgain()}static fullLayout(t){if(li(t),t.__isBranch){const e=[t];ui(t,e),_i(e)}else t.__updateWorldBounds();ci(t)}createBlock(t){return new di(t)}getBlocks(t){return[this.createBlock(t)]}setBlocks(t){this.layoutedBlocks?this.layoutedBlocks.push(...t):this.layoutedBlocks=t}__checkAgain(){this.changed&&this.times<=this.config.partLayout.maxTimes&&this.target.emit(Kt.AGAIN)}__onReceiveWatchData(t){this.__updateList=t.data.updatedList}__listenEvents(){const{target:t}=this;this.__eventIds=[t.on__(Kt.REQUEST,this.layout,this),t.on__(Kt.AGAIN,this.layoutOnce,this),t.on__(Gt.DATA,this.__onReceiveWatchData,this),t.on__(Vt.REQUEST,this.update,this)]}__removeListenEvents(){this.target.off__(this.__eventIds)}destroy(){this.target&&(this.__removeListenEvents(),this.target=null)}}const gi=V.get("Renderer");class yi{constructor(t,e,s){this.FPS=60,this.totalTimes=0,this.times=0,this.config={usePartRender:!0,maxFPS:60},this.target=t,this.canvas=e,s&&(this.config=n.default(s,this.config)),this.__listenEvents()}start(){this.running=!0}stop(){this.running=!1}update(){this.changed||this.__requestRender(),this.changed=!0}requestLayout(){this.target.emit(Kt.REQUEST)}render(t){const{target:e}=this;this.times=0,gi.log(e.innerId,"---\x3e"),e.emit(Vt.START),this.renderOnce(t),e.emit(Vt.RENDER),e.emit(Vt.END),gi.log(e.innerId,"---|")}renderOnce(t){const{target:e}=this;this.times++,this.totalTimes++,this.changed=!1,t?(e.emit(Vt.BEFORE_ONCE),t()):(this.requestLayout(),e.emit(Vt.BEFORE_ONCE),this.config.usePartRender&&this.totalTimes>1?this.partRender():this.fullRender()),e.emit(Vt.ONCE),e.emit(Vt.AFTER_ONCE),this.updateBlocks=null,this.__checkAgain()}partRender(){const{canvas:t,updateBlocks:e}=this;if(!e)return gi.warn("PartRender: layoutedBlocks is empty"),void this.fullRender(t.bounds);e.some((t=>t.includes(this.target.__world)))?(this.mergeBlocks(),this.clipRender(this.updateBlocks[0],!0)):e.forEach((e=>{t.bounds.hit(e)&&!e.isEmpty()&&this.clipRender(e.getIntersect(t.bounds))}))}clipRender(t,e){const s=$.start("PartRender"),{canvas:i,target:n}=this;i.save(),i.clearBounds(t),V.showRepaint&&i.strokeBounds(t,"red"),i.clipBounds(t),n.__render(i,e?{}:{bounds:t}),i.restore(),$.end(s)}fullRender(t){const{canvas:e,target:s}=this;yi.fullRender(s,e,t)}static fullRender(t,e,s){const i=$.start("FullRender");s||(s=e.bounds),e.save(),e.clear(),t.__render(e,e.bounds.includes(t.__world)?{}:{bounds:s}),e.restore(),$.end(i)}addBlock(t){this.updateBlocks||(this.updateBlocks=[]),this.updateBlocks.push(t)}mergeBlocks(){const{updateBlocks:t}=this;if(t){const e=new Y;e.setByList(t),this.updateBlocks=[e]}}__checkAgain(){this.changed&&this.times<3&&this.target.emit(Vt.AGAIN)}__requestRender(){const t=Date.now();bt.requestRender((()=>{this.changed&&(this.FPS=Math.min(60,Math.ceil(1e3/(Date.now()-t))),this.running&&this.render())}))}__onResize(t){if(t.bigger||!t.samePixelRatio){const{width:e,height:s}=t.old;new Y(0,0,e,s).includes(this.target.__world)||(this.target.__updateAttr("fill"),this.update())}}__onLayoutEnd(t){t.data.map((t=>this.addBlock(t.updatedBounds)))}__listenEvents(){const{target:t}=this;this.__eventIds=[t.on__(Vt.REQUEST,this.update,this),t.on__(Kt.END,this.__onLayoutEnd,this),t.on__(Vt.AGAIN,this.renderOnce,this),t.on__(Ht.RESIZE,this.__onResize,this)]}__removeListenEvents(){this.target.off__(this.__eventIds)}destroy(){this.target&&(this.__removeListenEvents(),this.target=null,this.canvas=null,this.config=null)}}const{hitRadiusPoint:vi}=N;class fi{constructor(t,e){this.target=t,this.selector=e}getHitPointPath(t,s,i){const n=!!i&&i.through;this.exclude=i?i.exclude:null,this.isStop=!1,this.point={x:t.x,y:t.y,radiusX:s,radiusY:s},this.eachFind(this.target.children);const{leaf:o}=this,{defaultPath:r}=this.selector,a=this.getPath(o);let h;if(a.pushList(r.list),n){const t=this.throughPath=new e;this.eachThroughFind(this.target.children),t.pushList(r.list),h={path:a,leaf:o,throughPath:t}}else h={path:a,leaf:o};return this.clear(),h}getPath(t){const s=new e;for(;t;)s.push(t),t=t.parent;return s}eachThroughFind(t){let e;const{point:s}=this;for(let i=t.length-1;i>-1;i--)if(e=t[i],!e.__interactionOff&&vi(e.__world,s)){if(e.__isBranch&&(e.__childrenInteractionOff||this.eachThroughFind(e.children)),this.exclude&&this.exclude.has(e))continue;e.__hitWorld(s)&&this.throughPath.push(e)}}eachFind(t){let e;const{point:s}=this;for(let i=t.length-1;i>-1&&(e=t[i],e.__interactionOff||(vi(e.__world,s)&&(e.__isBranch?(e.__childrenInteractionOff||this.eachFind(e.children),e.__isBranchLeaf&&(this.isStop||this.hitChild(e,s))):this.hitChild(e,s)),!this.isStop));i--);}hitChild(t,e){this.exclude&&this.exclude.has(t)||t.__hitWorld(e)&&(this.leaf=t,this.isStop=!0)}clear(){this.point=null,this.leaf=null,this.throughPath=null,this.exclude=null}destroy(){this.target=null,this.selector=null}}class mi{constructor(t){this.innerIdList={},this.idList={},this.classNameList={},this.tagNameList={},this.target=t,this.defaultPath=new e(t),this.pathFinder=new fi(t,this),this.__listenEvents()}getHitPointPath(t,e,s){return this.pathFinder.getHitPointPath(t,e,s)}find(t,e){return"number"==typeof t?this.getByInnerId(t,e):t.startsWith("#")?this.getById(t.substring(1),e):t.startsWith(".")?this.getByClassName(t.substring(1),e):this.getByTagName(t,e)}getByInnerId(t,e){let s,i=this.innerIdList[t];return i||(e||(e=this.target),this.loopFind(e,(e=>e.innerId===t&&(s=e,this.innerIdList[t]=s,!0))),s)}getById(t,e){let s,i=this.idList[t];return i||(e||(e=this.target),this.loopFind(e,(e=>e.id===t&&(s=e,this.idList[t]=s,!0))),s)}getByClassName(t,e){e||(e=this.target);let s=[];return this.loopFind(e,(e=>(e.className===t&&s.push(e),!1))),s}getByTagName(t,e){e||(e=this.target);let s=[];return this.loopFind(e,(e=>(e.tag===t&&s.push(e),!1))),s}loopFind(t,e){if(e(t))return;const{children:s}=t;for(let i=0,n=s.length;i<n;i++){if(e(t=s[i]))return;t.__isBranch&&this.loopFind(t,e)}}__onRemoveChild(t){const e=t.target;this.idList[e.id]&&(this.idList[e.id]=null),this.innerIdList[e.id]&&(this.innerIdList[e.innerId]=null)}__listenEvents(){this.__eventIds=[this.target.on__(jt.REMOVE,this.__onRemoveChild,this)]}__removeListenEvents(){this.target.off__(this.__eventIds)}destroy(){this.target&&(this.__removeListenEvents(),this.pathFinder.destroy(),this.target=null,this.pathFinder=null,this.innerIdList=null,this.idList=null,this.classNameList=null,this.tagNameList=null)}}function xi(t){return(e,s)=>{t||(t=s);const i={get(){return this.context[t]},set(e){this.context[t]=e}};Object.defineProperty(e,s,i)}}const wi=[];function Bi(){return(t,e)=>{wi.push(e)}}class Ei{bindContextMethod(){let t;wi.forEach((e=>{t=this.context[e],t&&(this[e]=t.bind(this.context))}))}setTransform(t,e,s,i,n,o){}resetTransform(){}getTransform(){}save(){}restore(){}translate(t,e){}scale(t,e){}rotate(t){}fill(t,e){}stroke(t){}clip(t,e){}fillRect(t,e,s,i){}strokeRect(t,e,s,i){}clearRect(t,e,s,i){}drawImage(t,e,s,i,n,o,r,a,h){switch(arguments.length){case 9:if(e<0){const t=-e/i*a;i+=e,e=0,o+=t,a-=t}if(s<0){const t=-s/n*h;n+=s,s=0,r+=t,h-=t}this.context.drawImage(t,e,s,i,n,o,r,a,h);break;case 5:this.context.drawImage(t,e,s,i,n);break;case 3:this.context.drawImage(t,e,s)}}beginPath(){}moveTo(t,e){}lineTo(t,e){}bezierCurveTo(t,e,s,i,n,o){}quadraticCurveTo(t,e,s,i){}closePath(){}arc(t,e,s,i,n,o){}arcTo(t,e,s,i,n){}ellipse(t,e,s,i,n,o,r,a){}rect(t,e,s,i){}roundRect(t,e,s,i,n){}createConicGradient(t,e,s){}createLinearGradient(t,e,s,i){}createPattern(t,e){}createRadialGradient(t,e,s,i,n,o){}fillText(t,e,s,i){}measureText(t){}strokeText(t,e,s,i){}destroy(){this.context=null}}G([xi("imageSmoothingEnabled")],Ei.prototype,"smooth",void 0),G([xi("imageSmoothingQuality")],Ei.prototype,"smoothLevel",void 0),G([xi("globalAlpha")],Ei.prototype,"opacity",void 0),G([xi("globalCompositeOperation")],Ei.prototype,"blendMode",void 0),G([xi()],Ei.prototype,"fillStyle",void 0),G([xi()],Ei.prototype,"strokeStyle",void 0),G([xi("lineWidth")],Ei.prototype,"strokeWidth",void 0),G([xi("lineCap")],Ei.prototype,"strokeCap",void 0),G([xi("lineJoin")],Ei.prototype,"strokeJoin",void 0),G([xi("lineDash")],Ei.prototype,"dashPattern",void 0),G([xi("lineDashOffset")],Ei.prototype,"dashOffset",void 0),G([xi()],Ei.prototype,"miterLimit",void 0),G([xi()],Ei.prototype,"shadowBlur",void 0),G([xi()],Ei.prototype,"shadowColor",void 0),G([xi()],Ei.prototype,"shadowOffsetX",void 0),G([xi()],Ei.prototype,"shadowOffsetY",void 0),G([xi()],Ei.prototype,"filter",void 0),G([xi()],Ei.prototype,"font",void 0),G([xi()],Ei.prototype,"fontKerning",void 0),G([xi()],Ei.prototype,"fontStretch",void 0),G([xi()],Ei.prototype,"fontVariantCaps",void 0),G([xi()],Ei.prototype,"textAlign",void 0),G([xi()],Ei.prototype,"textBaseline",void 0),G([xi()],Ei.prototype,"textRendering",void 0),G([xi()],Ei.prototype,"wordSpacing",void 0),G([xi()],Ei.prototype,"letterSpacing",void 0),G([xi()],Ei.prototype,"direction",void 0),G([Bi()],Ei.prototype,"setTransform",null),G([Bi()],Ei.prototype,"resetTransform",null),G([Bi()],Ei.prototype,"getTransform",null),G([Bi()],Ei.prototype,"save",null),G([Bi()],Ei.prototype,"restore",null),G([Bi()],Ei.prototype,"translate",null),G([Bi()],Ei.prototype,"scale",null),G([Bi()],Ei.prototype,"rotate",null),G([Bi()],Ei.prototype,"fill",null),G([Bi()],Ei.prototype,"stroke",null),G([Bi()],Ei.prototype,"clip",null),G([Bi()],Ei.prototype,"fillRect",null),G([Bi()],Ei.prototype,"strokeRect",null),G([Bi()],Ei.prototype,"clearRect",null),G([Bi()],Ei.prototype,"beginPath",null),G([Bi()],Ei.prototype,"moveTo",null),G([Bi()],Ei.prototype,"lineTo",null),G([Bi()],Ei.prototype,"bezierCurveTo",null),G([Bi()],Ei.prototype,"quadraticCurveTo",null),G([Bi()],Ei.prototype,"closePath",null),G([Bi()],Ei.prototype,"arc",null),G([Bi()],Ei.prototype,"arcTo",null),G([Bi()],Ei.prototype,"ellipse",null),G([Bi()],Ei.prototype,"rect",null),G([Bi()],Ei.prototype,"roundRect",null),G([Bi()],Ei.prototype,"createConicGradient",null),G([Bi()],Ei.prototype,"createLinearGradient",null),G([Bi()],Ei.prototype,"createPattern",null),G([Bi()],Ei.prototype,"createRadialGradient",null),G([Bi()],Ei.prototype,"fillText",null),G([Bi()],Ei.prototype,"measureText",null),G([Bi()],Ei.prototype,"strokeText",null);const bi=V.get("LeaferCanvas"),Ti={width:1,height:1,pixelRatio:1};class Ri extends Ei{get pixelWidth(){return this.width*this.pixelRatio}get pixelHeight(){return this.height*this.pixelRatio}constructor(t,e){if(super(),t||(t=Ti),this.manager=e,this.innerId=a.create(a.CNAVAS),t.view){const{view:e}=t;let s="string"==typeof e?document.getElementById(e):e;if(s)if(s instanceof HTMLCanvasElement)this.view=s;else{if(s===window||s===document){const t=document.createElement("div"),{style:e}=t;e.position="absolute",e.top=e.bottom=e.left=e.right="0px",e.overflow="hidden",document.body.appendChild(t),s=t}this.view=document.createElement("canvas"),s.appendChild(this.view)}else bi.error(`can't find view by id: ${e}`)}this.view||(this.view=document.createElement("canvas")),this.pixelRatio=t.pixelRatio,t.webgl||(this.context=this.view.getContext("2d"),this.smooth=!0,t.fill&&(this.view.style.backgroundColor=t.fill),t.width&&t.height&&this.resize(t),this.bindContextMethod())}debug(){}pixel(t){return t*this.pixelRatio}autoLayout(t,e){const s=s=>{const{x:i,y:n,width:o,height:r}=t.getBoundsFrom(s),{style:a}=this.view;if(a.marginLeft=i+"px",a.marginTop=n+"px",o!==this.width||r!==this.height){const{pixelRatio:t}=this,s={width:o,height:r,pixelRatio:t},i={width:this.width,height:this.height,pixelRatio:this.pixelRatio};this.resize(s),void 0!==this.width&&e(new Ht(s,i))}};this.resizeObserver=new ResizeObserver((t=>{for(const e of t)s(e.contentRect)}));const i=this.view.parentElement;i&&(this.resizeObserver.observe(i),s(i.getBoundingClientRect()))}stopAutoLayout(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}resize(t){const{style:e}=this.view,{width:s,height:i,pixelRatio:n}=t;if(this.isSameSize(t))return;let o;this.context&&this.width&&(o=this.getSameCanvas(),o.copy(this)),Object.assign(this,{width:s,height:i,pixelRatio:n}),this.bounds=new Y(0,0,s,i),e.width=s+"px",e.height=i+"px",this.view.width=s*n,this.view.height=i*n,this.context&&o&&(this.copy(o),o.recycle())}setWorld(t,e,s){const{pixelRatio:i}=this;if(e)if(s)this.setTransform(t.a*i,t.b*i,t.c*i,t.d*i,(t.e+e.e)*i,(t.f+e.f)*i);else{const{a:s,b:n,c:o,d:r,e:a,f:h}=e;this.setTransform((t.a*s+t.b*o)*i,(t.a*n+t.b*r)*i,(t.c*s+t.d*o)*i,(t.c*n+t.d*r)*i,(t.e*s+t.f*o+a)*i,(t.e*n+t.f*r+h)*i)}else this.setTransform(t.a*i,t.b*i,t.c*i,t.d*i,t.e*i,t.f*i)}useSameTransform(t){this.setTransform(t.getTransform())}setStroke(t,e,s){e&&(this.strokeWidth=e),t&&(this.strokeStyle=t),s&&(this.strokeCap=s.strokeCap,this.strokeJoin=s.strokeJoin,this.dashPattern=s.dashPattern,this.miterLimit=s.miterLimit)}setShadow(t,e,s,i){const{pixelRatio:n}=this;this.shadowOffsetX=t*n,this.shadowOffsetY=e*n,this.shadowBlur=s*n,this.shadowColor=i||"black"}setBlur(t){const{pixelRatio:e}=this;this.filter=`blur(${t*e}px)`}hitPath(t,e){return this.context.isPointInPath(t.x,t.y,e)}hitStroke(t){return this.context.isPointInStroke(t.x,t.y)}replaceBy(t,e,s){t.save(),this.blendMode="copy",this.copy(t,e,s),t.restore()}copy(t,e,s,i){if(e){s||(s=e);const{pixelRatio:n}=this;i&&(this.blendMode=i),this.drawImage(t.view,e.x*n,e.y*n,e.width*n,e.height*n,s.x*n,s.y*n,s.width*n,s.height*n),i&&(this.blendMode="normal")}else this.drawImage(t.view,0,0)}copyWorldToLocal(t,e,s,i){const{pixelRatio:n}=this;i&&(this.blendMode=i),e.b||e.c?(this.save(),this.resetTransform(),this.copy(t,e,N.tempTimesMatrix(s,e)),this.restore()):this.drawImage(t.view,e.x*n,e.y*n,e.width*n,e.height*n,s.x,s.y,s.width,s.height),i&&(this.blendMode="normal")}fillBounds(t,e,s){const{pixelRatio:i}=this;s&&(this.blendMode=s),this.fillStyle=e,this.fillRect(t.x*i,t.y*i,t.width*i,t.height*i),s&&(this.blendMode="normal")}strokeBounds(t,e,s){const{pixelRatio:i}=this;s&&(this.blendMode=s),this.strokeStyle=e,this.strokeRect(t.x*i,t.y*i,t.width*i,t.height*i),s&&(this.blendMode="normal")}clearBounds(t){const{pixelRatio:e}=this;this.clearRect(t.x*e,t.y*e,t.width*e,t.height*e)}clipBounds(t){const{pixelRatio:e}=this;this.beginPath(),this.rect(t.x*e,t.y*e,t.width*e,t.height*e),this.clip()}clear(){const{pixelRatio:t}=this;this.clearRect(0,0,this.width*t,this.height*t)}isSameSize(t){return this.width===t.width&&this.height===t.height&&this.pixelRatio===t.pixelRatio}getSameCanvas(t){const{width:e,height:s,pixelRatio:i}=this,n=this.manager.get({width:e,height:s,pixelRatio:i});return n.manager||(n.manager=this.manager),n.save(),t&&n.useSameTransform(this),n}getBiggerCanvas(t,e){let{width:s,height:i,pixelRatio:n}=this;t&&(s+=t),e&&(i+=e);const o=this.manager.get({width:s,height:i,pixelRatio:n});return o.manager||(o.manager=this.manager),o.save(),o}recycle(){this.restore(),this.manager.recycle(this)}destroy(){this.view&&(super.destroy(),this.stopAutoLayout(),this.manager=null,this.view&&this.view.parentElement&&this.view.remove(),this.view=null,this.bounds=null)}}CanvasRenderingContext2D.prototype.roundRect||(CanvasRenderingContext2D.prototype.roundRect=Path2D.prototype.roundRect=function(t,e,s,i,n){let o,r,a,h;if(n instanceof Array)switch(n.length){case 4:o=n[0],r=n[1],a=n[2],h=n[3];break;case 2:o=a=n[0],r=h=n[1];break;case 3:o=n[0],r=h=n[1],a=n[2];break;case 1:n=n[0];break;default:n=0}if(void 0===o){if(!n)return void this.rect(t,e,s,i);o=r=a=h=n}const d=Math.min(s/2,i/2);o>d&&(o=d),r>d&&(r=d),a>d&&(a=d),h>d&&(h=d);const l=this;o?l.moveTo(t+o,e):l.moveTo(t,e),r?l.arcTo(t+s,e,t+s,e+i,r):l.lineTo(t+s,e),a?l.arcTo(t+s,e+i,t,e+i,a):l.lineTo(t+s,e+i),h?l.arcTo(t,e+i,t,e,h):l.lineTo(t,e+i),o?l.arcTo(t,e,t+s,e,o):l.lineTo(t,e),l.closePath()});class Ci{constructor(t){this.options=t,this.load()}load(){return new Promise(((t,e)=>{let s=this.options.url,i=new Image;i.setAttribute("crossOrigin","anonymous"),i.crossOrigin="anonymous",i.onload=()=>t(i),i.onerror=t=>{console.error(t,this),e(new Error("load Image error"))},i.src=s.includes("?")?s+"&xhr":s+"?xhr"}))}destory(){}}class Pi{constructor(t){this.interaction=t}move(t){const{interaction:e}=this;if(!this.moveData){const{path:s}=e.selector.getHitPointPath(t,e.hitRadius);t.path=s,this.moveData=Object.assign(Object.assign({},t),{moveX:0,moveY:0}),e.emit(Me.START,this.moveData)}t.path=this.moveData.path,e.emit(Me.MOVE,t),this.transformEndWait()}zoom(t){const{interaction:e}=this;if(!this.zoomData){const{path:s}=e.selector.getHitPointPath(t,e.hitRadius);t.path=s,this.zoomData=Object.assign(Object.assign({},t),{scale:1}),e.emit(Ae.START,this.zoomData)}t.path=this.zoomData.path,e.emit(Ae.ZOOM,t),this.transformEndWait()}rotate(t){const{interaction:e}=this;if(!this.rotateData){const{path:s}=e.selector.getHitPointPath(t,e.hitRadius);t.path=s,this.rotateData=Object.assign(Object.assign({},t),{rotation:0}),e.emit(De.START,this.rotateData)}t.path=this.rotateData.path,e.emit(De.ROTATE,t),this.transformEndWait()}transformEndWait(){clearTimeout(this.transformTimer),this.transformTimer=setTimeout((()=>{this.transformEnd()}),this.interaction.config.pointer.transformTime)}transformEnd(){this.moveEnd(),this.zoomEnd(),this.rotateEnd(),this.transformMode=null}moveEnd(){this.moveData&&(this.interaction.emit(Me.END,this.moveData),this.moveData=null)}zoomEnd(){this.zoomData&&(this.interaction.emit(Ae.END,this.zoomData),this.zoomData=null)}rotateEnd(){this.rotateData&&(this.interaction.emit(De.END,this.rotateData),this.rotateData=null)}destroy(){clearTimeout(this.transformTimer),this.transformEnd(),this.interaction=null}}const Li={getMoveEventData:(t,e,s)=>Object.assign(Object.assign({},s),{x:t.x,y:t.y,moveX:e.x,moveY:e.y}),getRotateEventData:(t,e,s)=>Object.assign(Object.assign({},s),{x:t.x,y:t.y,rotation:e}),getZoomEventData:(t,e,s)=>Object.assign(Object.assign({},s),{x:t.x,y:t.y,scale:e}),getDragEventData:(t,e,s)=>Object.assign(Object.assign({},s),{x:s.x,y:s.y,moveX:s.x-e.x,moveY:s.y-e.y,totalX:s.x-t.x,totalY:s.y-t.y}),getDropEventData:(t,e)=>Object.assign(Object.assign({},e),{list:t}),getSwipeDirection:t=>t<-45&&t>-135?Oe.UP:t>45&&t<135?Oe.DOWN:t<=45&&t>=-45?Oe.RIGHT:Oe.LEFT,getSwipeEventData:(t,e,s)=>Object.assign(Object.assign({},s),{moveX:e.moveX,moveY:e.moveY,totalX:s.x-t.x,totalY:s.y-t.y,type:ki.getSwipeDirection(B.getAngle(t,s))}),getBase:t=>({altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,buttons:void 0===t.buttons?1:t.buttons}),pathHasEventType(t,e){const{list:s}=t;for(let t=0,i=s.length;t<i;t++)if(s[t].hasEvent(e))return!0;return!1},filterPathByEventType(t,s){const i=new e,{list:n}=t;for(let t=0,e=n.length;t<e;t++)n[t].hasEvent(s)&&i.push(n[t]);return i}},ki=Li,{getDragEventData:Si,getDropEventData:Mi,getSwipeEventData:Di,filterPathByEventType:Oi}=Li;class Ai{constructor(t){this.interaction=t}setDragData(t){this.dragData=Si(t,t,t)}getDragList(){return this.dragging?Se.dragList||this.dragList:null}checkDrag(t,e){const{interaction:s}=this,{downData:i}=s;if(this.moving&&!Re.middle(t)&&!Re.left(t))return void s.pointerCancel();const{dragData:n}=this;this.moving||(this.moving=(Re.middle(t)||Te.isHoldSpaceKey())&&e,this.moving&&s.emit(Me.START,n)),this.moving||this.dragStart(t,e);const{path:o,throughPath:r}=i;this.dragData=Si(i,n,t),r&&(this.dragData.throughPath=r),this.dragData.path=o,this.moving?s.emit(Me.MOVE,this.dragData):this.dragging&&(s.emit(Le.DRAG,this.dragData),this.dragDragableList())}dragStart(t,e){this.dragging||(this.dragging=Re.left(t)&&e,this.dragging&&(this.interaction.emit(Le.START,this.dragData),this.dragList=Oi(this.dragData.path,Le.DRAG),this.getDragableList(this.dragData.path)))}getDragableList(t){let e;for(let s=0,i=t.length;s<i;s++)if(e=t.list[s],e.draggable){this.dragableList=[e];break}}dragDragableList(){if(this.dragableList){const{moveX:t,moveY:e}=this.dragData;this.dragableList.forEach((s=>{de.moveOfWorld(s,t,e)}))}}dropEnterOrLeave(t){const{interaction:e}=this,{dropEnterPath:s}=this,{path:i}=t;e.emit(Se.ENTER,t,i,s),e.emit(Se.LEAVE,t,s,i),this.dropEnterPath=i}dragEnd(t){const{interaction:e}=this,{downData:s}=e;if(!s)return;const{path:i,throughPath:n}=s,o=Si(s,t,t);n&&(o.throughPath=n),o.path=i,this.moving&&e.emit(Me.END,o),this.dragging&&(e.emit(Le.END,o),this.swipe(t,o),this.drop(t)),this.autoMoveCancel(),this.dragReset()}swipe(t,e){const{interaction:s}=this,{downData:i}=s;if(B.getDistance(i,t)>s.config.pointer.swipeDistance){const t=Di(i,this.dragData,e);this.interaction.emit(t.type,t)}}drop(t){const e=Mi(this.getDragList(),t);e.path=this.dropEnterPath,this.interaction.emit(Se.DROP,e),this.interaction.emit(Se.LEAVE,t,this.dropEnterPath)}dragReset(){Se.dragList=null,this.dragList=null,this.dragableList=null,this.dragData=null,this.dropEnterPath=null,this.dragging=null,this.moving=null}checkDragOut(t){const{interaction:e}=this;this.autoMoveCancel(),this.dragging&&!e.shrinkCanvasBounds.hitPoint(t)&&this.autoMoveOnDragOut(t)}autoMoveOnDragOut(t){const{interaction:e}=this,{downData:s}=e,{autoMoveDistance:i}=e.config.pointer;if(!i)return;const n=e.shrinkCanvasBounds,{x:o,y:r}=n,a=N.right(n),h=N.bottom(n),d=t.x<o?i:a<t.x?-i:0,l=t.y<r?i:h<t.y?-i:0;let c=0,u=0;this.autoMoveTimer=setInterval((()=>{c+=d,u+=l,N.move(s,d,l),N.move(this.dragData,d,l),e.move(Object.assign(Object.assign({},t),{moveX:d,moveY:l,totalX:c,totalY:u})),e.pointerMoveReal(t)}),10)}autoMoveCancel(){this.autoMoveTimer&&(clearInterval(this.autoMoveTimer),this.autoMoveTimer=0)}destroy(){this.interaction=null,this.dragableList=null}}const{pathHasEventType:Wi}=Li;class Ii{get dragging(){return this.dragger.dragging}get hitRadius(){return this.config.pointer.hitRadius}constructor(t,e,s,i){this.config={wheel:{zoomMode:!1,zoomSpeed:.5,moveSpeed:.5,rotateSpeed:.5,delta:{x:20,y:8}},pointer:{hitRadius:5,through:!1,clickTime:120,longPressTime:800,transformTime:500,dragDistance:2,swipeDistance:20,autoMoveDistance:2,ignoreMove:!1}},this.clickCount=0,this.target=t,this.canvas=e,this.selector=s,this.transformer=new Pi(this),this.dragger=new Ai(this),i&&(this.config=n.default(i,this.config)),this.__listenEvents()}start(){this.running=!0}stop(){this.running=!1}pointerDown(t){this.emit(Pe.BEFORE_DOWN,t,this.selector.defaultPath);const{hitRadius:e,through:s}=this.config.pointer,i=this.selector.getHitPointPath(t,e,{through:s});i.throughPath&&(t.throughPath=i.throughPath),t.path=i.path,this.emit(Pe.DOWN,t),this.downData=t,this.downTime=Date.now(),this.dragger.setDragData(t),Re.left(t)&&(this.tapWait(),this.longPressWait(t))}pointerMove(t){(this.downData||this.canvas.bounds.hitPoint(t))&&(this.pointerMoveReal(t),this.dragger.checkDragOut(t))}pointerMoveReal(t){if(this.emit(Pe.BEFORE_MOVE,t,this.selector.defaultPath),this.downData){const e=B.getDistance(this.downData,t)>this.config.pointer.dragDistance;this.waitTap&&e&&this.pointerWaitCancel(),this.dragger.checkDrag(t,e)}if(this.dragger.moving||this.config.pointer.ignoreMove)return;const e=this.selector.getHitPointPath(t,this.hitRadius,{exclude:this.dragger.getDragList()});t.path=e.path,this.emit(Pe.MOVE,t),this.pointerEnterOrLeave(t),this.dragger.dragging&&this.dragger.dropEnterOrLeave(t)}pointerUp(t){if(!this.downData)return;this.emit(Pe.BEFORE_UP,t,this.selector.defaultPath);const{through:e}=this.config.pointer,s=this.selector.getHitPointPath(t,this.hitRadius,{through:e});s.throughPath&&(t.throughPath=s.throughPath),t.path=s.path,this.emit(Pe.UP,t),this.emit(Pe.UP,this.downData,void 0,t.path),this.touchLeave(t),this.tap(t),this.longTap(t),this.dragger.dragEnd(t),this.downData=null}pointerCancel(){this.pointerUp(this.dragger.dragData)}move(t){this.transformer.move(t)}zoom(t){this.transformer.zoom(t)}rotate(t){this.transformer.rotate(t)}transformEnd(){this.transformer.transformEnd()}pointerEnterOrLeave(t){if(this.dragger.moving||this.dragger.dragging)return;const{path:e}=t;this.emit(Pe.ENTER,t,e,this.enterPath),this.emit(Pe.LEAVE,t,this.enterPath,e),this.enterPath=e}touchLeave(t){"touch"===t.pointerType&&this.enterPath&&(this.emit(Pe.LEAVE,t),this.dragger.dragging&&this.emit(Se.LEAVE,t))}tap(t){if(!this.waitTap)return;this.clickCount||this.emit(Pe.TAP,t);Date.now()-this.downTime<this.config.pointer.clickTime+50&&Wi(t.path,Pe.DOUBLE_CLICK)?(this.clickCount++,2===this.clickCount?(this.tapWaitCancel(),this.emit(Pe.DOUBLE_CLICK,t)):(clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout((()=>{this.tapWaitCancel(),this.emit(Pe.CLICK,t)}),this.config.pointer.clickTime))):(this.tapWaitCancel(),this.emit(Pe.CLICK,t))}pointerWaitCancel(){this.tapWaitCancel(),this.longPressWaitCancel()}tapWait(){clearTimeout(this.clickTimer),this.waitTap=!0}tapWaitCancel(){clearTimeout(this.clickTimer),this.waitTap=!1,this.clickCount=0}longPressWait(t){clearTimeout(this.longPressTimer),this.longPressTimer=window.setTimeout((()=>{this.longPressed=!0,this.emit(Pe.LONG_PRESS,t)}),this.config.pointer.longPressTime)}longTap(t){this.longPressed&&this.emit(Pe.LONG_TAP,t),this.longPressWaitCancel()}longPressWaitCancel(){clearTimeout(this.longPressTimer),this.longPressed=!1}__onResize(){this.shrinkCanvasBounds=new Y(this.canvas.bounds),this.shrinkCanvasBounds.spread(-2)}__listenEvents(){const{target:t}=this;this.__eventIds=[t.on__(Ht.RESIZE,this.__onResize,this)]}__removeListenEvents(){this.target.off__(this.__eventIds)}emit(t,e,s,i){this.running&&function(t,e,s,i){if(!s&&!e.path)return;let n;e.type=t,s?e=Object.assign(Object.assign({},e),{path:s}):s=e.path,e.target=s.indexAt(0);for(let o=s.length-1;o>-1;o--)if(n=s.list[o],n.hasEvent(t,!0)&&(!i||!i.has(n))){e.phase=1;const s=St.event(t,e);if(n.emitEvent(s,!0),s.isStop)return}for(let o=0,r=s.length;o<r;o++)if(n=s.list[o],n.hasEvent(t,!1)&&(!i||!i.has(n))){e.phase=n===e.target?2:3;const s=St.event(t,e);if(n.emitEvent(s),s.isStop)return}}(t,e,s,i)}destroy(){this.target&&(this.running=!1,this.__removeListenEvents(),this.dragger.destroy(),this.transformer.destroy(),this.config=null,this.target=null,this.selector=null,this.canvas=null,this.dragger=null,this.transformer=null)}}const Ni={convert(t,e){const s=Li.getBase(t),i=Object.assign(Object.assign({},s),{x:e.x,y:e.y,width:t.width,height:t.height,pointerType:t.pointerType,pressure:t.pressure});return"pen"===i.pointerType&&(i.tangentialPressure=t.tangentialPressure,i.tiltX=t.tiltX,i.tiltY=t.tiltY,i.twist=t.twist),i},convertMouse(t,e){const s=Li.getBase(t);return Object.assign(Object.assign({},s),{x:e.x,y:e.y,width:1,height:1,pointerType:"mouse",pressure:.5})},convertTouch(t,e){const s=Ni.getTouch(t),i=Li.getBase(t);return Object.assign(Object.assign({},i),{x:e.x,y:e.y,width:1,height:1,pointerType:"touch",pressure:s.force})},getTouch:t=>t.targetTouches[0]||t.changedTouches[0]},Fi={getData(t,e){const s=B.getCenter(t[0],t[1]),i=B.getCenter(e[0],e[1]),n={x:i.x-s.x,y:i.y-s.y},o=B.getDistance(t[0],t[1]),r=B.getDistance(e[0],e[1])/o,a=B.getAngle(t[0],t[1]),h=B.getAngle(e[0],e[1]);return{move:n,scale:r,angle:this.getChangedAngle(a,h),center:i}},getTouches(t){const e=[];for(let s=0,i=t.length;s<i;s++)e.push(t[s]);return e},getChangedAngle(t,e){const s=(e=e<=-90?360+e:e)-(t=t<=-90?360+t:t);return s<0?s+360:s}};let zi=0;const ji={getMove:(t,e)=>({x:-t.deltaX*e.moveSpeed*2,y:-t.deltaY*e.moveSpeed*2}),getScale(t,e){let s,i=1,{zoomMode:n,zoomSpeed:o}=e;const r=t.deltaY||t.deltaX;if(n){const e=t.mozInputSource&&t.deltaY%18==0;e?zi++:zi=0,s=(Math.floor(t.deltaY)!==t.deltaY||e&&zi>2)&&0===t.deltaX,(t.shiftKey||t.metaKey||t.ctrlKey)&&(s=!0)}else s=!t.shiftKey&&(t.metaKey||t.ctrlKey);if(s){o=d.within(o,0,1);i=1-r/(25*(t.deltaY?e.delta.y:e.delta.x)*(1-o)+10),i<.5&&(i=.5),i>=1.5&&(i=1.5)}return i}},{getMoveEventData:Yi,getZoomEventData:Xi,getRotateEventData:Hi}=Li;class Ui extends Ii{__listenEvents(){super.__listenEvents();const t=this.view=this.canvas.view;this.__onResize(),this.viewEvents={pointerdown:this.onPointerDown.bind(this),mousedown:this.onMouseDown.bind(this),touchstart:this.onTouchStart.bind(this),wheel:this.onWheel.bind(this),gesturestart:this.onGesturestart.bind(this),gesturechange:this.onGesturechange.bind(this),gestureend:this.onGestureend.bind(this)},this.windowEvents={pointermove:this.onPointerMove.bind(this),pointerup:this.onPointerUp.bind(this),pointercancel:this.onPointerCancel.bind(this),mousemove:this.onMouseMove.bind(this),mouseup:this.onMouseUp.bind(this),touchmove:this.onTouchMove.bind(this),touchend:this.onTouchEnd.bind(this),touchcancel:this.onTouchCancel.bind(this),keydown:this.onKeyDown.bind(this),keyup:this.onKeyUp.bind(this)};for(let e in this.viewEvents)t.addEventListener(e,this.viewEvents[e]);for(let t in this.windowEvents)window.addEventListener(t,this.windowEvents[t]);window.oncontextmenu=function(){return!1}}__removeListenEvents(){super.__removeListenEvents();for(let t in this.viewEvents)this.view.removeEventListener(t,this.viewEvents[t]),this.viewEvents={};for(let t in this.windowEvents)window.removeEventListener(t,this.windowEvents[t]),this.windowEvents={}}__onResize(){super.__onResize(),this.clientBounds=new Y(this.view.getBoundingClientRect())}getLocal(t){return{x:t.clientX-this.clientBounds.x,y:t.clientY-this.clientBounds.y}}onKeyDown(t){Te.setDownCode(t.code)}onKeyUp(t){Te.setUpCode(t.code)}onPointerDown(t){this.usePointer||(this.usePointer=!0),this.useMutiTouch||(t.preventDefault(),this.pointerDown(Ni.convert(t,this.getLocal(t))))}onPointerMove(t){this.usePointer||(this.usePointer=!0),this.useMutiTouch||this.pointerMove(Ni.convert(t,this.getLocal(t)))}onPointerUp(t){this.useMutiTouch||(t.preventDefault(),this.pointerUp(Ni.convert(t,this.getLocal(t))))}onPointerCancel(){this.useMutiTouch||this.pointerCancel()}onMouseDown(t){this.useTouch||this.usePointer||(t.preventDefault(),this.pointerDown(Ni.convertMouse(t,this.getLocal(t))))}onMouseMove(t){this.useTouch||this.usePointer||this.pointerMove(Ni.convertMouse(t,this.getLocal(t)))}onMouseUp(t){this.useTouch||this.usePointer||(t.preventDefault(),this.pointerUp(Ni.convertMouse(t,this.getLocal(t))))}onMouseCancel(){this.useTouch||this.usePointer||this.pointerCancel()}onTouchStart(t){if(t.preventDefault(),this.mutiTouchStart(t),this.usePointer)return;this.touchTimer&&(window.clearTimeout(this.touchTimer),this.touchTimer=0),this.useTouch=!0;const e=Ni.getTouch(t);this.pointerDown(Ni.convertTouch(t,this.getLocal(e)))}onTouchMove(t){if(this.mutiTouchMove(t),this.usePointer)return;const e=Ni.getTouch(t);this.pointerMove(Ni.convertTouch(t,this.getLocal(e)))}onTouchEnd(t){if(t.preventDefault(),this.mutiTouchEnd(),this.usePointer)return;this.touchTimer&&clearTimeout(this.touchTimer),this.touchTimer=window.setTimeout((()=>{this.useTouch=!1}),500);const e=Ni.getTouch(t);this.pointerUp(Ni.convertTouch(t,this.getLocal(e)))}onTouchCancel(){this.usePointer||this.pointerCancel()}mutiTouchStart(t){this.useMutiTouch=t.touches.length>=2,this.touches=this.useMutiTouch?Fi.getTouches(t.touches):void 0,this.useMutiTouch&&this.pointerCancel()}mutiTouchMove(t){if(this.useMutiTouch&&t.touches.length>=2){const e=Fi.getTouches(t.touches),s=e.find((t=>t.identifier===this.touches[0].identifier)),i=e.find((t=>t.identifier===this.touches[1].identifier));if(s&&i){const n=[this.getLocal(this.touches[0]),this.getLocal(this.touches[1])],o=[this.getLocal(s),this.getLocal(i)],{move:r,angle:a,scale:h,center:d}=Fi.getData(n,o),l=Li.getBase(t);this.rotate(Hi(d,a,l)),this.zoom(Xi(d,h,l)),this.move(Yi(d,r,l)),this.touches=e}}}mutiTouchEnd(){this.touches=null,this.useMutiTouch=!1,this.transformEnd()}onWheel(t){t.preventDefault();const{wheel:e}=this.config,s=e.getScale?e.getScale(t,e):ji.getScale(t,e),i=this.getLocal(t),n=Li.getBase(t);1!==s?this.zoom(Xi(i,s,n)):this.move(Yi(i,e.getMove?e.getMove(t,e):ji.getMove(t,e),n))}onGesturestart(t){t.preventDefault(),this.lastGestureScale=1,this.lastGestureRotation=0}onGesturechange(t){t.preventDefault();const e=this.getLocal(t),s=Li.getBase(t),i=t.scale/this.lastGestureScale,n=t.rotation-this.lastGestureRotation;let{rotateSpeed:o}=this.config.wheel;o=d.within(o,0,1),this.zoom(Xi(e,i*i,s)),this.rotate(Hi(e,n/Math.PI*180*(o/4+.1),s)),this.lastGestureScale=t.scale,this.lastGestureRotation=t.rotation}onGestureend(t){t.preventDefault(),this.transformEnd()}destroy(){this.view&&(super.destroy(),this.view=null,this.touches=null)}}function Gi(t){return(e,s)=>{tt(e,s,{get(){return this.__get(s)},set(t){this.__set(s,t),this.__.__useEffect=!0,this.__layout.renderBoundsChanged||this.__layout.renderBoundsChange()}}),yt(e,s,t)}}Object.assign(St,{canvas:(t,e)=>new Ri(t,e),image:t=>new Ci(t),hitCanvas:(t,e)=>new Ri(t,e),watcher:t=>new si(t),layouter:t=>new pi(t),renderer:(t,e,s)=>new yi(t,e,s),selector:t=>new mi(t),interaction:(t,e,s,i)=>new Ui(t,e,s,i)}),bt.requestRender=function(t){window.requestAnimationFrame(t)},bt.canvas=St.canvas();class Ki extends r{setFill(t){"string"==typeof t?(this._fill=t,this.__isFills&&(this.__isFills=!1)):t instanceof Array?(this._fill=t,this.__isFills=!0):"object"==typeof t?(this._fill=[t],this.__isFills=!0):(this._fill=t,this.__isFills&&(this.__isFills=!1))}setStroke(t){"string"==typeof t?(this._stroke=t,this.__isStrokes&&(this.__isStrokes=!1)):t instanceof Array?(this._stroke=t,this.__isStrokes=!0):"object"==typeof t?(this._stroke=[t],this.__isStrokes=!0):(this._stroke=t,this.__isStrokes&&(this.__isStrokes=!1))}setShadow(t){this._shadow=t instanceof Array?t:[t]}setInnerShadow(t){this._innerShadow=t instanceof Array?t:[t]}}class Vi extends Ki{}const{parse:qi}=Es;const{copyAndSpread:Qi}=N,Zi={__updateEventBounds(){Qi(this.__layout.eventBounds,this.__layout.boxBounds,this.__layout.eventBoundsSpreadWidth)},__updateRenderBounds(){Qi(this.__layout.renderBounds,this.__layout.eventBounds,this.__layout.renderBoundsSpreadWidth)},__updateEventBoundsSpreadWidth(){let t=0;const{stroke:e,strokeAlign:s}=this.__;if(e&&"inside"!==s){const{strokeWidth:e,miterLimit:i,path:n}=this.__,o=n?1/Math.sin(i*l/2)*Math.sqrt(e):0;t="center"===s?e/2:e,this.__.__strokeOuterWidth=t,o&&(t+=o-t)}return t||(this.__.__strokeOuterWidth=0),t},__updateRenderBoundsSpreadWidth(){let t=0;const{shadow:e,innerShadow:s,blur:i,backgroundBlur:n}=this.__;e&&e.forEach((e=>{t=Math.max(t,Math.max(Math.abs(e.y),Math.abs(e.x))+(e.spread>0?e.spread:0)+1.5*e.blur)})),i&&(t=Math.max(t,i));let o=t=Math.ceil(t);return s&&s.forEach((t=>{o=Math.max(o,Math.max(Math.abs(t.y),Math.abs(t.x))+(t.spread<0?-t.spread:0)+1.5*t.blur)})),n&&(o=Math.max(o,n)),this.__layout.renderShapeBoundsSpreadWidth=o,t}},$i={__hit(t){if(this.__.fill&&this.__hitCanvas.hitPath(t,this.__.windingRule))return!0;if(this.__.__strokeOuterWidth){const e=2*(this.__.__strokeOuterWidth+t.radiusX),{__hitCanvas:s}=this;if(s.strokeWidth!==e&&(s.strokeWidth=e,s.stroke()),s.hitStroke(t))return!0}return!1}},Ji={},tn={},en={},sn={};function nn(t,e){t.forEach((t=>{e.strokeStyle=t.style,e.stroke()}))}var on=Object.freeze({__proto__:null,fill:function(t,e,s){e.fillStyle=s,e.fill(t.__.windingRule)},fills:function(t,e,s){let i;const{windingRule:n}=t.__;for(let t=0,o=s.length;t<o;t++)i=s[t],e.fillStyle=i.style,e.fill(n)},stroke:function(t,e,s){const i=t.__,{strokeWidth:n,strokeAlign:o}=i;switch(o){case"center":e.setStroke(void 0,n,i),e.strokeStyle=s,e.stroke();break;case"inside":e.save(),e.setStroke(void 0,2*n,i),e.clip(i.windingRule),e.strokeStyle=s,e.stroke(),e.restore();break;case"outside":const o=e.getSameCanvas(!0);t.__drawRenderPath(o),o.setStroke(void 0,2*n,t.__),o.strokeStyle=s,o.stroke(),o.clip(i.windingRule),o.clearBounds(t.__layout.renderBounds),e.copyWorldToLocal(o,t.__world,t.__layout.renderBounds),o.recycle()}},strokes:function(t,e,s){const i=t.__,{strokeWidth:n,strokeAlign:o}=i;switch(o){case"center":e.setStroke(void 0,n,i),nn(s,e);break;case"inside":e.save(),e.setStroke(void 0,2*n,i),e.clip(i.windingRule),nn(s,e),e.restore();break;case"outside":const{renderBounds:o}=t.__layout,r=e.getSameCanvas(!0);t.__drawRenderPath(r),r.setStroke(void 0,2*n,t.__),nn(s,r),r.clip(i.windingRule),r.clearBounds(o),e.copyWorldToLocal(r,t.__world,o),r.recycle()}}});Object.assign(tn,on);const rn={__updateChange(){let t=this.__;t.__isFills||t.__isStrokes||t.cornerRadius||t.__useEffect?this.__complex=!0:this.__complex&&(this.__complex=!1)},__drawFast(t,e){const{fill:s,stroke:i}=this.__;this.__drawRenderPath(t),s&&tn.fill(this,t,s),i&&tn.stroke(this,t,i)},__draw(t,e){if(this.__complex){const{fill:e,stroke:s}=this.__;this.__drawRenderPath(t),e&&(this.__.__isFills?tn.fills(this,t,e):tn.fill(this,t,e)),s&&(this.__.__isStrokes?tn.strokes(this,t,s):tn.stroke(this,t,s))}else this.__drawFast(t,e)}},an={__render(t,e){const{fill:s,stroke:i}=this.__;i&&(this.__.stroke=void 0),this.__renderRect(t,e);const{clip:n}=this.__;n?(t.save(),t.clip(),this.__renderGroup(t,e),t.restore()):this.__renderGroup(t,e),i&&(this.__.stroke=i,s&&(this.__.fill=void 0),this.__renderRect(t,e),s&&(this.__.fill=s))}},hn={__drawFast(t,e){const{width:s,height:i,fill:n,stroke:o}=this.__;if(n&&(t.fillStyle=n,t.fillRect(0,0,s,i)),o){const{strokeAlign:e,strokeWidth:n}=this.__;t.setStroke(o,n,this.__);const r=n/2;switch(e){case"center":t.strokeRect(0,0,s,i);break;case"inside":t.strokeRect(r,r,s-n,i-n);break;case"outside":t.strokeRect(-r,-r,s+n,i+n)}}}},dn={__drawFast(t,e){const{fill:s,stroke:i,content:n,__font:o}=this.__;t.font=o,s&&(t.fillStyle=s,t.fillText(n,0,0)),i&&(t.strokeStyle=i,t.strokeText(n,0,0))}};dn.__draw=dn.__drawFast;let ln=class extends he{get worldTransform(){return this.__layout.getTransform("world")}get relativeTransform(){return this.__layout.getTransform("relative")}get worldBoxBounds(){return this.__layout.getBounds("world","box")}get worldRenderBounds(){return this.__layout.getBounds("world","render")}__updateRenderPath(){if(this.__.path){const{__:t}=this;t.__pathForRender=t.cornerRadius?Is.smoothCorner(t.path,t.cornerRadius,t.cornerSmoothing):t.path}}__drawRenderPath(t){t.beginPath(),this.__drawPathByData(t,this.__.__pathForRender)}__drawPath(t){t.beginPath(),this.__drawPathByData(t,this.__.path)}__drawPathByData(t,e){}};G([pt(Ki)],ln.prototype,"__",void 0),G([it("")],ln.prototype,"id",void 0),G([it("")],ln.prototype,"name",void 0),G([it("")],ln.prototype,"className",void 0),G([ut(1)],ln.prototype,"opacity",void 0),G([ut(!0)],ln.prototype,"visible",void 0),G([_t(0)],ln.prototype,"zIndex",void 0),G([nt(0)],ln.prototype,"x",void 0),G([nt(0)],ln.prototype,"y",void 0),G([at(100)],ln.prototype,"width",void 0),G([at(100)],ln.prototype,"height",void 0),G([ot(1)],ln.prototype,"scaleX",void 0),G([ot(1)],ln.prototype,"scaleY",void 0),G([rt(0)],ln.prototype,"rotation",void 0),G([rt(0)],ln.prototype,"skewX",void 0),G([rt(0)],ln.prototype,"skewY",void 0),G([ct()],ln.prototype,"blendMode",void 0),G([at()],ln.prototype,"mask",void 0),G([it()],ln.prototype,"locked",void 0),G([ct()],ln.prototype,"fill",void 0),G([dt()],ln.prototype,"stroke",void 0),G([dt("center")],ln.prototype,"strokeAlign",void 0),G([dt(1)],ln.prototype,"strokeWidth",void 0),G([ct("none")],ln.prototype,"strokeCap",void 0),G([ct("miter")],ln.prototype,"strokeJoin",void 0),G([ct()],ln.prototype,"dashPattern",void 0),G([ct()],ln.prototype,"dashOffset",void 0),G([ct(10)],ln.prototype,"miterLimit",void 0),G([ht()],ln.prototype,"cornerRadius",void 0),G([ht()],ln.prototype,"cornerSmoothing",void 0),G([Gi()],ln.prototype,"shadow",void 0),G([Gi()],ln.prototype,"innerShadow",void 0),G([Gi()],ln.prototype,"blur",void 0),G([Gi()],ln.prototype,"backgroundBlur",void 0),G([Gi()],ln.prototype,"grayscale",void 0),G([xt(Is.drawData)],ln.prototype,"__drawPathByData",null),ln=G([Et(Zi),Et($i),Et(rn),wt()],ln);let cn=class extends ln{constructor(t){super(t),this.__isBranch=!0,this.children=[]}addAt(t,e){this.add(t,e)}addAfter(t,e){this.add(t,this.children.indexOf(e)+1)}addBefore(t,e){this.add(t,this.children.indexOf(e))}add(t,e){}remove(t){}};G([pt(Vi)],cn.prototype,"__",void 0),cn=G([Et(Ee),Mt()],cn);let un=class extends ln{constructor(t){super(t)}__drawPathByData(t,e){const{width:s,height:i,cornerRadius:n}=this.__;n?t.roundRect(0,0,s,i,n):t.rect(0,0,s,i)}};G([pt(class extends Ki{})],un.prototype,"__",void 0),un=G([Et(hn),Mt()],un);const _n=un.prototype,pn=cn.prototype,gn={},{copy:yn,add:vn}=N;let fn=class extends cn{constructor(t){super(t),this.fill||(this.fill="#FFFFFF"),this.__isBranchLeaf=!0}__drawPathByData(t,e){}__updateBoxBounds(){if(this.__updateRectBoxBounds(),!this.__.clip){const{boxBounds:t}=this.__layout;yn(gn,t),super.__updateBoxBounds(),vn(t,gn)}}__updateEventBounds(){if(this.__updateRectEventBounds(),!this.__.clip){const{eventBounds:t}=this.__layout;yn(gn,t),super.__updateEventBounds(),vn(t,gn)}}__updateRenderBounds(){if(this.__updateRectRenderBounds(),!this.__.clip){const{renderBounds:t}=this.__layout;yn(gn,t),super.__updateRenderBounds(),vn(t,gn)}}__updateRectBoxBounds(){}__updateRectEventBounds(){}__updateRectRenderBounds(){}__renderRect(t,e){}__renderGroup(t,e){}};G([pt(class extends Vi{})],fn.prototype,"__",void 0),G([at(!0)],fn.prototype,"clip",void 0),G([xt(_n.__drawPathByData)],fn.prototype,"__drawPathByData",null),G([xt(_n.__updateBoxBounds)],fn.prototype,"__updateRectBoxBounds",null),G([xt(_n.__updateEventBounds)],fn.prototype,"__updateRectEventBounds",null),G([xt(_n.__updateRenderBounds)],fn.prototype,"__updateRectRenderBounds",null),G([xt(_n.__render)],fn.prototype,"__renderRect",null),G([xt(pn.__render)],fn.prototype,"__renderGroup",null),fn=G([Et(an),wt(),Mt()],fn);const{PI:mn}=Math,{begin:xn,moveTo:wn,close:Bn,ellipse:En}=qs;let bn=class extends ln{constructor(t){super(t)}__updatePath(){const{width:t,height:e,innerRadius:s,startAngle:i,endAngle:n}=this.__,o=t/2,r=e/2;xn(this.__.path=[]),s?i||n?(En(o,r,o*(1-s),r*(1-s),0,i*l,n*l,!1),En(o,r,o,r,0,n*l,i*l,!0),Bn()):(En(o,r,o*(1-s),r*(1-s),0,0,2*mn,!1),wn(t,r),En(o,r,o,r,0,0,2*mn,!0)):i||n?(wn(o,r),En(o,r,o,r,0,i*l,n*l,!1),Bn()):En(o,r,o,r,0,0,2*mn,!1)}};G([pt(class extends Ki{})],bn.prototype,"__",void 0),G([ht(0)],bn.prototype,"innerRadius",void 0),G([ht(0)],bn.prototype,"startAngle",void 0),G([ht(0)],bn.prototype,"endAngle",void 0),bn=G([Mt()],bn);const{sin:Tn,cos:Rn,PI:Cn}=Math,{begin:Pn,moveTo:Ln,lineTo:kn,close:Sn}=qs;let Mn=class extends ln{constructor(t){super(t)}__updatePath(){const{width:t,height:e,sides:s}=this.__,i=t/2,n=e/2;Pn(this.__.path=[]),Ln(i,0);for(let t=1;t<s;t++)kn(i+i*Tn(2*t*Cn/s),n-n*Rn(2*t*Cn/s));Sn()}};G([pt(class extends Ki{})],Mn.prototype,"__",void 0),G([ht(3)],Mn.prototype,"sides",void 0),Mn=G([Mt()],Mn);const{sin:Dn,cos:On,PI:An}=Math,{begin:Wn,moveTo:In,lineTo:Nn,close:Fn}=qs;let zn=class extends ln{constructor(t){super(t)}__updatePath(){const{width:t,height:e,points:s,innerRadius:i}=this.__,n=t/2,o=e/2;Wn(this.__.path=[]),In(n,0);for(let t=1;t<2*s;t++)Nn(n+(t%2==0?n:n*i)*Dn(t*An/s),o-(t%2==0?o:o*i)*On(t*An/s));Fn()}};G([pt(class extends Ki{})],zn.prototype,"__",void 0),G([ht(5)],zn.prototype,"points",void 0),G([ht(.38)],zn.prototype,"innerRadius",void 0),zn=G([Mt()],zn);const{begin:jn,moveTo:Yn,lineTo:Xn,end:Hn}=qs,{rotate:Un,getAngle:Gn,getDistance:Kn,defaultPoint:Vn}=B,{setPoint:qn,addPoint:Qn,toBounds:Zn}=R,$n={};let Jn=class extends ln{get toPoint(){if(this.__toPoint&&!this.__layout.boxBoundsChanged)return this.__toPoint;const{width:t,rotation:e}=this.__,s={x:0,y:0};return t&&(s.x=t),e&&Un(s,e),this.__toPoint=s,s}set toPoint(t){this.width=Kn(Vn,t),this.rotation=Gn(Vn,t),this.height&&(this.height=0)}constructor(t){super(t)}__updatePath(){jn(this.__.path=[]),Yn(0,0);const t=this.toPoint;Xn(t.x,t.y),Hn()}__updateBoxBounds(){qn($n,0,0),Qn($n,this.__toPoint.x,this.__toPoint.y),Zn($n,this.__layout.boxBounds)}};G([pt(class extends Ki{})],Jn.prototype,"__",void 0),G([at()],Jn.prototype,"rotation",void 0),Jn=G([Mt()],Jn);const{toTwoPointBounds:to}=Is,{toBounds:eo}=R,so={};let io=class extends ln{constructor(t){super(t)}__drawRenderPath(t){t.beginPath(),this.__drawPathByData(t,this.__.path)}__updateBoxBounds(){to(this.__.path,so),eo(so,this.__layout.boxBounds)}};G([pt(class extends Ki{setPath(t){this._path="string"==typeof t?qi(t):t}})],io.prototype,"__",void 0),G([ht()],io.prototype,"path",void 0),G([ht()],io.prototype,"windingRule",void 0),io=G([Mt()],io);let no=class extends cn{constructor(t){super(t)}__updatePath(){}};G([pt(class extends Ki{})],no.prototype,"__",void 0),G([ht()],no.prototype,"paths",void 0),no=G([Mt()],no);let oo=class extends ln{constructor(t){super(t)}__drawPathByData(t,e){const{width:s,height:i}=this.__;t.rect(0,0,s,i)}__updateBoxBounds(){const{fontFamily:t,fontSize:e,fontWeight:s,italic:i,textCase:n,lineHeight:o}=this.__,r=this.__layout.boxBounds;this.__.__font=bt.canvas.font=`${i?"italic":""} ${"small-caps"===n?"small-caps":"normal"} ${s||"normal"} ${e}px/${o||e}px ${t}`;const a=bt.canvas.measureText(this.content).width,h=e;r.x=0,r.y=.75*-e,r.width=a,r.height=h}};G([pt(class extends Ki{})],oo.prototype,"__",void 0),G([at("")],oo.prototype,"content",void 0),G([at("arial")],oo.prototype,"fontFamily",void 0),G([at(12)],oo.prototype,"fontSize",void 0),G([at("normal")],oo.prototype,"fontWeight",void 0),G([at(!1)],oo.prototype,"italic",void 0),G([at("normal")],oo.prototype,"textCase",void 0),G([at("normal")],oo.prototype,"textDecoration",void 0),G([at()],oo.prototype,"letterSpacing",void 0),G([at()],oo.prototype,"lineHeight",void 0),G([at()],oo.prototype,"paragraphIndent",void 0),G([at()],oo.prototype,"paragraphSpacing",void 0),oo=G([Et(dn),Mt()],oo);let ro=class extends un{constructor(t){super(t)}__updateBoxBounds(){this.__image=St.image(this)}drawFill(){}};G([pt(class extends Ki{})],ro.prototype,"__",void 0),G([at("")],ro.prototype,"url",void 0),G([at("")],ro.prototype,"thumb",void 0),ro=G([Mt()],ro);class ao extends cn{get isApp(){return!1}constructor(e,s){var n;super(),this.config={zoom:!0,move:!0,start:!0,pixelRatio:devicePixelRatio},this.__eventIds=[],this.__setAsLeafer(),this.__setConfig(e);const{config:o}=this;this.creator=St,this.canvas=St.canvas(o),this.renderer=St.renderer(this,this.canvas,o),this.isApp?this.__level=1:(this.watcher=St.watcher(this),this.layouter=St.layouter(this)),this.__checkAutoLayout(o),s?(null===(n=s.selector)||void 0===n||n.defaultPath.unshift(this),this.selector=s.selector,this.interaction=s.interaction,this.canvasManager=s.canvasManager,this.hitCanvasManager=s.hitCanvasManager,this.imageManager=s.imageManager,s.running&&setTimeout(this.start.bind(this))):(this.selector=St.selector(this),this.interaction=St.interaction(this,this.canvas,this.selector,o),this.canvasManager=new t(this),this.hitCanvasManager=new i(this),this.imageManager=new Ie(this,o),$.start("FullCreate"),o.start&&setTimeout(this.start.bind(this))),this.canvasManager.add(this.canvas),this.__listenEvents()}__listenEvents(){this.once(Kt.END,this.__setAsRoot.bind(this))}__removeListenEvents(){this.off__(this.__eventIds)}__setConfig(t){t&&(this.config=n.default(t,this.config))}__checkAutoLayout(t){t.width&&t.height||(this.autoLayout=new X(t),this.canvas.autoLayout(this.autoLayout,this.__onResize.bind(this)))}start(){var t;this.running||($.endOfName("FullCreate"),this.__interactiveWindow(),null===(t=this.interaction)||void 0===t||t.start(),this.renderer.start(),this.layouter.start(),this.watcher.start(),this.running=!0)}stop(){var t;this.running&&(null===(t=this.interaction)||void 0===t||t.stop(),this.watcher.stop(),this.layouter.stop(),this.renderer.stop(),this.running=!1)}__interactiveWindow(){const{zoom:t,move:e}=this.config;if(e){const{MOVE:e}=Me,{ZOOM:s}=Ae;this.hasEvent(e)||this.__eventIds.push(this.on__(e,(t=>{de.moveOfWorld(this,t.moveX,t.moveY)}))),t&&!this.hasEvent(s)&&this.__eventIds.push(this.on__(s,(t=>{de.zoomOfWorld(this,t.scale,t)})))}}resize(t){if(this.canvas.isSameSize(t))return;const{width:e,height:s,pixelRatio:i}=this.canvas,n={width:e,height:s,pixelRatio:i};this.canvas.resize(t),this.__onResize(new Ht(t,n))}__onResize(t){this.emitEvent(t),setTimeout((()=>{this.canvasManager.clearRecycled()}),0)}destory(){var t;this.canvas&&(super.destroy(),this.__removeListenEvents(),this.parent||(null===(t=this.interaction)||void 0===t||t.destroy(),this.selector.destroy(),this.renderer.destroy(),this.watcher.destroy(),this.layouter.destroy(),this.canvasManager.destory(),this.hitCanvasManager.destory(),this.imageManager.destory()),this.canvas.destroy(),this.canvas=null,this.creator=null,this.config=null,this.interaction=null,this.selector=null,this.renderer=null,this.watcher=null,this.layouter=null,this.canvasManager=null,this.hitCanvasManager=null,this.imageManager=null,this.zoomLayer=null,this.moveLayer=void 0,this.parent=void 0)}}function ho(){return(t,e)=>{const s={get(){return this.canvas[e]},set(t){const{width:s,height:i,pixelRatio:n}=this.canvas,o={width:s,height:i,pixelRatio:n};o[e]=t,this.resize(o)}};Object.defineProperty(t,e,s)}}G([ho()],ao.prototype,"width",void 0),G([ho()],ao.prototype,"height",void 0),G([ho()],ao.prototype,"pixelRatio",void 0);class lo extends ao{get isApp(){return!0}constructor(t){super(t),this.children=[]}start(){this.children.forEach((t=>{t.start()})),this.renderer.start(),this.running=!0}stop(){this.children.forEach((t=>{t.stop()})),this.renderer.stop(),this.running=!1}addLeafer(t){const e=new ao(this.__getChildConfig(t),this);this.add(e);const{renderer:s}=this;return this.__eventIds.push(e.on__(Kt.END,this.__onChildLayoutEnd,this),e.on__(Vt.END,s.update,s),this.on__(Kt.REQUEST,s.mergeBlocks,s)),e}__onChildLayoutEnd(t){const{renderer:e}=this;t.current.config.usePartRender?t.data.map((t=>e.addBlock(t.updatedBounds))):e.addBlock(e.canvas.bounds)}__render(t,e){this.children.forEach((e=>{t.copy(e.canvas)}))}__onResize(t){this.emitEvent(t),this.children.forEach((e=>{e.resize(t)}))}__getChildConfig(t){let e=Object.assign({},this.config);return(t=t?n.default(t,e):e).view=null,this.autoLayout&&(t.width=this.width,t.height=this.height,t.pixelRatio=this.pixelRatio),t}destory(){super.destory();const{children:t}=this;t.length&&(t.forEach((t=>t.destory())),t.length=0)}}export{en as Animate,lo as App,Yt as AttrEvent,X as AutoBounds,ts as BezierHelper,Y as Bounds,N as BoundsHelper,Ee as Branch,ge as BranchHelper,t as CanvasManager,jt as ChildEvent,St as Creator,n as DataHelper,V as Debug,Le as DragEvent,Se as DropEvent,Ji as Effect,bn as Ellipse,zt as Event,Rt as EventCreator,sn as Export,fn as Frame,an as FrameRender,cn as Group,i as HitCanvasManager,ro as Image,Ie as ImageManager,a as IncrementId,Ui as Interaction,We as KeyEvent,Te as Keyboard,Kt as LayoutEvent,pi as Layouter,he as Leaf,ee as LeafBounds,pe as LeafBoundsHelper,r as LeafData,qt as LeafDataProxy,Nt as LeafEventer,de as LeafHelper,ne as LeafHit,s as LeafLevelList,e as LeafList,Jt as LeafMatrix,oe as LeafRender,ao as Leafer,Ri as LeaferCanvas,Ci as LeaferImage,Jn as Line,d as MathHelper,T as Matrix,_ as MatrixHelper,Me as MoveEvent,Xe as NumberPathCommandLengthMap,Ye as NumberPathCommandMap,l as OneRadian,tn as Paint,io as Path,Ne as PathCommandMap,ze as PathCommandNeedConvertMap,Es as PathConvert,qs as PathCreator,Is as PathHelper,bt as Platform,Zs as Plugin,b as Point,B as PointHelper,Re as PointerButton,Pe as PointerEvent,Mn as Polygon,un as Rect,hn as RectRender,Vt as RenderEvent,yi as Renderer,Ht as ResizeEvent,De as RotateEvent,$ as Run,mi as Selector,zn as Star,U as StringNumberMap,Oe as SwipeEvent,Js as TaskItem,ei as TaskProcessor,oo as Text,dn as TextRender,Ut as TransformEvent,H as TwoPointBounds,R as TwoPointBoundsHelper,ln as UI,Zi as UIBounds,Lt as UICreator,Ce as UIEvent,$i as UIHit,rn as UIRender,no as Vector,Gt as WatchEvent,si as Watcher,Ae as ZoomEvent,dt as affectEventBoundsType,lt as affectRenderBoundsType,st as aliasType,at as boundsType,pt as dataProcessor,it as dataType,yt as defineDataProcessor,tt as defineKey,Gi as effectType,et as getDescriptor,gt as layoutProcessor,ut as opacityType,ht as pathType,nt as positionType,Dt as registerEvent,Mt as registerUI,xt as rewrite,wt as rewriteAble,rt as rotationType,ot as scaleType,_t as sortType,ct as surfaceType,Et as useModule,$s as usePlugin};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "leafer-ui",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-bate.1",
|
|
4
4
|
"author": "Chao (Leafer) Wan",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"engine"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@leafer-ui/web": "1.0.0-alpha.
|
|
29
|
-
"@leafer-ui/interface": "1.0.0-alpha.
|
|
30
|
-
"@leafer/interface": "1.0.0-alpha.
|
|
28
|
+
"@leafer-ui/web": "1.0.0-alpha.10",
|
|
29
|
+
"@leafer-ui/interface": "1.0.0-alpha.10",
|
|
30
|
+
"@leafer/interface": "1.0.0-alpha.10"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/leafer/packages/canvas/canvas/src/CanvasManager.ts","../../../../src/leafer/packages/list/src/LeafList.ts","../../../../src/leafer/packages/list/src/LeafLevelList.ts","../../../../src/leafer/packages/canvas/canvas/src/HitCanvasManager.ts","../../../../src/leafer/packages/data/src/DataHelper.ts","../../../../src/leafer/packages/data/src/LeafData.ts","../../../../src/leafer/packages/math/src/IncrementId.ts","../../../../src/leafer/packages/math/src/MathHelper.ts","../../../../src/leafer/packages/math/src/MatrixHelper.ts","../../../../src/leafer/packages/math/src/PointHelper.ts","../../../../src/leafer/packages/math/src/Point.ts","../../../../src/leafer/packages/math/src/Matrix.ts","../../../../src/leafer/packages/math/src/TwoPointBoundsHelper.ts","../../../../src/leafer/packages/math/src/BoundsHelper.ts","../../../../src/leafer/packages/math/src/Bounds.ts","../../../../src/leafer/packages/math/src/AutoBounds.ts","../../../../src/leafer/packages/math/src/TwoPointBounds.ts","../../../../src/leafer/packages/math/src/StringNumber.ts","../../../node_modules/tslib/tslib.es6.js","../../../../src/leafer/packages/debug/src/Debug.ts","../../../../src/leafer/packages/debug/src/Run.ts","../../../../src/leafer/packages/decorator/src/object.ts","../../../../src/leafer/packages/decorator/src/data.ts","../../../../src/leafer/packages/decorator/src/rewrite.ts","../../../../src/leafer/packages/platform/platform/src/Platform.ts","../../../../src/leafer/packages/platform/platform/src/creator/EventCreator.ts","../../../../src/leafer/packages/platform/platform/src/creator/UICreator.ts","../../../../src/leafer/packages/platform/platform/src/creator/Creator.ts","../../../../src/leafer/packages/decorator/src/class.ts","../../../../src/leafer/packages/layout/src/LeafLayout.ts","../../../../src/leafer/packages/display-module/src/LeafEventer.ts","../../../../src/leafer/packages/event/event/src/Event.ts","../../../../src/leafer/packages/event/event/src/ChildEvent.ts","../../../../src/leafer/packages/event/event/src/AttrEvent.ts","../../../../src/leafer/packages/event/event/src/ResizeEvent.ts","../../../../src/leafer/packages/event/event/src/TransformEvent.ts","../../../../src/leafer/packages/event/event/src/WatchEvent.ts","../../../../src/leafer/packages/event/event/src/LayoutEvent.ts","../../../../src/leafer/packages/event/event/src/RenderEvent.ts","../../../../src/leafer/packages/display-module/src/LeafDataProxy.ts","../../../../src/leafer/packages/display-module/src/LeafMatrix.ts","../../../../src/leafer/packages/display-module/src/LeafBounds.ts","../../../../src/leafer/packages/display-module/src/LeafHit.ts","../../../../src/leafer/packages/display-module/src/LeafRender.ts","../../../../src/leafer/packages/display/src/Leaf.ts","../../../../src/leafer/packages/helper/src/LeafHelper.ts","../../../../src/leafer/packages/helper/src/LeafBoundsHelper.ts","../../../../src/leafer/packages/helper/src/BranchHelper.ts","../../../../src/leafer/packages/display/src/Branch.ts","../../../../src/leafer/packages/event/event-ui/src/Keyboard.ts","../../../../src/leafer/packages/event/event-ui/src/PointerButton.ts","../../../../src/leafer/packages/event/event-ui/src/UIEvent.ts","../../../../src/leafer/packages/event/event-ui/src/PointerEvent.ts","../../../../src/leafer/packages/event/event-ui/src/DragEvent.ts","../../../../src/leafer/packages/event/event-ui/src/DropEvent.ts","../../../../src/leafer/packages/event/event-ui/src/MoveEvent.ts","../../../../src/leafer/packages/event/event-ui/src/RotateEvent.ts","../../../../src/leafer/packages/event/event-ui/src/SwipeEvent.ts","../../../../src/leafer/packages/event/event-ui/src/ZoomEvent.ts","../../../../src/leafer/packages/event/event-ui/src/KeyEvent.ts","../../../../src/leafer/packages/image/image/src/ImageManager.ts","../../../../src/leafer/packages/path/src/PathCommandMap.ts","../../../../src/leafer/packages/path/src/BezierHelper.ts","../../../../src/leafer/packages/path/src/PathConvert.ts","../../../../src/leafer/packages/path/src/PathHelper.ts","../../../../src/leafer/packages/path/src/PathCreator.ts","../../../../src/leafer/packages/plugin/src/index.ts","../../../../src/leafer/packages/task/src/TaskItem.ts","../../../../src/leafer/packages/task/src/TaskProcessor.ts","../../../../src/leafer/packages/watcher/src/Watcher.ts","../../../../src/leafer/packages/layouter/src/LayouterHelper.ts","../../../../src/leafer/packages/layouter/src/LayoutBlockData.ts","../../../../src/leafer/packages/layouter/src/Layouter.ts","../../../../src/leafer/packages/renderer/src/Renderer.ts","../../../../src/leafer/packages/selector/src/PathFinder.ts","../../../../src/leafer/packages/selector/src/Selector.ts","../../../../src/leafer/packages/canvas/canvas-web/src/CanvasBase.ts","../../../../src/leafer/packages/canvas/canvas-web/src/LeaferCanvas.ts","../../../../src/leafer/packages/canvas/canvas-web/src/patch/roundRect.ts","../../../../src/leafer/packages/image/image-web/src/LeaferImage.ts","../../../../src/leafer/packages/interaction/interaction/src/Transformer.ts","../../../../src/leafer/packages/interaction/interaction/src/InteractionHelper.ts","../../../../src/leafer/packages/interaction/interaction/src/Dragger.ts","../../../../src/leafer/packages/interaction/interaction/src/Interaction.ts","../../../../src/leafer/packages/interaction/interaction/src/emit.ts","../../../../src/leafer/packages/interaction/interaction-web/src/PointerEventHelper.ts","../../../../src/leafer/packages/interaction/interaction-web/src/MutiTouchHelper.ts","../../../../src/leafer/packages/interaction/interaction-web/src/WheelEventHelper.ts","../../../../src/leafer/packages/interaction/interaction-web/src/Interaction.ts","../../../../src/ui/packages/decorator/src/data.ts","../../../../src/leafer/packages/platform/web/src/index.ts","../../../../src/ui/packages/data/src/UIData.ts","../../../../src/ui/packages/data/src/GroupData.ts","../../../../src/ui/packages/data/src/PathData.ts","../../../../src/ui/packages/bounds/src/UIBounds.ts","../../../../src/ui/packages/hit/src/UIHit.ts","../../../../src/ui/packages/external/src/Effect.ts","../../../../src/ui/packages/external/src/Paint.ts","../../../../src/ui/packages/external/src/Animate.ts","../../../../src/ui/packages/external/src/Export.ts","../../../../src/ui/packages/paint/src/Stroke.ts","../../../../src/ui/packages/paint/src/Fill.ts","../../../../src/ui/packages/external/src/index.ts","../../../../src/ui/packages/render/src/UIRender.ts","../../../../src/ui/packages/render/src/FrameRender.ts","../../../../src/ui/packages/render/src/RectRender.ts","../../../../src/ui/packages/render/src/TextRender.ts","../../../../src/ui/packages/display/src/UI.ts","../../../../src/ui/packages/display/src/Group.ts","../../../../src/ui/packages/display/src/Rect.ts","../../../../src/ui/packages/data/src/RectData.ts","../../../../src/ui/packages/display/src/Frame.ts","../../../../src/ui/packages/data/src/FrameData.ts","../../../../src/ui/packages/display/src/Ellipse.ts","../../../../src/ui/packages/data/src/EllipseData.ts","../../../../src/ui/packages/display/src/Polygon.ts","../../../../src/ui/packages/data/src/PolygonData.ts","../../../../src/ui/packages/display/src/Star.ts","../../../../src/ui/packages/data/src/StarData.ts","../../../../src/ui/packages/display/src/Line.ts","../../../../src/ui/packages/data/src/LineData.ts","../../../../src/ui/packages/display/src/Path.ts","../../../../src/ui/packages/display/src/Vector.ts","../../../../src/ui/packages/data/src/VectorData.ts","../../../../src/ui/packages/display/src/Text.ts","../../../../src/ui/packages/data/src/TextData.ts","../../../../src/ui/packages/display/src/Image.ts","../../../../src/ui/packages/data/src/ImageData.ts","../../../../src/ui/packages/app/src/Leafer.ts","../../../../src/ui/packages/app/src/SuperLeafer.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["CanvasManager","constructor","leafer","this","list","add","canvas","manager","push","get","size","old","i","len","length","recycled","isSameSize","creator","recycle","clear","clearRecycled","filter","destroy","forEach","item","destory","undefined","LeafList","reset","Array","pushList","has","leaf","keys","innerId","indexAt","index","indexOf","unshift","Object","sort","reverse","a","b","__level","remove","findIndex","splice","itemCallback","clone","LeafLevelList","_length","without","levels","levelMap","level","HitCanvasManager","pathTypeList","imageTypeList","getImageType","hitCanvas","getPathType","clearImageType","__clearLeafList","clearPathType","leafList","__hitCanvas","DataHelper","default","data","defaultData","assign","merge","value","key","_a","JSON","parse","stringify","LeafData","__leaf","__setInput","name","__input","__getInput","__setMiddle","__middle","__getMiddle","IncrementId","RUNTIME","LEAF","TASK","CNAVAS","types","create","typeName","I","MathHelper","within","min","max","OneRadian","Math","PI","sin","cos","MatrixHelper","defaultMatrix","c","d","e","f","tempMatrix","set","t","copy","matrix","translate","x","y","scale","rotate","angle","rotation","cosR","sinR","times","divide","M","tempInvert","temp","invert","s","toWorldPoint","local","setWorld","toLocalPoint","world","setLocal","fromOrigin","empty","abs","sqrt","atan2","PointHelper","defaultPoint","tempPoint","tempRadiusPoint","point","center","P","rx","ry","tempToLocal","tempToLocalRadiusPoint","toLocalRadiusPoint","radiusX","radiusY","toLocal","toWorld","getCenter","to","getDistance","getAngle","getAtan2","getDistancePoint","distance","r","Point","Matrix","TwoPointBoundsHelper","tempPointBounds","setPoint","minX","minY","maxX","maxY","addPoint","pb","toBounds","setBounds","width","height","TB","right","bottom","boundsRight","boundsBottom","toPoint","BoundsHelper","tempBounds","bounds","copyAndSpread","spread","B","move","getByMove","getOutOfBounds","offsetX","offsetY","ot","tempTimesMatrix","setByBoundsTimesMatrix","timesMatrix","getByTimesMatrix","divideMatrix","getFitMatrix","put","getSpread","n","ceil","floor","addList","setByListWithHandle","setByList","addMode","addListWithHandle","boundsDataHandle","first","setByPoints","points","hitRadiusPoint","pointMatrix","hitPoint","hit","other","otherMatrix","includes","getIntersectData","setByIntersect","isSame","isEmpty","Bounds","boundsList","fromBounds","fromMatrix","boundsMatrix","getIntersect","AutoBounds","top","left","autoSize","getBoundsFrom","parent","TwoPointBounds","StringNumberMap","E","__decorate","decorators","target","desc","arguments","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__awaiter","thisArg","_arguments","generator","Promise","resolve","reject","fulfilled","step","next","rejected","result","done","then","apply","Debug","static","filterList","exclude","excludeList","log","messages","D","enable","every","some","console","warn","error","defaultValue","__","debug","Run","microsecond","id","R","currentId","idMap","performance","now","Date","currentName","nameMap","nameToIdMap","time","end","defineKey","descriptor","getDescriptor","object","aliasType","__get","root","__set","dataType","defineDataProcessor","positionType","__layout","positionChanged","positionChange","scaleType","scaleChanged","scaleChange","rotationType","rotationChanged","rotationChange","boundsType","boxBoundsChanged","boxBoundsChange","pathType","affectEventBoundsType","eventBoundsChanged","eventBoundsChange","affectRenderBoundsType","renderBoundsChanged","renderBoundsChange","surfaceType","surfaceChanged","surfaceChange","opacityType","opacityChanged","opacityChange","sortType","childrenSortChanged","__addParentWait","dataProcessor","processor","layoutProcessor","__DataProcessor","prototype","computedKey","setMethodName","charAt","toUpperCase","slice","getSetMethodName","property","v","excludeNames","rewrite","method","run","rewriteAble","doRewrite","useModule","child","getOwnPropertyNames","writable","setTimeout","Platform","EventCreator","typeList","register","Event","type","params","UICreator","UI","tag","Creator","ui","event","registerUI","registerEvent","LeafLayout","renderBounds","eventBounds","boxBounds","relativeRenderBounds","relativeEventBounds","__relative","update","watcher","changed","running","start","layouter","layout","getTransform","__world","getBounds","getWorldBoxBounds","getWorldEventBounds","_worldBoxBounds","_worldEventBounds","eventBoundsSpreadCancel","same","renderBoundsSpreadCancel","eventBoundsSpread","renderBoundsSpreadWidth","renderBoundsSpread","localBoxBoundsChanged","localBoxBoundsChange","hitCanvasChanged","boundsChanged","eventBoundsSpreadWidth","matrixChanged","_scaleOrRotationChange","affectRotation","affectScaleOrRotation","LeafEventer","on","listener","options","capture","once","events","isBoolean","map","__getListenerMap","split","off","on__","bind","off__","emit","isStopNow","emitEvent","current","hasEvent","__bubbleMap","__captureMap","eventer","bubbles","stopDefault","isStopDefault","stopNow","isStop","stop","ChildEvent","super","ADD","REMOVE","AttrEvent","attrName","oldValue","newValue","CHANGE","ResizeEvent","ResizeEvent_1","oldSize","realSize","RESIZE","bigger","smaller","samePixelRatio","pixelRatio","TransformEvent","BEFORE","AFTER","PRE_BEFORE","PRE_CHANGE","PRE_AFTER","WatchEvent","REQUEST","DATA","LayoutEvent","START","BEFORE_ONCE","ONCE","AFTER_ONCE","AGAIN","LAYOUT","END","RenderEvent","RENDER","LeafDataProxy","__updateAttr","LeafMatrix","__updateWorldMatrix","pw","w","__updateRelativeMatrix","scaleX","scaleY","skewX","skewY","LeafBounds","__updateWorldBounds","resize","__updatePath","__updateRenderPath","__updateBoxBounds","__updateRelativeBoxBounds","__updateEventBoundsSpreadWidth","__updateEventBounds","__updateRelativeEventBounds","_b","__updateRenderBoundsSpreadWidth","__updateRenderBounds","__updateRelativeRenderBounds","_c","__onUpdateSize","innerPoint","LeafHit","__updateHitCanvas","hitCanvasManager","__drawRenderPath","__hitWorld","__hit","LeafRender","__render","__worldOpacity","opacity","__complex","__draw","__drawFast","__updateWorldOpacity","visible","Leaf","__renderTime","__LayoutProcessor","__parentWait","__runParentWait","__setAsLeafer","__setAsRoot","__bindRoot","__isRoot","__isBranch","children","__updateChange","__drawPath","__updateSortChildren","LeafHelper","updateAllWorldMatrix","updateAllWorldOpacity","updateAllChange","moveByWorld","worldX","worldY","L","zoomByWorld","moveLayer","zoom","centerX","centerY","rotateByWorld","LeafBoundsHelper","worldBounds","relativeBoxBounds","BranchHelper","zIndex","__tempNumber","pushAllChildBranch","branch","__childBranchNumber","pushAllParent","pushAllBranchStack","updateWorldBoundsByBranchStack","branchStack","j","localBoxBounds","localEventBounds","localRenderBounds","Branch","hideBounds","downKeyMap","Keyboard","hasDownCode","code","PointerButton","buttons","UIEvent","spaceKey","isHoldSpaceKey","middle","PointerEvent","POINTER","BEFORE_DOWN","BEFORE_MOVE","BEFORE_UP","DOWN","MOVE","UP","ENTER","LEAVE","TAP","CLICK","DOUBLE_CLICK","LONG_PRESS","LONG_TAP","DragEvent","DRAG","DropEvent","DropEvent_1","dragList","DROP","MoveEvent","RotateEvent","ROTATE","SwipeEvent","SWIPE","LEFT","RIGHT","ZoomEvent","ZOOM","KeyEvent","PRESS","ImageManager","config","load","PathCommandMap","m","l","H","h","V","C","S","Q","q","T","A","Z","z","rect","roundRect","ellipse","arc","arcTo","PathCommandLengthMap","PathCommandNeedConvertMap","NumberPathCommandMap","NumberPathCommandLengthMap","BezierHelper","getFromACommand","fromX","fromY","rotateAngle","largeFlag","sweepFlag","toX","toY","localToX","localToY","sinRotation","cosRotation","ax","ay","rxSquare","rySquare","pySquare","pxSquare","sr","cx","cy","cx1","cy1","r1","r2","totalRadian","segments","segmentRadian","sinSegmentRadian2","sinSegmentRadian4","controlRadian","cosEnd","sinEnd","x1","y1","x2","y2","startRadian","endRadian","cosStart","sinStart","startX","startY","toTwoPointBounds","pointBounds","tList","t1","t2","sqrtV","z1","z2","o","getPointAndSet","getPoint","Command","PathConvert","count","command","lastCommand","str","NumberCommandLength","CommandName","pathString","convert","needConvert","char","num","pushData","Number","CommandLength","NeedConvertCommand","convertToSimple","controlX","controlY","smooth","PathHelper","applyCorner","cornerRadius","cornerSmoothing","setPointBounds","drawData","drawer","moveTo","lineTo","bezierCurveTo","quadraticCurveTo","closePath","PathCreator","begin","commandData","close","startAngle","endAngle","counterclockwise","radius","Plugin","usePlugin","plugin","dependencies","realParams","TaskItem","task","taskTime","isComplete","complete","TaskProcessor","parallel","init","_isComplete","_running","percent","totalTime","runTime","isNaN","total","runIndex","parallelSuccessNumber","parallelList","pause","resume","skip","taskCallback","addParallel","addEmpty","callback","setParallelList","runParallelTask","runTask","onTask","nextTask","catch","onError","fillParallelTask","onParallelError","pop","parallelWaitNumber","nextIndex","onComplete","Watcher","userConfig","updatedList","totalTimes","listenEvents","eventIds","onAttrChange","onChildEvent","onRquestData","removeListenEvents","LayoutBlockData","updatedBounds","beforeBounds","afterBounds","setBefore","setAfter","__computeChange","changedBounds","Layouter","partLayout","maxTimes","levelList","layoutOnce","onReceiveWatchData","onChange","updateList","layoutedBlocks","fullLayout","blocks","getBlocks","updateMatrix","itemList","jLen","updateBounds","updateChange","setBlocks","__checkAgain","createBlock","Renderer","FPS","maxFPS","_changed","requestRender","onRequest","onLayoutEnd","renderOnce","onResize","requestLayout","render","partRender","fullRender","block","clipRender","save","clearBounds","showRepaint","strokeBounds","clipBounds","restore","startTime","PathFinder","selector","getHitPointPath","hitRadius","through","eachFind","defaultPath","path","getPath","throughPath","eachThroughFind","__interactionOff","__childrenInteractionOff","__isBranchLeaf","hitChild","Selector","innerIdList","idList","classNameList","tagNameList","pathFinder","onRemoveChild","find","getByInnerId","startsWith","getById","substring","getByClassName","getByTagName","cache","loopFind","className","contextAttr","realName","context","contextMethodNameList","contextMethod","CanvasBase","bindContextMethod","setTransform","resetTransform","fill","path2d","rule","stroke","clip","fillRect","strokeRect","clearRect","drawImage","image","sx","sy","sw","sh","dx","dy","dw","dh","beginPath","cp1x","cp1y","cp2x","cp2y","cpx","cpy","createConicGradient","createLinearGradient","x0","y0","createPattern","repetition","createRadialGradient","r0","fillText","text","maxWidth","measureText","strokeText","minSize","LeaferCanvas","view","realView","document","getElementById","HTMLCanvasElement","window","div","createElement","style","position","overflow","body","appendChild","webgl","getContext","backgroundColor","pixelWidth","pixelHeight","pixel","autoLayout","autoBounds","check","parentSize","marginLeft","marginTop","resizeObserver","ResizeObserver","entries","entry","contentRect","parentElement","observe","getBoundingClientRect","stopAutoLayout","disconnect","takeCanvas","getSameCanvas","parentMatrix","onlyTranslate","useSameTransform","setStroke","strokeStyle","strokeWidth","strokeCap","strokeJoin","dashPattern","miterLimit","setShadow","blur","color","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","setBlur","hitPath","fillRule","isPointInPath","hitStroke","isPointInStroke","replaceBy","from","blendMode","copyWorldToLocal","fromWorld","toLocalBounds","fillBounds","fillStyle","getBiggerCanvas","addWidth","addHeight","CanvasRenderingContext2D","Path2D","topLeft","topRight","bottomRight","bottomLeft","LeaferImage","Transformer","interaction","moveData","moveX","moveY","transformEndWait","zoomData","rotateData","clearTimeout","transformTimer","transformEnd","pointer","transformTime","moveEnd","zoomEnd","rotateEnd","transformMode","InteractionHelper","getMoveEventData","getRotateEventData","getZoomEventData","getDragEventData","startPoint","lastPoint","totalX","totalY","getDropEventData","dragData","getSwipeDirection","getSwipeEventData","lastDragData","getBase","altKey","ctrlKey","shiftKey","metaKey","pathHasEventType","filterPathByEventType","Dragger","setDragData","getDragList","dragging","checkDrag","canDrag","downData","moving","pointerCancel","dragStart","dragDragableList","getDragableList","draggable","dragableList","dropEnterOrLeave","dropEnterPath","dragEnd","endDragData","swipe","drop","autoMoveCancel","dragReset","swipeDistance","swipeData","dropData","checkDragOut","shrinkCanvasBounds","autoMoveOnDragOut","autoMoveDistance","autoMoveTimer","setInterval","pointerMoveReal","clearInterval","InteractionBase","wheel","zoomMode","zoomSpeed","moveSpeed","rotateSpeed","delta","clickTime","longPressTime","dragDistance","clickCount","transformer","dragger","pointerDown","downTime","tapWait","longPressWait","pointerMove","waitTap","pointerWaitCancel","pointerMoveIgnore","pointerEnterOrLeave","pointerUp","touchLeave","tap","longTap","enterPath","pointerType","tapWaitCancel","clickTimer","longPressWaitCancel","longPressTimer","longPressed","excludePath","phase","PointerEventHelper","base","pressure","tangentialPressure","tiltX","tiltY","twist","convertMouse","convertTouch","touch","getTouch","force","targetTouches","changedTouches","MutiTouchHelper","getData","lastCenter","lastDistance","lastAngle","currentAngle","getChangedAngle","getTouches","touches","countFirefoxWheel","WheelEventHelper","getMove","deltaX","deltaY","getScale","firefoxWheel","mozInputSource","Interaction","viewEvents","pointerdown","onPointerDown","mousedown","onMouseDown","touchstart","onTouchStart","onWheel","gesturestart","onGesturestart","gesturechange","onGesturechange","gestureend","onGestureend","windowEvents","pointermove","onPointerMove","pointerup","onPointerUp","pointercancel","onPointerCancel","mousemove","onMouseMove","mouseup","onMouseUp","touchmove","onTouchMove","touchend","onTouchEnd","touchcancel","onTouchCancel","keydown","onKeyDown","keyup","onKeyUp","addEventListener","oncontextmenu","removeEventListener","clientBounds","getLocal","p","clientX","clientY","setDownCode","setUpCode","usePointer","useMutiTouch","preventDefault","useTouch","onMouseCancel","mutiTouchStart","touchTimer","mutiTouchMove","mutiTouchEnd","touch0","identifier","touch1","eventBase","lastGestureScale","lastGestureRotation","changeScale","changeAngle","effectType","__useEffect","renderer","requestAnimationFrame","UIData","setBorderWidth","_strokeWidth","_borderWidth","setFill","_fill","__isFills","_stroke","__isStrokes","_shadow","setInnerShadow","_innerShadow","GroupData","UIBounds","strokeAlign","miterLength","__strokeOuterWidth","shadow","innerShadow","backgroundBlur","renderShapeBoundsSpreadWidth","UIHit","windingRule","Effect","Paint","Animate","Export","drawStrokesStyle","strokes","fills","out","UIPaint","UIRender","borderRadius","FrameRender","__renderRect","__renderGroup","RectRender","half","TextRender","content","__font","font","worldTransform","relativeTransform","worldBoxBounds","worldRenderBounds","__renderPath","__drawPathByData","Group","addAt","addAfter","after","addBefore","before","Rect","group","Frame","__updateRectBoxBounds","__updateRectEventBounds","__updateRectRenderBounds","Ellipse","innerRadius","Polygon","sides","Star","Line","__to","Path","setPath","_path","Vector","Text","fontFamily","fontSize","fontWeight","italic","textCase","lineHeight","Image","Leafer","parentLeafer","devicePixelRatio","__eventIds","__setConfig","isSupperLeafer","__checkAutoLayout","canvasManager","imageManager","__listenEvents","__removeListenEvents","__onResize","__interactiveWindow","zoomLayer","resizeType","SuperLeafer","addLeafer","__getChildConfig"],"mappings":"MAGaA,EAMTC,YAAYC,GAFLC,KAAIC,KAAoB,GAG3BD,KAAKD,OAASA,CACjB,CAEMG,IAAIC,GACPA,EAAOC,QAAUJ,KACjBA,KAAKC,KAAKI,KAAKF,EAClB,CAEMG,IAAIC,GACP,IAAIC,EACJ,MAAMP,KAAEA,GAASD,KACjB,IAAK,IAAIS,EAAI,EAAGC,EAAMT,EAAKU,OAAQF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