@sheetxl/studio-mui 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/B29yIlf_FSHx9q3M.cjs +7 -0
- package/browser/cjs/B783moVfFT70yQuK.cjs +7 -0
- package/browser/cjs/BCtVyhxIZSUPH_Z4.cjs +7 -0
- package/browser/cjs/BE6O6K7i1mHBC3et.cjs +7 -0
- package/browser/cjs/BQ-G2ABc3FYN-D50.cjs +7 -0
- package/browser/cjs/BabvaPi1dUIPt5AG.cjs +7 -0
- package/browser/cjs/BbvcxaJzfy7H6xfa.cjs +7 -0
- package/browser/cjs/Bhh0dqxUzzOzHWMc.cjs +7 -0
- package/browser/cjs/CH50hiw_7LBSC6dR.cjs +7 -0
- package/browser/cjs/Cfb0T6htsh82UPK-.cjs +7 -0
- package/browser/cjs/CisYglNTHGrj9oMH.cjs +7 -0
- package/browser/cjs/Clbakb5VUTDTlofM.cjs +7 -0
- package/browser/cjs/D7xmeRe-f7IifEKc.cjs +7 -0
- package/browser/cjs/DCV-6w2JGk_faE3x.cjs +7 -0
- package/browser/cjs/DY2PuDSgw0TrB5-_.cjs +7 -0
- package/browser/cjs/Df5v6knUJ4dqHmmo.cjs +7 -0
- package/browser/cjs/DyzVC_iq7ceqC2fj.cjs +7 -0
- package/browser/cjs/QB_8kWYEsfOH_HwK.cjs +7 -0
- package/browser/cjs/aOmlMJRAkQEF59EX.cjs +7 -0
- package/browser/cjs/index.cjs +10 -4
- package/browser/cjs/li-J7BWV6WUzY5aq.cjs +7 -0
- package/browser/cjs/u0WmWLGlCwhnhL9i.cjs +7 -0
- package/browser/cjs/uoBAuXnlUz8scSA1.cjs +7 -0
- package/browser/cjs/xp2ZII-PuLk9tHK3.cjs +7 -0
- package/browser/cjs/xq-CJbsvm7BQO8lK.cjs +7 -0
- package/browser/esm/12Ttun7hzbiInyVr.mjs +7 -0
- package/browser/esm/7jSMnphGrNRPUa_S.mjs +7 -0
- package/browser/esm/AnCmK-idMDJ2vI8H.mjs +7 -0
- package/browser/esm/B-Ut_yUCD9THCz0T.mjs +7 -0
- package/browser/esm/BTD5k7gtFcqDwslB.mjs +7 -0
- package/browser/esm/BVRUNnRvnt7aVCDD.mjs +7 -0
- package/browser/esm/BauTkiamxm0HDt6M.mjs +7 -0
- package/browser/esm/BcIp2mxLBfjUBE0q.mjs +7 -0
- package/browser/esm/Bi_0z0hyhFuz5Ta3.mjs +7 -0
- package/browser/esm/BkDEdK7zOlsoUKCZ.mjs +7 -0
- package/browser/esm/BpGexBYtmHbTIJz2.mjs +7 -0
- package/browser/esm/CJawFB555VEY-Vge.mjs +7 -0
- package/browser/esm/CWogLlWYHiL4W6CH.mjs +7 -0
- package/browser/esm/Cr46Bo9bGoz0LbWq.mjs +7 -0
- package/browser/esm/Csk8rXNpaXmf5g7O.mjs +7 -0
- package/browser/esm/Cu-5HDPN8B0qE77-.mjs +7 -0
- package/browser/esm/CzgR8PxJ_89IC4Mr.mjs +7 -0
- package/browser/esm/DMUXpRbV3ahdB1lN.mjs +7 -0
- package/browser/esm/DiIX5KzrWnbDWjGE.mjs +7 -0
- package/browser/esm/Djo2IS-ivmVSrO3v.mjs +7 -0
- package/browser/esm/Hy95ExHvIFgzxQb-.mjs +7 -0
- package/browser/esm/Z1_72ZY8rW2Mc3g_.mjs +7 -0
- package/browser/esm/_ZR9nT54xwy-C6ow.mjs +7 -0
- package/browser/esm/csxyptiqbJZO0pQA.mjs +7 -0
- package/browser/esm/index.mjs +8 -83
- package/licenses/dependencies.txt +145 -145
- package/node/esm/{D9XxEDOFeim_xxQE.mjs → 8THCZRGNmI2nPqMR.mjs} +2 -2
- package/node/esm/{DAGXTtxswgRevXcg.mjs → BDm0y2dv7wLZhYj1.mjs} +1 -1
- package/node/esm/{bMROCCq764fn-xgi.mjs → BPylexVHXa-t0sqJ.mjs} +6 -6
- package/node/esm/{BCPBJsft-CxWAdC2.mjs → BQYQg7lfqFbWaf8x.mjs} +2 -2
- package/node/esm/{BvRJoxdFTieQ7fmr.mjs → BSUbQzac78SXiAJe.mjs} +1 -1
- package/node/esm/{CvPEjDQ6QhtpTabY.mjs → BeNXnrWMr5S34Oxb.mjs} +1 -1
- package/node/esm/{tOKSFYpLW-UAq6Gt.mjs → C6jxZQrvMLctjLZM.mjs} +4 -4
- package/node/esm/{usxl4NgDVOQ7LrDb.mjs → CCZepFZNn1pIXrnd.mjs} +1 -1
- package/node/esm/{FBYT_1wWMsovwFUH.mjs → CXSwyUs6BuNGCic0.mjs} +13 -13
- package/node/esm/{CcretMZPKGn3lnR4.mjs → CaV6SH-PMyHlXUhx.mjs} +1 -1
- package/node/esm/{wsJBzsqfI7PB1hMT.mjs → D481dAOp77EZbV5s.mjs} +2 -2
- package/node/esm/{DhG888jHVhaxSY8F.mjs → DHj9iDuBImdwscIb.mjs} +25 -25
- package/node/esm/{BGArlD6RNgEObMgD.mjs → DIGsHHDexzj0uG_T.mjs} +5 -5
- package/node/esm/{DxbGK6Zl1UgjOa4-.mjs → DLiw-2C_tqGgJIQ6.mjs} +2 -2
- package/node/esm/{sAnM1xQCuHDSOmip.mjs → DNJVdt9TbBsUE8Jm.mjs} +1 -1
- package/node/esm/{BBg45DshIWHYXywC.mjs → DaCmut490aSCGvX8.mjs} +1 -1
- package/node/esm/{BmkBQUrL_kkRhzTh.mjs → Dd2OFQJQyYp6bAeP.mjs} +1 -1
- package/node/esm/{Clurk3ikkAHRiukp.mjs → DkpAjhQeaZn_Ipxg.mjs} +2 -2
- package/node/esm/{p6vc6u8VPkFyCsYx.mjs → DyMCnCG9LzH5Mgw0.mjs} +2 -2
- package/node/esm/{Dc--wbPxmu3D8pbK.mjs → RV-AvxVzzFKWjYFM.mjs} +38 -38
- package/node/esm/{BPqOHRFTv--y9umX.mjs → Ui3_6RhrEZQDOXwg.mjs} +8 -8
- package/node/esm/index.mjs +5265 -4998
- package/node/esm/{M1FpuPZr9_2AafMV.mjs → qI75rORek8T0-Kpf.mjs} +2 -2
- package/package.json +8 -8
- package/types/index.d.ts +11 -0
- package/browser/cjs/BKTBvSy7O4Xw2cgz.cjs +0 -12
- package/browser/cjs/BpePzZJYiqMlY5Tv.cjs +0 -6
- package/browser/cjs/C1kdA0ggDPxfA1rZ.cjs +0 -7
- package/browser/cjs/C3Ou4UjGdLm76uIO.cjs +0 -6
- package/browser/cjs/CFxDNxEIdtHFQI9Y.cjs +0 -7
- package/browser/cjs/CYBKL0vexMAhOhAv.cjs +0 -15
- package/browser/cjs/CdVTdaOLyLtwVswE.cjs +0 -6
- package/browser/cjs/ClsxZKYLxWzS4vf3.cjs +0 -12
- package/browser/cjs/Co1amcDxMGmeSblk.cjs +0 -161
- package/browser/cjs/CoKAO1N3hI6MCu8D.cjs +0 -6
- package/browser/cjs/CtsmtdeQOqFBoICs.cjs +0 -6
- package/browser/cjs/CuB7GbiZyoeSvc0Z.cjs +0 -6
- package/browser/cjs/D-N-VqvFR1gHQx1f.cjs +0 -11
- package/browser/cjs/DDFf-jFPulia8BBq.cjs +0 -11
- package/browser/cjs/Db8DWa6iDZSqedMi.cjs +0 -90
- package/browser/cjs/DeGIeKT9CooiCmKo.cjs +0 -6
- package/browser/cjs/LWz4eqzOyIvcl3ew.cjs +0 -6
- package/browser/cjs/bzV_pbhf0GMpQZ5j.cjs +0 -16
- package/browser/cjs/fCiaIJ9GEGrJHKcW.cjs +0 -18
- package/browser/cjs/g_d3i2WIzavP1fkJ.cjs +0 -6
- package/browser/cjs/jtJTqrtVCIIZdMGs.cjs +0 -6
- package/browser/cjs/lKYJYMC7FrPq5kHP.cjs +0 -42
- package/browser/cjs/niDPoiECJADuYx3e.cjs +0 -145
- package/browser/cjs/olo9IZBG5nwaup_7.cjs +0 -6
- package/browser/cjs/zKQuLycAjgd_X11q.cjs +0 -6
- package/browser/esm/3hWSR1m3EU7D5hi-.mjs +0 -1352
- package/browser/esm/536uCif-OpzkPpDe.mjs +0 -84
- package/browser/esm/BAKeXjQwj8pB6HZf.mjs +0 -3803
- package/browser/esm/BCEAVoasUKP7howp.mjs +0 -25
- package/browser/esm/BKPv5CXZmlt0Bt9q.mjs +0 -52
- package/browser/esm/BpaKIplfXogRA7Dy.mjs +0 -424
- package/browser/esm/C7S8lmNi8dvBvaaL.mjs +0 -13391
- package/browser/esm/C8g1cXW8UUjZ5aXU.mjs +0 -43
- package/browser/esm/CDg8_cQCaixUeVW5.mjs +0 -59
- package/browser/esm/COdRj-kRolpDnJJt.mjs +0 -153
- package/browser/esm/C_SmA3bhMniSBiJM.mjs +0 -2251
- package/browser/esm/CfhFPyNuH7O_8Ma5.mjs +0 -46
- package/browser/esm/Cq7Bvqjn_f2hb4Yu.mjs +0 -1703
- package/browser/esm/Cu4sFU_zvi2DcKL0.mjs +0 -864
- package/browser/esm/DRlIFEu_74fHh0Nd.mjs +0 -44
- package/browser/esm/DW_hf-cH6FfKvA2U.mjs +0 -1366
- package/browser/esm/D_9FRFbybIoGcpk5.mjs +0 -640
- package/browser/esm/DssrQc6563EzuV2p.mjs +0 -1467
- package/browser/esm/TCkOSlTdkEa2IszR.mjs +0 -392
- package/browser/esm/XunxgPz4pxTyfYZa.mjs +0 -19979
- package/browser/esm/YJTooL6WwG9eY3LG.mjs +0 -48
- package/browser/esm/ej-oxHSoVFxjTvis.mjs +0 -2410
- package/browser/esm/fbwdS1S_4A9RYV7u.mjs +0 -1672
- package/browser/esm/tZtCH_zqvCEW6mXy.mjs +0 -23
- package/browser/esm/tbB-JzXGTPYVXdKc.mjs +0 -52
- package/node/esm/BmYPa_c9Yu9hUbtH.mjs +0 -312
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.10
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("react");function la(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Pe=la(Oe);function Nr(e,t){for(var n=e.length,r=0;r<n;++r)if(t(e[r],r))return!0;return!1}function eo(e,t){for(var n=e.length,r=0;r<n;++r)if(t(e[r],r))return e[r];return null}function li(e){var t=e;if(t===void 0){if(typeof navigator>"u"||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}function Dr(e,t){try{return new RegExp(e,"g").exec(t)}catch{return null}}function wr(e){return e.replace(/_/g,".")}function hn(e,t){var n=null,r="-1";return Nr(e,function(i){var o,a,s,u=Dr("("+i.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!(!u||i.brand||(n=i,r=u[3]||"-1",i.versionAlias?r=i.versionAlias:i.versionTest&&(o=i.versionTest.toLowerCase(),a=t,s=Dr("("+o+")((?:\\/|\\s|:)([0-9|\\.|_]+))",a),r=(s?s[3]:"")||r),r=wr(r),0))}),{preset:n,version:r}}function Gn(e,t){var n={brand:"",version:"-1"};return Nr(e,function(r){var i=no(t,r);return!!i&&(n.brand=r.id,n.version=r.versionAlias||i.version,n.version!=="-1")}),n}function no(e,t){return eo(e,function(n){var r=n.brand;return Dr(""+t.test,r.toLowerCase())})}var fi=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],pi=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],ur=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],ro=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],di=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function hi(e){return!!hn(ro,e).preset}function fa(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.map(function(r){return r.split(" ").map(function(i){return i?""+e+i:""}).join(" ")}).join(" ")}function Ae(e,t){return function(n){n&&(e[t]=n)}}function io(e,t,n){return function(r){r&&(e[t][n]=r)}}var Wr="undefined",oo=typeof window!==Wr,pa=typeof document!==Wr&&document,da=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],Lt=1e-7,In={cm:function(e){return 96*e/2.54},mm:function(e){return 96*e/254},in:function(e){return 96*e},pt:function(e){return 96*e/72},pc:function(e){return 96*e/6},"%":function(e,t){return e*t/100},vw:function(e,t){return t===void 0&&(t=window.innerWidth),e/100*t},vh:function(e,t){return t===void 0&&(t=window.innerHeight),e/100*t},vmax:function(e,t){return t===void 0&&(t=Math.max(window.innerWidth,window.innerHeight)),e/100*t},vmin:function(e,t){return t===void 0&&(t=Math.min(window.innerWidth,window.innerHeight)),e/100*t}};function gi(e,t,n,r){return(e*r+t*n)/(n+r)}function jr(e){return typeof e===Wr}function Me(e){return e&&typeof e=="object"}function ee(e){return Array.isArray(e)}function rn(e){return typeof e=="string"}function Un(e){return typeof e=="number"}function ao(e){return typeof e=="function"}function so(e,t,n,r,i){return Mr(e,t,n)?n:function(o,a,s,u,f){for(var p,c=function(d){var g=a[d].trim();if(g===o.close&&!Mr(o,a,d))return{value:d};var v=d,b=de(f,function(x){return x.open===g});if(b&&(v=so(b,a,d,u,f)),v===-1)return p=d,"break";p=d=v},l=s;l<u;++l){var h=c(l);if(l=p,typeof h=="object")return h.value;if(h==="break")break}return-1}(e,t,n+1,r,i)}function Mr(e,t,n){if(!e.ignore)return null;var r=t.slice(Math.max(n-3,0),n+3).join("");return new RegExp(e.ignore).exec(r)}function qr(e,t){var n=rn(t)?{separator:t}:t,r=n.separator,i=r===void 0?",":r,o=n.isSeparateFirst,a=n.isSeparateOnlyOpenClose,s=n.isSeparateOpenClose,u=s===void 0?a:s,f=n.openCloseCharacters,p=f===void 0?da:f,c=p.map(function(m){var D=m.open,_=m.close;return D===_?D:D+"|"+_}).join("|"),l=new RegExp("(\\s*"+i+"\\s*|"+c+"|\\s+)","g"),h=e.split(l).filter(function(m){return m&&m!=="undefined"}),d=h.length,g=[],v=[];function b(){return!!v.length&&(g.push(v.join("")),v=[],!0)}for(var x,y=function(m){var D,_,B=h[m].trim(),F=m,O=de(p,function(R){return R.open===B}),S=de(p,function(R){return R.close===B});if(O){if((F=so(O,h,m,d,p))!==-1&&u)return b()&&o?(x=m,"break"):(g.push(h.slice(m,F+1).join("")),m=F,o?(x=m,"break"):(x=m,"continue"))}else{if(S&&!Mr(S,h,m)){var w=function(){for(var R=0,P=0,k=arguments.length;P<k;P++)R+=arguments[P].length;var z=Array(R),A=0;for(P=0;P<k;P++)for(var G=arguments[P],I=0,V=G.length;I<V;I++,A++)z[A]=G[I];return z}(p);return w.splice(p.indexOf(S),1),{value:qr(e,{separator:i,isSeparateFirst:o,isSeparateOnlyOpenClose:a,isSeparateOpenClose:u,openCloseCharacters:w})}}if(D=B,_=i,!((_!==""&&_!=" "||D!==""&&D!=" ")&&D!==_||a))return b(),o?(x=m,"break"):(x=m,"continue")}F===-1&&(F=d-1),v.push(h.slice(m,F+1).join("")),x=m=F},E=0;E<d;++E){var M=y(E);if(E=x,typeof M=="object")return M.value;if(M==="break")break}return v.length&&g.push(v.join("")),g}function Sn(e){return qr(e,"")}function gn(e){return qr(e,",")}function rr(e){var t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);if(!t)return{prefix:"",unit:"",value:NaN};var n=t[1],r=t[2];return{prefix:n,unit:t[3],value:parseFloat(r)}}function $n(){return Date.now?Date.now():new Date().getTime()}function Je(e,t,n){n===void 0&&(n=-1);for(var r=e.length,i=0;i<r;++i)if(t(e[i],i,e))return i;return n}function de(e,t,n){var r=Je(e,t);return r>-1?e[r]:n}var vi,mi,uo=(vi=$n(),(mi=oo&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame))?mi.bind(window):function(e){var t=$n();return setTimeout(function(){e(t-vi)},1e3/60)}),ha=function(){var e=oo&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return e?e.bind(window):function(t){clearTimeout(t)}}();function Cn(e){return Object.keys(e)}function oe(e,t){var n=rr(e),r=n.value,i=n.unit;if(Me(t)){var o=t[i];if(o){if(ao(o))return o(r);if(In[i])return In[i](r,o)}}else if(i==="%")return r*t/100;return In[i]?In[i](r):r}function Sr(e,t,n){return Math.max(t,Math.min(e,n))}function bi(e,t,n,r){return r===void 0&&(r=e[0]/e[1]),[[Bt(t[0],Lt),Bt(t[0]/r,Lt)],[Bt(t[1]*r,Lt),Bt(t[1],Lt)]].filter(function(i){return i.every(function(o,a){var s=t[a],u=Bt(s,Lt);return n?o<=s||o<=u:o>=s||o>=u})})[0]||e}function Cr(e){for(var t=e.length,n=0,r=t-1;r>=0;--r)n+=e[r];return t?n/t:0}function pe(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=Math.atan2(r,n);return i>=0?i:i+2*Math.PI}function xi(e){var t,n=(t=e,[0,1].map(function(o){return Cr(t.map(function(a){return a[o]}))})),r=pe(n,e[0]),i=pe(n,e[1]);return r<i&&i-r<Math.PI||r>i&&i-r<-Math.PI?1:-1}function vn(e,t){return Math.sqrt(Math.pow((t?t[0]:0)-e[0],2)+Math.pow((t?t[1]:0)-e[1],2))}function Bt(e,t){if(!t)return e;var n=1/t;return Math.round(e/t)/n}function yi(e,t){return e.forEach(function(n,r){e[r]=Bt(e[r],t)}),e}function ye(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function co(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function lo(e,t){if(e.classList)e.classList.remove(t);else{var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}function Qt(e,t,n,r){e.addEventListener(t,n,r)}function Ut(e,t,n,r){e.removeEventListener(t,n,r)}function Hr(e){return e?.ownerDocument||pa}function Lr(e){return Hr(e).documentElement}function Be(e){return Hr(e).body}function Re(e){var t;return((t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView)||window}function fo(e){return e&&"postMessage"in e&&"blur"in e&&"self"in e}function Vr(e){return Me(e)&&e.nodeName&&e.nodeType&&"ownerDocument"in e}function ga(e,t,n,r,i,o){for(var a=0;a<i;++a){var s=n+a*i,u=r+a*i;e[s]+=e[u]*o,t[s]+=t[u]*o}}function va(e,t,n,r,i){for(var o=0;o<i;++o){var a=n+o*i,s=r+o*i,u=e[a],f=t[a];e[a]=e[s],e[s]=u,t[a]=t[s],t[s]=f}}function ma(e,t,n,r,i){for(var o=0;o<r;++o){var a=n+o*r;e[a]/=i,t[a]/=i}}function Ge(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var n=e.slice(),r=It(t),i=0;i<t;++i){var o=t*i+i;if(!Bt(n[o],Lt)){for(var a=i+1;a<t;++a)if(n[t*i+a]){va(n,r,i,a,t);break}}if(!Bt(n[o],Lt))return[];for(ma(n,r,i,t,n[o]),a=0;a<t;++a){var s=a,u=n[a+i*t];Bt(u,Lt)&&i!==a&&ga(n,r,s,i,t,-u)}}return r}function Rn(e,t){for(var n=e.slice(),r=e.length;r<t-1;++r)n[r]=0;return n[t-1]=1,n}function Ie(e,t,n){if(t===void 0&&(t=Math.sqrt(e.length)),t===n)return e;for(var r=It(n),i=Math.min(t,n),o=0;o<i-1;++o){for(var a=0;a<i-1;++a)r[o*n+a]=e[o*t+a];r[(o+1)*n-1]=e[(o+1)*t-1],r[(n-1)*n+o]=e[(t-1)*t+o]}return r[n*n-1]=e[t*t-1],r}function Qn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=It(e);return t.forEach(function(i){r=Vt(r,i,e)}),r}function Vt(e,t,n){n===void 0&&(n=Math.sqrt(e.length));var r=[],i=e.length/n,o=t.length/i;if(!i)return t;if(!o)return e;for(var a=0;a<n;++a)for(var s=0;s<o;++s){r[s*n+a]=0;for(var u=0;u<i;++u)r[s*n+a]+=e[u*n+a]*t[s*i+u]}return r}function Wt(e,t){for(var n=Math.min(e.length,t.length),r=e.slice(),i=0;i<n;++i)r[i]=r[i]+t[i];return r}function bt(e,t){for(var n=Math.min(e.length,t.length),r=e.slice(),i=0;i<n;++i)r[i]=r[i]-t[i];return r}function ba(e,t){return t===void 0&&(t=e.length===6),t?[e[0],e[1],0,e[2],e[3],0,e[4],e[5],1]:e}function po(e,t){return t===void 0&&(t=e.length===9),t?[e[0],e[1],e[3],e[4],e[6],e[7]]:e}function be(e,t,n){n===void 0&&(n=t.length);var r=Vt(e,t,n),i=r[n-1];return r.map(function(o){return o/i})}function xa(e,t){return Vt(e,[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1],4)}function ya(e,t){return Vt(e,[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1],4)}function Ea(e,t){return Vt(e,ir(t,4))}function Yn(e,t){var n=t[0],r=n===void 0?1:n,i=t[1],o=i===void 0?1:i,a=t[2];return Vt(e,[r,0,0,0,0,o,0,0,0,0,a===void 0?1:a,0,0,0,0,1],4)}function cr(e,t){var n=t[0],r=n===void 0?0:n,i=t[1],o=i===void 0?0:i,a=t[2];return Vt(e,[1,0,0,0,0,1,0,0,0,0,1,0,r,o,a===void 0?0:a,1],4)}function Ei(e,t){return Vt(e,t,4)}function ir(e,t){var n=Math.cos(e),r=Math.sin(e),i=It(t);return i[0]=n,i[1]=r,i[t]=-r,i[t+1]=n,i}function It(e){for(var t=e*e,n=[],r=0;r<t;++r)n[r]=r%(e+1)?0:1;return n}function ho(e,t){for(var n=It(t),r=Math.min(e.length,t-1),i=0;i<r;++i)n[(t+1)*i]=e[i];return n}function Ye(e,t){for(var n=It(t),r=Math.min(e.length,t-1),i=0;i<r;++i)n[t*(t-1)+i]=e[i];return n}function go(e,t,n,r,i,o,a,s){var u=e[0],f=e[1],p=t[0],c=t[1],l=n[0],h=n[1],d=r[0],g=r[1],v=i[0],b=i[1],x=o[0],y=o[1],E=a[0],M=a[1],m=s[0],D=s[1],_=Ge([u,0,p,0,l,0,d,0,f,0,c,0,h,0,g,0,1,0,1,0,1,0,1,0,0,u,0,p,0,l,0,d,0,f,0,c,0,h,0,g,0,1,0,1,0,1,0,1,-v*u,-b*u,-x*p,-y*p,-E*l,-M*l,-m*d,-D*d,-v*f,-b*f,-x*c,-y*c,-E*h,-M*h,-m*g,-D*g],8);if(!_.length)return[];var B=Vt(_,[v,b,x,y,E,M,m,D],8);return B[8]=1,Ie(function(F,O){O===void 0&&(O=Math.sqrt(F.length));for(var S=[],w=0;w<O;++w)for(var R=0;R<O;++R)S[R*O+w]=F[O*w+R];return S}(B),3,4)}var mn=function(){return mn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mn.apply(this,arguments)};function Ur(e,t){return t===void 0&&(t=0),je(tn(e,t))}function je(e){var t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(n){var r=n.matrixFunction,i=n.functionValue;r&&(t=r(t,i))}),t}function tn(e,t){return t===void 0&&(t=0),(ee(e)?e:Sn(e)).map(function(n){var r,i=!(r=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(n))||r.length<4?{}:{prefix:r[1],value:r[2],suffix:r[3]},o=i.prefix,a=i.value,s=null,u=o,f="";if(o==="translate"||o==="translateX"||o==="translate3d"){var p=Me(t)?mn(mn({},t),{"o%":t["%"]}):{"%":t,"o%":t},c=gn(a).map(function(B,F){return p["%"]=F===0&&"x%"in p?t["x%"]:F===1&&"y%"in p?t["y%"]:t["o%"],oe(B,p)}),l=c[0],h=c[1],d=h===void 0?0:h,g=c[2];s=cr,f=[l,d,g===void 0?0:g]}else if(o==="translateY")s=cr,f=[0,d=oe(a,Me(t)?mn({"%":t["y%"]},t):{"%":t}),0];else if(o==="translateZ")s=cr,f=[0,0,parseFloat(a)];else if(o==="scale"||o==="scale3d"){var v=gn(a).map(function(B){return parseFloat(B)}),b=v[0],x=v[1],y=x===void 0?b:x,E=v[2];s=Yn,f=[b,y,E===void 0?1:E]}else if(o==="scaleX")s=Yn,f=[b=parseFloat(a),1,1];else if(o==="scaleY")s=Yn,f=[1,y=parseFloat(a),1];else if(o==="scaleZ")s=Yn,f=[1,1,parseFloat(a)];else if(o==="rotate"||o==="rotateZ"||o==="rotateX"||o==="rotateY"){var M=rr(a),m=M.unit,D=M.value;o==="rotate"||o==="rotateZ"?(u="rotateZ",s=Ea):o==="rotateX"?s=xa:o==="rotateY"&&(s=ya),f=m==="rad"?D:D*Math.PI/180}else if(o==="matrix3d")s=Ei,f=gn(a).map(function(B){return parseFloat(B)});else if(o==="matrix"){var _=gn(a).map(function(B){return parseFloat(B)});s=Ei,f=[_[0],_[1],0,0,_[2],_[3],0,0,0,0,1,0,_[4],_[5],0,1]}else u="";return{name:o,functionName:u,value:a,matrixFunction:s,functionValue:f}})}var Da=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(n){return this.values[this.keys.indexOf(n)]},t.set=function(n,r){var i=this.keys,o=this.values,a=i.indexOf(n),s=a===-1?i.length:a;i[s]=n,o[s]=r},e}(),wa=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(n){return this.object[n]},t.set=function(n,r){this.object[n]=r},e}(),Ma=typeof Map=="function",Sa=function(){function e(){}var t=e.prototype;return t.connect=function(n,r){this.prev=n,this.next=r,n&&(n.next=this),r&&(r.prev=this)},t.disconnect=function(){var n=this.prev,r=this.next;n&&(n.next=r),r&&(r.prev=n)},t.getIndex=function(){for(var n=this,r=-1;n;)n=n.prev,++r;return r},e}(),Ca=function(){function e(n,r,i,o,a,s,u,f){this.prevList=n,this.list=r,this.added=i,this.removed=o,this.changed=a,this.maintained=s,this.changedBeforeAdded=u,this.fixed=f}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var n,r,i,o,a=(n=this.changedBeforeAdded,r=this.fixed,i=[],o=[],n.forEach(function(f){var p=f[0],c=f[1],l=new Sa;i[p]=l,o[c]=l}),i.forEach(function(f,p){f.connect(i[p-1])}),n.filter(function(f,p){return!r[p]}).map(function(f,p){var c=f[0],l=f[1];if(c===l)return[0,0];var h=i[c],d=o[l-1],g=h.getIndex();return h.disconnect(),d?h.connect(d,d.next):h.connect(void 0,i[0]),[g,h.getIndex()]})),s=this.changed,u=[];this.cacheOrdered=a.filter(function(f,p){var c=f[0],l=f[1],h=s[p],d=h[0],g=h[1];if(c!==l)return u.push([d,g]),!0}),this.cachePureChanged=u},e}();function vo(e,t,n){var r=Ma?Map:n?wa:Da,i=n||function(x){return x},o=[],a=[],s=[],u=e.map(i),f=t.map(i),p=new r,c=new r,l=[],h=[],d={},g=[],v=0,b=0;return u.forEach(function(x,y){p.set(x,y)}),f.forEach(function(x,y){c.set(x,y)}),u.forEach(function(x,y){var E=c.get(x);E===void 0?(++b,a.push(y)):d[E]=b}),f.forEach(function(x,y){var E=p.get(x);E===void 0?(o.push(y),++v):(s.push([E,y]),b=d[y]||0,l.push([E-b,y-v]),h.push(y===E),E!==y&&g.push([E,y]))}),a.reverse(),new Ca(e,t,o,a,g,s,l,h)}var Di,_a=function(){function e(t,n){t===void 0&&(t=[]),this.findKeyCallback=n,this.list=[].slice.call(t)}return e.prototype.update=function(t){var n=[].slice.call(t),r=vo(this.list,n,this.findKeyCallback);return this.list=n,r},e}(),mo=function(e,t){return(mo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])})(e,t)},Ta=typeof Map=="function"?void 0:(Di=0,function(e){return e.__DIFF_KEY__||(e.__DIFF_KEY__=++Di)}),bo=function(e){function t(n){return n===void 0&&(n=[]),e.call(this,n,Ta)||this}return function(n,r){function i(){this.constructor=n}mo(n,r),n.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}(t,e),t}(_a),_r=function(){return _r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_r.apply(this,arguments)},xo=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(n,r){if(Me(n))for(var i in n)this.on(i,n[i]);else this._addEvent(n,r,{});return this},t.off=function(n,r){if(n)if(Me(n))for(var i in n)this.off(i);else if(r){var o=this._events[n];if(o){var a=Je(o,function(s){return s.listener===r});a>-1&&o.splice(a,1)}}else this._events[n]=[];else this._events={};return this},t.once=function(n,r){var i=this;return r&&this._addEvent(n,r,{once:!0}),new Promise(function(o){i._addEvent(n,o,{once:!0})})},t.emit=function(n,r){var i=this;r===void 0&&(r={});var o=this._events[n];if(!n||!o)return!0;var a=!1;return r.eventType=n,r.stop=function(){a=!0},r.currentTarget=this,function(){for(var s=0,u=0,f=arguments.length;u<f;u++)s+=arguments[u].length;var p=Array(s),c=0;for(u=0;u<f;u++)for(var l=arguments[u],h=0,d=l.length;h<d;h++,c++)p[c]=l[h];return p}(o).forEach(function(s){s.listener(r),s.once&&i.off(n,s.listener)}),!a},t.trigger=function(n,r){return r===void 0&&(r={}),this.emit(n,r)},t._addEvent=function(n,r,i){var o=this._events;o[n]=o[n]||[],o[n].push(_r({listener:r},i))},e}();function ie(e){return Bt(e,Lt)}function wi(e){return e.length<3?0:Math.abs(function(t){for(var n=0,r=t.length-1;r>=0;--r)n+=t[r];return n}(e.map(function(t,n){var r=e[n+1]||e[0];return t[0]*r[1]-r[0]*t[1]})))/2}function Mi(e,t){var n=t.width,r=t.height,i=t.left,o=t.top,a=Ue(e),s=a.minX,u=a.minY,f=a.maxX,p=a.maxY,c=n/(f-s),l=r/(p-u);return e.map(function(h){return[i+(h[0]-s)*c,o+(h[1]-u)*l]})}function Ue(e){var t=e.map(function(r){return r[0]}),n=e.map(function(r){return r[1]});return{minX:Math.min.apply(Math,t),minY:Math.min.apply(Math,n),maxX:Math.max.apply(Math,t),maxY:Math.max.apply(Math,n)}}function lr(e,t,n){var r=e[0],i=e[1],o=Ue(t),a=o.minX,s=o.maxX,u=[[a,i],[s,i]],f=Kn(u[0],u[1]),p=Tr(t),c=[];if(p.forEach(function(d){var g,v=Kn(d[0],d[1]),b=d[0];g=v,f.every(function(x,y){return ie(x-g[y])===0})?c.push({pos:e,line:d,type:"line"}):yo(Zr(f,v),[u,d]).forEach(function(x){d.some(function(y){return M=x,!ie((E=y)[0]-M[0])&&!ie(E[1]-M[1]);var E,M})?c.push({pos:x,line:d,type:"point"}):ie(b[1]-i)!==0&&c.push({pos:x,line:d,type:"intersection"})})}),de(c,function(d){return d[0]===r}))return!0;var l=0,h={};return c.forEach(function(d){var g=d.pos,v=d.type,b=d.line;if(!(g[0]>r))if(v==="intersection")++l;else{if(v==="line")return;if(v==="point"){var x=de(b,function(M){return M[1]!==i}),y=h[g[0]],E=x[1]>i?1:-1;y?y!==E&&++l:h[g[0]]=E}}}),l%2==1}function Kn(e,t){var n=e[0],r=e[1],i=t[0]-n,o=t[1]-r;Math.abs(i)<Lt&&(i=0),Math.abs(o)<Lt&&(o=0);var a=0,s=0,u=0;return i?o?(s=1,u=-(a=-o/i)*n-r):(s=1,u=-r):o&&(a=-1,u=n),[a,s,u]}function Zr(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],u=n===0&&o===0,f=r===0&&a===0,p=[];if(u&&f)return[];if(u){var c=-i/r;return c!==-s/a?[]:[[-1/0,c],[1/0,c]]}if(f){var l=-i/n;return l!==-s/o?[]:[[l,-1/0],[l,1/0]]}if(n===0)p=[[h=-(a*(d=-i/r)+s)/o,d]];else if(o===0)p=[[h=-(r*(d=-s/a)+i)/n,d]];else if(r===0)p=[[h=-i/n,d=-(o*h+s)/a]];else if(a===0)p=[[h=-s/o,d=-(n*h+i)/r]];else{var h,d;p=[[h=(r*s-a*i)/(a*n-r*o),d=-(n*h+i)/r]]}return p.map(function(g){return[g[0],g[1]]})}function yo(e,t){var n=t.map(function(c){return[0,1].map(function(l){return[Math.min(c[0][l],c[1][l]),Math.max(c[0][l],c[1][l])]})}),r=[];if(e.length===2){var i=e[0],o=i[0],a=i[1];if(ie(o-e[1][0])){if(!ie(a-e[1][1])){var s=Math.max.apply(Math,n.map(function(c){return c[0][0]})),u=Math.min.apply(Math,n.map(function(c){return c[0][1]}));if(ie(s-u)>0)return[];r=[[s,a],[u,a]]}}else{var f=Math.max.apply(Math,n.map(function(c){return c[1][0]})),p=Math.min.apply(Math,n.map(function(c){return c[1][1]}));if(ie(f-p)>0)return[];r=[[o,f],[o,p]]}}return r.length||(r=e.filter(function(c){var l=c[0],h=c[1];return n.every(function(d){return 0<=ie(l-d[0][0])&&0<=ie(d[0][1]-l)&&0<=ie(h-d[1][0])&&0<=ie(d[1][1]-h)})})),r.map(function(c){return[ie(c[0]),ie(c[1])]})}function Tr(e){return function(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;var i=Array(t),o=0;for(n=0;n<r;n++)for(var a=arguments[n],s=0,u=a.length;s<u;s++,o++)i[o]=a[s];return i}(e.slice(1),[e[0]]).map(function(t,n){return[e[n],t]})}var Eo=function(e,t){return(Eo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])})(e,t)},Ht=function(){return Ht=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ht.apply(this,arguments)};function fr(e){return 180*(t=[e[0].clientX,e[0].clientY],r=(n=[e[1].clientX,e[1].clientY])[0]-t[0],i=n[1]-t[1],((o=Math.atan2(i,r))>=0?o:o+2*Math.PI)/Math.PI);var t,n,r,i,o}function Xn(e){return e?e.touches?function(t){for(var n=Math.min(t.length,2),r=[],i=0;i<n;++i)r.push(Ci(t[i]));return r}(e.touches):[Ci(e)]:[]}function Si(e,t,n){var r=n.length,i=bn(e,r),o=i.clientX,a=i.clientY,s=i.originalClientX,u=i.originalClientY,f=bn(t,r),p=f.clientX,c=f.clientY,l=bn(n,r);return{clientX:s,clientY:u,deltaX:o-p,deltaY:a-c,distX:o-l.clientX,distY:a-l.clientY}}function pr(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function Ci(e){return{clientX:e.clientX,clientY:e.clientY}}function bn(e,t){t===void 0&&(t=e.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},r=Math.min(e.length,t),i=0;i<r;++i){var o=e[i];n.originalClientX+="originalClientX"in o?o.originalClientX:o.clientX,n.originalClientY+="originalClientY"in o?o.originalClientY:o.clientY,n.clientX+=o.clientX,n.clientY+=o.clientY}return t?{clientX:n.clientX/t,clientY:n.clientY/t,originalClientX:n.originalClientX/t,originalClientY:n.originalClientY/t}:n}var dr=function(){function e(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}return e.prototype.getAngle=function(t){return t===void 0&&(t=this.prevClients),fr(t)},e.prototype.getRotation=function(t){return t===void 0&&(t=this.prevClients),fr(t)-fr(this.startClients)},e.prototype.getPosition=function(t,n){t===void 0&&(t=this.prevClients);var r=Si(t||this.prevClients,this.prevClients,this.startClients),i=r.deltaX,o=r.deltaY;return this.movement+=Math.sqrt(i*i+o*o),this.prevClients=t,r},e.prototype.getPositions=function(t){t===void 0&&(t=this.prevClients);for(var n=this.prevClients,r=this.startClients,i=Math.min(this.length,n.length),o=[],a=0;a<i;++a)o[a]=Si([t[a]],[n[a]],[r[a]]);return o},e.prototype.getMovement=function(t){var n=this.movement;if(!t)return n;var r=bn(t,this.length),i=bn(this.prevClients,this.length),o=r.clientX-i.clientX,a=r.clientY-i.clientY;return Math.sqrt(o*o+a*a)+n},e.prototype.getDistance=function(t){return t===void 0&&(t=this.prevClients),pr(t)},e.prototype.getScale=function(t){return t===void 0&&(t=this.prevClients),pr(t)/pr(this.startClients)},e.prototype.move=function(t,n){this.startClients.forEach(function(r){r.clientX-=t,r.clientY-=n}),this.prevClients.forEach(function(r){r.clientX-=t,r.clientY-=n})},e}(),_i=["textarea","input"],Oa=function(e){function t(n,r){r===void 0&&(r={});var i=e.call(this)||this;i.options={},i.flag=!1,i.pinchFlag=!1,i.data={},i.isDrag=!1,i.isPinch=!1,i.clientStores=[],i.targets=[],i.prevTime=0,i.doubleFlag=!1,i._useMouse=!1,i._useTouch=!1,i._useDrag=!1,i._dragFlag=!1,i._isTrusted=!1,i._isMouseEvent=!1,i._isSecondaryButton=!1,i._preventMouseEvent=!1,i._prevInputEvent=null,i._isDragAPI=!1,i._isIdle=!0,i._preventMouseEventId=0,i._window=window,i.onDragStart=function(l,h){if(h===void 0&&(h=!0),i.flag||l.cancelable!==!1){var d=l.type.indexOf("drag")>=-1;if(!i.flag||!d){i._isDragAPI=!0;var g=i.options,v=g.container,b=g.pinchOutside,x=g.preventWheelClick,y=g.preventRightClick,E=g.preventDefault,M=g.checkInput,m=g.dragFocusedInput,D=g.preventClickEventOnDragStart,_=g.preventClickEventOnDrag,B=g.preventClickEventByCondition,F=i._useTouch,O=!i.flag;if(i._isSecondaryButton=l.which===3||l.button===2,x&&(l.which===2||l.button===1)||y&&(l.which===3||l.button===2))return i.stop(),!1;if(O){var S=i._window.document.activeElement,w=l.target;if(w){var R=w.tagName.toLowerCase(),P=_i.indexOf(R)>-1,k=w.isContentEditable;if(P||k){if(M||!m&&S===w)return!1;if(S&&(S===w||k&&S.isContentEditable&&S.contains(w))){if(!m)return!1;w.blur()}}else if((E||l.type==="touchstart")&&S){var z=S.tagName.toLowerCase();(S.isContentEditable||_i.indexOf(z)>-1)&&S.blur()}(D||_||B)&&Qt(i._window,"click",i._onClick,!0)}i.clientStores=[new dr(Xn(l))],i._isIdle=!1,i.flag=!0,i.isDrag=!1,i._isTrusted=h,i._dragFlag=!0,i._prevInputEvent=l,i.data={},i.doubleFlag=$n()-i.prevTime<200,i._isMouseEvent=(G=l)&&(G.type.indexOf("mouse")>-1||"button"in G),!i._isMouseEvent&&i._preventMouseEvent&&i._allowMouseEvent(),(i._preventMouseEvent||i.emit("dragStart",Ht(Ht({data:i.data,datas:i.data,inputEvent:l,isMouseEvent:i._isMouseEvent,isSecondaryButton:i._isSecondaryButton,isTrusted:h,isDouble:i.doubleFlag},i.getCurrentStore().getPosition()),{preventDefault:function(){l.preventDefault()},preventDrag:function(){i._dragFlag=!1}})))===!1&&i.stop(),i._isMouseEvent&&i.flag&&E&&l.preventDefault()}if(!i.flag)return!1;var A=0;if(O?(i._attchDragEvent(),F&&b&&(A=setTimeout(function(){Qt(v,"touchstart",i.onDragStart,{passive:!1})}))):F&&b&&Ut(v,"touchstart",i.onDragStart),i.flag&&function(I){return I.touches&&I.touches.length>=2}(l)){if(clearTimeout(A),O&&l.touches.length!==l.changedTouches.length)return;i.pinchFlag||i.onPinchStart(l)}}}var G},i.onDrag=function(l,h){if(i.flag){var d=i.options.preventDefault;!i._isMouseEvent&&d&&l.preventDefault(),i._prevInputEvent=l;var g=Xn(l),v=i.moveClients(g,l,!1);if(i._dragFlag){if((i.pinchFlag||v.deltaX||v.deltaY)&&(i._preventMouseEvent||i.emit("drag",Ht(Ht({},v),{isScroll:!!h,inputEvent:l})))===!1)return void i.stop();i.pinchFlag&&i.onPinch(l,g)}i.getCurrentStore().getPosition(g,!0)}},i.onDragEnd=function(l){if(i.flag){var h=i.options,d=h.pinchOutside,g=h.container,v=h.preventClickEventOnDrag,b=h.preventClickEventOnDragStart,x=h.preventClickEventByCondition,y=i.isDrag;(v||b||x)&&requestAnimationFrame(function(){i._allowClickEvent()}),x||b||!v||y||i._allowClickEvent(),i._useTouch&&d&&Ut(g,"touchstart",i.onDragStart),i.pinchFlag&&i.onPinchEnd(l);var E=l?.touches?Xn(l):[];E.length!==0&&i.options.keepDragging?i._addStore(new dr(E)):i.flag=!1;var M=i._getPosition(),m=$n(),D=!y&&i.doubleFlag;i._prevInputEvent=null,i.prevTime=y||D?0:m,i.flag||(i._dettachDragEvent(),i._preventMouseEvent||i.emit("dragEnd",Ht({data:i.data,datas:i.data,isDouble:D,isDrag:y,isClick:!y,isMouseEvent:i._isMouseEvent,isSecondaryButton:i._isSecondaryButton,inputEvent:l,isTrusted:i._isTrusted},M)),i.clientStores=[],i._isMouseEvent||(i._preventMouseEvent=!0,clearTimeout(i._preventMouseEventId),i._preventMouseEventId=setTimeout(function(){i._preventMouseEvent=!1},200)),i._isIdle=!0)}},i.onBlur=function(){i.onDragEnd()},i._allowClickEvent=function(){Ut(i._window,"click",i._onClick,!0)},i._onClick=function(l){i._allowClickEvent(),i._allowMouseEvent();var h=i.options.preventClickEventByCondition;h?.(l)||(l.stopPropagation(),l.preventDefault())},i._onContextMenu=function(l){i.options.preventRightClick?i.onDragEnd(l):l.preventDefault()},i._passCallback=function(){};var o=[].concat(n),a=o[0];i._window=fo(a)?a:Re(a),i.options=Ht({checkInput:!1,container:a&&!("document"in a)?Re(a):a,preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},r);var s=i.options,u=s.container,f=s.events,p=s.checkWindowBlur;if(i._useDrag=f.indexOf("drag")>-1,i._useTouch=f.indexOf("touch")>-1,i._useMouse=f.indexOf("mouse")>-1,i.targets=o,i._useDrag&&o.forEach(function(l){Qt(l,"dragstart",i.onDragStart)}),i._useMouse&&(o.forEach(function(l){Qt(l,"mousedown",i.onDragStart),Qt(l,"mousemove",i._passCallback)}),Qt(u,"contextmenu",i._onContextMenu)),p&&Qt(Re(),"blur",i.onBlur),i._useTouch){var c={passive:!1};o.forEach(function(l){Qt(l,"touchstart",i.onDragStart,c),Qt(l,"touchmove",i._passCallback,c)})}return i}return function(n,r){function i(){this.constructor=n}Eo(n,r),n.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}(t,e),t.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._isIdle=!0,this._allowClickEvent(),this._dettachDragEvent(),this._isDragAPI=!1},t.prototype.getMovement=function(n){return this.getCurrentStore().getMovement(n)+this.clientStores.slice(1).reduce(function(r,i){return r+i.movement},0)},t.prototype.isDragging=function(){return this.isDrag},t.prototype.isIdle=function(){return this._isIdle},t.prototype.isFlag=function(){return this.flag},t.prototype.isPinchFlag=function(){return this.pinchFlag},t.prototype.isDoubleFlag=function(){return this.doubleFlag},t.prototype.isPinching=function(){return this.isPinch},t.prototype.scrollBy=function(n,r,i,o){o===void 0&&(o=!0),this.flag&&(this.clientStores[0].move(n,r),o&&this.onDrag(i,!0))},t.prototype.move=function(n,r){var i=n[0],o=n[1],a=this.getCurrentStore().prevClients;return this.moveClients(a.map(function(s){var u=s.clientX,f=s.clientY;return{clientX:u+i,clientY:f+o,originalClientX:u,originalClientY:f}}),r,!0)},t.prototype.triggerDragStart=function(n){this.onDragStart(n,!1)},t.prototype.setEventData=function(n){var r=this.data;for(var i in n)r[i]=n[i];return this},t.prototype.setEventDatas=function(n){return this.setEventData(n)},t.prototype.getCurrentEvent=function(n){return n===void 0&&(n=this._prevInputEvent),Ht(Ht({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:n})},t.prototype.getEventData=function(){return this.data},t.prototype.getEventDatas=function(){return this.data},t.prototype.unset=function(){var n=this,r=this.targets,i=this.options.container;this.off(),Ut(this._window,"blur",this.onBlur),this._useDrag&&r.forEach(function(o){Ut(o,"dragstart",n.onDragStart)}),this._useMouse&&(r.forEach(function(o){Ut(o,"mousedown",n.onDragStart)}),Ut(i,"contextmenu",this._onContextMenu)),this._useTouch&&(r.forEach(function(o){Ut(o,"touchstart",n.onDragStart)}),Ut(i,"touchstart",this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},t.prototype.onPinchStart=function(n){var r=this,i=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>i)){var o=new dr(Xn(n));this.pinchFlag=!0,this._addStore(o),this.emit("pinchStart",Ht(Ht({data:this.data,datas:this.data,angle:o.getAngle(),touches:this.getCurrentStore().getPositions()},o.getPosition()),{inputEvent:n,isTrusted:this._isTrusted,preventDefault:function(){n.preventDefault()},preventDrag:function(){r._dragFlag=!1}}))===!1&&(this.pinchFlag=!1)}},t.prototype.onPinch=function(n,r){if(this.flag&&this.pinchFlag&&!(r.length<2)){var i=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",Ht(Ht({data:this.data,datas:this.data,movement:this.getMovement(r),angle:i.getAngle(r),rotation:i.getRotation(r),touches:i.getPositions(r),scale:i.getScale(r),distance:i.getDistance(r)},i.getPosition(r)),{inputEvent:n,isTrusted:this._isTrusted}))}},t.prototype.onPinchEnd=function(n){if(this.pinchFlag){var r=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var i=this.getCurrentStore();this.emit("pinchEnd",Ht(Ht({data:this.data,datas:this.data,isPinch:r,touches:i.getPositions()},i.getPosition()),{inputEvent:n}))}},t.prototype.getCurrentStore=function(){return this.clientStores[0]},t.prototype.moveClients=function(n,r,i){var o=this._getPosition(n,i),a=this.isDrag;(o.deltaX||o.deltaY)&&(this.isDrag=!0);var s=!1;return!a&&this.isDrag&&(s=!0),Ht(Ht({data:this.data,datas:this.data},o),{movement:this.getMovement(n),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:r,isTrusted:this._isTrusted,isFirstDrag:s})},t.prototype._addStore=function(n){this.clientStores.splice(0,0,n)},t.prototype._getPosition=function(n,r){var i=this.getCurrentStore().getPosition(n,r),o=this.clientStores.slice(1).reduce(function(u,f){var p=f.getPosition();return u.distX+=p.distX,u.distY+=p.distY,u},i),a=o.distX,s=o.distY;return Ht(Ht({},i),{distX:a,distY:s})},t.prototype._attchDragEvent=function(){var n=this._window,r=this.options.container,i={passive:!1};this._isDragAPI&&(Qt(r,"dragover",this.onDrag,i),Qt(n,"dragend",this.onDragEnd)),this._useMouse&&(Qt(r,"mousemove",this.onDrag),Qt(n,"mouseup",this.onDragEnd)),this._useTouch&&(Qt(r,"touchmove",this.onDrag,i),Qt(n,"touchend",this.onDragEnd,i),Qt(n,"touchcancel",this.onDragEnd,i))},t.prototype._dettachDragEvent=function(){var n=this._window,r=this.options.container;this._isDragAPI&&(Ut(r,"dragover",this.onDrag),Ut(n,"dragend",this.onDragEnd)),this._useMouse&&(Ut(r,"mousemove",this.onDrag),Ut(n,"mouseup",this.onDragEnd)),this._useTouch&&(Ut(r,"touchstart",this.onDragStart),Ut(r,"touchmove",this.onDrag),Ut(n,"touchend",this.onDragEnd),Ut(n,"touchcancel",this.onDragEnd))},t.prototype._allowMouseEvent=function(){this._preventMouseEvent=!1,clearTimeout(this._preventMouseEventId)},t}(xo);function Pa(e){var t="rCS"+function(n){for(var r=5381,i=n.length;i;)r=33*r^n.charCodeAt(--i);return r>>>0}(e).toString(36);return{className:t,inject:function(n,r){r===void 0&&(r={});var i=function(s){if(s&&s.getRootNode){var u=s.getRootNode();if(u.nodeType===11)return u}}(n),o=(i||n.ownerDocument||document).querySelector('style[data-styled-id="'.concat(t,'"]'));if(o){var a=parseFloat(o.getAttribute("data-styled-count"))||0;o.setAttribute("data-styled-count","".concat(a+1))}else o=function(s,u,f,p,c){var l,h,d=Hr(p),g=d.createElement("style");return g.setAttribute("type","text/css"),g.setAttribute("data-styled-id",s),g.setAttribute("data-styled-count","1"),f.nonce&&g.setAttribute("nonce",f.nonce),g.innerHTML=(l=s,h=u,f.original?h:h.replace(/([^};{\s}][^};{]*|^\s*){/gm,function(v,b){var x=b.trim();return(x?gn(x):[""]).map(function(y){var E=y.trim();return E.indexOf("@")===0?E:E.indexOf(":global")>-1?E.replace(/\:global/g,""):E.indexOf(":host")>-1?"".concat(E.replace(/\:host/g,".".concat(l))):E?".".concat(l," ").concat(E):".".concat(l)}).join(", ")+" {"})),(c||d.head||d.body).appendChild(g),g}(t,e,r,n,i);return{destroy:function(){var s,u=parseFloat(o.getAttribute("data-styled-count"))||0;u<=1?(o.remove?o.remove():(s=o.parentNode)===null||s===void 0||s.removeChild(o),o=null):o.setAttribute("data-styled-count","".concat(u-1))}}}}}var Or=function(){return Or=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Or.apply(this,arguments)};function Do(e,t){var n=Pa(t),r=n.className;return Oe.forwardRef(function(i,o){var a=i.className,s=a===void 0?"":a;i.cspNonce;var u=function(p,c){var l={};for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&c.indexOf(h)<0&&(l[h]=p[h]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function"){var d=0;for(h=Object.getOwnPropertySymbols(p);d<h.length;d++)c.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(p,h[d])&&(l[h[d]]=p[h[d]])}return l}(i,["className","cspNonce"]),f=Oe.useRef();return Oe.useImperativeHandle(o,function(){return f.current},[]),Oe.useEffect(function(){var p=n.inject(f.current,{nonce:i.cspNonce});return function(){p.destroy()}},[]),Oe.createElement(e,Or({ref:f,"data-styled-id":r,className:"".concat(s," ").concat(r)},u))})}var wo=function(e,t){return(wo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])})(e,t)};function kn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}wo(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var C=function(){return C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},C.apply(this,arguments)};function T(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function $(e,t,n){if(arguments.length===2)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function _n(e,t){return C({events:[],props:[],name:e},t)}var Ra,Ti,Oi,ka=["n","w","s","e"],$r=["n","w","s","e","nw","ne","sw","se"],on=function(){if(typeof navigator>"u"||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(){var e=navigator.userAgentData,t=(e.uaList||e.brands).slice(),n=e.mobile||!1,r=t[0],i=(e.platform||navigator.platform).toLowerCase(),o={name:r.brand,version:r.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Gn(ro,t).brand||hi(li())},a={name:"unknown",version:"-1",majorVersion:-1};o.webkit=!o.chromium&&Nr(ur,function(c){return no(t,c)});var s=Gn(pi,t);if(o.chromium=!!s.brand,o.chromiumVersion=s.version||"-1",!o.chromium){var u=Gn(ur,t);o.webkit=!!u.brand,o.webkitVersion=u.version||"-1"}var f=eo(di,function(c){return new RegExp(""+c.test,"g").exec(i)});a.name=f?f.id:"";var p=Gn(fi,t);return o.name=p.brand||o.name,o.version=(p.brand,p.version),o.webkit&&(a.name=n?"ios":"mac"),a.name==="ios"&&o.webview&&(o.version="-1"),a.version=wr(a.version),o.version=wr(o.version),a.majorVersion=parseInt(a.version,10),o.majorVersion=parseInt(o.version,10),{browser:o,os:a,isMobile:n,isHints:!0}}():function(){var e=li(Ra),t=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:hi(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},i=hn(fi,e),o=i.preset,a=i.version,s=hn(di,e),u=s.preset,f=s.version,p=hn(pi,e);if(n.chromium=!!p.preset,n.chromiumVersion=p.version,!n.chromium){var c=hn(ur,e);n.webkit=!!c.preset,n.webkitVersion=c.version}return u&&(r.name=u.id,r.version=f,r.majorVersion=parseInt(f,10)),o&&(n.name=o.id,n.version=a,n.webview&&r.name==="ios"&&n.name!=="safari"&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:r,isMobile:t,isHints:!1}}(),Mo=on.browser.webkit,So=Mo&&(Ti=typeof window>"u"?{userAgent:""}:window.navigator,!!(Oi=/applewebkit\/([^\s]+)/g.exec(Ti.userAgent.toLowerCase()))&&parseFloat(Oi[1])<605),Co=on.browser.name,_o=parseInt(on.browser.version,10),Ba=Co==="chrome",Fa=on.browser.chromium,za=parseInt(on.browser.chromiumVersion,10)||0,Aa=Ba&&_o>=109||Fa&&za>=109,Ga=Co==="firefox",Ia=parseInt(on.browser.webkitVersion,10)>=612||_o>=15,Qr="moveable-",Ya=$r.map(function(e){var t="",n="",r="center",i="center",o="calc(var(--moveable-control-padding, 20) * -1px)";return e.indexOf("n")>-1&&(t="top: ".concat(o,";"),i="bottom"),e.indexOf("s")>-1&&(t="top: 0px;",i="top"),e.indexOf("w")>-1&&(n="left: ".concat(o,";"),r="right"),e.indexOf("e")>-1&&(n="left: 0px;",r="left"),'.around-control[data-direction*="'.concat(e,`"] {
|
|
7
|
-
`).concat(n).concat(t,`
|
|
8
|
-
transform-origin: `).concat(r," ").concat(i,`;
|
|
9
|
-
}`)}).join(`
|
|
10
|
-
`),Xa=`
|
|
11
|
-
{
|
|
12
|
-
position: absolute;
|
|
13
|
-
width: 1px;
|
|
14
|
-
height: 1px;
|
|
15
|
-
left: 0;
|
|
16
|
-
top: 0;
|
|
17
|
-
z-index: 3000;
|
|
18
|
-
--moveable-color: #4af;
|
|
19
|
-
--zoom: 1;
|
|
20
|
-
--zoompx: 1px;
|
|
21
|
-
--moveable-line-padding: 0;
|
|
22
|
-
--moveable-control-padding: 0;
|
|
23
|
-
will-change: transform;
|
|
24
|
-
outline: 1px solid transparent;
|
|
25
|
-
}
|
|
26
|
-
.control-box {
|
|
27
|
-
z-index: 0;
|
|
28
|
-
}
|
|
29
|
-
.line, .control {
|
|
30
|
-
position: absolute;
|
|
31
|
-
left: 0;
|
|
32
|
-
top: 0;
|
|
33
|
-
will-change: transform;
|
|
34
|
-
}
|
|
35
|
-
.control {
|
|
36
|
-
width: 14px;
|
|
37
|
-
height: 14px;
|
|
38
|
-
border-radius: 50%;
|
|
39
|
-
border: 2px solid #fff;
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
background: #4af;
|
|
42
|
-
background: var(--moveable-color);
|
|
43
|
-
margin-top: -7px;
|
|
44
|
-
margin-left: -7px;
|
|
45
|
-
border: 2px solid #fff;
|
|
46
|
-
z-index: 10;
|
|
47
|
-
}
|
|
48
|
-
.around-control {
|
|
49
|
-
position: absolute;
|
|
50
|
-
will-change: transform;
|
|
51
|
-
width: calc(var(--moveable-control-padding, 20) * 1px);
|
|
52
|
-
height: calc(var(--moveable-control-padding, 20) * 1px);
|
|
53
|
-
left: calc(var(--moveable-control-padding, 20) * -0.5px);
|
|
54
|
-
top: calc(var(--moveable-control-padding, 20) * -0.5px);
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
background: transparent;
|
|
57
|
-
z-index: 8;
|
|
58
|
-
cursor: alias;
|
|
59
|
-
transform-origin: center center;
|
|
60
|
-
}
|
|
61
|
-
`.concat(Ya,`
|
|
62
|
-
.padding {
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: 0px;
|
|
65
|
-
left: 0px;
|
|
66
|
-
width: 100px;
|
|
67
|
-
height: 100px;
|
|
68
|
-
transform-origin: 0 0;
|
|
69
|
-
}
|
|
70
|
-
.line {
|
|
71
|
-
width: 1px;
|
|
72
|
-
height: 1px;
|
|
73
|
-
background: #4af;
|
|
74
|
-
background: var(--moveable-color);
|
|
75
|
-
transform-origin: 0px 50%;
|
|
76
|
-
}
|
|
77
|
-
.line.edge {
|
|
78
|
-
z-index: 1;
|
|
79
|
-
background: transparent;
|
|
80
|
-
}
|
|
81
|
-
.line.dashed {
|
|
82
|
-
box-sizing: border-box;
|
|
83
|
-
background: transparent;
|
|
84
|
-
}
|
|
85
|
-
.line.dashed.horizontal {
|
|
86
|
-
border-top: 1px dashed #4af;
|
|
87
|
-
border-top-color: #4af;
|
|
88
|
-
border-top-color: var(--moveable-color);
|
|
89
|
-
}
|
|
90
|
-
.line.dashed.vertical {
|
|
91
|
-
border-left: 1px dashed #4af;
|
|
92
|
-
border-left-color: #4af;
|
|
93
|
-
border-left-color: var(--moveable-color);
|
|
94
|
-
}
|
|
95
|
-
.line.vertical {
|
|
96
|
-
transform: translateX(-50%);
|
|
97
|
-
}
|
|
98
|
-
.line.horizontal {
|
|
99
|
-
transform: translateY(-50%);
|
|
100
|
-
}
|
|
101
|
-
.line.vertical.bold {
|
|
102
|
-
width: 2px;
|
|
103
|
-
}
|
|
104
|
-
.line.horizontal.bold {
|
|
105
|
-
height: 2px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.control.origin {
|
|
109
|
-
border-color: #f55;
|
|
110
|
-
background: #fff;
|
|
111
|
-
width: 12px;
|
|
112
|
-
height: 12px;
|
|
113
|
-
margin-top: -6px;
|
|
114
|
-
margin-left: -6px;
|
|
115
|
-
pointer-events: none;
|
|
116
|
-
}
|
|
117
|
-
`).concat([0,15,30,45,60,75,90,105,120,135,150,165].map(function(e){return`
|
|
118
|
-
.direction[data-rotation="`.concat(e,'"], :global .view-control-rotation').concat(e,` {
|
|
119
|
-
`).concat(function(t){var n,r=(n=t,'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(32,'px" height="').concat(32,'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(').concat(n,'deg);transform-origin: 16px 16px"></path></svg>')),i=45*Math.round(t/45)%180,o="ns-resize";return i===135?o="nwse-resize":i===45?o="nesw-resize":i===90&&(o="ew-resize"),"cursor:".concat(o,";cursor: url('").concat(r,"') 16 16, ").concat(o,";")}(e),`
|
|
120
|
-
}
|
|
121
|
-
`)}).join(`
|
|
122
|
-
`),`
|
|
123
|
-
|
|
124
|
-
.line.direction:before {
|
|
125
|
-
content: "";
|
|
126
|
-
position: absolute;
|
|
127
|
-
width: 100%;
|
|
128
|
-
height: calc(var(--moveable-line-padding, 0) * 1px);
|
|
129
|
-
bottom: 0;
|
|
130
|
-
left: 0;
|
|
131
|
-
}
|
|
132
|
-
.group {
|
|
133
|
-
z-index: -1;
|
|
134
|
-
}
|
|
135
|
-
.area {
|
|
136
|
-
position: absolute;
|
|
137
|
-
}
|
|
138
|
-
.area-pieces {
|
|
139
|
-
position: absolute;
|
|
140
|
-
top: 0;
|
|
141
|
-
left: 0;
|
|
142
|
-
display: none;
|
|
143
|
-
}
|
|
144
|
-
.area.avoid, .area.pass {
|
|
145
|
-
pointer-events: none;
|
|
146
|
-
}
|
|
147
|
-
.area.avoid+.area-pieces {
|
|
148
|
-
display: block;
|
|
149
|
-
}
|
|
150
|
-
.area-piece {
|
|
151
|
-
position: absolute;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
`).concat(So?`:global svg *:before {
|
|
155
|
-
content:"";
|
|
156
|
-
transform-origin: inherit;
|
|
157
|
-
}`:"",`
|
|
158
|
-
`),hr=1e-4,ue=1e-7,Pr=Math.pow(10,10),Pi=-Pr,Rr={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},Ri={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},Na=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate","waitToChangeTarget","updateSelectors","getTargets","stopDrag","getControlBoxElement","getMoveables","getDragElement"];function To(e,t,n,r,i,o){var a,s,u=(s=(a=t.gestos[o])===null||a===void 0?void 0:a.move(n,e.inputEvent))!==null&&s!==void 0?s:{},f=u.originalDatas||u.datas,p=f[o]||(f[o]={});return C(C({},u),{isPinch:!!r,parentEvent:!0,datas:p,originalDatas:e.originalDatas})}var Oo=function(){function e(t){var n;t===void 0&&(t="draggable"),this.ableName=t,this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}},this.datas=((n={})[t]={},n)}return e.prototype.dragStart=function(t,n){this.isDrag=!1,this.isFlag=!1;var r=n.originalDatas;return this.datas=r,r[this.ableName]||(r[this.ableName]={}),C(C({},this.move(t,n.inputEvent)),{type:"dragstart"})},e.prototype.drag=function(t,n){return this.move([t[0]-this.prevX,t[1]-this.prevY],n)},e.prototype.move=function(t,n){var r,i,o=!1;if(this.isFlag){var a=this.isDrag;r=this.prevX+t[0],i=this.prevY+t[1],(t[0]||t[1])&&(this.isDrag=!0),!a&&this.isDrag&&(o=!0)}else this.prevX=t[0],this.prevY=t[1],this.startX=t[0],this.startY=t[1],r=t[0],i=t[1],this.isFlag=!0;return this.prevX=r,this.prevY=i,{type:"drag",clientX:r,clientY:i,inputEvent:n,isFirstDrag:o,isDrag:this.isDrag,distX:r-this.startX,distY:i-this.startY,deltaX:t[0],deltaY:t[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},e}();function xn(e,t,n,r){var i=e.length===16?4:3,o=T($e(e,n,r,i),4),a=T(o[0],2),s=a[0],u=a[1],f=T(o[1],2),p=f[0],c=f[1],l=T(o[2],2),h=l[0],d=l[1],g=T(o[3],2),v=g[0],b=g[1],x=T(Ee(e,t,i),2),y=x[0],E=x[1],M=Math.min(s,p,h,v),m=Math.min(u,c,d,b),D=Math.max(s,p,h,v);return s=s-M||0,{left:M,top:m,right:D,bottom:Math.max(u,c,d,b),origin:[y=y-M||0,E=E-m||0],pos1:[s,u=u-m||0],pos2:[p=p-M||0,c=c-m||0],pos3:[h=h-M||0,d=d-m||0],pos4:[v=v-M||0,b=b-m||0],direction:Ke(e[0]*e[i+1])}}function Po(e,t){var n=t.datas,r=e.state,i=r.allMatrix,o=r.beforeMatrix,a=r.is3d,s=r.left,u=r.top,f=r.origin,p=r.offsetMatrix,c=r.targetMatrix,l=r.transformOrigin,h=a?4:3;n.is3d=a,n.matrix=i,n.targetMatrix=c,n.beforeMatrix=o,n.offsetMatrix=p,n.transformOrigin=l,n.inverseMatrix=Ge(i,h),n.inverseBeforeMatrix=Ge(o,h),n.absoluteOrigin=Rn(Wt([s,u],f),h),n.startDragBeforeDist=be(n.inverseBeforeMatrix,n.absoluteOrigin,h),n.startDragDist=be(n.inverseMatrix,n.absoluteOrigin,h)}function ki(e){var t=e.datas,n=e.distX,r=e.distY,i=t.inverseBeforeMatrix,o=t.is3d,a=t.startDragBeforeDist,s=o?4:3;return bt(be(i,Wt(t.absoluteOrigin,[n,r]),s),a)}function Tn(e,t){var n=e.datas,r=e.distX,i=e.distY;n.inverseBeforeMatrix;var o=n.inverseMatrix,a=n.is3d;n.startDragBeforeDist;var s=n.startDragDist,u=a?4:3;return bt(be(o,Wt(n.absoluteOrigin,[r,i]),u),s)}function gr(e,t){var n=(t+1)/2;return[gi(e[0][0],e[1][0],n,1-n),gi(e[0][1],e[1][1],n,1-n)]}function ae(e,t){var n=gr([e[0],e[1]],t[0]),r=gr([e[2],e[3]],t[0]);return gr([n,r],t[1])}function Bi(e,t,n,r){return Vt(e,Dn(t,r,n),r)}function vr(e,t,n){var r=Ze(t),i=t.datas;if(i.transformIndex=n,n!==-1){var o=r.startTransforms[n];if(o){var a=e.state,s=tn([o],{"x%":function(u){return u/100*a.offsetWidth},"y%":function(u){return u/100*a.offsetHeight}});i.startValue=s[0].functionValue}}}function Ze(e){return e.originalDatas.beforeRenderable}function Jn(e){return e.originalDatas.beforeRenderable.nextTransforms}function Nn(e){return(Jn(e)||[]).join(" ")}function Wn(e){return Ze(e).nextStyle}function Wa(e){if(e&&e.getRootNode){var t=e.getRootNode();if(t.nodeType===11)return t}}function ja(e){var t=e("scale"),n=e("rotate"),r=e("translate"),i=[];return r&&r!=="0px"&&r!=="none"&&i.push("translate(".concat(r.split(/\s+/).join(","),")")),n&&n!=="1"&&n!=="none"&&i.push("rotate(".concat(n,")")),t&&t!=="1"&&t!=="none"&&i.push("scale(".concat(t.split(/\s+/).join(","),")")),i}function Fi(e,t,n){for(var r,i,o,a=e,s=[],u=Lr(e)||Be(e),f=!n&&e===t||e===u,p=f,c=!1,l=3,h=!1,d=On(t,t,!0).offsetParent,g=1;a&&!p;){p=f;var v=ce(a),b=v("position"),x=Yo(a),y=b==="fixed",E=ja(v),M=ba(Za(x)),m=void 0,D=!1,_=!1,B=0,F=0,O=0,S=0,w={hasTransform:!1,fixedContainer:null};y&&(h=!0,d=(w=Qa(a)).fixedContainer);var R=M.length;c||R!==16&&!E.length||(c=!0,l=4,Fr(s),o&&(o=Ie(o,3,4))),c&&R===9&&(M=Ie(M,3,4));var P=$a(a,e),k=P.tagName,z=P.hasOffset,A=P.isSVG,G=P.origin,I=P.targetOrigin,V=T(P.offset,2),vt=V[0],lt=V[1];k==="svg"&&!a.ownerSVGElement&&o&&(s.push({type:"target",target:a,matrix:Ka(a,l)}),s.push({type:"offset",target:a,matrix:It(l)}));var H=parseFloat(v("zoom"))||1;if(y)m=w.fixedContainer,D=!0;else{var W=On(a,t,!1,!0,v),j=W.offsetZoom;if(m=W.offsetParent,D=W.isEnd,_=W.isStatic,g*=j,(W.isCustomElement||j!==1)&&_)vt-=m.offsetLeft,lt-=m.offsetTop;else if((Ga||Aa)&&W.parentSlotElement){for(var K=m,xt=0,qt=0;K&&Wa(K);)xt+=K.offsetLeft,qt+=K.offsetTop,K=K.offsetParent;vt-=xt,lt-=qt}}if(!Mo||Ia||!z||A||!_||b!=="relative"&&b!=="static"||(vt-=m.offsetLeft,lt-=m.offsetTop,f=f||D),y)z&&w.hasTransform&&(O=m.clientLeft,S=m.clientTop);else if(z&&d!==m&&(B=m.clientLeft,F=m.clientTop),z&&m===u){var q=Xo(a,!1);vt+=q[0],lt+=q[1]}if(s.push({type:"target",target:a,matrix:Dn(M,l,G)}),E.length&&(s.push({type:"offset",target:a,matrix:It(l)}),s.push({type:"target",target:a,matrix:Dn(Ur(E),l,G)})),z){var U=a===e,J=U?0:a.scrollLeft,Z=U?0:a.scrollTop;s.push({type:"offset",target:a,matrix:Ye([vt-J+B-O,lt-Z+F-S],l)})}else s.push({type:"offset",target:a,origin:G});if(H!==1&&s.push({type:"zoom",target:a,matrix:Dn(ho([H,H],l),l,[0,0])}),o||(o=M),r||(r=G),i||(i=I),p||y)break;a=m,f=D,n&&a!==u||(p=f)}return o||(o=It(l)),r||(r=[0,0]),i||(i=[0,0]),{zoom:g,offsetContainer:d,matrixes:s,targetMatrix:o,transformOrigin:r,targetOrigin:i,is3d:c,hasFixed:h}}var yn=null,En=null,qe=null;function en(e){e?(window.Map&&(yn=new Map,En=new Map),qe=[]):(yn=null,qe=null,En=null)}function ce(e){var t=yn?.get(e);if(!t){var n=Re(e).getComputedStyle(e);if(!yn)return function(o){return n[o]};t={style:n,cached:{}},yn.set(e,t)}var r=t.cached,i=t.style;return function(o){return o in r||(r[o]=i[o]),r[o]}}function Xe(e,t,n){var r=n.originalDatas;r.groupable=r.groupable||{};var i=r.groupable;i.childDatas=i.childDatas||[];var o=i.childDatas;return e.moveables.map(function(a,s){return o[s]=o[s]||{},o[s][t]=o[s][t]||{},C(C({},n),{isRequestChild:!0,datas:o[s][t],originalDatas:o[s]})})}function mr(e,t,n,r,i,o,a){var s=!!n.match(/Start$/g),u=!!n.match(/End$/g),f=i.isPinch,p=i.datas,c=Xe(e,t.name,i),l=e.moveables,h=[],d=c.map(function(g,v){var b=l[v],x=b.state,y=x.gestos,E=g;if(s)E=new Oo(a).dragStart(r,g),h.push(E);else{if(y[a]||(y[a]=p.childGestos[v]),!y[a])return;E=To(g,x,r,f,0,a),h.push(E)}var M=t[n](b,C(C({},E),{parentFlag:!0}));return u&&(y[a]=null),M});return s&&(p.childGestos=l.map(function(g){return g.state.gestos[a]})),{eventParams:d,childEvents:h}}function br(e,t,n,r,i,o){i===void 0&&(i=function(f,p){return p});var a=!!n.match(/End$/g),s=Xe(e,t.name,r),u=e.moveables;return s.map(function(f,p){var c,l=u[p];c=i(l,f);var h=t[n](l,C(C({},c),{parentFlag:!0}));return a&&(l.state.gestos={}),h})}function zi(e,t,n,r){var i=n.fixedDirection,o=n.fixedPosition,a=ae(r.datas.startPositions||ke(t.state),i),s=T(be(ir(-e.rotation/180*Math.PI,3),[a[0]-o[0],a[1]-o[1],1],3),2),u=s[0],f=s[1];return r.datas.originalX=u,r.datas.originalY=f,r}function Ai(e,t,n,r){var i=wn(e.props,n),o=i.renderDirections,a=o===void 0?t:o,s=i.displayAroundControls;if(!a)return[];var u=a===!0?$r:a;return $($([],T(s?function(f,p,c,l){var h=f.renderState;h.renderDirectionMap||(h.renderDirectionMap={});var d=f.getState(),g=d.renderPoses,v=d.rotation,b=d.direction,x=h.renderDirectionMap,y=f.props.zoom,E=Ke(b),M=v/Math.PI*180;return(l||Cn(x)).map(function(m){var D=Rr[m];if(!D)return null;var _=(Bt(M,15)+E*Ri[m]+720)%180,B=["around-control"];return c&&B.push("direction",c),p.createElement("div",{className:Xt.apply(void 0,$([],T(B),!1)),"data-rotation":_,"data-direction":m,key:"direction-around-".concat(m),style:er.apply(void 0,$([v,y],T(D.map(function(F){return g[F]})),!1))})})}(e,r,n,u):[]),!1),T(function(f,p,c,l){var h,d=f.getState(),g=d.renderPoses,v=d.rotation,b=d.direction,x=wn(f.props,p).zoom,y=((h=v/Math.PI*180)<0&&(h=h%360+360),h%360),E={},M=f.renderState;M.renderDirectionMap||(M.renderDirectionMap={});var m=M.renderDirectionMap;c.forEach(function(_){var B=_.dir;E[B]=!0});var D=Ke(b);return c.map(function(_){var B=_.data,F=_.classNames,O=_.dir,S=Rr[O];if(!S||!E[O])return null;m[O]=!0;var w=(Bt(y,15)+D*Ri[O]+720)%180,R={};return Cn(B).forEach(function(P){R["data-".concat(P)]=B[P]}),l.createElement("div",C({className:Xt.apply(void 0,$(["control","direction",O,p],T(F),!1)),"data-rotation":w,"data-direction":O},R,{key:"direction-".concat(O),style:er.apply(void 0,$([v,x],T(S.map(function(P){return g[P]})),!1))}))})}(e,n,u.map(function(f){return{data:{},classNames:[],dir:f}}),r)),!1)}function Kr(e,t,n,r,i,o){for(var a=[],s=6;s<arguments.length;s++)a[s-6]=arguments[s];var u=pe(n,r),f=t?Bt(u/Math.PI*180,15)%180:-1;return e.createElement("div",{key:"line-".concat(o),className:Xt.apply(void 0,$(["line","direction",t?"edge":"",t],T(a),!1)),"data-rotation":f,"data-line-key":o,"data-direction":t,style:Ja(n,r,i,u)})}function Ro(e,t,n,r,i){return(n===!0?ka:n).map(function(o,a){var s=T(Rr[o],2),u=s[0],f=s[1];if(f!=null)return Kr(e,o,r[u],r[f],i,"".concat(t,"Edge").concat(a),t)}).filter(Boolean)}function ko(e,t){var n=e.state,r=n.containerClientRect,i=r.clientHeight,o=r.clientWidth,a=r.clientLeft,s=r.clientTop,u=n.snapOffset,f=u.left,p=u.top,c=u.right,l=u.bottom,h=e.props.bounds||{},d=(h.position||"client")==="css",g=h.left,v=g===void 0?-1/0:g,b=h.top,x=b===void 0?-1/0:b,y=h.right,E=y===void 0?d?-1/0:1/0:y,M=h.bottom,m=M===void 0?d?-1/0:1/0:M;return d&&(E=o+c-f-E,m=i+l-p-m),{left:v+f-a,right:E+f-a,top:x+p-s,bottom:m+p-s}}function Gi(e,t,n){var r=e[n?"left":"top"],i=e[n?"right":"bottom"],o=Math.min.apply(Math,$([],T(t),!1)),a=Math.max.apply(Math,$([],T(t),!1)),s=[];return r+1>o&&s.push({direction:"start",isBound:!0,offset:o-r,pos:r}),i-1<a&&s.push({direction:"end",isBound:!0,offset:a-i,pos:i}),s.length||s.push({isBound:!1,offset:0,pos:0}),s.sort(function(u,f){return Y(f.offset)-Y(u.offset)})}var qa=["left","right","center"],Ha=["top","bottom","middle"];function Bo(e,t){var n=e.props,r=n.snappable,i=n.bounds,o=n.innerBounds,a=n.verticalGuidelines,s=n.horizontalGuidelines,u=n.snapGridWidth,f=n.snapGridHeight,p=e.state,c=p.guidelines,l=p.enableSnap;return!(!r||!l||t&&r!==!0&&r.indexOf(t)<0||!(u||f||i||o||c&&c.length||a&&a.length||s&&s.length))}function Ii(e){return e===!1?{}:e!==!0&&e?e:{left:!0,right:!0,top:!0,bottom:!0}}function Fo(e,t,n,r,i,o,a){var s;r===void 0&&(r=[]),i===void 0&&(i=[]);var u,f,p,c,l,h,d=e.props,g=((s=e.state.snapThresholdInfo)===null||s===void 0?void 0:s.multiples)||[1,1],v=Vi(a,d.snapHorizontalThreshold,5),b=Vi(o,d.snapVerticalThreshold,5);return u=e.state.guidelines,f=n,p=r,c=i,l=v,{vertical:Yi(u,"vertical",t,b*(h=g)[0],p),horizontal:Yi(u,"horizontal",f,l*h[1],c)}}function kr(e){var t=e.isSnap;if(!t)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var n=e.posInfos[0],r=n.guidelineInfos[0],i=r.offset,o=r.dist,a=r.guideline;return{isSnap:t,offset:i,dist:o,pos:n.pos,guideline:a}}function Yi(e,t,n,r,i){var o,a;if(i===void 0&&(i=[]),!e||!e.length)return{isSnap:!1,index:-1,direction:"",posInfos:[]};var s=t==="vertical"?0:1,u=n.map(function(p,c){var l=i[c]||"",h=e.map(function(d){var g=d.pos,v=p-g[s];return{offset:v,dist:Y(v),guideline:d,direction:l}}).filter(function(d){var g=d.guideline,v=d.dist;return!(g.type!==t||v>r)}).sort(function(d,g){return d.dist-g.dist});return{pos:p,index:c,guidelineInfos:h,direction:l}}).filter(function(p){return p.guidelineInfos.length>0}).sort(function(p,c){return p.guidelineInfos[0].dist-c.guidelineInfos[0].dist}),f=u.length>0;return{isSnap:f,index:f?u[0].index:-1,direction:(a=(o=u[0])===null||o===void 0?void 0:o.direction)!==null&&a!==void 0?a:"",posInfos:u}}function tr(e,t){return e.slice().sort(function(n,r){var i,o,a,s,u=n.sign[t],f=r.sign[t],p=n.offset[t],c=r.offset[t];return u?f?(i={isBound:n.isBound,isSnap:n.isSnap,offset:p},o={isBound:r.isBound,isSnap:r.isSnap,offset:c},a=Y(i.offset),s=Y(o.offset),i.isBound&&o.isBound?s-a:i.isBound?-1:o.isBound?1:i.isSnap&&o.isSnap?s-a:i.isSnap?-1:o.isSnap||a<ue?1:s<ue?-1:a-s):-1:1})[0]}function zo(e,t){var n,r,i=T(t,2),o=i[0],a=i[1],s=a[0]-o[0],u=a[1]-o[1];return Y(s)<ue&&(s=0),Y(u)<ue&&(u=0),s?u?(n=u/s*(e[0]-o[0])+o[1],r=e[1]):(n=o[1],r=e[1]):(n=o[0],r=e[0]),n-r}function Xi(e,t,n,r,i){return i===void 0&&(i=0),r&&t-i<=e||!r&&e<=n+i?{isBound:!0,offset:r?t-e:n-e}:{isBound:!1,offset:0}}function jn(e,t,n,r,i,o){var a,s,u=T(t,2),f=u[0],p=u[1],c=e[0],l=n[0],h=n[1],d=nr(h[1]-l[1]),g=p,v=-f/p;return nr(h[0]-l[0])?d?{isBound:!1,offset:0}:f?Xi((l[1]-c[1])/v+c[0],l[0],h[0],r,i):{isBound:s=Y(a=l[1]-c[1])<=0,offset:s?a:0}:g?Xi(v*(l[0]-c[0])+c[1],l[1],h[1],r,i):{isBound:s=Y(a=l[0]-c[0])<=0,offset:s?a:0}}function Ao(e,t,n){return t.map(function(r){var i=function(c,l){var h=l.line,d=l.centerSign,g=l.verticalSign,v=l.horizontalSign,b=l.lineConstants,x=c.props.innerBounds;if(!x)return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var y,E,M,m=x.left,D=x.top,_=x.width,B=x.height,F=[[m,D],[m,D+B]],O=[[m,D],[m+_,D]],S=[[m+_,D],[m+_,D+B]],w=[[m,D+B],[m+_,D+B]];if(y=h,E=d,M===void 0&&(M=ue),[[m,D],[m+_,D],[m,D+B],[m+_,D+B]].every(function(K){var xt=zo(K,y);return xt<=0===E||Y(xt)<=M}))return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var R=jn(h,b,O,g),P=jn(h,b,w,g),k=jn(h,b,F,v),z=jn(h,b,S,v),A=R.isBound&&P.isBound,G=R.isBound||P.isBound,I=k.isBound&&z.isBound,V=k.isBound||z.isBound,vt=Ve(R.offset,P.offset),lt=Ve(k.offset,z.offset),H=[0,0],W=!1,j=!1;return Y(lt)<Y(vt)?(H=[vt,0],W=G,j=A):(H=[0,lt],W=V,j=I),{isAllBound:j,isVerticalBound:G,isHorizontalBound:V,isBound:W,offset:H}}(e,r),o=i.isBound,a=i.offset,s=i.isVerticalBound,u=i.isHorizontalBound,f=r.multiple,p=Tn({datas:n,distX:a[0],distY:a[1]}).map(function(c,l){return c*(f[l]?2/f[l]:0)});return{sign:f,isBound:o,isVerticalBound:s,isHorizontalBound:u,isSnap:!1,offset:p}})}function Go(e,t,n,r){var i,o,a,s,u,f=e.state,p=$e(f.allMatrix,100,100,f.is3d?4:3),c=ae(p,[0,0]);return(i=n,o=r,a=[],s=i[0],u=i[1],s&&u?a.push([[0,2*u],i,[-s,u]],[[2*s,0],i,[s,-u]]):s?(a.push([[2*s,0],[s,1],[s,-1]]),o&&a.push([[0,-1],[s,-1],[-s,-1]],[[0,1],[s,1],[-s,1]])):u?(a.push([[0,2*u],[1,u],[-1,u]]),o&&a.push([[-1,0],[-1,u],[-1,-u]],[[1,0],[1,u],[1,-u]])):a.push([[-1,0],[-1,-1],[-1,1]],[[1,0],[1,-1],[1,1]],[[0,-1],[-1,-1],[1,-1]],[[0,1],[-1,1],[1,1]]),a).map(function(l){var h,d,g,v,b=T(l,3),x=b[0],y=b[1],E=b[2],M=[ae(p,y),ae(p,E)],m=function(F){var O=T(F,2),S=O[0],w=O[1],R=w[0]-S[0],P=w[1]-S[1];Math.abs(R)<Lt&&(R=0),Math.abs(P)<Lt&&(P=0);var k=0,z=0,A=0;return R?P?(z=1,A=(k=-P/R)*S[0]-S[1]):(z=1,A=-S[1]):(k=-1,A=S[0]),[k,z,A].map(function(G){return Bt(G,Lt)})}(M),D=(h=c,g=Cr([(d=M)[0][0],d[1][0]]),v=Cr([d[0][1],d[1][1]]),{vertical:g<=h[0],horizontal:v<=h[1]}),_=D.vertical,B=D.horizontal;return{multiple:x,centerSign:zo(c,M)<=0,verticalSign:_,horizontalSign:B,lineConstants:m,line:[ae(t,y),ae(t,E)]}})}function Br(e,t,n,r,i){var o=function(c,l,h,d){var g=l[0]-c[0],v=l[1]-c[1];if(Y(g)<Lt&&(g=0),Y(v)<Lt&&(v=0),!g)return d?[0,0]:[0,h];if(!v)return d?[h,0]:[0,0];var b=v/g,x=c[1]-b*c[0];return d?[h,b*(l[0]+h)+x-l[1]]:[(l[1]+h-x)/b-l[0],h]}(e,t,n,r);if(!o)return{isOutside:!1,offset:[0,0]};var a=vn(e,t),s=vn(o,e),u=vn(o,t),f=s>a||u>a,p=T(Tn({datas:i,distX:o[0],distY:o[1]}),2);return{offset:[p[0],p[1]],isOutside:f}}function Ni(e,t){return e.isBound?e.offset:t.isSnap?kr(t).offset:0}function La(e,t,n,r,i,o){if(!Bo(e,"draggable"))return[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}];var a=ei(o.absolutePoses,[t,n]),s=or(a),u=s.left,f=s.right,p=s.top,c=s.bottom,l={horizontal:a.map(function(_){return _[1]}),vertical:a.map(function(_){return _[0]})},h=Jr(e,i,function(_,B){var F=function(w,R){var P=Ii(w),k={};for(var z in P)z in R&&P[z]&&(k[z]=R[z]);return k}(_,B),O=Ha.filter(function(w){return w in F}),S=qa.filter(function(w){return w in F});return{horizontalNames:O,verticalNames:S,horizontal:O.map(function(w){return F[w]}),vertical:S.map(function(w){return F[w]})}}(Ii(e.props.snapDirections),{left:u,right:f,top:p,bottom:c,center:(u+f)/2,middle:(p+c)/2}),l),d=h.vertical,g=h.horizontal,v=function(_,B,F){var O,S=Ao(_,Go(_,B,[0,0],!1).map(function(G){return C(C({},G),{multiple:G.multiple.map(function(I){return 2*Y(I)})})}),F),w=tr(S,0),R=tr(S,1),P=0,k=0,z=w.isVerticalBound||R.isVerticalBound,A=w.isHorizontalBound||R.isHorizontalBound;return(z||A)&&(P=(O=T(function(G){var I=G.datas,V=G.distX,vt=G.distY;I.beforeMatrix;var lt=I.matrix,H=I.is3d;I.startDragBeforeDist;var W=I.startDragDist,j=I.absoluteOrigin,K=H?4:3;return bt(be(lt,Wt(W,[V,vt]),K),j)}({datas:F,distX:-w.offset[0],distY:-R.offset[1]}),2))[0],k=O[1]),{vertical:{isBound:z,offset:P},horizontal:{isBound:A,offset:k}}}(e,a,o),b=v.vertical,x=v.horizontal,y=d.isSnap,E=g.isSnap,M=d.isBound||b.isBound,m=g.isBound||x.isBound,D=T(function(_,B,F,O,S){var w=T(B,2),R=w[0],P=w[1],k=T(F,2),z=k[0],A=k[1],G=T(O,2),I=G[0],V=G[1],vt=T(S,2),lt=vt[0],H=vt[1],W=-lt,j=-H;if(_&&R&&P){W=0,j=0;var K=[];if(z&&A?K.push([0,H],[lt,0]):z?K.push([lt,0]):A?K.push([0,H]):I&&V?K.push([0,H],[lt,0]):I?K.push([lt,0]):V&&K.push([0,H]),K.length){K.sort(function(U,J){return De(bt([R,P],U))-De(bt([R,P],J))});var xt=K[0];if(xt[0]&&Y(R)>Lt)W=-xt[0],j=P*Y(R+W)/Y(R)-P;else if(xt[1]&&Y(P)>Lt){var qt=P;j=-xt[1],W=R*Y(P+j)/Y(qt)-R}if(_&&A&&z)if(Y(W)>Lt&&Y(W)<Y(lt))W*=q=Y(lt)/Y(W),j*=q;else if(Y(j)>Lt&&Y(j)<Y(H)){var q;W*=q=Y(H)/Y(j),j*=q}else W=Ve(-lt,W),j=Ve(-H,j)}}else W=R||z?-lt:0,j=P||A?-H:0;return[W,j]}(r,[t,n],[M,m],[y,E],[Ve(d.offset,b.offset),Ve(g.offset,x.offset)]),2);return[{isBound:M,isSnap:y,offset:D[0]},{isBound:m,isSnap:E,offset:D[1]}]}function Jr(e,t,n,r){r===void 0&&(r=n);var i,o,a,s,u,f,p,c,l,h,d,g,v,b,x=(i=ko(e),o=r.vertical,a=r.horizontal,u=(s=i||{}).position,f=u===void 0?"client":u,p=s.left,c=p===void 0?-1/0:p,l=s.top,h=l===void 0?-1/0:l,d=s.right,g=d===void 0?1/0:d,v=s.bottom,{vertical:Gi(b={position:f,left:c,top:h,right:g,bottom:v===void 0?1/0:v},o,!0),horizontal:Gi(b,a,!1)}),y=x.horizontal,E=x.vertical,M=t?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:Fo(e,n.vertical,n.horizontal,void 0,void 0,void 0,void 0),m=M.horizontal,D=M.vertical,_=Ni(y[0],m),B=Ni(E[0],D),F=Y(_),O=Y(B);return{horizontal:{isBound:y[0].isBound,isSnap:m.isSnap,snapIndex:m.index,offset:_,dist:F,bounds:y,snap:m},vertical:{isBound:E[0].isBound,isSnap:D.isSnap,snapIndex:D.index,offset:B,dist:O,bounds:E,snap:D}}}function Wi(e,t){return e.isBound?e.offset:t.isSnap?t.offset:0}var dn,xe={name:"draggable",props:["draggable","throttleDrag","throttleDragRotate","hideThrottleDragRotateLine","startDragRotate","edgeDraggable"],events:["dragStart","drag","dragEnd","dragGroupStart","dragGroup","dragGroupEnd"],requestStyle:function(){return["left","top","right","bottom"]},requestChildStyle:function(){return["left","top","right","bottom"]},render:function(e,t){var n=e.props,r=n.hideThrottleDragRotateLine,i=n.throttleDragRotate,o=n.zoom,a=e.getState(),s=a.dragInfo,u=a.beforeOrigin;if(r||!i||!s)return[];var f=s.dist;if(!f[0]&&!f[1])return[];var p=De(f),c=pe(f,[0,0]);return[t.createElement("div",{className:Xt("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:"".concat(p,"px"),transform:"translate(".concat(u[0],"px, ").concat(u[1],"px) rotate(").concat(c,"rad) scaleY(").concat(o,")")}})]},dragStart:function(e,t){var n,r=t.datas,i=t.parentEvent,o=t.parentGesto,a=e.state,s=a.gestos,u=a.style;if(s.draggable)return!1;s.draggable=o||e.targetGesto,r.datas={},r.left=parseFloat(u.left||"")||0,r.top=parseFloat(u.top||"")||0,r.bottom=parseFloat(u.bottom||"")||0,r.right=parseFloat(u.right||"")||0,r.startValue=[0,0],Po(e,t),vr(e,n=t,Je(Ze(n).startTransforms,function(p){return p.indexOf("".concat("translate","("))===0})),function(p,c){c.absolutePoses=ke(p.state)}(e,r),r.prevDist=[0,0],r.prevBeforeDist=[0,0],r.isDrag=!1,r.deltaOffset=[0,0];var f=Yt(e,t,C({set:function(p){r.startValue=p}},function(p,c){var l=Ze(c);return{setTransform:function(h,d){d===void 0&&(d=-1),l.startTransforms=ee(h)?h:Sn(h),vr(p,c,d)},setTransformIndex:function(h){vr(p,c,h)}}}(e,t)));return(i||wt(e,"onDragStart",f))!==!1?(r.isDrag=!0,e.state.dragInfo={startRect:e.getRect(),dist:[0,0]}):(s.draggable=null,r.isPinch=!1),!!r.isDrag&&f},drag:function(e,t){if(t){(function(L,it,ft){var Q=it.datas,dt=it.originalDatas.beforeRenderable,tt=Q.transformIndex,ht=dt.nextTransforms,Rt=ht.length,ot=dt.nextTransformAppendedIndexes,at=-1;tt===-1?((at=0)==-1&&(at=ht.length),Q.transformIndex=at):at=de(ot,function(At){return At.index===tt&&At.functionName===ft})?tt:tt+ot.filter(function(At){return At.index<tt}).length;var mt,Mt,et,X,N,rt,pt,st,yt,ut,gt,Et,Ot,Ft,zt,ct,nt,_t,St,Ct,Nt,Dt=(mt=ht,Mt=L.state,et=at,N=tn(mt,{"x%":function(At){return At/100*Mt.offsetWidth},"y%":function(At){return At/100*Mt.offsetHeight}}),rt=mt.slice(0,et<0?void 0:et),pt=mt.slice(0,et<0?void 0:et+1),st=mt[et]||"",yt=et<0?[]:mt.slice(et),ut=et<0?[]:mt.slice(et+1),gt=N.slice(0,et<0?void 0:et),Et=N.slice(0,et<0?void 0:et+1),Ot=(X=N[et])!==null&&X!==void 0?X:tn([""])[0],Ft=et<0?[]:N.slice(et),zt=et<0?[]:N.slice(et+1),ct=Ot?[Ot]:[],nt=je(gt),_t=je(Et),St=je(Ft),Ct=je(zt),Nt=Vt(nt,St,4),{transforms:mt,beforeFunctionMatrix:nt,beforeFunctionMatrix2:_t,targetFunctionMatrix:je(ct),afterFunctionMatrix:St,afterFunctionMatrix2:Ct,allFunctionMatrix:Nt,beforeFunctions:gt,beforeFunctions2:Et,targetFunction:ct[0],afterFunctions:Ft,afterFunctions2:zt,beforeFunctionTexts:rt,beforeFunctionTexts2:pt,targetFunctionText:st,afterFunctionTexts:yt,afterFunctionTexts2:ut}),kt=Dt.targetFunction,Kt=ft;Q.beforeFunctionTexts=Dt.beforeFunctionTexts,Q.afterFunctionTexts=Dt.afterFunctionTexts,Q.beforeTransform=Dt.beforeFunctionMatrix,Q.beforeTransform2=Dt.beforeFunctionMatrix2,Q.targetTansform=Dt.targetFunctionMatrix,Q.afterTransform=Dt.afterFunctionMatrix,Q.afterTransform2=Dt.afterFunctionMatrix2,Q.targetAllTransform=Dt.allFunctionMatrix,kt.functionName===Kt?(Q.afterFunctionTexts.splice(0,1),Q.isAppendTransform=!1):Rt>at&&(Q.isAppendTransform=!0,dt.nextTransformAppendedIndexes=$($([],T(ot),!1),[{functionName:ft,index:at,isAppend:!0}],!1))})(e,t,"translate");var n=t.datas,r=t.parentEvent,i=t.parentFlag,o=t.isPinch,a=t.deltaOffset,s=t.useSnap,u=t.isRequest,f=t.isGroup,p=t.parentThrottleDrag,c=t.distX,l=t.distY,h=n.isDrag,d=n.prevDist,g=n.prevBeforeDist,v=n.startValue;if(h){a&&(c+=a[0],l+=a[1]);var b=e.props,x=b.parentMoveable,y=f?0:b.throttleDrag||p||0,E=r?0:b.throttleDragRotate||0,M=0,m=!1,D=!1,_=!1,B=!1;if(!r&&E>0&&(c||l)){var F=b.startDragRotate||0,O=Bt(F+180*pe([0,0],[c,l])/Math.PI,E)-F,S=l*Math.abs(Math.cos((O-90)/180*Math.PI)),w=De([c*Math.abs(Math.cos(O/180*Math.PI)),S]);M=O*Math.PI/180,c=w*Math.cos(M),l=w*Math.sin(M)}if(!o&&!r&&!i){var R=T(La(e,c,l,E,!s&&u||a,n),2),P=R[0],k=R[1];m=P.isSnap,D=P.isBound,_=k.isSnap,B=k.isBound,c+=P.offset,l+=k.offset}var z=Wt(ki({datas:n,distX:c,distY:l}),v),A=Wt(function(L){var it=L.datas,ft=T(ki({datas:it,distX:L.distX,distY:L.distY}),2);return be(function(Q,dt){var tt=Q.beforeTransform,ht=Q.afterTransform;Q.beforeTransform2,Q.afterTransform2;var Rt=Vt(dt,Q.targetAllTransform,4),ot=Vt(Ge(tt,4),Rt,4);return Vt(ot,Ge(ht,4),4)}(it,function(Q){for(var dt=It(4),tt=0;tt<3;++tt)dt[12+tt]=Q[tt]||0;return dt}([ft[0],ft[1]])),Rn([0,0,0],4),4)}({datas:n,distX:c,distY:l}),v);yi(A,ue),yi(z,ue),E||(m||D||(A[0]=Bt(A[0],y),z[0]=Bt(z[0],y)),_||B||(A[1]=Bt(A[1],y),z[1]=Bt(z[1],y)));var G=bt(z,v),I=bt(A,v),V=bt(I,d),vt=bt(G,g);n.prevDist=I,n.prevBeforeDist=G,n.passDelta=V,n.passDist=I;var lt=n.left+G[0],H=n.top+G[1],W=n.right-G[0],j=n.bottom-G[1],K=(J=n,Z="translate(".concat(A[0],"px, ").concat(A[1],"px)"),Tt="translate(".concat(I[0],"px, ").concat(I[1],"px)"),"".concat(J.beforeFunctionTexts.join(" ")," ").concat(J.isAppendTransform?Tt:Z," ").concat(J.afterFunctionTexts.join(" ")));if(function(L,it){Ze(L).nextTransforms=Sn(it)}(t,K),e.state.dragInfo.dist=r?[0,0]:I,r||x||!V.every(function(L){return!L})||!vt.some(function(L){return!L})){var xt=e.state,qt=xt.width,q=xt.height,U=Yt(e,t,C({transform:K,dist:I,delta:V,translate:A,beforeDist:G,beforeDelta:vt,beforeTranslate:z,left:lt,top:H,right:W,bottom:j,width:qt,height:q,isPinch:o},Le({transform:K},t)));return!r&&wt(e,"onDrag",U),U}}}var J,Z,Tt},dragAfter:function(e,t){var n=t.datas,r=n.deltaOffset;return!(!r[0]&&!r[1])&&(n.deltaOffset=[0,0],this.drag(e,C(C({},t),{deltaOffset:r})))},dragEnd:function(e,t){var n=t.parentEvent,r=t.datas;if(e.state.dragInfo=null,r.isDrag){r.isDrag=!1;var i=Pn(e,t,{});return!n&&wt(e,"onDragEnd",i),i}},dragGroupStart:function(e,t){var n,r,i=t.datas,o=t.clientX,a=t.clientY,s=this.dragStart(e,t);if(!s)return!1;var u=mr(e,this,"dragStart",[o||0,a||0],t,0,"draggable"),f=u.childEvents,p=u.eventParams,c=wt(e,"onDragGroupStart",C(C({},s),{targets:e.props.targets,events:p}));i.isDrag=c!==!1;var l=(r=(n=f[0])===null||n===void 0?void 0:n.datas.startValue)!==null&&r!==void 0?r:[0,0];return i.throttleOffset=[l[0]%1,l[1]%1],!!i.isDrag&&s},dragGroup:function(e,t){if(t.datas.isDrag){var n=this.drag(e,C(C({},t),{parentThrottleDrag:e.props.throttleDrag})),r=mr(e,this,"drag",t.datas.passDelta,t,0,"draggable").eventParams;if(n){var i=C({targets:e.props.targets,events:r},n);return wt(e,"onDragGroup",i),i}}},dragGroupEnd:function(e,t){var n=t.isDrag;if(t.datas.isDrag){this.dragEnd(e,t);var r=mr(e,this,"dragEnd",[0,0],t,0,"draggable").eventParams;return wt(e,"onDragGroupEnd",Pn(e,t,{targets:e.props.targets,events:r})),n}},request:function(e){var t={},n=e.getRect(),r=0,i=0,o=!1;return{isControl:!1,requestStart:function(a){return o=a.useSnap,{datas:t,useSnap:o}},request:function(a){return"x"in a?r=a.x-n.left:"deltaX"in a&&(r+=a.deltaX),"y"in a?i=a.y-n.top:"deltaY"in a&&(i+=a.deltaY),{datas:t,distX:r,distY:i,useSnap:o}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:o}}}},unset:function(e){e.state.gestos.draggable=null,e.state.dragInfo=null}},ji=Ir("resizable"),Va={name:"resizable",ableGroup:"size",canPinch:!0,props:["resizable","throttleResize","renderDirections","displayAroundControls","keepRatio","resizeFormat","keepRatioFinally","edge","checkResizableError"],events:["resizeStart","beforeResize","resize","resizeEnd","resizeGroupStart","beforeResizeGroup","resizeGroup","resizeGroupEnd"],render:(dn="resizable",function(e,t){var n=wn(e.props,dn).edge;return n&&(n===!0||n.length)?$($([],T(Ro(t,dn,n,e.getState().renderPoses,e.props.zoom)),!1),T(Ai(e,["nw","ne","sw","se"],dn,t)),!1):function(r,i,o){return Ai(r,$r,dn,o)}(e,0,t)}),dragControlCondition:ji,viewClassName:function(e){return function(t){if(!t.isDragging(e))return"";var n,r,i,o,a,s=(r=e,o=(n=t).targetGesto,a=n.controlGesto,o?.isFlag()&&(i=o.getEventData()[r]),!i&&a?.isFlag()&&(i=a.getEventData()[r]),i||{}).deg;return s?Xt("view-control-rotation".concat(s)):""}}("resizable"),dragControlStart:function(e,t){var n,r,i,o,a=t.inputEvent,s=t.isPinch,u=t.isGroup,f=t.parentDirection,p=t.parentGesto,c=t.datas,l=t.parentFixedDirection,h=t.parentEvent,d=(r=s,i=a,o=c,f||(r?[0,0]:function(S,w){if(S){var R=S.getAttribute("data-rotation")||"",P=S.getAttribute("data-direction");if(w.deg=R,P){var k=[0,0];return P.indexOf("w")>-1&&(k[0]=-1),P.indexOf("e")>-1&&(k[0]=1),P.indexOf("n")>-1&&(k[1]=-1),P.indexOf("s")>-1&&(k[1]=1),k}}}(i.target,o))),g=e.state,v=g.target,b=g.width,x=g.height,y=g.gestos;if(!d||!v||y.resizable)return!1;y.resizable=p||e.controlGesto,!s&&Po(e,t),c.datas={},c.direction=d,c.startOffsetWidth=b,c.startOffsetHeight=x,c.prevWidth=0,c.prevHeight=0,c.minSize=[0,0],c.startWidth=g.inlineCSSWidth||g.cssWidth,c.startHeight=g.inlineCSSHeight||g.cssHeight,c.maxSize=[1/0,1/0],u||(c.minSize=[g.minOffsetWidth,g.minOffsetHeight],c.maxSize=[g.maxOffsetWidth,g.maxOffsetHeight]);var E=e.props.transformOrigin||"% %";function M(S){c.ratio=S&&isFinite(S)?S:0}function m(S){var w=function(R,P){return{fixedPosition:ae(R,P),fixedDirection:P,fixedOffset:[0,0]}}(c.startPositions,S);c.fixedDirection=w.fixedDirection,c.fixedPosition=w.fixedPosition,c.fixedOffset=w.fixedOffset}function D(S){var w=function(R,P){var k,z,A,G=R.allMatrix,I=R.is3d,V=R.width,vt=R.height,lt=I?4:3,H=(k=P,A=vt,[(z=V)?k[0]/(z/2)-1:0,A?k[1]/(A/2)-1:0]);return{fixedPosition:Ee(G,P,lt),fixedDirection:H,fixedOffset:[V?0:P[0],vt?0:P[1]]}}(e.state,S);c.fixedDirection=w.fixedDirection,c.fixedPosition=w.fixedPosition,c.fixedOffset=w.fixedOffset}function _(S){c.minSize=[oe("".concat(S[0]),0)||0,oe("".concat(S[1]),0)||0]}function B(S){var w=[S[0]||1/0,S[1]||1/0];Un(w[0])&&!isFinite(w[0])||(w[0]=oe("".concat(w[0]),0)||1/0),Un(w[1])&&!isFinite(w[1])||(w[1]=oe("".concat(w[1]),0)||1/0),c.maxSize=w}c.transformOrigin=rn(E)?E.split(" "):E,c.startOffsetMatrix=g.offsetMatrix,c.startTransformOrigin=g.transformOrigin,c.isWidth=(n=t?.parentIsWidth)!==null&&n!==void 0?n:!d[0]&&!d[1]||d[0]||!d[1],c.startPositions=ke(e.state),M(b/x),m(l||[-d[0],-d[1]]),c.setFixedDirection=m,c.setFixedPosition=D,c.setMin=_,c.setMax=B;var F=Yt(e,t,{direction:d,startRatio:c.ratio,set:function(S){var w=T(S,2),R=w[0],P=w[1];c.startWidth=R,c.startHeight=P},setMin:_,setMax:B,setRatio:M,setFixedDirection:m,setFixedPosition:D,setOrigin:function(S){c.transformOrigin=S},dragStart:xe.dragStart(e,new Oo().dragStart([0,0],t))}),O=h||wt(e,"onResizeStart",F);return c.startFixedDirection=c.fixedDirection,c.startFixedPosition=c.fixedPosition,O!==!1&&(c.isResize=!0,e.state.snapRenderInfo={request:t.isRequest,direction:d}),!!c.isResize&&F},dragControl:function(e,t){var n,r=t.datas,i=t.parentFlag,o=t.isPinch,a=t.parentKeepRatio,s=t.dragClient,u=t.parentDist,f=t.useSnap,p=t.isRequest,c=t.isGroup,l=t.parentEvent,h=t.resolveMatrix,d=r.isResize,g=r.transformOrigin,v=r.startWidth,b=r.startHeight,x=r.prevWidth,y=r.prevHeight,E=r.minSize,M=r.maxSize,m=r.ratio,D=r.startOffsetWidth,_=r.startOffsetHeight,B=r.isWidth;if(d){if(h){var F=e.state.is3d,O=r.startOffsetMatrix,S=r.startTransformOrigin,w=F?4:3,R=Ur(Jn(t)),P=Math.sqrt(R.length);w!==P&&(R=Ie(R,P,w));var k=Bi(O,R,S,w),z=$e(k,D,_,w);r.startPositions=z,r.nextTargetMatrix=R,r.nextAllMatrix=k}var A=wn(e.props,"resizable"),G=A.resizeFormat,I=A.throttleResize,V=I===void 0?i?0:1:I,vt=A.parentMoveable,lt=A.keepRatioFinally,H=r.direction,W=H,j=0,K=0;H[0]||H[1]||(W=[1,1]);var xt=m&&(a??A.keepRatio)||!1,qt=T(Mt(),2),q=qt[0],U=qt[1];l||(r.setFixedDirection(r.fixedDirection),wt(e,"onBeforeResize",Yt(e,t,{startFixedDirection:r.startFixedDirection,startFixedPosition:r.startFixedPosition,setFixedDirection:function(X){var N;return r.setFixedDirection(X),N=T(Mt(),2),q=N[0],U=N[1],[q,U]},setFixedPosition:function(X){var N;return r.setFixedPosition(X),N=T(Mt(),2),q=N[0],U=N[1],[q,U]},boundingWidth:q,boundingHeight:U,setSize:function(X){var N;N=T(X,2),q=N[0],U=N[1]}},!0)));var J=s;s||(J=!i&&o?ae(ke(e.state),[0,0]):r.fixedPosition);var Z=[0,0];if(o||(Z=function(X,N,rt,pt,st,yt,ut){if(!Bo(X,"resizable"))return[0,0];var gt=ut.fixedDirection,Et=ut.nextAllMatrix,Ot=X.state,Ft=Ot.allMatrix,zt=Ot.is3d;return function(ct,nt,_t,St,Ct,Nt,Dt,kt){for(var Kt=ke(ct.state),At=ct.props.keepRatio,Gt=0,Zt=0,ne=0;ne<2;++ne){var he=Ua(ct,nt(Gt,Zt),Ct,At,Dt,kt),ge=he.width,$t=he.height,Pt=ge.isBound,ve=$t.isBound,jt=ge.offset,re=$t.offset;if(ne===1&&(Pt||(jt=0),ve||(re=0)),ne===0&&Dt&&!Pt&&!ve)return[0,0];if(At){var an=Y(jt)*(_t?1/_t:1),sn=Y(re)*(St?1/St:1);(Pt&&ve?an<sn:ve||!Pt&&an<sn)?jt=_t*re/St:re=St*jt/_t}Gt+=jt,Zt+=re}if(!At&&Ct[0]&&Ct[1]){var un=function(_e,Fe,le,Jt,we){var me=[-le[0],-le[1]],te=_e.state,se=te.width,Ne=te.height,Te=_e.props.bounds,cn=1/0,ln=1/0;if(Te){var Fn=[[le[0],-le[1]],[-le[0],le[1]]],fn=Te.left,ar=fn===void 0?-1/0:fn,zn=Te.top,ra=zn===void 0?-1/0:zn,ii=Te.right,ia=ii===void 0?1/0:ii,oi=Te.bottom,oa=oi===void 0?1/0:oi;Fn.forEach(function(sr){var aa=sr[0]!==me[0],sa=sr[1]!==me[1],ze=ae(Fe,sr),An=360*pe(Jt,ze)/Math.PI;if(sa){var pn=ze.slice();(Y(An-360)<2||Y(An-180)<2)&&(pn[1]=Jt[1]);var ai=Br(Jt,pn,(Jt[1]<ze[1]?oa:ra)-ze[1],!1,we),si=T(ai.offset,2)[1],ua=ai.isOutside;isNaN(si)||(ln=Ne+(ua?1:-1)*Y(si))}if(aa){pn=ze.slice(),(Y(An-90)<2||Y(An-270)<2)&&(pn[0]=Jt[0]);var ui=Br(Jt,pn,(Jt[0]<ze[0]?ia:ar)-ze[0],!0,we),ci=T(ui.offset,1)[0],ca=ui.isOutside;isNaN(ci)||(cn=se+(ca?1:-1)*Y(ci))}})}return{maxWidth:cn,maxHeight:ln}}(ct,Kt,Ct,Nt,kt),Se=un.maxWidth,Ce=un.maxHeight,Bn=T(function(_e,Fe,le,Jt,we,me,te,se,Ne){var Te=ae(Fe,te),cn=Jr(_e,se,{vertical:[Te[0]],horizontal:[Te[1]]}),ln=cn.horizontal.offset,Fn=cn.vertical.offset;if(Bt(Fn,hr)||Bt(ln,hr)){var fn=T(Tn({datas:Ne,distX:-Fn,distY:-ln}),2),ar=fn[0],zn=fn[1];return[Math.min(we||1/0,le+te[0]*ar)-le,Math.min(me||1/0,Jt+te[1]*zn)-Jt]}return[0,0]}(ct,nt(Gt,Zt).map(function(_e){return _e.map(function(Fe){return Bt(Fe,hr)})}),_t+Gt,St+Zt,Se,Ce,Ct,Dt,kt),2);Gt+=jt=Bn[0],Zt+=re=Bn[1]}return[Gt,Zt]}(X,function(ct,nt){return _t=gt,St=st,ei(Ct=$e(Et||Ft,N+ct,rt+nt,zt?4:3),bt(St,ae(Ct,_t)));var _t,St,Ct},N,rt,pt,st,yt,ut)}(e,q,U,H,J,!f&&p,r)),u&&(!u[0]&&(Z[0]=0),!u[1]&&(Z[1]=0)),xt){W[0]&&W[1]&&Z[0]&&Z[1]&&(Y(Z[0])>Y(Z[1])?Z[1]=0:Z[0]=0);var Tt=!Z[0]&&!Z[1];Tt&&et(),W[0]&&!W[1]||Z[0]&&!Z[1]||Tt&&B?(q+=Z[0],U=q/m):(!W[0]&&W[1]||!Z[0]&&Z[1]||Tt&&!B)&&(U+=Z[1],q=U*m)}else q+=Z[0],U+=Z[1],q=Math.max(0,q),U=Math.max(0,U);n=T(function(X,N,rt,pt){if(!pt)return X.map(function(nt,_t){return Sr(nt,N[_t],rt[_t])});var st=X[0],yt=X[1],ut=pt===!0?st/yt:pt,gt=bi(X,N,!1,ut),Et=gt[0],Ot=gt[1],Ft=bi(X,rt,!0,ut),zt=Ft[0],ct=Ft[1];return st<Et||yt<Ot?(st=Et,yt=Ot):(st>zt||yt>ct)&&(st=zt,yt=ct),[st,yt]}([q,U],E,M,!!xt&&m),2),q=n[0],U=n[1],et(),xt&&(c||lt)&&(B?U=q/m:q=U*m);var L=[(j=q-D)-x,(K=U-_)-y];r.prevWidth=j,r.prevHeight=K;var it=function(X,N,rt,pt,st,yt){var ut,gt,Et,Ot,Ft,zt,ct=X.props.groupable,nt=X.state,_t=nt.transformOrigin,St=nt.offsetMatrix,Ct=nt.is3d,Nt=nt.width,Dt=nt.height,kt=nt.left,Kt=nt.top,At=yt.fixedDirection,Gt=Ct?4:3,Zt=ct?kt:0,ne=ct?Kt:0;return bt(function(he,ge,$t,Pt,ve,jt){var re=ae($e(ge,$t,Pt,ve),jt);return[he[0]-re[0],he[1]-re[1]]}(pt,Bi(St,yt.nextTargetMatrix||nt.targetMatrix,(gt=N,Et=rt,(Ot=Nt)===void 0&&(Ot=gt),(Ft=Dt)===void 0&&(Ft=Et),(zt=_t)===void 0&&(zt=[0,0]),(ut=st)?ut.map(function(he,ge){var $t=rr(he),Pt=$t.value,ve=$t.unit,jt=ge?Ft:Ot,re=ge?Et:gt;return he==="%"||isNaN(Pt)?re*(jt?zt[ge]/jt:0):ve!=="%"?Pt:re*Pt/100}):zt),Gt),N,rt,Gt,At),[Zt,ne])}(e,q,U,J,g,r);if(vt||!L.every(function(X){return!X})||!it.every(function(X){return!X})){var ft,Q,dt,tt,ht=xe.drag(e,To(t,e.state,it,!!o,0,"draggable")),Rt=ht.transform,ot=v+j,at=b+K,mt=Yt(e,t,C({width:ot,height:at,offsetWidth:Math.round(q),offsetHeight:Math.round(U),startRatio:m,boundingWidth:q,boundingHeight:U,direction:H,dist:[j,K],delta:L,isPinch:!!o,drag:ht},(ft={style:{width:"".concat(ot,"px"),height:"".concat(at,"px")},transform:Rt},dt=t,tt=(Q=ht).afterTransform||Q.transform,C(C({},Le(C(C(C({},ft.style),Q.style),{transform:tt}),dt)),{afterTransform:tt,transform:ft.transform}))));return!l&&wt(e,"onResize",mt),mt}}function Mt(){var X=r.fixedDirection,N=function(st,yt,ut,gt){var Et,Ot=ut.ratio,Ft=ut.startOffsetWidth,zt=ut.startOffsetHeight,ct=0,nt=0,_t=gt.distX,St=gt.distY,Ct=gt.pinchScale,Nt=gt.parentDistance,Dt=gt.parentDist,kt=gt.parentScale,Kt=ut.fixedDirection,At=[0,1].map(function($t){return Y(st[$t]-Kt[$t])}),Gt=[0,1].map(function($t){var Pt=At[$t];return Pt!==0&&(Pt=2/Pt),Pt});if(Dt)ct=Dt[0],nt=Dt[1],yt&&(ct?nt||(nt=ct/Ot):ct=nt*Ot);else if(Un(Ct))ct=(Ct-1)*Ft,nt=(Ct-1)*zt;else if(kt)ct=(kt[0]-1)*Ft,nt=(kt[1]-1)*zt;else if(Nt){var Zt=Ft*At[0],ne=zt*At[1],he=De([Zt,ne]);ct=Nt/he*Zt*Gt[0],nt=Nt/he*ne*Gt[1]}else{var ge=Tn({datas:ut,distX:_t,distY:St});ct=(Et=T(function($t,Pt,ve,jt,re){var an=T($t,2),sn=an[0],un=an[1],Se=0,Ce=0;if(re&&sn&&un){var Bn=pe([0,0],Pt),_e=pe([0,0],jt),Fe=De(Pt),le=Math.cos(Bn-_e)*Fe;if(jt[0])if(jt[1]){var Jt=jt[0]*sn,we=jt[1]*un,me=Math.atan2(Jt+Pt[0],we+Pt[1]),te=Math.atan2(Jt,we);me<0&&(me+=2*Math.PI),te<0&&(te+=2*Math.PI);var se=0;(se=Y(me-te)<Math.PI/2||Y(me-te)>Math.PI/2*3?me-te:me-(te+=Math.PI))>2*Math.PI?se-=2*Math.PI:se>Math.PI?se=2*Math.PI-se:se<-Math.PI&&(se=-2*Math.PI-se);var Ne=De([Jt+Pt[0],we+Pt[1]])*Math.cos(se);Se=Ne*Math.sin(te)-Jt,Ce=Ne*Math.cos(te)-we,jt[0]<0&&(Se*=-1),jt[1]<0&&(Ce*=-1)}else Ce=(Se=le)/ve;else Se=(Ce=le)*ve}else Se=jt[0]*Pt[0],Ce=jt[1]*Pt[1];return[Se,Ce]}([Ft,zt],ge=Gt.map(function($t,Pt){return ge[Pt]*$t}),Ot,st,yt),2))[0],nt=Et[1]}return{distWidth:ct,distHeight:nt}}(W,xt,r,t);j=N.distWidth,K=N.distHeight;var rt=W[0]-X[0]||xt?Math.max(D+j,ue):D,pt=W[1]-X[1]||xt?Math.max(_+K,ue):_;return xt&&D&&_&&(B?pt=rt/m:rt=pt*m),[rt,pt]}function et(){var X;G&&(X=T(G([q,U]),2),q=X[0],U=X[1]),q=Bt(q,V),U=Bt(U,V)}},dragControlAfter:function(e,t){var n=t.datas,r=n.isResize,i=n.startOffsetWidth,o=n.startOffsetHeight,a=n.prevWidth,s=n.prevHeight;if(r&&e.props.checkResizableError!==!1){var u=e.state,f=u.width-(i+a),p=u.height-(o+s),c=Y(f)>3,l=Y(p)>3;return c&&(n.startWidth+=f,n.startOffsetWidth+=f,n.prevWidth+=f),l&&(n.startHeight+=p,n.startOffsetHeight+=p,n.prevHeight+=p),c||l?this.dragControl(e,t):void 0}},dragControlEnd:function(e,t){var n=t.datas,r=t.parentEvent;if(n.isResize){n.isResize=!1;var i=Pn(e,t,{});return!r&&wt(e,"onResizeEnd",i),i}},dragGroupControlCondition:ji,dragGroupControlStart:function(e,t){var n=t.datas,r=this.dragControlStart(e,C(C({},t),{isGroup:!0}));if(!r)return!1;var i=Xe(e,"resizable",t),o=n.startOffsetWidth,a=n.startOffsetHeight;function s(){var h=n.minSize;i.forEach(function(d){var g=d.datas,v=g.minSize,b=g.startOffsetWidth,x=g.startOffsetHeight,y=o*(b?v[0]/b:0),E=a*(x?v[1]/x:0);h[0]=Math.max(h[0],y),h[1]=Math.max(h[1],E)})}function u(){var h=n.maxSize;i.forEach(function(d){var g=d.datas,v=g.maxSize,b=g.startOffsetWidth,x=g.startOffsetHeight,y=o*(b?v[0]/b:0),E=a*(x?v[1]/x:0);h[0]=Math.min(h[0],y),h[1]=Math.min(h[1],E)})}var f=br(e,this,"dragControlStart",t,function(h,d){return zi(e,h,n,d)});s(),u();var p=function(h){r.setFixedDirection(h),f.forEach(function(d,g){d.setFixedDirection(h),zi(e,d.moveable,n,i[g])})};n.setFixedDirection=p;var c=C(C({},r),{targets:e.props.targets,events:f.map(function(h){return C(C({},h),{setMin:function(d){h.setMin(d),s()},setMax:function(d){h.setMax(d),u()}})}),setFixedDirection:p,setMin:function(h){r.setMin(h),s()},setMax:function(h){r.setMax(h),u()}}),l=wt(e,"onResizeGroupStart",c);return n.isResize=l!==!1,!!n.isResize&&r},dragGroupControl:function(e,t){var n=t.datas;if(n.isResize){var r=wn(e.props,"resizable");e._emitter.on("onBeforeResize",function(h){wt(e,"onBeforeResizeGroup",Yt(e,t,C(C({},h),{targets:r.targets}),!0))});var i=this.dragControl(e,C(C({},t),{isGroup:!0}));if(i){var o=i.boundingWidth,a=i.boundingHeight,s=i.dist,u=r.keepRatio,f=[o/(o-s[0]),a/(a-s[1])],p=n.fixedPosition,c=br(e,this,"dragControl",t,function(h,d){var g=T(be(ir(e.rotation/180*Math.PI,3),[d.datas.originalX*f[0],d.datas.originalY*f[1],1],3),2),v=g[0],b=g[1];return C(C({},d),{parentDist:null,parentScale:f,dragClient:Wt(p,[v,b]),parentKeepRatio:u})}),l=C({targets:r.targets,events:c},i);return wt(e,"onResizeGroup",l),l}}},dragGroupControlEnd:function(e,t){var n=t.isDrag;if(t.datas.isResize){this.dragControlEnd(e,t);var r=br(e,this,"dragControlEnd",t);return wt(e,"onResizeGroupEnd",Pn(e,t,{targets:e.props.targets,events:r})),n}},request:function(e){var t={},n=0,r=0,i=!1,o=e.getRect();return{isControl:!0,requestStart:function(a){var s;return i=a.useSnap,{datas:t,parentDirection:a.direction||[1,1],parentIsWidth:(s=a?.horizontal)===null||s===void 0||s,useSnap:i}},request:function(a){return"offsetWidth"in a?n=a.offsetWidth-o.offsetWidth:"deltaWidth"in a&&(n+=a.deltaWidth),"offsetHeight"in a?r=a.offsetHeight-o.offsetHeight:"deltaHeight"in a&&(r+=a.deltaHeight),{datas:t,parentDist:[n,r],parentKeepRatio:a.keepRatio,useSnap:i}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:i}}}},unset:function(e){e.state.gestos.resizable=null}};function qi(e){return e?e/Y(e):0}function Ua(e,t,n,r,i,o){var a=function(c,l,h){var d=[];if(h)Y(l[0])!==1||Y(l[1])!==1?d.push([l,[-1,-1]],[l,[-1,1]],[l,[1,-1]],[l,[1,1]]):d.push([l,[c[0],-c[1]]],[l,[-c[0],c[1]]]),d.push([l,c]);else if(c[0]&&c[1]||!c[0]&&!c[1]){var g=c[0]?c:[1,1];[1,-1].forEach(function(v){[1,-1].forEach(function(b){var x=[v*g[0],b*g[1]];l[0]===x[0]&&l[1]===x[1]||d.push([l,x])})})}else c[0]?(Y(l[0])===1?[1]:[1,-1]).forEach(function(v){d.push([[l[0],-1],[v*c[0],-1]],[[l[0],0],[v*c[0],0]],[[l[0],1],[v*c[0],1]])}):c[1]&&(Y(l[1])===1?[1]:[1,-1]).forEach(function(v){d.push([[-1,l[1]],[-1,v*c[1]]],[[0,l[1]],[0,v*c[1]]],[[1,l[1]],[1,v*c[1]]])});return d}(n,o.fixedDirection,r),s=Go(e,t,n,r),u=$($([],T(function(c,l,h,d,g,v){return h.map(function(b){var x,y,E,M,m,D,_,B,F,O,S,w,R,P,k=T(b,2),z=k[0],A=k[1],G=ae(l,z),I=ae(l,A),V=d?(M=g,D=(m=function(Tt,L,it){var ft=ko(Tt),Q=ft.left,dt=ft.top,tt=ft.right,ht=ft.bottom,Rt=T(it,2),ot=Rt[0],at=Rt[1],mt=T(bt(it,L),2),Mt=mt[0],et=mt[1];Y(Mt)<ue&&(Mt=0),Y(et)<ue&&(et=0);var X=et>0,N=Mt>0,rt={isBound:!1,offset:0,pos:0},pt={isBound:!1,offset:0,pos:0};if(Mt===0&&et===0)return{vertical:rt,horizontal:pt};if(Mt===0)X?ht<at&&(pt.pos=ht,pt.offset=at-ht):dt>at&&(pt.pos=dt,pt.offset=at-dt);else if(et===0)N?tt<ot&&(rt.pos=tt,rt.offset=ot-tt):Q>ot&&(rt.pos=Q,rt.offset=ot-Q);else{var st=et/Mt,yt=it[1]-st*ot,ut=0,gt=0,Et=!1;N&&tt<=ot?(ut=st*tt+yt,gt=tt,Et=!0):!N&&ot<=Q&&(ut=st*Q+yt,gt=Q,Et=!0),Et&&(ut<dt||ut>ht)&&(Et=!1),Et||(X&&ht<=at?(gt=((ut=ht)-yt)/st,Et=!0):!X&&at<=dt&&(gt=((ut=dt)-yt)/st,Et=!0)),Et&&(rt.isBound=!0,rt.pos=gt,rt.offset=ot-gt,pt.isBound=!0,pt.pos=ut,pt.offset=at-ut)}return{vertical:rt,horizontal:pt}}(x=c,y=G,E=I)).horizontal,_=m.vertical,F=(B=M?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:function(Tt,L,it){var ft=T(it,2),Q=ft[0],dt=ft[1],tt=T(L,2),ht=tt[0],Rt=tt[1],ot=T(bt(it,L),2),at=ot[0],mt=ot[1],Mt=mt>0,et=at>0;at=nr(at),mt=nr(mt);var X={isSnap:!1,offset:0,pos:0},N={isSnap:!1,offset:0,pos:0};if(at===0&&mt===0)return{vertical:X,horizontal:N};var rt=Fo(Tt,at?[Q]:[],mt?[dt]:[],[],[],void 0,void 0),pt=rt.vertical,st=rt.horizontal;pt.posInfos.filter(function(Dt){var kt=Dt.pos;return et?kt>=ht:kt<=ht}),st.posInfos.filter(function(Dt){var kt=Dt.pos;return Mt?kt>=Rt:kt<=Rt}),pt.isSnap=pt.posInfos.length>0,st.isSnap=st.posInfos.length>0;var yt=kr(pt),ut=yt.isSnap,gt=yt.guideline,Et=kr(st),Ot=Et.isSnap,Ft=Et.guideline,zt=Ot?Ft.pos[1]:0,ct=ut?gt.pos[0]:0;if(at===0)Ot&&(N.isSnap=!0,N.pos=Ft.pos[1],N.offset=dt-N.pos);else if(mt===0)ut&&(X.isSnap=!0,X.pos=ct,X.offset=Q-ct);else{var nt=mt/at,_t=it[1]-nt*Q,St=0,Ct=0,Nt=!1;ut?(St=nt*(Ct=ct)+_t,Nt=!0):Ot&&(Ct=((St=zt)-_t)/nt,Nt=!0),Nt&&(X.isSnap=!0,X.pos=Ct,X.offset=Q-Ct,N.isSnap=!0,N.pos=St,N.offset=dt-St)}return{vertical:X,horizontal:N}}(x,y,E)).horizontal,O=B.vertical,S=Wi(D,F),w=Wi(_,O),R=Y(S),P=Y(w),{horizontal:{isBound:D.isBound,isSnap:F.isSnap,offset:S,dist:R},vertical:{isBound:_.isBound,isSnap:O.isSnap,offset:w,dist:P}}):Jr(c,g,{vertical:[I[0]],horizontal:[I[1]]}),vt=V.horizontal,lt=vt.offset,H=vt.isBound,W=vt.isSnap,j=V.vertical,K=j.offset,xt=j.isBound,qt=j.isSnap,q=bt(A,z);if(!K&&!lt)return{isBound:xt||H,isSnap:qt||W,sign:q,offset:[0,0]};var U=function(Tt,L,it,ft){var Q=pe(Tt,L)/Math.PI*180,dt=it.vertical,tt=dt.isBound,ht=dt.isSnap,Rt=dt.dist,ot=it.horizontal,at=ot.isBound,mt=ot.isSnap,Mt=Q%180,et=Mt<3||Mt>177,X=Mt>87&&Mt<93;return ot.dist<Rt&&(tt||ht&&!X&&(!ft||!et))?"vertical":!at&&(!mt||et||ft&&X)?"":"horizontal"}(G,I,V,d);if(!U)return{sign:q,isBound:!1,isSnap:!1,offset:[0,0]};var J=U==="vertical",Z=[0,0];return Z=(Z=d||Y(A[0])!==1||Y(A[1])!==1||z[0]===A[0]||z[1]===A[1]?Br(G,I,-(J?K:lt),J,v).offset:Tn({datas:v,distX:-K,distY:-lt})).map(function(Tt,L){return Tt*(q[L]?2/q[L]:0)}),{sign:q,isBound:J?xt:H,isSnap:J?qt:W,offset:Z}})}(e,t,a,r,i,o)),!1),T(Ao(e,s,o)),!1),f=tr(u,0),p=tr(u,1);return{width:{isBound:f.isBound,offset:f.offset[0]},height:{isBound:p.isBound,offset:p.offset[1]}}}function Xt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fa.apply(void 0,$([Qr],T(e),!1))}function Io(e){e()}function Za(e){return e&&e!=="none"?Me(e)?e:Ur(e):[1,0,0,1,0,0]}function Dn(e,t,n){return Qn(t,Ye(n,t),e,Ye(n.map(function(r){return-r}),t))}function Zn(e){return e?e.split(" "):["0","0"]}function Yo(e){var t=ce(e)("transform");if(t&&t!=="none")return t;if("transform"in e){var n=e.transform.baseVal;if(!n)return"";var r=n.length;if(!r)return"";for(var i=[],o=function(s){var u=n[s].matrix;i.push("matrix(".concat(["a","b","c","d","e","f"].map(function(f){return u[f]}).join(", "),")"))},a=0;a<r;++a)o(a);return i.join(" ")}return""}function On(e,t,n,r,i){var o,a,s,u,f=Lr(e)||Be(e),p=!1;if(!e||n)s=e;else{var c=(o=e?.assignedSlot)===null||o===void 0?void 0:o.parentElement,l=e.parentElement;c?(p=!0,u=l,s=c):s=l}for(var h=!1,d=e===t||s===t,g="relative",v=1,b=parseFloat(i?.("zoom"))||1,x=i?.("position");s&&s!==f;){t===s&&(d=!0);var y=ce(s),E=s.tagName.toLowerCase(),M=Yo(s),m=y("willChange"),D=parseFloat(y("zoom"))||1;if(g=y("position"),r&&D!==1){v=D;break}if(!n&&r&&b!==1&&x&&x!=="absolute"||E==="svg"||E==="foreignobject"||g!=="static"||M&&M!=="none"||m==="transform")break;var _=(a=e?.assignedSlot)===null||a===void 0?void 0:a.parentNode,B=s.parentNode;_&&(p=!0,u=B);var F=B;if(F&&F.nodeType===11){h=!0,g=ce(s=F.host)("position");break}s=F,g="relative"}return{offsetZoom:v,hasSlot:p,parentSlotElement:u,isCustomElement:h,isStatic:g==="static",isEnd:d||!s||s===f,offsetParent:s||f}}function $a(e,t){var n,r,i,o=e.tagName.toLowerCase(),a=e.offsetLeft,s=e.offsetTop,u=ce(e),f=jr(a),p=!f;return p||o==="svg"&&!e.ownerSVGElement?i=(r=Zn(u("transformOrigin")).map(function(c){return parseFloat(c)})).slice():(i=(r=So?function(c){return Zn(Wo(c,":before").transformOrigin).map(function(l,h){var d,g=rr(l);return g.value*(d=h===0,g.unit==="%"?zr(c.ownerSVGElement)[d?"width":"height"]/100:1)})}(e):Zn(u("transformOrigin")).map(function(c){return parseFloat(c)})).slice(),p=!0,o==="svg"?(a=0,s=0):(a=(n=T(function(c,l,h){var d=c.tagName.toLowerCase();if(!c.getBBox||!h&&d==="g")return[0,0,0,0];var g=ce(c)("transform-box")==="fill-box",v=c.getBBox(),b=zr(c.ownerSVGElement),x=v.x,y=v.y;d!=="foreignobject"||x||y||(x=parseFloat(c.getAttribute("x"))||0,y=parseFloat(c.getAttribute("y"))||0);var E=x-b.x,M=y-b.y;return[E,M,g?l[0]:l[0]-E,g?l[1]:l[1]-M]}(e,r,e===t&&t.tagName.toLowerCase()==="g"),4))[0],s=n[1],r[0]=n[2],r[1]=n[3])),{tagName:o,isSVG:f,hasOffset:p,offset:[a||0,s||0],origin:r,targetOrigin:i}}function Xo(e,t){var n=ce(e),r=ce(Be(e)),i=r("position");if(!(t||i&&i!=="static"))return[0,0];var o=parseInt(r("marginLeft"),10),a=parseInt(r("marginTop"),10);return n("position")==="absolute"&&(n("top")==="auto"&&n("bottom")==="auto"||(a=0),n("left")==="auto"&&n("right")==="auto"||(o=0)),[o,a]}function Fr(e){e.forEach(function(t){var n=t.matrix;n&&(t.matrix=Ie(n,3,4))})}function Qa(e){for(var t=e.parentElement,n=!1,r=Be(e);t;){var i=Wo(t).transform;if(i&&i!=="none"){n=!0;break}if(t===r)break;t=t.parentElement}return{fixedContainer:t||r,hasTransform:n}}function ti(e,t){return t===void 0&&(t=e.length>9),"".concat(t?"matrix3d":"matrix","(").concat(po(e,!t).join(","),")")}function zr(e){var t=e.clientWidth,n=e.clientHeight;if(!e)return{x:0,y:0,width:0,height:0,clientWidth:t,clientHeight:n};var r=e.viewBox,i=r&&r.baseVal||{x:0,y:0,width:0,height:0};return{x:i.x,y:i.y,width:i.width||t,height:i.height||n,clientWidth:t,clientHeight:n}}function Ka(e,t){var n,r=zr(e),i=r.width,o=r.height,a=r.clientWidth,s=r.clientHeight,u=a/i,f=s/o,p=e.preserveAspectRatio.baseVal,c=p.align,l=p.meetOrSlice,h=[0,0],d=[u,f],g=[0,0];if(c!==1){var v=(c-2)%3,b=Math.floor((c-2)/3);h[0]=i*v/2,h[1]=o*b/2;var x=l===2?Math.max(f,u):Math.min(u,f);d[0]=x,d[1]=x,g[0]=(a-i)/2*v,g[1]=(s-o)/2*b}var y=ho(d,t);return n=T(g,2),y[t*(t-1)]=n[0],y[t*(t-1)+1]=n[1],Dn(y,t,h)}function Ee(e,t,n){return be(e,Rn(t,n),n)}function $e(e,t,n,r){return[[0,0],[t,0],[0,n],[t,n]].map(function(i){return Ee(e,i,r)})}function or(e){var t=e.map(function(s){return s[0]}),n=e.map(function(s){return s[1]}),r=Math.min.apply(Math,$([],T(t),!1)),i=Math.min.apply(Math,$([],T(n),!1)),o=Math.max.apply(Math,$([],T(t),!1)),a=Math.max.apply(Math,$([],T(n),!1));return{left:r,top:i,right:o,bottom:a,width:o-r,height:a-i}}function Hi(e,t,n,r){return or($e(e,t,n,r))}function De(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ja(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=pe(e,t));var i,o,a=(i=e,De([(o=t)[0]-i[0],o[1]-i[1]]));return{transform:"translateY(-50%) translate(".concat(e[0],"px, ").concat(e[1],"px) rotate(").concat(r,"rad) scaleY(").concat(n,")"),width:"".concat(a,"px")}}function er(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n.length,o=n.reduce(function(s,u){return s+u[0]},0)/i,a=n.reduce(function(s,u){return s+u[1]},0)/i;return{transform:"translateZ(0px) translate(".concat(o,"px, ").concat(a,"px) rotate(").concat(e,"rad) scale(").concat(t,")")}}function wn(e,t){var n=e[t];return Me(n)?C(C({},e),n):e}function Li(e){var t=e&&!jr(e.offsetWidth),n=0,r=0,i=0,o=0,a=0,s=0,u=0,f=0,p=0,c=0,l=0,h=0,d=1/0,g=1/0,v=1/0,b=1/0,x=0,y=0,E=!1;if(e)if(!t&&e.ownerSVGElement){var M=e.getBBox();E=!0,a=n=M.width,s=r=M.height,u=n,f=r,i=n,o=r}else{var m=ce(e),D=e.style,_=m("boxSizing")==="border-box",B=parseFloat(m("borderLeftWidth"))||0,F=parseFloat(m("borderRightWidth"))||0,O=parseFloat(m("borderTopWidth"))||0,S=parseFloat(m("borderBottomWidth"))||0,w=(parseFloat(m("paddingLeft"))||0)+(parseFloat(m("paddingRight"))||0),R=(parseFloat(m("paddingTop"))||0)+(parseFloat(m("paddingBottom"))||0),P=w+(B+F),k=R+(O+S),z=m("position"),A=0,G=0;if("clientLeft"in e){var I=null;if(I=z==="absolute"?On(e,Be(e)).offsetParent:e.parentElement){var V=ce(I);A=parseFloat(V("width")),G=parseFloat(V("height"))}}p=Math.max(w,oe(m("minWidth"),A)||0),c=Math.max(R,oe(m("minHeight"),G)||0),d=oe(m("maxWidth"),A),g=oe(m("maxHeight"),G),isNaN(d)&&(d=1/0),isNaN(g)&&(g=1/0),x=oe(D.width,0)||0,y=oe(D.height,0)||0,a=parseFloat(m("width"))||0,s=parseFloat(m("height"))||0,n=u=Y(a-x)<1?Sr(p,x||a,d):a,r=f=Y(s-y)<1?Sr(c,y||s,g):s,i=u,o=f,_?(v=d,b=g,l=p,h=c,u=n-P,f=r-k):(v=d+P,b=g+k,l=p+P,h=c+k,n=u+P,r=f+k),i=u+w,o=f+R}return{svg:E,offsetWidth:n,offsetHeight:r,clientWidth:i,clientHeight:o,contentWidth:u,contentHeight:f,inlineCSSWidth:x,inlineCSSHeight:y,cssWidth:a,cssHeight:s,minWidth:p,minHeight:c,maxWidth:d,maxHeight:g,minOffsetWidth:l,minOffsetHeight:h,maxOffsetWidth:v,maxOffsetHeight:b}}function No(e,t){var n=e===Be(e)||e===Lr(e),r={clientLeft:e.clientLeft,clientTop:e.clientTop,clientWidth:e.clientWidth,clientHeight:e.clientHeight,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,overflow:!1};return n&&(r.clientHeight=Math.max(t.height,r.clientHeight),r.scrollHeight=Math.max(t.height,r.scrollHeight)),r.overflow=ce(e)("overflow")!=="visible",C(C({},t),r)}function xr(e,t,n,r){var i=e.left,o=e.right,a=e.top,s=e.bottom,u=t.top,f=t.left,p={left:f+i,top:u+a,right:f+o,bottom:u+s,width:o-i,height:s-a};return n&&r?No(n,p):p}function qn(e,t){var n=0,r=0,i=0,o=0;if(e){var a=e.getBoundingClientRect();n=a.left,r=a.top,i=a.width,o=a.height}var s={left:n,top:r,width:i,height:o,right:n+i,bottom:r+o};return e&&t?No(e,s):s}function ei(e,t){return[Wt(t,e[0]),Wt(t,e[1]),Wt(t,e[2]),Wt(t,e[3])]}function ke(e){var t=e.left,n=e.top;return ei([e.pos1,e.pos2,e.pos3,e.pos4],[t,n])}function Ar(e,t){e[t?"controlAbles":"targetAbles"].forEach(function(n){n.unset&&n.unset(e)})}function He(e,t){var n=t?"controlGesto":"targetGesto",r=e[n];r?.isIdle()===!1&&Ar(e,t),r?.unset(),e[n]=null}function Le(e,t){if(t){var n=Ze(t);n.nextStyle=C(C({},n.nextStyle),e)}return{style:e,cssText:Cn(e).map(function(r){return"".concat((i=r,i.replace(/([a-z])([A-Z])/g,function(o,a,s){return a+"-"+s.toLowerCase()})),": ").concat(e[r],";");var i}).join("")}}function Yt(e,t,n,r){var i=t.datas;i.datas||(i.datas={});var o=C(C({},n),{target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,moveable:e,datas:i.datas,isRequest:t.isRequest,isRequestChild:t.isRequestChild,isFirstDrag:!!t.isFirstDrag,isTrusted:t.isTrusted!==!1,stopAble:function(){i.isEventStart=!1},stopDrag:function(){var a;(a=t.stop)===null||a===void 0||a.call(t)}});return i.isStartEvent?r||(i.lastEvent=o):i.isStartEvent=!0,o}function Pn(e,t,n){var r=t.datas,i="isDrag"in n?n.isDrag:t.isDrag;return r.datas||(r.datas={}),C(C({isDrag:i},n),{moveable:e,target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,lastEvent:r.lastEvent,isDouble:t.isDouble,datas:r.datas,isFirstDrag:!!t.isFirstDrag})}function wt(e,t,n,r,i){return e.triggerEvent(t,n,r,i)}function Wo(e,t){return Re(e).getComputedStyle(e,t)}function Hn(e,t,n){var r={},i={};return e.filter(function(o){var a=o.name;if(r[a]||!t.some(function(s){return o[s]}))return!1;if(!n&&o.ableGroup){if(i[o.ableGroup])return!1;i[o.ableGroup]=!0}return r[a]=!0,!0})}function Gr(e,t){return e===t||e==null&&t==null}function Vi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.length-1,r=0;r<n;++r){var i=e[r];if(!jr(i))return i}return e[n]}function jo(e){return e.reduce(function(t,n){return t.concat(n)},[])}function Ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.sort(function(n,r){return Y(r)-Y(n)}),e[0]}function ni(e,t,n){return be(Ge(e,n),Rn(t,n),n)}function fe(e,t,n,r){if(!n[0]&&!n[1])return t;var i=Ee(e,[qi(n[0]||1),0],r),o=Ee(e,[0,qi(n[1]||1)],r);return Wt(t,Ee(e,[n[0]/De(i),n[1]/De(o)],r))}function nr(e){return Y(e)<=ue?0:e}function Ir(e,t){return t===void 0&&(t=[e]),function(n,r){if(r.isRequest)return!!t.some(function(o){return r.requestAble===o})&&r.parentDirection;var i=r.inputEvent.target;return ye(i,Xt("direction"))&&(!e||ye(i,Xt(e)))}}function Qe(e,t){return e?Vr(e)?e:rn(e)?t?document.querySelector(e):e:ao(e)?e():fo(e)?e:"current"in e?e.current:e:null}function qo(e,t){return e?((n=e)&&Me(n)&&!Vr(n)&&(ee(n)||"length"in n)?[].slice.call(e):[e]).reduce(function(r,i){return ee(i)?r.push(qo(i,t)):r.push(Qe(i,t)),r},[]):[];var n}function Yr(e,t){if(t){if(e==="left")return{x:"0%",y:"50%"};if(e==="top")return{x:"50%",y:"50%"};if(e==="center")return{x:"50%",y:"50%"};if(e==="right")return{x:"100%",y:"50%"};if(e==="bottom")return{x:"50%",y:"100%"};var n=T(e.split(" "),2),r=n[0],i=n[1],o=Yr(r||""),a=Yr(i||""),s=C(C({},o),a),u={x:"50%",y:"50%"};return s.x&&(u.x=s.x),s.y&&(u.y=s.y),s.value&&(s.x&&!s.y&&(u.y=s.value),!s.x&&s.y&&(u.x=s.value)),u}return e==="left"?{x:"0%"}:e==="right"?{x:"100%"}:e==="top"?{y:"0%"}:e==="bottom"?{y:"100%"}:e?e==="center"?{value:"50%"}:{value:e}:{}}function Ho(e,t,n){var r=Yr(e,!0),i=r.x,o=r.y;return[oe(i,t)||0,oe(o,n)||0]}function Lo(e,t){return e.length===t.length&&e.every(function(n,r){var i=t[r],o=ee(n),a=ee(i);return o&&a?Lo(n,i):!o&&!a&&n===i})}function Ui(e,t,n,r,i){var o=e._store,a=o[t];return!(t in o)||a!==n&&r(a)!==r(n)?(o[t]=n,n):a}function Ke(e){return e>=0?1:-1}function Y(e){return Math.abs(e)}function Vo(e){return Un(e)?{top:e,left:e,right:e,bottom:e}:{left:e.left||0,top:e.top||0,right:e.right||0,bottom:e.bottom||0}}Ir("",["resizable","scalable"]),_n("pinchable",{props:["pinchable"],events:["pinchStart","pinch","pinchEnd","pinchGroupStart","pinchGroup","pinchGroupEnd"],dragStart:function(){return!0},pinchStart:function(e,t){var n=t.datas,r=t.targets,i=t.angle,o=t.originalDatas,a=e.props,s=a.pinchable,u=a.ables;if(!s)return!1;var f="onPinch".concat(r?"Group":"","Start"),p="drag".concat(r?"Group":"","ControlStart"),c=(s===!0?e.controlAbles:u.filter(function(g){return s.indexOf(g.name)>-1})).filter(function(g){return g.canPinch&&g[p]}),l=Yt(e,t,{});r&&(l.targets=r);var h=wt(e,f,l);n.isPinch=h!==!1,n.ables=c;var d=n.isPinch;return!!d&&(c.forEach(function(g){if(o[g.name]=o[g.name]||{},g[p]){var v=C(C({},t),{datas:o[g.name],parentRotate:i,isPinch:!0});g[p](e,v)}}),e.state.snapRenderInfo={request:t.isRequest,direction:[0,0]},d)},pinch:function(e,t){var n=t.datas,r=t.scale,i=t.distance,o=t.originalDatas,a=t.inputEvent,s=t.targets,u=t.angle;if(n.isPinch){var f=i*(1-1/r),p=Yt(e,t,{});s&&(p.targets=s);var c="onPinch".concat(s?"Group":"");wt(e,c,p);var l=n.ables,h="drag".concat(s?"Group":"","Control");return l.forEach(function(d){d[h]&&d[h](e,C(C({},t),{datas:o[d.name],inputEvent:a,resolveMatrix:!0,pinchScale:r,parentDistance:f,parentRotate:u,isPinch:!0}))}),p}},pinchEnd:function(e,t){var n=t.datas,r=t.isPinch,i=t.inputEvent,o=t.targets,a=t.originalDatas;if(n.isPinch){var s="onPinch".concat(o?"Group":"","End"),u=Pn(e,t,{isDrag:r});o&&(u.targets=o),wt(e,s,u);var f=n.ables,p="drag".concat(o?"Group":"","ControlEnd");return f.forEach(function(c){c[p]&&c[p](e,C(C({},t),{isDrag:r,datas:a[c.name],inputEvent:i,isPinch:!0}))}),r}},pinchGroupStart:function(e,t){return this.pinchStart(e,C(C({},t),{targets:e.props.targets}))},pinchGroup:function(e,t){return this.pinch(e,C(C({},t),{targets:e.props.targets}))},pinchGroupEnd:function(e,t){return this.pinchEnd(e,C(C({},t),{targets:e.props.targets}))}}),Ir("scalable");var ts=Xt("area-pieces"),Ln=Xt("area-piece"),Uo=Xt("avoid"),es=Xt("view-dragging");function yr(e){var t=e.areaElement;if(t){var n=e.state,r=n.width,i=n.height;lo(t,Uo),t.style.cssText+="left: 0px; top: 0px; width: ".concat(r,"px; height: ").concat(i,"px")}}function Zi(e){return e.createElement("div",{key:"area_pieces",className:ts},e.createElement("div",{className:Ln}),e.createElement("div",{className:Ln}),e.createElement("div",{className:Ln}),e.createElement("div",{className:Ln}))}var ns={name:"dragArea",props:["dragArea","passDragArea"],events:["click","clickGroup"],render:function(e,t){var n=e.props,r=n.target,i=n.dragArea,o=n.groupable,a=n.passDragArea,s=e.getState(),u=s.width,f=s.height,p=s.renderPoses,c=a?Xt("area","pass"):Xt("area");if(o)return[t.createElement("div",{key:"area",ref:Ae(e,"areaElement"),className:c}),Zi(t)];if(!r||!i)return[];var l=go([0,0],[u,0],[0,f],[u,f],p[0],p[1],p[2],p[3]),h=l.length?ti(l,!0):"none";return[t.createElement("div",{key:"area",ref:Ae(e,"areaElement"),className:c,style:{top:"0px",left:"0px",width:"".concat(u,"px"),height:"".concat(f,"px"),transformOrigin:"0 0",transform:h}}),Zi(t)]},dragStart:function(e,t){var n=t.datas,r=t.clientX,i=t.clientY;if(!t.inputEvent)return!1;n.isDragArea=!1;var o=e.areaElement,a=e.state,s=a.moveableClientRect,u=a.renderPoses,f=a.rootMatrix,p=a.is3d,c=s.left,l=s.top,h=or(u),d=h.left,g=h.top,v=h.width,b=h.height,x=T(ni(f,[r-c,i-l],p?4:3),2),y=x[0],E=x[1],M=[{left:d,top:g,width:v,height:(E-=g)-10},{left:d,top:g,width:(y-=d)-10,height:b},{left:d,top:g+E+10,width:v,height:b-E-10},{left:d+y+10,top:g,width:v-y-10,height:b}],m=[].slice.call(o.nextElementSibling.children);M.forEach(function(D,_){m[_].style.cssText="left: ".concat(D.left,"px;top: ").concat(D.top,"px; width: ").concat(D.width,"px; height: ").concat(D.height,"px;")}),co(o,Uo),a.disableNativeEvent=!0},drag:function(e,t){var n=t.datas,r=t.inputEvent;if(this.enableNativeEvent(e),!r)return!1;n.isDragArea||(n.isDragArea=!0,yr(e))},dragEnd:function(e,t){this.enableNativeEvent(e);var n=t.inputEvent,r=t.datas;if(!n)return!1;r.isDragArea||yr(e)},dragGroupStart:function(e,t){return this.dragStart(e,t)},dragGroup:function(e,t){return this.drag(e,t)},dragGroupEnd:function(e,t){return this.dragEnd(e,t)},unset:function(e){yr(e),e.state.disableNativeEvent=!1},enableNativeEvent:function(e){var t=e.state;t.disableNativeEvent&&uo(function(){t.disableNativeEvent=!1})}};_n("origin",{props:["origin","svgOrigin"],render:function(e,t){var n,r=e.props,i=r.zoom,o=r.svgOrigin,a=r.groupable,s=e.getState(),u=s.beforeOrigin,f=s.rotation,p=s.svg,c=s.allMatrix,l=s.is3d,h=s.left,d=s.top,g=s.offsetWidth,v=s.offsetHeight;if(!a&&p&&o){var b=T(Ho(o,g,v),2);n=er(f,i,bt(Ee(c,[b[0],b[1]],l?4:3),[h,d]))}else n=er(f,i,u);return[t.createElement("div",{className:Xt("control","origin"),style:n,key:"beforeOrigin"})]}});var rs={name:"",props:["target","dragTargetSelf","dragTarget","dragContainer","container","warpSelf","rootContainer","useResizeObserver","useMutationObserver","zoom","dragFocusedInput","transformOrigin","ables","className","pinchThreshold","pinchOutside","triggerAblesSimultaneously","checkInput","cspNonce","translateZ","hideDefaultLines","props","flushSync","stopPropagation","preventClickEventOnDrag","preventClickDefault","viewContainer","persistData","useAccuratePosition","firstRenderState","linePadding","controlPadding","preventDefault","preventRightClick","preventWheelClick","requestStyles"],events:["changeTargets"]};_n("padding",{props:["padding"],render:function(e,t){var n=e.props;if(n.dragArea)return[];var r=Vo(n.padding||{}),i=r.left,o=r.top,a=r.right,s=r.bottom,u=e.getState(),f=u.renderPoses,p=[u.pos1,u.pos2,u.pos3,u.pos4],c=[];return i>0&&c.push([0,2]),o>0&&c.push([0,1]),a>0&&c.push([1,3]),s>0&&c.push([2,3]),c.map(function(l,h){var d=T(l,2),g=d[0],v=d[1],b=go([0,0],[100,0],[0,100],[100,100],p[g],p[v],f[g],f[v]);if(b.length)return t.createElement("div",{key:"padding".concat(h),className:Xt("padding"),style:{transform:ti(b,!0)}})})}});var is={isPinch:!0,name:"beforeRenderable",props:[],events:["beforeRenderStart","beforeRender","beforeRenderEnd","beforeRenderGroupStart","beforeRenderGroup","beforeRenderGroupEnd"],dragRelation:"weak",setTransform:function(e,t){var n,r,i,o=e.state,a=o.is3d,s=o.targetMatrix,u=o.inlineTransform,f=a?"matrix3d(".concat(s.join(","),")"):"matrix(".concat(po(s,!0),")"),p=u&&u!=="none"?u:f;t.datas.startTransforms=(n=p,i=It((r=a)?4:3),n==="matrix".concat(r?"3d":"","(").concat(i.join(","),")")||n==="matrix(1,0,0,1,0,0)"?[]:Sn(p))},resetStyle:function(e){var t=e.datas;t.nextStyle={},t.nextTransforms=e.datas.startTransforms,t.nextTransformAppendedIndexes=[]},fillDragStartParams:function(e,t){return Yt(e,t,{setTransform:function(n){t.datas.startTransforms=ee(n)?n:Sn(n)},isPinch:!!t.isPinch})},fillDragParams:function(e,t){return Yt(e,t,{isPinch:!!t.isPinch})},dragStart:function(e,t){this.setTransform(e,t),this.resetStyle(t),wt(e,"onBeforeRenderStart",this.fillDragStartParams(e,t))},drag:function(e,t){t.datas.startTransforms||this.setTransform(e,t),this.resetStyle(t),wt(e,"onBeforeRender",Yt(e,t,{isPinch:!!t.isPinch}))},dragEnd:function(e,t){t.datas.startTransforms||(this.setTransform(e,t),this.resetStyle(t)),wt(e,"onBeforeRenderEnd",Yt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag}))},dragGroupStart:function(e,t){var n=this;this.dragStart(e,t);var r=Xe(e,"beforeRenderable",t),i=e.moveables,o=r.map(function(a,s){var u=i[s];return n.setTransform(u,a),n.resetStyle(a),n.fillDragStartParams(u,a)});wt(e,"onBeforeRenderGroupStart",Yt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,setTransform:function(){},events:o}))},dragGroup:function(e,t){var n=this;this.drag(e,t);var r=Xe(e,"beforeRenderable",t),i=e.moveables,o=r.map(function(a,s){var u=i[s];return n.resetStyle(a),n.fillDragParams(u,a)});wt(e,"onBeforeRenderGroup",Yt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,events:o}))},dragGroupEnd:function(e,t){this.dragEnd(e,t),wt(e,"onBeforeRenderGroupEnd",Yt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)}},os={name:"renderable",props:[],events:["renderStart","render","renderEnd","renderGroupStart","renderGroup","renderGroupEnd"],dragRelation:"weak",dragStart:function(e,t){wt(e,"onRenderStart",Yt(e,t,{isPinch:!!t.isPinch}))},drag:function(e,t){wt(e,"onRender",this.fillDragParams(e,t))},dragAfter:function(e,t){return this.drag(e,t)},dragEnd:function(e,t){wt(e,"onRenderEnd",this.fillDragEndParams(e,t))},dragGroupStart:function(e,t){wt(e,"onRenderGroupStart",Yt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets}))},dragGroup:function(e,t){var n=this,r=Xe(e,"beforeRenderable",t),i=e.moveables,o=r.map(function(a,s){var u=i[s];return n.fillDragParams(u,a)});wt(e,"onRenderGroup",Yt(e,t,C(C({isPinch:!!t.isPinch,targets:e.props.targets,transform:Nn(t),transformObject:{}},Le(Wn(t))),{events:o})))},dragGroupEnd:function(e,t){var n=this,r=Xe(e,"beforeRenderable",t),i=e.moveables,o=r.map(function(a,s){var u=i[s];return n.fillDragEndParams(u,a)});wt(e,"onRenderGroupEnd",Yt(e,t,C({isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets,events:o,transformObject:{},transform:Nn(t)},Le(Wn(t)))))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlAfter:function(e,t){return this.dragAfter(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)},fillDragParams:function(e,t){var n={};return tn(Jn(t)||[]).forEach(function(r){n[r.name]=r.functionValue}),Yt(e,t,C({isPinch:!!t.isPinch,transformObject:n,transform:Nn(t)},Le(Wn(t))))},fillDragEndParams:function(e,t){var n={};return tn(Jn(t)||[]).forEach(function(r){n[r.name]=r.functionValue}),Yt(e,t,C({isPinch:!!t.isPinch,isDrag:t.isDrag,transformObject:n,transform:Nn(t)},Le(Wn(t))))}};function Mn(e,t,n,r,i,o,a){o.clientDistX=o.distX,o.clientDistY=o.distY;var s=i==="Start",u=i==="End",f=i==="After",p=e.state.target,c=o.isRequest,l=r.indexOf("Control")>-1;if(!p||s&&l&&!c&&e.areaElement===o.inputEvent.target)return!1;var h=$([],T(t),!1);if(c){var d=o.requestAble;h.some(function(O){return O.name===d})||h.push.apply(h,$([],T(e.props.ables.filter(function(O){return O.name===d})),!1))}if(!h.length||h.every(function(O){return O.dragRelation}))return!1;var g,v=o.inputEvent;u&&v&&(g=document.elementFromPoint(o.clientX,o.clientY)||v.target);var b=!1,x=function(){var O;b=!0,(O=o.stop)===null||O===void 0||O.call(o)},y=s&&(!e.targetGesto||!e.controlGesto||!e.targetGesto.isFlag()||!e.controlGesto.isFlag());y&&e.updateRect(i,!0,!1);var E=o.datas,M=l?"controlGesto":"targetGesto",m=e[M],D=function(O,S,w){if(!(S in O)||m!==e[M])return!1;var R=O.name,P=E[R]||(E[R]={});if(s&&(P.isEventStart=!w||!O[w]||O[w](e,o)),!P.isEventStart)return!1;var k=O[S](e,C(C({},o),{stop:x,datas:P,originalDatas:E,inputTarget:g}));return e._emitter.off(),s&&k===!1&&(P.isEventStart=!1),k};y&&h.forEach(function(O){O.unset&&O.unset(e)}),D(is,"drag".concat(r).concat(i));var _=0,B=0;n.forEach(function(O){if(b)return!1;var S,w,R,P,k="".concat(O).concat(r).concat(i),z="".concat(O).concat(r,"Condition");i!==""||c||(S=e.state,w=o,P=S.is3d?4:3,R=T(ni(S.rootMatrix,[w.distX,w.distY],P),2),w.distX=R[0],w.distY=R[1]);var A=h.filter(function(I){return I[k]}),G=(A=A.filter(function(I,V){return I.name&&A.indexOf(I)===V})).filter(function(I){return D(I,k,z)}).length;b&&++_,G&&++B,!b&&s&&A.length&&!G&&(_+=A.filter(function(I){var V=I.name;return!!E[V].isEventStart&&I.dragRelation!=="strong"}).length?1:0)}),f&&!B||D(os,"drag".concat(r).concat(i));var F=m!==e[M]||_===n.length;return(u||b||F)&&(e.state.gestos={},e.moveables&&e.moveables.forEach(function(O){O.state.gestos={}}),h.forEach(function(O){O.unset&&O.unset(e)})),s&&!F&&!c&&B&&e.props.preventDefault&&o?.preventDefault(),!e.isUnmounted&&!F&&((!s&&B&&!a||u)&&(e.props.flushSync||Io)(function(){e.updateRect(u?i:"",!0,!1),e.forceUpdate()}),s||u||f||!B||a||Mn(e,t,n,r,i+"After",o),!0)}function ri(e,t){return function(n,r){var i;r===void 0&&(r=n.inputEvent.target);var o=r,a=e.areaElement,s=e._dragTarget;return!(!s||!t&&(i=e.controlGesto)!==null&&i!==void 0&&i.isFlag())&&(o===s||s.contains(o)||o===a||!e.isMoveableElement(o)&&!e.controlBox.contains(o)||ye(o,"moveable-area")||ye(o,"moveable-padding")||ye(o,"moveable-edgeDraggable"))}}function Zo(e,t,n){var r=e.controlBox,i=[],o=e.props,a=o.dragArea,s=e.state.target,u=o.dragTarget;i.push(r),a&&!u||i.push(t),!a&&u&&s&&t!==s&&o.dragTargetSelf&&i.push(s);var f=ri(e);return Qo(e,i,"targetAbles",n,{dragStart:f,pinchStart:f})}function $o(e,t){var n=e.controlBox,r=[];r.push(n);var i=ri(e,!0),o=function(a,s){return s===void 0&&(s=a.inputEvent.target),s===n||!i(a,s)};return Qo(e,r,"controlAbles",t,{dragStart:o,pinchStart:o})}function Qo(e,t,n,r,i){i===void 0&&(i={});var o=n==="targetAbles",a=e.props,s=a.pinchOutside,u=a.pinchThreshold,f=a.preventClickEventOnDrag,p=a.preventClickDefault,c=a.checkInput,l=a.dragFocusedInput,h=a.preventDefault,d=h===void 0||h,g=a.preventRightClick,v=g===void 0||g,b=a.preventWheelClick,x={preventDefault:d,preventRightClick:v,preventWheelClick:b===void 0||b,container:Qe(a.dragContainer,!0)||Re(e.getControlBoxElement()),pinchThreshold:u,pinchOutside:s,preventClickEventOnDrag:!!o&&f,preventClickEventOnDragStart:!!o&&p,preventClickEventByCondition:o?null:function(M){return e.controlBox.contains(M.target)},checkInput:!!o&&c,dragFocusedInput:l},y=new Oa(t,x),E=r==="Control";return["drag","pinch"].forEach(function(M){["Start","","End"].forEach(function(m){y.on("".concat(M).concat(m),function(D){var _,B=D.eventType,F=M==="drag"&&D.isPinch;if(!i[B]||i[B](D)){if(!F){var O=M==="drag"?[M]:["drag",M],S=$([],T(e[n]),!1);Mn(e,S,O,r,m,D)?(e.props.stopPropagation||m==="Start"&&E)&&((_=D?.inputEvent)===null||_===void 0||_.stopPropagation()):D.stop()}}else D.stop()})})}),y}var as=function(){function e(t,n,r){var i=this;this.target=t,this.moveable=n,this.eventName=r,this.ables=[],this._onEvent=function(o){var a=i.eventName,s=i.moveable;s.state.disableNativeEvent||i.ables.forEach(function(u){u[a](s,{inputEvent:o})})},t.addEventListener(r.toLowerCase(),this._onEvent)}return e.prototype.setAbles=function(t){this.ables=t},e.prototype.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this._onEvent),this.target=null,this.moveable=null},e}();function ss(e,t,n,r){n===void 0&&(n=t);var i,o,a=0,s=0,u=0,f={},p=Li(e);if(e&&(a=p.offsetWidth,s=p.offsetHeight),e){var c=function(d,g,v,b){var x;v===void 0&&(v=g);var y=Fi(d,g),E=y.matrixes,M=y.is3d,m=y.targetMatrix,D=y.transformOrigin,_=y.targetOrigin,B=y.offsetContainer,F=y.hasFixed,O=y.zoom,S=function(J,Z){if(qe){var Tt=de(qe,function(it){return it[0][0]==J&&it[0][1]==Z});if(Tt)return Tt[1]}var L=Fi(J,Z,!0);return qe&&qe.push([[J,Z],L]),L}(B,v),w=S.matrixes,R=S.is3d,P=S.offsetContainer,k=S.zoom,z=b,A=d.tagName.toLowerCase()!=="svg"&&"ownerSVGElement"in d,G=m,I=It(4),V=It(4),vt=It(4),lt=It(4),H=E.length,W=w.map(function(J){return C(C({},J),{matrix:J.matrix?$([],T(J.matrix),!1):void 0})}).reverse();E.reverse(),!M&&z&&(G=Ie(G,3,4),Fr(E)),!R&&z&&Fr(W),W.forEach(function(J){V=Vt(V,J.matrix,4)});var j=v||Be(d),K=((x=W[0])===null||x===void 0?void 0:x.target)||On(j,j,!0).offsetParent,xt=W.slice(1).reduce(function(J,Z){return Vt(J,Z.matrix,4)},It(4));E.forEach(function(J,Z){if(H-2===Z&&(vt=I.slice()),H-1===Z&&(lt=I.slice()),!J.matrix){var Tt=function(L,it,ft,Q,dt){var tt,ht=L.target,Rt=L.origin,ot=it.matrix,at=Li(ht),mt=at.offsetWidth,Mt=at.offsetHeight,et=ft.getBoundingClientRect(),X=[0,0];ft===Be(ft)&&(X=Xo(ht,!0));for(var N=ht.getBoundingClientRect(),rt=N.left-et.left+ft.scrollLeft-(ft.clientLeft||0)+X[0],pt=N.top-et.top+ft.scrollTop-(ft.clientTop||0)+X[1],st=N.width,yt=N.height,ut=Qn(4,dt,ot),gt=Hi(ut,mt,Mt,4),Et=gt.left,Ot=gt.top,Ft=gt.width,zt=gt.height,ct=Ee(ut,Rt,4),nt=bt(ct,[Et,Ot]),_t=[rt+nt[0]*st/Ft,pt+nt[1]*yt/zt],St=[0,0],Ct=0;++Ct<10;){var Nt=Ge(dt,4);tt=T(bt(Ee(Nt,_t,4),Ee(Nt,ct,4)),2),St[0]=tt[0],St[1]=tt[1];var Dt=Hi(Qn(4,dt,Ye(St,4),ot),mt,Mt,4),kt=Dt.left-rt,Kt=Dt.top-pt;if(Y(kt)<2&&Y(Kt)<2)break;_t[0]-=kt,_t[1]-=Kt}return St.map(function(At){return Math.round(At)})}(J,E[Z+1],K,0,Vt(xt,I,4));J.matrix=Ye(Tt,4)}I=Vt(I,J.matrix,4)});var qt=!A&&M;G||(G=It(qt?4:3));var q=ti(A&&G.length===16?Ie(G,4,3):G,qt),U=V;return V=function(J){for(var Z=J.slice(),Tt=0;Tt<4;++Tt)Z[4*Tt+4-1]=0,Z[12+Tt]=0;return Z[15]=1,Z}(V),{hasZoom:O!==1||k!==1,hasFixed:F,matrixes:E,rootMatrix:V,originalRootMatrix:U,beforeMatrix:vt,offsetMatrix:lt,allMatrix:I,targetMatrix:G,targetTransform:q,inlineTransform:d.style.transform,transformOrigin:D,targetOrigin:_,is3d:z,offsetContainer:B,offsetRootContainer:P}}(e,t,n,r),l=xn(c.allMatrix,c.transformOrigin,a,s);f=C(C({},c),l);var h=xn(c.allMatrix,[50,50],100,100);i=[h.pos1,h.pos2],u=pe((o=h.direction)>0?i[0]:i[1],o>0?i[1]:i[0])}return C(C(C({hasZoom:!1,width:a,height:s,rotation:u},p),{originalRootMatrix:It(4),rootMatrix:It(4),beforeMatrix:It(4),offsetMatrix:It(4),allMatrix:It(4),targetMatrix:It(4),targetTransform:"",inlineTransform:"",transformOrigin:[0,0],targetOrigin:[0,0],is3d:!0,left:0,top:0,right:0,bottom:0,origin:[0,0],pos1:[0,0],pos2:[0,0],pos3:[0,0],pos4:[0,0],direction:1,hasFixed:!1,offsetContainer:null,offsetRootContainer:null,matrixes:[]}),f)}function Xr(e,t,n,r,i,o){o===void 0&&(o=[]);var a=1,s=[0,0],u={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},f={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},p={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},c={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},l=[0,0],h={},d=ss(t,n,i,!0);if(t){var g=ce(t);o.forEach(function(S){h[S]=g(S)});var v=d.is3d?4:3,b=xn(d.offsetMatrix,Wt(d.transformOrigin,function(S,w){w===void 0&&(w=Math.sqrt(S.length));for(var R=[],P=S[w*w-1],k=0;k<w-1;++k)R[k]=S[w*(w-1)+k]/P;return R[w-1]=0,R}(d.targetMatrix,v)),d.width,d.height);a=b.direction,s=Wt(b.origin,[b.left-d.left,b.top-d.top]),c=qn(d.offsetRootContainer);var x=On(r,r,!0).offsetParent||d.offsetRootContainer;if(d.hasZoom){var y=xn(Vt(d.originalRootMatrix,d.allMatrix),d.transformOrigin,d.width,d.height),E=xn(d.originalRootMatrix,Zn(ce(x)("transformOrigin")).map(function(S){return parseFloat(S)}),x.offsetWidth,x.offsetHeight);if(u=xr(y,c),p=xr(E,c,x,!0),e){var M=y.left,m=y.top;f=xr({left:M,top:m,bottom:m,right:m},c)}}else{u=qn(t),p=function(S){var w=En?.get(S);if(w)return w;var R=qn(S,!0);return En&&En.set(S,R),R}(x),e&&(f=qn(e));var D=p.left,_=p.top,B=p.clientLeft,F=p.clientTop,O=[u.left-D,u.top-_];l=bt(ni(d.rootMatrix,O,4),[B+d.left,F+d.top])}}return C({targetClientRect:u,containerClientRect:p,moveableClientRect:f,rootContainerClientRect:c,beforeDirection:a,beforeOrigin:s,originalBeforeOrigin:s,target:t,style:h,offsetDelta:l},d)}function $i(e){var t=e.pos1,n=e.pos2,r=e.pos3,i=e.pos4;if(!(t&&n&&r&&i))return null;var o=Ue([t,n,r,i]),a=[o.minX,o.minY],s=bt(e.origin,a);return t=bt(t,a),n=bt(n,a),r=bt(r,a),i=bt(i,a),C(C({},e),{left:e.left,top:e.top,posDelta:a,pos1:t,pos2:n,pos3:r,pos4:i,origin:s,beforeOrigin:s,isPersisted:!0})}var nn=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state=C({container:null,gestos:{},renderLines:[[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]]],renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1,posDelta:[0,0]},Xr(null)),n.renderState={},n.enabledAbles=[],n.targetAbles=[],n.controlAbles=[],n.rotation=0,n.scale=[1,1],n.isMoveableMounted=!1,n.isUnmounted=!1,n.events={mouseEnter:null,mouseLeave:null},n._emitter=new xo,n._prevOriginalDragTarget=null,n._originalDragTarget=null,n._prevDragTarget=null,n._dragTarget=null,n._prevPropTarget=null,n._propTarget=null,n._prevDragArea=!1,n._isPropTargetChanged=!1,n._hasFirstTarget=!1,n._reiszeObserver=null,n._observerId=0,n._mutationObserver=null,n._rootContainer=null,n._viewContainer=null,n._viewClassNames=[],n._store={},n.checkUpdateRect=function(){if(!n.isDragging()){var r=n.props.parentMoveable;r?r.checkUpdateRect():(ha(n._observerId),n._observerId=uo(function(){n.isDragging()||n.updateRect()}))}},n._onPreventClick=function(r){r.stopPropagation(),r.preventDefault()},n}return kn(t,e),t.prototype.render=function(){var n=this.props,r=this.getState(),i=n.parentPosition,o=n.className,a=n.target,s=n.zoom,u=n.cspNonce,f=n.translateZ,p=n.cssStyled,c=n.groupable,l=n.linePadding,h=n.controlPadding;this._checkUpdateRootContainer(),this.checkUpdate(),this.updateRenderPoses();var d=T(i||[0,0],2),g=d[0],v=d[1],b=r.left,x=r.top,y=r.target,E=r.direction,M=r.hasFixed,m=r.offsetDelta,D=n.targets,_=this.isDragging(),B={};this.getEnabledAbles().forEach(function(P){B["data-able-".concat(P.name.toLowerCase())]=!0});var F=this._getAbleClassName(),O=D&&D.length&&(y||c)||a||!this._hasFirstTarget&&this.state.isPersisted,S=this.controlBox||this.props.firstRenderState||this.props.persistData,w=[b-g,x-v];!c&&n.useAccuratePosition&&(w[0]+=m[0],w[1]+=m[1]);var R={position:M?"fixed":"absolute",display:O?"block":"none",visibility:S?"visible":"hidden",transform:"translate3d(".concat(w[0],"px, ").concat(w[1],"px, ").concat(f,")"),"--zoom":s,"--zoompx":"".concat(s,"px")};return l&&(R["--moveable-line-padding"]=l),h&&(R["--moveable-control-padding"]=h),Pe.createElement(p,C({cspNonce:u,ref:Ae(this,"controlBox"),className:"".concat(Xt("control-box",E===-1?"reverse":"",_?"dragging":"")," ").concat(F," ").concat(o)},B,{onClick:this._onPreventClick,style:R}),this.renderAbles(),this._renderLines())},t.prototype.componentDidMount=function(){this.isMoveableMounted=!0,this.isUnmounted=!1;var n=this.props,r=n.parentMoveable,i=n.container;this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(this.props),i||r||this.state.isPersisted||(this.updateRect("",!1,!1),this.forceUpdate())},t.prototype.componentDidUpdate=function(n){this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateNativeEvents(),this._updateTargets(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(n)},t.prototype.componentWillUnmount=function(){var n,r;this.isMoveableMounted=!1,this.isUnmounted=!0,this._emitter.off(),(n=this._reiszeObserver)===null||n===void 0||n.disconnect(),(r=this._mutationObserver)===null||r===void 0||r.disconnect(),this._viewContainer&&this._changeAbleViewClassNames([]),He(this,!1),He(this,!0);var i=this.events;for(var o in i){var a=i[o];a&&a.destroy()}},t.prototype.getTargets=function(){var n=this.props.target;return n?[n]:[]},t.prototype.getAble=function(n){return de(this.props.ables||[],function(r){return r.name===n})},t.prototype.getContainer=function(){var n=this.props,r=n.parentMoveable,i=n.wrapperMoveable;return n.container||i&&i.getContainer()||r&&r.getContainer()||this.controlBox.parentElement},t.prototype.getControlBoxElement=function(){return this.controlBox},t.prototype.getDragElement=function(){return this._dragTarget},t.prototype.isMoveableElement=function(n){var r;return n&&(((r=n.getAttribute)===null||r===void 0?void 0:r.call(n,"class"))||"").indexOf(Qr)>-1},t.prototype.dragStart=function(n,r){r===void 0&&(r=n.target);var i=this.targetGesto,o=this.controlGesto;return i&&ri(this)({inputEvent:n},r)?i.isFlag()||i.triggerDragStart(n):o&&this.isMoveableElement(r)&&(o.isFlag()||o.triggerDragStart(n)),this},t.prototype.hitTest=function(n){var r,i=this.state,o=i.target,a=i.pos1,s=i.pos2,u=i.pos3,f=i.pos4,p=i.targetClientRect;if(!o)return 0;if(Vr(n)){var c=n.getBoundingClientRect();r={left:c.left,top:c.top,width:c.width,height:c.height}}else r=C({width:0,height:0},n);var l=r.left,h=r.top,d=r.width,g=r.height,v=Mi([a,s,f,u],p),b=wi(function(y,E){return function(M,m){var D=M.slice(),_=m.slice();xi(D)===-1&&D.reverse(),xi(_)===-1&&_.reverse();var B=Tr(D),F=Tr(_),O=B.map(function(P){return Kn(P[0],P[1])}),S=F.map(function(P){return Kn(P[0],P[1])}),w=[];O.forEach(function(P,k){var z=B[k],A=[];S.forEach(function(G,I){var V=yo(Zr(P,G),[z,F[I]]);A.push.apply(A,V.map(function(vt){return{index1:k,index2:I,pos:vt,type:"intersection"}}))}),A.sort(function(G,I){return vn(z[0],G.pos)-vn(z[0],I.pos)}),w.push.apply(w,A),lr(z[1],_)&&w.push({index1:k,index2:-1,pos:z[1],type:"inside"})}),F.forEach(function(P,k){if(lr(P[1],D)){var z=!1,A=Je(w,function(G){return G.index2===k?(z=!0,!1):!!z});A===-1&&(z=!1,A=Je(w,function(G){var I=G.index1,V=G.index2;return I===-1&&V+1===k?(z=!0,!1):!!z})),A===-1?w.push({index1:-1,index2:k,pos:P[1],type:"inside"}):w.splice(A,0,{index1:-1,index2:k,pos:P[1],type:"inside"})}});var R={};return w.filter(function(P){var k=P.pos,z=k[0]+"x"+k[1];return!R[z]&&(R[z]=!0,!0)})}(y,E).map(function(M){return M.pos})}(v,[[l,h],[l+d,h],[l+d,h+g],[l,h+g]])),x=wi(v);return b&&x?Math.min(100,b/x*100):0},t.prototype.isInside=function(n,r){var i=this.state,o=i.target,a=i.pos1,s=i.pos2,u=i.pos3,f=i.pos4,p=i.targetClientRect;return!!o&&lr([n,r],Mi([a,s,f,u],p))},t.prototype.updateRect=function(n,r,i){i===void 0&&(i=!0);var o=this.props,a=!o.parentPosition&&!o.wrapperMoveable;a&&en(!0);var s=o.parentMoveable,u=this.state.target||o.target,f=this.getContainer(),p=s?s._rootContainer:this._rootContainer,c=Xr(this.controlBox,u,f,f,p||f,this._getRequestStyles());if(!u&&this._hasFirstTarget&&o.persistData){var l=$i(o.persistData);for(var h in l)c[h]=l[h]}a&&en(),this.updateState(c,!s&&i)},t.prototype.isDragging=function(n){var r,i,o=this.targetGesto,a=this.controlGesto;return o?.isFlag()?!n||!((r=o.getEventData()[n])===null||r===void 0||!r.isEventStart):!(!a?.isFlag()||n&&((i=a.getEventData()[n])===null||i===void 0||!i.isEventStart))},t.prototype.updateTarget=function(n){this.updateRect(n,!0)},t.prototype.getRect=function(){var n=this.state,r=ke(this.state),i=T(r,4),o=i[0],a=i[1],s=i[2],u=i[3],f=or(r),p=n.width,c=n.height,l=f.width,h=f.height,d=f.left,g=f.top,v=[n.left,n.top],b=Wt(v,n.origin);return{width:l,height:h,left:d,top:g,pos1:o,pos2:a,pos3:s,pos4:u,offsetWidth:p,offsetHeight:c,beforeOrigin:Wt(v,n.beforeOrigin),origin:b,transformOrigin:n.transformOrigin,rotation:this.getRotation()}},t.prototype.getManager=function(){return this},t.prototype.stopDrag=function(n){var r;n&&n!=="target"||(((r=this.targetGesto)==null?void 0:r.isIdle())===!1&&Ar(this,!1),r?.stop()),n&&n!=="control"||(((r=this.controlGesto)==null?void 0:r.isIdle())===!1&&Ar(this,!0),r?.stop())},t.prototype.getRotation=function(){var n,r,i,o,a=this.state;return n=a.pos1,r=a.pos2,i=a.direction,o=pe(n,r)/Math.PI*180,(o=i>=0?o:180-o)>=0?o:360+o},t.prototype.request=function(n,r,i){r===void 0&&(r={});var o=this,a=o.props,s=a.parentMoveable||a.wrapperMoveable||o,u=s.props.ables,f=a.groupable,p=de(u,function(b){return b.name===n});if(this.isDragging()||!p||!p.request)return{request:function(){return this},requestEnd:function(){return this}};var c=p.request(o),l=i||r.isInstant,h=c.isControl?"controlAbles":"targetAbles",d="".concat(f?"Group":"").concat(c.isControl?"Control":""),g=$([],T(s[h]),!1),v={request:function(b){return Mn(o,g,["drag"],d,"",C(C({},c.request(b)),{requestAble:n,isRequest:!0}),l),v},requestEnd:function(){return Mn(o,g,["drag"],d,"End",C(C({},c.requestEnd()),{requestAble:n,isRequest:!0}),l),v}};return Mn(o,g,["drag"],d,"Start",C(C({},c.requestStart(r)),{requestAble:n,isRequest:!0}),l),l?v.request(r).requestEnd():v},t.prototype.getMoveables=function(){return[this]},t.prototype.destroy=function(){this.componentWillUnmount()},t.prototype.updateRenderPoses=function(){var n=this.getState(),r=this.props,i=r.padding,o=n.originalBeforeOrigin,a=n.transformOrigin,s=n.allMatrix,u=n.is3d,f=n.pos1,p=n.pos2,c=n.pos3,l=n.pos4,h=n.left,d=n.top,g=n.isPersisted,v=r.zoom||1;if(!i&&v<=1)return n.renderPoses=[f,p,c,l],void(n.renderLines=[[f,p],[p,l],[l,c],[c,f]]);var b=Vo(i||{}),x=b.left,y=b.top,E=b.bottom,M=b.right,m=u?4:3,D=Qn(m,Ye((g?a:this.controlBox&&r.groupable?o:Wt(o,[h,d])).map(function(w){return-w}),m),s,Ye(a,m)),_=fe(D,f,[-x,-y],m),B=fe(D,p,[M,-y],m),F=fe(D,c,[-x,E],m),O=fe(D,l,[M,E],m);n.renderPoses=[_,B,F,O],n.renderLines=[[_,B],[B,O],[O,F],[F,_]];var S=v/2;n.renderLines=[[fe(D,f,[-x-S,-y],m),fe(D,p,[M+S,-y],m)],[fe(D,p,[M,-y-S],m),fe(D,l,[M,E+S],m)],[fe(D,l,[M+S,E],m),fe(D,c,[-x-S,E],m)],[fe(D,c,[-x,E+S],m),fe(D,f,[-x,-y-S],m)]]},t.prototype.checkUpdate=function(){this._isPropTargetChanged=!1;var n=this.props,r=n.target,i=n.container,o=n.parentMoveable,a=this.state,s=a.target,u=a.container;if(s||r){this.updateAbles();var f=!Gr(s,r);if(f||!Gr(u,i)){var p=i||this.controlBox;p&&this.unsetAbles(),this.updateState({target:r,container:i}),!o&&p&&this.updateRect("End",!1,!1),this._isPropTargetChanged=f}}},t.prototype.waitToChangeTarget=function(){return new Promise(function(){})},t.prototype.triggerEvent=function(n,r){var i=this.props;if(this._emitter.trigger(n,r),i.parentMoveable&&r.isRequest&&!r.isRequestChild)return i.parentMoveable.triggerEvent(n,r,!0);var o=i[n];return o&&o(r)},t.prototype.useCSS=function(n,r){var i=this.props.customStyledMap,o=n+r;return i[o]||(i[o]=Do(n,r)),i[o]},t.prototype.getState=function(){var n,r=this.props;(r.target||(n=r.targets)!==null&&n!==void 0&&n.length)&&(this._hasFirstTarget=!0);var i=this.controlBox,o=r.persistData,a=r.firstRenderState;if(a&&!i)return a;if(!this._hasFirstTarget&&o){var s=$i(o);if(s)return this.updateState(s,!1),this.state}return this.state.isPersisted=!1,this.state},t.prototype.updateSelectors=function(){},t.prototype.unsetAbles=function(){var n=this;this.targetAbles.forEach(function(r){r.unset&&r.unset(n)})},t.prototype.updateAbles=function(n,r){n===void 0&&(n=this.props.ables),r===void 0&&(r="");var i=this.props.triggerAblesSimultaneously,o=this.getEnabledAbles(n),a="drag".concat(r,"Start"),s="pinch".concat(r,"Start"),u="drag".concat(r,"ControlStart"),f=Hn(o,[a,s],i),p=Hn(o,[u],i);this.enabledAbles=o,this.targetAbles=f,this.controlAbles=p},t.prototype.updateState=function(n,r){if(r){if(this.isUnmounted)return;this.setState(n)}else{var i=this.state;for(var o in n)i[o]=n[o]}},t.prototype.getEnabledAbles=function(n){n===void 0&&(n=this.props.ables);var r=this.props;return n.filter(function(i){return i&&(i.always&&r[i.name]!==!1||r[i.name])})},t.prototype.renderAbles=function(){var n,r,i,o,a=this,s=this.props.triggerAblesSimultaneously,u={createElement:Oe.createElement};return this.renderState={},(n=jo(Hn(this.getEnabledAbles(),["render"],s).map(function(f){return(0,f.render)(a,u)||[]})).filter(function(f){return f}),r=function(f){return f.key},i=[],o={},n.forEach(function(f,p){var c=r(f),l=o[c];l||(l=[],o[c]=l,i.push(l)),l.push(f)}),i).map(function(f){return f[0]})},t.prototype.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},t.prototype._getRequestStyles=function(){return this.getEnabledAbles().reduce(function(n,r){var i,o,a=(o=(i=r.requestStyle)===null||i===void 0?void 0:i.call(r))!==null&&o!==void 0?o:[];return $($([],T(n),!1),T(a),!1)},$([],T(this.props.requestStyles||[]),!1))},t.prototype._updateObserver=function(n){this._updateResizeObserver(n),this._updateMutationObserver(n)},t.prototype._updateEvents=function(){var n=this.targetAbles.length,r=this.controlAbles.length,i=this._dragTarget;(!n&&this.targetGesto||this._isTargetChanged(!0))&&(He(this,!1),this.updateState({gestos:{}})),r||He(this,!0),i&&n&&!this.targetGesto&&(this.targetGesto=Zo(this,i,"")),!this.controlGesto&&r&&(this.controlGesto=$o(this,"Control"))},t.prototype._updateTargets=function(){var n=this.props;this._prevPropTarget=this._propTarget,this._prevDragTarget=this._dragTarget,this._prevOriginalDragTarget=this._originalDragTarget,this._prevDragArea=n.dragArea,this._propTarget=n.target,this._originalDragTarget=n.dragTarget||n.target,this._dragTarget=Qe(this._originalDragTarget,!0)},t.prototype._renderLines=function(){var n=this.props,r=n.zoom,i=n.hideDefaultLines,o=n.hideChildMoveableDefaultLines,a=n.parentMoveable;if(i||a&&o)return[];var s=this.getState(),u={createElement:Oe.createElement};return s.renderLines.map(function(f,p){return Kr(u,"",f[0],f[1],r,"render-line-".concat(p))})},t.prototype._isTargetChanged=function(n){var r=this.props,i=r.dragTarget||r.target,o=this._prevOriginalDragTarget,a=this._prevDragArea,s=r.dragArea;return!s&&o!==i||(n||s)&&a!==s||this._prevPropTarget!=this._propTarget},t.prototype._updateNativeEvents=function(){var n=this,r=this.props.dragArea?this.areaElement:this.state.target,i=this.events,o=Cn(i);if(this._isTargetChanged())for(var a in i){var s=i[a];s&&s.destroy(),i[a]=null}if(r){var u=this.enabledAbles;o.forEach(function(f){var p=Hn(u,[f]),c=p.length>0,l=i[f];c?(l||(l=new as(r,n,f),i[f]=l),l.setAbles(p)):l&&(l.destroy(),i[f]=null)})}},t.prototype._checkUpdateRootContainer=function(){var n=this.props.rootContainer;!this._rootContainer&&n&&(this._rootContainer=Qe(n,!0))},t.prototype._checkUpdateViewContainer=function(){var n=this.props.viewContainer;!this._viewContainer&&n&&(this._viewContainer=Qe(n,!0)),this._viewContainer&&this._changeAbleViewClassNames($($([],T(this._getAbleViewClassNames()),!1),[this.isDragging()?es:""],!1))},t.prototype._changeAbleViewClassNames=function(n){var r,i,o,a=this._viewContainer,s=(r=n.filter(Boolean),i=[],o=[],r.forEach(function(l,h){var d=l,g=o.indexOf(d),v=i[g]||[];g===-1&&(o.push(d),i.push(v)),v.push(l)}),i).map(function(l){return T(l,1)[0]}),u=this._viewClassNames,f=vo(u,s),p=f.removed,c=f.added;p.forEach(function(l){lo(a,u[l])}),c.forEach(function(l){co(a,s[l])}),this._viewClassNames=s},t.prototype._getAbleViewClassNames=function(){var n=this;return(this.getEnabledAbles().map(function(r){var i;return((i=r.viewClassName)===null||i===void 0?void 0:i.call(r,n))||""}).join(" ")+" ".concat(this._getAbleClassName("-view"))).split(/\s+/g)},t.prototype._getAbleClassName=function(n){var r=this;n===void 0&&(n="");var i=this.getEnabledAbles(),o=this.targetGesto,a=this.controlGesto,s=o?.isFlag()?o.getEventData():{},u=a?.isFlag()?a.getEventData():{};return i.map(function(f){var p,c,l,h=f.name,d=((p=f.className)===null||p===void 0?void 0:p.call(f,r))||"";return(!((c=s[h])===null||c===void 0)&&c.isEventStart||!((l=u[h])===null||l===void 0)&&l.isEventStart)&&(d+=" ".concat(Xt("".concat(h).concat(n,"-dragging")))),d.trim()}).filter(Boolean).join(" ")},t.prototype._updateResizeObserver=function(n){var r,i=this.props,o=i.target,a=Re(this.getControlBoxElement());if(a.ResizeObserver&&o&&i.useResizeObserver){if(n.target!==o||!this._reiszeObserver){var s=new a.ResizeObserver(this.checkUpdateRect);s.observe(o,{box:"border-box"}),this._reiszeObserver=s}}else(r=this._reiszeObserver)===null||r===void 0||r.disconnect()},t.prototype._updateMutationObserver=function(n){var r,i=this,o=this.props,a=o.target,s=Re(this.getControlBoxElement());if(s.MutationObserver&&a&&o.useMutationObserver){if(n.target!==a||!this._mutationObserver){var u=new s.MutationObserver(function(f){var p,c;try{for(var l=function(g){var v=typeof Symbol=="function"&&Symbol.iterator,b=v&&g[v],x=0;if(b)return b.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&x>=g.length&&(g=void 0),{value:g&&g[x++],done:!g}}};throw new TypeError(v?"Object is not iterable.":"Symbol.iterator is not defined.")}(f),h=l.next();!h.done;h=l.next()){var d=h.value;d.type==="attributes"&&d.attributeName==="style"&&i.checkUpdateRect()}}catch(g){p={error:g}}finally{try{h&&!h.done&&(c=l.return)&&c.call(l)}finally{if(p)throw p.error}}});u.observe(a,{attributes:!0}),this._mutationObserver=u}}else(r=this._mutationObserver)===null||r===void 0||r.disconnect()},t.defaultProps={dragTargetSelf:!1,target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,parentMoveable:null,wrapperMoveable:null,isWrapperMounted:!1,parentPosition:null,warpSelf:!1,svgOrigin:"",dragContainer:null,useResizeObserver:!1,useMutationObserver:!1,preventDefault:!0,preventRightClick:!0,preventWheelClick:!0,linePadding:0,controlPadding:0,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:"",className:"",zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,dragFocusedInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:"",translateZ:0,cssStyled:null,customStyledMap:{},props:{},stopPropagation:!1,preventClickDefault:!1,preventClickEventOnDrag:!0,flushSync:Io,firstRenderState:null,persistData:null,viewContainer:null,requestStyles:[],useAccuratePosition:!1},t}(Pe.PureComponent),Ko={name:"groupable",props:["defaultGroupRotate","useDefaultGroupRotate","defaultGroupOrigin","groupable","groupableProps","targetGroups","hideChildMoveableDefaultLines"],events:[],render:function(e,t){var n,r=e.props,i=r.targets||[],o=e.getState(),a=o.left,s=o.top,u=o.isPersisted,f=r.zoom||1,p=e.renderGroupRects,c=((n=r.persistData)===null||n===void 0?void 0:n.children)||[];u?i=c.map(function(){return null}):c=[];var l=Ui(e,"parentPosition",[a,s],function(d){return d.join(",")}),h=Ui(e,"requestStyles",e.getRequestChildStyles(),function(d){return d.join(",")});return e.moveables=e.moveables.slice(0,i.length),$($([],T(i.map(function(d,g){return t.createElement(nn,{key:"moveable"+g,ref:io(e,"moveables",g),target:d,origin:!1,requestStyles:h,cssStyled:r.cssStyled,customStyledMap:r.customStyledMap,useResizeObserver:r.useResizeObserver,useMutationObserver:r.useMutationObserver,hideChildMoveableDefaultLines:r.hideChildMoveableDefaultLines,parentMoveable:e,parentPosition:[a,s],persistData:c[g],zoom:f})})),!1),T(jo(p.map(function(d,g){var v=[d.pos1,d.pos2,d.pos3,d.pos4];return[[0,1],[1,3],[3,2],[2,0]].map(function(b,x){var y=T(b,2),E=y[0],M=y[1];return Kr(t,"",bt(v[E],l),bt(v[M],l),f,"group-rect-".concat(g,"-").concat(x))})}))),!1)}};function We(e){var t=e.originalDatas.draggable;return t||(e.originalDatas.draggable={},t=e.originalDatas.draggable),C(C({},e),{datas:t})}_n("clickable",{props:["clickable"],events:["click","clickGroup"],always:!0,dragRelation:"weak",dragStart:function(){},dragControlStart:function(){},dragGroupStart:function(e,t){t.datas.inputTarget=t.inputEvent&&t.inputEvent.target},dragEnd:function(e,t){var n=e.props.target,r=t.inputEvent,i=t.inputTarget,o=!e.isMoveableElement(i)&&e.controlBox.contains(i);if(r&&i&&!t.isDrag&&!e.isMoveableElement(i)&&!o){var a=n.contains(i);wt(e,"onClick",Yt(e,t,{isDouble:t.isDouble,inputTarget:i,isTarget:n===i,moveableTarget:e.props.target,containsTarget:a}))}},dragGroupEnd:function(e,t){var n=t.inputEvent,r=t.inputTarget;if(n&&r&&!t.isDrag&&!e.isMoveableElement(r)&&t.datas.inputTarget!==r){var i=e.props.targets,o=i.indexOf(r),a=o>-1,s=!1;o===-1&&(s=(o=Je(i,function(u){return u.contains(r)}))>-1),wt(e,"onClickGroup",Yt(e,t,{isDouble:t.isDouble,targets:i,inputTarget:r,targetIndex:o,isTarget:a,containsTarget:s,moveableTarget:i[o]}))}},dragControlEnd:function(e,t){this.dragEnd(e,t)},dragGroupControlEnd:function(e,t){this.dragEnd(e,t)}}),_n("edgeDraggable",{css:[`.edge.edgeDraggable.line {
|
|
159
|
-
cursor: move;
|
|
160
|
-
}`],render:function(e,t){var n=e.props,r=n.edgeDraggable;return r?Ro(t,"edgeDraggable",r,e.getState().renderPoses,n.zoom):[]},dragCondition:function(e,t){var n,r=e.props,i=(n=t.inputEvent)===null||n===void 0?void 0:n.target;return!(!r.edgeDraggable||!i)&&!r.draggable&&ye(i,Xt("direction"))&&ye(i,Xt("edge"))&&ye(i,Xt("edgeDraggable"))},dragStart:function(e,t){return xe.dragStart(e,We(t))},drag:function(e,t){return xe.drag(e,We(t))},dragEnd:function(e,t){return xe.dragEnd(e,We(t))},dragGroupCondition:function(e,t){var n,r=e.props,i=(n=t.inputEvent)===null||n===void 0?void 0:n.target;return!(!r.edgeDraggable||!i)&&!r.draggable&&ye(i,Xt("direction"))&&ye(i,Xt("line"))},dragGroupStart:function(e,t){return xe.dragGroupStart(e,We(t))},dragGroup:function(e,t){return xe.dragGroup(e,We(t))},dragGroupEnd:function(e,t){return xe.dragGroupEnd(e,We(t))},unset:function(e){return xe.unset(e)}});var us={name:"individualGroupable",props:["individualGroupable","individualGroupableProps"],events:[]};function Qi(e,t){var n=T(e,3),r=n[0],i=n[1],o=n[2];return(r*t[0]+i*t[1]+o)/Math.sqrt(r*r+i*i)}function Vn(e,t){var n=T(e,2),r=n[0],i=n[1];return-r*t[0]-i*t[1]}function Ki(e,t){return Math.max.apply(Math,$([],T(e.map(function(n){var r=T(n,4),i=r[0],o=r[1],a=r[2],s=r[3];return Math.max(i[t],o[t],a[t],s[t])})),!1))}function Ji(e,t){return Math.min.apply(Math,$([],T(e.map(function(n){var r=T(n,4),i=r[0],o=r[1],a=r[2],s=r[3];return Math.min(i[t],o[t],a[t],s[t])})),!1))}function Jo(e,t){var n=t.map(function(r){if(ee(r)){var i=Jo(e,r),o=i.length;return o>1?i:o===1?i[0]:null}var a=de(e,function(s){return s.manager.props.target===r});return a?(a.finded=!0,a.manager):null}).filter(Boolean);return n.length===1&&ee(n[0])?n[0]:n}var cs=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.differ=new bo,n.moveables=[],n.transformOrigin="50% 50%",n.renderGroupRects=[],n._targetGroups=[],n._hasFirstTargets=!1,n}return kn(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t.prototype.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},t.prototype.getTargets=function(){return this.props.targets},t.prototype.updateRect=function(n,r,i){var o;i===void 0&&(i=!0);var a=this.state;if(this.controlBox&&!a.isPersisted){en(!0),this.moveables.forEach(function(j){j.updateRect(n,!1,!1)});var s=this.props,u=this.moveables,f=a.target||s.target,p=u.map(function(j){return{finded:!1,manager:j}}),c=this.props.targetGroups||[],l=Jo(p,c),h=s.useDefaultGroupRotate;l.push.apply(l,$([],T(p.filter(function(j){return!j.finded}).map(function(j){return j.manager})),!1));var d=[],g=!r||n!==""&&s.updateGroup,v=s.defaultGroupRotate||0;if(!this._hasFirstTargets){var b=(o=s.persistData)===null||o===void 0?void 0:o.rotation;b!=null&&(v=b)}var x=function j(K,xt,qt){var q,U=K.map(function(L){if(ee(L)){var it=j(L,xt),ft=[it.pos1,it.pos2,it.pos3,it.pos4];return d.push(it),{poses:ft,rotation:it.rotation}}return{poses:ke(L.state),rotation:L.getRotation()}}),J=U.map(function(L){return L.rotation}),Z=J[0],Tt=J.every(function(L){return Math.abs(Z-L)<.1});return q=g?!h&&Tt?Z:v:h||qt||!Tt?xt:Z,function(L,it){var ft,Q,dt,tt=[0,0],ht=[0,0],Rt=[0,0],ot=[0,0],at=0,mt=0;if(!L.length)return{pos1:tt,pos2:ht,pos3:Rt,pos4:ot,minX:0,minY:0,maxX:0,maxY:0,width:at,height:mt,rotation:it};var Mt=Bt(it,ue);if(Mt%90){var et=Mt/180*Math.PI,X=Math.tan(et),N=-1/X,rt=[Pr,Pi],pt=[[0,0],[0,0]],st=[Pr,Pi],yt=[[0,0],[0,0]];L.forEach(function(At){At.forEach(function(Gt){var Zt=Qi([-X,1,0],Gt),ne=Qi([-N,1,0],Gt);rt[0]>Zt&&(pt[0]=Gt,rt[0]=Zt),rt[1]<Zt&&(pt[1]=Gt,rt[1]=Zt),st[0]>ne&&(yt[0]=Gt,st[0]=ne),st[1]<ne&&(yt[1]=Gt,st[1]=ne)})});var ut=T(pt,2),gt=ut[0],Et=ut[1],Ot=T(yt,2),Ft=Ot[0],zt=Ot[1],ct=[-X,1,Vn([-X,1],gt)],nt=[-X,1,Vn([-X,1],Et)],_t=[-N,1,Vn([-N,1],Ft)],St=[-N,1,Vn([-N,1],zt)];tt=(ft=T([[ct,_t],[ct,St],[nt,_t],[nt,St]].map(function(At){var Gt=T(At,2);return Zr(Gt[0],Gt[1])[0]}),4))[0],ht=ft[1],Rt=ft[2],ot=ft[3],at=st[1]-st[0],mt=rt[1]-rt[0]}else{var Ct=Ji(L,0),Nt=Ji(L,1),Dt=Ki(L,0),kt=Ki(L,1);tt=[Ct,Nt],ht=[Dt,Nt],Rt=[Ct,kt],ot=[Dt,kt],at=Dt-Ct,mt=kt-Nt,Mt%180&&(tt=(Q=T([Rt,tt,ot,ht],4))[0],ht=Q[1],Rt=Q[2],ot=Q[3],at=kt-Nt,mt=Dt-Ct)}Mt%360>180&&(tt=(dt=T([ot,Rt,ht,tt],4))[0],ht=dt[1],Rt=dt[2],ot=dt[3]);var Kt=Ue([tt,ht,Rt,ot]);return{pos1:tt,pos2:ht,pos3:Rt,pos4:ot,width:at,height:mt,minX:Kt.minX,minY:Kt.minY,maxX:Kt.maxX,maxY:Kt.maxY,rotation:it}}(U.map(function(L){return L.poses}),q)}(l,this.rotation,!0);g&&(this.rotation=x.rotation,this.transformOrigin=s.defaultGroupOrigin||"50% 50%",this.scale=[1,1]),this._targetGroups=c,this.renderGroupRects=d;var y=this.transformOrigin,E=this.rotation,M=this.scale,m=x.width,D=x.height,_=x.minX,B=x.minY,F=Ue(function(j,K,xt){var qt=j.map(function(U){return bt(U,K)}),q=qt.map(function(U){return J=U,be(ir(xt,3),Rn(J,3));var J});return{prev:qt,next:q,result:q.map(function(U){return Wt(U,K)})}}([[0,0],[m,0],[0,D],[m,D]],Ho(y,m,D),this.rotation/180*Math.PI).result),O=F.minX,S=F.minY,w=" rotate(".concat(E,"deg)")+" scale(".concat(Ke(M[0]),", ").concat(Ke(M[1]),")"),R="translate(".concat(-O,"px, ").concat(-S,"px)").concat(w);this.controlBox.style.transform="translate3d(".concat(_,"px, ").concat(B,"px, ").concat(this.props.translateZ||0,")"),f.style.cssText+="left:0px;top:0px;"+"transform-origin:".concat(y,";")+"width:".concat(m,"px;height:").concat(D,"px;")+"transform: ".concat(R),a.width=m,a.height=D;var P=this.getContainer(),k=Xr(this.controlBox,f,this.controlBox,this.getContainer(),this._rootContainer||P,[]),z=[k.left,k.top],A=T(ke(k),4),G=A[0],I=A[1],V=A[2],vt=A[3],lt=Ue([G,I,V,vt]),H=[lt.minX,lt.minY],W=Ke(M[0]*M[1]);k.pos1=bt(G,H),k.pos2=bt(I,H),k.pos3=bt(V,H),k.pos4=bt(vt,H),k.left=_-k.left+H[0],k.top=B-k.top+H[1],k.origin=bt(Wt(z,k.origin),H),k.beforeOrigin=bt(Wt(z,k.beforeOrigin),H),k.originalBeforeOrigin=Wt(z,k.originalBeforeOrigin),k.transformOrigin=bt(Wt(z,k.transformOrigin),H),f.style.transform="translate(".concat(-O-H[0],"px, ").concat(-S-H[1],"px)")+w,en(),this.updateState(C(C({},k),{posDelta:H,direction:W,beforeDirection:W}),i)}},t.prototype.getRect=function(){return C(C({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},t.prototype.triggerEvent=function(n,r,i){if(i||n.indexOf("Group")>-1)return e.prototype.triggerEvent.call(this,n,r);this._emitter.trigger(n,r)},t.prototype.getRequestChildStyles=function(){return this.getEnabledAbles().reduce(function(n,r){var i,o,a=(o=(i=r.requestChildStyle)===null||i===void 0?void 0:i.call(r))!==null&&o!==void 0?o:[];return $($([],T(n),!1),T(a),!1)},[])},t.prototype.getMoveables=function(){return $([],T(this.moveables),!1)},t.prototype.updateAbles=function(){e.prototype.updateAbles.call(this,$($([],T(this.props.ables),!1),[Ko],!1),"Group")},t.prototype._updateTargets=function(){e.prototype._updateTargets.call(this),this._originalDragTarget=this.props.dragTarget||this.areaElement,this._dragTarget=Qe(this._originalDragTarget,!0)},t.prototype._updateEvents=function(){var n=this.state,r=this.props,i=this._prevDragTarget,o=r.dragTarget||this.areaElement,a=r.targets,s=this.differ.update(a),u=s.added,f=s.changed,p=s.removed,c=u.length||p.length;(c||this._prevOriginalDragTarget!==this._originalDragTarget)&&(He(this,!1),He(this,!0),this.updateState({gestos:{}})),i!==o&&(n.target=null),n.target||(n.target=this.areaElement,this.controlBox.style.display="block"),n.target&&(this.targetGesto||(this.targetGesto=Zo(this,this._dragTarget,"Group")),this.controlGesto||(this.controlGesto=$o(this,"GroupControl")));var l=!Gr(n.container,r.container);l&&(n.container=r.container),(l||c||this.transformOrigin!==(r.defaultGroupOrigin||"50% 50%")||f.length||a.length&&!Lo(this._targetGroups,r.targetGroups||[]))&&(this.updateRect(),this._hasFirstTargets=!0),this._isPropTargetChanged=!!c},t.prototype._updateObserver=function(){},t.defaultProps=C(C({},nn.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),t}(nn),ls=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.moveables=[],n}return kn(t,e),t.prototype.render=function(){var n,r=this,i=this.props,o=i.cspNonce,a=i.cssStyled,s=i.persistData,u=i.targets||[],f=u.length,p=this.isUnmounted||!f,c=(n=s?.children)!==null&&n!==void 0?n:[];return p&&!f&&c.length?u=c.map(function(){return null}):p||(c=[]),Pe.createElement(a,{cspNonce:o,ref:Ae(this,"controlBox"),className:Xt("control-box")},u.map(function(l,h){var d,g,v=(g=(d=i.individualGroupableProps)===null||d===void 0?void 0:d.call(i,l,h))!==null&&g!==void 0?g:{};return Pe.createElement(nn,C({key:"moveable"+h,ref:io(r,"moveables",h)},i,v,{target:l,wrapperMoveable:r,isWrapperMounted:r.isMoveableMounted,persistData:c[h]}))}))},t.prototype.componentDidMount=function(){},t.prototype.componentDidUpdate=function(){},t.prototype.getTargets=function(){return this.props.targets},t.prototype.updateRect=function(n,r,i){i===void 0&&(i=!0),en(!0),this.moveables.forEach(function(o){o.updateRect(n,r,i)}),en()},t.prototype.getRect=function(){return C(C({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},t.prototype.request=function(n,r,i){r===void 0&&(r={});var o=this.moveables.map(function(s){return s.request(n,C(C({},r),{isInstant:!1}),!1)}),a={request:function(s){return o.forEach(function(u){return u.request(s)}),this},requestEnd:function(){return o.forEach(function(s){return s.requestEnd()}),this}};return i||r.isInstant?a.request(r).requestEnd():a},t.prototype.dragStart=function(n,r){r===void 0&&(r=n.target);var i=r,o=de(this.moveables,function(a){var s=a.getTargets()[0],u=a.getControlBoxElement(),f=a.getDragElement();return!(!s||!f)&&(f===i||f.contains(i)||f!==s&&s===i||s.contains(i)||u===i||u.contains(i))});return o&&o.dragStart(n,r),this},t.prototype.hitTest=function(){return 0},t.prototype.isInside=function(){return!1},t.prototype.isDragging=function(){return!1},t.prototype.getDragElement=function(){return null},t.prototype.getMoveables=function(){return $([],T(this.moveables),!1)},t.prototype.updateRenderPoses=function(){},t.prototype.checkUpdate=function(){},t.prototype.triggerEvent=function(){},t.prototype.updateAbles=function(){},t.prototype._updateEvents=function(){},t.prototype._updateObserver=function(){},t}(nn);function ta(e,t){var n=[];return e.forEach(function(r){r&&(rn(r)?t[r]&&n.push.apply(n,$([],T(t[r]),!1)):ee(r)?n.push.apply(n,$([],T(ta(r,t)),!1)):n.push(r))}),n}function ea(e,t){var n=[];return e.forEach(function(r){r&&(rn(r)?t[r]&&n.push.apply(n,$([],T(t[r]),!1)):ee(r)?n.push(ea(r,t)):n.push(r))}),n}function na(e,t){return e.length!==t.length||e.some(function(n,r){var i=t[r];return!(!n&&!i)&&n!=i&&(!ee(n)||!ee(i)||na(n,i))})}var fs=function(e){function t(){var i=e!==null&&e.apply(this,arguments)||this;return i.refTargets=[],i.selectorMap={},i._differ=new bo,i._elementTargets=[],i._tmpRefTargets=[],i._tmpSelectorMap={},i._onChangeTargets=null,i}var n,r;return kn(t,e),t.makeStyled=function(){var i={};this.getTotalAbles().forEach(function(s){var u=s.css;u&&u.forEach(function(f){i[f]=!0})});var o,a=Cn(i).join(`
|
|
161
|
-
`);this.defaultStyled=Do("div",(o=Qr,(Xa+a).replace(/([^}{]*){/gm,function(s,u){return u.replace(/\.([^{,\s\d.]+)/g,"."+o+"$1")+"{"})))},t.getTotalAbles=function(){return $([rs,Ko,us,ns],T(this.defaultAbles),!1)},t.prototype.render=function(){var i,o=this.constructor;o.defaultStyled||o.makeStyled();var a=this.props,s=a.ables,u=a.props,f=function(_,B){var F={};for(var O in _)Object.prototype.hasOwnProperty.call(_,O)&&B.indexOf(O)<0&&(F[O]=_[O]);if(_!=null&&typeof Object.getOwnPropertySymbols=="function"){var S=0;for(O=Object.getOwnPropertySymbols(_);S<O.length;S++)B.indexOf(O[S])<0&&Object.prototype.propertyIsEnumerable.call(_,O[S])&&(F[O[S]]=_[O[S]])}return F}(a,["ables","props"]),p=T(this._updateRefs(!0),2),c=p[0],l=p[1],h=ta(c,l),d=h.length>1,g=$($([],T(o.getTotalAbles()),!1),T(s||[]),!1),v=C(C(C({},f),u||{}),{ables:g,cssStyled:o.defaultStyled,customStyledMap:o.customStyledMap});this._elementTargets=h;var b=null,x=this.moveable,y=f.persistData;if(y?.children&&(d=!0),f.individualGroupable)return Pe.createElement(ls,C({key:"individual-group",ref:Ae(this,"moveable")},v,{target:null,targets:h}));if(d){var E=ea(c,l);if(x&&!x.props.groupable&&!x.props.individualGroupable){var M=x.props.target;M&&h.indexOf(M)>-1&&(b=C({},x.state))}return Pe.createElement(cs,C({key:"group",ref:Ae(this,"moveable")},v,(i=f.groupableProps)!==null&&i!==void 0?i:{},{target:null,targets:h,targetGroups:E,firstRenderState:b}))}var m=h[0];if(x&&(x.props.groupable||x.props.individualGroupable)){var D=de(x.moveables||[],function(_){return _.props.target===m});D&&(b=C({},D.state))}return Pe.createElement(nn,C({key:"single",ref:Ae(this,"moveable")},v,{target:m,firstRenderState:b}))},t.prototype.componentDidMount=function(){this._checkChangeTargets()},t.prototype.componentDidUpdate=function(){this._checkChangeTargets()},t.prototype.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},t.prototype.getTargets=function(){var i,o;return(o=(i=this.moveable)===null||i===void 0?void 0:i.getTargets())!==null&&o!==void 0?o:[]},t.prototype.updateSelectors=function(){this.selectorMap={},this._updateRefs(),this.forceUpdate()},t.prototype.waitToChangeTarget=function(){var i,o=this;return this._onChangeTargets=function(){o._onChangeTargets=null,i()},new Promise(function(a){i=a})},t.prototype.waitToChangeTargets=function(){return this.waitToChangeTarget()},t.prototype.getManager=function(){return this.moveable},t.prototype.getMoveables=function(){return this.moveable.getMoveables()},t.prototype.getDragElement=function(){return this.moveable.getDragElement()},t.prototype._updateRefs=function(i){var o=this.refTargets,a=qo(this.props.target||this.props.targets),s=typeof document<"u",u=na(o,a),f=this.selectorMap,p={};return this.refTargets.forEach(function c(l){rn(l)?f[l]?p[l]=f[l]:s&&(u=!0,p[l]=[].slice.call(document.querySelectorAll(l))):ee(l)&&l.forEach(c)}),this._tmpRefTargets=a,this._tmpSelectorMap=p,[a,p,!i&&u]},t.prototype._checkChangeTargets=function(){var i,o,a;this.refTargets=this._tmpRefTargets,this.selectorMap=this._tmpSelectorMap;var s=this._differ.update(this._elementTargets),u=s.added,f=s.removed;(u.length||f.length)&&((o=(i=this.props).onChangeTargets)===null||o===void 0||o.call(i,{moveable:this.moveable,targets:this._elementTargets}),(a=this._onChangeTargets)===null||a===void 0||a.call(this));var p=T(this._updateRefs(),3),c=p[0],l=p[1],h=p[2];this.refTargets=c,this.selectorMap=l,h&&this.forceUpdate()},t.defaultAbles=[],t.customStyledMap={},t.defaultStyled=null,function(i,o,a,s){var u,f=arguments.length,p=f<3?o:s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,o,a,s);else for(var c=i.length-1;c>=0;c--)(u=i[c])&&(p=(f<3?u(p):f>3?u(o,a,p):u(o,a))||p);f>3&&p&&Object.defineProperty(o,a,p)}([(n=Na,r===void 0&&(r={}),function(i,o){n.forEach(function(a){var s=r[a]||a;s in i||(i[s]=function(){for(var u,f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];var c=(u=this[o])[a].apply(u,f);return c===this[o]?this:c})})})],t.prototype,"moveable",void 0),t}(Pe.PureComponent);const ps=(to=[xe,Va],Er=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return kn(t,e),t}(fs),Er.defaultAbles=to,Er);var to,Er;exports.default=ps;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.10
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),n=require("react"),w=require("@mui/material"),o=require("./Db8DWa6iDZSqedMi.cjs"),F=["Ok","Cancel"],V=n.memo(C=>{const{value:a=null,context:t,onOption:c,onValidateOption:k,onDone:g,onUpdate:m,options:x=F,defaultOption:T=x?.[0],cancelOption:f="Cancel",sx:R,...h}=C,N=n.useMemo(()=>t?.getNames().findValidName("Range1"),[]),d=n.useMemo(()=>{if(!a)return!0},[]),[l,v]=n.useState({displayText:a?.getName()??N,errorText:null}),[s,S]=n.useState({displayValue:a?.getRanges()??t?.selection()??null,errorText:null}),[y,O]=n.useState(!1),b=n.useCallback(async e=>!l.errorText&&!s.errorText,[t]),j=o.T((e,i,p)=>{if(!i){let r=null;d?r=t?.getNames().addReference(l?.displayText,s?.displayValue,!1):(a.getType()==="reference"&&a.doBatch(()=>{a.setName(l?.displayText),a.setReference(s?.displayValue)},`Edit Named '${l?.displayText}'`),r=a),r&&(r.select(),m(r,d))}c?.(e,i,p),g?.()},[t,l,s,g,c,T,f,m]),D=o.T(e=>{let i=null;try{t?.getNames().validateName(e)}catch(p){i=p.message}v({displayText:e,errorText:i})},[]),I=o.T(e=>{a&&a.getName().toLowerCase()===e.toLowerCase()||t?.getNames().validateName(e)},[t,a]),q=n.useCallback(e=>{S({displayValue:e??null,errorText:null})},[]);return u.jsx(o.D8,{title:(d?"Define":"Edit")+" Range",options:x,onOption:j,onValidateOption:b,defaultOption:T,cancelOption:f,autoFocusSel:".autoFocus",sx:{width:"460px",...R},...h,children:u.jsxs(w.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),range:"flex",flexDirection:"column"},children:[u.jsx(o.NamedInput,{formName:"name",defaultInput:N,value:l.displayText,onChangeInput:D,onValidate:I,onFocus:e=>{y||e.target?.select(),O(!0)}}),u.jsx(o.RangeInput,{formName:"range",value:s.displayValue,onChangeInput:q,resolvedAddress:t.getNames().getRanges.bind(t.getNames()),onFocus:e=>{y||e.target?.select(),O(!0)}})]})})});exports.NamedReferenceDialog=V,exports.default=V;
|