diff --git a/dist/editor.js b/dist/editor.js index 488c4486e..c72c5239e 100644 --- a/dist/editor.js +++ b/dist/editor.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.EasylogicStudio=e():t.EasylogicStudio=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=29)}([function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"randomNumber",(function(){return M})),n.d(r,"randomByCount",(function(){return D})),n.d(r,"random",(function(){return I})),n.d(r,"randomRGBA",(function(){return L}));var i={};n.r(i),n.d(i,"create",(function(){return z})),n.d(i,"clone",(function(){return F})),n.d(i,"copy",(function(){return B})),n.d(i,"fromValues",(function(){return G})),n.d(i,"set",(function(){return H})),n.d(i,"identity",(function(){return N})),n.d(i,"transpose",(function(){return X})),n.d(i,"invert",(function(){return Y})),n.d(i,"adjoint",(function(){return _})),n.d(i,"determinant",(function(){return K})),n.d(i,"multiply",(function(){return W})),n.d(i,"translate",(function(){return U})),n.d(i,"scale",(function(){return Z})),n.d(i,"rotate",(function(){return q})),n.d(i,"rotateX",(function(){return J})),n.d(i,"rotateY",(function(){return Q})),n.d(i,"rotateZ",(function(){return tt})),n.d(i,"fromTranslation",(function(){return et})),n.d(i,"fromScaling",(function(){return nt})),n.d(i,"fromRotation",(function(){return rt})),n.d(i,"fromXRotation",(function(){return it})),n.d(i,"fromYRotation",(function(){return at})),n.d(i,"fromZRotation",(function(){return ot})),n.d(i,"fromRotationTranslation",(function(){return st})),n.d(i,"fromQuat2",(function(){return ct})),n.d(i,"getTranslation",(function(){return lt})),n.d(i,"getScaling",(function(){return ut})),n.d(i,"getRotation",(function(){return ht})),n.d(i,"fromRotationTranslationScale",(function(){return pt})),n.d(i,"fromRotationTranslationScaleOrigin",(function(){return dt})),n.d(i,"fromQuat",(function(){return ft})),n.d(i,"frustum",(function(){return vt})),n.d(i,"perspective",(function(){return yt})),n.d(i,"perspectiveFromFieldOfView",(function(){return gt})),n.d(i,"ortho",(function(){return mt})),n.d(i,"lookAt",(function(){return bt})),n.d(i,"targetTo",(function(){return kt})),n.d(i,"str",(function(){return xt})),n.d(i,"frob",(function(){return wt})),n.d(i,"add",(function(){return St})),n.d(i,"subtract",(function(){return Pt})),n.d(i,"multiplyScalar",(function(){return jt})),n.d(i,"multiplyScalarAndAdd",(function(){return Ot})),n.d(i,"exactEquals",(function(){return $t})),n.d(i,"equals",(function(){return Ct})),n.d(i,"mul",(function(){return Et})),n.d(i,"sub",(function(){return Tt}));var a={};n.r(a),n.d(a,"create",(function(){return Vt})),n.d(a,"clone",(function(){return Mt})),n.d(a,"length",(function(){return Dt})),n.d(a,"fromValues",(function(){return It})),n.d(a,"copy",(function(){return Lt})),n.d(a,"set",(function(){return Rt})),n.d(a,"add",(function(){return At})),n.d(a,"subtract",(function(){return zt})),n.d(a,"multiply",(function(){return Ft})),n.d(a,"divide",(function(){return Bt})),n.d(a,"ceil",(function(){return Gt})),n.d(a,"floor",(function(){return Ht})),n.d(a,"min",(function(){return Nt})),n.d(a,"max",(function(){return Xt})),n.d(a,"round",(function(){return Yt})),n.d(a,"scale",(function(){return _t})),n.d(a,"scaleAndAdd",(function(){return Kt})),n.d(a,"distance",(function(){return Wt})),n.d(a,"squaredDistance",(function(){return Ut})),n.d(a,"squaredLength",(function(){return Zt})),n.d(a,"negate",(function(){return qt})),n.d(a,"inverse",(function(){return Jt})),n.d(a,"normalize",(function(){return Qt})),n.d(a,"dot",(function(){return te})),n.d(a,"cross",(function(){return ee})),n.d(a,"lerp",(function(){return ne})),n.d(a,"hermite",(function(){return re})),n.d(a,"bezier",(function(){return ie})),n.d(a,"random",(function(){return ae})),n.d(a,"transformMat4",(function(){return oe})),n.d(a,"transformMat3",(function(){return se})),n.d(a,"transformQuat",(function(){return ce})),n.d(a,"rotateX",(function(){return le})),n.d(a,"rotateY",(function(){return ue})),n.d(a,"rotateZ",(function(){return he})),n.d(a,"angle",(function(){return pe})),n.d(a,"zero",(function(){return de})),n.d(a,"str",(function(){return fe})),n.d(a,"exactEquals",(function(){return ve})),n.d(a,"equals",(function(){return ye})),n.d(a,"sub",(function(){return me})),n.d(a,"mul",(function(){return be})),n.d(a,"div",(function(){return ke})),n.d(a,"dist",(function(){return xe})),n.d(a,"sqrDist",(function(){return we})),n.d(a,"len",(function(){return Se})),n.d(a,"sqrLen",(function(){return Pe})),n.d(a,"forEach",(function(){return je}));var o={};n.r(o),n.d(o,"create",(function(){return Ce})),n.d(o,"identity",(function(){return Ee})),n.d(o,"setAxisAngle",(function(){return Te})),n.d(o,"getAxisAngle",(function(){return Ve})),n.d(o,"getAngle",(function(){return Me})),n.d(o,"multiply",(function(){return De})),n.d(o,"rotateX",(function(){return Ie})),n.d(o,"rotateY",(function(){return Le})),n.d(o,"rotateZ",(function(){return Re})),n.d(o,"calculateW",(function(){return Ae})),n.d(o,"exp",(function(){return ze})),n.d(o,"ln",(function(){return Fe})),n.d(o,"pow",(function(){return Be})),n.d(o,"slerp",(function(){return Ge})),n.d(o,"random",(function(){return He})),n.d(o,"invert",(function(){return Ne})),n.d(o,"conjugate",(function(){return Xe})),n.d(o,"fromMat3",(function(){return Ye})),n.d(o,"fromEuler",(function(){return _e})),n.d(o,"str",(function(){return Ke})),n.d(o,"clone",(function(){return en})),n.d(o,"fromValues",(function(){return nn})),n.d(o,"copy",(function(){return rn})),n.d(o,"set",(function(){return an})),n.d(o,"add",(function(){return on})),n.d(o,"mul",(function(){return sn})),n.d(o,"scale",(function(){return cn})),n.d(o,"dot",(function(){return ln})),n.d(o,"lerp",(function(){return un})),n.d(o,"length",(function(){return hn})),n.d(o,"len",(function(){return pn})),n.d(o,"squaredLength",(function(){return dn})),n.d(o,"sqrLen",(function(){return fn})),n.d(o,"normalize",(function(){return vn})),n.d(o,"exactEquals",(function(){return yn})),n.d(o,"equals",(function(){return gn})),n.d(o,"rotationTo",(function(){return mn})),n.d(o,"sqlerp",(function(){return bn})),n.d(o,"setAxes",(function(){return kn}));var s={};n.r(s),n.d(s,"create",(function(){return xn})),n.d(s,"clone",(function(){return wn})),n.d(s,"fromValues",(function(){return Sn})),n.d(s,"copy",(function(){return Pn})),n.d(s,"set",(function(){return jn})),n.d(s,"add",(function(){return On})),n.d(s,"subtract",(function(){return $n})),n.d(s,"multiply",(function(){return Cn})),n.d(s,"divide",(function(){return En})),n.d(s,"ceil",(function(){return Tn})),n.d(s,"floor",(function(){return Vn})),n.d(s,"min",(function(){return Mn})),n.d(s,"max",(function(){return Dn})),n.d(s,"round",(function(){return In})),n.d(s,"scale",(function(){return Ln})),n.d(s,"scaleAndAdd",(function(){return Rn})),n.d(s,"distance",(function(){return An})),n.d(s,"squaredDistance",(function(){return zn})),n.d(s,"length",(function(){return Fn})),n.d(s,"squaredLength",(function(){return Bn})),n.d(s,"negate",(function(){return Gn})),n.d(s,"inverse",(function(){return Hn})),n.d(s,"normalize",(function(){return Nn})),n.d(s,"dot",(function(){return Xn})),n.d(s,"cross",(function(){return Yn})),n.d(s,"lerp",(function(){return _n})),n.d(s,"random",(function(){return Kn})),n.d(s,"transformMat2",(function(){return Wn})),n.d(s,"transformMat2d",(function(){return Un})),n.d(s,"transformMat3",(function(){return Zn})),n.d(s,"transformMat4",(function(){return qn})),n.d(s,"rotate",(function(){return Jn})),n.d(s,"angle",(function(){return Qn})),n.d(s,"zero",(function(){return tr})),n.d(s,"str",(function(){return er})),n.d(s,"exactEquals",(function(){return nr})),n.d(s,"equals",(function(){return rr})),n.d(s,"len",(function(){return ir})),n.d(s,"sub",(function(){return ar})),n.d(s,"mul",(function(){return or})),n.d(s,"div",(function(){return sr})),n.d(s,"dist",(function(){return cr})),n.d(s,"sqrDist",(function(){return lr})),n.d(s,"sqrLen",(function(){return ur})),n.d(s,"forEach",(function(){return hr}));var c={};n.r(c),n.d(c,"round",(function(){return dr})),n.d(c,"degreeToRadian",(function(){return fr})),n.d(c,"div",(function(){return vr})),n.d(c,"radianToDegree",(function(){return yr})),n.d(c,"getXInCircle",(function(){return gr})),n.d(c,"getYInCircle",(function(){return mr})),n.d(c,"getXYInCircle",(function(){return br})),n.d(c,"getDist",(function(){return kr})),n.d(c,"getPointBetweenVerties",(function(){return xr})),n.d(c,"vertiesMap",(function(){return wr})),n.d(c,"getVertiesMaxX",(function(){return Sr})),n.d(c,"getVertiesMaxY",(function(){return Pr})),n.d(c,"getVertiesMinX",(function(){return jr})),n.d(c,"getVertiesCenterX",(function(){return Or})),n.d(c,"getVertiesMinY",(function(){return $r})),n.d(c,"getVertiesCenterY",(function(){return Cr})),n.d(c,"calculateAngle",(function(){return Er})),n.d(c,"calculateAngleForVec3",(function(){return Tr})),n.d(c,"calculateRotationOriginMat4",(function(){return Vr})),n.d(c,"calculateMatrix",(function(){return Mr})),n.d(c,"calculateMatrixInverse",(function(){return Dr})),n.d(c,"calculateAnglePointDistance",(function(){return Ir})),n.d(c,"calculateAngle360",(function(){return Lr})),n.d(c,"uuid",(function(){return Ar})),n.d(c,"uuidShort",(function(){return zr})),n.d(c,"cubicBezier",(function(){return Hr})),n.d(c,"getGradientLine",(function(){return Nr})),n.d(c,"CCW",(function(){return Xr})),n.d(c,"incircle",(function(){return Yr})),n.d(c,"initPolygon",(function(){return _r})),n.d(c,"Deluanay",(function(){return Wr})),n.d(c,"generate_sample_points",(function(){return Ur})),n.d(c,"getCenterInTriangle",(function(){return Zr})),n.d(c,"normalize",(function(){return Jr}));var l={};n.r(l),n.d(l,"collectProps",(function(){return ji})),n.d(l,"debounce",(function(){return Oi})),n.d(l,"throttle",(function(){return $i})),n.d(l,"keyEach",(function(){return Ci})),n.d(l,"keyMap",(function(){return Ei})),n.d(l,"keyMapJoin",(function(){return Ti})),n.d(l,"get",(function(){return Vi})),n.d(l,"defaultValue",(function(){return Mi})),n.d(l,"isUndefined",(function(){return Di})),n.d(l,"isNotUndefined",(function(){return Ii})),n.d(l,"isArray",(function(){return Li})),n.d(l,"isBoolean",(function(){return Ri})),n.d(l,"isString",(function(){return Ai})),n.d(l,"isNotString",(function(){return zi})),n.d(l,"isObject",(function(){return Fi})),n.d(l,"isFunction",(function(){return Bi})),n.d(l,"isNumber",(function(){return Gi})),n.d(l,"isZero",(function(){return Hi})),n.d(l,"isNotZero",(function(){return Ni})),n.d(l,"clone",(function(){return Xi})),n.d(l,"cleanObject",(function(){return Yi})),n.d(l,"combineKeyArray",(function(){return _i})),n.d(l,"repeat",(function(){return Ki})),n.d(l,"randomItem",(function(){return Wi})),n.d(l,"html",(function(){return qi})),n.d(l,"CSS_TO_STRING",(function(){return Ji})),n.d(l,"STRING_TO_CSS",(function(){return Qi})),n.d(l,"OBJECT_TO_PROPERTY",(function(){return ta})),n.d(l,"OBJECT_TO_CLASS",(function(){return ea})),n.d(l,"TAG_TO_STRING",(function(){return na})),n.d(l,"mapjoin",(function(){return ra})),n.d(l,"isArrayEquals",(function(){return ia})),n.d(l,"splitMethodByKeyword",(function(){return aa})),n.d(l,"curveToPath",(function(){return oa})),n.d(l,"curveToPointLine",(function(){return sa}));var u={};n.r(u),n.d(u,"format",(function(){return ca})),n.d(u,"hex",(function(){return la})),n.d(u,"rgb",(function(){return ua})),n.d(u,"hsl",(function(){return ha}));var h={};n.r(h),n.d(h,"ReverseXyz",(function(){return pa})),n.d(h,"ReverseRGB",(function(){return da})),n.d(h,"XYZtoRGB",(function(){return fa})),n.d(h,"LABtoXYZ",(function(){return va})),n.d(h,"PivotXyz",(function(){return ya})),n.d(h,"XYZtoLAB",(function(){return ga})),n.d(h,"LABtoRGB",(function(){return ma}));var p={};n.r(p),n.d(p,"RGBtoHSV",(function(){return ba})),n.d(p,"RGBtoCMYK",(function(){return ka})),n.d(p,"RGBtoHSL",(function(){return xa})),n.d(p,"c",(function(){return wa})),n.d(p,"gray",(function(){return Sa})),n.d(p,"RGBtoSimpleGray",(function(){return Pa})),n.d(p,"RGBtoGray",(function(){return ja})),n.d(p,"brightness",(function(){return Oa})),n.d(p,"RGBtoYCrCb",(function(){return $a})),n.d(p,"PivotRGB",(function(){return Ca})),n.d(p,"RGBtoXYZ",(function(){return Ea})),n.d(p,"RGBtoLAB",(function(){return Ta}));var d={};n.r(d),n.d(d,"CMYKtoRGB",(function(){return Va}));var f={};n.r(f),n.d(f,"HSVtoRGB",(function(){return Ma})),n.d(f,"HSVtoHSL",(function(){return Da}));var v={};n.r(v),n.d(v,"HUEtoRGB",(function(){return Ia})),n.d(v,"HSLtoHSV",(function(){return La})),n.d(v,"HSLtoRGB",(function(){return Ra}));var g={};n.r(g),n.d(g,"YCrCbtoRGB",(function(){return Aa}));var m={};n.r(m),n.d(m,"getColorIndexString",(function(){return Na})),n.d(m,"isColor",(function(){return Xa})),n.d(m,"matches",(function(){return Ya})),n.d(m,"convertMatches",(function(){return _a})),n.d(m,"convertMatchesArray",(function(){return Ka})),n.d(m,"reverseMatches",(function(){return Wa})),n.d(m,"trim",(function(){return Za})),n.d(m,"parse",(function(){return qa})),n.d(m,"parseGradient",(function(){return Ja}));var b={};n.r(b),n.d(b,"interpolateRGB",(function(){return Qa})),n.d(b,"interpolateRGBObject",(function(){return to})),n.d(b,"scale",(function(){return eo})),n.d(b,"blend",(function(){return no})),n.d(b,"mix",(function(){return ro})),n.d(b,"contrast",(function(){return io})),n.d(b,"contrastColor",(function(){return ao})),n.d(b,"gradient",(function(){return oo})),n.d(b,"scaleHSV",(function(){return so})),n.d(b,"scaleH",(function(){return co})),n.d(b,"scaleS",(function(){return lo})),n.d(b,"scaleV",(function(){return uo}));var k={};n.r(k),n.d(k,"start",(function(){return dm}));var w=n(5),S=n.n(w),P=(n(21),n(7)),j=n.n(P),O=n(10),$=n.n(O),C=n(8),E=n.n(C),T=n(12),V=n.n(T);function M(t,e){return Math.floor(Math.random()*(e-t+1))+t}function D(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=[],n=0;n0?(n[0]=2*(s*o+u*r+c*a-l*i)/h,n[1]=2*(c*o+u*i+l*r-s*a)/h,n[2]=2*(l*o+u*a+s*i-c*r)/h):(n[0]=2*(s*o+u*r+c*a-l*i),n[1]=2*(c*o+u*i+l*r-s*a),n[2]=2*(l*o+u*a+s*i-c*r)),st(t,e,n),t}function lt(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ut(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],c=e[8],l=e[9],u=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(c,l,u),t}function ht(t,e){var n=new R(3);ut(n,e);var r=1/n[0],i=1/n[1],a=1/n[2],o=e[0]*r,s=e[1]*i,c=e[2]*a,l=e[4]*r,u=e[5]*i,h=e[6]*a,p=e[8]*r,d=e[9]*i,f=e[10]*a,v=o+u+f,y=0;return v>0?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(h-d)/y,t[1]=(p-c)/y,t[2]=(s-l)/y):o>u&&o>f?(y=2*Math.sqrt(1+o-u-f),t[3]=(h-d)/y,t[0]=.25*y,t[1]=(s+l)/y,t[2]=(p+c)/y):u>f?(y=2*Math.sqrt(1+u-o-f),t[3]=(p-c)/y,t[0]=(s+l)/y,t[1]=.25*y,t[2]=(h+d)/y):(y=2*Math.sqrt(1+f-o-u),t[3]=(s-l)/y,t[0]=(p+c)/y,t[1]=(h+d)/y,t[2]=.25*y),t}function pt(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3],c=i+i,l=a+a,u=o+o,h=i*c,p=i*l,d=i*u,f=a*l,v=a*u,y=o*u,g=s*c,m=s*l,b=s*u,k=r[0],x=r[1],w=r[2];return t[0]=(1-(f+y))*k,t[1]=(p+b)*k,t[2]=(d-m)*k,t[3]=0,t[4]=(p-b)*x,t[5]=(1-(h+y))*x,t[6]=(v+g)*x,t[7]=0,t[8]=(d+m)*w,t[9]=(v-g)*w,t[10]=(1-(h+f))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function dt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],c=e[3],l=a+a,u=o+o,h=s+s,p=a*l,d=a*u,f=a*h,v=o*u,y=o*h,g=s*h,m=c*l,b=c*u,k=c*h,x=r[0],w=r[1],S=r[2],P=i[0],j=i[1],O=i[2],$=(1-(v+g))*x,C=(d+k)*x,E=(f-b)*x,T=(d-k)*w,V=(1-(p+g))*w,M=(y+m)*w,D=(f+b)*S,I=(y-m)*S,L=(1-(p+v))*S;return t[0]=$,t[1]=C,t[2]=E,t[3]=0,t[4]=T,t[5]=V,t[6]=M,t[7]=0,t[8]=D,t[9]=I,t[10]=L,t[11]=0,t[12]=n[0]+P-($*P+T*j+D*O),t[13]=n[1]+j-(C*P+V*j+I*O),t[14]=n[2]+O-(E*P+M*j+L*O),t[15]=1,t}function ft(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,h=r*s,p=i*o,d=i*s,f=i*c,v=a*o,y=a*s,g=a*c;return t[0]=1-h-f,t[1]=u+g,t[2]=p-y,t[3]=0,t[4]=u-g,t[5]=1-l-f,t[6]=d+v,t[7]=0,t[8]=p+y,t[9]=d-v,t[10]=1-l-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function vt(t,e,n,r,i,a,o){var s=1/(n-e),c=1/(i-r),l=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*c,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*c,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t}function yt(t,e,n,r,i){var a,o=1/Math.tan(e/2);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(a=1/(r-i),t[10]=(i+r)*a,t[14]=2*i*r*a):(t[10]=-1,t[14]=-2*r),t}function gt(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),c=2/(o+s),l=2/(i+a);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-s)*c*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function mt(t,e,n,r,i,a,o){var s=1/(e-n),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=(o+a)*l,t[15]=1,t}function bt(t,e,n,r){var i,a,o,s,c,l,u,h,p,d,f=e[0],v=e[1],y=e[2],g=r[0],m=r[1],b=r[2],k=n[0],x=n[1],w=n[2];return Math.abs(f-k)<1e-6&&Math.abs(v-x)<1e-6&&Math.abs(y-w)<1e-6?N(t):(u=f-k,h=v-x,p=y-w,i=m*(p*=d=1/Math.hypot(u,h,p))-b*(h*=d),a=b*(u*=d)-g*p,o=g*h-m*u,(d=Math.hypot(i,a,o))?(i*=d=1/d,a*=d,o*=d):(i=0,a=0,o=0),s=h*o-p*a,c=p*i-u*o,l=u*a-h*i,(d=Math.hypot(s,c,l))?(s*=d=1/d,c*=d,l*=d):(s=0,c=0,l=0),t[0]=i,t[1]=s,t[2]=u,t[3]=0,t[4]=a,t[5]=c,t[6]=h,t[7]=0,t[8]=o,t[9]=l,t[10]=p,t[11]=0,t[12]=-(i*f+a*v+o*y),t[13]=-(s*f+c*v+l*y),t[14]=-(u*f+h*v+p*y),t[15]=1,t)}function kt(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=r[0],c=r[1],l=r[2],u=i-n[0],h=a-n[1],p=o-n[2],d=u*u+h*h+p*p;d>0&&(u*=d=1/Math.sqrt(d),h*=d,p*=d);var f=c*p-l*h,v=l*u-s*p,y=s*h-c*u;return(d=f*f+v*v+y*y)>0&&(f*=d=1/Math.sqrt(d),v*=d,y*=d),t[0]=f,t[1]=v,t[2]=y,t[3]=0,t[4]=h*y-p*v,t[5]=p*f-u*y,t[6]=u*v-h*f,t[7]=0,t[8]=u,t[9]=h,t[10]=p,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t}function xt(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function wt(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function St(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function Pt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function jt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Ot(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function $t(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function Ct(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],h=t[9],p=t[10],d=t[11],f=t[12],v=t[13],y=t[14],g=t[15],m=e[0],b=e[1],k=e[2],x=e[3],w=e[4],S=e[5],P=e[6],j=e[7],O=e[8],$=e[9],C=e[10],E=e[11],T=e[12],V=e[13],M=e[14],D=e[15];return Math.abs(n-m)<=1e-6*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=1e-6*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-k)<=1e-6*Math.max(1,Math.abs(i),Math.abs(k))&&Math.abs(a-x)<=1e-6*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-S)<=1e-6*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(c-P)<=1e-6*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(l-j)<=1e-6*Math.max(1,Math.abs(l),Math.abs(j))&&Math.abs(u-O)<=1e-6*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-$)<=1e-6*Math.max(1,Math.abs(h),Math.abs($))&&Math.abs(p-C)<=1e-6*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(d-E)<=1e-6*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(f-T)<=1e-6*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(v-V)<=1e-6*Math.max(1,Math.abs(v),Math.abs(V))&&Math.abs(y-M)<=1e-6*Math.max(1,Math.abs(y),Math.abs(M))&&Math.abs(g-D)<=1e-6*Math.max(1,Math.abs(g),Math.abs(D))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Et=W,Tt=Pt;function Vt(){var t=new R(3);return R!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Mt(t){var e=new R(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Dt(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function It(t,e,n){var r=new R(3);return r[0]=t,r[1]=e,r[2]=n,r}function Lt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Rt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function At(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function zt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Ft(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Bt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Gt(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function Ht(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Nt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function Xt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function Yt(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function _t(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Kt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function Wt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function Ut(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function Zt(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function qt(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function Jt(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Qt(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function te(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ee(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],c=n[2];return t[0]=i*c-a*s,t[1]=a*o-r*c,t[2]=r*s-i*o,t}function ne(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t}function re(t,e,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,c=o*(a-2)+a,l=o*(a-1),u=o*(3-2*a);return t[0]=e[0]*s+n[0]*c+r[0]*l+i[0]*u,t[1]=e[1]*s+n[1]*c+r[1]*l+i[1]*u,t[2]=e[2]*s+n[2]*c+r[2]*l+i[2]*u,t}function ie(t,e,n,r,i,a){var o=1-a,s=o*o,c=a*a,l=s*o,u=3*a*s,h=3*c*o,p=c*a;return t[0]=e[0]*l+n[0]*u+r[0]*h+i[0]*p,t[1]=e[1]*l+n[1]*u+r[1]*h+i[1]*p,t[2]=e[2]*l+n[2]*u+r[2]*h+i[2]*p,t}function ae(t,e){e=e||1;var n=2*A()*Math.PI,r=2*A()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function oe(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t}function se(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t}function ce(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],c=e[1],l=e[2],u=i*l-a*c,h=a*s-r*l,p=r*c-i*s,d=i*p-a*h,f=a*u-r*p,v=r*h-i*u,y=2*o;return u*=y,h*=y,p*=y,d*=2,f*=2,v*=2,t[0]=s+u+d,t[1]=c+h+f,t[2]=l+p+v,t}function le(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function ue(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function he(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function pe(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2],c=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(a*a+o*o+s*s),l=c&&te(t,e)/c;return Math.acos(Math.min(Math.max(l,-1),1))}function de(t){return t[0]=0,t[1]=0,t[2]=0,t}function fe(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function ve(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function ye(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2];return Math.abs(n-a)<=1e-6*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=1e-6*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=1e-6*Math.max(1,Math.abs(i),Math.abs(s))}var ge,me=zt,be=Ft,ke=Bt,xe=Wt,we=Ut,Se=Dt,Pe=Zt,je=(ge=Vt(),function(t,e,n,r,i,a){var o,s;for(e||(e=3),n||(n=0),s=r?Math.min(r*e+n,t.length):t.length,o=n;o1e-6?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Me(t,e){var n=ln(t,e);return Math.acos(2*n*n-1)}function De(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],c=n[1],l=n[2],u=n[3];return t[0]=r*u+o*s+i*l-a*c,t[1]=i*u+o*c+a*s-r*l,t[2]=a*u+o*l+r*c-i*s,t[3]=o*u-r*s-i*c-a*l,t}function Ie(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c+o*s,t[1]=i*c+a*s,t[2]=a*c-i*s,t[3]=o*c-r*s,t}function Le(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c-a*s,t[1]=i*c+o*s,t[2]=a*c+r*s,t[3]=o*c-i*s,t}function Re(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c+i*s,t[1]=i*c-r*s,t[2]=a*c+o*s,t[3]=o*c-a*s,t}function Ae(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function ze(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=Math.sqrt(n*n+r*r+i*i),s=Math.exp(a),c=o>0?s*Math.sin(o)/o:0;return t[0]=n*c,t[1]=r*c,t[2]=i*c,t[3]=s*Math.cos(o),t}function Fe(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=Math.sqrt(n*n+r*r+i*i),s=o>0?Math.atan2(o,a)/o:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+a*a),t}function Be(t,e,n){return Fe(t,e),cn(t,t,n),ze(t,t),t}function Ge(t,e,n,r){var i,a,o,s,c,l=e[0],u=e[1],h=e[2],p=e[3],d=n[0],f=n[1],v=n[2],y=n[3];return(a=l*d+u*f+h*v+p*y)<0&&(a=-a,d=-d,f=-f,v=-v,y=-y),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-r)*i)/o,c=Math.sin(r*i)/o):(s=1-r,c=r),t[0]=s*l+c*d,t[1]=s*u+c*f,t[2]=s*h+c*v,t[3]=s*p+c*y,t}function He(t){var e=A(),n=A(),r=A(),i=Math.sqrt(1-e),a=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=a*Math.sin(2*Math.PI*r),t[3]=a*Math.cos(2*Math.PI*r),t}function Ne(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=a*s,t}function Xe(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function Ye(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*a+a]-e[3*o+o]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*a+o]-e[3*o+a])*n,t[a]=(e[3*a+i]+e[3*i+a])*n,t[o]=(e[3*o+i]+e[3*i+o])*n}return t}function _e(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var a=Math.sin(e),o=Math.cos(e),s=Math.sin(n),c=Math.cos(n),l=Math.sin(r),u=Math.cos(r);return t[0]=a*c*u-o*s*l,t[1]=o*s*u+a*c*l,t[2]=o*c*l-a*s*u,t[3]=o*c*u+a*s*l,t}function Ke(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var We,Ue,Ze,qe,Je,Qe,tn,en=function(t){var e=new R(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},nn=function(t,e,n,r){var i=new R(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},rn=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},an=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},on=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},sn=De,cn=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},ln=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},un=function(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t[3]=s+r*(n[3]-s),t},hn=Oe,pn=hn,dn=$e,fn=dn,vn=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t},yn=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},gn=function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=e[0],s=e[1],c=e[2],l=e[3];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=1e-6*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=1e-6*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-l)<=1e-6*Math.max(1,Math.abs(a),Math.abs(l))},mn=(We=Vt(),Ue=It(1,0,0),Ze=It(0,1,0),function(t,e,n){var r=te(e,n);return r<-.999999?(ee(We,Ue,e),Se(We)<1e-6&&ee(We,Ze,e),Qt(We,We),Te(t,We,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(ee(We,e,n),t[0]=We[0],t[1]=We[1],t[2]=We[2],t[3]=1+r,vn(t,t))}),bn=(qe=Ce(),Je=Ce(),function(t,e,n,r,i,a){return Ge(qe,e,i,a),Ge(Je,n,r,a),Ge(t,qe,Je,2*a*(1-a)),t}),kn=(Qe=new R(9),R!=Float32Array&&(Qe[1]=0,Qe[2]=0,Qe[3]=0,Qe[5]=0,Qe[6]=0,Qe[7]=0),Qe[0]=1,Qe[4]=1,Qe[8]=1,tn=Qe,function(t,e,n,r){return tn[0]=n[0],tn[3]=n[1],tn[6]=n[2],tn[1]=r[0],tn[4]=r[1],tn[7]=r[2],tn[2]=-e[0],tn[5]=-e[1],tn[8]=-e[2],vn(t,Ye(t,tn))});function xn(){var t=new R(2);return R!=Float32Array&&(t[0]=0,t[1]=0),t}function wn(t){var e=new R(2);return e[0]=t[0],e[1]=t[1],e}function Sn(t,e){var n=new R(2);return n[0]=t,n[1]=e,n}function Pn(t,e){return t[0]=e[0],t[1]=e[1],t}function jn(t,e,n){return t[0]=e,t[1]=n,t}function On(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function $n(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Cn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function En(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Tn(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function Vn(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function Mn(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Dn(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function In(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function Ln(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Rn(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function An(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function zn(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function Fn(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function Bn(t){var e=t[0],n=t[1];return e*e+n*n}function Gn(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Hn(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function Nn(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function Xn(t,e){return t[0]*e[0]+t[1]*e[1]}function Yn(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function _n(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t}function Kn(t,e){e=e||1;var n=2*A()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function Wn(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function Un(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function Zn(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function qn(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function Jn(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t}function Qn(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+a*a),s=o&&(n*i+r*a)/o;return Math.acos(Math.min(Math.max(s,-1),1))}function tr(t){return t[0]=0,t[1]=0,t}function er(t){return"vec2("+t[0]+", "+t[1]+")"}function nr(t,e){return t[0]===e[0]&&t[1]===e[1]}function rr(t,e){var n=t[0],r=t[1],i=e[0],a=e[1];return Math.abs(n-i)<=1e-6*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))}var ir=Fn,ar=$n,or=Cn,sr=En,cr=An,lr=zn,ur=Bn,hr=function(){var t=xn();return function(e,n,r,i,a,o){var s,c;for(n||(n=2),r||(r=0),c=i?Math.min(i*n+r,e.length):e.length,s=r;s1&&void 0!==arguments[1]?arguments[1]:1;return 0===t?0:t/e}function yr(t){var e=t*(180/Math.PI);return e<0&&(e=360+e),e}function gr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n+e*Math.cos(fr(t))}function mr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n+e*Math.sin(fr(t))}function br(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x:gr(t,e,n),y:mr(t,e,r)}}function kr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return s.distance([t,e],[n,r])}function xr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return a.lerp([],t,e,1+n/a.dist(t,e))}function wr(t,e){return t.map((function(t){return a.transformMat4([],t,e)}))}function Sr(t){var e=Number.MIN_SAFE_INTEGER;return t.forEach((function(t){e=Math.max(t[0],e)})),e}function Pr(t){var e=Number.MIN_SAFE_INTEGER;return t.forEach((function(t){e=Math.max(t[1],e)})),e}function jr(t){var e=Number.MAX_SAFE_INTEGER;return t.forEach((function(t){e=Math.min(t[0],e)})),e}function Or(t){var e=Number.MAX_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER;return t.forEach((function(t){e=Math.min(t[0],e),n=Math.max(t[0],n)})),Math.round((e+n)/2)}function $r(t){var e=Number.MAX_SAFE_INTEGER;return t.forEach((function(t){e=Math.min(t[1],e)})),e}function Cr(t){var e=Number.MAX_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER;return t.forEach((function(t){e=Math.min(t[1],e),n=Math.max(t[1],n)})),Math.round((e+n)/2)}function Er(t,e){return yr(Math.atan2(e,t))}function Tr(t,e,n){return Ir({x:t[0],y:t[1]},{x:e[0],y:e[1]},{dx:n[0],dy:n[1]})}function Vr(t,e){var n=i.create();return i.translate(n,n,e),i.rotateZ(n,n,fr(t)),i.translate(n,n,a.negate([],e)),n}function Mr(){for(var t=i.create(),e=arguments.length,n=new Array(e),r=0;r0?h>=0:h<=0}function _r(t,e,n){for(var r=pr.create(Math.min(e,n),Math.max(e,n)),i=-1,a=0,o=t.length;a-1?t.splice(i,1):t.push(r)}function Kr(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Wr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length;t[e]=pr.create(-2e9,-2e9),t[e+1]=pr.create(2e9,-2e9),t[e+2]=pr.create(0,2e9);for(var n=[pr.create(e,e+1,e+2)],r=0;r=e||h.y>=e||h.z>=e)&&(Kr(n,r,n.length-1),n.pop(),r--)}return n.map((function(e){return{a:t[e.x],b:t[e.y],c:t[e.z]}}))}function Ur(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:50,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){return Math.random()},s=[],c=-n,l=t+n,u=-r,h=e+r,p=c;p8&&void 0!==arguments[8]?arguments[8]:1e3,l=oi({x:t,y:e},{x:n,y:r},{x:i,y:a},{x:o,y:s}),u=0,h=l(0),p=0;p<=c;p++){var d=p/c,f=l(d);u+=kr(h.x,h.y,f.x,f.y),h=f}return u},hi=function(t,e,n,r,i,a){for(var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e3,s=si({x:t,y:e},{x:n,y:r},{x:i,y:a}),c=0,l=s(0),u=0;u<=o;u++){var h=u/o,p=s(h);c+=kr(l.x,l.y,p.x,p.y),l=p}return c},pi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n={minDist:1/0,minT:0};return function(r,i){for(var a=0;a<=e;a++)li(n,t,a/e,r,i);var o=1/(2*e),s=n.minT;for(a=0;a4&&void 0!==arguments[4]?arguments[4]:100;return pi(oi(t,e,n,r),i)},fi=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100;return pi(si(t,e,n),r)},vi=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return pi(ci(t,e),n)},yi=function(t){if("linear"===t)return ci(n={x:0,y:0},r={x:1,y:1});var e=ai(t),n={x:0,y:0},r={x:e[0],y:e[1]},i={x:e[2],y:e[3]};return oi(n,r,i,{x:1,y:1})},gi=function(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}},mi=function(t,e){var n=gi(t[0],t[1],e),r=gi(t[1],t[2],e),i=gi(t[2],t[3],e),a=gi(n,r,e),o=gi(r,i,e);return gi(a,o,e)},bi=function(t,e){var n=gi(t[0],t[1],e),r=gi(t[1],t[2],e);return gi(n,r,e)},ki=function(t,e){return gi(t[0],t[1],e)},xi=function(t,e){var n=gi(t[0],t[1],e),r=gi(t[1],t[2],e),i=gi(t[2],t[3],e),a=gi(n,r,e),o=gi(r,i,e),s=gi(a,o,e);return{first:[t[0],n,a,s],second:[s,o,i,t[3]]}},wi=function(t,e){var n=gi(t[0],t[1],e),r=gi(t[1],t[2],e),i=gi(n,r,e);return{first:[t[0],n,i],second:[i,r,t[2]]}},Si=function(t,e){var n=gi(t[0],t[1],e);return{first:[t[0],n],second:[n,t[1]]}},Pi=function(t){var e=function(t){var e=a.negate([],t[0]),n=a.multiply([],[3,3,3],t[1]),r=a.multiply([],[-3,-3,-3],t[2]),i=t[3],o=a.add([],a.add([],e,n),a.add([],r,i));return a.multiply([],[3,3,3],o)}(t),n=function(t){var e=t[0],n=a.multiply([],[-2,-2,-2],t[1]),r=t[2],i=a.add([],a.add([],e,n),r);return a.multiply([],[6,6,6],i)}(t),r=function(t){var e=a.add([],t[1],a.negate([],t[0]));return a.multiply([],[3,3,3],e)}(t),i=[],o=n[0]*n[0]-4*e[0]*r[0];if(o<0);else if(0===o){var s=-n[0]/(2*e[0]);0<=s&&s<=1&&i.push(s)}else if(o>0){var c=(-n[0]+Math.sqrt(o))/(2*e[0]),l=(-n[0]-Math.sqrt(o))/(2*e[0]);0<=c&&c<=1&&i.push(c),0<=l&&l<=1&&i.push(l)}var u=n[1]*n[1]-4*e[1]*r[1];if(u<0);else if(0===u){var h=-n[1]/(2*e[1]);0<=h&&h<=1&&i.push(h)}else if(u>0){var p=(-n[1]+Math.sqrt(u))/(2*e[1]),d=(-n[1]-Math.sqrt(u))/(2*e[1]);0<=p&&p<=1&&i.push(p),0<=d&&d<=1&&i.push(d)}return i};function ji(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__proto__,r=[];do{var i=n instanceof Object;if(!1===i)break;var a=Object.getOwnPropertyNames(n).filter((function(n){return t&&Bi(t[n])&&!e[n]}));r.push.apply(r,a),n=n.__proto__}while(n);return r}function Oi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0===e)return t;var n=void 0;return function(r,i,a,o,s){n&&clearTimeout(n),n=setTimeout((function(){t(r,i,a,o,s)}),e||300)}}function $i(t,e){var n=void 0;return function(r,i,a,o,s){n||(n=setTimeout((function(){t(r,i,a,o,s),n=null}),e||300))}}function Ci(t,e){Object.keys(t).forEach((function(n,r){e(n,t[n],r)}))}function Ei(t,e){return Object.keys(t).map((function(n,r){return e(n,t[n],r)}))}function Ti(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Ei(t,e).join(n)}function Vi(t,e,n){var r=Mi(t[e],e);return Bi(n)?n(r):r}function Mi(t,e){return void 0===t?e:t}function Di(t){return null==t}function Ii(t){return!1===Di(t)}function Li(t){return Array.isArray(t)}function Ri(t){return"boolean"==typeof t}function Ai(t){return"string"==typeof t}function zi(t){return!1===Ai(t)}function Fi(t){return"object"==V()(t)&&!Li(t)&&!Gi(t)&&!Ai(t)&&null!==t}function Bi(t){return"function"==typeof t}function Gi(t){return"number"==typeof t}function Hi(t){return 0===t}function Ni(t){return!Hi(t)}function Xi(t){if(!Di(t))return JSON.parse(JSON.stringify(t))}function Yi(t){var e={};return Object.keys(t).filter((function(e){return!!t[e]})).forEach((function(n){e[n]=t[n]})),e}function _i(t){return Object.keys(t).forEach((function(e){Array.isArray(t[e])&&(t[e]=t[e].join(", "))})),t}function Ki(t){return E()(Array(t))}function Wi(){for(var t=arguments.length,e=new Array(t),n=0;n]*)\/\>/gim,Zi=(Qr={image:!0,input:!0,br:!0,path:!0,line:!0,circle:!0,rect:!0},S()(Qr,"path",!0),S()(Qr,"polygon",!0),S()(Qr,"polyline",!0),S()(Qr,"use",!0),Qr),qi=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r",">"))}))};function Ji(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t||{};return Object.keys(n).filter((function(t){return Ii(n[t])})).map((function(t){return"".concat(t,": ").concat(n[t])})).join(";"+e)}function Qi(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:";",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:":",r={};return""===(t+="")?r:(t.split(e).forEach((function(t){var e=t.split(n).map((function(t){return t.trim()})),i=$()(e),a=i[0],o=i.slice(1);""!=a&&(r[a]=o.join(n))})),r)}function ta(t){return Object.keys(t).map((function(e){return"class"===e&&Fi(t[e])?"".concat(e,'="').concat(ea(t[e]),'"'):Ri(t[e])||Di(t[e])||"undefined"===t[e]?t[e]?e:"":"".concat(e,'="').concat(t[e],'"')})).join(" ")}function ea(t){return Object.keys(t).filter((function(e){return t[e]})).map((function(t){return t})).join(" ")}function na(t){return t.replace(/\/g,">")}function ra(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.map(e).join(n)}function ia(t,e){var n=new Set([].concat(E()(t),E()(e)));return n.size===t.length&&n.size===e.length}var aa=function(t,e){var n=t.filter((function(t){return t.indexOf("".concat(e,"("))>-1})),r=n.map((function(t){var n=t.split("".concat(e,"("))[1].split(")")[0].trim().split(" "),r=j()(n,2);return{target:r[0],param:r[1]}}));return[n,r]},oa=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,r=ri(t);return"\n M0 ".concat(e," \n C \n ").concat(r[0]*e," ").concat(0==r[1]?n:(1-r[1])*n,",\n ").concat(r[2]*e," ").concat(1==r[3]?0:(1-r[3])*n,",\n ").concat(e," 0\n ")},sa=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,r=ri(t);return"\n M 0 ".concat(e," \n L ").concat(r[0]*e," ").concat(0==r[1]?n:(1-r[1])*n,"\n M ").concat(e," 0\n L ").concat(r[2]*e," ").concat(1==r[3]?0:(1-r[3])*n,"\n ")};function ca(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgba(0, 0, 0, 0)";return Array.isArray(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]}),"hex"==e?la(t):"rgb"==e?ua(t,n):"hsl"==e?ha(t):t}function la(t){Array.isArray(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]});var e=t.r.toString(16);t.r<16&&(e="0"+e);var n=t.g.toString(16);t.g<16&&(n="0"+n);var r=t.b.toString(16);if(t.b<16&&(r="0"+r),1==t.a||Di(t.a))return"#".concat(e).concat(n).concat(r);var i=Math.ceil(255*t.a),a=i.toString(16);return i<16&&(a="0"+a),"#".concat(e).concat(n).concat(r).concat(a)}function ua(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgba(0, 0, 0, 0)";if(Li(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]}),!Di(t))return 1==t.a||Di(t.a)?isNaN(t.r)?e:"rgb(".concat(t.r,",").concat(t.g,",").concat(t.b,")"):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat(t.a,")")}function ha(t){return Li(t)&&(t={r:t[0],g:t[1],b:t[2],a:t[3]}),1==t.a||Di(t.a)?"hsl(".concat(t.h,",").concat(t.s,"%,").concat(t.l,"%)"):"hsla(".concat(t.h,",").concat(t.s,"%,").concat(t.l,"%,").concat(t.a,")")}function pa(t){return Math.pow(t,3)>.008856?Math.pow(t,3):(t-16/116)/7.787}function da(t){return t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t}function fa(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.x,e=r.y,n=r.z}var i=t/100,a=e/100,o=n/100,s=3.2406*i+-1.5372*a+-.4986*o,c=-.9689*i+1.8758*a+.0415*o,l=.0557*i+-.204*a+1.057*o;s=da(s),c=da(c),l=da(l);var u=dr(255*s),h=dr(255*c),p=dr(255*l);return{r:u,g:h,b:p}}function va(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.l,e=r.a,n=r.b}var i=(t+16)/116,a=e/500+i,o=i-n/200;i=pa(i);var s=95.047*(a=pa(a)),c=100*i,l=108.883*(o=pa(o));return{x:s,y:c,z:l}}function ya(t){return t>.008856?Math.pow(t,1/3):(7.787*t+16)/116}function ga(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.x,e=r.y,n=r.z}var i=t/95.047,a=e/100,o=n/108.883;i=ya(i);var s=116*(a=ya(a))-16,c=500*(i-a),l=200*(a-(o=ya(o)));return{l:s,a:c,b:l}}function ma(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.l,e=r.a,n=r.b}return fa(va(t,e,n))}function ba(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var i=t/255,a=e/255,o=n/255,s=Math.max(i,a,o),c=Math.min(i,a,o),l=s-c,u=0;0==l?u=0:s==i?u=(a-o)/l%6*60:s==a?u=60*((o-i)/l+2):s==o&&(u=60*((i-a)/l+4)),u<0&&(u=360+u);return{h:u,s:0==s?0:l/s,v:s}}function ka(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var i=t/255,a=e/255,o=n/255,s=1-Math.max(i,a,o),c=(1-i-s)/(1-s),l=(1-a-s)/(1-s),u=(1-o-s)/(1-s);return{c:c,m:l,y:u,k:s}}function xa(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}t/=255,e/=255,n/=255;var i,a,o=Math.max(t,e,n),s=Math.min(t,e,n),c=(o+s)/2;if(o==s)i=a=0;else{var l=o-s;switch(a=c>.5?l/(2-o-s):l/(o+s),o){case t:i=(e-n)/l+(e90?0:255)}function Sa(t){return{r:t,g:t,b:t}}function Pa(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}return Sa(Math.ceil((t+e+n)/3))}function ja(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}return Sa($a(t,e,n).y)}function Oa(t,e,n){return Math.ceil(.2126*t+.7152*e+.0722*n)}function $a(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var i=Oa(t,e,n),a=.564*(n-i),o=.713*(t-i);return{y:i,cr:o,cb:a}}function Ca(t){return 100*(t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)}function Ea(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}var i=t/255,a=e/255,o=n/255,s=.4124*(i=Ca(i))+.3576*(a=Ca(a))+.1805*(o=Ca(o)),c=.2126*i+.7152*a+.0722*o,l=.0193*i+.1192*a+.9505*o;return{x:s,y:c,z:l}}function Ta(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.r,e=r.g,n=r.b}return ga(Ea(t,e,n))}function Va(t,e,n,r){if(1==arguments.length){var i=arguments[0];t=i.c,e=i.m,n=i.y,r=i.k}var a=255*(1-t)*(1-r),o=255*(1-e)*(1-r),s=255*(1-n)*(1-r);return{r:a,g:o,b:s}}function Ma(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.v}var i=t,a=e,o=n;i>=360&&(i=0);var s=a*o,c=s*(1-Math.abs(i/60%2-1)),l=o-s,u=[];return 0<=i&&i<60?u=[s,c,0]:60<=i&&i<120?u=[c,s,0]:120<=i&&i<180?u=[0,s,c]:180<=i&&i<240?u=[0,c,s]:240<=i&&i<300?u=[c,0,s]:300<=i&&i<360&&(u=[s,0,c]),{r:dr(255*(u[0]+l)),g:dr(255*(u[1]+l)),b:dr(255*(u[2]+l))}}function Da(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.v}var i=Ma(t,e,n);return xa(i.r,i.g,i.b)}function Ia(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function La(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.l}var i=Ra(t,e,n);return ba(i.r,i.g,i.b)}function Ra(t,e,n){if(1==arguments.length){var r=arguments[0];t=r.h,e=r.s,n=r.l}var i,a,o;if(t/=360,n/=100,0==(e/=100))i=a=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,c=2*n-s;i=Ia(c,s,t+1/3),a=Ia(c,s,t),o=Ia(c,s,t-1/3)}return{r:dr(255*i),g:dr(255*a),b:dr(255*o)}}function Aa(t,e,n,r){if(1==arguments.length){var i=arguments[0];t=i.y,e=i.cr,n=i.cb;r=(r=i.bit)||0}var a=t+1.402*(e-r),o=t-.344*(n-r)-.714*(e-r),s=t+1.772*(n-r);return{r:Math.ceil(a),g:Math.ceil(o),b:Math.ceil(s)}}var za={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)",currentColor:"currentColor"};var Fa={isColorName:function(t){return!!za[t]},getColorByName:function(t){return za[t]}};function Ba(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ga(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"@";return"".concat(e).concat(t.startIndex).padEnd(10,"0")}function Xa(t){return!!Ya(t).length}function Ya(t){var e=t.match(Ha),n=[];if(!e)return n;for(var r=0,i=e.length;r-1||e[r].indexOf("rgb")>-1||e[r].indexOf("hsl")>-1)n.push({color:e[r]});else{var a=Fa.getColorByName(e[r]);a&&n.push({color:e[r],nameColor:a})}var o={next:0};return n.forEach((function(e){var n=t.indexOf(e.color,o.next);e.startIndex=n,e.endIndex=n+e.color.length,o.next=e.endIndex})),n}function _a(t){var e=Ya(t);return e.forEach((function(e){t=t.replace(e.color,Na(e))})),{str:t,matches:e}}function Ka(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",n=_a(t);return n.str.split(e).map((function(t,e){return t=Za(t),n.matches[e]&&(t=t.replace(Na(n.matches[e]),n.matches[e].color)),t}))}function Wa(t,e){return e.forEach((function(e){t=t.replace(Na(e),e.color)})),t}var Ua=/^\s+|\s+$/g;function Za(t){return t.replace(Ua,"")}function qa(t){if(Ai(t)){if(Fa.isColorName(t)&&(t=Fa.getColorByName(t)),t.indexOf("rgb(")>-1){for(var e=0,n=(r=t.replace("rgb(","").replace(")","").split(",")).length;e-1){for(e=0,n=(r=t.replace("rgba(","").replace(")","").split(",")).length;e-1){for(e=0,n=(r=t.replace("hsl(","").replace(")","").split(",")).length;e-1){for(e=0,n=(r=t.replace("hsla(","").replace(")","").split(",")).length;e>16,g:(65280&t)>>8,b:(255&t)>>0,a:1},{},xa(o));if(0<=t&&t<=4294967295)return o=Ga({},o={type:"hex",r:(4278190080&t)>>24,g:(16711680&t)>>16,b:(65280&t)>>8,a:(255&t)/255},{},xa(o))}return t}function Ja(t){Ai(t)&&(t=Ka(t));var e=(t=t.map((function(t){if(Ai(t)){var e=_a(t),n=Za(e.str).split(" ");return n[1]?n[1].indexOf("%")>-1?n[1]=parseFloat(n[1].replace(/%/,""))/100:n[1]=parseFloat(n[1]):n[1]="*",n[0]=Wa(n[0],e.matches),n}if(Array.isArray(t))return t[1]?Ai(t[1])&&(t[1].indexOf("%")>-1?t[1]=parseFloat(t[1].replace(/%/,""))/100:t[1]=+t[1]):t[1]="*",E()(t)}))).filter((function(t){return"*"===t[1]})).length;if(e>0){var n=(1-t.filter((function(t){return"*"!=t[1]&&1!=t[1]})).map((function(t){return t[1]})).reduce((function(t,e){return t+e}),0))/e;t.forEach((function(e,r){"*"==e[1]&&r>0&&(t.length-1==r||(e[1]=n))}))}return t}function Qa(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"hex",i=to(t,e,n);return ca(i,r)}function to(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,r=Di(t.a)?1:t.a,i=Di(e.a)?1:e.a;return{r:dr(t.r+(e.r-t.r)*n),g:dr(t.g+(e.g-t.g)*n),b:dr(t.b+(e.b-t.b)*n),a:dr(r+(i-r)*n,100)}}function eo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(!t)return[];Ai(t)&&(t=Ka(t));for(var n=(t=t||[]).length,r=[],i=0;i2&&void 0!==arguments[2]?arguments[2]:.5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"hex",i=qa(t),a=qa(e);return Qa(i,a,n,r)}function ro(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"hex";return no(t,e,n,r)}function io(t){return t=qa(t),(Math.round(299*t.r)+Math.round(587*t.g)+Math.round(114*t.b))/1e3}function ao(t){return io(t)>=128?"black":"white"}function oo(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=[],r=e-((t=Ja(t)).length-1),i=r,a=1,o=t.length;a1&&void 0!==arguments[1]?arguments[1]:"h",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:9,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"rgb",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:100,s=qa(t),c=ba(s),l=(a-i)*o/n,u=[],h=1;h<=n;h++)c[e]=Math.abs((o-l*h)/o),u.push(ca(Ma(c),r));return u}function co(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgb",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:360;return so(t,"h",e,n,r,i,1)}function lo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgb",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return so(t,"s",e,n,r,i,100)}function uo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgb",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return so(t,"v",e,n,r,i,100)}function ho(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}eo.parula=function(t){return eo(["#352a87","#0f5cdd","#00b5a6","#ffc337","#fdff00"],t)},eo.jet=function(t){return eo(["#00008f","#0020ff","#00ffff","#51ff77","#fdff00","#ff0000","#800000"],t)},eo.hsv=function(t){return eo(["#ff0000","#ffff00","#00ff00","#00ffff","#0000ff","#ff00ff","#ff0000"],t)},eo.hot=function(t){return eo(["#0b0000","#ff0000","#ffff00","#ffffff"],t)},eo.pink=function(t){return eo(["#1e0000","#bd7b7b","#e7e5b2","#ffffff"],t)},eo.bone=function(t){return eo(["#000000","#4a4a68","#a6c6c6","#ffffff"],t)},eo.copper=function(t){return eo(["#000000","#3d2618","#9d623e","#ffa167","#ffc77f"],t)};var po=function(t){for(var e=1;e=t){e=fo[r-1],n=fo[r];break}return e&&n?po.mix(e,n,(t-e.start)/(n.start-e.start)):fo[0].rgb}},yo=n(1),go=n.n(yo),mo=n(2),bo=n.n(mo),ko=n(3),xo=n.n(ko),wo=n(0),So=n.n(wo),Po=n(4),jo=n.n(Po),Oo=function(){function t(e){go()(this,t),this.cachedCallback={},this.callbacks={},this.commandes=[],this.editor=e}return bo()(t,[{key:"getCallbacks",value:function(t){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t]}},{key:"setCallbacks",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.callbacks[t]=e}},{key:"debug",value:function(){var t;this.editor&&this.editor.config.get("debug")&&(t=console).log.apply(t,arguments)}},{key:"on",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=e;r>0?a=Oi(e,r):i>0&&(a=$i(e,i)),this.getCallbacks(t).push({event:t,callback:a,context:n,originalCallback:e}),this.debug("add message event",t,n.sourceName)}},{key:"off",value:function(t,e){this.debug("off message event",t),1==arguments.length?this.setCallbacks(t):2==arguments.length&&this.setCallbacks(t,this.getCallbacks(t).filter((function(t){return t.originalCallback!==e})))}},{key:"offAll",value:function(t){var e=this;Object.keys(this.callbacks).forEach((function(n){e.setCallbacks(n,e.getCallbacks(n).filter((function(e){return e.context!==t})))})),this.debug("off all message",t.sourceName)}},{key:"getCachedCallbacks",value:function(t){return this.getCallbacks(t)}},{key:"sendMessage",value:function(t,e){for(var n=this,r=arguments.length,i=new Array(r>2?r-2:0),a=2;a2?n-2:0),i=2;i2?r-2:0),a=2;a1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[];r.push.apply(r,Object.keys(e)),r.push.apply(r,Object.keys(n));var i=new Set(r);i.forEach((function(r){$o(t,r,e[r],n[r])}))}(e,Co(n.attributes),Co(e.attributes));var i=To(e),a=To(n),o=Math.max(i.length,a.length);for(r=0;r0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(go()(this,t),this.value=e,Gi(this.value)&&isNaN(this.value))throw new Error("NaN is not able to set");this.unit=n}return bo()(t,[{key:Symbol.toPrimitive,value:function(t){return"number"==t?this.value:this.toString()}},{key:"toString",value:function(){switch(this.unit){case"string":case"number":return this.value+"";case"var":return"var(--".concat(this.value,")");case"calc":return"calc(".concat(this.value,")");default:return this.value+this.unit}}},{key:"isUnitType",value:function(t){return this.unit===t}},{key:"isCalc",value:function(){return this.isUnitType("calc")}},{key:"isFr",value:function(){return this.isUnitType("fr")}},{key:"isPercent",value:function(){return this.isUnitType("%")}},{key:"isPx",value:function(){return this.isUnitType("px")}},{key:"isEm",value:function(){return this.isUnitType("em")}},{key:"isDeg",value:function(){return this.isUnitType("deg")}},{key:"isRad",value:function(){return this.isUnitType("rad")}},{key:"isTurn",value:function(){return this.isUnitType("turn")}},{key:"isSecond",value:function(){return this.isUnitType("s")}},{key:"isMs",value:function(){return this.isUnitType("ms")}},{key:"isNumber",value:function(){return this.isUnitType("number")}},{key:"isString",value:function(){return this.isUnitType("")}},{key:"isVar",value:function(){return this.isUnitType("--")}},{key:"isNaN",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){return Gi(this.value)&&isNaN(this.value)}))},{key:"set",value:function(t){return this.value=t,this}},{key:"add",value:function(t){return this.value+=+t,this}},{key:"sub",value:function(t){return this.add(-1*t)}},{key:"mul",value:function(t){return this.value*=+t,this}},{key:"div",value:function(t){return this.value/=+t,this}},{key:"mod",value:function(t){return this.value%=+t,this}},{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"getUnitName",value:function(){return"%"===this.unit?"percent":this.unit}},{key:"toJSON",value:function(){return this.toString()}},{key:"rate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.value/t}},{key:"stringToPercent",value:function(){return Ii(Mo[this.value])?t.percent(Mo[this.value]):t.percent(0)}},{key:"stringToEm",value:function(t){return this.stringToPercent().toEm(t)}},{key:"stringToPx",value:function(t){return this.stringToPercent().toPx(t)}},{key:"toPercent",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return this.isPercent()?this.clone():this.isPx()?t.percent(100*this.value/e):this.isEm()?t.percent(this.value*n*100/e):this.isString()?this.stringToPercent(e):this.isDeg()?t.percent(this.value/360*100):void 0}},{key:"toEm",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return this.isPercent()?t.em(this.value/100*e/n):this.isPx()?t.em(this.value/n):this.isEm()?this.clone():this.isString()?this.stringToEm(e):void 0}},{key:"toPx",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.isPercent()?t.px(this.value/100*e):this.isPx()?this.clone():this.isEm()?t.px(this.value/100*e/16):this.isString()?this.stringToPx(e):void 0}},{key:"toDeg",value:function(){return this.isDeg()?this.clone():this.isTurn()?t.deg(360*this.value):this.isRad()?t.deg(this.value*(180/Math.PI)):void 0}},{key:"toTurn",value:function(){return this.isTurn()?this.clone():this.isDeg()?t.turn(this.value/360):void 0}},{key:"toSecond",value:function(){return this.isSecond()?this:this.isMs()?t.second(this.value/1e3):void 0}},{key:"toMs",value:function(){return this.isSecond()?t.ms(1e3*this.value):this.isMs()?this:void 0}},{key:"to",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16;return"px"===t?this.toPx(e,n):"%"===t||"percent"===t?this.toPercent(e,n):"em"===t?this.toEm(e,n):"deg"===t?this.toDeg():"turn"===t?this.toTurn():void 0}},{key:"toUnit",value:function(e){return new t(this.value,e)}},{key:"calculate",value:function(t,e){var n=this[t];return n?n.call(this,e):this}},{key:"includes",value:function(){for(var t=arguments.length,e=new Array(t),n=0;ne[i].value&&(r=e[i]);return r}},{key:"max",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:"http://www.w3.org/2000/svg";return Object.keys(t).forEach((function(r){e.attr(r,t[r],n)})),this}},{key:"setProp",value:function(t){var e=this;return Object.keys(t).forEach((function(n){e.el[n]!=t[n]&&(e.el[n]=t[n])})),this}},{key:"data",value:function(t,e){return 1===arguments.length?this.attr("data-"+t):2===arguments.length?this.attr("data-"+t,e):this}},{key:"attr",value:function(t,e){return 1==arguments.length?this.el.getAttribute(t):(this.el.getAttribute(t)!=e&&this.el.setAttribute(t,e),this)}},{key:"attrNS",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"http://www.w3.org/2000/svg";return 1==arguments.length?this.el.getAttributeNS(n,t):(this.el.getAttributeNS(n,t)!=e&&this.el.setAttributeNS(n,t,e),this)}},{key:"attrKeyValue",value:function(t){return S()({},this.el.getAttribute(t),this.val())}},{key:"attrs",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:"div";Vo(this,t.create(n).html(e))}},{key:"updateSVGDiff",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div";Vo(this,t.create(n).html("".concat(e,"")).firstChild.firstChild)}},{key:"find",value:function(t){return this.el.querySelector(t)}},{key:"$",value:function(e){var n=this.find(e);return n?t.create(n):null}},{key:"findAll",value:function(t){return E()(this.el.querySelectorAll(t))}},{key:"$$",value:function(e){return this.findAll(e).map((function(e){return t.create(e)}))}},{key:"empty",value:function(){for(;this.el.firstChild;)this.el.removeChild(this.el.firstChild);return this}},{key:"append",value:function(t){return Ai(t)?this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t.el||t),this}},{key:"prepend",value:function(t){return Ai(t)?this.el.prepend(document.createTextNode(t)):this.el.prepend(t.el||t),this}},{key:"prependHTML",value:function(e){var n=t.create("div").html(e);return this.prepend(n.createChildrenFragment()),n}},{key:"appendHTML",value:function(e){var n=t.create("div").html(e);return this.append(n.createChildrenFragment()),n}},{key:"createChildrenFragment",value:function(){var t=this.children(),e=document.createDocumentFragment();return t.forEach((function(t){return e.appendChild(t.el)})),e}},{key:"appendTo",value:function(t){return(t.el?t.el:t).appendChild(this.el),this}},{key:"remove",value:function(){return this.el.parentNode&&this.el.parentNode.removeChild(this.el),this}},{key:"removeChild",value:function(t){return this.el.removeChild(t.el||t),this}},{key:"text",value:function(e){if(Di(e))return this.el.textContent;var n=e;return e instanceof t&&(n=e.text()),this.el.textContent!==n&&(this.el.textContent=n),this}},{key:"css",value:function(t,e){if(Ii(t)&&Ii(e))this.el.style[t]=e;else if(Ii(t)){if(Ai(t))return getComputedStyle(this.el)[t];Object.assign(this.el.style,t)}return this}},{key:"getComputedStyle",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){for(var t=getComputedStyle(this.el),e={},n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:"block";return this.el.style.display="none"!=t?t:"block",this}},{key:"hide",value:function(){return this.el.style.display="none",this}},{key:"isHide",value:function(){return"none"===this.el.style.display}},{key:"isShow",value:function(){return!this.isHide()}},{key:"toggle",value:function(t){var e=this.isHide();return 1==arguments.length?t?this.show():this.hide():e?this.show():this.hide()}},{key:"scrollIntoView",value:function(){this.el.scrollIntoView()}},{key:"addScrollLeft",value:function(t){return this.el.scrollLeft+=t,this}},{key:"addScrollTop",value:function(t){return this.el.scrollTop+=t,this}},{key:"setScrollTop",value:function(t){return this.el.scrollTop=t,this}},{key:"setScrollLeft",value:function(t){return this.el.scrollLeft=t,this}},{key:"scrollTop",value:function(){return this.el===document.body?t.getScrollTop():this.el.scrollTop}},{key:"scrollLeft",value:function(){return this.el===document.body?t.getScrollLeft():this.el.scrollLeft}},{key:"scrollHeight",value:function(){return this.el.scrollHeight}},{key:"scrollWidth",value:function(){return this.el.scrollWidth}},{key:"on",value:function(t,e,n,r){return this.el.addEventListener(t,e,n,r),this}},{key:"off",value:function(t,e){return this.el.removeEventListener(t,e),this}},{key:"getElement",value:function(){return this.el}},{key:"createChild",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=t.create(e,n,r);return a.css(i),this.append(a),a}},{key:"children",value:function(){var e=this.el.firstElementChild;if(!e)return[];var n=[];do{n.push(t.create(e)),e=e.nextElementSibling}while(e);return n}},{key:"childLength",value:function(){return this.el.children.length}},{key:"replace",value:function(t){return this.el.parentNode&&this.el.parentNode.replaceChild(t.el||t,this.el),this}},{key:"replaceChild",value:function(t,e){return this.el.replaceChild(e.el||e,t.el||t),this}},{key:"checked",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return 0==arguments.length?!!this.el.checked:(this.el.checked=!!t,this)}},{key:"click",value:function(){return this.el.click(),this}},{key:"focus",value:function(){return this.el.focus(),this}},{key:"select",value:function(){if("true"===this.attr("contenteditable")){var t=document.createRange();t.selectNodeContents(this.el);var e=window.getSelection();e.removeAllRanges(),e.addRange(t)}else this.el.select();return this}},{key:"blur",value:function(){return this.el.blur(),this}},{key:"context",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"2d";return this._initContext||(this._initContext=this.el.getContext(t)),this._initContext}},{key:"resize",value:function(t){var e=t.width,n=t.height;this._initContext=null;var r=this.context(),i=window.devicePixelRatio||1;this.px("width",+e),this.px("height",+n),this.el.width=e*i,this.el.height=n*i,r.scale(i,i)}},{key:"toDataURL",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.el.toDataURL(t,e)}},{key:"clear",value:function(){this.context().clearRect(0,0,this.el.width,this.el.height)}},{key:"update",value:function(t){this.clear(),t.call(this,this)}},{key:"drawImage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.context(),i=window.devicePixelRatio||1;r.drawImage(t,e,n,t.width,t.height,0,0,this.el.width/i,this.el.height/i)}},{key:"drawOption",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.context();Object.assign(e,t)}},{key:"drawLine",value:function(t,e,n,r){var i=this.context();i.beginPath(),i.moveTo(t,e),i.lineTo(n,r),i.stroke(),i.closePath()}},{key:"drawPath",value:function(){var t=this.context();t.beginPath();for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:Go;return" ".concat(e," ").concat(t)},zo=/^dom (.*)/gi,Fo=/^load (.*)/gi,Bo=/^bind (.*)/gi,Go="|",Ho={},No=function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:Go;return Ao(t,e)},gs=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Go;return Ao("after(".concat(t,")"),e)},ms=ys,bs=ys,ks=(ys("ArrowUp"),ys("ArrowDown"),ys("ArrowLeft"),ys("ArrowRight"),ys("Enter")),xs=(ys("Space"),ys("Escape")),ws=ys("isAltKey"),Ss=(ys("isShiftKey"),ys("isMetaKey"),ys("isCtrlKey"),ys("self"),ys("fit"),ys("passive"),ys("domdiff")),Ps=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return ys("debounce(".concat(t,")"))},js=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return ys("delay(".concat(t,")"))},Os=(Ps(1e3),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return ys("throttle(".concat(t,")"))}),$s=(ys("capture()"),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"move";return gs("bodyMouseMove ".concat(t))}),Cs=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end";return gs("bodyMouseUp ".concat(t))},Es=gs("preventDefault"),Ts=gs("stopPropagation"),Vs=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$el";return"load "+t},Ms=function(t){if(""===t)return"";var e=Ar();return Ho[e]=t,e},Ds=function(t){return function(){return this.prevState[t]!=this.state[t]}},Is=function(){return!0},Ls=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$el",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"bind "+t+(e?Go+Ms(e):"")};function Rs(t,e){return Math.sign(t)*Math.min(e,Math.abs(t))}var As,zs={addEvent:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t&&t.addEventListener(e,n,r)},removeEvent:function(t,e,n){t&&t.removeEventListener(e,n)},pos:function(t){return t.touches&&t.touches[0]?t.touches[0]:t},posXY:function(t){var e=this.pos(t);return{x:e.pageX,y:e.pageY}}},Fs=n(6),Bs=n.n(Fs),Gs=n(9),Hs=n.n(Gs),Ns=n(13),Xs=n.n(Ns),Ys=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};go()(this,t),this.context=e,this.options=n}return bo()(t,[{key:"initialize",value:function(){}},{key:"load",value:function(){}},{key:"refresh",value:function(){}},{key:"render",value:function(){}},{key:"getRef",value:function(t){return this.context.getRef(t)}},{key:"run",value:function(){}},{key:"destroy",value:function(){}}]),t}(),_s={touchstart:!0,touchmove:!0,mousedown:!0,mouseup:!0,mousemove:!0},Ks={doubletab:"touchend"},Ws={doubletab:!0},Us=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"initialize",value:function(){var t=this;this.destroy(),this._domEvents||(this._domEvents=this.context.filterProps(zo)),this._domEvents.forEach((function(e){return t.parseEvent(e)}))}},{key:"destroy",value:function(){this.removeEventAll()}},{key:"removeEventAll",value:function(){var t=this;this.getBindings().forEach((function(e){t.removeEvent(e)})),this.initBindings()}},{key:"removeEvent",value:function(t){var e=t.eventName,n=t.dom,r=t.callback;zs.removeEvent(n,e,r)}},{key:"getBindings",value:function(){return this._bindings||this.initBindings(),this._bindings}},{key:"addBinding",value:function(t){this.getBindings().push(t)}},{key:"initBindings",value:function(){this._bindings=[]}},{key:"matchPath",value:function(t,e){return t?t.matches(e)?t:this.matchPath(t.parentElement,e):null}},{key:"hasDelegate",value:function(t,e){return this.matchPath(t.target||t.srcElement,e.delegate)}},{key:"makeCallback",value:function(t,e){return t.delegate?this.makeDelegateCallback(t,e):this.makeDefaultCallback(t,e)}},{key:"makeDefaultCallback",value:function(t,e){var n=this;return function(r){var i=n.runEventCallback(r,t,e);if(Ii(i))return i}}},{key:"makeDelegateCallback",value:function(t,e){var n=this;return function(r){var i=n.hasDelegate(r,t);if(i){r.$dt=Ro.create(i);var a=n.runEventCallback(r,t,e);if(Ii(a))return a}}}},{key:"runEventCallback",value:function(t,e,n){var r=this.context;if(t.xy=zs.posXY(t),e.beforeMethods.length&&e.beforeMethods.every((function(e){return r[e.target].call(r,t,e.param)})),this.checkEventType(t,e)){var i=n(t,t.$dt,t.xy);return!1!==i&&e.afterMethods.length&&e.afterMethods.forEach((function(e){return r[e.target].call(r,t,e.param)})),i}}},{key:"checkEventType",value:function(t,e){var n=this.context,r=!0;e.codes.length&&(r=!!t.code&&e.codes.indexOf(t.code.toLowerCase())>-1||!!t.key&&e.codes.indexOf(t.key.toLowerCase())>-1);var i=!0;return e.checkMethodList.length&&(i=e.checkMethodList.every((function(e){var r=n[e];return Bi(r)&&r?r.call(n,t):!Ii(r)||!!r}))),r&&i}},{key:"getDefaultDomElement",value:function(t){var e,n=this.context;return(e=t?n.refs[t]||n[t]||window[t]:n.el||n.$el||n.$root)instanceof Ro?e.getElement():e}},{key:"getRealEventName",value:function(t){return Ks[t]||t}},{key:"getCustomEventName",value:function(t){return Ws[t]?t:""}},{key:"getDefaultEventObject",value:function(t,e){var n=this.context,r=e,i=r.filter((function(t){return!!n[t]})),a=aa(r,"after"),o=j()(a,2),s=o[0],c=o[1],l=aa(r,"before"),u=j()(l,2),h=u[0],p=u[1],d=aa(r,"debounce"),f=j()(d,2),v=f[0],y=f[1],g=aa(r,"delay"),m=j()(g,2),b=m[0],k=m[1],x=aa(r,"throttle"),w=j()(x,2),S=w[0],P=w[1],O=aa(r,"capture"),$=j()(O,1)[0],C=[].concat(E()(i),E()(s),E()(h),E()(b),E()(v),E()(S),E()($)),T=r.filter((function(t){return-1===C.indexOf(t)})).map((function(t){return t.toLowerCase()}));return{eventName:this.getRealEventName(t),customEventName:this.getCustomEventName(t),codes:T,captures:$,afterMethods:c,beforeMethods:p,delayMethods:k,debounceMethods:y,throttleMethods:P,checkMethodList:i}}},{key:"addEvent",value:function(t,e){t.callback=this.makeCallback(t,e),this.addBinding(t);var n=!!t.captures.length;_s[t.eventName]&&(n={passive:!0,capture:n}),zs.addEvent(t.dom,t.eventName,t.callback,n)}},{key:"makeCustomEventCallback",value:function(t,e){var n=this;if("doubletab"===t.customEventName){var r=300;return t.delayMethods.length&&(r=+t.delayMethods[0].target),function(){n.doubleTab?(performance.now()-n.doubleTab.time-1})).forEach((function(t){var n,i,a,o,s,c,l,u,h,p,d,f,v,y,g;return Hs.a.async((function(m){for(;;)switch(m.prev=m.next){case 0:if(n=r.context[t],i=t.split(Go),a=j()(i,2),t=a[0],o=a[1],s=r.getRef(o),c=Is,""!=s&&Ai(s)?c=Ds(s):Bi(s)&&(c=s),l=t.split("bind ")[1],u=r.context.refs[l],h=Bi(c)&&c.call(r.context),!u||!h){m.next=16;break}return m.next=11,Hs.a.awrap(n.call.apply(n,[r.context].concat(e)));case 11:if(p=m.sent){m.next=14;break}return m.abrupt("return");case 14:for(d=Object.keys(p),f=0,v=d.length;f0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(Js,t)}function tc(){var t=Xs()(["",""]);return tc=function(){return t},t}function ec(){var t=Xs()(["\n ","\n "]);return ec=function(){return t},t}function nc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function rc(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};this.opt=t||{},this.parent=this.opt,this.props=e,this.source=Ar(),this.sourceName=this.constructor.name}},{key:"initComponents",value:function(){this.childComponents=rc({},this.components())}},{key:"initializeHandler",value:function(){return[new qs(this),new Us(this)]}},{key:"initState",value:function(){return{}}},{key:"setState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.prevState=this.state,this.state=Object.assign({},this.state,t),e&&this.load()}},{key:"toggleState",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.setState(S()({},t,!this.state[t]),e)}},{key:"_reload",value:function(t){this.props=t,this.state={},this.setState(this.initState(),!1),this.refresh(!0)}},{key:"render",value:function(t){this.$el=this.parseTemplate(qi(ec(),this.template())),this.refs.$el=this.$el,t&&t.append(this.$el),this.load(),this.afterRender()}},{key:"initialize",value:function(){this.state=this.initState()}},{key:"afterRender",value:function(){}},{key:"components",value:function(){return{}}},{key:"getRef",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n-1}},{key:"parseProperty",value:function(t){var e,n={},r=!0,i=!1,a=void 0;try{for(var o,s=t.el.attributes[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n[c.nodeName]=c.nodeValue}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n.props&&(n=rc({},n,{},(e=n.props,Ho[e]||""))),t.$$("property").forEach((function(t){var e=t.attrs("name","value","type"),r=j()(e,3),i=r[0],a=r[1],o=r[2],s=a||t.text();"json"===o&&(s=JSON.parse(s)),n[i]=s})),n}},{key:"parseSourceName",value:function(t){return t.parent?[t.sourceName].concat(E()(this.parseSourceName(t.parent))):[t.sourceName]}},{key:"getEventMachineComponent",value:function(t){return Js[t]||this.childComponents[t]}},{key:"parseComponent",value:function(){var t=this;this.$el.$$("[refclass]").forEach((function(e){var n=t.getEventMachineComponent(e.attr("refclass"));if(n){var r=t.parseProperty(e),i=e.attr("ref"),a=null;t.children[i]?(a=t.children[i])._reload(r):(a=new n(t,r),t.children[i||a.id]=a,a.render()),e.replace(a.$el)}else e.remove()})),Ci(this.children,(function(e,n){n&&n.clean()&&delete t.children[e]}))}},{key:"clean",value:function(){if(this.$el&&!this.$el.hasParent())return Ci(this.children,(function(t,e){e.clean()})),this.destroy(),this.$el=null,!0}},{key:"refresh",value:function(){this.load()}},{key:"_afterLoad",value:function(){this.runHandlers("initialize"),this.bindData(),this.parseComponent()}},{key:"load",value:function(){var t,e,n,r=this,i=arguments;return Hs.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),n=0;n-1})).forEach((function(t){var n,i,a,o,s,c,l,u,h;return Hs.a.async((function(p){for(;;)switch(p.prev=p.next){case 0:if(n=t.split("load ")[1],i=n.split(Go).map((function(t){return t.trim()})),a=$()(i),o=a[0],s=(s=a.slice(1)).map((function(t){return t.trim()})),c=Boolean(s.filter((function(t){return Ss.includes(t)})).length),!r.refs[o]){p.next=11;break}return p.next=7,Hs.a.awrap((l=r[t]).call.apply(l,[r].concat(e)));case 7:Li(u=p.sent)&&(u=u.join("")),h=r.parseTemplate(qi(tc(),u),!0),c?r.refs[o].htmlDiff(h):r.refs[o].html(h);case 11:case"end":return p.stop()}}))})));case 4:this._afterLoad();case 5:case"end":return a.stop()}}),null,this)}},{key:"runHandlers",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"run",e=arguments.length,n=new Array(e>1?e-1:0),r=1;r"}},{key:"eachChildren",value:function(t){Bi(t)&&Ci(this.children,(function(e,n){t(n)}))}},{key:"rerender",value:function(){var t=this.$el.parent();this.destroy(),this.render(t)}},{key:"destroy",value:function(){this.eachChildren((function(t){t.destroy()})),this.runHandlers("destroy"),this.$el.remove(),this.$el=null,this.refs={},this.children={}}},{key:"collectProps",value:function(){return ji(this,oc)}},{key:"filterProps",value:function(t){return this.collectProps().filter((function(e){return e.match(t)}))}},{key:"self",value:function(t){return t&&t.$dt&&t.$dt.is(t.target)}},{key:"isAltKey",value:function(t){return t.altKey}},{key:"isCtrlKey",value:function(t){return t.ctrlKey}},{key:"isShiftKey",value:function(t){return t.shiftKey}},{key:"isMetaKey",value:function(t){return t.metaKey||"Meta"==t.key||t.code.indexOf("Meta")>-1}},{key:"preventDefault",value:function(t){return t.preventDefault(),!0}},{key:"stopPropagation",value:function(t){return t.stopPropagation(),!0}},{key:"bodyMouseMove",value:function(t,e){this[e]&&this.emit("add/body/mousemove",this[e],this,t.xy)}},{key:"bodyMouseUp",value:function(t,e){this[e]&&this.emit("add/body/mouseup",this[e],this,t.xy)}}]),t}(),cc=new Map,lc=function(){function t(){go()(this,t)}return bo()(t,null,[{key:"has",value:function(t){return cc.has(t)}},{key:"get",value:function(t){return cc.get(t)}},{key:"set",value:function(t,e){cc.size>1e3&&cc.clear(),cc.set(t,e)}}]),t}(),uc=function(){function t(){go()(this,t)}return bo()(t,null,[{key:"parseStyle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"50% 50% 0%";if(lc.has(t))return lc.get(t);var e=t.trim().split(" ").filter((function(t){return t.trim()})),n=null;return n=1===e.length?[e[0],e[0]].map((function(t){return Lo.parse(t)})):e.map((function(t){return Lo.parse(t)})),lc.set(t,n),n}},{key:"scale",value:function(e,n,r){var i=t.parseStyle(e);return[i[0].toPx(n).value,i[1].toPx(r).value,i[2].value]}},{key:"toPx",value:function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=t.parseStyle(e),o=j()(a,3),s=o[0],c=o[1],l=o[2];return s=s.toPx(n),c=c.toPx(r),l=l.toPx(i),"".concat(s," ").concat(c," ").concat(l)}}]),t}();function hc(t,e,n,r,i,a,o,s){var c=((o-i)*(e-a)-(s-a)*(t-i))/((s-a)*(n-t)-(o-i)*(r-e)),l=((n-t)*(e-a)-(r-e)*(t-i))/((s-a)*(n-t)-(o-i)*(r-e));return 0<=c&&c<=1&&0<=l&&l<=1}function pc(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=!1,i=t.length;return t.forEach((function(a,o){var s=j()(a,2),c=s[0],l=s[1],u=j()(t[(o+1)%i],2),h=u[0],p=u[1];(l>=n&&p=n)&&e<(h-c)*(n-l)/(p-l)+c&&(r=!r)})),r}function dc(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=t.length;return t.some((function(o,s){var c=j()(o,2),l=c[0],u=c[1],h=j()(t[(s+1)%a],2),p=h[0],d=h[1];return hc(e,n,r,i,l,u,p,d)}))}function fc(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;return t.some((function(r,i){var a=j()(r,2),o=a[0],s=a[1],c=j()(t[(i+1)%n],2),l=c[0],u=c[1],h=dc(e,o,s,l,u);return!!h||!!(h=pc(t,e[0][0],e[0][1]))}))}function vc(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"50% 50% 0px",a=uc.scale(i,n,r);return[[t,e,0],[t+n,e,0],[t+n,e+r,0],[t,e+r,0],[t+a[0],e+a[1],0]]}function yc(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=a.lerp([],t[0],t[1],.5),r=a.lerp([],t[2],t[3],.5),i=xr(r,n,e);return i}function gc(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,a=[],o=[];return t.forEach((function(t){t.verties().forEach((function(t){a.push(t[0]),o.push(t[1])}))})),e=Math.min.apply(Math,a),r=Math.max.apply(Math,a),n=Math.min.apply(Math,o),i=Math.max.apply(Math,o),e===Number.MAX_SAFE_INTEGER&&(e=0),n===Number.MAX_SAFE_INTEGER&&(n=0),r===Number.MIN_SAFE_INTEGER&&(r=0),i===Number.MIN_SAFE_INTEGER&&(i=0),vc(e,n,r-e,i-n)}function mc(t){var e=Lo.px(t[0][0]).floor(),n=Lo.px(t[0][1]).floor();return{x:e,left:e,y:n,top:n,width:Lo.px(a.dist(t[0],t[1])).floor(),height:Lo.px(a.dist(t[0],t[3])).floor()}}function bc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function kc(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return go()(this,t),this.ref=new Proxy(this,{get:function(t,e){var n=t[e];return Bi(n)?function(){for(var e=arguments.length,r=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:"";return this.json.id+t}},{key:"recover",value:function(){}},{key:"setCache",value:function(){}},{key:"is",value:function(t){return!!this.json&&t===this.json.itemType}},{key:"isNot",value:function(t){return!1===this.is(t)}},{key:"isSVG",value:function(){return!1}},{key:"generateListNumber",value:function(){this.layers.forEach((function(t,e){t.no=e,t.generateListNumber()}))}},{key:"convert",value:function(t){var e=this;return t.layers&&t.layers.forEach((function(t){t.parent=e.ref})),t}},{key:"checkField",value:function(t,e){return!0}},{key:"toCloneObject",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.attrs("itemType","elementType","type","visible","lock","selected");return t&&(e.layers=this.json.layers.map((function(e){return e.clone(t)}))),e}},{key:"clone",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.constructor,n=new e(this.toCloneObject(t));return n.setParent(this.json.parent),n}},{key:"reset",value:function(t){this.json=this.convert(Object.assign(this.json,t)),this.changed()}},{key:"getDefaultObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=zr();return kc({id:e,_timestamp:Date.now(),_time:performance.now(),visible:!0,lock:!1,selected:!1,layers:[]},t)}},{key:"attrs",value:function(){for(var t=this,e={},n=arguments.length,r=new Array(n),i=0;i0}},{key:"appendChildItem",value:function(t){return t.parent===this.ref?t:(this.resetMatrix(t),t.parent&&t.remove(),t.setParent(this.ref),this.json.layers.push(t),this.project.addIndexItem(t),t)}},{key:"prependChildItem",value:function(t){return this.resetMatrix(t),t.parent&&t.remove(),t.setParent(this.ref),this.json.layers.unshift(t),this.project.addIndexItem(t),t}},{key:"resetMatrix",value:function(t){}},{key:"insertChildItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.resetMatrix(t),t.parent&&t.remove(),t.setParent(this.ref),this.json.layers.splice(e,0,t),this.project.addIndexItem(t),t}},{key:"appendAfter",value:function(t){var e=this.parent.findIndex(this);return this.parent.insertChildItem(t,e),this.project.addIndexItem(t),t}},{key:"appendBefore",value:function(t){var e=this.parent.findIndex(this);return this.parent.insertChildItem(t,e-1),this.project.addIndexItem(t),t}},{key:"setPositionInPlace",value:function(t,e){this.layers.splice(t,0,e)}},{key:"toggle",value:function(t,e){Di(e)?this.json[t]=!this.json[t]:this.json[t]=!!e}},{key:"isTreeItemHide",value:function(){var t=this.parent,e=[];do{if(t.is("project"))break;e.push(Boolean(t.collapsed)),t=t.parent}while(t);return Boolean(e.filter(Boolean).length)}},{key:"expectJSON",value:function(t){return"parent"!==t&&!Di(this.json[t])}},{key:"toJSON",value:function(){var t=this,e=this.json,n={};return Object.keys(e).filter((function(e){return t.expectJSON(e)})).forEach((function(t){n[t]=e[t]})),n}},{key:"resize",value:function(){}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.json.parent.copyItem(this.ref,t)}},{key:"findIndex",value:function(t){return this.json.layers.indexOf(t.ref)}},{key:"copyItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=t.clone();n.move([e,e,0]);var r=this.findIndex(t);return r>-1&&(this.json.layers.splice(r+1,0,n),this.project.addIndexItem(n)),n}},{key:"remove",value:function(){this.json.parent.removeItem(this.ref),this.project.removeIndexItem(this.ref)}},{key:"removeItem",value:function(t){var e=this.findIndex(t);e>-1&&this.json.layers.splice(e,1)}},{key:"hasParent",value:function(t){var e=this.json.parent.id===t;return e||!1!==this.json.parent.is("project")?e:this.json.parent.hasParent(t)}},{key:"searchById",value:function(t){if(this.id===t)return e.addIndexItem(this.ref),this.ref;for(var e=this.project,n=0,r=this.layers.length;n0&&void 0!==arguments[0]?arguments[0]:{};return Sc({selected:!1,layers:[]},t)}},{key:"isAttribute",value:function(){return!0}},{key:"toCSS",value:function(){return{}}},{key:"toString",value:function(){return Ji(this.toCSS())}}]),e}(xc),jc=new Map,Oc=function(){function t(){go()(this,t)}return bo()(t,null,[{key:"has",value:function(t){return jc.has(t)}},{key:"get",value:function(t){return jc.get(t)}},{key:"set",value:function(t,e){jc.size>1e3&&jc.clear(),jc.set(t,e)}}]),t}();function $c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Cc=/((matrix|translate(X|Y|Z|3d)?|scale(X|Y|Z|3d)?|rotate(X|Y|Z|3d)?|skew(X|Y)|matrix(3d)?|perspective)\(([^\)]*)\))/gi,Ec=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return{itemType:"transform",value:[]}}},{key:"toCloneObject",value:function(){return function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:[];return Ai(n)&&(n=[n]),e.filter(t,(function(t){return!1===n.includes(t.type)}))}},{key:"filter",value:function(t,n){return e.join(e.parseStyle(t,!1).filter((function(t){return n(t)})))}},{key:"replace",value:function(t,n){var r=e.parseStyle(t,!1),i=r.find((function(t){return t.type===n.type}));return i?i.value=n.value:r.push(n),e.join(r)}},{key:"replaceAll",value:function(t,n){for(var r=e.parseStyle(t,!1),i=e.parseStyle(n),a=0,o=i.length;a2&&void 0!==arguments[2]?arguments[2]:"rotate",i=e.createRotateKey(t,n,r);return Oc.has(i)?Oc.get(i):(Oc.set(i,e.replace(t,{type:r,value:[n]})),Oc.get(i))}},{key:"rotateZ",value:function(t,n){return e.rotate(t,n,"rotateZ")}},{key:"rotateX",value:function(t,n){return e.rotate(t,n,"rotateX")}},{key:"rotateY",value:function(t,n){return e.rotate(t,n,"rotateY")}},{key:"parseStyle",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=[];if(!t)return r;if(n&&Oc.has(t))return Oc.get(t);var i=t.match(Cc)||[];return i.forEach((function(t,n){var i=t.split("("),a=j()(i,2),o=a[0],s=a[1],c=(s=s.split(")")[0]).split(",");c=s.includes("matrix")||s.includes("scale")?c.map((function(t){return Lo.number(t.trim())})):c.map((function(t){return Lo.parse(t.trim())})),r[n]=e.parse({type:o,value:c})})),n&&Oc.set(t,r),r}},{key:"createTransformMatrix",value:function(t,e,n){for(var r=i.create(),a=0,o=t.length;as&&(n[o].mark=!0,t.DouglasPeuker(e,n,r,o),t.DouglasPeuker(e,n,o,i))}}},{key:"simply",value:function(e,n){return e.length<=2?e:((e=Xi(e))[0].mark=!0,e[e.length-1].mark=!0,t.DouglasPeuker(n,e,0,e.length-1),e.filter((function(t){return Boolean(t.mark)})))}},{key:"segmentDistance2",value:function(t,e,n,r){var i=r.x-n.x,a=r.y-n.y,o=i*i+a*a,s=t-n.x,c=e-n.y,l=i*s+a*c;if(0===o)return s*s+c*c;if(l<=0)return s*s+c*c;if(l>=o)return(s=t-r.x)*s+(c=e-r.y)*c;var u=s*a-c*i;return u*u/o}},{key:"isInLine",value:function(t,e,n){return t.x===n.x?e.x===n.x:t.y===n.y?e.y===n.y:(t.x-n.x)*(t.y-n.y)==(n.x-e.x)*(n.y-e.y)}},{key:"isLine",value:function(e){return t.isInLine(e.endPoint,e.startPoint,e,reversePoint)}},{key:"getReversePoint",value:function(t,e){var n=t.x-e.x,r=t.y-e.y;return{x:t.x+n,y:t.y+r}}},{key:"getIndexPoint",value:function(t,e){return t[e]}},{key:"getPoint",value:function(e,n){return e.filter((function(e){return t.isEqual(e.startPoint,n)}))[0]}},{key:"getIndex",value:function(e,n){for(var r=-1,i=0,a=e.length;i0;r--)if("M"===t[r].command){n=r;break}-1===n&&(n=0);var i=t[n];return i&&(i.index=n),i}},{key:"getConnectedPoint",value:function(t,e){}},{key:"getPrevPoint",value:function(e,n){var r=n-1;if(r<0)return t.getLastPoint(e,n);var i=e[r];return i&&(i.index=r),i}},{key:"getNextPoint",value:function(e,n){var r=e[n],i=e[n+1];return i&&(i.index=n+1),r.connected&&(i=t.getFirstPoint(e,n)),i}},{key:"removePoint",value:function(t,e,n){if("startPoint"===n)return t.filter((function(t,n){return n!==e}))}},{key:"splitPoints",value:function(e){var n=[],r=[];return e.forEach((function(e){t.isFirst(e)?(r=[e],n.push(r)):r.push(e)})),n}},{key:"recoverPoints",value:function(t){var e=[];return t.forEach((function(t){t.forEach((function(t,e){0===e&&(t.command="M",t.originalCommand="M")})),e.push.apply(e,t)})),e.forEach((function(t,e){t.index=e})),e}}]),t}(),Vc=/([mMlLvVhHcCsSqQtTaAzZ]([^mMlLvVhHcCsSqQtTaAzZ]*))/g,Mc=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,Dc=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";go()(this,t),this.reset(e)}return bo()(t,[{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.segments=[],this.pathString=t,this.parse()}},{key:"resetSegments",value:function(t){this.segments=t||[],this.pathString=this.joinPath()}},{key:"trim",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.match(Mc)||[];return e.filter((function(t){return""!=t}))}},{key:"parse",value:function(){var t=this,e=this.pathString.match(Vc)||[];this.segments=e.map((function(e){var n=e[0];return{command:n,values:t.trim(e.replace(n,"")).map((function(t){return+t}))}})),this.segments=this.segments.map((function(e,n){switch(e.command){case"c":case"m":case"l":case"q":case"s":case"t":case"v":case"h":for(var r=t.segments[n-1],i=r.values[r.values.length-2],a=r.values[r.values.length-1],o=0,s=e.values.length;o1&&void 0!==arguments[1]&&arguments[1],r=this.segments.map((function(n,r){return t.call(e,n,r)}));if(n)return r;this.segments=r}},{key:"_loop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.each((function(e){var n=e.values;switch(e.command){case"M":case"L":var r=t(n,0);e.values=[r[0],r[1]];break;case"V":r=t([+n[0],0]);e.values=[r[0]];break;case"H":r=t([0,+n[0]]);e.values=[r[1]];break;case"C":case"S":case"T":case"Q":for(var i=0,a=n.length;i1&&void 0!==arguments[1]&&arguments[1];return this.each((function(e){var n=e.values;switch(e.command){case"M":case"L":var r=a.transformMat4([],[n[0],n[1],0],t);e.values=[r[0],r[1]];break;case"V":r=a.transformMat4([],[+n[0],0,0],t);e.values=[r[0]];break;case"H":r=a.transformMat4([],[0,+n[0],0],t);e.values=[r[1]];break;case"C":case"S":case"T":case"Q":for(var i=0,o=n.length;i0&&void 0!==arguments[0]?arguments[0]:1;return this.each((function(e){return e.values=e.values.map((function(e){return dr(e,t)})),e})),this}},{key:"reverseSegments",value:function(t){for(var e=[],n=t.length-1,r=n;r>0;r--){var i=t[r],a=i.values,o=i.command,s=t[r-1],c=s.values[s.values.length-2],l=s.values[s.values.length-1];switch(o){case"L":r===n&&e.push({command:"M",values:[a[0],a[1]]}),e.push({command:"L",values:[c,l]});break;case"C":r===n&&e.push({command:"M",values:[a[4],a[5]]}),e.push({command:"C",values:[a[2],a[3],a[0],a[1],c,l]});break;case"Q":r===n&&e.push({command:"M",values:[a[2],a[3]]}),e.push({command:"Q",values:[a[0],a[1],c,l]});break;case"Z":e.push(i),n=r-1}}return"Z"===e[0].command&&e.push(e.shift()),e}},{key:"splitSegments",value:function(){var t=[],e=[];return this.segments.forEach((function(n){"M"===n.command?(e=[n],t.push(e)):e.push(n)})),t}},{key:"reverse",value:function(){var t=this,e=this.splitSegments(),n=[];e.forEach((function(e){n.push.apply(n,t.reverseSegments(e))})),this.segments=n}},{key:"d",get:function(){return this.toString()}},{key:"verties",get:function(){var t=[],e=[];return this.each((function(n){var r=n.values;switch(n.command){case"M":case"L":t.push([].concat(E()(n.values),[0]));break;case"V":t.push([r[0],e.pop(),0]);break;case"H":e.pop(),t.push([e.pop(),r[0],0]);break;case"C":case"S":case"T":case"Q":for(var i=0,a=r.length;i0&&void 0!==arguments[0])||arguments[0];return Lc({},Bs()(So()(e.prototype),"toCloneObject",this).call(this,t),{},this.attrs("x","y","width","height"))}},{key:"convert",value:function(t){return(t=Bs()(So()(e.prototype),"convert",this).call(this,t)).x=Lo.parse(t.x),t.y=Lo.parse(t.y),t.width=Lo.parse(t.width),t.height=Lo.parse(t.height),t}},{key:"setScreenX",value:function(t){var e=0;this.isChild&&(e=this.json.parent.screenX.value),this.json.x.set(t-e),this.changed()}},{key:"setScreenY",value:function(t){var e=0;this.isChild&&(e=this.json.parent.screenY.value),this.json.y.set(t-e),this.changed()}},{key:"move",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0];this.reset({x:Lo.px(this.offsetX.value+t[0]).round(),y:Lo.px(this.offsetY.value+t[1]).round()})}},{key:"moveByCenter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],e=this.matrix;this.reset({x:Lo.px(t[0]-e.width/2),y:Lo.px(t[1]-e.height/2)})}},{key:"checkInArea",value:function(t){return fc(t,this.verties())}},{key:"hasPoint",value:function(t,e){return pc(this.verties(),t,e)}},{key:"isIncludeByArea",value:function(t){return 4===this.rectVerties().map((function(e){return pc.apply(void 0,[t].concat(E()(e)))})).filter(Boolean).length}},{key:"getPerspectiveMatrix",value:function(){if(this.json.perspective||Ec.get(this.json.transform,"perspective")){var t=uc.parseStyle(this.json["perspective-origin"]),e=j()(t,2),n=e[0],r=void 0===n?Lo.percent(50):n,a=e[1],o=void 0===a?Lo.percent(50):a,s=this.screenWidth.value,c=this.screenHeight.value;r=r.toPx(s).value,o=o.toPx(c).value;var l=i.create();i.translate(l,l,[r,o,0]);var u=Ec.get(this.json.transform,"perspective");if(u.length)i.multiply(l,l,i.fromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,-1/u[0].value,1));else{if(!this.json.perspective||"none"==this.json.perspective)return;i.multiply(l,l,i.fromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,-1/Lo.parse(this.json.perspective).value,1))}return i.translate(l,l,[-r,-o,0]),l}}},{key:"getItemTransformMatrix",value:function(){var t=Ec.parseStyle(Ec.rotate(this.json.transform,this.json.rotate)),e=this.screenWidth.value,n=this.screenHeight.value;return Ec.createTransformMatrix(t,e,n)}},{key:"getItemTransformMatrixInverse",value:function(){return i.invert([],this.getItemTransformMatrix())}},{key:"getTransformMatrix",value:function(){var t=uc.scale(this.json["transform-origin"]||"50% 50% 0px",this.screenWidth.value,this.screenHeight.value),e=i.create();return i.translate(e,e,t),i.multiply(e,e,this.getItemTransformMatrix()),i.translate(e,e,a.negate([],t)),e}},{key:"getTransformMatrixInverse",value:function(){return i.invert([],this.getTransformMatrix())}},{key:"getDirectionTransformMatrix",value:function(t,e,n){var r=this.offsetX.value,o=this.offsetY.value,s=a.add([],uc.scale(this.json["transform-origin"]||"50% 50% 0px",e,n),a.negate([],t)),c=i.create();return i.translate(c,c,[r,o,0]),i.translate(c,c,t),i.translate(c,c,s),i.multiply(c,c,this.getItemTransformMatrix()),i.translate(c,c,a.negate([],s)),c}},{key:"getDirectionTopLeftMatrix",value:function(t,e){return this.getDirectionTransformMatrix([0,0,0],t,e)}},{key:"getDirectionLeftMatrix",value:function(t,e){return this.getDirectionTransformMatrix([0,e/2,0],t,e)}},{key:"getDirectionTopMatrix",value:function(t,e){return this.getDirectionTransformMatrix([t/2,0,0],t,e)}},{key:"getDirectionBottomLeftMatrix",value:function(t,e){return this.getDirectionTransformMatrix([0,e,0],t,e)}},{key:"getDirectionTopRightMatrix",value:function(t,e){return this.getDirectionTransformMatrix([t,0,0],t,e)}},{key:"getDirectionRightMatrix",value:function(t,e){return this.getDirectionTransformMatrix([t,e/2,0],t,e)}},{key:"getDirectionBottomRightMatrix",value:function(t,e){return this.getDirectionTransformMatrix([t,e,0],t,e)}},{key:"getDirectionBottomMatrix",value:function(t,e){return this.getDirectionTransformMatrix([t/2,e,0],t,e)}},{key:"getAccumulatedMatrix",value:function(){for(var t=i.create(),e=this.path.filter((function(t){return!1===t.is("project")})),n=0,r=e.length;n0&&void 0!==arguments[0]?arguments[0]:"",e=t||this.json.d,n=new Dc(e),r=this.getAccumulatedMatrix();return n.transformMat4(r),n}},{key:"invertPath",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=new Dc(t);return e.transformMat4(this.getAccumulatedMatrixInverse()),e}},{key:"invertPathString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.invertPath(t).d}},{key:"checkInAreaForAll",value:function(t){var e=E()(this.checkInAreaForLayers(t));return this.is("artboard")?e:this.is("project")?e:(this.checkInArea(t)&&e.push(this.ref),e)}},{key:"checkInAreaForLayers",value:function(t){var e=[];return this.layers.forEach((function(n){e.push.apply(e,n.checkInAreaForLayers(t)),n.checkInArea(t)&&e.push(n)})),e}},{key:"getTransformOriginMatrix",value:function(){return i.fromTranslation([],uc.scale(this.json["transform-origin"]||"50% 50% 0px",this.screenWidth.value,this.screenHeight.value))}},{key:"getTransformOriginMatrixInverse",value:function(){return i.invert([],this.getTransformOriginMatrix())}},{key:"resetMatrix",value:function(t){var e=Mr(this.getAccumulatedMatrixInverse(),t.getAccumulatedMatrix()),n=Ec.fromScale(i.getScaling([],e).map((function(t){return dr(t,1e3)}))),r=i.getRotation([],e),a=[],s=o.getAxisAngle(a,r),c=[{angle:a[0]?yr(s*a[0]):0,type:"rotateX"},{angle:a[1]?yr(s*a[1]):0,type:"rotateY"},{angle:a[2]?yr(s*a[2]):0,type:"rotateZ"}].filter((function(t){return 0!==t.angle})).map((function(t){return"".concat(t.type,"(").concat(Lo.deg(t.angle%360).round(1e3),")")})).join(" "),l=Ec.replaceAll(t.transform,"".concat(n," ").concat(c)),u=Ec.parseStyle(l),h=t.screenWidth.value,p=t.screenHeight.value,d=Ec.createTransformMatrix(u,h,p),f=i.getTranslation([],Mr(e,Dr(t.getTransformOriginMatrix(),d,t.getTransformOriginMatrixInverse()))),v=j()(f,3),y=v[0],g=v[1];v[2];t.reset({x:Lo.px(y),y:Lo.px(g),transform:l})}},{key:"getIndex",value:function(){for(var t=this.json.parent.layers,e=-1,n=0,r=t.length;n-1&&(e.layers[n]=e.layers[t],e.layers[t]=this.ref)}},{key:"next",value:function(){if(this.isLast())return this.ref;var t=this.getIndex();return this.json.parent.layers[t+1]}},{key:"prev",value:function(){if(this.isFirst())return this.ref;var t=this.getIndex();return this.json.parent.layers[t-1]}},{key:"orderNext",value:function(){if(this.isLast()){if(this.json.parent.is("artboard"))return;this.json.parent.next().add(this,"prepend")}else{var t=this.getIndex();t>-1&&this.setOrder(t+1)}}},{key:"isFirst",value:function(){return 0===this.getIndex()}},{key:"isLast",value:function(){return this.getIndex()===this.json.parent.layers.length-1}},{key:"orderPrev",value:function(){if(this.isFirst()){if(this.json.parent.is("artboard"))return;this.json.parent.prev().add(this)}else{var t=this.getIndex();t>0&&this.setOrder(t-1)}}},{key:"orderFirst",value:function(){this.setOrder(0)}},{key:"orderLast",value:function(){this.setOrder(this.json.parent.layers.length-1)}},{key:"orderTop",value:function(){}},{key:"orderBottom",value:function(){}},{key:"isAbsolute",get:function(){return"absolute"===this.json.position}},{key:"isRelative",get:function(){return"relative"===this.json.position}},{key:"isChild",get:function(){if(this.json.parent&&(!1===this.json.parent.is("project")&&this.isAbsolute))return!0;return!1}},{key:"screenX",get:function(){return this.isChild?Lo.px(this.json.parent.screenX.value+this.json.x.value):this.json.x||Lo.z()}},{key:"screenY",get:function(){return this.isChild?Lo.px(this.json.parent.screenY.value+this.json.y.value):this.json.y||Lo.z()}},{key:"offsetX",get:function(){return this.parent?this.json.x.toPx(this.screenWidth.value):this.json.x||Rc}},{key:"offsetY",get:function(){return this.parent?this.json.y.toPx(this.screenHeight.value):this.json.y||Rc}},{key:"screenWidth",get:function(){return this.is("project")||!this.parent?Rc:this.parent.is("project")?this.json.width.toPx():this.is("artboard")?this.json.width.toPx():this.json.width.toPx(this.parent.screenWidth.value)}},{key:"screenHeight",get:function(){return this.is("project")||!this.parent?Rc:this.parent.is("project")?this.json.height.toPx():this.is("artboard")?this.json.height.toPx():this.json.height.toPx(this.parent.screenHeight.value)}},{key:"matrix",get:function(){var t=this.id,e=this.offsetX.value,n=this.offsetY.value,r=this.screenWidth.value,a=this.screenHeight.value,o=this.json.transform,s=this.json["transform-origin"]||"50% 50% 0%",c=this.parent&&Bi(this.parent.getAccumulatedMatrix)?this.parent.getAccumulatedMatrix():i.create(),l=i.invert([],c),u=this.getTransformMatrix(),h=this.getTransformMatrixInverse(),p=this.getItemTransformMatrix(),d=this.getItemTransformMatrixInverse(),f=this.getAccumulatedMatrix(),v=this.getAccumulatedMatrixInverse(),y={"to top left":this.getDirectionTopLeftMatrix(r,a),"to top":this.getDirectionTopMatrix(r,a),"to top right":this.getDirectionTopRightMatrix(r,a),"to right":this.getDirectionRightMatrix(r,a),"to bottom left":this.getDirectionBottomLeftMatrix(r,a),"to bottom":this.getDirectionBottomMatrix(r,a),"to bottom right":this.getDirectionBottomRightMatrix(r,a),"to left":this.getDirectionLeftMatrix(r,a)},g=this.verties(r,a),m=g.map((function(t){return t[0]})),b=g.map((function(t){return t[1]}));return{id:t,x:e,y:n,width:r,height:a,transform:o,originalTransformOrigin:s,verties:g,rectVerties:g.filter((function(t,e){return 4!=e})),xList:m,yList:b,directionMatrix:y,parentMatrix:c,parentMatrixInverse:l,localMatrix:u,localMatrixInverse:h,itemMatrix:p,itemMatrixInverse:d,accumulatedMatrix:f,accumulatedMatrixInverse:v}}}]),e}(xc),zc=new(function(){function t(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];go()(this,t),this.components={}}return bo()(t,[{key:"registerComponent",value:function(t,e){this.components[t]=e}},{key:"getComponentClass",value:function(t){return this.components[t]||this.components.rect}},{key:"createComponent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getComponentClass(t);if(!n)throw new Error("".concat(t," type is not valid."));return new n(e)}}]),t}());function Fc(t,e){if(Ai(e)){var n=e.split(":"),r=j()(n,4),i=r[0],a=r[1],o=r[2],s=r[3];return 3600*(i=parseInt(i,10))+60*(a=parseInt(a,10))+(o=parseInt(o,10))+(s=parseInt(s,10))*(1/t)}return Gi(e)?e/t:0}function Bc(t,e){var n=Math.floor(e/3600),r=Math.floor(e/60%60),i=Math.floor(e%60),a=Math.round((e-Math.floor(e))*t);return a===t&&(a=0,60===(i+=1)&&60===(r+=1)&&(n+=1)),[n,r,i,a].map((function(t){return(t+"").padStart(2,"0")})).join(":")}function Gc(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Bc(t,Fc(t,e)-Fc(t,n))}function Hc(t){var e={id:0,start:0,speed:t.speed||1,elapsed:t.elapsed||0,duration:t.duration||0,iterationStartCount:1,iterationCount:t.iterationCount||Number.MAX_SAFE_INTEGER,direction:t.direction||"normal",log:[],logIndex:0,tick:t.tick||function(){},startCallback:t.start||function(){},endCallback:t.end||function(){},firstCallback:t.first||function(){},lastCallback:t.last||function(){}},n=function(t){return"normal"===e.direction||"reverse"!==e.direction&&("alternate"===e.direction?e.iterationStartCount%2==1:"alternate-reverse"===e.direction?e.iterationStartCount%2==0:void 0)?t:1-t},r=function(t){var r=!1;null===e.start&&(e.start=t,r=!0);var o=t-e.start;e.elapsed+=o*e.speed,e.start=t,e.elapsed>e.duration&&(e.elapsed=e.duration);var s=n(e.elapsed/e.duration)*e.duration;r&&e.startCallback(s,e),e.log[e.logIndex++]={elapsed:s,dt:e.lastTime-s},e.lastTime=s,e.tick(s,e),e.elapsed===e.duration?a():i()},i=function(){e.id=requestAnimationFrame(r)},a=function(){e.endCallback(e.elapsed,e),e.iterationStartCount++,e.iterationStartCount>e.iterationCount?(e.lastCallback(e.elapsed,e),cancelAnimationFrame(e.id)):(e.start=null,e.elapsed=0,i())},o=function(t){e.elapsed=t,e.tick(e.elapsed,e)};return{play:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.start=null,e.iterationStartCount=1,e.log=[],e.lastTime=0,e.logIndex=0,Gi(t.elapsed)&&(e.elapsed=t.elapsed),Gi(t.speed)&&(e.speed=t.speed),Gi(t.duration)&&(e.duration=t.duration),Gi(t.iterationCount)&&(e.iterationCount=t.iterationCount||Number.MAX_SAFE_INTEGER),Ai(t.direction)&&(e.direction=t.direction),Bi(t.tick)&&(e.tick=t.tick),Bi(t.start)&&(e.startCallback=t.start),Bi(t.end)&&(e.endCallback=t.end),Bi(t.first)&&(e.firstCallback=t.first),Bi(t.last)&&(e.lastCallback=t.last),Bi(t.stop)&&(e.stopCallback=t.stop),e.firstCallback(e.elapsed,e),i()},stop:function(){e.stopCallback(e.elapsed,e),cancelAnimationFrame(e.id)},tick:r,first:function(t){o(0)},last:function(t){o(e.duration)},seek:o,timer:e}}function Nc(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return function(t,e){var a=0;return a=0===e?n:1===e?r:n+(r-n)*t,i?a+i:a}}function Xc(t,e,n){return function(t,e){return n}}function Yc(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"width",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"parent",a=null;return"parent"===i?a=t[i][r]:"self"===i&&(a=t[r]),a?n.toPx(a.value):n}function _c(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"width",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"parent",o=null;return"parent"===a?o=t[a][i]:"self"===a&&(o=t[i]),o?n.to(r,o.value):n}function Kc(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"width",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"parent",o=Lo.parse(n),s=Lo.parse(r);return o.unit===s.unit?Nc(t,e,o.value,s.value,o.unit):o.equals(s)?Xc(0,0,o):function(n,r){var c=Yc(t,e,o,i,a),l=Yc(t,e,s,i,a);return 0===r?c:1===r?l:_c(t,e,Lo.px(c.value+(l.value-c.value)*n),o.unit,i,a)}}var Wc=function(){function t(){go()(this,t)}return bo()(t,null,[{key:"parseStyle",value:function(t){var e={isAll:!0,"border-radius":Lo.z(),"border-top-left-radius":Lo.z(),"border-top-right-radius":Lo.z(),"border-bottom-right-radius":Lo.z(),"border-bottom-left-radius":Lo.z()},n=t.split(" ").filter((function(t){return Lo.parse(t)}));return 1===n.length?(e.isAll=!0,e["border-radius"]=n[0]):(e.isAll=!1,e["border-top-left-radius"]=n[0],e["border-top-right-radius"]=n[1],e["border-bottom-right-radius"]=n[2],e["border-bottom-left-radius"]=n[3]),e}}]),t}(),Uc=function(t){return t.isAll?[t["border-radius"]||"0px",t["border-radius"]||"0px",t["border-radius"]||"0px",t["border-radius"]||"0px"]:[t["border-top-left-radius"]||"0px",t["border-top-right-radius"]||"0px",t["border-bottom-right-radius"]||"0px",t["border-bottom-left-radius"]||"0px"]};function Zc(t,e,n,r){for(var i=Uc(Wc.parseStyle(n)),a=Uc(Wc.parseStyle(r)),o=Math.max(i.length,a.length),s=[],c=0;c0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return t=+t,function(n){var r=1/t;return"start"==e?r*Math.ceil(n/r):"end"==e?r*Math.floor(n/r):void 0}};function il(){return rl(1,"start")}function al(){return rl(1,"end")}var ol=function(){return function(t){return Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1}},sl={step:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return rl(t,e)},"step-start":il,"step-end":al,stepStart:il,stepEnd:al,"ease-out-elastic":ol,easeOutElastic:ol};function cl(t,e,n,r){var i=Lo.parse(n),a=Lo.parse(r);return function(t,e){var n=i.value,r=a.value;return 0===e?Lo.deg(n):1===e?Lo.deg(r):Lo.deg(n+(r-n)*t).to(i.unit)}}function ll(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var ul=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{itemType:"text-shadow",offsetX:Lo.z(),offsetY:Lo.z(),blurRadius:Lo.z(),color:"rgba(0, 0, 0, 1)"})}},{key:"toCloneObject",value:function(){return function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,dl({itemType:"image-resource",type:"image"},t))}},{key:"isGradient",value:function(){return!1}},{key:"isLinear",value:function(){return!1}},{key:"isRadial",value:function(){return!1}},{key:"isConic",value:function(){return!1}},{key:"isStatic",value:function(){return!1}},{key:"isImage",value:function(){return!1}},{key:"hasAngle",value:function(){return!1}},{key:"isUrl",value:function(){return!1}},{key:"isFile",value:function(){return!1}},{key:"isAttribute",value:function(){return!0}},{key:"toString",value:function(){return"none"}}]),e}(Pc);function vl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function yl(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"%",r=M(2,t),i=e/r,a=Ki(r).map((function(t,e){return"".concat(po.random()," ").concat(e*i).concat(n)})).join(",");return a}},{key:"createRepeatColorStep",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lo.px(1),n=M(2,t),r=Ki(n).map((function(t,n){return"".concat(po.random()," ").concat(Lo.parse(e).mul(n+1))})).join(",");return r}}]),e}(xc);function bl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function kl(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,kl({type:"gradient",colorsteps:[]},t))}},{key:"toCloneObject",value:function(){return kl({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{colorsteps:this.json.colorsteps.map((function(t){return t.clone()}))})}},{key:"convert",value:function(t){return t.colorsteps=t.colorsteps.map((function(t){return new ml(t)})),t}},{key:"calculateAngle",value:function(){var t=this.json.angle;return Di(xl[t])?t:xl[t]||0}},{key:"addColorStep",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.json.colorsteps.push(t),e&&this.sortColorStep(),t}},{key:"insertColorStep",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgba(216,216,216,0)",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgba(216,216,216,1)",r=this.colorsteps;if(r.length){if(te.percent?1:t.percente.index?1:-1:void 0})),t.forEach((function(t,e){t.index=100*e}))}},{key:"addColorStepList",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){t.addColorStep(e,!1)})),this.sortColorStep()}},{key:"getColorStep",value:function(t){return this.json.colorsteps.filter((function(e){return e.id==t}))[0]}},{key:"clear",value:function(){arguments.length?this.json.colorsteps.splice(+(arguments.length<=0?void 0:arguments[0]),1):this.json.colorsteps=[]}},{key:"removeColorStep",value:function(t){this.json.colorsteps=this.json.colorsteps.filter((function(e){return e.id!=t}))}},{key:"getColorString",value:function(){var t=this.colorsteps;return e.toColorString(t)}},{key:"colorsteps",get:function(){return this.json.colorsteps}}],[{key:"toColorString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return"";var e=t.map((function(e,n){return e.prevColorStep=e.cut&&n>0?t[n-1]:null,e}));return 1===e.length&&e.push(new ml({color:e[0].color||"transparent",percent:100})),e.map((function(t){return"".concat(t)})).join(",")}}]),e}(fl);function Sl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Pl=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"static-gradient",static:!0,colorsteps:[new ml({color:"red",percent:0,index:0}),new ml({color:"red",percent:100,index:0})]})}},{key:"toCloneObject",value:function(){return function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"transparent";return new e({colorsteps:[new ml({color:t,percent:0,index:0}),new ml({color:t,percent:100,index:1})]})}}]),e}(wl);function jl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ol(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,Ol({type:"url",url:"",datauri:""},t))}},{key:"toCloneObject",value:function(){return Ol({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("url","datauri"))}},{key:"isUrl",value:function(){return!0}},{key:"toString",value:function(){var t=this.json;return"url(".concat(t.url,")")}}],[{key:"parse",value:function(t){return new e({url:t.split("(")[1].split(")")[0]})}},{key:"isImageFile",value:function(t){return $l.includes(t)}}]),e}(fl);function El(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Tl(t){for(var e=1;e360?e%360:e,"deg")),"".concat(this.json.type,"(").concat(e,", ").concat(t,")")}}],[{key:"toLinearGradient",value:function(t){return 0===t.length?"none":new e({angle:"to right",colorsteps:t})+""}},{key:"parse",value:function(t){var n=_a(t),r=0,i=[];return n.str.split("(")[1].split(")")[0].split(",").map((function(t){return t.trim()})).forEach((function(t,e){t.includes("@")?(t=Wa(t,n.matches),i.push.apply(i,ml.parse(t))):r=Di(Dl[t])?Lo.parse(t):Lo.deg(+Dl[t])})),new e({angle:r.value,colorsteps:i})}}]),e}(wl),Ll=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"repeating-linear-gradient",angle:0})}}],[{key:"parse",value:function(t){var n=Il.parse(t);return new e({angle:n.angle,colorsteps:n.colorsteps})}}]),e}(Il);function Rl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Al(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,Al({type:"radial-gradient",radialType:"ellipse",radialPosition:[Do.CENTER,Do.CENTER]},t))}},{key:"toCloneObject",value:function(){return Al({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("radialType","radialPosition"))}},{key:"isRadial",value:function(){return!0}},{key:"toString",value:function(){if(0===this.colorsteps.length)return"";var t,e=this.getColorString(),n=this.json,r=n.radialType,i=n.radialPosition||["center","center"];return t=(i=Fl[i]?i:i.join(" "))?"".concat(r," at ").concat(i):r,"".concat(n.type||"radial-gradient","(").concat(t,", ").concat(e,")")}}],[{key:"parse",value:function(t){var n=_a(t),r="ellipse",i=[Do.CENTER,Do.CENTER],a=[];return n.str.split("(")[1].split(")")[0].split(",").map((function(t){return t.trim()})).forEach((function(t,e){if(t.includes("@"))t=Wa(t,n.matches),a.push.apply(a,ml.parse(t));else{if(t.includes("at")){var o=t.split("at").map((function(t){return t.trim()})),s=j()(o,2);r=s[0],i=s[1]}else r=t;if(Ai(i)){var c=i.split(" ");if(1===c.length){var l=Lo.parse(c[0]);i=l.isString()?[l.value,l.value]:[l.clone(),l.clone()]}else 2===c.length&&(i=c.map((function(t){var e=Lo.parse(t);return e.isString()?e.value:e.clone()})))}}})),new e({radialType:r,radialPosition:i,colorsteps:a})}}]),e}(wl),Gl=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"repeating-radial-gradient"})}}],[{key:"parse",value:function(t){var n=Bl.parse(t);return new e({radialType:n.radialType,radialPosition:n.radialPosition,colorsteps:n.colorsteps})}}]),e}(Bl);function Hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nl(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,Nl({type:"conic-gradient",angle:0,radialPosition:[Do.CENTER,Do.CENTER]},t))}},{key:"toCloneObject",value:function(){return Nl({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{angle:this.json.angle,radialPosition:Xi(this.json.radialPosition)})}},{key:"isConic",value:function(){return!0}},{key:"hasAngle",value:function(){return!0}},{key:"getColorString",value:function(){if(0===this.colorsteps.length)return"";var t=this.colorsteps;return t?(t.sort((function(t,e){return t.percent==e.percent?0:t.percent>e.percent?1:-1})),t.map((function(e,n){return e.prevColorStep=e.cut&&n>0?t[n-1]:null,e})).map((function(t){var e=Math.floor(3.6*t.percent),n="";if(t.cut&&t.prevColorStep){var r=Math.floor(3.6*t.prevColorStep.percent);n="".concat(r,"deg")}return"".concat(t.color," ").concat(n," ").concat(e,"deg")})).join(",")):""}},{key:"toString",value:function(){var t=this.getColorString(),e=[],n=this.json,r=n.angle,i=n.radialPosition||Do.CENTER;i=Xl[i]?i:i.join(" "),Ii(r)&&(r=+(Yl[r]||r),e.push("from ".concat(r,"deg"))),i&&e.push("at ".concat(i));var a=e.length?e.join(" ")+",":"";return"".concat(n.type,"(").concat(a," ").concat(t,")")}}],[{key:"parse",value:function(t){var n=_a(t),r="0deg",i=[Do.CENTER,Do.CENTER],a=[];return n.str.split("(")[1].split(")")[0].split(",").map((function(t){return t.trim()})).forEach((function(t,e){if(t.includes("@"))t=Wa(t=t.split(" ").map((function(t){return t.trim()})).map((function(t){return t.includes("deg")?Lo.parse(t).toPercent():t})).join(" "),n.matches),a.push.apply(a,ml.parse(t));else{if(t.includes("at")){var o=t.split("at").map((function(t){return t.trim()})),s=j()(o,2);r=s[0],i=s[1]}else r=t;if(Ai(i)){var c=i.split(" ");if(1===c.length){var l=Lo.parse(c[0]);i=l.isString()?[l.value,l.value]:[l.clone(),l.clone()]}else 2===c.length&&(i=c.map((function(t){var e=Lo.parse(t);return e.isString()?e.value:e})))}Ai(r)&&r.includes("from")&&(r=r.split("from")[1],r=Di(Yl[r])?Lo.parse(r):Lo.deg(+Yl[r]))}})),new e({angle:r.value,radialPosition:i,colorsteps:a})}}]),e}(wl),Kl=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"repeating-conic-gradient",angle:0,radialPosition:[Do.CENTER,Do.CENTER]})}}],[{key:"parse",value:function(t){var n=_l.parse(t);return new e({angle:n.angle,radialPosition:n.radialPosition,colorsteps:n.colorsteps})}}]),e}(_l),Wl=new Map,Ul=function(){function t(){go()(this,t)}return bo()(t,null,[{key:"has",value:function(t){return Wl.has(t)}},{key:"get",value:function(t){return Wl.get(t)}},{key:"set",value:function(t,e){Wl.size>1e3&&Wl.clear(),Wl.set(t,e)}}]),t}();function Zl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ql(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=Math.max(n.length,r.length),a=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,hu({itemType:"filter"},t))}},{key:"toString",value:function(){return"".concat(this.json.type,"(").concat(this.json.value||"",")")}}],[{key:"parse",value:function(t){var e=ju[t.type];return e?new e(t):new vu({value:t.type})}},{key:"parseStyle",value:function(t){var n=[];if(!t)return n;var r=_a(t);return(r.str.match(pu)||[]).forEach((function(t,i){var a=t.split("("),o=j()(a,2),s=o[0],c=o[1];if(c=c.split(")")[0],"drop-shadow"===s){var l=c.split(" "),u=l.filter((function(t){return t.includes("@")})).map((function(t){return r.matches[+t.replace("@","")].color})),h=l.filter((function(t){return!t.includes("@")}));n[i]=e.parse({type:s,offsetX:Lo.parse(h[0]),offsetY:Lo.parse(h[1]),blurRadius:Lo.parse(h[2]),color:u[0]||"rgba(0, 0, 0, 1)"})}else n[i]=e.parse({type:s,value:Lo.parse(c)})})),n}},{key:"join",value:function(t){return t.map((function(t){return e.parse(t)})).join(" ")}}]),e}(Pc),fu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"blur",value:e.spec.defaultValue})}},{key:"toCloneObject",value:function(){return hu({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("value"))}}]),e}(du);fu.spec={inputType:"range",min:0,max:100,step:1,unit:"px",units:["px","em"],defaultValue:Lo.z()};var vu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"svg",value:e.spec.defaultValue})}},{key:"toCloneObject",value:function(){return hu({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("value"))}},{key:"toString",value:function(){return"url(#".concat(this.json.value||"",")")}}]),e}(du);vu.spec={inputType:"select",defaultValue:""};var yu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"grayscale",value:e.spec.defaultValue})}},{key:"toCloneObject",value:function(){return hu({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("value"))}}]),e}(du);yu.spec={inputType:"range",min:0,max:100,step:1,unit:"%",units:["%"],defaultValue:Lo.percent(0)};var gu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"hue-rotate",value:e.spec.defaultValue})}}]),e}(du);gu.spec={inputType:"range",min:0,max:360,step:1,unit:"deg",units:["deg"],defaultValue:Lo.deg(0)};var mu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"invert",value:e.spec.defaultValue})}}]),e}(du);mu.spec={inputType:"range",min:0,max:100,step:1,unit:"%",units:["%"],defaultValue:Lo.percent(0)};var bu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"brightness",value:e.spec.defaultValue})}}]),e}(du);bu.spec={inputType:"range",min:0,max:200,step:1,unit:"%",units:["%"],defaultValue:Lo.percent(100)};var ku=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"contrast",value:e.spec.defaultValue})}}]),e}(du);ku.spec={inputType:"range",min:0,max:200,step:1,unit:"%",units:["%"],defaultValue:Lo.percent(100)};var xu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"opacity",value:e.spec.defaultValue})}}]),e}(du);xu.spec={inputType:"range",min:0,max:100,step:1,unit:"%",units:["%"],defaultValue:Lo.percent(100)};var wu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"saturate",value:e.spec.defaultValue})}}]),e}(du);wu.spec={inputType:"range",min:0,max:100,step:1,unit:"%",units:["%"],defaultValue:Lo.percent(100)};var Su=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"sepia",value:e.spec.defaultValue})}}]),e}(du);Su.spec={inputType:"range",min:0,max:100,step:1,unit:"%",units:["%"],defaultValue:Lo.percent(0)};var Pu=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"drop-shadow",multi:!0,offsetX:e.spec.offsetX.defaultValue,offsetY:e.spec.offsetY.defaultValue,blurRadius:e.spec.blurRadius.defaultValue,color:e.spec.color.defaultValue})}},{key:"toString",value:function(){var t=this.json;return"drop-shadow(".concat(t.offsetX," ").concat(t.offsetY," ").concat(t.blurRadius," ").concat(t.color,")")}}]),e}(du);Pu.spec={offsetX:{title:"Offset X",inputType:"range",min:-100,max:100,step:1,defaultValue:Lo.z(),unit:"px",units:["px","em"]},offsetY:{title:"Offset Y",inputType:"range",min:-100,max:100,step:1,defaultValue:Lo.z(),unit:"px",units:["px","em"]},blurRadius:{title:"Blur Radius",inputType:"range",min:0,max:100,step:1,defaultValue:Lo.z(),unit:"px",units:["px","em","%"]},color:{title:"Color",inputType:"color",defaultValue:"rgba(0, 0, 0, 1)",unit:"color"}};var ju={blur:fu,grayscale:yu,"hue-rotate":gu,invert:mu,brightness:bu,contrast:ku,opacity:xu,saturate:wu,sepia:Su,"drop-shadow":Pu,svg:vu},Ou={BlurFilter:fu,GrayscaleFilter:yu,HueRotateFilter:gu,InvertFilter:mu,BrightnessFilter:bu,ContrastFilter:ku,OpacityFilter:xu,SaturateFilter:wu,SepiaFilter:Su,DropshadowFilter:Pu,URLSvgFilter:vu};function $u(t,e,n,r){var i={type:nl(0,0,n.type,r.type),value:Qc(0,0,n.value,r.value)};switch(n.type){case"blur":i.value=Kc(t,e,n.value,r.value);break;case"grayscale":case"invert":case"brightness":case"contrast":case"opacity":case"saturate":case"sepia":case"hue-rotate":i.value=Nc(t,e,n.value.value,r.value.value,n.value.unit);break;case"drop-shadow":i.offsetX=Kc(t,e,n.offsetX,r.offsetX,"width","self"),i.offsetY=Kc(t,e,n.offsetY,r.offsetY,"height","self"),i.blurRadius=Kc(t,e,n.blurRadius,r.blurRadius,"width","self"),i.spreadRadius=Kc(t,e,n.spreadRadius,r.spreadRadius,"width","self"),i.color=tl(0,0,n.color,r.color)}return function(t,e){return"drop-shadow"===i.type(t,e)?{type:i.type(t,e),offsetX:i.offsetX(t,e),offsetY:i.offsetY(t,e),blurRadius:i.blurRadius(t,e),spreadRadius:i.spreadRadius(t,e),color:i.color(t,e)}:{type:i.type(t,e),value:i.value(t,e)}}}function Cu(t,e,n,r){for(var i=du.parseStyle(n),a=du.parseStyle(r),o=Math.max(i.length,a.length),s=[],c=0,l=o;c0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,Vu({itemType:"clip-path",type:"none",value:""},t))}},{key:"toCloneObject",value:function(){return Vu({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("value"))}},{key:"toString",value:function(){var t=this.json.type,e=this.json.value,n=this.json.box,r="";switch(t){case"circle":case"inset":case"ellipse":case"polygon":case"path":r="".concat(t,"(").concat(e,")");break;case"svg":r="url(#".concat(e,")");break;default:r="none"}return n?"".concat(n," ").concat(r):r}},{key:"toCSS",value:function(){return{"clip-path":this.toString()}}}],[{key:"toCSS",value:function(t){return new e(t).toCSS()}},{key:"toString",value:function(t){return e.toCSS(t)["clip-path"]}},{key:"parse",value:function(t){return new e(t)}},{key:"parseStyle",value:function(t){var e={};return t?((t.match(Mu)||[]).forEach((function(t,n){if(t.includes("-box"))e.box=t;else{var r=t.split("("),i=j()(r,2),a=i[0],o=i[1];o=o||"",o="none"===a?"":o.split(")")[0],e.type=a,e.value=o}})),e):{}}},{key:"parseStyleForCircle",value:function(t){var e=new Lo("","closest-side"),n="";if((t=t||"50%").includes("at")){var r=t.split("at").map((function(t){return t.trim()})),i=j()(r,2);e=i[0],n=i[1]}else n=t.trim();var a=n.split(" "),o=j()(a,2),s=o[0],c=o[1];return Di(c)&&(c=s),{radius:e,x:s=Lo.parse(s),y:c=Lo.parse(c)}}},{key:"parseStyleForEllipse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"50% 50%",e="50% 50%",n="";if((t=t||"50%").includes("at")){var r=t.split("at").map((function(t){return t.trim()})),i=j()(r,2);e=i[0],n=i[1]}else n=t.trim();var a=n.split(" "),o=j()(a,2),s=o[0],c=o[1];Di(c)&&(c=s),s=Lo.parse(s),c=Lo.parse(c);var l=e.split(" "),u=j()(l,2),h=u[0],p=u[1];return Di(p)&&(p=h),{radiusX:h=Lo.parse(h),radiusY:p=Lo.parse(p),x:s,y:c}}},{key:"parseStyleForInset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.split("round"),n=j()(e,2),r=n[0],i=n[1],a=Eu.parse(r),o=j()(a,5),s=o[0],c=o[1],l=o[2],u=o[3],h=o[4];if(i)var p=Eu.parse(i),d=j()(p,5),f=d[0],v=d[1],y=d[2],g=d[3],m=d[4];return{isAll:1===s,top:c,right:l,bottom:u,left:h,round:i,isAllRadius:1===f,topRadius:v,rightRadius:y,bottomRadius:g,leftRadius:m}}},{key:"parseStyleForPolygon",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(",").filter((function(t){return t.trim()})).map((function(t){var e=t.trim().split(" "),n=j()(e,2),r=n[0],i=n[1];return{x:Lo.parse(r),y:Lo.parse(i)}}))}}]),e}(Pc);function Iu(t,e,n,r){var i=Du.parseStyle(n),a=Du.parseStyle(r),o={type:Qc(0,0,i.type,i.type),value:Qc(0,0,n,r)};if(i.type==a.type&&"none"!=i)switch(i.type){case"circle":i.value=Du.parseStyleForCircle(i.value),a.value=Du.parseStyleForCircle(a.value),o.value=function(t,e,n,r){var i={};return"closest-side"===n.radius||"farthest-side"===n.radius||"closest-side"===r.radius||"farthest-side"===r.radius?i.radius=Qc(0,0,n.radius,r.radius):n.radius.unit===r.radius.unit?i.radius=makeInterpolateNumber(t,e,n.radius.value,r.radius.value,n.radius.unit):i.radius=Kc(t,e,n.radius,r.radius,"width","self"),i.x=Kc(t,e,n.x,r.x,"width","self"),i.y=Kc(t,e,n.y,r.y,"height","self"),function(t,e){var n=i.radius(t,e),r=i.x(t,e),a=i.y(t,e),o="".concat(r," ").concat(a),s=n+"";return s.includes("closest-side")?s="closest-side":s.includes("farthest-side")&&(s="farthest-side"),n?"".concat(s," at ").concat(o):"".concat(o)}}(t,e,i.value,a.value);break;case"ellipse":i.value=Du.parseStyleForEllipse(i.value),a.value=Du.parseStyleForEllipse(a.value),o.value=function(t,e,n,r){var i={radiusX:Kc(t,e,n.radiusX,r.radiusX,"width","self"),radiusY:Kc(t,e,n.radiusY,r.radiusY,"height","self"),x:Kc(t,e,n.x,r.x,"width","self"),y:Kc(t,e,n.y,r.y,"height","self")};return function(t,e){var n=i.radiusX(t,e),r=i.radiusY(t,e),a=i.x(t,e),o=i.y(t,e);return"".concat(n," ").concat(r," at ").concat(a," ").concat(o)}}(t,e,i.value,a.value);break;case"inset":i.value=Du.parseStyleForInset(i.value),a.value=Du.parseStyleForInset(a.value),o.value=function(t,e,n,r){var i={top:Nc(t,e,n.top.value,r.top.value,n.top.unit),left:Nc(t,e,n.left.value,r.left.value,n.left.unit),right:Nc(t,e,n.right.value,r.right.value,n.right.unit),bottom:Nc(t,e,n.bottom.value,r.bottom.value,n.bottom.unit),round:Qc(0,0,n.round,r.round),topRadius:Nc(t,e,n.topRadius.value,r.topRadius.value,n.topRadius.unit),leftRadius:Nc(t,e,n.leftRadius.value,r.leftRadius.value,n.leftRadius.unit),rightRadius:Nc(t,e,n.rightRadius.value,r.rightRadius.value,n.rightRadius.unit),bottomRadius:Nc(t,e,n.bottomRadius.value,r.bottomRadius.value,n.bottomRadius.unit)};return function(t,e){var n=i.top(t,e),r=i.right(t,e),a=i.bottom(t,e),o=i.left(t,e),s=i.round(t,e),c=i.topRadius(t,e),l=i.leftRadius(t,e),u=i.bottomRadius(t,e),h=i.rightRadius(t,e),p=[n,r,a,o].join(" "),d=[c,h,u,l].join(" ");return"".concat(p," ").concat(s&&d.trim()?"round ".concat(d):"")}}(t,e,i.value,a.value);break;case"polygon":i.value=Du.parseStyleForPolygon(i.value),a.value=Du.parseStyleForPolygon(a.value),o.value=function(t,e,n,r){for(var i=Math.max(n.length,r.length),a=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:[];return this.pathArray.push("".concat(t," ").concat(this.getPointString(e))),this}},{key:"M",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:"object";return('"))}},{key:"d",get:function(){return this.pathArray.join(" ").trim()}}],[{key:"makeRect",value:function(e,n,r,i){return(new t).M({x:e,y:n}).L({x:e+r,y:n}).L({x:e+r,y:n+i}).L({x:e,y:n+i}).L({x:e,y:n}).Z().d}},{key:"makeLine",value:function(e,n,r,i){return(new t).M({x:e,y:n}).L({x:r,y:i}).d}},{key:"makeCircle",value:function(e,n,r,i){var a=(new t).M({x:0,y:-1}).C({x:.552284749831,y:-1},{x:1,y:-.552284749831},{x:1,y:0}).C({x:1,y:.552284749831},{x:.552284749831,y:1},{x:0,y:1}).C({x:-.552284749831,y:1},{x:-1,y:.552284749831},{x:-1,y:0}).C({x:-1,y:-.552284749831},{x:-.552284749831,y:-1},{x:0,y:-1}).Z().d,o=new Dc(a);return o.translate(1,1).scale(r/2,i/2).translate(e,n),o.toString()}},{key:"makePathByPoints",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=new t,r=0,i=e.length;r0&&void 0!==arguments[0]?arguments[0]:"";return go()(this,e),xo()(this,So()(e).call(this,t))}return jo()(e,t),bo()(e,[{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.segments=[],this.points=t,this.parse()}},{key:"resetSegments",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.segments=t,this.points=this.joinPoints()}},{key:"parse",value:function(){var t=this.points;Li(t)&&(t=t.join(" "));for(var e=t.trim().split(Yu).filter((function(t){return t})),n=[],r=0,i=e.length;r1&&void 0!==arguments[1]&&arguments[1],r=this.segments.map((function(n){return t.call(e,n)}));if(n)return r;this.segments=r}},{key:"_loop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.each((function(e){var n=t([e.x,e.y],0),r=j()(n,2),i=r[0],a=r[1];return e.x=i,e.y=a,e}),e)}},{key:"clone",value:function(){return new e(this.joinPoints())}},{key:"toString",value:function(){return this.joinPoints()}}]),e}(Dc);function Ku(t,e,n,r){for(var i=new _u,a=new _u(n),o=new _u(r),s=Math.max(a.segments.length,o.segments.length),c=[],l=a.segments[a.segments.length-1].x,u=a.segments[a.segments.length-1].y,h=o.segments[o.segments.length-1].x,p=o.segments[o.segments.length-1].y,d=0;d1&&(e-=1);var s=a[0];0===e?s=a[0]:1===e&&(s=a[a.length-1]);var c=a.find((function(t){return t.startT<=e&&e4&&void 0!==arguments[4]&&arguments[4];var i=r.length-1,a=0;return function(t,e){return 0===e?"":1===e?r:r.substring(a,Math.floor((i-a)*e))}}function eh(t,e,n,r,i,a){var o=a.$("video").el,s=n.split(":"),c=j()(s,3),l=c[0],u=(c[1],+(l||0)*+(c[2]||1));return function(e,n){0===n?(o.currentTime=u,o.paused&&o.play()):1===n?(t.reset({currentTime:o.currentTime}),o.pause()):o.paused&&o.play()}}var nh=function(){return function(t,e){}};function rh(t,e,n,r,i,a,o){var s=i||e;switch(s){case"width":case"x":return Kc(t,e,n,r,"width");case"height":case"y":return Kc(t,e,n,r,"height");case"perspective":case"font-size":case"font-stretch":case"font-weight":case"text-stroke-width":case"RangeEditor":case"textLength":case"startOffset":return Kc(t,e,n,r,e);case"fill-opacity":case"opacity":case"stroke-dashoffset":case"currentTime":case"NumberRangeEditor":return Nc(t,e,+n,+r);case"background-color":case"color":case"text-fill-color":case"text-stroke-color":case"fill":case"stroke":case"ColorViewEditor":return tl(0,0,n,r);case"mix-blend-mode":case"fill-rule":case"stroke-linecap":case"stroke-linejoin":case"SelectEditor":case"lengthAdjust":return nl(0,0,n,r);case"rotate":return cl(0,0,n,r)}var c=function(t){switch(t){case"border-radius":return Zc;case"border":return makeInterpolateBorder;case"box-shadow":return el;case"text-shadow":return hl;case"background-image":case"BackgroundImageEditor":return lu;case"filter":case"backdrop-filter":return Cu;case"clip-path":return Iu;case"transform":return zu;case"transform-origin":return Fu;case"perspective-origin":return Bu;case"stroke-dasharray":return Gu;case"d":return Nu;case"points":return Ku;case"offset-path":return Qu;case"text":return th;case"playTime":return eh}}(s);return c?c(t,e,n,r,a,o):nh}function ih(t,e,n,r,i,a,o){return rh(t,e,n,r,i,a,o)}function ah(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear",e=t.split("(").map((function(t){return t.trim()})),n=j()(e,2),r=n[0],i=n[1];i=(i||"").split(")")[0].trim();var a=sl[r];if(a){var o=t.split("(")[1].split(")")[0].split(",").map((function(t){return t.trim()}));return a.apply(void 0,E()(o))}return oh(t)}function oh(t){var e=yi(t);return function(t){return e(t).y}}function sh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ch(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.addProperty(ch({checked:!0,value:Lo.z()},t))}},{key:"addProperty",value:function(t){this.json.properties.push(t)}},{key:"removeProperty",value:function(t){this.json.properties.splice(t,1)}},{key:"sortItem",value:function(t,e,n){t.splice.apply(t,[n+(e1&&void 0!==arguments[1]?arguments[1]:{};Object.assign(this.json.properties[+t],ch({},e))}},{key:"updatePropertyByKey",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.json.properties,r=-1,i=0,a=n.length;ie.offset.value?1:-1})),e.map((function(e){return 0===e.properties.length?"":t.toOffsetString(e)})).join("\n")}},{key:"toCSSText",value:function(){return this.json.offsets.map((function(t){return t})).sort((function(t,e){return t.offset.value>e.offset.value?1:-1})),"\n@keyframes ".concat(this.json.name," {\n\n ").concat(this.toOffsetText(),"\n\n}\n")}},{key:"createOffset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addOffset(new lh(hh({checked:!0},t)))}},{key:"addOffset",value:function(t){this.json.offsets.push(t)}},{key:"removeOffset",value:function(t){this.json.offsets.splice(t,1)}},{key:"sortItem",value:function(t,e,n){t.splice.apply(t,[n+(e1&&void 0!==arguments[1]?arguments[1]:{};this.json.offsets[+t].reset(e)}},{key:"toCSS",value:function(){return{}}},{key:"toString",value:function(){return this.toCSSText()}}],[{key:"parse",value:function(t){return new e(t)}},{key:"parseStyle",value:function(t){var n=[],r={};if(t.keyframe){var i=_a(t.keyframe);i.str.split("|").map((function(t){return t.trim()})).forEach((function(t,a){var o=t.split(" "),s=$()(o),c=s[0],l=s[1],u=s[2],h=s.slice(3).join(" ");r[c]||(r[c]=new e({name:c}),n[a]=c);var p=r[c].offsets.filter((function(t){return t.offset.equals(Lo.parse(l))})),d=null;p.length?d=p[0]:(d=new lh({offset:Lo.parse(l)}),r[c].offsets.push(d)),d.addProperty({key:u,value:Wa(h,i.matches)})}))}return n.map((function(t){return r[t].offsets.forEach((function(t){var e=[],n=[];t.properties.forEach((function(t){t.key.includes("--")?e.push(t):n.push(t)}));var r=e.map((function(t){return"".concat(t.key,":").concat(t.value)})).join(";");e.length&&n.push({key:"var",value:r}),t.properties=n})),r[t]}))}}]),e}(Pc);function dh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function fh(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,yh({timeline:[],compiledTimeline:{}},t))}},{key:"expectJSON",value:function(t){return"compiledTimeline"!==t&&Bs()(So()(e.prototype),"expectJSON",this).call(this,t)}},{key:"setTimelineInfo",value:function(t){var e=this.getSelectedTimeline();e&&["speed","iterationCount","direction"].forEach((function(n){Ii(t[n])&&(e[n]=t[n])}))}},{key:"compileAll",value:function(){var t=this,e=this.getSelectedTimeline();this.json.compiledTimeline={},e&&e.animations.forEach((function(e){e.properties.forEach((function(n){t.compiledTimingFunction(e.id,n.property)}))}))}},{key:"searchTimelineOffset",value:function(t){var e=this,n=this.getSelectedTimeline(),r=[];return n&&n.animations.forEach((function(n){n.properties.forEach((function(i){var a=e.getCompiledTimingFunction(n.id,i.property);r.push(a.find((function(e){return!!(e.isOnlyTime&&e.startTime<=t)||e.startTime<=t&&t1&&void 0!==arguments[1]?arguments[1]:function(t){return t},n=this.getSelectedTimeline();if(n){Ii(t)&&this.setTimelineCurrentTime(t);var r=n.currentTime;this.searchTimelineOffset(r).filter(e).forEach((function(t){"offset-path"===t.property||"playTime"===t.property?t.func(r):t.layer&&t.layer.reset(S()({},t.property,t.func(r)))}))}}},{key:"getSelectedTimeline",value:function(){var t=this.json.timeline,e=t.filter((function(t){return t.selected}));return(e.length?e[0]:t[0])||null}},{key:"getKeyframeListReturnArray",value:function(){var t=this.getSelectedTimeline(),e=[];return t&&t.animations.forEach((function(t){t.properties.forEach((function(t){e.push.apply(e,t.keyframes)}))})),e}},{key:"getKeyframeList",value:function(t){var e=this.getSelectedTimeline();e&&e.animations.forEach((function(n){n.properties.forEach((function(n){n.keyframes.forEach((function(n){t&&t(e,n)}))}))}))}},{key:"getSelectedTimelineLastTime",value:function(){var t=0;return this.getKeyframeList((function(e,n){t=Math.max(n.time,t)})),t}},{key:"getSelectedTimelineFirstTime",value:function(){var t=Number.MAX_SAFE_INTEGER;return this.getKeyframeList((function(e,n){t=Math.min(n.time,t)})),t}},{key:"getSelectedTimelinePrevTime",value:function(){var t=this.getSelectedTimelineFirstTime();return this.getKeyframeList((function(e,n){Bc(e.fps,n.time)e.currentTimecode&&(t=Math.min(n.time,t))})),t}},{key:"setTimelineTitle",value:function(t,e){var n=this.json.timeline.find((function(e){return e.id===t}));n&&(n.title=e)}},{key:"selectTimeline",value:function(t){t?this.json.timeline.forEach((function(e){e.selected=e.id===t})):this.json.timeline.filter((function(t){return t.selected})).length||this.json.timeline.length&&(this.json.timeline.selected=!0);this.compileAll()}},{key:"removeAnimation",value:function(t){this.json.timeline=this.json.timeline.filter((function(e){return e.id!==t})),this.json.timeline.length&&(this.json.timeline[0].selected=!0),this.compileAll()}},{key:"addTimeline",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"00:00:10:00",n=zr(),r=yh({id:n,title:"sample"},this.getTimelineLayerInfo(t,e),{animations:[]});return this.json.timeline.push(r),this.selectTimeline(n),r}},{key:"addTimelineLayer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"00:00:10:00",r=this.getSelectedTimeline();if(r||(r=this.addTimeline(e,n)),r.selected=!0,t){var i=r.animations.filter((function(e){return e.id===t}));i[0]||r.animations.push({id:t,properties:[]})}}},{key:"getTimelineLayerInfo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"00:00:10:00",n=Fc(t,e);return{fps:t,speed:1,direction:"normal",iterationCount:1,currentTimecode:Bc(t,0),totalTimecode:Bc(t,n),currentTime:0,totalTime:n,displayStartTime:0,displayEndTime:n}}},{key:"setTimelineCurrentTime",value:function(t){var e=this.getSelectedTimeline(),n=e.fps,r=e.totalTimecode;if(e){var i=t,a=t;+i+""===i&&(a=Gc(n,i=+i)),a>r&&(a=r);var o=Fc(n,a);e.currentTime=o,e.currentTimecode=Bc(n,o)}}},{key:"setDisplayTimeDxRate",value:function(t,e,n){var r=this.getSelectedTimeline();if(r){var i=t*r.totalTime,a=e+i,o=n+i;a=Math.max(a,0),0===(a=Math.min(a,o))&&(o=n-e),o=Math.max(o,a),(o=Math.min(o,r.totalTime))===r.totalTime&&(a=r.totalTime-(n-e)),r.displayStartTime=a,r.displayEndTime=o}}},{key:"setDisplayStartTimeRate",value:function(t){var e=this.getSelectedTimeline();e&&(e.displayStartTime=t*e.totalTime)}},{key:"setDisplayEndTimeRate",value:function(t){var e=this.getSelectedTimeline();e&&(e.displayEndTime=t*e.totalTime)}},{key:"setTimelineCurrentTimeRate",value:function(t){var e=this.getSelectedTimeline();if(e){var n=e.displayStartTime,r=e.displayEndTime,i=e.fps,a=n+(r-n)*t;this.setTimelineCurrentTime(Bc(i,a))}}},{key:"setTimelineTotalTime",value:function(t){var e=this.getSelectedTimeline();if(e){var n=t,r=t;+n+""===n&&(n=+n,r=Gc(e.fps,n)),Fc(e.fps,r)3&&void 0!==arguments[3]?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,o=this.getTimelineKeyframeById(t,e,n);o&&(Ii(a)&&(o.time=a),Ii(r)&&(o.value=r),Ii(i)&&(o.timing=i),this.compiledTimingFunction(t,e))}},{key:"addTimelineKeyframe",value:function(t){var e=t.layerId,n=t.property,r=t.value,i=t.timing,a=t.time,o=t.editor;this.addTimelineProperty(e,n);var s=this.getSelectedTimeline(),c=this.getTimelineProperty(e,n);if(c){var l=a||s.currentTime;if(!c.keyframes.filter((function(t){return t.time===l})).length){r=Di(r)||""===r?this.getDefaultPropertyValue(n):r;var u={id:zr(),layerId:e,property:n,time:l,value:r,timing:i||"linear",editor:o};return c.keyframes.push(u),c.keyframes.sort((function(t,e){return t.time>e.time?1:-1})),this.compiledTimingFunction(e,n),u}}}},{key:"getDefaultPropertyValue",value:function(t){switch(t){case"mix-blend-mode":return"normal";case"rotate":return"0deg";case"box-shadow":return"0px 0px 0px 0px rgba(0, 0, 0, 1)";case"text-shadow":return"0px 0px 0px rgba(0, 0, 0, 1)";case"opacity":return 1;default:return""}}},{key:"copyTimelineKeyframe",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getTimelineProperty(t,e);if(r){var i=this.getSelectedTimeline(),a=n||i.currentTime,o=r.keyframes.filter((function(t){return t.timee.time?-1:1})),s=o[0].value+"",c=o[0].timing+"",l=o[0].editor),this.addTimelineKeyframe({layerId:t,property:e,value:s,timing:c,editor:l})}}},{key:"getTimelineKeyframe",value:function(t,e,n){var r=this.getTimelineProperty(t,e);if(r)return r.keyframes.find((function(t){return t.time===n}))}},{key:"getTimelineKeyframeById",value:function(t,e,n){var r=this.getTimelineProperty(t,e);if(r)return r.keyframes.find((function(t){return t.id===n}))}},{key:"sortTimelineKeyframe",value:function(t,e){var n=this.getTimelineProperty(t,e);n&&(n.keyframes.sort((function(t,e){return t.time>e.time?1:-1})),this.compiledTimingFunction(t,e))}},{key:"setFps",value:function(t){var e=this.getSelectedTimeline();e&&(e.fps=t,e.currentTimecode=Bc(t,e.currentTime),e.totalTimecode=Bc(t,e.totalTime))}},{key:"toCloneObject",value:function(){return yh({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{timeline:Xi(this.json.timeline)})}}]),e}(function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,fh({comments:[],colors:[],gradients:[],svgfilters:[],svgimages:[],keyframes:[],images:[],imageKeys:[],videos:[],videoKeys:[],audios:[]},t))}},{key:"addKeyframe",value:function(t){return this.json.keyframes.push(t),t}},{key:"createKeyframe",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addKeyframe(new ph(fh({checked:!0},t)))}},{key:"removeKeyframe",value:function(t){this.removePropertyList(this.json.keyframes,t)}},{key:"sortItem",value:function(t,e,n){t.splice.apply(t,[n+(e1&&void 0!==arguments[1]?arguments[1]:{};this.json.keyframes[+t].reset(e)}},{key:"toKeyframeString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.json.keyframes.map((function(e){return e.toString(t)})).join("\n\n")}},{key:"copyPropertyList",value:function(t,e){var n=fh({},t[e]);t.splice(e,0,n)}},{key:"toCloneObject",value:function(){this.json;return fh({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("colors","gradients","svgfilters","svgimages","images","keyframes"))}},{key:"removePropertyList",value:function(t,e){t.splice(e,1)}},{key:"removeColor",value:function(t){this.removePropertyList(this.json.colors,t)}},{key:"copyColor",value:function(t){this.copyPropertyList(this.json.colors,t)}},{key:"sortColor",value:function(t,e){this.sortItem(this.json.colors,t,e)}},{key:"setColorValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.json.colors[t]=fh({},this.json.colors[t],{},e)}},{key:"getColorIndex",value:function(t){return this.json.colors[t]}},{key:"getColor",value:function(t){return this.json.colors.filter((function(e){return e.name===t}))[0]}},{key:"addColor",value:function(t){return this.json.colors.push(t),t}},{key:"createColor",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addColor(t)}},{key:"removeImage",value:function(t){this.removePropertyList(this.json.images,t),this.refreshImageKeys()}},{key:"copyImage",value:function(t){this.copyPropertyList(this.json.images,t),this.refreshImageKeys()}},{key:"sortImage",value:function(t,e){this.sortItem(this.json.images,t,e)}},{key:"setImageValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.json.images[t]=fh({},this.json.images[t],{},e),this.refreshImageKeys()}},{key:"getImageValueById",value:function(t){var e=this.json.imageKeys[t];if(e)return e.local}},{key:"refreshImageKeys",value:function(){var t={};this.json.images.forEach((function(e){t[e.id]=e})),this.reset({imageKeys:t})}},{key:"addImage",value:function(t){return this.json.images.push(t),this.refreshImageKeys(),t}},{key:"createImage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addImage(t)}},{key:"removeVideo",value:function(t){this.removePropertyList(this.json.videos,t),this.refreshVideoKeys()}},{key:"copyVideo",value:function(t){this.copyPropertyList(this.json.videos,t),this.refreshVideoKeys()}},{key:"sortVideo",value:function(t,e){this.sortItem(this.json.videos,t,e)}},{key:"setVideoValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.json.videos[t]=fh({},this.json.videos[t],{},e)}},{key:"getVideoValueById",value:function(t){var e=this.json.videoKeys[t];if(e)return e.local}},{key:"refreshVideoKeys",value:function(){var t={};this.json.videos.forEach((function(e){t[e.id]=e})),this.reset({videoKeys:t})}},{key:"addVideo",value:function(t){return this.json.videos.push(t),this.refreshVideoKeys(),t}},{key:"createVideo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addVideo(t)}},{key:"removeGradient",value:function(t){this.removePropertyList(this.json.gradients,t)}},{key:"copyGradient",value:function(t){this.copyPropertyList(this.json.gradients,t)}},{key:"sortGradient",value:function(t,e){this.sortItem(this.json.gradients,t,e)}},{key:"setGradientValue",value:function(t,e){this.json.gradients[t]=fh({},this.json.gradients[t],{},e)}},{key:"getGradientIndex",value:function(t){return this.json.gradients[t]}},{key:"getGradient",value:function(t){return this.json.gradients.filter((function(e){return e.name===t}))[0]}},{key:"addGradient",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.json.gradients.push(t),t}},{key:"createGradient",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addGradient(t)}},{key:"getSVGFilterIndex",value:function(t){var e=this.json.svgfilters.map((function(t,e){return{id:t.id,index:e}})).filter((function(e){return e.id===t}))[0];return e?e.index:-1}},{key:"removeSVGFilter",value:function(t){this.removePropertyList(this.json.svgfilters,t)}},{key:"copySVGFilter",value:function(t){this.copyPropertyList(this.json.svgfilters,t)}},{key:"sortSVGFilter",value:function(t,e){this.sortItem(this.json.svgfilters,t,e)}},{key:"setSVGFilterValue",value:function(t,e){this.json.svgfilters[t]=fh({},this.json.svgfilters[t],{},e)}},{key:"addSVGFilter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.json.svgfilters.push(t);var e=this.json.svgfilters.length-1;return e}},{key:"createSVGFilter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addSVGFilter(t)}},{key:"getSVGImageIndex",value:function(t){var e=this.json.svgimages.map((function(t,e){return{id:t.id,index:e}})).filter((function(e){return e.id===t}))[0];return e?e.index:-1}},{key:"removeSVGImage",value:function(t){this.removePropertyList(this.json.svgimages,t)}},{key:"copySVGImage",value:function(t){this.copyPropertyList(this.json.svgimages,t)}},{key:"sortSVGImage",value:function(t,e){this.sortItem(this.json.svgimages,t,e)}},{key:"setSVGImageValue",value:function(t,e){this.json.svgimages[t]=fh({},this.json.svgimages[t],{},e)}},{key:"addSVGImage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.json.svgimages.push(t);var e=this.json.svgimages.length-1;return e}},{key:"createSVGImage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.addSVGImage(t)}}]),e}(xc));function mh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bh(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,bh({itemType:"project",name:"new Project",description:"",rootVariable:""},t))}},{key:"toCloneObject",value:function(){return bh({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("name","description","rootVariable"))}},{key:"getTransformMatrix",value:function(){return i.create()}},{key:"resetMatrix",value:function(t){var e=i.getTranslation([],Mr(t.getAccumulatedMatrix(),t.getTransformMatrixInverse())),n=j()(e,2),r=n[0],a=n[1];t.reset({x:Lo.px(r),y:Lo.px(a)})}},{key:"indexed",get:function(){return this.createIndexItemMap(),this.indexedMap}},{key:"isAbsolute",get:function(){return!1}},{key:"parent",get:function(){return null}},{key:"artboards",get:function(){return(this.json.layers||[]).filter((function(t){return t.is("artboard")}))}},{key:"offsetX",get:function(){return kh}},{key:"offsetY",get:function(){return xh}},{key:"rectVerties",get:function(){return gc(this.layers)}}]),e}(gh);function Sh(t,e){var n=[];return t.layers.length&&t.layers.forEach((function(t){n.push.apply(n,Sh(t,e))})),e.id?n.push(t):e.includes(t.id)&&n.push(t),n}zc.registerComponent("project",wh);var Ph,jh=function(){function t(e){go()(this,t),this.$editor=e,this.project=null,this.items=[],this.itemKeys={},this.hoverId="",this.hoverItems=[],this.ids=[],this.idsString="",this.colorsteps=[],this.cachedItemVerties=[],this.cachedArtBoardVerties=[],this.cachedVerties=vc(0,0,0,0,"50% 50% 0px"),this.selectionCamera=new Ac({parent:this.currentProject,x:Lo.px(0),y:Lo.px(0),width:Lo.px(0),height:Lo.px(0)})}return bo()(t,[{key:"initialize",value:function(){this.items=[],this.itemKeys={},this.ids=[],this.idsString="",this.cachedItemVerties={}}},{key:"getRootItem",value:function(t){var e=t;return t&&t.parent&&(e=t.parent),e}},{key:"selectColorStep",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:null,e=[];if(Li(t)?e=t:(Ai(t)||Fi(t))&&(e=[t]),e.length){var n=this.project,r=[],i=[];e.forEach((function(t){n.hasIndexItem(t)?r.push(n.getIndexItem(t)):i.push(t)}));var a=Sh(this.project,i);return a.forEach((function(t){n.addIndexItem(t)})),r.push.apply(r,a),r}return this.items}},{key:"makeItemMap",value:function(t){var e={};return this.ids.forEach((function(n){e[n]=Xi(t)})),e}},{key:"selectById",value:function(t){t&&this.select.apply(this,E()(Sh(this.project,t)))}},{key:"selectAfterCopy",value:function(){this.select.apply(this,E()(this.items.map((function(t){return t.copy()}))))}},{key:"addById",value:function(t){this.itemKeys[t]||this.select.apply(this,E()(this.items).concat(E()(Sh(this.project,t))))}},{key:"removeById",value:function(t){var e=t;Ai(t)&&(e=[t]);var n=this.items.filter((function(t){return!1===e.includes(t.id)}));this.select.apply(this,E()(n))}},{key:"toggleById",value:function(t){this.itemKeys[t]?this.removeById(t):this.addById(t)}},{key:"getArtboardByPoint",value:function(t){return this.currentProject.artboards.find((function(e){return pc(e.matrix.verties.filter((function(t,e){return e<4})),t[0],t[1])}))}},{key:"changeArtBoard",value:function(){var t=this,e=!1;return this.each((function(n){if(!1===n.is("artboard")){var r=n.rectVerties();if(n.artboard){var i=n.artboard.rectVerties();if(pc(i,r[0][0],r[0][1])||fc(r,i))return!1}var a=t.cachedArtBoardVerties.find((function(t){var e=t.matrix.verties.filter((function(t,e){return e<4}));return pc(e,r[0][0],r[0][1])||fc(r,e)}));a?a.item!==n.artboard&&(a.item.appendChildItem(n),e=!0):n.artboard&&(t.currentProject.appendChildItem(n),e=!0)}})),e}},{key:"doCache",value:function(){this.items.forEach((function(t){t.setCache()}))}},{key:"setRectCache",value:function(){this.cachedVerties=this.verties,this.cachedItemVerties=this.items.map((function(t){return t.fakeParent=void 0,t.matrix})),this.cachedArtBoardVerties=this.currentProject.artboards.map((function(t){return{item:t,matrix:t.matrix}}))}},{key:"toCloneObject",value:function(){var t={};return this.each((function(e){t[e.id]=e.toCloneObject(!1)})),t}},{key:"cloneValue",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:[],n=t,r=n.parent,i=e.includes(r);!i&&!Di(r);)n=r,r=r.parent,i=e.includes(r);return i}},{key:"hasPoint",value:function(t){return this.isMany?pc(this.rectVerties,t[0],t[1]):this.cachedItemVerties.some((function(e){return pc(e.verties,t[0],t[1])}))}},{key:"checkHover",value:function(t){return Ai(t)?this.hoverId===t:this.hoverItems.findIndex((function(e){return e.id===t.id}))>-1}},{key:"setHoverId",value:function(t){var e=!1;return!t||this.itemKeys[t]?(""!=this.hoverId&&(e=!0),this.hoverId="",this.hoverItems=[]):this.cachedArtBoardVerties.find((function(e){return e.item.id===t}))?(""!=this.hoverId&&(e=!0),this.hoverId="",this.hoverItems=[]):(this.hoverId!=t&&(e=!0),this.hoverId=t,this.hoverItems=this.itemsByIds([t]).filter((function(t){return!1===t.is("artboard")})),0===this.hoverItems.length&&(this.hoverId="",e=!0)),e&&this.$editor.emit("changeHoverItem"),e}},{key:"current",get:function(){return this.items[0]}},{key:"currentProject",get:function(){return this.project}},{key:"isEmpty",get:function(){return!this.length}},{key:"isOne",get:function(){return 1===this.length}},{key:"isMany",get:function(){return this.length>1}},{key:"length",get:function(){return this.items.length}},{key:"snapTargetLayers",get:function(){var t=this;return this.currentProject?this.currentProject.allLayers.filter((function(e){return!e.is("project")&&!t.check(e)})):[]}},{key:"snapTargetLayersWithSelection",get:function(){return this.currentProject?this.currentProject.allLayers.filter((function(t){return!t.is("project")})):[]}},{key:"selectedArtboards",get:function(){return E()(new Set(this.items.map((function(t){return t.artboard}))))}},{key:"isRelative",get:function(){return"relative"===(this.items[0]||{}).position}},{key:"verties",get:function(){return this.isOne?this.current.verties():this.rectVerties}},{key:"selectionVerties",get:function(){return this.isOne?this.current.selectionVerties():this.rectVerties}},{key:"rectVerties",get:function(){return gc(this.items)}},{key:"itemRect",get:function(){var t=this.verties;return{x:Lo.px(t[0][0]),y:Lo.px(t[0][1]),width:Lo.px(a.distance(t[0],t[1])),height:Lo.px(a.distance(t[0],t[3]))}}}]),t}(),Oh={en_US:{"app.title":"EASYLOGIC","app.sample":function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n)},"app.lang.en_US":"English","app.lang.ko_KR":"한국어","app.lang.fr_FR":"Français","app.label.lang":"Language","app.layout.all":"All","app.layout.css":"CSS","app.layout.svg":"SVG","app.label.layout":"Menu Layout","app.theme.dark":"Dark","app.theme.light":"Light","app.theme.toon":"Toon","app.theme.gray":"Gray","app.label.theme":"Theme","app.tab.title.projects":"Projects","app.tab.title.layers":"Layers","app.tab.title.libraries":"Library","app.tab.title.components":"Object","app.tab.title.artboards":"Artboard","app.tab.title.assets":"Assets","app.tab.title.keyMap":"KeyMap","app.confirm.message.artboard.items.removeArtboard":"Do you remove an artboard preview really?","menu.item.download.title":"Download","menu.item.save.title":"Save","menu.item.export.title":"Export","menu.item.codepen.title":"CodePen","menu.item.fullscreen.title":"Screen","menu.item.shortcuts.title":"ShortCuts","menu.item.github.title":"Github","menu.item.learn.title":"Learn","project.property.title":"Project","project.information.property.title":"Project information","project.information.property.name":"Name","project.information.property.description":"Description","artboard.property.title":"ArtBoards","artboard.property.layout.title.flex":"Flex","artboard.property.layout.title.grid":"Grid","layer.tree.property.title":"Layers","layer.tree.property.layout.title.flex":"Flex","layer.tree.property.layout.title.grid":"Grid","alignment.property.title":"Alignment","position.property.title":"Position","position.property.X":"X","position.property.Y":"Y","size.property.title":"Size","position.property.width":"W","position.property.height":"H","position.property.opacity":"Opacity","position.property.rotate":"Rotate","background.color.property.title":"Appearance","background.color.property.color":"Color","background.color.property.zindex":"z-index","background.color.property.blend":"Blend","background.color.property.overflow":"Overflow","background.color.property.overflow.visible":"Visible","background.color.property.overflow.hidden":"Hidden","background.color.property.overflow.scroll":"Scroll","background.color.property.overflow.auto":"Auto","blend.normal":"normal","blend.multiply":"multiply","blend.screen":"screen","blend.overlay":"overlay","blend.darken":"darken","blend.lighten":"lighten","blend.color-dodge":"color-dodge","blend.color-burn":"color-burn","blend.hard-light":"hard-light","blend.soft-light":"soft-light","blend.difference":"difference","blend.exclusion":"exclusion","blend.hue":"hue","blend.saturation":"saturation","blend.color":"color","blend.luminosity":"luminosity","background.image.property.title":"Fill","border.property.title":"Border","border.radius.property.title":"Border Radius","boxshadow.property.title":"Box Shadows","filter.property.title":"Filter","filter.property.blur":"Blur","filter.property.grayscale":"GrayScale","filter.property.hue-rotate":"Hue Rotate","filter.property.invert":"Invert","filter.property.brightness":"Brightness","filter.property.contrast":"Contrast","filter.property.drop-shadow":"Drop Shadow","filter.property.drop-shadow.color":"Color","filter.property.drop-shadow.offsetX":"Offset X","filter.property.drop-shadow.offsetY":"Offset Y","filter.property.drop-shadow.blurRadius":"Blur","filter.property.opacity":"Opacity","filter.property.saturate":"Saturate","filter.property.sepia":"Sepia","filter.property.svg":"SVG","font.property.title":"Font","font.property.color":"Color","font.property.size":"Size","font.property.stretch":"Stretch","font.property.weight":"Weight","font.property.style":"Style","font.property.family":"Family","font.spacing.property.title":"Font spacing","font.spacing.property.lineHeight":"Line height","font.spacing.property.letterSpacing":"Letter spacing","font.spacing.property.wordSpacing":"Word spacing","font.spacing.property.indent":"Indent","backdrop.filter.property.title":"Backdrop Filter","clippath.property.title":"Clip Path","export.property.title":"Export","export.property.download":"Download","image.property.title":"Image","image.property.origin":"Origin","image.property.size":"Size","image.property.width":"Width","image.property.height":"height","video.property.title":"Video","video.property.play":"Play","video.property.pause":"Pause","video.property.volume":"Volume","video.property.playbackRate":"Playback Rate","video.property.currentTime":"Current Time","video.property.playTime":"Play Time Distance","motion.property.title":"Motion","text.property.title":"Text Style","text.property.align":"Align","text.property.transform":"Transform","text.property.decoration":"Decoration","text.clip.property.title":"Text Clip","text.shadow.property.title":"Text Shadows","text.fill.property.title":"Text Fill","text.fill.property.fill":"Fill","text.fill.property.stroke":"Stroke","text.fill.property.strokeWidth":"Width","transform.property.title":"Transform","transform.origin.property.title":"Transform Origin","transition.property.title":"CSS Transition","keyframe.property.title":"CSS Keyframe","selector.property.title":"Selector","selector.property.none":"None selector","path.data.property.title":"Path Information","polygon.data.property.title":"Polygon Information","perspective.property.title":"Perspective","perspective.origin.property.title":"Perspective Origin","svg.item.property.title":"Appearance","svg.item.property.isMotionPath":"Motion Path","svg.item.property.fill":"Fill","svg.item.property.fillOpacity":"Opacity","svg.item.property.path":"Path","svg.item.property.polygon":"Polygon","svg.item.property.totalLength":"Total Length","svg.item.property.fillRule":"Fill Rule","svg.item.property.stroke":"Stroke","svg.item.property.strokeWidth":"Width","svg.item.property.dashArray":"Dash Array","svg.item.property.dashOffset":"Dash Offset","svg.item.property.lineCap":"Line Cap","svg.item.property.lineJoin":"Line Join","svg.item.property.filter":"Filter","border.editor.all":"All","border.editor.width":"Width","border.editor.style":"Style","border.editor.color":"C","border.editor.top":"Top","border.editor.left":"Left","border.editor.right":"Right","border.editor.bottom":"Bottom","border.radius.editor.topLeft":"Top Left","border.radius.editor.topRight":"Top Right","border.radius.editor.bottomLeft":"Bottom Left","border.radius.editor.bottomRight":"Bottom Right","boxshadow.editor.blur":"Blur","boxshadow.editor.spread":"Spread","css.property.editor.properties":"Properties","offset.path.list.editor.path":"Path","offset.path.list.editor.totalLength":"Total Length","offset.path.list.editor.distance":"Distance","offset.path.list.editor.direction":"Direction","offset.path.list.editor.rotate":"Rotate","svgfilter.select.editor.message.create":"Create new svg filter","svgfilter.select.editor.message.select":"Select a filter","fill.editor.message.click.image":"Click the preview area if you want to select a image","fill.editor.message.drag.position":"Drag if you want to move center position","fill.editor.x1":"Start X","fill.editor.x2":"End X","fill.editor.y1":"Start Y","fill.editor.y2":"End Y","fill.editor.spread":"Spread","fill.editor.offset":"Offset","fill.editor.cx":"Center X","fill.editor.cy":"Center Y","fill.editor.r":"End radius","fill.editor.fx":"Start X","fill.editor.fy":"Start Y","fill.editor.fr":"Start radius","perspective.origin.editor.originX":"Origin X","perspective.origin.editor.originY":"Origin Y","path.manager.msg":"Keydown ESC or Enter key to close editing","path.manager.mode.modify":"Modify","path.manager.mode.path":"Path","path.manager.mode.transform":"Transform","path.manager.mode.reverse":"Reverse","path.manager.mode.flipX":"Flip X","path.manager.mode.flipY":"Flip Y","path.manager.mode.flipOrigin":"Flip Origin","colorpicker.popup.title":"ColorPicker","selector.popup.title":"Selector Property","selector.popup.selector":"Selector","background.image.position.popup.title":"Background Pattern","background.image.position.popup.size":"Size","background.image.position.popup.width":"Width","background.image.position.popup.height":"Height","background.image.position.popup.repeat":"Repeat","background.image.position.popup.blend":"Blend","background.image.position.popup.type.repeat":"repeat","background.image.position.popup.type.no-repeat":"no repeat","background.image.position.popup.type.repeat-x":"repeat-x","background.image.position.popup.type.repeat-y":"repeat-y","background.image.position.popup.type.space":"space","background.image.position.popup.type.round":"round","gradient.picker.popup.title":"Gradient & Image Picker","image.asset.property.title":"Image","video.asset.property.title":"Video","color.asset.property.title":"Color","gradient.asset.property.title":"Gradient","pattern.asset.property.title":"Pattern","svgfilter.asset.property.title":"SVG Filter","inspector.tab.title.style":"Style","inspector.tab.title.component":"Component","inspector.tab.title.transition":"Transition & Animation","inspector.tab.title.asset":"Assets","inspector.tab.title.text":"Text","inspector.tab.title.code":"Code","inspector.tab.title.history":"History","timeline.property.title":"Timeline","timeline.property.resize":"Drag if you want to resize timeline height.","timeline.animation.property.title":"Animations","timeline.play.control.play":"Play","timeline.play.control.pause":"Pause","timeline.play.control.first":"First","timeline.play.control.prev":"Previous","timeline.play.control.next":"Next","timeline.play.control.last":"Last","timeline.play.control.direction":"Direction","timeline.play.control.speed":"Speed","timeline.play.control.repeat":"Repeat","timeline.play.control.infinite":"Infinite","timeline.play.control.normal":"normal","timeline.play.control.alternate":"alternate","timeline.play.control.reverse":"reverse","timeline.play.control.alternate.reverse":"alternate reverse","timeline.value.editor.value":"Value","timeline.value.editor.time":"Time","timeline.value.editor.timing":"Timing","timeline.value.editor.offset.message":"Please input enter key to change time offset.","svgfilter.popup.title":"SVG Filter","css.item.rotate":"Rotate","css.item.rotateX":"Rotate X","css.item.rotateY":"Rotate Y","css.item.rotateZ":"Rotate Z","css.item.rotate3d":"3D Rotate","css.item.skewX":"Skew X","css.item.skewY":"Skew Y","css.item.translate":"Translate","css.item.translateX":"Translate X","css.item.translateY":"Translate Y","css.item.translateZ":"Translate Z","css.item.translate3d":"3D Translate","css.item.perspective":"Perspective","css.item.scale":"Scale","css.item.scaleX":"Scale X","css.item.scaleY":"Scale Y","css.item.scaleZ":"Scale Z","css.item.scale3d":"3D Scale","css.item.matrix":"Matrix","css.item.matrix3d":"3D Matrix","animation.property.title":"CSS Animation","animation.property.direction":"Direction","animation.property.play.state":"Play State","animation.property.fill.mode":"Fill Mode","animation.property.delay":"Delay","animation.property.duration":"Duration","animation.property.iteration.count":"Iteration Count","animation.property.Select a keyframe":"Select a keyframe","animation.property.popup.title":"Animation","animation.property.popup.timing.function":"Timing Function","animation.property.popup.keyframe":"Keyframe","animation.property.popup.direction":"Direction","animation.property.popup.play.state":"Play State","animation.property.popup.fill.mode":"Fill Mode","animation.property.popup.delay":"Delay","animation.property.popup.duration":"Duration","animation.property.popup.iteration":"Iteration","animation.property.popup.normal":"normal","animation.property.popup.reverse":"reverse","animation.property.popup.alternate":"alternate","animation.property.popup.alternate-reverse":"alternate-reverse","animation.property.popup.none":"none","animation.property.popup.forwards":"forwards","animation.property.popup.backwards":"backwards","animation.property.popup.both":"both","animation.property.popup.Select a keyframe":"Select a keyframe","keyframe.popup.title":"Keyframe","code.view.property.title":"CodeView","svg.filter.editor.tab.filter":"Filter","svg.filter.editor.tab.preset":"Preset","svg.filter.editor.tab.asset":"Assets","svg.filter.editor.GRAPHIC REFERENCES":"GRAPHIC REFERENCES","svg.filter.editor.SOURCES":"SOURCES","svg.filter.editor.MODIFIER":"MODIFIER","svg.filter.editor.LIGHTING":"LIGHTING","svg.filter.editor.COMBINERS":"COMBINERS","svg.filter.editor.Template":"Template","layout.property.title":"Layout","layout.property.flex":"Flex Box","layout.property.grid":"Grid","layout.property.default":"Default","flex.layout.editor.row":"Row","flex.layout.editor.column":"column","flex.layout.editor.row-reverse":"Row Reverse","flex.layout.editor.column-reverse":"Column Reverse","flex.layout.editor.nowrap":"Nowrap","flex.layout.editor.wrap":"Wrap","flex.layout.editor.wrap-reverse":"Wrap Reverse","flex.layout.editor.flex-start":"Start","flex.layout.editor.flex-end":"End","flex.layout.editor.center":"Center","flex.layout.editor.space-between":"Between","flex.layout.editor.space-around":"Around","flex.layout.editor.baseline":"BaseLine","flex.layout.editor.stretch":"Stretch","flex.layout.editor.direction":"Direction","flex.layout.editor.justify-content":"Justify Content","flex.layout.editor.align-items":"Align Items","flex.layout.editor.align-content":"Align Content","flex.layout.item.property.title":"Layout Item Detail","flex.layout.item.property.grow":"Flex Grow","flex.layout.item.property.shrink":"Flex Shrink","flex.layout.item.property.basis":"Flex Basis","flex.layout.item.property.none":"none","flex.layout.item.property.auto":"auto","flex.layout.item.property.value":"value","grid.layout.editor.template.columns":"Columns","grid.layout.editor.column.gap":"Column Gap","grid.layout.editor.template.rows":"Rows","grid.layout.editor.row.gap":"Row Gap","grid.box.editor.box.title":"Box","grid.box.editor.type":"Type","grid.box.editor.repeat":"Repeat","grid.box.editor.length":"Length","grid.box.editor.none":"None","grid.box.editor.auto":"Auto","grid.box.editor.count":"Count","grid.box.editor.value":"Size","grid.layout.item.property.title":"Layout Item Detail","grid.layout.item.property.column":"Column","grid.layout.item.property.row":"Row","grid.layout.item.property.start":"Start","grid.layout.item.property.end":"End","grid.layout.item.property.none":"none","grid.layout.item.property.value":"value","box.model.property.title":"Box Model","box.model.property.margin":"Margin","box.model.property.padding":"Padding","component.items.canvas":"Canvas","component.items.layer":"Layer","component.items.3dlayer":"3D Layer","component.items.drawing":"Drawing","component.items.custom":"Custom Component","svg.text.property.title":"SVG Text Style","svg.text.property.textarea":"Text Area","svg.text.property.size":"Font Size","svg.text.property.weight":"Font Weight","svg.text.property.style":"Font Style","svg.text.property.anchor":"Text Anchor","svg.text.property.family":"Font Family","svg.text.property.length.adjust":"Length Adjust","svg.text.property.text.length":"Text Length","svg.text.property.start.offset":"Start Offset","fill.picker.popup.title":"SVG Fragment picker","gradient.editor.drag.message":"Drag if you want to move center pointer.","draw.manager.tolerance":"Tolerance","pattern.property.title":"Pattern","pattern.info.popup.title":"Pattern Info","pattern.info.popup.width":"Width","pattern.info.popup.height":"Height","pattern.info.popup.lineWidth":"Line Width","pattern.info.popup.lineHeight":"Line Height","pattern.info.popup.rotate":"Rotate","pattern.info.popup.blend":"Blend Mode","pattern.info.popup.foreColor":"Fore","pattern.info.popup.backColor":"Back","stroke.dasharray.editor.add":"Add Dash","viewport.panning.enable":"You can move the area by holding down space key and dragging the screen."},fr_FR:(Ph={"app.title":"EASYLOGIC","app.sample":function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n)},"app.lang.en_US":"English","app.lang.ko_KR":"한국어","app.lang.fr_FR":"Français","app.label.lang":"Langue","app.layout.all":"All","app.layout.css":"CSS","app.layout.svg":"SVG","app.label.layout":"Menu Layout","app.theme.dark":"Sombre","app.theme.light":"Clair","app.theme.gray":"Gris","app.label.theme":"Thème","app.tab.title.projects":"Projets","app.tab.title.layers":"Objets","app.tab.title.libraries":"Librarie","app.tab.title.components":"Objet","app.tab.title.artboards":"Artboard","app.tab.title.assets":"Elements","app.tab.title.keyMap":"Clavier","app.confirm.message.artboard.items.removeArtboard":"Do you remove an artboard preview really?","menu.item.download.title":"Télécharger","menu.item.save.title":"Enregistrer","menu.item.export.title":"Exporter","menu.item.codepen.title":"CodePen","menu.item.fullscreen.title":"Ecran","menu.item.shortcuts.title":"ShortCuts","menu.item.github.title":"Github","menu.item.learn.title":"Docs","project.property.title":"Projet","project.information.property.title":"Information","project.information.property.name":"Nom","project.information.property.description":"Description","artboard.property.title":"Planche","artboard.property.layout.title.flex":"Flex","artboard.property.layout.title.grid":"Grille","layer.tree.property.title":"Objets","layer.tree.property.layout.title.flex":"Flex","layer.tree.property.layout.title.grid":"Grille","alignment.property.title":"Alignment","position.property.title":"Position","position.property.X":"X","position.property.Y":"Y","size.property.title":"Taille","position.property.width":"Largeur","position.property.height":"Hauteur","position.property.opacity":"Opacity","position.property.rotate":"Rotate","background.color.property.title":"Apparance","background.color.property.color":"Couleur","background.color.property.zindex":"z-index","background.color.property.opacity":"Opacité","background.color.property.blend":"Mélange","background.color.property.overflow":"Débordement","background.color.property.overflow.visible":"Visible","background.color.property.overflow.hidden":"Caché","background.color.property.overflow.scroll":"Scroll","background.color.property.overflow.auto":"Auto","blend.normal":"normal","blend.multiply":"multiplie","blend.screen":"écran","blend.overlay":"couche","blend.darken":"sombre","blend.lighten":"clair","blend.color-dodge":"dodge","blend.color-burn":"brulé","blend.hard-light":"dur","blend.soft-light":"doux","blend.difference":'diff"rence',"blend.exclusion":"exclusion","blend.hue":"teinte","blend.saturation":"saturation","blend.color":"couleur","blend.luminosity":"luminosité","background.image.property.title":"Remplissage","border.property.title":"Bordure","border.radius.property.title":"Rayon de bordure","boxshadow.property.title":"Ombres","filter.property.title":"Filtre","filter.property.blur":"Flou","filter.property.grayscale":"Echelle de gris","filter.property.hue-rotate":"Rotation teinte","filter.property.invert":"Invertir","filter.property.brightness":"Luminosité","filter.property.contrast":"Contraste","filter.property.drop-shadow":"Ombre portée","filter.property.drop-shadow.color":"Couleur","filter.property.drop-shadow.offsetX":"Décalage X","filter.property.drop-shadow.offsetY":"Décalage Y","filter.property.drop-shadow.blurRadius":"Flou","filter.property.opacity":"Opacité","filter.property.saturate":"Saturation","filter.property.sepia":"Sépia","filter.property.svg":"SVG","font.property.title":"Police","font.property.color":"Couleur","font.property.size":"Taille","font.property.stretch":"Etirement","font.property.weight":"Poids","font.property.style":"Style","font.property.family":"Famille","font.spacing.property.title":"Espaces du texte","font.spacing.property.lineHeight":"Hauteur de ligne","font.spacing.property.letterSpacing":"Espace inter-caractères","font.spacing.property.wordSpacing":"Espace inter-mots","font.spacing.property.indent":"Identation","backdrop.filter.property.title":"Filtre Backdrop","clippath.property.title":"Chemin du Clip","export.property.title":"Exporter","export.property.download":"Télécharger","image.property.title":"Image","image.property.origin":"Origine","image.property.size":"Taille","image.property.width":"Largeur","image.property.height":"Hauteur","video.property.title":"Video","video.property.play":"Jouer","video.property.pause":"Pause","video.property.volume":"Volume","video.property.playbackRate":"Vitesse de lecture","video.property.currentTime":"Temps actuel","video.property.playTime":"Temps de lecture","motion.property.title":"Mouvement","text.property.title":"Style Texte","text.property.align":"Alignement","text.property.transform":"Transformation","text.property.decoration":"Décoration","text.clip.property.title":"Clip Texte","text.shadow.property.title":"Ombres Texte","text.fill.property.title":"Remplissage Texte","text.fill.property.fill":"Remplissage","text.fill.property.stroke":"Trait","text.fill.property.strokeWidth":"Largeur","transform.property.title":"Transformation","transform.origin.property.title":"Origine Transformation","transition.property.title":"Transition CSS","keyframe.property.title":"Image clé CSS","selector.property.title":"Sélécteur","selector.property.none":"Aucun sélécteur","path.data.property.title":"Information Chemin","polygon.data.property.title":"Information Polygone","perspective.property.title":"Perspective","perspective.origin.property.title":"Origine Perspective","svg.item.property.title":"Appearance","svg.item.property.isMotionPath":"Chemin de mouvement","svg.item.property.fill":"Remplissage","svg.item.property.fillOpacity":"Opacité","svg.item.property.path":"Chemin","svg.item.property.polygon":"Polygone","svg.item.property.totalLength":"Longueur totale","svg.item.property.fillRule":"Règle remplissage","svg.item.property.stroke":"Trait","svg.item.property.strokeWidth":"Largeur de trait","svg.item.property.dashArray":"Suite tiret","svg.item.property.dashOffset":"Décalage tiret","svg.item.property.lineCap":"Chapeau Ligne","svg.item.property.lineJoin":"Jonction ligne","svg.item.property.filter":"Filtre","border.editor.all":"Tout","border.editor.width":"Largeur","border.editor.style":"Style","border.editor.color":"Couleur","border.editor.top":"Haut","border.editor.left":"Gauche","border.editor.right":"Droite","border.editor.bottom":"Bas","border.radius.editor.topLeft":"Haut gauche","border.radius.editor.topRight":"Haut droite","border.radius.editor.bottomLeft":"Bas gauche","border.radius.editor.bottomRight":"Bas droite","boxshadow.editor.blur":"Flou","boxshadow.editor.spread":"Etalement","css.property.editor.properties":"Propriétés","offset.path.list.editor.path":"Chemin","offset.path.list.editor.totalLength":"Longueur totale","offset.path.list.editor.distance":"Distance","offset.path.list.editor.direction":"Direction","offset.path.list.editor.rotate":"Rotation","svgfilter.select.editor.message.create":"Créer un filtre svg","svgfilter.select.editor.message.select":"Sélection filtre","fill.editor.message.click.image":"Cliquez sur aperçu si vous souhaitez sélectionner une image","fill.editor.message.drag.position":"Prendre pour changer la position centrale","fill.editor.x1":"Début X","fill.editor.x2":"Fin X","fill.editor.y1":"Début Y","fill.editor.y2":"Fin Y","fill.editor.spread":"Etalement","fill.editor.offset":"Décalage","fill.editor.cx":"Centre X","fill.editor.cy":"Centre Y","fill.editor.r":"Rayon de fin","fill.editor.fx":"Départ X","fill.editor.fy":"Départ Y","fill.editor.fr":"Rayon de départ","perspective.origin.editor.originX":"Origine X","perspective.origin.editor.originY":"Origine Y","path.manager.msg":"Appuyer ESC ou Entréz keypour fermer Edition","path.manager.mode.modify":"Modifier","path.manager.mode.path":"Chemin","path.manager.mode.transform":"Transformer","path.manager.mode.reverse":"Reverse","path.manager.mode.flipX":"Retouner X","path.manager.mode.flipY":"Retouner Y","path.manager.mode.flipOrigin":"Retouner Origine","colorpicker.popup.title":"Pipette","selector.popup.title":"Propiété de Sélecteur","selector.popup.selector":"Sélecteur","background.image.position.popup.title":"Motif de fond","background.image.position.popup.size":"Taille","background.image.position.popup.width":"Largeur","background.image.position.popup.height":"Hauteur","background.image.position.popup.repeat":"Repète","background.image.position.popup.blend":"Mélange","background.image.position.popup.type.repeat":"repète","background.image.position.popup.type.no-repeat":"sans repétition","background.image.position.popup.type.repeat-x":"repète-x","background.image.position.popup.type.repeat-y":"repète-y","background.image.position.popup.type.space":"espace","background.image.position.popup.type.round":"rond","gradient.picker.popup.title":"Sélection Gradient & Image","image.asset.property.title":"Image","video.asset.property.title":"Vidéo","color.asset.property.title":"Couleur","gradient.asset.property.title":"Gradient","pattern.asset.property.title":"Motif","svgfilter.asset.property.title":"Filtre SVG","inspector.tab.title.style":"Style","inspector.tab.title.component":"Composant","inspector.tab.title.transition":"Transition & Animation","inspector.tab.title.asset":"Eléments","inspector.tab.title.text":"Texte","inspector.tab.title.code":"Code","inspector.tab.title.history":"History"},S()(Ph,"inspector.tab.title.history","History"),S()(Ph,"timeline.property.title","Chronologie"),S()(Ph,"timeline.property.resize","Drag if you want to resize timeline height."),S()(Ph,"timeline.animation.property.title","Animations"),S()(Ph,"timeline.play.control.play","Jouer"),S()(Ph,"timeline.play.control.pause","Pause"),S()(Ph,"timeline.play.control.first","Premier"),S()(Ph,"timeline.play.control.prev","Précédent"),S()(Ph,"timeline.play.control.next","Suivant"),S()(Ph,"timeline.play.control.last","Dernier"),S()(Ph,"timeline.play.control.direction","Direction"),S()(Ph,"timeline.play.control.speed","Vitesse"),S()(Ph,"timeline.play.control.repeat","Répéter"),S()(Ph,"timeline.play.control.infinite","Infini"),S()(Ph,"timeline.play.control.normal","normal"),S()(Ph,"timeline.play.control.alternate","alternatif"),S()(Ph,"timeline.play.control.reverse","inverse"),S()(Ph,"timeline.play.control.alternate.reverse","inverse alternatif"),S()(Ph,"timeline.value.editor.value","Valeur"),S()(Ph,"timeline.value.editor.time","Temps"),S()(Ph,"timeline.value.editor.timing","Calage temps"),S()(Ph,"timeline.value.editor.offset.message","Please input enter key to change time offset."),S()(Ph,"svgfilter.popup.title","Filtre SVG"),S()(Ph,"css.item.rotate","Rotation"),S()(Ph,"css.item.rotateX","Rotation X"),S()(Ph,"css.item.rotateY","Rotation Y"),S()(Ph,"css.item.rotateZ","Rotation Z"),S()(Ph,"css.item.rotate3d","Rotation 3D"),S()(Ph,"css.item.skewX","Oblique X"),S()(Ph,"css.item.skewY","Oblique Y"),S()(Ph,"css.item.translate","Translation"),S()(Ph,"css.item.translateX","Translation X"),S()(Ph,"css.item.translateY","Translation Y"),S()(Ph,"css.item.translateZ","Translation Z"),S()(Ph,"css.item.translate3d","Translation 3D"),S()(Ph,"css.item.perspective","Perspéctive"),S()(Ph,"css.item.scale","Echelle"),S()(Ph,"css.item.scaleX","Echelle X"),S()(Ph,"css.item.scaleY","Echelle Y"),S()(Ph,"css.item.scaleZ","Echelle Z"),S()(Ph,"css.item.scale3d","Echelle 3D"),S()(Ph,"css.item.matrix","Matrice"),S()(Ph,"css.item.matrix3d","Matrice 3D"),S()(Ph,"animation.property.title","Animation CSS"),S()(Ph,"animation.property.direction","Direction"),S()(Ph,"animation.property.play.state","Etat lecture"),S()(Ph,"animation.property.fill.mode","Mode remplissage"),S()(Ph,"animation.property.delay","Délais"),S()(Ph,"animation.property.duration","Durée"),S()(Ph,"animation.property.iteration.count","Nombre Itérations"),S()(Ph,"animation.property.Select a keyframe","Selectionner une image clé"),S()(Ph,"animation.property.popup.title","Animation"),S()(Ph,"animation.property.popup.timing.function","Fonction temps"),S()(Ph,"animation.property.popup.keyframe","image clé"),S()(Ph,"animation.property.popup.direction","Direction"),S()(Ph,"animation.property.popup.play.state","Etat lecture"),S()(Ph,"animation.property.popup.fill.mode","Mode remplissage"),S()(Ph,"animation.property.popup.delay","Délais"),S()(Ph,"animation.property.popup.duration","Duréé"),S()(Ph,"animation.property.popup.iteration","Itération"),S()(Ph,"animation.property.popup.normal","normal"),S()(Ph,"animation.property.popup.reverse","inverse"),S()(Ph,"animation.property.popup.alternate","alternatif"),S()(Ph,"animation.property.popup.alternate-reverse","inverse alternatif"),S()(Ph,"animation.property.popup.none","Aucun"),S()(Ph,"animation.property.popup.forwards","en avant"),S()(Ph,"animation.property.popup.backwards","en arrière"),S()(Ph,"animation.property.popup.both","les deux"),S()(Ph,"animation.property.popup.Select a keyframe","Selectionner une image clé"),S()(Ph,"keyframe.popup.title","image clé"),S()(Ph,"code.view.property.title","Vue code"),S()(Ph,"svg.filter.editor.tab.filter","Filtrer"),S()(Ph,"svg.filter.editor.tab.preset","Pre-rempli"),S()(Ph,"svg.filter.editor.tab.asset","Eléments"),S()(Ph,"svg.filter.editor.GRAPHIC REFERENCES","REFERENCES GRAPHIQUES"),S()(Ph,"svg.filter.editor.SOURCES","SOURCES"),S()(Ph,"svg.filter.editor.MODIFIER","MODIFIER"),S()(Ph,"svg.filter.editor.LIGHTING","ECLAIRAGE"),S()(Ph,"svg.filter.editor.COMBINERS","COMBINER"),S()(Ph,"svg.filter.editor.Template","Modèle"),S()(Ph,"layout.property.title","Disposition"),S()(Ph,"layout.property.flex","Boîte Flex"),S()(Ph,"layout.property.grid","Grille"),S()(Ph,"layout.property.default","Défaut"),S()(Ph,"flex.layout.editor.row","Ligne"),S()(Ph,"flex.layout.editor.column","Colonne"),S()(Ph,"flex.layout.editor.row-reverse","Inverse ligne"),S()(Ph,"flex.layout.editor.column-reverse","Inverse Colonne"),S()(Ph,"flex.layout.editor.nowrap","Non-emballé"),S()(Ph,"flex.layout.editor.wrap","Emballé (wrap)"),S()(Ph,"flex.layout.editor.wrap-reverse","Inverse emballé"),S()(Ph,"flex.layout.editor.flex-start","Début"),S()(Ph,"flex.layout.editor.flex-end","Fin"),S()(Ph,"flex.layout.editor.center","Centrer"),S()(Ph,"flex.layout.editor.space-between","Entre"),S()(Ph,"flex.layout.editor.space-around","Autour"),S()(Ph,"flex.layout.editor.baseline","Base"),S()(Ph,"flex.layout.editor.stretch","Etirement"),S()(Ph,"flex.layout.editor.direction","Direction"),S()(Ph,"flex.layout.editor.justify-content","Justifier"),S()(Ph,"flex.layout.editor.align-items","Aligner objets"),S()(Ph,"flex.layout.editor.align-content","Aligner contenu"),S()(Ph,"flex.layout.item.property.title","Détail Disposition objet"),S()(Ph,"flex.layout.item.property.grow","Augmenter Flex"),S()(Ph,"flex.layout.item.property.shrink","Réduire Flex"),S()(Ph,"flex.layout.item.property.basis","Base Flex"),S()(Ph,"flex.layout.item.property.none","Aucun"),S()(Ph,"flex.layout.item.property.auto","auto"),S()(Ph,"flex.layout.item.property.value","valeur"),S()(Ph,"grid.layout.editor.template.columns","Colonne"),S()(Ph,"grid.layout.editor.column.gap","Espace Colonne"),S()(Ph,"grid.layout.editor.template.rows","Lignes"),S()(Ph,"grid.layout.editor.row.gap","Espace lignes"),S()(Ph,"grid.box.editor.box.title","Boîte"),S()(Ph,"grid.box.editor.type","Type"),S()(Ph,"grid.box.editor.repeat","Répéter"),S()(Ph,"grid.box.editor.length","Longueur"),S()(Ph,"grid.box.editor.none","Aucun"),S()(Ph,"grid.box.editor.auto","Auto"),S()(Ph,"grid.box.editor.count","Compte"),S()(Ph,"grid.box.editor.value","Taille"),S()(Ph,"grid.layout.item.property.title","Détail disposition objets"),S()(Ph,"grid.layout.item.property.column","Colonne"),S()(Ph,"grid.layout.item.property.row","Ligne"),S()(Ph,"grid.layout.item.property.start","Début"),S()(Ph,"grid.layout.item.property.end","Fin"),S()(Ph,"grid.layout.item.property.none","Aucun"),S()(Ph,"grid.layout.item.property.value","valeur"),S()(Ph,"box.model.property.title","Modèle"),S()(Ph,"box.model.property.margin","Marge"),S()(Ph,"box.model.property.padding","Espace"),S()(Ph,"component.items.canvas","Toile"),S()(Ph,"component.items.layer","Objet"),S()(Ph,"component.items.3dlayer","Objet 3D"),S()(Ph,"component.items.drawing","Dessin"),S()(Ph,"component.items.custom","Composant personnalisé"),S()(Ph,"svg.text.property.title","Style SVG Texte"),S()(Ph,"svg.text.property.textarea","Zone Texte"),S()(Ph,"svg.text.property.size","Taille"),S()(Ph,"svg.text.property.weight","Poids"),S()(Ph,"svg.text.property.style","Style"),S()(Ph,"svg.text.property.anchor","Ancre Texte"),S()(Ph,"svg.text.property.family","Famille"),S()(Ph,"svg.text.property.length.adjust","Ajusteement longueur"),S()(Ph,"svg.text.property.text.length","Ajusteement Texte"),S()(Ph,"svg.text.property.start.offset","Décallage départ"),S()(Ph,"fill.picker.popup.title","Sélection Fragment SVG"),S()(Ph,"gradient.editor.drag.message","Glisser pour déplacer centre."),S()(Ph,"draw.manager.tolerance","Tolérance"),S()(Ph,"pattern.property.title","Motif"),S()(Ph,"pattern.info.popup.title","Info Motif"),S()(Ph,"pattern.info.popup.width","Largeur"),S()(Ph,"pattern.info.popup.height","Hauteur"),S()(Ph,"pattern.info.popup.lineWidth","Largeur ligne"),S()(Ph,"pattern.info.popup.lineHeight","Hauteur de ligne"),S()(Ph,"pattern.info.popup.rotate","Rotatation"),S()(Ph,"pattern.info.popup.blend","Mélange"),S()(Ph,"pattern.info.popup.foreColor","Avant"),S()(Ph,"pattern.info.popup.backColor","Arrière"),S()(Ph,"stroke.dasharray.editor.add","Ajout tiret"),S()(Ph,"viewport.panning.enable","You can move the area by holding down space and dragging the screen."),Ph),ko_KR:{"app.title":"EASYLOGIC","app.sample":function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n)},"app.lang.en_US":"English","app.lang.ko_KR":"한국어","app.lang.fr_FR":"Français","app.label.lang":"언어","app.layout.all":"전체","app.layout.css":"CSS","app.layout.svg":"SVG","app.label.layout":"메뉴구성","app.theme.dark":"어두운","app.theme.light":"밝은","app.theme.toon":"그리기","app.theme.gray":"회색","app.label.theme":"테마","app.tab.title.projects":"프로젝트","app.tab.title.layers":"레이어","app.tab.title.libraries":"라이브러리","app.tab.title.components":"컴포넌트","app.tab.title.artboards":"아트보드","app.tab.title.assets":"에셋","app.tab.title.keyMap":"단축키","app.confirm.message.artboard.items.removeArtboard":"아트보드 프리뷰를 삭제 하시겠습니까?","menu.item.download.title":"다운로드","menu.item.save.title":"저장","menu.item.export.title":"내보내기","menu.item.codepen.title":"CodePen","menu.item.fullscreen.title":"전체화면","menu.item.shortcuts.title":"단축키","menu.item.github.title":"Github","menu.item.learn.title":"배우기","project.property.title":"프로젝트","project.information.property.title":"프로젝트 정보","project.information.property.name":"이름","project.information.property.description":"설명","artboard.property.title":"아트보드","artboard.property.layout.title.flex":"플렉스","artboard.property.layout.title.grid":"그리드","layer.tree.property.title":"레이어","layer.tree.property.layout.title.flex":"플렉스","layer.tree.property.layout.title.grid":"그리드","alignment.property.title":"정렬","position.property.title":"위치","position.property.X":"X","position.property.Y":"Y","size.property.title":"크기","position.property.width":"넓이","position.property.height":"높이","position.property.rotate":"회전","position.property.opacity":"투명","background.color.property.title":"표시","background.color.property.color":"배경색","background.color.property.zindex":"z-index","background.color.property.blend":"블렌드모드","background.color.property.overflow":"오버플로우","background.color.property.overflow.visible":"보이기","background.color.property.overflow.hidden":"숨기기","background.color.property.overflow.scroll":"스크롤","background.color.property.overflow.auto":"자동","blend.normal":"Normal(표준) 혼합모드","blend.multiply":"Multiply(곱하기) 모드","blend.screen":"Screen(스크린) 모드 ","blend.overlay":"Overlay(오버레이) 모드","blend.darken":"Darken(어둡기) 모드","blend.lighten":"Lighten(밝기) 모드 ","blend.color-dodge":"Color Dodge(컬러 닷지) 모드 ","blend.color-burn":"Color Burn(컬러 번) 모드 ","blend.hard-light":"Hard Light(하드 라이트) 모드 ","blend.soft-light":"Soft Light(소프트 라이트) 모드 ","blend.difference":"Difference(차이) 모드","blend.exclusion":"Exclusion(제외) 모드","blend.hue":"Hue(색조) 모드 ","blend.saturation":"Saturation(채도) 모드","blend.color":"Color(색상) 모드","blend.luminosity":"Luminosity(광도) 모드 ","background.image.property.title":"채우기","border.property.title":"외곽선","border.radius.property.title":"둥근 외곽선","boxshadow.property.title":"그림자","filter.property.title":"필터","filter.property.blur":"흐림(Blur)","filter.property.grayscale":"회색(GrayScale)","filter.property.hue-rotate":"색조(HueRotate)","filter.property.invert":"반전(Invert)","filter.property.brightness":"밝기(Brightness)","filter.property.contrast":"대\b조(Contrast)","filter.property.drop-shadow":"그림자(Drop Shadow)","filter.property.drop-shadow.color":"색","filter.property.drop-shadow.offsetX":"X 간격","filter.property.drop-shadow.offsetY":"Y 간격","filter.property.drop-shadow.blurRadius":"흐림","filter.property.opacity":"투명도(Opacity)","filter.property.saturate":"채도(Saturate)","filter.property.sepia":"갈색톤(Sepia)","filter.property.svg":"SVG","font.property.title":"폰트","font.property.color":"색","font.property.size":"크기","font.property.stretch":"뻗기","font.property.weight":"굵기","font.property.style":"스타일","font.property.family":"글꼴","font.spacing.property.title":"폰트 공간","font.spacing.property.lineHeight":"줄 높이","font.spacing.property.letterSpacing":"글자 간격","font.spacing.property.wordSpacing":"단어 간격","font.spacing.property.indent":"들여쓰기","backdrop.filter.property.title":"후면 필터","clippath.property.title":"클립패스","export.property.title":"내보내기","export.property.download":"다운로드","image.property.title":"이미지","image.property.origin":"원본","image.property.size":"크기","image.property.width":"넓이","image.property.height":"높이","video.property.title":"비디오","video.property.play":"시작","video.property.pause":"멈춤","video.property.volume":"볼륨","video.property.playbackRate":"빠르기","video.property.currentTime":"현재 시간","video.property.playTime":"플레이 시간 간격","motion.property.title":"모션","path.data.property.title":"패스 정보","polygon.data.property.title":"폴리곤 정보","text.property.title":"텍스트 스타일","text.property.align":"정렬","text.property.transform":"변형","text.property.decoration":"장식","text.clip.property.title":"텍스트 클립","text.shadow.property.title":"텍스트 그림자","text.fill.property.title":"텍스트 채우기","text.fill.property.fill":"채우기","text.fill.property.stroke":"윤곽선","text.fill.property.strokeWidth":"윤곽선 굵기","transform.property.title":"트랜스폼","transform.origin.property.title":"트랜스폼 Origin","transition.property.title":"CSS 트랜지션","keyframe.property.title":"CSS 키프레임","selector.property.title":"CSS 셀렉터","selector.property.none":"선택자 없음","perspective.property.title":"투영(perspective)","perspective.origin.property.title":"투영 중심점","svg.item.property.title":"보이기","svg.item.property.isMotionPath":"모션 패스","svg.item.property.fill":"채우기","svg.item.property.fillOpacity":"투명도","svg.item.property.path":"패스","svg.item.property.polygon":"폴리곤","svg.item.property.totalLength":"전체 길이","svg.item.property.fillRule":"채우기 규칙","svg.item.property.stroke":"선","svg.item.property.strokeWidth":"선 굵기","svg.item.property.dashArray":"점선 길이","svg.item.property.dashOffset":"점선 위치","svg.item.property.lineCap":"선 모양","svg.item.property.lineJoin":"겹친 선","svg.item.property.filter":"필터","border.editor.all":"전체","border.editor.width":"크기","border.editor.style":"스타일","border.editor.color":"색","border.editor.top":"위","border.editor.left":"왼쪽","border.editor.right":"오른쪽","border.editor.bottom":"아래","border.radius.editor.topLeft":"왼쪽 위","border.radius.editor.topRight":"오른쪽 위","border.radius.editor.bottomLeft":"왼쪽 아래","border.radius.editor.bottomRight":"오른쪽 아래","boxshadow.editor.blur":"흐림","boxshadow.editor.spread":"길이","css.property.editor.properties":"속성","offset.path.list.editor.path":"패스","offset.path.list.editor.totalLength":"전체 길이","offset.path.list.editor.distance":"거리","offset.path.list.editor.direction":"방향","offset.path.list.editor.rotate":"회전","svgfilter.select.editor.message.create":"새로운 SVG Filter 를 만드세요.","svgfilter.select.editor.message.select":"필터를 선택하세요.","fill.editor.message.click.image":"이미지를 선택하고 싶으면 프리뷰 영역을 클릭하세요.","fill.editor.message.drag.position":"가운데 위치를 드래그 해보세요.","fill.editor.x1":"시작 X","fill.editor.x2":"끝 X","fill.editor.y1":"시작 Y","fill.editor.y2":"끝 Y","fill.editor.spread":"확산","fill.editor.offset":"위치","fill.editor.cx":"중심점 X","fill.editor.cy":"중심점 Y","fill.editor.r":"끝 반지름","fill.editor.fx":"시작 X","fill.editor.fy":"시작 Y","fill.editor.fr":"시작 반지름","perspective.origin.editor.originX":"중심점 X","perspective.origin.editor.originY":"중심점 Y","path.manager.msg":"편집을 종료할 때는 ESC 키나 Enter 키를 누르세요. 또는 화면을 클릭하시면 됩니다.","path.manager.mode.modify":"점 편집","path.manager.mode.path":"점 추가","path.manager.mode.transform":"변형","path.manager.mode.reverse":"순서변경","path.manager.mode.flipX":"X축 회전","path.manager.mode.flipY":"Y축 회전","path.manager.mode.flipOrigin":"전체 회전","colorpicker.popup.title":"색상 선택","selector.popup.title":"선택자 속성","selector.popup.selector":"선택자","background.image.position.popup.title":"배경 패턴","background.image.position.popup.size":"크기","background.image.position.popup.width":"넓이","background.image.position.popup.height":"높이","background.image.position.popup.repeat":"반복","background.image.position.popup.blend":"블렌드","background.image.position.popup.type.repeat":"반복","background.image.position.popup.type.no-repeat":"반복 안함","background.image.position.popup.type.repeat-x":"x축 반복","background.image.position.popup.type.repeat-y":"y축 반복","background.image.position.popup.type.space":"공백유지","background.image.position.popup.type.round":"반올림","gradient.picker.popup.title":"그라디언트와 이미지","image.asset.property.title":"이미지","video.asset.property.title":"비디오","color.asset.property.title":"색","gradient.asset.property.title":"그라디언트","pattern.asset.property.title":"패턴","svgfilter.asset.property.title":"SVG 필터","inspector.tab.title.style":"스타일 속성","inspector.tab.title.component":"컴포넌트 속성","inspector.tab.title.transition":"트랜지션과 애니메이션 속성","inspector.tab.title.asset":"에셋 관리자","inspector.tab.title.text":"텍스트","inspector.tab.title.code":"코드","inspector.tab.title.history":"기록","timeline.property.title":"타임라인","timeline.property.resize":"타임라인 높이를 변경합니다. 드래그 해주세요.","timeline.animation.property.title":"애니메이션","timeline.play.control.play":"플레이","timeline.play.control.pause":"멈춤","timeline.play.control.first":"처음으로","timeline.play.control.prev":"이전으로","timeline.play.control.next":"다음으로","timeline.play.control.last":"마지막으로","timeline.play.control.direction":"방향","timeline.play.control.speed":"속력","timeline.play.control.repeat":"반복","timeline.play.control.infinite":"무한","timeline.play.control.normal":"normal","timeline.play.control.alternate":"alternate","timeline.play.control.reverse":"reverse","timeline.play.control.alternate.reverse":"alternate reverse","timeline.value.editor.value":"값","timeline.value.editor.time":"시간","timeline.value.editor.timing":"타이밍 함수","timeline.value.editor.offset.message":"Enter키를 입력하면 적용됩니다.","svgfilter.popup.title":"SVG 필터","css.item.rotate":"회전","css.item.rotateX":"X축 회전","css.item.rotateY":"Y축 회전","css.item.rotateZ":"Z축 회전","css.item.rotate3d":"3D 회전","css.item.skewX":"X축 늘이기","css.item.skewY":"Y축 늘이기","css.item.translate":"이동","css.item.translateX":"X축 이동","css.item.translateY":"Y축 이동","css.item.translateZ":"Z축 이동","css.item.translate3d":"3D 이동","css.item.perspective":"원근","css.item.scale":"크기변경","css.item.scaleX":"X축 크기변경","css.item.scaleY":"Y축 크기변경","css.item.scaleZ":"Z축 크기변경","css.item.scale3d":"3D 크기변경","css.item.matrix":"변환 행렬","css.item.matrix3d":"3D 변환 행렬","animation.property.title":"CSS 애니메이션","animation.property.direction":"방향","animation.property.play.state":"플레이 상태","animation.property.fill.mode":"채우기 모드","animation.property.delay":"대기시간","animation.property.duration":"시간","animation.property.iteration.count":"반복 횟수","animation.property.select a keyframe":"키프레임을 선택해주세요","animation.property.popup.title":"CSS 애니메이션","animation.property.popup.timing.function":"타이밍 함수","animation.property.popup.keyframe":"키프레임","animation.property.popup.direction":"방향","animation.property.popup.play.state":"플레이 상태","animation.property.popup.fill.mode":"채우기 모드","animation.property.popup.delay":"대기시간","animation.property.popup.duration":"시간","animation.property.popup.iteration":"반복 횟수","animation.property.popup.normal":"시간순","animation.property.popup.reverse":"역시간순","animation.property.popup.alternate":"왕복 시간순","animation.property.popup.alternate-reverse":"왕복 역시간순","animation.property.popup.none":"none","animation.property.popup.forwards":"forwards","animation.property.popup.backwards":"backwards","animation.property.popup.both":"both","animation.property.popup.Select a keyframe":"키프레임을 선택해주세요.","keyframe.popup.title":"키프레임","code.view.property.title":"코드뷰","svg.filter.editor.tab.filter":"필터","svg.filter.editor.tab.preset":"프리셋","svg.filter.editor.tab.asset":"에셋","svg.filter.editor.GRAPHIC REFERENCES":"참조 그래픽","svg.filter.editor.SOURCES":"원본","svg.filter.editor.MODIFIER":"수정","svg.filter.editor.LIGHTING":"빛","svg.filter.editor.COMBINERS":"결합","svg.filter.editor.Template":"템플릿","layout.property.title":"레이아웃","layout.property.flex":"플렉스 박스","layout.property.grid":"그리드","layout.property.default":"기본 좌표","flex.layout.editor.row":"행","flex.layout.editor.column":"열","flex.layout.editor.row-reverse":"역방향 행","flex.layout.editor.column-reverse":"역방향 열","flex.layout.editor.nowrap":"감싸지 않기","flex.layout.editor.wrap":"감싸기","flex.layout.editor.wrap-reverse":"역방향 감싸기","flex.layout.editor.flex-start":"시작","flex.layout.editor.flex-end":"끝","flex.layout.editor.center":"중간","flex.layout.editor.space-between":"공간 중간 채움","flex.layout.editor.space-around":"공간 양끝 채움","flex.layout.editor.baseline":"기본선","flex.layout.editor.stretch":"펼치기","flex.layout.editor.direction":"방향","flex.layout.editor.justify-content":"컨텐츠 조정","flex.layout.editor.align-items":"아이템 정렬","flex.layout.editor.align-content":"컨텐츠 정렬","flex.layout.item.property.title":"플렉스 아이템 설정","flex.layout.item.property.grow":"공간 비율","flex.layout.item.property.shrink":"축소 비율","flex.layout.item.property.basis":"초기 크기","flex.layout.item.property.none":"없음","flex.layout.item.property.auto":"자동","flex.layout.item.property.value":"값","grid.layout.editor.template.columns":"열","grid.layout.editor.column.gap":"열 간격","grid.layout.editor.template.rows":"행","grid.layout.editor.row.gap":"행 간격","grid.box.editor.box.title":"영역","grid.box.editor.type":"타입","grid.box.editor.repeat":"반복","grid.box.editor.length":"길이","grid.box.editor.none":"없음","grid.box.editor.auto":"자동","grid.box.editor.count":"개수","grid.box.editor.value":"크기","grid.layout.item.property.title":"그리드 아이템 설정","grid.layout.item.property.column":"열","grid.layout.item.property.row":"행","grid.layout.item.property.start":"시작","grid.layout.item.property.End":"끝","grid.layout.item.property.none":"없음","grid.layout.item.property.value":"값","box.model.property.title":"박스 모델","box.model.property.margin":"마진","box.model.property.padding":"패딩","component.items.canvas":"캔버스","component.items.layer":"레이어","component.items.3dlayer":"3D 레이어","component.items.drawing":"그리기","component.items.custom":"사용자 정의 컴포넌트","svg.text.property.title":"SVG Text 스타일","svg.text.property.textarea":"텍스트 입력","svg.text.property.size":"폰트 크기","svg.text.property.weight":"폰트 굵기","svg.text.property.style":"폰트 스타일","svg.text.property.anchor":"텍스트 위치","svg.text.property.family":"폰트 글꼴","svg.text.property.length.adjust":"길이 대응","svg.text.property.text.length":"텍스트 길이","svg.text.property.start.offset":"시작 지점","fill.picker.popup.title":"색 채우기","gradient.editor.drag.message":"드래그 하면 중심점을 옮길 수 있습니다.","draw.manager.tolerance":"포인트 허용 오차","pattern.property.title":"패턴","pattern.info.popup.title":"패턴 정보","pattern.info.popup.width":"넓이","pattern.info.popup.height":"높이","pattern.info.popup.lineWidth":"선 넓이","pattern.info.popup.lineHeight":"선 높이","pattern.info.popup.rotate":"회전","pattern.info.popup.blend":"블렌드","pattern.info.popup.foreColor":"패턴색","pattern.info.popup.backColor":"배경색","stroke.dasharray.editor.add":"점 추가","viewport.panning.enable":"space 를 누른채 화면을 드래그 하면 영역을 움직일 수 있습니다."}},$h={locales:Oh,get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en_US",r=Oh[n][t]||Oh.en_US[t]||t||void 0;if(Bi(r))return r(e);var i=r;return t===i?t.split(".").pop():(Ci(e,(function(t,e){i=i.replace(new RegExp("{".concat(t,"}"),"ig"),e)})),i)},hasKey:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en_US";return!(!Oh[e][t]&&!Oh.en_US[t])}},Ch={dark:{left_size:250,left_max_size:400,bottom_size:150,bottom_max_size:500,timeline_grid_font_color:"#ececec",timeline_line_color:"red",timeline_timeview_bottom_color:"black"},light:{left_size:250,left_max_size:400,bottom_size:150,bottom_max_size:500,timeline_grid_font_color:"black",timeline_line_color:"#4778d4",timeline_timeview_bottom_color:"#ececec"},toon:{left_size:250,left_max_size:400,bottom_size:150,bottom_max_size:500,timeline_grid_font_color:"black",timeline_line_color:"#4778d4",timeline_timeview_bottom_color:"#ececec"}};function Eh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Th=function(){function t(e){go()(this,t),this.$editor=e,this.items=[],this.itemKeys={}}return bo()(t,[{key:"initialize",value:function(){this.items=[],this.itemKeys={}}},{key:"currentProject",value:function(t){var e=this.$editor.selection.currentProject;e&&t&&t(e)}},{key:"empty",value:function(){this.select()}},{key:"each",value:function(t){this.items.forEach((function(e,n){t&&t(e,n)}))}},{key:"refreshCache",value:function(t){var e=this;this.items=t,this.itemKeys={},this.items.forEach((function(t){e.itemKeys[t.id]=t}))}},{key:"cachedList",value:function(){return this.items.map((function(t){return function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.selection.itemsByIds(n).forEach((function(n){Object.keys(e).forEach((function(t){var r=e[t];Bi(r)&&(r=r(n)),n.reset(S()({},t,r))})),n.setCache(),t.emit("refreshElement",n)}))}};function Mh(t){t.emit("noneSelectMenu"),t.emit("refreshAll"),t.nextTick((function(){t.emit("refreshSelectionTool")}))}function Dh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ih(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:[];t.emit("updateResource",e)}},Bh={command:"updateImage",execute:function(t,e,n,r){var i=new FileReader;i.onload=function(i){var a=i.target.result,o=URL.createObjectURL(e);t.emit("addImageAssetItem",{id:zr(),type:e.type,name:e.name,original:a,local:o},n,r)},i.readAsDataURL(e)}},Gh={command:"updateVideo",execute:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=new FileReader;i.onload=function(i){var a=i.target.result,o=URL.createObjectURL(e);t.emit("addVideoAssetItem",{id:zr(),type:e.type,name:e.name,original:a,local:o},n,r)},i.readAsDataURL(e)}};function Hh(t,e){var n=new Image;n.onload=function(){var r={id:t.id,local:t.local,naturalWidth:Lo.px(n.naturalWidth),naturalHeight:Lo.px(n.naturalHeight),width:Lo.px(n.naturalWidth),height:Lo.px(n.naturalHeight)};e&&e(r,n)},n.onerror=function(t){console.log(t,t.message)},n.src=t.local}function Nh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xh(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=t.selection.currentProject;i&&(i.createImage(e),t.emit("addImageAsset"),Hh(e,(function(i){var a=n.width.value/i.width.value,o=n.width,s=Lo.px(i.height.value*a);t.emit("addImage",Xh({src:e.id},i,{},n,{width:o,height:s}),r),t.changeMode(em),t.emit("afterChangeMode")})))}};function _h(t,e){var n=document.createElement("video");n.onloadeddata=function(){var r={local:t.local,naturalWidth:Lo.px(n.videoWidth),naturalHeight:Lo.px(n.videoHeight),width:Lo.px(n.videoWidth),height:Lo.px(n.videoHeight),duration:n.duration,playTime:"0:1:".concat(n.duration),volume:n.volume,muted:n.muted,placebackRate:n.playbackRate};e&&e(r,n)},n.src=t.local}function Kh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wh(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=t.selection.currentProject;i&&(i.createVideo(e),t.emit("addVideoAsset"),_h(e,(function(i){t.emit("addVideo",Wh({src:e.id},i,{},n),r),t.changeMode(em),t.emit("afterChangeMode")})))}};function Zh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var qh={command:"dropImageUrl",execute:function(t,e){Hh({local:e},(function(e){t.emit("addImage",function(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1],r=e.split("data:"),i=j()(r,2),a=(i[0],i[1]),o=a.split(","),s=$()(o),c=s[0],l=s.slice(1),u=c.split(";"),h=j()(u,2),p=h[0],d=h[1];return l=l.join(","),{mimeType:p,local:n&&t.getLink(p,d,l)}}},{key:"getLink",value:function(t,e,n){if("base64"===e){for(var r=atob(n),i=r.length,a=new Uint8Array(i),o=0;o-1){var r=ep.parse(n,!0);switch(r.mimeType){case"image/png":case"image/gif":case"image/jpg":case"image/jpeg":t.emit("addImageAssetItem",{id:zr(),type:r.mimeType,name:"",original:n,local:r.local})}}else{var i=e.data.split(".").pop(),a=e.data.split("/").pop();switch(i){case"png":case"jpg":case"gif":case"svg":t.emit("addImageAssetItem",{id:zr(),type:"image/"+i,name:a,original:e.data,local:e.data})}}}};function rp(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"easylogic.json",n=document.createElement("a");n.href=t,n.download=e,n.click()}var ip={command:"downloadJSON",execute:function(t,e){var n=JSON.stringify(t.projects);rp("data:application/json;base64,"+window.btoa(n),e||"easylogic.json")}},ap=new Map,op=function(){function t(){go()(this,t)}return bo()(t,null,[{key:"has",value:function(t){return ap.has(t)}},{key:"get",value:function(t){return ap.get(t)}},{key:"set",value:function(t,e){ap.size>1e3&&ap.clear(),ap.set(t,e)}}]),t}();function sp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function cp(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,cp({itemType:"pattern"},t))}},{key:"toString",value:function(){return"".concat(this.json.type,"(").concat(this.json.value||"",")")}}],[{key:"parse",value:function(t){var e=bp[t.type];if(e)return new e(t)}},{key:"parseStyle",value:function(t){var n=[];if(!t)return n;if(op.has(t))return op.get(t);var r=_a(t);return(r.str.match(lp)||[]).forEach((function(t,i){var a=t.split("("),o=j()(a,2),s=o[0],c=o[1],l=(c=c.split(")")[0]).split(",").map((function(t){return t.trim()})),u=j()(l,6),h=u[0],p=u[1],d=u[2],f=u[3],v=u[4],y=u[5],g=h.split(" "),m=j()(g,2),b=m[0],k=m[1],x=p.split(" "),w=j()(x,2),S=w[0],P=w[1],O=(y||"").split(" "),$=j()(O,2),C=$[0],E=$[1];n[i]=e.parse({type:s,x:Lo.parse(S),y:Lo.parse(P),width:Lo.parse(b),height:Lo.parse(k),foreColor:Wa(d,r.matches),backColor:Wa(f,r.matches),blendMode:v||"normal",lineWidth:Lo.parse(C||"1px"),lineHeight:Lo.parse(E||"1px")})})),op.set(t,n),n}},{key:"join",value:function(t){return t.map((function(t){return e.parse(t)})).join(" ")}},{key:"toCSS",value:function(t){var n=[];return e.parseStyle(t).forEach((function(t){n.push.apply(n,eu.parseStyle(Qi(t.toCSS())))})),eu.joinCSS(n)}}]),e}(Pc),hp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"base",x:Lo.z(),y:Lo.z(),width:Lo.px(20),height:Lo.px(20),lineWidth:Lo.px(1),lineHeight:Lo.px(1),foreColor:"black",backColor:"white",blendMode:"normal"})}},{key:"convert",value:function(t){return(t=Bs()(So()(e.prototype),"convert",this).call(this,t)).width=Lo.parse(t.width),t.height=Lo.parse(t.height),t.lineWidth=Lo.parse(t.lineWidth),t.lineHeight=Lo.parse(t.lineHeight),t.x=Lo.parse(t.x),t.y=Lo.parse(t.y),t}},{key:"toString",value:function(){var t=this.json,e=t.type,n=t.width,r=t.height,i=t.x,a=t.y,o=t.foreColor,s=t.backColor,c=t.blendMode,l=t.lineWidth,u=t.lineHeight;return"".concat(e,"(").concat(n," ").concat(r,", ").concat(i," ").concat(a,", ").concat(o,", ").concat(s,", ").concat(c,", ").concat(l," ").concat(u,")")}}]),e}(up),pp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"check"})}},{key:"toCSS",value:function(){var t=this.json,e=t.width,n=t.height,r=t.x,i=t.y,a=t.backColor,o=t.foreColor,s=t.blendMode;return a=a||"transparent","\n background-image: repeating-linear-gradient(45deg, ".concat(o=o||"black"," 25%, ").concat(a," 25%, ").concat(a," 75%, ").concat(o," 75%, ").concat(o," 100%),repeating-linear-gradient(45deg, ").concat(o," 25%, ").concat(a," 25%, ").concat(a," 75%, ").concat(o," 75%, ").concat(o," 100%);\n background-position: 0px 0px, ").concat(r," ").concat(i,";\n background-size: ").concat(e," ").concat(n,", ").concat(e," ").concat(n,";\n background-blend-mode: ").concat(s,", ").concat(s,";\n ")}}]),e}(hp),dp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"grid"})}},{key:"toCSS",value:function(){var t=this.json,e=t.width,n=t.height,r=t.lineWidth,i=t.lineHeight,a=t.backColor,o=t.foreColor,s=t.blendMode;return a=a||"transparent","\n background-image: linear-gradient(".concat(o=o||"black"," ").concat(i,", ").concat(a," ").concat(i,"),linear-gradient(to right, ").concat(o," ").concat(r,", ").concat(a," ").concat(r,");\n background-size: ").concat(e.value/2,"px ").concat(n.value/2,"px, ").concat(e.value/2,"px ").concat(n.value/2,"px; \n background-blend-mode: ").concat(s,", ").concat(s,"; \n ")}}]),e}(hp),fp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"dot"})}},{key:"toCSS",value:function(){var t=this.json,e=t.width,n=t.height,r=t.lineWidth,i=(t.lineHeight,t.backColor),a=t.foreColor,o=t.blendMode;return i=i||"transparent","\n background-image: radial-gradient(".concat(a=a||"black"," ").concat(r,", ").concat(i," ").concat(r,");\n background-size: ").concat(e.value/2,"px ").concat(n.value/2,"px; \n background-blend-mode: ").concat(o,"; \n ")}}]),e}(hp),vp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"cross-dot"})}},{key:"toCSS",value:function(){var t=this.json,e=t.width,n=t.height,r=t.x,i=t.y,a=t.lineWidth,o=(t.lineHeight,t.backColor),s=t.foreColor,c=t.blendMode;return o=o||"transparent","\n background-image: radial-gradient(".concat(s=s||"black"," ").concat(a,", ").concat(o," ").concat(a,"),radial-gradient(").concat(s," ").concat(a,", ").concat(o," ").concat(a,");\n background-size: ").concat(e," ").concat(n,",").concat(e," ").concat(n,";\n background-position: 0px 0px, ").concat(r," ").concat(i,"; \n background-blend-mode: multiply, ").concat(c,";\n ")}}]),e}(hp),yp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"diagonal-line"})}},{key:"toCSS",value:function(){var t=this.json,e=t.width,n=t.height,r=t.x,i=t.lineWidth,a=t.backColor,o=t.foreColor,s=t.blendMode;return a=a||"transparent",o=o||"black","\n background-image: repeating-linear-gradient(".concat(r,", ").concat(o," 0, ").concat(o," ").concat(i,", ").concat(a," 0, ").concat(a," 50%);\n background-size: ").concat(e," ").concat(n,"; \n background-blend-mode: ").concat(s,";\n ")}}]),e}(hp),gp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"vertical-line"})}},{key:"toCSS",value:function(){var t=this.json,e=t.width,n=t.height,r=t.x,i=t.y,a=t.lineWidth,o=t.backColor,s=t.foreColor,c=t.blendMode;return o=o||"transparent","\n background-image: repeating-linear-gradient(to right, ".concat(s=s||"black"," 0px, ").concat(s," ").concat(a,", ").concat(o," ").concat(a,", ").concat(o," 100%);\n background-size: ").concat(e," ").concat(n,"; \n background-position: ").concat(r," ").concat(i,"; \n background-blend-mode: ").concat(c,";\n ")}}]),e}(hp),mp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"horizontal-line"})}},{key:"toCSS",value:function(){var t=this.json,e=t.width,n=t.height,r=t.x,i=t.y,a=t.lineWidth,o=t.backColor,s=t.foreColor,c=t.blendMode;return o=o||"transparent","\n background-image: repeating-linear-gradient(0deg, ".concat(s=s||"black"," 0px, ").concat(s," ").concat(a,", ").concat(o," ").concat(a,", ").concat(o," 100%); \n background-position: ").concat(r," ").concat(i,";\n background-size: ").concat(e," ").concat(n,"; \n background-blend-mode: ").concat(c,";\n ")}}]),e}(hp),bp={check:pp,grid:dp,dot:fp,"cross-dot":vp,"diagonal-line":yp,"vertical-line":gp,"horizontal-line":mp},kp={CheckPattern:pp,GridPattern:dp,DotPattern:fp,CrossDotPattern:vp,DiagonalLinePattern:yp,VerticalLinePattern:gp,HorizontalLinePattern:mp};function xp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wp(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:[],n={};return e.filter((function(e){return Ii(t[e])})).forEach((function(e){n[e]=t[e]})),n}},{key:"toDefaultCSS",value:function(t){var e={};return t.isAbsolute&&(t.x&&(e.left=t.x),t.y&&(e.top=t.y)),e.visibility=t.visible?"visible":"hidden",wp({},e,{},this.toKeyListCSS(t,["position","width","height","overflow","z-index","box-sizing","background-color","color","opacity","mix-blend-mode","transform-origin","transform-style","perspective","perspective-origin","font-size","font-stretch","line-height","font-weight","font-family","font-style","text-align","text-transform","text-decoration","letter-spacing","word-spacing","text-indent","border-radius","filter","backdrop-filter","box-shadow","text-shadow","offset-path","animation","transition"]))}},{key:"toVariableCSS",value:function(t){var e={};return t.variable.split(";").filter((function(t){return t.trim()})).forEach((function(t){var n=t.split(":"),r=j()(n,2),i=r[0],a=r[1];e["--".concat(i)]=a})),e}},{key:"toRootVariableCSS",value:function(t){var e={};return t.rootVariable.split(";").filter((function(t){return t.trim()})).forEach((function(t){var n=t.split(":"),r=j()(n,2),i=r[0],a=r[1];e["--".concat(i)]=a})),e}},{key:"toRootVariableString",value:function(t){return Ji(this.toRootVariableCSS(t))}},{key:"toWebkitCSS",value:function(t){var e={};return Pp.forEach((function(n){e["-webkit-".concat(n)]=t[n]})),e}},{key:"toTextClipCSS",value:function(t){var e={};return"text"===t["text-clip"]&&(e["-webkit-background-clip"]="text",e["-webkit-text-fill-color"]="transparent",e.color="transparent"),e}},{key:"toTransformCSS",value:function(t){if("0deg"===t.rotate&&""===t.transform)return Sp;if(0===t.rotate.value&&""===t.transform)return Sp;var e=[t.transform,t.rotate].join(":::");e!=this._transformCacheKey&&(this._transformCache=Ec.rotate(t.transform,t.rotate),this._transformCacheKey=e);var n={transform:this._transformCache};return"rotate(0deg)"===n.transform&&delete n.transform,n}},{key:"toDefInnerString",value:function(t){return"\n ".concat(this.toClipPath(t),"\n ").trim()}},{key:"toClipPath",value:function(t){if(""===t["clip-path"])return"";var e=Du.parseStyle(t["clip-path"]),n=e.value;switch(e.type){case"path":return'');case"svg":return'').concat(n,"")}return""}},{key:"toClipPathCSS",value:function(t){var e=t["clip-path"];if(!1===Boolean(e))return null;switch(Du.parseStyle(e).type){case"path":case"svg":e="url(#".concat(this.clipPathId(t),")")}return{"clip-path":e}}},{key:"innerSVGId",value:function(t){return t.id+"inner-svg"}},{key:"clipPathId",value:function(t){return t.id+"clip-path"}},{key:"toDefString",value:function(t){var e=this.toDefInnerString(t);return e?"\n \n \n ').concat(e,"\n \n \n "):""}},{key:"toSelectorString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.selectors.map((function(t){return t.toString(e)})).join("\n\n")}},{key:"generateView",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="\n ".concat(e," { /* ").concat(t.itemType," */\n ").concat(Ji(this.toCSS(t),"\n "),"; \n ").concat(n,"\n }\n ").concat(this.toNestedCSS(t).map((function(t){return"".concat(e," ").concat(t.selector," { \n ").concat(t.cssText?t.cssText:Ji(t.css||{},"\n\t\t"),"; \n }")})).join("\n"),"\n ").concat(this.toSelectorString(t,e),"\n ");return r}},{key:"toCSS",value:function(t){return Object.assign({},this.toVariableCSS(t),this.toDefaultCSS(t),this.toClipPathCSS(t),this.toWebkitCSS(t),this.toTextClipCSS(t),this.toBoxModelCSS(t),this.toBorderCSS(t),this.toBackgroundImageCSS(t),this.toLayoutCSS(t),this.toTransformCSS(t),this.toLayoutItemCSS(t))}},{key:"toStyle",value:function(t,e){var n=this.generateView(t,".element-item[data-id='".concat(t.id,"']"));return("\n \n ")+t.layers.map((function(t){return e.toStyle(t,e)})).join(""))}},{key:"render",value:function(t,e){var n=t.elementType,r=t.id,i=t.name,a=t.itemType,o=n||"div";return" \n <".concat(o,' class="').concat(ea(S()({"element-item":!0},a,!0)),'" ').concat(ta({"data-id":r,"data-title":i}),">\n ").concat(this.toDefString(t),"\n ").concat(t.layers.map((function(t){return e.render(t,e)})).join("\n\t"),"\n \n ")}},{key:"renderSVG",value:function(t,e){}},{key:"toNestedCSS",value:function(t){return[]}},{key:"update",value:function(t,e){var n=e.el.$svg;if(n||(e.el.$svg=e.$('[data-id="'.concat(this.innerSVGId(t),'"]')),n=e.el.$svg),n){var r=this.toDefInnerString(t);if(r)n.$("defs").html(r)}else{var i=this.toDefString(t);if(i){var a=Ro.createByHTML(i);a&&e.prepend(a)}}}}]),e}(function(){function t(){go()(this,t)}return bo()(t,[{key:"getInnerId",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.id+e}}]),t}());function Op(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $p(t){for(var e=1;e\n ').concat(this.toDefString(t),"\n ").concat(Bi(e)&&e(),"\n \n "))}},{key:"render",value:function(t,e){var n=t.width,r=t.height,i=t.elementType||"div",a=this.toCSS(t);return this.wrappedRender(t,(function(){return'\n \n <').concat(i,' xmlns="http://www.w3.org/1999/xhtml" style="').concat(Ji(a),';width:100%;height:100%;">\n \n ").concat(t.layers.map((function(t){return e.render(t,e)})).join(""),"\n ")}))}}]),e}(jp),Ep=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"toCSS",value:function(t){var e=Object.assign({},this.toDefaultCSS(t),this.toClipPathCSS(t),this.toWebkitCSS(t),this.toTextClipCSS(t),this.toBackgroundImageCSS(t));return delete e.left,delete e.top,delete e.width,delete e.height,delete e.position,e}},{key:"render",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=(t.x,t.y,t.width),i=t.height,a=this.toCSS(t);return"\n".concat(n?'':"",'\n\n ').concat(this.toDefString(t),"\n ").concat(t.layers.map((function(t){return e.render(t,e)})).join(""),"\n \n ")}}]),e}(Cp),Tp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),e}(Cp),Vp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),e}(Tp),Mp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getUrl",value:function(t){var e=t.src;return t.project.getImageValueById(e)}},{key:"render",value:function(t){var e=this,n=t.width,r=t.height,i=this.toCSS(t);return this.wrappedRender(t,(function(){return'\n \n
\n \n
\n \n ')}))}},{key:"update",value:function(t,n){var r=n.$("img");r&&r.attr("src",this.getUrl(t)),Bs()(So()(e.prototype),"update",this).call(this,t,n)}}]),e}(Tp),Dp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"render",value:function(t,e){return t.artboards.map((function(t){return e.render(t,e)}))}}]),e}(Cp),Ip=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),e}(Tp),Lp=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"toString",value:function(){return""}},{key:"toSVGString",value:function(t){return""}},{key:"toFillValue",value:function(t){return""}}]),e}(wl);function Rp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ap(t){for(var e=1;e\n ').concat(this.colorsteps.map((function(t){return'')})).join("\n"),"\n \n "))}},{key:"toFillValue",value:function(t){return"url(#".concat(t,")")}}],[{key:"toLinearGradient",value:function(t){return 0===t.length?"none":new LinearGradient({angle:"to right",colorsteps:t})+""}},{key:"parse",value:function(t){var n=_a(t),r={},i=[];return n.str.split("(")[1].split(")")[0].split(",").map((function(t){return t.trim()})).forEach((function(t,e){if(t.includes("@"))t=Wa(t,n.matches),i.push.apply(i,ml.parse(t));else{var a=t.split(" "),o=j()(a,5),s=o[0],c=o[1],l=o[2],u=o[3],h=o[4];r.x1=Lo.parse(s),r.y1=Lo.parse(c),r.x2=Lo.parse(l),r.y2=Lo.parse(u),r.spreadMethod=h||"pad"}})),new e(Ap({},r,{colorsteps:i}))}}]),e}(Lp);function Fp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Bp(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,Bp({type:"radial-gradient",cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",fr:"0%",spreadMethod:"pad"},t))}},{key:"toCloneObject",value:function(){return Bp({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("cx","cy","r","fx","fy","fr","spreadMethod"))}},{key:"toString",value:function(){if(0===this.colorsteps.length)return"";var t=this.getColorString(),e=this.json,n=[e.cx,e.cy,e.r,e.fx,e.fy,e.fr,e.spreadMethod].join(" ");return"".concat(this.json.type,"(").concat(n,", ").concat(t,")")}},{key:"toSVGString",value:function(t){var e=this.json,n=e.cx,r=e.cy,i=e.r,a=e.fx,o=e.fy,s=e.fr,c=e.spreadMethod;return("\n\n ").concat(this.colorsteps.map((function(t){return'')})).join("\n"),"\n\n"))}},{key:"toFillValue",value:function(t){return"url(#".concat(t,")")}}],[{key:"parse",value:function(t){var n=_a(t),r={},i=[];return n.str.split("(")[1].split(")")[0].split(",").map((function(t){return t.trim()})).forEach((function(t,e){if(t.includes("@"))t=Wa(t,n.matches),i.push.apply(i,ml.parse(t));else{var a=t.split(" "),o=j()(a,7),s=o[0],c=o[1],l=o[2],u=o[3],h=o[4],p=o[5],d=o[6];r.cx=s,r.cy=c,r.r=l,r.fx=u,r.fy=h,r.fr=p,r.spreadMethod=d||"pad"}})),new e(Bp({},r,{colorsteps:i}))}}]),e}(Lp);function Hp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Np=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getDefaultObject",value:function(){return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,{type:"static-gradient",static:!0,colorsteps:[new ml({color:"red",percent:0,index:0}),new ml({color:"red",percent:100,index:1})]})}},{key:"toCloneObject",value:function(){return function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"transparent";return new e({colorsteps:[new ml({color:t,percent:0,index:0}),new ml({color:t,percent:100,index:0})]})}}]),e}(Lp);function Xp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Yp(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return Bs()(So()(e.prototype),"getDefaultObject",this).call(this,Yp({type:"url",url:"",datauri:"",patternUnits:"userSpaceOnUse",patternWidth:"100%",patternHeight:"100%",imageX:"0%",imageY:"0%",imageWidth:"100%",imageHeight:"100%"},t))}},{key:"toCloneObject",value:function(){return Yp({},Bs()(So()(e.prototype),"toCloneObject",this).call(this),{},this.attrs("url","datauri","patternUnits","patternWidth","patternHeight","imageX","imageY","imageWidth","imageHeight"))}},{key:"isUrl",value:function(){return!0}},{key:"toString",value:function(){var t=this.json,e=t.patternUnits,n=t.patternWidth,r=t.patternHeight,i=t.imageX,a=t.imageY,o=t.imageWidth,s=t.imageHeight,c=t.url,l=[e,n,r,i,a,o,s].join(",").trim();return"url(".concat(c,"#").concat(l,")")}},{key:"toSVGString",value:function(t){var e=this.json,n=e.patternUnits,r=e.patternWidth,i=e.patternHeight,a=e.imageX,o=e.imageY,s=e.imageWidth,c=e.imageHeight;return("\n \n \n \n "))}},{key:"toFillValue",value:function(t){return"url(#".concat(t,")")}}],[{key:"parse",value:function(t){var n=t.split("(")[1].split(")")[0].trim().split("#"),r=j()(n,2),i=r[0],a=r[1];if(!a)return new e({url:i});var o=a.split(","),s=j()(o,7);return new e({patternUnits:s[0],patternWidth:s[1],patternHeight:s[2],imageX:s[3],imageY:s[4],imageWidth:s[5],imageHeight:s[6],url:i})}},{key:"isImageFile",value:function(t){return _p.includes(t)}}]),e}(fl);function Wp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Up(t){for(var e=1;e\n ".concat(e,"\n \n "))}},{key:"fillId",value:function(t){return this.getInnerId(t,"fill")}},{key:"strokeId",value:function(t){return this.getInnerId(t,"stroke")}},{key:"toFillSVG",value:function(t){return qp.parseImage(t.fill||"transparent").toSVGString(this.fillId(t))}},{key:"toStrokeSVG",value:function(t){return qp.parseImage(t.stroke||"black").toSVGString(this.strokeId(t))}},{key:"toFillValue",value:function(t){return qp.parseImage(t.fill||"transparent").toFillValue(this.fillId(t))}},{key:"toFillOpacityValue",value:function(t){return po.parse(t.fill||"transparent").a}},{key:"toStrokeValue",value:function(t){return qp.parseImage(t.stroke||"black").toFillValue(this.strokeId(t))}},{key:"toFilterValue",value:function(t){return t.svgfilter?"url(#".concat(t.svgfilter,")"):""}},{key:"toLayoutCSS",value:function(t){return{}}}]),e}(Tp);function Qp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var td=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"update",value:function(t,e){if(e){var n=e.$("path");n&&(n.setAttr({d:t.d,filter:this.toFilterValue(t),fill:this.toFillValue(t),stroke:this.toStrokeValue(t)}),t.totalLength=n.totalLength),this.updateDefString(t,e)}}},{key:"render",value:function(t){var e=this,n=t.d;return this.wrappedRender(t,(function(){return"\n \n ")}))}}]),e}(Jp);function ed(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var nd=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"update",value:function(t,e){var n=e.$("path");n&&n.attr("d",t.d);var r=e.$("textPath");r&&(r.text(t.text),r.setAttr({filter:this.toFilterValue(t),fill:this.toFillValue(t),stroke:this.toStrokeValue(t),textLength:t.textLength,lengthAdjust:t.lengthAdjust,startOffset:t.startOffset})),this.updateDefString(t,e),t.totalLength=n.totalLength}},{key:"toDefInnerString",value:function(t){return"\n ".concat(this.toPathSVG(t),"\n ").concat(this.toFillSVG(t),"\n ").concat(this.toStrokeSVG(t),"\n ")}},{key:"toPathId",value:function(t){return this.getInnerId(t,"path")}},{key:"toPathSVG",value:function(t){return'\n \n ')}},{key:"render",value:function(t){var e=this;return this.wrappedRender(t,(function(){var n=t.textLength,r=t.lengthAdjust,i=t.startOffset;return("\n ").concat(t.text,"\n "))}))}}]),e}(Jp);function rd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var id=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"update",value:function(t,e){var n=e.$("text");n&&(n.text(t.text),n.setAttr({filter:this.toFilterValue(t),fill:this.toFillValue(t),stroke:this.toStrokeValue(t),textLength:t.textLength,lengthAdjust:t.lengthAdjust})),this.updateDefString(t,e)}},{key:"shapeInsideId",value:function(t){return this.getInnerId(t,"shape-inside")}},{key:"render",value:function(t){var e=this,n=(t.id,t.textLength),r=t.lengthAdjust;return this.wrappedRender(t,(function(){return"\n ").concat(t.text,"\n ")}))}}]),e}(Jp),ad=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"toCSS",value:function(t){var n=Bs()(So()(e.prototype),"toCSS",this).call(this,t);return n.margin=n.margin||"0px",n}},{key:"render",value:function(t){var e=t.content,n=t.width,r=t.height,i=this.toCSS(t);return this.wrappedRender(t,(function(){return'\n \n

').concat(e,"

\n
\n ")}))}},{key:"update",value:function(t,e){var n=t.content;e.updateDiff(n)}}]),e}(Tp),od=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"getUrl",value:function(t){var e=t.src;return t.project.getVideoValueById(e)}},{key:"render",value:function(t,e){var n=this,r=t.width,i=t.height,a=t.controls,o=t.muted,s=t.poster,c=t.loop,l=t.crossorigin,u=t.autoplay,h=this.toCSS(t);return this.wrappedRender(t,(function(){return'\n \n \n \n ')}))}}]),e}(Tp),sd={project:new Dp,artboard:new Ep,rect:new Ip,circle:new Vp,image:new Mp,video:new od,text:new ad,"svg-path":new td,"svg-text":new id,"svg-textpath":new nd},cd={render:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=sd[t.itemType];return r?r.render(t,e||this,n):""},toCSS:function(t){var e=sd[t.itemType];if(e)return e.toCSS(t)},toTransformCSS:function(t){var e=sd[t.itemType];if(e)return e.toTransformCSS(t)},toStyle:function(t,e){var n=sd[t.itemType];if(n)return n.toStyle(t,e||this)},update:function(t,e){var n=sd[t.itemType];if(n)return n.update(t,e)},codeview:function(t){if(!t)return"";var e=this.render(t);return e=e.replace(/\/g,">"),"\n
\n ".concat(e&&"
".concat(e,"
"),"\n
\n ")}},ld=function(){function t(e,n){go()(this,t),this.project=e,this.artboard=n}return bo()(t,[{key:"generateCode",value:function(){var t=this,e=this.project.getSelectedTimelineLastTime(),n=this.project.getSelectedTimeline(),r=[],i={};n&&(n.animations.forEach((function(e){var n=t.project.searchById(e.id),i=e.properties.map((function(t){var e=t.property;switch(e){case"x":e="left";break;case"y":e="top"}return{property:e,keyframes:t.keyframes.map((function(t){return{time:1e3*t.time,value:t.value,timing:t.timing}}))}}));r.push.apply(r,n.toAnimationKeyframes(i).filter((function(t){return t.properties.length})))})),i={duration:1e3*e,iterationCount:n.iterationCount,fps:n.fps,speed:n.speed,direction:n.direction});return r=JSON.stringify(r,null,4),i=JSON.stringify(i,null,4),"\nvar player = new anipa.Player(".concat(r,", ").concat(i,");\nplayer.play();\n")}}]),t}(),ud=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"anipa";switch(n){case"anipa":return new ld(t,e).generateCode()}return""},hd={makeProjectStyle:function(t){var e=t.toKeyframeString(),n=t.toRootVariableCSS();return"\n :root {\n ".concat(Ji(n),"\n }\n /* keyframe */\n ").concat(e,"\n ")},makeStyle:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.is("project"))return this.makeProjectStyle(t);var r=t.generateView("[data-id='".concat(t.id,"']"),n);return"\n ".concat(r,"\n ")+t.layers.map((function(t){return e.makeStyle(t)})).join("")},makeSvg:function(t){var e=t.toSVGString?t.toSVGString():"";return"\n ".concat(e?''.concat(e,""):"","\n ")},generate:function(t){var e=t.selection.currentProject,n=t.selection.current,r="".concat(this.makeStyle(e)),i="\n".concat(artboard.html,"\n").concat(this.makeSvg(e),"\n "),a="";return i=t.replaceLocalUrltoRealUrl(i),r=t.replaceLocalUrltoRealUrl(r),n.is("artboard")&&(a=t.replaceLocalUrltoRealUrl(ud(n,"anipa"))),{html:i,css:r,js:a}},generateSVG:function(t,e){return t.replaceLocalUrltoRealUrl(cd.render(e,null,!0))}},pd={command:"downloadSVG",execute:function(t){var e=t.selection.current;if(e){var n=hd.generateSVG(t,e).trim();rp("data:image/svg+xml;base64,"+window.btoa(n),e.id)}}};function dd(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"image/png",r=Ro.create("canvas"),i=t.width,a=t.height;r.resize({width:i,height:a}),r.drawImage(t),e&&e(r.toDataURL(n))}var fd={command:"downloadPNG",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.selection.current;if(n){var r=hd.generateSVG(t,n).trim(),i="data:image/svg+xml;base64,"+window.btoa(r),a=n.id;Hh({local:i},(function(n,r){dd(r,(function(n){rp(n,a),e&&t.emit(e,n)}))}))}}},vd={command:"load.json",execute:function(t,e){0===(e=e||t.loadResource("projects",[])).length&&(e=[{itemType:"project",layers:[{itemType:"artboard",name:"New ArtBoard",x:"300px",y:"200px",width:"375px",height:"667px","background-color":"white",layer:[]}]}]);var n=e.map((function(e){return t.createItem(e)}));if(n.forEach((function(t){t.artboards.forEach((function(e){t.selectTimeline(e.id)}))})),n.length){var r=n[0];t.selection.selectProject(r),t.load(n),Mh(t),t.nextTick((function(){t.emit("reloadProject")}))}}};function yd(t,e){var n=t.selection.currentProject;if(n){var r=n.getSelectedTimeline();e&&e(n,r)}}var gd={command:"addTimelineProperty",execute:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{timing:"linear"};yd(t,(function(r,i){var a;!1===Li(e)&&(e=[e]);var o=[];e.forEach((function(t){var e={layerId:t,property:n.property,value:n.value+"",timing:n.timing,editor:n.editor},i=r.addTimelineKeyframe(e);i&&o.push(i)})),(a=t.timeline).select.apply(a,o),t.emit("refreshTimeline"),t.emit("refreshSelectedOffset")}))}},md={command:"setTimelineOffset",debounce:100,execute:function(t,e){yd(t,(function(n,r){n.setTimelineKeyframeOffsetValue(e.layerId,e.property,e.id,e.value,e.timing,e.time),t.emit("refreshTimeline")}))}},bd={command:"addTimelineCurrentProperty",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timing:"linear"};yd(t,(function(n,r){var i,a=[];t.selection.each((function(t){var r={layerId:t.id,property:e.property,value:t[e.property]+"",timing:e.timing,editor:e.editor},i=n.addTimelineKeyframe(r);i&&a.push(i)})),(i=t.timeline).select.apply(i,a),t.emit("refreshTimeline"),t.emit("refreshSelectedOffset")}))}},kd={command:"removeTimelineProperty",execute:function(t,e,n){yd(t,(function(r,i){r.removeTimelineProperty(e,n),t.timeline.empty(),t.emit("refreshTimeline"),t.emit("refreshSelectedOffset")}))}},xd={command:"deleteTimelineKeyframe",execute:function(t){yd(t,(function(e,n){t.timeline.each((function(t){e.deleteTimelineKeyframe(t.layerId,t.property,t.id)})),t.timeline.empty(),t.emit("refreshTimeline"),t.emit("refreshSelectedOffset")}))}},wd={command:"selectTimelineItem",execute:function(t,e){yd(t,(function(n,r){n.selectTimeline(e),t.emit("refreshTimeline"),t.emit("selectTimeline")}))}},Sd={command:"removeTimeline",execute:function(t,e){yd(t,(function(n,r){n.removeTimeline(e),t.timeline.empty(),t.emit("refreshTimeline"),t.emit("refreshSelectedOffset")}))}},Pd={command:"removeAnimationItem",execute:function(t,e){yd(t,(function(n,r){n.removeAnimation(e),t.timeline.empty(),t.emit("refreshTimeline"),t.emit("removeAnimation")}))}},jd={command:"addTimelineKeyframe",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timing:"linear"};yd(t,(function(n,r){var i=n.searchById(e.layerId),a={layerId:e.layerId,property:e.property,time:e.time,value:i[e.property]+"",timing:e.timing,editor:e.editor},o=n.addTimelineKeyframe(a);t.timeline.select(o),t.emit("refreshTimeline"),t.emit("refreshSelectedOffset")}))}},Od={command:"copyTimelineProperty",execute:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;yd(t,(function(i,a){i.copyTimelineKeyframe(e,n,r),t.emit("refreshTimeline")}))}},$d={command:"playTimelineItem",description:"Play button action",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"normal";t.selection.empty(),t.emit("refreshSelection"),t.changeMode("play"),t.emit("afterChangeMode"),yd(t,(function(i,a){var o=i.getSelectedTimelineLastTime();t.timer?t.timer.stop():t.timer=Hc({elapsed:1e3*a.currentTime,speed:e,duration:1e3*o,iterationCount:n,direction:r}),t.timer.play({duration:1e3*o,elapsed:1e3*a.currentTime,speed:e,iterationCount:n,direction:r,tick:function(e,n){i.seek(Bc(a.fps,e/1e3)),t.emit("playTimeline")},last:function(e,n){i.seek(Bc(a.fps,e/1e3)),t.emit("playTimeline"),t.nextTick((function(){t.emit("stopTimeline"),t.changeMode("SELECTION"),t.emit("afterChangeMode")}))},stop:function(e,n){i.stop(Bc(a.fps,e/1e3)),t.emit("stopTimeline"),t.changeMode("SELECTION"),t.emit("afterChangeMode")}})}))}},Cd={command:"prevTimelineItem",execute:function(t){yd(t,(function(e,n){var r=e.getSelectedTimelinePrevTime();e.setTimelineCurrentTime(Bc(n.fps,r)),e.seek(),t.emit("playTimeline"),t.changeMode("SELECTION"),t.emit("afterChangeMode")}))}},Ed={command:"firstTimelineItem",execute:function(t){yd(t,(function(e,n){var r=e.getSelectedTimelineFirstTime();e.setTimelineCurrentTime(Bc(n.fps,r)),e.seek(),t.emit("playTimeline"),t.changeMode("SELECTION"),t.emit("afterChangeMode")}))}},Td={command:"nextTimelineItem",execute:function(t){yd(t,(function(e,n){var r=e.getSelectedTimelineNextTime();e.setTimelineCurrentTime(Bc(n.fps,r)),e.seek(),t.emit("playTimeline"),t.changeMode("SELECTION"),t.emit("afterChangeMode")}))}},Vd={command:"lastTimelineItem",execute:function(t){yd(t,(function(e,n){var r=e.getSelectedTimelineLastTime();e.setTimelineCurrentTime(Bc(n.fps,r)),e.seek(),t.emit("playTimeline"),t.changeMode("SELECTION"),t.emit("afterChangeMode")}))}},Md={command:"addTimelineItem",execute:function(t,e){yd(t,(function(n,r){e?n.addTimelineLayer(e):n.addTimeline(),t.emit("refreshTimeline"),t.emit("addTimeline")}))}},Dd={command:"drop.asset",execute:function(t,e){var n,r,i=arguments;return Hs.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(n=i.length>2&&void 0!==i[2]?i[2]:null,!e.color){a.next=5;break}t.emit("addBackgroundColor",e.color,n),a.next=22;break;case 5:if(!e.gradient){a.next=9;break}t.emit("addBackgroundImageGradient",e.gradient,n),a.next=22;break;case 9:if(!e.pattern){a.next=13;break}t.emit("addBackgroundImagePattern",e.pattern,n),a.next=22;break;case 13:if(!e.imageUrl){a.next=17;break}t.emit("addBackgroundImageAsset",e.imageUrl,n),a.next=22;break;case 17:if(!e.artboard){a.next=22;break}return a.next=20,Hs.a.awrap(t.storageManager.getArtBoard(e.artboard.id));case 20:(r=a.sent)&&t.emit("addArtBoard",r,e.artboard.center);case 22:Mh(t);case 23:case"end":return a.stop()}}))}},Id={command:"addBackgroundImageGradient",execute:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.selection.itemsByIds(n),i={};r.forEach((function(t){var n=eu.parseStyle(Qi(t["background-image"]));n.unshift(new eu({image:eu.parseImage(e)})),i[t.id]={"background-image":eu.join(n)}})),t.emit("history.setAttributeForMulti","add gradient",i)}},Ld={command:"addBackgroundImageAsset",execute:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.selection.itemsByIds(n),i={};r.forEach((function(t){var n=eu.parseStyle(Qi(t["background-image"]));n.unshift(new eu({image:new Cl({url:e})})),i[t.id]={"background-image":eu.join(n)}})),t.emit("history.setAttributeForMulti","add background image",i)}},Rd={command:"removeLayer",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;t.selection.itemsByIds(e||t.selection.ids).forEach((function(t){t.remove()})),t.selection.empty(),t.nextTick((function(){t.emit("refreshAll")}))}},Ad={command:"change.mode.view",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CanvasView";t.changeModeView(e)}},zd={command:"segment.move.down",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dy:1},n=+e.dy;t.emit("moveSegment",0,n)}},Fd={command:"segment.move.up",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dy:1},n=+e.dy;t.emit("moveSegment",0,-1*n)}},Bd={command:"segment.move.right",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dx:1},n=+e.dx;t.emit("moveSegment",n,0)}},Gd={command:"segment.move.left",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dx:1},n=+e.dx;t.emit("moveSegment",-1*n,0)}},Hd={command:"toggle.fullscreen",execute:function(t,e){Ro.body().fullscreen()}},Nd={command:"addBackgroundImagePattern",execute:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.selection.itemsByIds(n),i={};r.forEach((function(t){i[t.id]={pattern:up.join([].concat(E()(up.parseStyle(e)),E()(up.parseStyle(t.pattern))))}})),t.emit("history.setAttributeForMulti","add pattern",i)}},Xd={command:"addBackgroundColor",execute:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.selection.itemsByIds(n),i={};r.forEach((function(t){i[t.id]={"background-color":e}})),t.emit("history.setAttributeForMulti","add background color",i)}};var Yd={command:"sort.center",execute:function(t){if(t.selection.isOne){var e=t.selection.current;if(e.parent.is("project"));else if(e.artboard){var n=Or(e.artboard.verties())-Or(t.selection.verties);t.emit("moveLayer",n,0)}}else if(t.selection.isMany){var r=Or(t.selection.verties);t.emit("moveLayerForItems",t.selection.map((function(t){var e=Or(t.verties());return{item:t,dist:[r-e,0,0]}})))}}},_d={command:"sort.left",execute:function(t){if(t.selection.isOne){var e=t.selection.current;if(e.parent.is("project"));else if(e.artboard){var n=jr(e.artboard.verties())-jr(t.selection.verties);t.emit("moveLayer",n,0)}}else if(t.selection.isMany){var r=jr(t.selection.verties);t.emit("moveLayerForItems",t.selection.map((function(t){var e=jr(t.verties());return{item:t,dist:[r-e,0,0]}})))}}},Kd={command:"sort.bottom",execute:function(t){if(t.selection.isOne){var e=t.selection.current;if(e.parent.is("project"));else if(e.artboard){var n=Pr(e.artboard.verties())-Pr(t.selection.verties);t.emit("moveLayer",0,n)}}else if(t.selection.isMany){var r=Pr(t.selection.verties);t.emit("moveLayerForItems",t.selection.map((function(t){var e=Pr(t.verties());return{item:t,dist:[0,r-e,0,0]}})))}}},Wd={command:"sort.top",execute:function(t){if(t.selection.isOne){var e=t.selection.current;if(e.parent.is("project"));else if(e.artboard){var n=$r(e.artboard.verties())-$r(t.selection.verties);t.emit("moveLayer",0,n)}}else if(t.selection.isMany){var r=$r(t.selection.verties);t.emit("moveLayerForItems",t.selection.map((function(t){var e=$r(t.verties());return{item:t,dist:[0,r-e,0,0]}})))}}},Ud={command:"sort.right",execute:function(t){if(t.selection.isOne){var e=t.selection.current;if(e.parent.is("project"));else if(e.artboard){var n=Sr(e.artboard.verties())-Sr(t.selection.verties);t.emit("moveLayer",n,0)}}else if(t.selection.isMany){var r=Sr(t.selection.verties);t.emit("moveLayerForItems",t.selection.map((function(t){var e=Sr(t.verties());return{item:t,dist:[r-e,0,0]}})))}}};function Zd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function qd(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter((function(e){var n=0;return e.path.forEach((function(e){n+=t.filter((function(t){return t.id===e.id})).length?1:0})),1===n}))}var Jd,Qd={command:"updatePathItem",description:"Update path string for selected svg path item",execute:function(t,e){var n=t.selection.current;if(n)if("box"===e.box){var r=n.invertPath(e.d);t.emit("setAttribute",{d:r.d})}else{var i=n.invertPath(e.d),o=i.getBBox(),s=n.offsetX.value+o[0][0],c=n.offsetY.value+o[0][1],l=a.distance(o[1],o[0]),u=a.distance(o[3],o[0]);i.translate(-o[0][0],-o[0][1]),t.emit("setAttribute",{d:i.d,x:Lo.px(s),y:Lo.px(c),width:Lo.px(l),height:Lo.px(u)})}}},tf=(Jd={refreshCursor:{command:"refreshCursor",execute:function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i3&&void 0!==arguments[3]?arguments[3]:{},a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5?arguments[5]:void 0;t.emit("addLayer",n,i,a,o),t.nextTick((function(){t.history.add(e,r,{currentValues:[n,{},a,n.parent],undoValues:[n.id]})})),t.nextTick((function(){t.history.saveSelection()}))},redo:function(t,e){var n=e.currentValues;t.emit.apply(t,["addLayer"].concat(E()(n))),t.nextTick((function(){t.emit("refreshAll")}))},undo:function(t,e){var n=e.undoValues;t.selection.itemsByIds(n).forEach((function(t){t&&t.remove()})),t.nextTick((function(){t.emit("refreshAll")}))}},historyRemoveLayer:{command:"history.removeLayer",description:"remove layer",execute:function(t,e,n){var r=t.selection.itemsByIds(n||t.selection.ids),i=(r=qd(r)).map((function(t){return t.id})),a=t.serialize(r);r.forEach((function(t){return t.remove()})),t.history.add(e,this,{currentValues:[i],undoValues:a}),t.nextTick((function(){t.selection.removeById(r.map((function(t){return t.id}))),t.emit("refreshAll"),t.emit("removeGuideLine"),t.nextTick((function(){t.history.saveSelection()}))}))},redo:function(t,e){var n=e.currentValues[0],r=t.selection.itemsByIds(n||t.selection.ids);(r=qd(r)).forEach((function(t){return t.remove()})),t.nextTick((function(){t.emit("refreshAll")}))},undo:function(t,e){var n=e.undoValues;t.deserialize(n,!0),t.nextTick((function(){t.emit("refreshAll")}))}},historySetAttribute:{command:"history.setAttribute",execute:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;t.emit("setAttribute",n,r),t.history.add(e,this,{currentValues:[n,r],undoValues:t.history.getUndoValues(n)}),t.nextTick((function(){t.history.saveSelection()}))},redo:function(t,e){var n=e.currentValues;t.emit.apply(t,["setAttribute"].concat(E()(n))),t.nextTick((function(){t.emit("refreshAll")}))},undo:function(t,e){var n=e.undoValues,r=Object.keys(n);t.selection.itemsByIds(r).forEach((function(t){t.reset(n[t.id])})),t.nextTick((function(){t.emit("refreshAll")}))}},historySetAttributeForMulti:{command:"history.setAttributeForMulti",execute:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.emit("setAttributeForMulti",n),t.history.add(e,this,{currentValues:[n],undoValues:t.history.getUndoValuesForMulti(n)}),t.nextTick((function(){t.history.saveSelection()}))},redo:function(t,e){var n=e.currentValues;t.emit.apply(t,["setAttributeForMulti"].concat(E()(n))),t.nextTick((function(){t.selection.reselect(),t.emit("refreshAll")}))},undo:function(t,e){var n=e.undoValues,r=Object.keys(n);t.selection.itemsByIds(r).forEach((function(t){t.reset(n[t.id])})),t.selection.reselect(),t.nextTick((function(){t.emit("refreshAll")}))}},historyRefreshSelection:{command:"history.refreshSelection",description:"save selection in history ",description_ko:"Selection 정보를 갱신하면서 History 에 저장한다",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"selection",n=t.selection.ids,r=t.history.selectedIds;ia(n,r)||(t.history.add(e,this,{currentValues:n,undoValues:r}),this.nextAction(t))},nextAction:function(t){t.nextTick((function(){t.history.saveSelection(),t.emit("refreshSelection"),t.nextTick((function(){t.emit("refreshSelectionTool")}))}))},redo:function(t,e){var n=e.currentValues;t.selection.selectById(n),this.nextAction(t)},undo:function(t,e){var n=e.undoValues;t.selection.selectById(n),this.nextAction(t)}},historyRedo:{command:"history.redo",execute:function(t){t.history.redo()}},historyUndo:{command:"history.undo",execute:function(t){t.history.undo()}},moveLayer:{command:"moveLayer",description:"mova layer by keydown with matrix ",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r={};t.selection.each((function(t){r[t.id]={x:Lo.px(t.offsetX.value+e).round(),y:Lo.px(t.offsetY.value+n).round()}})),t.emit("history.setAttributeForMulti","item move down",r),t.nextTick((function(){t.selection.reselect(),t.emit("refreshAll")}))}},moveLayerForItems:{command:"moveLayerForItems",description:"mova layer by multi items ",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n={};e.forEach((function(t){n[t.item.id]={x:Lo.px(t.item.offsetX.value+t.dist[0]).round(),y:Lo.px(t.item.offsetY.value+t.dist[1]).round()}})),t.emit("history.setAttributeForMulti","item move down",n),t.nextTick((function(){t.selection.reselect(),t.emit("refreshAll")}))}},moveToCenter:{command:"moveToCenter",description:"Move Layer to Center on Viewport",execute:function(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.viewport.moveLayerToCenter(e)}},moveSelectionToCenter:{command:"moveSelectionToCenter",description:"Move selection project or artboards to center on Viewport",execute:function(t){var e=[];e=t.selection.isEmpty?t.selection.currentProject.rectVerties:gc(t.selection.selectedArtboards),t.emit("moveToCenter",e)}},groupItem:{command:"group.item",execute:function(t){if(0!==t.selection.length){var e=t.selection.currentProject;if(e){e.generateListNumber();var n=t.selection.map((function(t){return{depth:t.depth,item:t}}));n.sort((function(t,e){return t.depth===e.depth?t.no>e.no?-1:1:t.depth>e.depth?1:-1}));var r=t.createItem(function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"",n=t.selection.current;if(n){var r=hd.generateSVG(t,n).trim(),i="data:image/svg+xml;base64,"+window.btoa(r);Hh({local:i},(function(n,r){dd(r,(function(n){e&&t.emit(e,n)}))}))}}},downloadPNG:fd,downloadSVG:pd,downloadJSON:ip,updateUriList:np,updateImageAssetItem:Qh,updateVideoAssetItem:tp,addSVGFilterAssetItem:Jh,dropImageUrl:qh,addImageAssetItem:Yh,addVideoAssetItem:Uh,updateImage:Bh,updateVideo:Gh,updateResource:{command:"updateResource",execute:function(t,e){e.forEach((function(e){switch(e.type){case"image/svg+xml":case"image/png":case"image/gif":case"image/jpg":case"image/jpeg":t.emit("updateImage",e);break;case"text/plain":case"text/html":t.emit("addText",{content:e.data});break;case"text/uri-list":t.emit("updateUriList",e)}}))}},fileDropItems:Fh,updateScale:{command:"updateScale",execute:function(t,e){var n=t.viewport.scale;t.viewport.setScale(e),t.emit("updateViewport",e,n)}},showExportView:{command:"showExportView",execute:function(t){t.emit("showExportWindow")}},switchTheme:{command:"switchTheme",execute:function(t,e){t.changeTheme(e),t.emit("changeTheme")}},clipboardPaste:{command:"clipboard.paste",execute:function(t,e){t.selection.length&&(t.selection.paste(),t.emit("refreshAll"))}},clipboardCopy:{command:"clipboard.copy",title:"Copy",description:"Copy",execute:function(t,e){t.selection.copy(10)}},addComponentType:function(t,e){t.changeAddType(e),t.emit("afterChangeMode"),t.emit("addStatusBarMessage","Drag if you want to create ".concat(e," layer"))},addArtBoard:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.selection.currentProject;r||(r=t.add(t.createItem({itemType:"project"})),t.selection.selectProject(r));var i=r.appendChildItem(t.createItem(Ih({itemType:"artboard",x:Lo.px(300),y:Lo.px(200),width:Lo.px(375),height:Lo.px(667)},e)));n&&(i.reset({x:Lo.px(0),y:Lo.px(0)}),i.moveByCenter(n)),t.selection.select(i),Mh(t)},addImage:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t.emit("newComponent","image",e,!0,n)},addVideo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t.emit("newComponent","video",e,!0,n)},addLayer:function(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4?arguments[4]:void 0;r||(r=t.selection.current||t.selection.currentProject),r&&(r.is("project")||r.enableHasChildren()||(r=r.parent),r.appendChildItem(e),n&&t.selection.select(e),Mh(t))},addLayerView:function(t,e){t.selection.empty(),t.emit("refreshSelectionTool"),t.emit("hideAddViewLayer"),"select"===e||("brush"===e?t.emit("showPathDrawEditor"):"path"===e?t.emit("showPathEditor","path"):t.emit("showLayerAppendView",e))},addProject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.add(t.createItem(Rh({itemType:"project"},e)));t.selection.selectProject(n),Mh(t)},convertPath:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.selection.current;if(r)if(r.is("svg-path","svg-brush","svg-textpath")){var i=e;if(n)(a=new Dc(e)).scale(r.width.value/n.width,r.height.value/n.height),i=a.d;t.command("setAttribute","set attribute -d",{d:i},r)}else if(r["clip-path"].includes("path")){var a;i=e;if(n)(a=new Dc(e)).scale(r.width.value/n.width,r.height.value/n.height),i=a.d;t.command("setAttribute","change clip path",{"clip-path":"path(".concat(i,")")},r)}},newComponent:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;e.includes("text")||n["background-color"]||(n["background-color"]="#c4c4c4"),"svg-textpath"===e?n=zh({},n,{text:"Insert a newText","font-size":Lo.parse(n.height),textLength:"100%",d:Xu.makeLine(0,n.height.value,n.width.value,n.height.value)}):"svg-circle"===e?(e="svg-path",n=zh({},n,{"background-color":void 0,fill:"#C4C4C4",d:Xu.makeCircle(0,0,n.width.value,n.height.value)})):"svg-rect"===e?(e="svg-path",n=zh({},n,{"background-color":void 0,fill:"#C4C4C4",d:Xu.makeRect(0,0,n.width.value,n.height.value)})):"text"===e?n=zh({width:Lo.px(300),height:Lo.px(50)},n,{content:"Insert a text","font-size":Lo.px(30)}):"rect"===e?n=zh({},n):"circle"===e?n=zh({},n):"artboard"===e&&(n=zh({},n,{"background-color":"white"})),t.command("addLayer","add layer - ".concat(e),t.createItem(zh({itemType:e},n)),n,r,i),t.changeMode(em),t.emit("afterChangeMode")},refreshElement:function(t,e){t.emit("refreshSelectionStyleView",e),t.emit("refreshElementBoundSize",t.selection.getRootItem(e))},refreshProject:function(t,e){t.emit("refreshStyleView",e,!0)},resizeArtBoard:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.selection.current;if(n&&n.is("artboard")){if(!e.trim())return;var r=e.split("x"),i=j()(r,2),a=i[0],o=i[1];a=Lo.px(+a),o=Lo.px(+o),n.reset({width:a,height:o}),t.selection.select(n),Mh(t)}},setAttribute:Vh,setAttributeForMulti:{command:"setAttributeForMulti",execute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach((function(n){var r=e[n];t.selection.itemsByIds(n).forEach((function(e){Object.keys(r).forEach((function(t){var n=r[t];Bi(n)&&(n=n(e)),e.reset(S()({},t,n))})),e.setCache(),t.emit("refreshElement",e)}))}))}},sortBottom:Kd,sortCenter:Yd,sortLeft:_d,sortMiddle:{command:"sort.middle",execute:function(t){if(t.selection.isOne){var e=t.selection.current;if(e.parent.is("project"));else if(e.artboard){var n=Cr(e.artboard.verties())-Cr(t.selection.verties);t.emit("moveLayer",0,n)}}else if(t.selection.isMany){var r=Cr(t.selection.verties);t.emit("moveLayerForItems",t.selection.map((function(t){var e=Cr(t.verties());return{item:t,dist:[0,r-e,0,0]}})))}}}},S()(Jd,"sortBottom",Kd),S()(Jd,"sortTop",Wd),S()(Jd,"sortRight",Ud),S()(Jd,"sameWidth",{command:"same.width",execute:function(t){if(t.selection.isMany){var e=t.selection.allRect;t.selection.each((function(t){t.setScreenX(e.x.value),t.width.set(e.width.value)}))}}}),S()(Jd,"sameHeight",{command:"same.width",execute:function(t){var e=t.selection.items.length;if(1==e);else if(e>1){var n=t.selection.allRect;t.selection.each((function(t){t.setScreenY(n.y.value),t.height.set(n.height.value)}))}t.emit("resetSelection")}}),S()(Jd,"updatePathItem",Qd),S()(Jd,"updateClipPath",{command:"updateClipPath",description:"update clip-path property ",execute:function(t,e){t.command("setAttribute","change clip-path",{"clip-path":"path(".concat(e.d,")")})}}),Jd),ef=function(){function t(e){go()(this,t),this.$editor=e,this.loadCommands()}return bo()(t,[{key:"loadCommands",value:function(){var t=this;Object.keys(tf).forEach((function(e){Bi(tf[e])?t.registerCommand(e,tf[e]):t.registerCommand(tf[e])}))}},{key:"registerCommand",value:function(t,e){var n=this;if(2===arguments.length){var r=function(){for(var t,r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:"keydown",r=this.checkShortCut(this.makeKeyCodeString(t),this.makeKeyString(t),this.makeCodeString(t));if(r){var i=r.filter((function(t){return t.eventType===n})).filter((function(t){return e.checkWhen(t)}));i.length&&t.preventDefault(),i.forEach((function(t){var n;(n=e.$editor).emit.apply(n,[t.command].concat(E()(t.args)))}))}}}]),t}(),hf=function(){function t(e){go()(this,t),this.editor=e,this.config=new Map,this.initialize()}return bo()(t,[{key:"initialize",value:function(){this.set("canvas.width",1e4),this.set("canvas.height",1e4),this.set("body.move.ms",30),this.set("grid.preview.position",[]),this.set("debug",!1)}},{key:"get",value:function(t){return this.config[t]}},{key:"set",value:function(t,e){this.config[t]!=e&&(this.config[t]=e,this.editor.emit("config:"+t))}},{key:"remove",value:function(t){delete this.config[t],this.editor.emit("config:"+t)}}]),t}(),pf=function(){function t(e){go()(this,t),this.$editor=e,this.currentIndex=-1,this.undoHistories=[],this.redoHistories=[],this.selection={}}return bo()(t,[{key:"createCommand",value:function(t){return this.$editor.isPointerUp?"history.".concat(t):t}},{key:"saveSelection",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selection=this.$editor.selection.toCloneObject()}},{key:"getUndoValues",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};return Object.keys(this.selection).forEach((function(r){n[r]={},Object.keys(e).forEach((function(e){n[r][e]=t.selection[r][e]}))})),n}},{key:"getUndoValuesForMulti",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};return Object.keys(e).forEach((function(r){n[r]={};var i=t.selection[r]||t.$editor.selection.itemsByIds(r)[0],a=e[r];Object.keys(a).forEach((function(t){n[r][t]=i[t]}))})),n}},{key:"add",value:function(t,e,n){var r={message:t,command:e,data:n};return this.undoHistories.push(r),this.currentIndex++,this.undoHistories.length=this.currentIndex+1,this.$editor.emit("refreshHistory"),r}},{key:"map",value:function(t){return[].concat(E()(this.undoHistories.map(t)),["-"],E()(this.redoHistories.map(t))).reverse()}},{key:"undo",value:function(){var t=this;if(!(this.currentIndex<-1)){this.currentIndex--;var e=this.undoHistories.pop();e&&e.command&&e.command.undo(this.$editor,e.data),this.$editor.nextTick((function(){t.$editor.emit("refreshHistory")}))}}},{key:"redo",value:function(){var t=this;if(!(this.currentIndex>this.length)){this.currentIndex<0&&this.currentIndex++;var e=this.undoHistories[this.currentIndex];e&&e.command&&(e.command.redo(this.$editor,e.data),this.$editor.debug(e)),this.$editor.nextTick((function(){t.$editor.emit("refreshHistory")}))}}},{key:"length",get:function(){return this.undoHistories.length}},{key:"selectedIds",get:function(){return Object.keys(this.selection)}}]),t}(),df=function(){function t(e){go()(this,t),this.editor=e,this.codeSet=new Set,this.keyCodeSet=new Set}return bo()(t,[{key:"add",value:function(t,e){!1===this.codeSet.has(t)&&this.codeSet.add(t),!1===this.keyCodeSet.has(e)&&this.keyCodeSet.add(e)}},{key:"remove",value:function(t,e){this.codeSet.delete(t),this.keyCodeSet.delete(e)}},{key:"hasKey",value:function(t){return this.codeSet.has(t)||this.keyCodeSet.has(t)}},{key:"check",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r2&&void 0!==arguments[2]&&arguments[2];this.setTransformOriginWithTranslate(a.add([],this.transformOrigin,[t,e,0])),this.editor.emit("updateViewport")}},{key:"moveLayerToCenter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-.2,n=a.lerp([],t[0],t[2],.5),r=a.dist(t[0],t[1]),i=a.dist(t[0],t[3]),o=a.lerp([],this.verties[0],this.verties[2],.5),s=a.dist(this.verties[0],this.verties[1]),c=a.dist(this.verties[0],this.verties[3]),l=Math.min(s/r,c/i)+e;this.setTranslate(a.add([],this.translate,a.subtract([],o,n))),this.setTransformOrigin(n),this.setScale(this.scale*l),this.editor.emit("updateViewport")}},{key:"applyVertex",value:function(t){return a.transformMat4([],t,this.matrix)}},{key:"applyVertexInverse",value:function(t){return a.transformMat4([],t,this.matrixInverse)}},{key:"applyVerties",value:function(t){return wr(t,this.matrix)}},{key:"applyScaleVerties",value:function(t){return wr(t,this.scaleMatrix)}},{key:"applyVertiesInverse",value:function(t){return wr(t,this.matrixInverse)}},{key:"applyScaleVertiesInverse",value:function(t){return wr(t,this.scaleMatrixInverse)}},{key:"createAreaVerties",value:function(t,e,n,r){return this.applyVertiesInverse(function(t,e,n,r){return vc(t,e,n,r)}(t,e,n,r))}},{key:"pos",get:function(){return[(this.mouse[0]-this.verties[0][0])/(this.verties[2][0]-this.verties[0][0])*100,(this.mouse[1]-this.verties[0][1])/(this.verties[2][1]-this.verties[0][1])*100,0]}},{key:"minX",get:function(){return this.verties[0][0]}},{key:"maxX",get:function(){return this.verties[2][0]}},{key:"minY",get:function(){return this.verties[0][1]}},{key:"maxY",get:function(){return this.verties[2][1]}},{key:"height",get:function(){return this.maxY-this.minY}},{key:"width",get:function(){return this.maxX-this.minX}}]),t}(),vf=function(){function t(){go()(this,t)}return bo()(t,[{key:"render",value:function(t,e){return Hs.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Hs.a.awrap(this.toCloneObject(t,e));case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),null,this)}},{key:"toCloneObject",value:function(t,e){var n,r,i,a;return Hs.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:(n=t.attrs("itemType","elementType","type","visible","lock","selected")).referenceId=t.id,n.newTargetId=Ar(),r=[],i=0,a=t.layers.length;case 5:if(!(i0&&void 0!==i[0]?i[0]:"",!(e=this.editor.selection.current)){a.next=13;break}return a.next=5,Hs.a.awrap(this.getArtboardList());case 5:return n=a.sent,a.next=8,Hs.a.awrap(iv.render(e));case 8:return(r=a.sent).x="0px",r.y="0px",a.next=13,Hs.a.awrap(this.setArtboardList([].concat(E()(n),[{id:Ar(),preview:t,artboard:r}])));case 13:case"end":return a.stop()}}),null,this)}},{key:"removeArtboard",value:function(t){var e;return Hs.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Hs.a.awrap(this.getArtboardList());case 2:return e=n.sent,n.next=5,Hs.a.awrap(this.setArtboardList(e.filter((function(e){return e.id!==t}))));case 5:case"end":return n.stop()}}),null,this)}}]),t}();function ov(t,e){var n=Object.assign({width:24,height:24},e);return('\n ').concat(t,""))}var sv=ov('\n \n'),cv=ov('\n \n'),lv=ov(''),uv=ov(''),hv=ov(''),pv=ov(''),dv=ov(''),fv=ov(''),vv=ov(''),yv=ov(''),gv=ov(''),mv=ov(''),bv=ov(''),kv=ov(''),xv=ov(''),wv=ov(''),Sv=ov(''),Pv=ov(''),jv=ov(''),Ov=ov(''),$v=ov(''),Cv=ov(''),Ev=ov(''),Tv=ov(''),Vv=ov(''),Mv=ov(''),Dv=ov(''),Iv=ov(''),Lv=ov(''),Rv=ov(''),Av=ov(''),zv=ov(''),Fv=ov(''),Bv=ov(''),Gv=ov(''),Hv=ov(''),Nv=ov(''),Xv=ov(''),Yv=ov(''),_v=ov(''),Kv=ov(''),Wv=ov(''),Uv=ov(''),Zv=ov(''),qv=ov(''),Jv=ov(''),Qv=ov(''),ty=ov(''),ey=ov(''),ny=ov(''),ry=ov(''),iy=ov(''),ay=ov(''),oy=ov(''),sy=ov(''),cy=ov(''),ly=ov(''),uy=ov(''),hy=ov(''),py=ov(''),dy=ov(''),fy=ov(''),vy=ov(''),yy=ov(''),gy=ov(''),my=ov(''),by=ov(''),ky=ov(''),xy=ov(''),wy=ov(''),Sy=ov(''),Py=ov(''),jy=ov(''),Oy=ov('\n\n'),$y=ov(''),Cy=ov(''),Ey=ov(''),Ty=ov(''),Vy=ov(''),My=ov(''),Dy=ov(''),Iy=ov(''),Ly=ov(''),Ry=ov(''),Ay=ov(''),zy=ov(''),Fy=ov(''),By=ov(''),Gy=ov(''),Hy=ov(''),Ny=ov(''),Xy=ov(''),Yy=ov(''),_y=ov(''),Ky=ov(''),Wy=ov(''),Uy=ov(''),Zy=ov(''),qy=ov(''),Jy=ov(''),Qy=ov(''),tg=ov(''),eg=ov(''),ng=ov(''),rg=ov(''),ig=ov(''),ag=ov('\n \n \n \n'),og=ov(''),sg=ov(''),cg=ov('\n\n\n\n'),lg=ov(''),ug=ov(''),hg=ov(''),pg=ov(''),dg=ov(''),fg=ov(''),vg=ov(''),yg=ov('\n \n'),gg=ov(''),mg=ov(''),bg=ov(''),kg=ov(''),xg=ov('\n \n'),wg=ov('\n \n'),Sg=ov(''),Pg=ov(''),jg=ov(''),Og=ov(''),$g=ov(''),Cg=ov('\n \n '),Eg=ov('\n \n \n \n'),Tg=ov('\n \n '),Vg=ov('\n \n '),Mg=ov('\n \n'),Dg=ov('\n \n'),Ig=ov(''),Lg=ov('\n \n '),Rg=ov(''),Ag=ov(''),zg=ov(''),Fg=ov(''),Bg=ov(''),Gg=ov(''),Hg=ov(''),Ng=ov(''),Xg=ov(''),Yg=ov(''),_g=ov('\n \n '),Kg=ov(''),Wg=ov(''),Ug=ov(''),Zg=ov('');function qg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Jg=function(t){for(var e=1;e'),delete_forever:Ug,horizontal_rule:Zg,open_in_full:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(ov('"),{width:20,height:20}))},rotate:_g,align_horizontal_center:zg,align_horizontal_left:Fg,align_horizontal_right:Bg,align_vertical_bottom:Gg,align_vertical_center:Hg,align_vertical_top:Ng,vertical_distribute:Kg,horizontal_distribute:Wg,rotate_left:Yg,swap_horiz:Xg,arrow_right:Rg,group:Lg,volume_down:Vg,arrowLeft:Ig,volume_up:Mg,volume_off:Dg,pentool:Eg,launch:Cg,apps:jg,outline_rect:Og,outline_circle:$g,keyboard:Pg,local_movie:Sg,same_height:wg,same_width:xg,layers:Ag,middle:kg,bottom:bg,top:mg,right:gg,center:yg,left:vg,flag:fg,lens:dg,local_library:pg,italic:hg,strikethrough:ug,underline:lg,cylinder:cg,text_rotate:sg,device_hub:og,control_point:ig,flip_camera:ag,flipY:rg,flip:ng,account_tree:tg,format_shapes:eg,merge:Jy,texture:Qy,settings_input_component:qy,view_comfy:Zy,camera_roll:Uy,broken_image:Wy,shadow:Ky,opacity:_y,looks:Yy,vintage:Xy,waves:Ny,blur_linear:Hy,blur:Gy,landscape:By,palette:Fy,diffuse:zy,specular:Ay,photo:Ry,near_me:Ly,view_list:Iy,flash_on:Dy,doc:My,storage:Vy,archive:Ty,file_copy:Ey,gps_fixed:Cy,refresh:$y,cat:Oy,shuffle:jy,replay:Py,speed:Sy,alternate_reverse:wy,alternate:xy,note:yy,rect:vy,circle:fy,color_lens:dy,cube:py,polygon:hy,star:uy,dahaze:ly,brush:cy,expand:sy,list:ay,grid:oy,align_center:ey,align_justify:ny,align_left:ry,align_right:iy,color:ty,size:Qv,edit:Jv,outline_image:qv,ballot:Wv,shape:Kv,scatter:_v,transform:Yv,gradient:Xv,close:Nv,build:Hv,code:Gv,autorenew:Bv,play:zv,pause:Fv,skip_next:gy,skip_prev:my,fast_forward:by,fast_rewind:ky,filter:Av,input:Rv,timer:Iv,title:Dv,paint:Mv,border_all:Tv,border_inner:Vv,check:Ev,video:Tg,arrowRight:Cv,screen:$v,repeat:Ov,remove2:jv,setting:Pv,image:Sv,artboard:wv,folder:xv,publish:kv,add_note:bv,add:mv,save:yv,export:gv,redo:vv,undo:fv,lock:dv,lock_open:Zv,remove:hv,copy:pv,visible:uv,add_box:lv,add_circle:Uv,create_folder:cv,chevron_right:sv,chevron_left:Lv}),Qg=function(){function t(){go()(this,t)}return bo()(t,[{key:"load",value:function(){var t,e,n,r,i,a,o,s=arguments;return Hs.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(t=s.length>0&&void 0!==s[0]?s[0]:"default",!Jg[t]){c.next=8;break}for(n=s.length,r=new Array(n>1?n-1:0),i=1;i-1&&(t=t.replace(new RegExp("#".concat(r.id),"g"),r.local))})),t}},{key:"project",get:function(){return this.$editor.selection.currentProject}}]),t}(),em="SELECTION",nm=function(){function t(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];go()(this,t),this.EDITOR_ID=Ar(),this.projects=[],this.popupZIndex=1e4,this.canvasWidth=1e5,this.canvasHeight=1e5,this.symbols={},this.images={},this.openRightPanel=!0,this.mode=em,this.modeView="CanvasView",this.addComponentType="",this.locale=this.loadItem("locale")||"en_US",this.layout=this.loadItem("layout")||"all",this.loadManagers()}return bo()(t,[{key:"loadManagers",value:function(){this.store=new Oo(this),this.config=new hf(this),this.snapManager=new om(this),this.commands=new ef(this),this.shortcuts=new uf(this),this.selection=new jh(this),this.timeline=new Th(this),this.history=new pf(this),this.keyboardManager=new df(this),this.viewport=new ff(this),this.storageManager=new av(this),this.cursorManager=new Qg(this),this.assetManager=new tm(this),this.components=zc,this.initTheme()}},{key:"i18n",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return $h.get(t,e,n||this.locale)}},{key:"hasI18nkey",value:function(t,e){return $h.hasKey(t,e||this.locale)}},{key:"initI18n",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a="".concat(e,".").concat(n);return t.hasI18nkey(a,i)?t.$i18n("".concat(e,".").concat(n),r,i):t.$i18n("".concat(n),r,i)}}},{key:"setLocale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en_US";this.locale=t,this.saveItem("locale",this.locale)}},{key:"setLayout",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";this.layout=t,this.saveItem("layout",this.layout)}},{key:"setUser",value:function(t){this.user=t}},{key:"initTheme",value:function(){var t="dark";window.localStorage&&(t=window.localStorage.getItem("easylogic.studio.theme"),t=["dark","light","toon"].includes(t)?t:"dark"),this.theme=t||"dark",window.localStorage.setItem("easylogic.studio.theme",this.theme)}},{key:"themeValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Ch[this.theme][t]||e}},{key:"changeMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:em;this.mode=t}},{key:"changeModeView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"CanvasView";this.modeView=t}},{key:"isMode",value:function(t){return this.mode===t}},{key:"isAddMode",value:function(){return this.isMode("ADD")}},{key:"isSelectionMode",value:function(){return this.isMode(em)}},{key:"changeAddType",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.changeMode("ADD"),this.addComponentType=t,this.isComponent=e}},{key:"changeTheme",value:function(t){t=["light","toon"].includes(t)?t:"dark",this.theme=t,window.localStorage.setItem("easylogic.studio.theme",t)}},{key:"getFile",value:function(t){return this.images[t]||t}},{key:"setStore",value:function(t){this.store=t}},{key:"emit",value:function(){var t;this.store.source="EDITOR_ID",(t=this.store).emit.apply(t,arguments)}},{key:"on",value:function(){var t;(t=this.store).on.apply(t,arguments)}},{key:"off",value:function(){var t;(t=this.store).off.apply(t,arguments)}},{key:"offAll",value:function(){var t;(t=this.store).offAll.apply(t,arguments)}},{key:"debug",value:function(){var t;this.config.get("debug")&&(t=console).log.apply(t,arguments)}},{key:"command",value:function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:[];this.projects=t}},{key:"add",value:function(t){return this.projects.push(t),t}},{key:"remove",value:function(t){this.projects.splice(t,1)}},{key:"clear",value:function(){this.projects=[]}},{key:"get",value:function(t){return this.projects[t]}},{key:"replaceLocalUrltoRealUrl",value:function(t){var e=this.selection.currentProject,n={};return e.images.forEach((function(e){t.indexOf(e.local)>-1&&(n[e.local]=e.original)})),Object.keys(n).forEach((function(e){t.indexOf(e)>-1&&(t=t.replace(new RegExp(e,"g"),n[e]))})),t}},{key:"replaceLocalUrltoId",value:function(t){var e=this.projects,n={};return e.forEach((function(e){e.images.forEach((function(e){t.indexOf(e.local)>-1&&(n[e.local]="#"+e.id)}))})),Object.keys(n).forEach((function(e){t.indexOf(e)>-1&&(t=t.replace(new RegExp(e,"g"),n[e]))})),t}},{key:"makeResource",value:function(t){var e=JSON.stringify(t);return e=this.replaceLocalUrltoId(e)}},{key:"serialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=[];return t.forEach((function(t){var n=t.toJSON();n._parentId=t.parent?t.parent.id:void 0,n._positionInParent=t.positionInParent,e.push(n)})),JSON.stringify(e)}},{key:"createItem",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t._parentId&&(t.parent=this.searchItem(t._parentId),delete t._parentId),t.layers=(t.layers||[]).map((function(t){return e.createItem(t)}));var r=this.components.createComponent(t.itemType,t);return n&&r.parent.setPositionInPlace(t._positionInParent,r),r}},{key:"searchItem",value:function(t){var e=[];return Ai(t)?e.push(t):Li(t)&&(e=E()(t)),this.selection.currentProject.getSearchedIndexItemList(e).filter(Boolean)[0]}},{key:"deserialize",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=JSON.parse(t)||[];return r.map((function(t){return e.createItem(t,n)}))}},{key:"saveResource",value:function(t,e){window.localStorage.setItem("easylogic.studio.".concat(t),this.makeResource(e))}},{key:"saveItem",value:function(t,e){window.localStorage.setItem("easylogic.studio.".concat(t),JSON.stringify(e))}},{key:"loadResource",value:function(t){return this.assetManager.revokeResource(window.localStorage.getItem("easylogic.studio.".concat(t)))}},{key:"loadItem",value:function(t){return JSON.parse(window.localStorage.getItem("easylogic.studio.".concat(t))||JSON.stringify(""))}},{key:"zIndex",get:function(){return this.popupZIndex++}},{key:"isPointerUp",get:function(){return!this.config.get("bodyEvent")||"pointerup"===this.config.get("bodyEvent").type}},{key:"isPointerMove",get:function(){return!!this.config.get("bodyEvent")&&"pointermove"===this.config.get("bodyEvent").type}}]),t}(),rm=a.fromValues(0,0,0);function im(t,e){return Math.abs(t[0]-e[0])<1}function am(t,e){return Math.abs(t[1]-e[1])<1}var om=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;go()(this,t),this.editor=e,this.map=new Map,this.snapTargetLayers=[],this.snapDistance=n}return bo()(t,[{key:"clear",value:function(){var t=this;this.snapTargetLayers=this.editor.selection.snapTargetLayers.map((function(e){return t.convertMatrix(e)}))}},{key:"convertMatrix",value:function(t){var e=this.convertGuideAndPathMatrix(t),n=e.map((function(t){return t[0]})),r=e.map((function(t){return t[1]}));return{id:t.id,xList:n,yList:r,verties:e}}},{key:"convertGuideAndPathMatrix",value:function(t){var e=t.guideVerties(),n=t.pathVerties();return[].concat(E()(e),E()(n))}},{key:"getSnapPoints",value:function(){var t=this,e=[];return this.editor.selection.snapTargetLayersWithSelection.forEach((function(n){e.push.apply(e,t.convertGuideAndPathMatrix(n))})),e}},{key:"checkX",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[];return t.forEach((function(t,i){e.forEach((function(e,a){var o=t-e;Math.abs(o)<=n&&r.push({targetX:t,sourceX:e,sourceIndex:a,targetIndex:i,dx:o})}))})),r}},{key:"checkY",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[];return t.forEach((function(t,i){e.forEach((function(e,a){var o=t-e;Math.abs(o)<=n&&r.push({targetY:t,sourceY:e,sourceIndex:a,targetIndex:i,dy:o})}))})),r}},{key:"check",value:function(t){var e=this,n=[],r=this.snapDistance,i=t.map((function(t){return t[0]})),o=t.map((function(t){return t[1]}));return this.snapTargetLayers.forEach((function(t){var s=e.checkX(t.xList,i,r)[0],c=e.checkY(t.yList,o,r)[0];n.push(a.fromValues(s?s.dx:0,c?c.dy:0,0))})),n.find((function(t){return Ni(t[0])||Ni(t[1])}))||rm}},{key:"checkPoint",value:function(t){var e=this.check([t]);return a.add([],t,e)}},{key:"getGuidesByPointPoint",value:function(t,e){for(var n,r,i=[],a=0,o=t.length;a1&&void 0!==arguments[1]?arguments[1]:{};return go()(this,e),(n=xo()(this,So()(e).call(this,t,r))).created(),n.initialize(),n.initializeStoreEvent(),n}return jo()(e,t),bo()(e,[{key:"initializeProperty",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Bs()(So()(e.prototype),"initializeProperty",this).call(this,t,n),t&&t.$store&&(this.$store=t.$store),t&&t.$editor&&(this.$editor=t.$editor)}},{key:"created",value:function(){}},{key:"getRealEventName",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ME@",n=t.indexOf(e);return t.substr(n<0?0:n+e.length)}},{key:"splitMethod",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=aa(t.split("|"),e),i=j()(r,2),a=i[0],o=i[1];return[a.length?+o[0].target:n,a,o]}},{key:"initializeStoreEvent",value:function(){var t=this;this.filterProps(sm).forEach((function(e){var n=t.getRealEventName(e,"ME@"),r=t.splitMethod(n,"debounce"),i=j()(r,2),a=i[0],o=i[1],s=t.splitMethod(n,"throttle"),c=j()(s,2),l=c[0],u=c[1];n.split("|").filter((function(t){return-1===o.indexOf(t)&&-1===u.indexOf(t)})).map((function(t){return t.trim()})).forEach((function(n){var r=t[e].bind(t);r.displayName="".concat(t.sourceName,".").concat(n),r.source=t.source,t.$store.on(n,r,t,a,l)}))}))}},{key:"destoryStoreEvent",value:function(){this.$store.offAll(this)}},{key:"destroy",value:function(){Bs()(So()(e.prototype),"destroy",this).call(this),this.destoryStoreEvent()}},{key:"rerender",value:function(){Bs()(So()(e.prototype),"rerender",this).call(this),this.initialize(),this.initializeStoreEvent()}},{key:"emit",value:function(t){var e;this.$store.source=this.source,this.$store.sourceContext=this;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i2?n-2:0),i=2;i0&&void 0!==arguments[0]&&arguments[0];this.$editor=new nm,this.$store=this.$editor.store,this.$container=Ro.create(this.getContainer()),this.$container.addClass(this.getClassName()),this.render(this.$container),this.initBodyMoves()}},{key:"initBodyMoves",value:function(){this.moves=new Set,this.ends=new Set,this.modifyBodyMoveSecond(0)}},{key:"modifyBodyMoveSecond",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$config.set("body.move.ms",t);var e=0===t?this.loopBodyMoves.bind(this):Oi(this.loopBodyMoves.bind(this),this.$config.get("body.move.ms"));this.funcBodyMoves=e}},{key:"loopBodyMoves",value:function(){var t=this.$config.get("pos"),e=this.$config.get("bodyEvent"),n=this.$config.get("lastPos")||pm;!(n.x===t.x&&n.y===t.y)&&this.moves.size&&(this.moves.forEach((function(n){var r=kr(t.x,t.y,n.xy.x,n.xy.y);if(Math.abs(r)>.5){var i=Math.floor(t.x-n.xy.x),a=Math.floor(t.y-n.xy.y);n.func.call(n.context,i,a,"move",e.pressure)}})),this.$config.set("lastPos",t)),requestAnimationFrame(this.funcBodyMoves)}},{key:"removeBodyMoves",value:function(){var t=this.$config.get("pos"),e=this.$config.get("bodyEvent");t&&this.ends.forEach((function(n){n.func.call(n.context,t.x-n.xy.x,t.y-n.xy.y,"end",e.pressure)})),this.moves.clear(),this.ends.clear()}},{key:lm("add/body/mousemove"),value:function(t,e,n){this.moves.add({func:t,context:e,xy:n})}},{key:lm("add/body/mouseup"),value:function(t,e,n){this.ends.add({func:t,context:e,xy:n})}},{key:"getClassName",value:function(){return t.className||"csseditor"}},{key:"getContainer",value:function(){return t.container||document.body}},{key:"template",value:function(){return t.template||"
"}},{key:"components",value:function(){return t.components||{}}},{key:us("document"),value:function(t){var e=t.xy||hm;this.$config.set("bodyEvent",t),this.$config.set("pos",e),this.requestId||(this.requestId=requestAnimationFrame(this.funcBodyMoves))}},{key:hs("document"),value:function(t){this.$config.set("bodyEvent",t),this.removeBodyMoves(),cancelAnimationFrame(this.requestId),this.requestId=null}},{key:is("window")+Ps(100),value:function(){this.emit("resize.window")}},{key:"commands",get:function(){return this.$editor.commands}},{key:"shortcuts",get:function(){return this.$editor.shortcuts}}]),n}(um))(t)},fm={App:k,Color:po,HueColor:vo,ColorNames:Fa,Dom:Ro,EventMachine:sc,UIElement:um},vm={"image-resource":"Image",url:"Image",image:"Image","static-gradient":"Static","linear-gradient":"Linear","repeating-linear-gradient":"".concat(Jg.repeat," Linear"),"radial-gradient":"Radial","repeating-radial-gradient":"".concat(Jg.repeat," Radial"),"conic-gradient":"Conic","repeating-conic-gradient":"".concat(Jg.repeat," Conic")},ym={image:"image","image-resource":"image",url:"image","static-gradient":"gradient","linear-gradient":"gradient","repeating-linear-gradient":"gradient","radial-gradient":"gradient","repeating-radial-gradient":"gradient","conic-gradient":"gradient","repeating-conic-gradient":"gradient"},gm=function(t){function e(){return go()(this,e),xo()(this,So()(e).apply(this,arguments))}return jo()(e,t),bo()(e,[{key:"components",value:function(){return Cx}},{key:"initState",value:function(){return{hideLabel:"true"===this.props["hide-label"],value:this.props.value,images:this.parseBackgroundImage(this.props.value)}}},{key:"parseBackgroundImage",value:function(t){return eu.parseStyle(Qi(t))}},{key:"setValue",value:function(t){this.setState({value:t,images:this.parseBackgroundImage(t)})}},{key:"template",value:function(){var t=this.state.hideLabel?"hide":"";return("\n
\n
\n \n
\n \n
\n
\n
\n
\n "))}},{key:"templateForBlendMode",value:function(t,e){return"\n