1234567891011 |
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["cropperjs"]=e():t["cropperjs"]=e()})("undefined"!==typeof self?self:this,(function(){return function(){var t={7679:function(t,e){var n,i,r;(function(o,a){i=[],n=a,r="function"===typeof n?n.apply(e,i):n,void 0===r||(t.exports=r)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var n,i,r,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(f.stack)||a.exec(f.stack),c=s&&s[1]||!1,h=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");c===u&&(n=document.documentElement.outerHTML,i=new RegExp("(?:[^\\n]+?\\n){0,"+(h-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),r=n.replace(i,"$1").trim());for(var p=0;p<l.length;p++){if("interactive"===l[p].readyState)return l[p];if(l[p].src===c)return l[p];if(c===u&&l[p].innerHTML&&l[p].innerHTML.trim()===r)return l[p]}return null}}return t}))},3099:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},6077:function(t,e,n){var i=n(111);t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},1530:function(t,e,n){"use strict";var i=n(8710).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},9670:function(t,e,n){var i=n(111);t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},1318:function(t,e,n){var i=n(5656),r=n(7466),o=n(1400),a=function(t){return function(e,n,a){var s,c=i(e),h=r(c.length),u=o(a,h);if(t&&n!=n){while(h>u)if(s=c[u++],s!=s)return!0}else for(;h>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:function(t,e,n){var i=n(9974),r=n(8361),o=n(7908),a=n(7466),s=n(5417),c=[].push,h=function(t){var e=1==t,n=2==t,h=3==t,u=4==t,l=6==t,p=7==t,f=5==t||l;return function(d,g,m,v){for(var y,b,w=o(d),x=r(w),M=i(g,m,3),O=a(x.length),C=0,D=v||s,S=e?D(d,O):n||p?D(d,0):void 0;O>C;C++)if((f||C in x)&&(y=x[C],b=M(y,C,w),t))if(e)S[C]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return C;case 2:c.call(S,y)}else switch(t){case 4:return!1;case 7:c.call(S,y)}return l?-1:h||u?u:S}};t.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterReject:h(7)}},7475:function(t,e,n){var i=n(111),r=n(3157),o=n(5112),a=o("species");t.exports=function(t){var e;return r(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!r(e.prototype)?i(e)&&(e=e[a],null===e&&(e=void 0)):e=void 0),void 0===e?Array:e}},5417:function(t,e,n){var i=n(7475);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},4326:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9920:function(t,e,n){var i=n(6656),r=n(3887),o=n(1236),a=n(3070);t.exports=function(t,e){for(var n=r(e),s=a.f,c=o.f,h=0;h<n.length;h++){var u=n[h];i(t,u)||s(t,u,c(e,u))}}},8880:function(t,e,n){var i=n(9781),r=n(3070),o=n(9114);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7235:function(t,e,n){var i=n(857),r=n(6656),o=n(6061),a=n(3070).f;t.exports=function(t){var e=i.Symbol||(i.Symbol={});r(e,t)||a(e,t,{value:o.f(t)})}},9781:function(t,e,n){var i=n(7293);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(t,e,n){var i=n(7854),r=n(111),o=i.document,a=r(o)&&r(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},8113:function(t,e,n){var i=n(5005);t.exports=i("navigator","userAgent")||""},7392:function(t,e,n){var i,r,o=n(7854),a=n(8113),s=o.process,c=o.Deno,h=s&&s.versions||c&&c.version,u=h&&h.v8;u?(i=u.split("."),r=i[0]<4?1:i[0]+i[1]):a&&(i=a.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/),i&&(r=i[1]))),t.exports=r&&+r},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var i=n(7854),r=n(1236).f,o=n(8880),a=n(1320),s=n(3505),c=n(9920),h=n(4705);t.exports=function(t,e){var n,u,l,p,f,d,g=t.target,m=t.global,v=t.stat;if(u=m?i:v?i[g]||s(g,{}):(i[g]||{}).prototype,u)for(l in e){if(f=e[l],t.noTargetGet?(d=r(u,l),p=d&&d.value):p=u[l],n=h(m?l:g+(v?".":"#")+l,t.forced),!n&&void 0!==p){if(typeof f===typeof p)continue;c(f,p)}(t.sham||p&&p.sham)&&o(f,"sham",!0),a(u,l,f,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},7007:function(t,e,n){"use strict";n(4916);var i=n(1320),r=n(2261),o=n(7293),a=n(5112),s=n(8880),c=a("species"),h=RegExp.prototype;t.exports=function(t,e,n,u){var l=a(t),p=!o((function(){var e={};return e[l]=function(){return 7},7!=""[t](e)})),f=p&&!o((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[c]=function(){return n},n.flags="",n[l]=/./[l]),n.exec=function(){return e=!0,null},n[l](""),!e}));if(!p||!f||n){var d=/./[l],g=e(l,""[t],(function(t,e,n,i,o){var a=e.exec;return a===r||a===h.exec?p&&!o?{done:!0,value:d.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}));i(String.prototype,t,g[0]),i(h,l,g[1])}u&&s(h[l],"sham",!0)}},9974:function(t,e,n){var i=n(3099);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},5005:function(t,e,n){var i=n(7854),r=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?r(i[t]):i[t]&&i[t][e]}},647:function(t,e,n){var i=n(7908),r=Math.floor,o="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,c,h,u){var l=n+t.length,p=c.length,f=s;return void 0!==h&&(h=i(h),f=a),o.call(u,f,(function(i,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":a=h[o.slice(1,-1)];break;default:var s=+o;if(0===s)return i;if(s>p){var u=r(s/10);return 0===u?i:u<=p?void 0===c[u-1]?o.charAt(1):c[u-1]+o.charAt(1):i}a=c[s-1]}return void 0===a?"":a}))}},7854:function(t,e,n){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(t,e,n){var i=n(7908),r={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return r.call(i(t),e)}},3501:function(t){t.exports={}},490:function(t,e,n){var i=n(5005);t.exports=i("document","documentElement")},4664:function(t,e,n){var i=n(9781),r=n(7293),o=n(317);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,n){var i=n(7293),r=n(4326),o="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object},9587:function(t,e,n){var i=n(111),r=n(7674);t.exports=function(t,e,n){var o,a;return r&&"function"==typeof(o=e.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&r(t,a),t}},2788:function(t,e,n){var i=n(5465),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return r.call(t)}),t.exports=i.inspectSource},9909:function(t,e,n){var i,r,o,a=n(8536),s=n(7854),c=n(111),h=n(8880),u=n(6656),l=n(5465),p=n(6200),f=n(3501),d="Object already initialized",g=s.WeakMap,m=function(t){return o(t)?r(t):i(t,{})},v=function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(a||l.state){var y=l.state||(l.state=new g),b=y.get,w=y.has,x=y.set;i=function(t,e){if(w.call(y,t))throw new TypeError(d);return e.facade=t,x.call(y,t,e),e},r=function(t){return b.call(y,t)||{}},o=function(t){return w.call(y,t)}}else{var M=p("state");f[M]=!0,i=function(t,e){if(u(t,M))throw new TypeError(d);return e.facade=t,h(t,M,e),e},r=function(t){return u(t,M)?t[M]:{}},o=function(t){return u(t,M)}}t.exports={set:i,get:r,has:o,enforce:m,getterFor:v}},3157:function(t,e,n){var i=n(4326);t.exports=Array.isArray||function(t){return"Array"==i(t)}},4705:function(t,e,n){var i=n(7293),r=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==h||n!=c&&("function"==typeof e?i(e):!!e)},a=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",h=o.POLYFILL="P";t.exports=o},111:function(t){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},1913:function(t){t.exports=!1},2190:function(t,e,n){var i=n(5005),r=n(3307);t.exports=r?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return"function"==typeof e&&Object(t)instanceof e}},133:function(t,e,n){var i=n(7392),r=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},8536:function(t,e,n){var i=n(7854),r=n(2788),o=i.WeakMap;t.exports="function"===typeof o&&/native code/.test(r(o))},30:function(t,e,n){var i,r=n(9670),o=n(6048),a=n(748),s=n(3501),c=n(490),h=n(317),u=n(6200),l=">",p="<",f="prototype",d="script",g=u("IE_PROTO"),m=function(){},v=function(t){return p+d+l+t+p+"/"+d+l},y=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){var t,e=h("iframe"),n="java"+d+":";return e.style.display="none",c.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(v("document.F=Object")),t.close(),t.F},w=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}w="undefined"!=typeof document?document.domain&&i?y(i):b():y(i);var t=a.length;while(t--)delete w[f][a[t]];return w()};s[g]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(m[f]=r(t),n=new m,m[f]=null,n[g]=t):n=w(),void 0===e?n:o(n,e)}},6048:function(t,e,n){var i=n(9781),r=n(3070),o=n(9670),a=n(1956);t.exports=i?Object.defineProperties:function(t,e){o(t);var n,i=a(e),s=i.length,c=0;while(s>c)r.f(t,n=i[c++],e[n]);return t}},3070:function(t,e,n){var i=n(9781),r=n(4664),o=n(9670),a=n(4948),s=Object.defineProperty;e.f=i?s:function(t,e,n){if(o(t),e=a(e),o(n),r)try{return s(t,e,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var i=n(9781),r=n(5296),o=n(9114),a=n(5656),s=n(4948),c=n(6656),h=n(4664),u=Object.getOwnPropertyDescriptor;e.f=i?u:function(t,e){if(t=a(t),e=s(e),h)try{return u(t,e)}catch(n){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},1156:function(t,e,n){var i=n(5656),r=n(8006).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):r(i(t))}},8006:function(t,e,n){var i=n(6324),r=n(748),o=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},6324:function(t,e,n){var i=n(6656),r=n(5656),o=n(1318).indexOf,a=n(3501);t.exports=function(t,e){var n,s=r(t),c=0,h=[];for(n in s)!i(a,n)&&i(s,n)&&h.push(n);while(e.length>c)i(s,n=e[c++])&&(~o(h,n)||h.push(n));return h}},1956:function(t,e,n){var i=n(6324),r=n(748);t.exports=Object.keys||function(t){return i(t,r)}},5296:function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},7674:function(t,e,n){var i=n(9670),r=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(o){}return function(n,o){return i(n),r(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},2140:function(t,e,n){var i=n(111);t.exports=function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},3887:function(t,e,n){var i=n(5005),r=n(8006),o=n(5181),a=n(9670);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},857:function(t,e,n){var i=n(7854);t.exports=i},1320:function(t,e,n){var i=n(7854),r=n(8880),o=n(6656),a=n(3505),s=n(2788),c=n(9909),h=c.get,u=c.enforce,l=String(String).split("String");(t.exports=function(t,e,n,s){var c,h=!!s&&!!s.unsafe,p=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||r(n,"name",e),c=u(n),c.source||(c.source=l.join("string"==typeof e?e:""))),t!==i?(h?!f&&t[e]&&(p=!0):delete t[e],p?t[e]=n:r(t,e,n)):p?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&h(this).source||s(this)}))},7651:function(t,e,n){var i=n(4326),r=n(2261);t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},2261:function(t,e,n){"use strict";var i=n(1340),r=n(7066),o=n(2999),a=n(2309),s=n(30),c=n(9909).get,h=n(9441),u=n(8173),l=RegExp.prototype.exec,p=a("native-string-replace",String.prototype.replace),f=l,d=function(){var t=/a/,e=/b*/g;return l.call(t,"a"),l.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),g=o.UNSUPPORTED_Y||o.BROKEN_CARET,m=void 0!==/()??/.exec("")[1],v=d||m||g||h||u;v&&(f=function(t){var e,n,o,a,h,u,v,y=this,b=c(y),w=i(t),x=b.raw;if(x)return x.lastIndex=y.lastIndex,e=f.call(x,w),y.lastIndex=x.lastIndex,e;var M=b.groups,O=g&&y.sticky,C=r.call(y),D=y.source,S=0,E=w;if(O&&(C=C.replace("y",""),-1===C.indexOf("g")&&(C+="g"),E=w.slice(y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&"\n"!==w.charAt(y.lastIndex-1))&&(D="(?: "+D+")",E=" "+E,S++),n=new RegExp("^(?:"+D+")",C)),m&&(n=new RegExp("^"+D+"$(?!\\s)",C)),d&&(o=y.lastIndex),a=l.call(O?n:y,E),O?a?(a.input=a.input.slice(S),a[0]=a[0].slice(S),a.index=y.lastIndex,y.lastIndex+=a[0].length):y.lastIndex=0:d&&a&&(y.lastIndex=y.global?a.index+a[0].length:o),m&&a&&a.length>1&&p.call(a[0],n,(function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(a[h]=void 0)})),a&&M)for(a.groups=u=s(null),h=0;h<M.length;h++)v=M[h],u[v[0]]=a[v[1]];return a}),t.exports=f},7066:function(t,e,n){"use strict";var i=n(9670);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:function(t,e,n){var i=n(7293),r=n(7854),o=r.RegExp;e.UNSUPPORTED_Y=i((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=i((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},9441:function(t,e,n){var i=n(7293),r=n(7854),o=r.RegExp;t.exports=i((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},8173:function(t,e,n){var i=n(7293),r=n(7854),o=r.RegExp;t.exports=i((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:function(t){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},3505:function(t,e,n){var i=n(7854);t.exports=function(t,e){try{Object.defineProperty(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},8003:function(t,e,n){var i=n(3070).f,r=n(6656),o=n(5112),a=o("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,a)&&i(t,a,{configurable:!0,value:e})}},6200:function(t,e,n){var i=n(2309),r=n(9711),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},5465:function(t,e,n){var i=n(7854),r=n(3505),o="__core-js_shared__",a=i[o]||r(o,{});t.exports=a},2309:function(t,e,n){var i=n(1913),r=n(5465);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.1",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},8710:function(t,e,n){var i=n(9958),r=n(1340),o=n(4488),a=function(t){return function(e,n){var a,s,c=r(o(e)),h=i(n),u=c.length;return h<0||h>=u?t?"":void 0:(a=c.charCodeAt(h),a<55296||a>56319||h+1===u||(s=c.charCodeAt(h+1))<56320||s>57343?t?c.charAt(h):a:t?c.slice(h,h+2):s-56320+(a-55296<<10)+65536)}};t.exports={codeAt:a(!1),charAt:a(!0)}},3111:function(t,e,n){var i=n(4488),r=n(1340),o=n(1361),a="["+o+"]",s=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),h=function(t){return function(e){var n=r(i(e));return 1&t&&(n=n.replace(s,"")),2&t&&(n=n.replace(c,"")),n}};t.exports={start:h(1),end:h(2),trim:h(3)}},1400:function(t,e,n){var i=n(9958),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},5656:function(t,e,n){var i=n(8361),r=n(4488);t.exports=function(t){return i(r(t))}},9958:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},7466:function(t,e,n){var i=n(9958),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},7908:function(t,e,n){var i=n(4488);t.exports=function(t){return Object(i(t))}},7593:function(t,e,n){var i=n(111),r=n(2190),o=n(2140),a=n(5112),s=a("toPrimitive");t.exports=function(t,e){if(!i(t)||r(t))return t;var n,a=t[s];if(void 0!==a){if(void 0===e&&(e="default"),n=a.call(t,e),!i(n)||r(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),o(t,e)}},4948:function(t,e,n){var i=n(7593),r=n(2190);t.exports=function(t){var e=i(t,"string");return r(e)?e:String(e)}},1340:function(t,e,n){var i=n(2190);t.exports=function(t){if(i(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},9711:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},3307:function(t,e,n){var i=n(133);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:function(t,e,n){var i=n(5112);e.f=i},5112:function(t,e,n){var i=n(7854),r=n(2309),o=n(6656),a=n(9711),s=n(133),c=n(3307),h=r("wks"),u=i.Symbol,l=c?u:u&&u.withoutSetter||a;t.exports=function(t){return o(h,t)&&(s||"string"==typeof h[t])||(s&&o(u,t)?h[t]=u[t]:h[t]=l("Symbol."+t)),h[t]}},1361:function(t){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9653:function(t,e,n){"use strict";var i=n(9781),r=n(7854),o=n(4705),a=n(1320),s=n(6656),c=n(4326),h=n(9587),u=n(2190),l=n(7593),p=n(7293),f=n(30),d=n(8006).f,g=n(1236).f,m=n(3070).f,v=n(3111).trim,y="Number",b=r[y],w=b.prototype,x=c(f(w))==y,M=function(t){if(u(t))throw TypeError("Cannot convert a Symbol value to a number");var e,n,i,r,o,a,s,c,h=l(t,"number");if("string"==typeof h&&h.length>2)if(h=v(h),e=h.charCodeAt(0),43===e||45===e){if(n=h.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(h.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+h}for(o=h.slice(2),a=o.length,s=0;s<a;s++)if(c=o.charCodeAt(s),c<48||c>r)return NaN;return parseInt(o,i)}return+h};if(o(y,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var O,C=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof C&&(x?p((function(){w.valueOf.call(n)})):c(n)!=y)?h(new b(M(e)),n,C):M(e)},D=i?d(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),S=0;D.length>S;S++)s(b,O=D[S])&&!s(C,O)&&m(C,O,g(b,O));C.prototype=w,w.constructor=C,a(r,y,C)}},7941:function(t,e,n){var i=n(2109),r=n(7908),o=n(1956),a=n(7293),s=a((function(){o(1)}));i({target:"Object",stat:!0,forced:s},{keys:function(t){return o(r(t))}})},4916:function(t,e,n){"use strict";var i=n(2109),r=n(2261);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},5306:function(t,e,n){"use strict";var i=n(7007),r=n(7293),o=n(9670),a=n(9958),s=n(7466),c=n(1340),h=n(4488),u=n(1530),l=n(647),p=n(7651),f=n(5112),d=f("replace"),g=Math.max,m=Math.min,v=function(t){return void 0===t?t:String(t)},y=function(){return"$0"==="a".replace(/./,"$0")}(),b=function(){return!!/./[d]&&""===/./[d]("a","$0")}(),w=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));i("replace",(function(t,e,n){var i=b?"$":"$0";return[function(t,n){var i=h(this),r=void 0==t?void 0:t[d];return void 0!==r?r.call(t,i,n):e.call(c(i),t,n)},function(t,r){var h=o(this),f=c(t);if("string"===typeof r&&-1===r.indexOf(i)&&-1===r.indexOf("$<")){var d=n(e,h,f,r);if(d.done)return d.value}var y="function"===typeof r;y||(r=c(r));var b=h.global;if(b){var w=h.unicode;h.lastIndex=0}var x=[];while(1){var M=p(h,f);if(null===M)break;if(x.push(M),!b)break;var O=c(M[0]);""===O&&(h.lastIndex=u(f,s(h.lastIndex),w))}for(var C="",D=0,S=0;S<x.length;S++){M=x[S];for(var E=c(M[0]),T=g(m(a(M.index),f.length),0),B=[],j=1;j<M.length;j++)B.push(v(M[j]));var N=M.groups;if(y){var k=[E].concat(B,T,f);void 0!==N&&k.push(N);var A=c(r.apply(void 0,k))}else A=l(E,f,T,B,N,r);T>=D&&(C+=f.slice(D,T)+A,D=T+E.length)}return C+f.slice(D)}]}),!w||!y||b)},2526:function(t,e,n){"use strict";var i=n(2109),r=n(7854),o=n(5005),a=n(1913),s=n(9781),c=n(133),h=n(7293),u=n(6656),l=n(3157),p=n(111),f=n(2190),d=n(9670),g=n(7908),m=n(5656),v=n(4948),y=n(1340),b=n(9114),w=n(30),x=n(1956),M=n(8006),O=n(1156),C=n(5181),D=n(1236),S=n(3070),E=n(5296),T=n(8880),B=n(1320),j=n(2309),N=n(6200),k=n(3501),A=n(9711),I=n(5112),R=n(6061),W=n(7235),P=n(8003),L=n(9909),H=n(2092).forEach,z=N("hidden"),Y="Symbol",X="prototype",_=I("toPrimitive"),$=L.set,U=L.getterFor(Y),F=Object[X],q=r.Symbol,V=o("JSON","stringify"),G=D.f,K=S.f,Q=O.f,Z=E.f,J=j("symbols"),tt=j("op-symbols"),et=j("string-to-symbol-registry"),nt=j("symbol-to-string-registry"),it=j("wks"),rt=r.QObject,ot=!rt||!rt[X]||!rt[X].findChild,at=s&&h((function(){return 7!=w(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=G(F,e);i&&delete F[e],K(t,e,n),i&&t!==F&&K(F,e,i)}:K,st=function(t,e){var n=J[t]=w(q[X]);return $(n,{type:Y,tag:t,description:e}),s||(n.description=e),n},ct=function(t,e,n){t===F&&ct(tt,e,n),d(t);var i=v(e);return d(n),u(J,i)?(n.enumerable?(u(t,z)&&t[z][i]&&(t[z][i]=!1),n=w(n,{enumerable:b(0,!1)})):(u(t,z)||K(t,z,b(1,{})),t[z][i]=!0),at(t,i,n)):K(t,i,n)},ht=function(t,e){d(t);var n=m(e),i=x(n).concat(dt(n));return H(i,(function(e){s&&!lt.call(n,e)||ct(t,e,n[e])})),t},ut=function(t,e){return void 0===e?w(t):ht(w(t),e)},lt=function(t){var e=v(t),n=Z.call(this,e);return!(this===F&&u(J,e)&&!u(tt,e))&&(!(n||!u(this,e)||!u(J,e)||u(this,z)&&this[z][e])||n)},pt=function(t,e){var n=m(t),i=v(e);if(n!==F||!u(J,i)||u(tt,i)){var r=G(n,i);return!r||!u(J,i)||u(n,z)&&n[z][i]||(r.enumerable=!0),r}},ft=function(t){var e=Q(m(t)),n=[];return H(e,(function(t){u(J,t)||u(k,t)||n.push(t)})),n},dt=function(t){var e=t===F,n=Q(e?tt:m(t)),i=[];return H(n,(function(t){!u(J,t)||e&&!u(F,t)||i.push(J[t])})),i};if(c||(q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,e=A(t),n=function(t){this===F&&n.call(tt,t),u(this,z)&&u(this[z],e)&&(this[z][e]=!1),at(this,e,b(1,t))};return s&&ot&&at(F,e,{configurable:!0,set:n}),st(e,t)},B(q[X],"toString",(function(){return U(this).tag})),B(q,"withoutSetter",(function(t){return st(A(t),t)})),E.f=lt,S.f=ct,D.f=pt,M.f=O.f=ft,C.f=dt,R.f=function(t){return st(I(t),t)},s&&(K(q[X],"description",{configurable:!0,get:function(){return U(this).description}}),a||B(F,"propertyIsEnumerable",lt,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:q}),H(x(it),(function(t){W(t)})),i({target:Y,stat:!0,forced:!c},{for:function(t){var e=y(t);if(u(et,e))return et[e];var n=q(e);return et[e]=n,nt[n]=e,n},keyFor:function(t){if(!f(t))throw TypeError(t+" is not a symbol");if(u(nt,t))return nt[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!s},{create:ut,defineProperty:ct,defineProperties:ht,getOwnPropertyDescriptor:pt}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ft,getOwnPropertySymbols:dt}),i({target:"Object",stat:!0,forced:h((function(){C.f(1)}))},{getOwnPropertySymbols:function(t){return C.f(g(t))}}),V){var gt=!c||h((function(){var t=q();return"[null]"!=V([t])||"{}"!=V({a:t})||"{}"!=V(Object(t))}));i({target:"JSON",stat:!0,forced:gt},{stringify:function(t,e,n){var i,r=[t],o=1;while(arguments.length>o)r.push(arguments[o++]);if(i=e,(p(e)||void 0!==t)&&!f(t))return l(e)||(e=function(t,e){if("function"==typeof i&&(e=i.call(this,t,e)),!f(e))return e}),r[1]=e,V.apply(null,r)}})}q[X][_]||T(q[X],_,q[X].valueOf),P(q,Y),k[z]=!0},3129:function(t){
- /*!
- * Cropper.js v1.5.12
- * https://fengyuanchen.github.io/cropperjs
- *
- * Copyright 2015-present Chen Fengyuan
- * Released under the MIT license
- *
- * Date: 2021-06-12T08:00:17.411Z
- */
- (function(e,n){t.exports=n()})(0,(function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){a(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return c(t)||h(t)||u(t)||p()}function c(t){if(Array.isArray(t))return l(t)}function h(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t,e){if(t){if("string"===typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f="undefined"!==typeof window&&"undefined"!==typeof window.document,d=f?window:{},g=!(!f||!d.document.documentElement)&&"ontouchstart"in d.document.documentElement,m=!!f&&"PointerEvent"in d,v="cropper",y="all",b="crop",w="move",x="zoom",M="e",O="w",C="s",D="n",S="ne",E="nw",T="se",B="sw",j="".concat(v,"-crop"),N="".concat(v,"-disabled"),k="".concat(v,"-hidden"),A="".concat(v,"-hide"),I="".concat(v,"-invisible"),R="".concat(v,"-modal"),W="".concat(v,"-move"),P="".concat(v,"Action"),L="".concat(v,"Preview"),H="crop",z="move",Y="none",X="crop",_="cropend",$="cropmove",U="cropstart",F="dblclick",q=g?"touchstart":"mousedown",V=g?"touchmove":"mousemove",G=g?"touchend touchcancel":"mouseup",K=m?"pointerdown":q,Q=m?"pointermove":V,Z=m?"pointerup pointercancel":G,J="ready",tt="resize",et="wheel",nt="zoom",it="image/jpeg",rt=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ot=/^data:/,at=/^data:image\/jpeg;base64,/,st=/^img|canvas$/i,ct=200,ht=100,ut={viewMode:0,dragMode:H,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:ct,minContainerHeight:ht,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},lt='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',pt=Number.isNaN||d.isNaN;function ft(t){return"number"===typeof t&&!pt(t)}var dt=function(t){return t>0&&t<1/0};function gt(t){return"undefined"===typeof t}function mt(t){return"object"===n(t)&&null!==t}var vt=Object.prototype.hasOwnProperty;function yt(t){if(!mt(t))return!1;try{var e=t.constructor,n=e.prototype;return e&&n&&vt.call(n,"isPrototypeOf")}catch(i){return!1}}function bt(t){return"function"===typeof t}var wt=Array.prototype.slice;function xt(t){return Array.from?Array.from(t):wt.call(t)}function Mt(t,e){return t&&bt(e)&&(Array.isArray(t)||ft(t.length)?xt(t).forEach((function(n,i){e.call(t,n,i,t)})):mt(t)&&Object.keys(t).forEach((function(n){e.call(t,t[n],n,t)}))),t}var Ot=Object.assign||function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return mt(t)&&n.length>0&&n.forEach((function(e){mt(e)&&Object.keys(e).forEach((function(n){t[n]=e[n]}))})),t},Ct=/\.\d*(?:0|9){12}\d*$/;function Dt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Ct.test(t)?Math.round(t*e)/e:t}var St=/^width|height|left|top|marginLeft|marginTop$/;function Et(t,e){var n=t.style;Mt(e,(function(t,e){St.test(e)&&ft(t)&&(t="".concat(t,"px")),n[e]=t}))}function Tt(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function Bt(t,e){if(e)if(ft(t.length))Mt(t,(function(t){Bt(t,e)}));else if(t.classList)t.classList.add(e);else{var n=t.className.trim();n?n.indexOf(e)<0&&(t.className="".concat(n," ").concat(e)):t.className=e}}function jt(t,e){e&&(ft(t.length)?Mt(t,(function(t){jt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Nt(t,e,n){e&&(ft(t.length)?Mt(t,(function(t){Nt(t,e,n)})):n?Bt(t,e):jt(t,e))}var kt=/([a-z\d])([A-Z])/g;function At(t){return t.replace(kt,"$1-$2").toLowerCase()}function It(t,e){return mt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(At(e)))}function Rt(t,e,n){mt(n)?t[e]=n:t.dataset?t.dataset[e]=n:t.setAttribute("data-".concat(At(e)),n)}function Wt(t,e){if(mt(t[e]))try{delete t[e]}catch(n){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(n){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(At(e)))}var Pt=/\s\s*/,Lt=function(){var t=!1;if(f){var e=!1,n=function(){},i=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});d.addEventListener("test",n,i),d.removeEventListener("test",n,i)}return t}();function Ht(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;e.trim().split(Pt).forEach((function(e){if(!Lt){var o=t.listeners;o&&o[e]&&o[e][n]&&(r=o[e][n],delete o[e][n],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,r,i)}))}function zt(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;e.trim().split(Pt).forEach((function(e){if(i.once&&!Lt){var o=t.listeners,a=void 0===o?{}:o;r=function(){delete a[e][n],t.removeEventListener(e,r,i);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];n.apply(t,s)},a[e]||(a[e]={}),a[e][n]&&t.removeEventListener(e,a[e][n],i),a[e][n]=r,t.listeners=a}t.addEventListener(e,r,i)}))}function Yt(t,e,n){var i;return bt(Event)&&bt(CustomEvent)?i=new CustomEvent(e,{detail:n,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,!0,!0,n)),t.dispatchEvent(i)}function Xt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var _t=d.location,$t=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Ut(t){var e=t.match($t);return null!==e&&(e[1]!==_t.protocol||e[2]!==_t.hostname||e[3]!==_t.port)}function Ft(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function qt(t){var e=t.rotate,n=t.scaleX,i=t.scaleY,r=t.translateX,o=t.translateY,a=[];ft(r)&&0!==r&&a.push("translateX(".concat(r,"px)")),ft(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),ft(e)&&0!==e&&a.push("rotate(".concat(e,"deg)")),ft(n)&&1!==n&&a.push("scaleX(".concat(n,")")),ft(i)&&1!==i&&a.push("scaleY(".concat(i,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Vt(t){var n=e({},t),i=0;return Mt(t,(function(t,e){delete n[e],Mt(n,(function(e){var n=Math.abs(t.startX-e.startX),r=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),a=Math.abs(t.endY-e.endY),s=Math.sqrt(n*n+r*r),c=Math.sqrt(o*o+a*a),h=(c-s)/s;Math.abs(h)>Math.abs(i)&&(i=h)}))})),i}function Gt(t,n){var i=t.pageX,r=t.pageY,o={endX:i,endY:r};return n?o:e({startX:i,startY:r},o)}function Kt(t){var e=0,n=0,i=0;return Mt(t,(function(t){var r=t.startX,o=t.startY;e+=r,n+=o,i+=1})),e/=i,n/=i,{pageX:e,pageY:n}}function Qt(t){var e=t.aspectRatio,n=t.height,i=t.width,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=dt(i),a=dt(n);if(o&&a){var s=n*e;"contain"===r&&s>i||"cover"===r&&s<i?n=i/e:i=n*e}else o?n=i/e:a&&(i=n*e);return{width:i,height:n}}function Zt(t){var e=t.width,n=t.height,i=t.degree;if(i=Math.abs(i)%180,90===i)return{width:n,height:e};var r=i%90*Math.PI/180,o=Math.sin(r),a=Math.cos(r),s=e*a+n*o,c=e*o+n*a;return i>90?{width:c,height:s}:{width:s,height:c}}function Jt(t,e,n,i){var r=e.aspectRatio,o=e.naturalWidth,a=e.naturalHeight,c=e.rotate,h=void 0===c?0:c,u=e.scaleX,l=void 0===u?1:u,p=e.scaleY,f=void 0===p?1:p,d=n.aspectRatio,g=n.naturalWidth,m=n.naturalHeight,v=i.fillColor,y=void 0===v?"transparent":v,b=i.imageSmoothingEnabled,w=void 0===b||b,x=i.imageSmoothingQuality,M=void 0===x?"low":x,O=i.maxWidth,C=void 0===O?1/0:O,D=i.maxHeight,S=void 0===D?1/0:D,E=i.minWidth,T=void 0===E?0:E,B=i.minHeight,j=void 0===B?0:B,N=document.createElement("canvas"),k=N.getContext("2d"),A=Qt({aspectRatio:d,width:C,height:S}),I=Qt({aspectRatio:d,width:T,height:j},"cover"),R=Math.min(A.width,Math.max(I.width,g)),W=Math.min(A.height,Math.max(I.height,m)),P=Qt({aspectRatio:r,width:C,height:S}),L=Qt({aspectRatio:r,width:T,height:j},"cover"),H=Math.min(P.width,Math.max(L.width,o)),z=Math.min(P.height,Math.max(L.height,a)),Y=[-H/2,-z/2,H,z];return N.width=Dt(R),N.height=Dt(W),k.fillStyle=y,k.fillRect(0,0,R,W),k.save(),k.translate(R/2,W/2),k.rotate(h*Math.PI/180),k.scale(l,f),k.imageSmoothingEnabled=w,k.imageSmoothingQuality=M,k.drawImage.apply(k,[t].concat(s(Y.map((function(t){return Math.floor(Dt(t))}))))),k.restore(),N}var te=String.fromCharCode;function ee(t,e,n){var i="";n+=e;for(var r=e;r<n;r+=1)i+=te(t.getUint8(r));return i}var ne=/^data:.*,/;function ie(t){var e=t.replace(ne,""),n=atob(e),i=new ArrayBuffer(n.length),r=new Uint8Array(i);return Mt(r,(function(t,e){r[e]=n.charCodeAt(e)})),i}function re(t,e){var n=[],i=8192,r=new Uint8Array(t);while(r.length>0)n.push(te.apply(null,xt(r.subarray(0,i)))),r=r.subarray(i);return"data:".concat(e,";base64,").concat(btoa(n.join("")))}function oe(t){var e,n=new DataView(t);try{var i,r,o;if(255===n.getUint8(0)&&216===n.getUint8(1)){var a=n.byteLength,s=2;while(s+1<a){if(255===n.getUint8(s)&&225===n.getUint8(s+1)){r=s;break}s+=1}}if(r){var c=r+4,h=r+10;if("Exif"===ee(n,c,4)){var u=n.getUint16(h);if(i=18761===u,(i||19789===u)&&42===n.getUint16(h+2,i)){var l=n.getUint32(h+4,i);l>=8&&(o=h+l)}}}if(o){var p,f,d=n.getUint16(o,i);for(f=0;f<d;f+=1)if(p=o+12*f+2,274===n.getUint16(p,i)){p+=8,e=n.getUint16(p,i),n.setUint16(p,1,i);break}}}catch(g){e=1}return e}function ae(t){var e=0,n=1,i=1;switch(t){case 2:n=-1;break;case 3:e=-180;break;case 4:i=-1;break;case 5:e=90,i=-1;break;case 6:e=90;break;case 7:e=90,n=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:n,scaleY:i}}var se={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,n=this.container,i=this.cropper,r=Number(e.minContainerWidth),o=Number(e.minContainerHeight);Bt(i,k),jt(t,k);var a={width:Math.max(n.offsetWidth,r>=0?r:ct),height:Math.max(n.offsetHeight,o>=0?o:ht)};this.containerData=a,Et(i,{width:a.width,height:a.height}),Bt(t,k),jt(i,k)},initCanvas:function(){var t=this.containerData,e=this.imageData,n=this.options.viewMode,i=Math.abs(e.rotate)%180===90,r=i?e.naturalHeight:e.naturalWidth,o=i?e.naturalWidth:e.naturalHeight,a=r/o,s=t.width,c=t.height;t.height*a>t.width?3===n?s=t.height*a:c=t.width/a:3===n?c=t.width/a:s=t.height*a;var h={aspectRatio:a,naturalWidth:r,naturalHeight:o,width:s,height:c};this.canvasData=h,this.limited=1===n||2===n,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(t.width-h.width)/2,h.top=(t.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=Ot({},h)},limitCanvas:function(t,e){var n=this.options,i=this.containerData,r=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=r.aspectRatio,c=this.cropped&&o;if(t){var h=Number(n.minCanvasWidth)||0,u=Number(n.minCanvasHeight)||0;a>1?(h=Math.max(h,i.width),u=Math.max(u,i.height),3===a&&(u*s>h?h=u*s:u=h/s)):a>0&&(h?h=Math.max(h,c?o.width:0):u?u=Math.max(u,c?o.height:0):c&&(h=o.width,u=o.height,u*s>h?h=u*s:u=h/s));var l=Qt({aspectRatio:s,width:h,height:u});h=l.width,u=l.height,r.minWidth=h,r.minHeight=u,r.maxWidth=1/0,r.maxHeight=1/0}if(e)if(a>(c?0:1)){var p=i.width-r.width,f=i.height-r.height;r.minLeft=Math.min(0,p),r.minTop=Math.min(0,f),r.maxLeft=Math.max(0,p),r.maxTop=Math.max(0,f),c&&this.limited&&(r.minLeft=Math.min(o.left,o.left+(o.width-r.width)),r.minTop=Math.min(o.top,o.top+(o.height-r.height)),r.maxLeft=o.left,r.maxTop=o.top,2===a&&(r.width>=i.width&&(r.minLeft=Math.min(0,p),r.maxLeft=Math.max(0,p)),r.height>=i.height&&(r.minTop=Math.min(0,f),r.maxTop=Math.max(0,f))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=i.width,r.maxTop=i.height},renderCanvas:function(t,e){var n=this.canvasData,i=this.imageData;if(e){var r=Zt({width:i.naturalWidth*Math.abs(i.scaleX||1),height:i.naturalHeight*Math.abs(i.scaleY||1),degree:i.rotate||0}),o=r.width,a=r.height,s=n.width*(o/n.naturalWidth),c=n.height*(a/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(c-n.height)/2,n.width=s,n.height=c,n.aspectRatio=o/a,n.naturalWidth=o,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,Et(this.canvas,Ot({width:n.width,height:n.height},qt({translateX:n.left,translateY:n.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,n=this.imageData,i=n.naturalWidth*(e.width/e.naturalWidth),r=n.naturalHeight*(e.height/e.naturalHeight);Ot(n,{width:i,height:r,left:(e.width-i)/2,top:(e.height-r)/2}),Et(this.image,Ot({width:n.width,height:n.height},qt(Ot({translateX:n.left,translateY:n.top},n)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,n=t.aspectRatio||t.initialAspectRatio,i=Number(t.autoCropArea)||.8,r={width:e.width,height:e.height};n&&(e.height*n>e.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*i),r.height=Math.max(r.minHeight,r.height*i),r.left=e.left+(e.width-r.width)/2,r.top=e.top+(e.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=Ot({},r)},limitCropBox:function(t,e){var n=this.options,i=this.containerData,r=this.canvasData,o=this.cropBoxData,a=this.limited,s=n.aspectRatio;if(t){var c=Number(n.minCropBoxWidth)||0,h=Number(n.minCropBoxHeight)||0,u=a?Math.min(i.width,r.width,r.width+r.left,i.width-r.left):i.width,l=a?Math.min(i.height,r.height,r.height+r.top,i.height-r.top):i.height;c=Math.min(c,i.width),h=Math.min(h,i.height),s&&(c&&h?h*s>c?h=c/s:c=h*s:c?h=c/s:h&&(c=h*s),l*s>u?l=u/s:u=l*s),o.minWidth=Math.min(c,u),o.minHeight=Math.min(h,l),o.maxWidth=u,o.maxHeight=l}e&&(a?(o.minLeft=Math.max(0,r.left),o.minTop=Math.max(0,r.top),o.maxLeft=Math.min(i.width,r.left+r.width)-o.width,o.maxTop=Math.min(i.height,r.top+r.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=i.width-o.width,o.maxTop=i.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,t.movable&&t.cropBoxMovable&&Rt(this.face,P,n.width>=e.width&&n.height>=e.height?w:y),Et(this.cropBox,Ot({width:n.width,height:n.height},qt({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Yt(this.element,X,this.getData())}},ce={initPreview:function(){var t=this.element,e=this.crossOrigin,n=this.options.preview,i=e?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=i,o.alt=r,this.viewBox.appendChild(o),this.viewBoxImage=o,n){var a=n;"string"===typeof n?a=t.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,Mt(a,(function(t){var n=document.createElement("img");Rt(t,L,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(n.crossOrigin=e),n.src=i,n.alt=r,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(n)}))}},resetPreview:function(){Mt(this.previews,(function(t){var e=It(t,L);Et(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Wt(t,L)}))},preview:function(){var t=this.imageData,e=this.canvasData,n=this.cropBoxData,i=n.width,r=n.height,o=t.width,a=t.height,s=n.left-e.left-t.left,c=n.top-e.top-t.top;this.cropped&&!this.disabled&&(Et(this.viewBoxImage,Ot({width:o,height:a},qt(Ot({translateX:-s,translateY:-c},t)))),Mt(this.previews,(function(e){var n=It(e,L),h=n.width,u=n.height,l=h,p=u,f=1;i&&(f=h/i,p=r*f),r&&p>u&&(f=u/r,l=i*f,p=u),Et(e,{width:l,height:p}),Et(e.getElementsByTagName("img")[0],Ot({width:o*f,height:a*f},qt(Ot({translateX:-s*f,translateY:-c*f},t))))})))}},he={bind:function(){var t=this.element,e=this.options,n=this.cropper;bt(e.cropstart)&&zt(t,U,e.cropstart),bt(e.cropmove)&&zt(t,$,e.cropmove),bt(e.cropend)&&zt(t,_,e.cropend),bt(e.crop)&&zt(t,X,e.crop),bt(e.zoom)&&zt(t,nt,e.zoom),zt(n,K,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&zt(n,et,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&zt(n,F,this.onDblclick=this.dblclick.bind(this)),zt(t.ownerDocument,Q,this.onCropMove=this.cropMove.bind(this)),zt(t.ownerDocument,Z,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&zt(window,tt,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,n=this.cropper;bt(e.cropstart)&&Ht(t,U,e.cropstart),bt(e.cropmove)&&Ht(t,$,e.cropmove),bt(e.cropend)&&Ht(t,_,e.cropend),bt(e.crop)&&Ht(t,X,e.crop),bt(e.zoom)&&Ht(t,nt,e.zoom),Ht(n,K,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Ht(n,et,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Ht(n,F,this.onDblclick),Ht(t.ownerDocument,Q,this.onCropMove),Ht(t.ownerDocument,Z,this.onCropEnd),e.responsive&&Ht(window,tt,this.onResize)}},ue={resize:function(){if(!this.disabled){var t,e,n=this.options,i=this.container,r=this.containerData,o=i.offsetWidth/r.width,a=i.offsetHeight/r.height,s=Math.abs(o-1)>Math.abs(a-1)?o:a;if(1!==s)n.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(Mt(t,(function(e,n){t[n]=e*s}))),this.setCropBoxData(Mt(e,(function(t,n){e[n]=t*s}))))}},dblclick:function(){this.disabled||this.options.dragMode===Y||this.setDragMode(Tt(this.dragBox,j)?z:H)},wheel:function(t){var e=this,n=Number(this.options.wheelZoomRatio)||.1,i=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?i=t.deltaY>0?1:-1:t.wheelDelta?i=-t.wheelDelta/120:t.detail&&(i=t.detail>0?1:-1),this.zoom(-i*n,t)))},cropStart:function(t){var e=t.buttons,n=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(ft(e)&&1!==e||ft(n)&&0!==n||t.ctrlKey))){var i,r=this.options,o=this.pointers;t.changedTouches?Mt(t.changedTouches,(function(t){o[t.identifier]=Gt(t)})):o[t.pointerId||0]=Gt(t),i=Object.keys(o).length>1&&r.zoomable&&r.zoomOnTouch?x:It(t.target,P),rt.test(i)&&!1!==Yt(this.element,U,{originalEvent:t,action:i})&&(t.preventDefault(),this.action=i,this.cropping=!1,i===b&&(this.cropping=!0,Bt(this.dragBox,R)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var n=this.pointers;t.preventDefault(),!1!==Yt(this.element,$,{originalEvent:t,action:e})&&(t.changedTouches?Mt(t.changedTouches,(function(t){Ot(n[t.identifier]||{},Gt(t,!0))})):Ot(n[t.pointerId||0]||{},Gt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,n=this.pointers;t.changedTouches?Mt(t.changedTouches,(function(t){delete n[t.identifier]})):delete n[t.pointerId||0],e&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,Nt(this.dragBox,R,this.cropped&&this.options.modal)),Yt(this.element,_,{originalEvent:t,action:e}))}}},le={change:function(t){var e,n=this.options,i=this.canvasData,r=this.containerData,o=this.cropBoxData,a=this.pointers,s=this.action,c=n.aspectRatio,h=o.left,u=o.top,l=o.width,p=o.height,f=h+l,d=u+p,g=0,m=0,v=r.width,j=r.height,N=!0;!c&&t.shiftKey&&(c=l&&p?l/p:1),this.limited&&(g=o.minLeft,m=o.minTop,v=g+Math.min(r.width,i.width,i.left+i.width),j=m+Math.min(r.height,i.height,i.top+i.height));var A=a[Object.keys(a)[0]],I={x:A.endX-A.startX,y:A.endY-A.startY},R=function(t){switch(t){case M:f+I.x>v&&(I.x=v-f);break;case O:h+I.x<g&&(I.x=g-h);break;case D:u+I.y<m&&(I.y=m-u);break;case C:d+I.y>j&&(I.y=j-d);break}};switch(s){case y:h+=I.x,u+=I.y;break;case M:if(I.x>=0&&(f>=v||c&&(u<=m||d>=j))){N=!1;break}R(M),l+=I.x,l<0&&(s=O,l=-l,h-=l),c&&(p=l/c,u+=(o.height-p)/2);break;case D:if(I.y<=0&&(u<=m||c&&(h<=g||f>=v))){N=!1;break}R(D),p-=I.y,u+=I.y,p<0&&(s=C,p=-p,u-=p),c&&(l=p*c,h+=(o.width-l)/2);break;case O:if(I.x<=0&&(h<=g||c&&(u<=m||d>=j))){N=!1;break}R(O),l-=I.x,h+=I.x,l<0&&(s=M,l=-l,h-=l),c&&(p=l/c,u+=(o.height-p)/2);break;case C:if(I.y>=0&&(d>=j||c&&(h<=g||f>=v))){N=!1;break}R(C),p+=I.y,p<0&&(s=D,p=-p,u-=p),c&&(l=p*c,h+=(o.width-l)/2);break;case S:if(c){if(I.y<=0&&(u<=m||f>=v)){N=!1;break}R(D),p-=I.y,u+=I.y,l=p*c}else R(D),R(M),I.x>=0?f<v?l+=I.x:I.y<=0&&u<=m&&(N=!1):l+=I.x,I.y<=0?u>m&&(p-=I.y,u+=I.y):(p-=I.y,u+=I.y);l<0&&p<0?(s=B,p=-p,l=-l,u-=p,h-=l):l<0?(s=E,l=-l,h-=l):p<0&&(s=T,p=-p,u-=p);break;case E:if(c){if(I.y<=0&&(u<=m||h<=g)){N=!1;break}R(D),p-=I.y,u+=I.y,l=p*c,h+=o.width-l}else R(D),R(O),I.x<=0?h>g?(l-=I.x,h+=I.x):I.y<=0&&u<=m&&(N=!1):(l-=I.x,h+=I.x),I.y<=0?u>m&&(p-=I.y,u+=I.y):(p-=I.y,u+=I.y);l<0&&p<0?(s=T,p=-p,l=-l,u-=p,h-=l):l<0?(s=S,l=-l,h-=l):p<0&&(s=B,p=-p,u-=p);break;case B:if(c){if(I.x<=0&&(h<=g||d>=j)){N=!1;break}R(O),l-=I.x,h+=I.x,p=l/c}else R(C),R(O),I.x<=0?h>g?(l-=I.x,h+=I.x):I.y>=0&&d>=j&&(N=!1):(l-=I.x,h+=I.x),I.y>=0?d<j&&(p+=I.y):p+=I.y;l<0&&p<0?(s=S,p=-p,l=-l,u-=p,h-=l):l<0?(s=T,l=-l,h-=l):p<0&&(s=E,p=-p,u-=p);break;case T:if(c){if(I.x>=0&&(f>=v||d>=j)){N=!1;break}R(M),l+=I.x,p=l/c}else R(C),R(M),I.x>=0?f<v?l+=I.x:I.y>=0&&d>=j&&(N=!1):l+=I.x,I.y>=0?d<j&&(p+=I.y):p+=I.y;l<0&&p<0?(s=E,p=-p,l=-l,u-=p,h-=l):l<0?(s=B,l=-l,h-=l):p<0&&(s=S,p=-p,u-=p);break;case w:this.move(I.x,I.y),N=!1;break;case x:this.zoom(Vt(a),t),N=!1;break;case b:if(!I.x||!I.y){N=!1;break}e=Xt(this.cropper),h=A.startX-e.left,u=A.startY-e.top,l=o.minWidth,p=o.minHeight,I.x>0?s=I.y>0?T:S:I.x<0&&(h-=l,s=I.y>0?B:E),I.y<0&&(u-=p),this.cropped||(jt(this.cropBox,k),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}N&&(o.width=l,o.height=p,o.left=h,o.top=u,this.action=s,this.renderCropBox()),Mt(a,(function(t){t.startX=t.endX,t.startY=t.endY}))}},pe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Bt(this.dragBox,R),jt(this.cropBox,k),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Ot({},this.initialImageData),this.canvasData=Ot({},this.initialCanvasData),this.cropBoxData=Ot({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Ot(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),jt(this.dragBox,R),Bt(this.cropBox,k)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,Mt(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,jt(this.cropper,N)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Bt(this.cropper,N)),this},destroy:function(){var t=this.element;return t[v]?(t[v]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,i=n.left,r=n.top;return this.moveTo(gt(t)?t:i+Number(t),gt(e)?e:r+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,i=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(ft(t)&&(n.left=t,i=!0),ft(e)&&(n.top=e,i=!0),i&&this.renderCanvas(!0)),this},zoom:function(t,e){var n=this.canvasData;return t=Number(t),t=t<0?1/(1-t):1+t,this.zoomTo(n.width*t/n.naturalWidth,null,e)},zoomTo:function(t,e,n){var i=this.options,r=this.canvasData,o=r.width,a=r.height,s=r.naturalWidth,c=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&i.zoomable){var h=s*t,u=c*t;if(!1===Yt(this.element,nt,{ratio:t,oldRatio:o/s,originalEvent:n}))return this;if(n){var l=this.pointers,p=Xt(this.cropper),f=l&&Object.keys(l).length?Kt(l):{pageX:n.pageX,pageY:n.pageY};r.left-=(h-o)*((f.pageX-p.left-r.left)/o),r.top-=(u-a)*((f.pageY-p.top-r.top)/a)}else yt(e)&&ft(e.x)&&ft(e.y)?(r.left-=(h-o)*((e.x-r.left)/o),r.top-=(u-a)*((e.y-r.top)/a)):(r.left-=(h-o)/2,r.top-=(u-a)/2);r.width=h,r.height=u,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),ft(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,ft(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(ft(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.imageData,i=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(ft(t)&&(n.scaleX=t,i=!0),ft(e)&&(n.scaleY=e,i=!0),i&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,i=this.imageData,r=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-r.left,y:o.top-r.top,width:o.width,height:o.height};var a=i.width/i.naturalWidth;if(Mt(t,(function(e,n){t[n]=e/a})),e){var s=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return n.rotatable&&(t.rotate=i.rotate||0),n.scalable&&(t.scaleX=i.scaleX||1,t.scaleY=i.scaleY||1),t},setData:function(t){var e=this.options,n=this.imageData,i=this.canvasData,r={};if(this.ready&&!this.disabled&&yt(t)){var o=!1;e.rotatable&&ft(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,o=!0),e.scalable&&(ft(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,o=!0),ft(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;ft(t.x)&&(r.left=t.x*a+i.left),ft(t.y)&&(r.top=t.y*a+i.top),ft(t.width)&&(r.width=t.width*a),ft(t.height)&&(r.height=t.height*a),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?Ot({},this.containerData):{}},getImageData:function(){return this.sized?Ot({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&Mt(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){e[n]=t[n]})),e},setCanvasData:function(t){var e=this.canvasData,n=e.aspectRatio;return this.ready&&!this.disabled&&yt(t)&&(ft(t.left)&&(e.left=t.left),ft(t.top)&&(e.top=t.top),ft(t.width)?(e.width=t.width,e.height=t.width/n):ft(t.height)&&(e.height=t.height,e.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,n,i=this.cropBoxData,r=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&yt(t)&&(ft(t.left)&&(i.left=t.left),ft(t.top)&&(i.top=t.top),ft(t.width)&&t.width!==i.width&&(e=!0,i.width=t.width),ft(t.height)&&t.height!==i.height&&(n=!0,i.height=t.height),r&&(e?i.height=i.width/r:n&&(i.width=i.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,n=Jt(this.image,this.imageData,e,t);if(!this.cropped)return n;var i=this.getData(),r=i.x,o=i.y,a=i.width,c=i.height,h=n.width/Math.floor(e.naturalWidth);1!==h&&(r*=h,o*=h,a*=h,c*=h);var u=a/c,l=Qt({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Qt({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),f=Qt({aspectRatio:u,width:t.width||(1!==h?n.width:a),height:t.height||(1!==h?n.height:c)}),d=f.width,g=f.height;d=Math.min(l.width,Math.max(p.width,d)),g=Math.min(l.height,Math.max(p.height,g));var m=document.createElement("canvas"),v=m.getContext("2d");m.width=Dt(d),m.height=Dt(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,d,g);var y=t.imageSmoothingEnabled,b=void 0===y||y,w=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,w&&(v.imageSmoothingQuality=w);var x,M,O,C,D,S,E=n.width,T=n.height,B=r,j=o;B<=-a||B>E?(B=0,x=0,O=0,D=0):B<=0?(O=-B,B=0,x=Math.min(E,a+B),D=x):B<=E&&(O=0,x=Math.min(a,E-B),D=x),x<=0||j<=-c||j>T?(j=0,M=0,C=0,S=0):j<=0?(C=-j,j=0,M=Math.min(T,c+j),S=M):j<=T&&(C=0,M=Math.min(c,T-j),S=M);var N=[B,j,x,M];if(D>0&&S>0){var k=d/a;N.push(O*k,C*k,D*k,S*k)}return v.drawImage.apply(v,[n].concat(s(N.map((function(t){return Math.floor(Dt(t))}))))),m},setAspectRatio:function(t){var e=this.options;return this.disabled||gt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,n=this.dragBox,i=this.face;if(this.ready&&!this.disabled){var r=t===H,o=e.movable&&t===z;t=r||o?t:Y,e.dragMode=t,Rt(n,P,t),Nt(n,j,r),Nt(n,W,o),e.cropBoxMovable||(Rt(i,P,t),Nt(i,j,r),Nt(i,W,o))}return this}},fe=d.Cropper,de=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,t),!e||!st.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=Ot({},ut,yt(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return o(t,[{key:"init",value:function(){var t,e=this.element,n=e.tagName.toLowerCase();if(!e[v]){if(e[v]=this,"img"===n){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===n&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var n=this.element,i=this.options;if(i.rotatable||i.scalable||(i.checkOrientation=!1),i.checkOrientation&&window.ArrayBuffer)if(ot.test(t))at.test(t)?this.read(ie(t)):this.clone();else{var r=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=r,r.onabort=o,r.onerror=o,r.ontimeout=o,r.onprogress=function(){r.getResponseHeader("content-type")!==it&&r.abort()},r.onload=function(){e.read(r.response)},r.onloadend=function(){e.reloading=!1,e.xhr=null},i.checkCrossOrigin&&Ut(t)&&n.crossOrigin&&(t=Ft(t)),r.open("GET",t,!0),r.responseType="arraybuffer",r.withCredentials="use-credentials"===n.crossOrigin,r.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,n=this.imageData,i=oe(t),r=0,o=1,a=1;if(i>1){this.url=re(t,it);var s=ae(i);r=s.rotate,o=s.scaleX,a=s.scaleY}e.rotatable&&(n.rotate=r),e.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,n=t.crossOrigin,i=e;this.options.checkCrossOrigin&&Ut(e)&&(n||(n="anonymous"),i=Ft(e)),this.crossOrigin=n,this.crossOriginUrl=i;var r=document.createElement("img");n&&(r.crossOrigin=n),r.src=i||e,r.alt=t.alt||"The image to crop",this.image=r,r.onload=this.start.bind(this),r.onerror=this.stop.bind(this),Bt(r,A),t.parentNode.insertBefore(r,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var n=d.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(d.navigator.userAgent),i=function(e,n){Ot(t.imageData,{naturalWidth:e,naturalHeight:n,aspectRatio:e/n}),t.initialImageData=Ot({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||n){var r=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=r,r.onload=function(){i(r.width,r.height),n||o.removeChild(r)},r.src=e.src,n||(r.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(r))}else i(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,n=this.image,i=t.parentNode,r=document.createElement("div");r.innerHTML=lt;var o=r.querySelector(".".concat(v,"-container")),a=o.querySelector(".".concat(v,"-canvas")),s=o.querySelector(".".concat(v,"-drag-box")),c=o.querySelector(".".concat(v,"-crop-box")),h=c.querySelector(".".concat(v,"-face"));this.container=i,this.cropper=o,this.canvas=a,this.dragBox=s,this.cropBox=c,this.viewBox=o.querySelector(".".concat(v,"-view-box")),this.face=h,a.appendChild(n),Bt(t,k),i.insertBefore(o,t.nextSibling),this.isImg||jt(n,A),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,Bt(c,k),e.guides||Bt(c.getElementsByClassName("".concat(v,"-dashed")),k),e.center||Bt(c.getElementsByClassName("".concat(v,"-center")),k),e.background&&Bt(o,"".concat(v,"-bg")),e.highlight||Bt(h,I),e.cropBoxMovable&&(Bt(h,W),Rt(h,P,y)),e.cropBoxResizable||(Bt(c.getElementsByClassName("".concat(v,"-line")),k),Bt(c.getElementsByClassName("".concat(v,"-point")),k)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),bt(e.ready)&&zt(t,J,e.ready,{once:!0}),Yt(t,J)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),jt(this.element,k))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=fe,t}},{key:"setDefaults",value:function(t){Ot(ut,yt(t)&&t)}}]),t}();return Ot(de.prototype,se,ce,he,ue,le,pe),de}))}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}!function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){n.p=""}();var i={};return function(){"use strict";if("undefined"!==typeof window){var t=window.document.currentScript,e=n(7679);t=e(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:e});var i=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n(2526),n(7941);function r(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}function o(t,e){if(null==t)return{};var n,i,o=r(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n(9653),n(4916),n(5306);var a=n(3129),s=n.n(a),c=["containerStyle","value","src","alt","imgStyle"],h="undefined"===typeof window?[String,Array]:[String,Array,Element,NodeList],u={render:function(t){var e=this.crossorigin||void 0;return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",crossorigin:e},style:[{"max-width":"100%"},this.imgStyle]})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,value:Object,preview:h,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!1},zoomOnTouch:{type:Boolean,default:!1},zoomOnWheel:{type:Boolean,default:!1},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number},mounted:function(){var t=this,e=this.$props,n=(e.containerStyle,e.value),i=(e.src,e.alt,e.imgStyle,o(e,c)),r={};for(var a in i)void 0!==this[a]&&(r[a]=this[a]);r.cropend=function(e){t.$emit("input",t.getData())},r.zoom=function(e){t.$emit("input",t.getData())},r.data=n,this.cropper=new(s())(this.$refs.img,r)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(t,e)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,e){return this.cropper.move(t,e)},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.moveTo(t,e)},relativeZoom:function(t,e){return this.cropper.zoom(t,e)},zoomTo:function(t,e){return this.cropper.zoomTo(t,e)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.scale(t,e)},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}};(window.__goplaidVueComponentRegisters=window.__goplaidVueComponentRegisters||[]).push((function(t){t.component("vue-cropper",u)}))}(),i=i.default,i}()}));
|