PageSourceSearch

https://axethrowing.org/assets/croppie-legacy-CdXO-5LP.js

js axethrowing.org collected 2026-10-01 15:02:48 UTC 23,447 bytes, 1 lines download raw bytes

1System.register([],function(e,t){"use strict";return{execute:function(){var t,n={exports:{}},i=n.exports;e("c",(t||(t=1,function(e,t){var n,o;n=i,o=function(t){"function"!=typeof Promise&&function(t){function n(e,t){return function(){e.apply(t,arguments)}}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],u(e,n(r,this),n(a,this))}function o(e){var t=this;return null===this._state?void this._deferreds.push(e):void h(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(r){return void e.reject(r)}e.resolve(i)}else(t._state?e.resolve:e.reject)(t._value)})}function r(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void u(n(t,e),n(r,this),n(a,this))}this._state=!0,this._value=e,s.call(this)}catch(o){a.call(this,o)}}function a(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;t>e;e++)o.call(this,this._deferreds[e]);this._deferreds=null}function l(e,t,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i}function u(e,t,n){var i=!1;try{e(function(e){i||(i=!0,t(e))},function(e){i||(i=!0,n(e))})}catch(r){if(i)return;i=!0,n(r)}}var c=setTimeout,h="function"==typeof setImmediate&&setImmediate||function(e){c(e,1)},p=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=this;return new i(function(i,r){o.call(n,new l(e,t,i,r))})},i.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&p(arguments[0])?arguments[0]:arguments);return new i(function(t,n){function i(r,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){i(r,e)},n)}e[r]=a,0===--o&&t(e)}catch(u){n(u)}}if(0===e.length)return t([]);for(var o=e.length,r=0;r<e.length;r++)i(r,e[r])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){for(var i=0,o=e.length;o>i;i++)e[i].then(t,n)})},i._setImmediateFn=function(e){h=e},e.exports?e.exports=i:t.Promise||(t.Promise=i)}(this),"function"!=typeof window.CustomEvent&&function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,n){for(var i=atob(this.toDataURL(t,n).split(",")[1]),o=i.length,r=new Uint8Array(o),a=0;a<o;a++)r[a]=i.charCodeAt(a);e(new Blob([r],{type:t||"image/png"}))}});var n,i,o,r=["Webkit","Moz","ms"],a=document.createElement("div").style,s=[1,8,3,6],l=[2,7,4,5];function u(e){if(e in a)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=r.length;n--;)if((e=r[n]+t)in a)return e}function c(e,t){for(var n in e=e||{},t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},c(e[n],t[n])):e[n]=t[n];return e}function h(e){return c({},e)}function p(e){if("createEvent"in document){var t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),e.dispatchEvent(t)}else e.fireEvent("onchange")}function d(e,t,n){if("string"==typeof t){var i=t;(t={})[i]=n}for(var o in t)e.style[o]=t[o]}function m(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function v(e,t){for(var n in t)e.setAttribute(n,t[n])}function f(e){return parseInt(e,10)}function g(e,t){var n=e.naturalWidth,i=e.naturalHeight,o=t||x(e);if(o&&o>=5){var r=n;n=i,i=r}return{width:n,height:i}}i=u("transform"),n=u("transformOrigin"),o=u("userSelect");var w={translate3d:{suffix:", 0px"},translate:{suffix:""}},y=function(e,t,n){this.x=parseFloat(e),this.y=parseFloat(t),this.scale=parseFloat(n)};y.parse=function(e){return e.style?y.parse(e.style[i]):e.indexOf("matrix")>-1||e.indexOf("none")>-1?y.fromMatrix(e):y.fromString(e)},y.fromMatrix=function(e){var t=e.substring(7).split(",");return t.length&&"none"!==e||(t=[1,0,0,1,0,0]),new y(f(t[4]),f(t[5]),parseFloat(t[0]))},y.fromString=function(e){var t=e.split(") "),n=t[0].substring(re.globals.translate.length+1).split(","),i=t.length>1?t[1].substring(6):1,o=n.length>1?n[0]:0,r=n.length>1?n[1]:0;return new y(o,r,i)},y.prototype.toString=function(){var e=w[re.globals.translate].suffix||"";return re.globals.translate+"("+this.x+"px, "+this.y+"px"+e+") scale("+this.scale+")"};var b=function(e){if(!e||!e.style[n])return this.x=0,void(this.y=0);var t=e.style[n].split(" ");this.x=parseFloat(t[0]),this.y=parseFloat(t[1])};function x(e){return e.exifdata?e.exifdata.Orientation:1}
1function C(e,t,n){var i=t.width,o=t.height,r=e.getContext("2d");switch(e.width=t.width,e.height=t.height,r.save(),n){case 2:r.translate(i,0),r.scale(-1,1);break;case 3:r.translate(i,o),r.rotate(180*Math.PI/180);break;case 4:r.translate(0,o),r.scale(1,-1);break;case 5:e.width=o,e.height=i,r.rotate(90*Math.PI/180),r.scale(1,-1);break;case 6:e.width=o,e.height=i,r.rotate(90*Math.PI/180),r.translate(0,-o);break;case 7:e.width=o,e.height=i,r.rotate(-90*Math.PI/180),r.translate(-i,o),r.scale(1,-1);break;case 8:e.width=o,e.height=i,r.translate(0,i),r.rotate(-90*Math.PI/180)}r.drawImage(t,0,0,i,o),r.restore()}function E(){var e,t,n,i,o,r=this,a=r.options.viewport.type?"cr-vp-"+r.options.viewport.type:null;r.options.useCanvas=r.options.enableOrientation||L.call(r),r.data={},r.elements={},e=r.elements.boundary=document.createElement("div"),t=r.elements.viewport=document.createElement("div"),r.elements.img=document.createElement("img"),n=r.elements.overlay=document.createElement("div"),r.options.useCanvas?(r.elements.canvas=document.createElement("canvas"),r.elements.preview=r.elements.canvas):r.elements.preview=r.elements.img,m(e,"cr-boundary"),e.setAttribute("aria-dropeffect","none"),i=r.options.boundary.width,o=r.options.boundary.height,d(e,{width:i+(isNaN(i)?"":"px"),height:o+(isNaN(o)?"":"px")}),m(t,"cr-viewport"),a&&m(t,a),d(t,{width:r.options.viewport.width+"px",height:r.options.viewport.height+"px"}),t.setAttribute("tabindex",0),m(r.elements.preview,"cr-image"),v(r.elements.preview,{alt:"preview","aria-grabbed":"false"}),m(n,"cr-overlay"),r.element.appendChild(e),e.appendChild(r.elements.preview),e.appendChild(t),e.appendChild(n),m(r.element,"croppie-container"),r.options.customClass&&m(r.element,r.options.customClass),I.call(this),r.options.enableZoom&&R.call(r),r.options.enableResize&&_.call(r)}function L(){return this.options.enableExif&&window.EXIF}function _(){var e,t,n,i,r,a,s,l=this,u=document.createElement("div"),c=!1;function h(a){if((void 0===a.button||0===a.button)&&(a.preventDefault(),!c)){var s=l.elements.overlay.getBoundingClientRect();if(c=!0,t=a.pageX,n=a.pageY,e=-1!==a.currentTarget.className.indexOf("vertical")?"v":"h",i=s.width,r=s.height,a.touches){var u=a.touches[0];t=u.pageX,n=u.pageY}window.addEventListener("mousemove",p),window.addEventListener("touchmove",p),window.addEventListener("mouseup",v),window.addEventListener("touchend",v),document.body.style[o]="none"}}function p(o){var a=o.pageX,s=o.pageY;if(o.preventDefault(),o.touches){var c=o.touches[0];a=c.pageX,s=c.pageY}var h=a-t,p=s-n,m=l.options.viewport.height+p,v=l.options.viewport.width+h;"v"===e&&m>=50&&m<=r?(d(u,{height:m+"px"}),l.options.boundary.height+=p,d(l.elements.boundary,{height:l.options.boundary.height+"px"}),l.options.viewport.height+=p,d(l.elements.viewport,{height:l.options.viewport.height+"px"})):"h"===e&&v>=50&&v<=i&&(d(u,{width:v+"px"}),l.options.boundary.width+=h,d(l.elements.boundary,{width:l.options.boundary.width+"px"}),l.options.viewport.width+=h,d(l.elements.viewport,{width:l.options.viewport.width+"px"})),X.call(l),H.call(l),M.call(l),A.call(l),n=s,t=a}function v(){c=!1,window.removeEventListener("mousemove",p),window.removeEventListener("touchmove",p),window.removeEventListener("mouseup",v),window.removeEventListener("touchend",v),document.body.style[o]=""}m(u,"cr-resizer"),d(u,{width:this.options.viewport.width+"px",height:this.options.viewport.height+"px"}),this.options.resizeControls.height&&(m(a=document.createElement("div"),"cr-resizer-vertical"),u.appendChild(a)),this.options.resizeControls.width&&(m(s=document.createElement("div"),"cr-resizer-horisontal"),u.appendChild(s)),a&&(a.addEventListener("mousedown",h),a.addEventListener("touchstart",h)),s&&(s.addEventListener("mousedown",h),s.addEventListener("touchstart",h)),this.elements.boundary.appendChild(u)}function B(e){if(this.options.enableZoom){var t=this.elements.zoomer,n=Q(e,4);t.value=Math.max(t.min,Math.min(t.max,n))}}function R(){var e=this,t=e.elements.zoomerWrap=document.createElement("div"),n=e.elements.zoomer=document.createElement("input");function i(){Z.call(e,{value:parseFloat(n.value),origin:new b(e.elements.preview),viewportRect:e.elements.viewport.getBoundingClientRect(),transform:y.parse(e.elements.preview)})}function o(t){var n,o;if("ctrl"===e.options.mouseWheelZoom&&!0!==t.ctrlKey)return 0;n=t.wheelDelta?t.wheelDelta/1200:t.deltaY?t.deltaY/1060:t.detail?t.detail/-60:0,o=e._currentZoom+n*e._currentZoom,t.preventDefault(),B.call(e,o),i.call(e)}m(t,"cr-slider-wrap"),m(n,"cr-slider"),n.type="range",n.step="0.0001",n.value=1,n.style.display=e.options.showZoomer?"":"none",n.setAttribute("aria-label","zoom"),e.element.appendChild(t),t.appendChild(n),e._currentZoom=1,e.elements.zoomer.addEventListener("input",i),e.elements.zoomer.addEventListener("change",i
1),e.options.mouseWheelZoom&&(e.elements.boundary.addEventListener("mousewheel",o),e.elements.boundary.addEventListener("DOMMouseScroll",o))}function Z(e){var t=this,o=e?e.transform:y.parse(t.elements.preview),r=e?e.viewportRect:t.elements.viewport.getBoundingClientRect(),a=e?e.origin:new b(t.elements.preview);function s(){var e={};e[i]=o.toString(),e[n]=a.toString(),d(t.elements.preview,e)}if(t._currentZoom=e?e.value:t._currentZoom,o.scale=t._currentZoom,t.elements.zoomer.setAttribute("aria-valuenow",t._currentZoom),s(),t.options.enforceBoundary){var l=z.call(t,r),u=l.translate,c=l.origin;o.x>=u.maxX&&(a.x=c.minX,o.x=u.maxX),o.x<=u.minX&&(a.x=c.maxX,o.x=u.minX),o.y>=u.maxY&&(a.y=c.minY,o.y=u.maxY),o.y<=u.minY&&(a.y=c.maxY,o.y=u.minY)}s(),k.call(t),A.call(t)}function z(e){var t=this,n=t._currentZoom,i=e.width,o=e.height,r=t.elements.boundary.clientWidth/2,a=t.elements.boundary.clientHeight/2,s=t.elements.preview.getBoundingClientRect(),l=s.width,u=s.height,c=i/2,h=o/2,p=-1*(c/n-r),d=-1*(h/n-a),m=1/n*c,v=1/n*h;return{translate:{maxX:p,minX:p-(l*(1/n)-i*(1/n)),maxY:d,minY:d-(u*(1/n)-o*(1/n))},origin:{maxX:l*(1/n)-m,minX:m,maxY:u*(1/n)-v,minY:v}}}function M(){var e=this,t=e._currentZoom,o=e.elements.preview.getBoundingClientRect(),r=e.elements.viewport.getBoundingClientRect(),a=y.parse(e.elements.preview.style[i]),s=new b(e.elements.preview),l=r.top-o.top+r.height/2,u=r.left-o.left+r.width/2,c={},h={};c.y=l/t,c.x=u/t,h.y=(c.y-s.y)*(1-t),h.x=(c.x-s.x)*(1-t),a.x-=h.x,a.y-=h.y;var p={};p[n]=c.x+"px "+c.y+"px",p[i]=a.toString(),d(e.elements.preview,p)}function I(){var e,t,n,r,a,s=this,l=!1;function u(e,t){var n=s.elements.preview.getBoundingClientRect(),i=a.y+t,o=a.x+e;s.options.enforceBoundary?(r.top>n.top+t&&r.bottom<n.bottom+t&&(a.y=i),r.left>
1n.left+e&&r.right<n.right+e&&(a.x=o)):(a.y=i,a.x=o)}function c(e){s.elements.preview.setAttribute("aria-grabbed",e),s.elements.boundary.setAttribute("aria-dropeffect",e?"move":"none")}function h(n){if((void 0===n.button||0===n.button)&&(n.preventDefault(),!l)){if(l=!0,e=n.pageX,t=n.pageY,n.touches){var i=n.touches[0];e=i.pageX,t=i.pageY}c(l),a=y.parse(s.elements.preview),window.addEventListener("mousemove",m),window.addEventListener("touchmove",m),window.addEventListener("mouseup",v),window.addEventListener("touchend",v),document.body.style[o]="none",r=s.elements.viewport.getBoundingClientRect()}}function m(o){o.preventDefault();var r=o.pageX,l=o.pageY;if(o.touches){var c=o.touches[0];r=c.pageX,l=c.pageY}var h=r-e,m=l-t,v={};if("touchmove"===o.type&&o.touches.length>1){var f=o.touches[0],g=o.touches[1],w=Math.sqrt((f.pageX-g.pageX)*(f.pageX-g.pageX)+(f.pageY-g.pageY)*(f.pageY-g.pageY));n||(n=w/s._currentZoom);var y=w/n;return B.call(s,y),void p(s.elements.zoomer)}u(h,m),v[i]=a.toString(),d(s.elements.preview,v),X.call(s),t=l,e=r}function v(){c(l=!1),window.removeEventListener("mousemove",m),window.removeEventListener("touchmove",m),window.removeEventListener("mouseup",v),window.removeEventListener("touchend",v),document.body.style[o]="",M.call(s),A.call(s),n=0}s.elements.overlay.addEventListener("mousedown",h),s.elements.viewport.addEventListener("keydown",function(e){if(!e.shiftKey||38!==e.keyCode&&40!==e.keyCode){if(s.options.enableKeyMovement&&e.keyCode>=37&&e.keyCode<=40){e.preventDefault();var t=function(e){switch(e){case 37:return[1,0];case 38:return[0,1];case 39:return[-1,0];case 40:return[0,-1]}}(e.keyCode);a=y.parse(s.elements.preview),document.body.style[o]="none",r=s.elements.viewport.getBoundingClientRect(),function(e){var t=e[0],r=e[1],l={};u(t,r),l[i]=a.toString(),d(s.elements.preview,l),X.call(s),document.body.style[o]="",M.call(s),A.call(s),n=0}(t)}}else{var l=0;l=38===e.keyCode?parseFloat(s.elements.zoomer.value,10)+parseFloat(s.elements.zoomer.step,10):parseFloat(s.elements.zoomer.value,10)-parseFloat(s.elements.zoomer.step,10),s.setZoom(l)}}),s.elements.overlay.addEventListener("touchstart",h)}function X(){if(this.elements){var e=this,t=e.elements.boundary.getBoundingClientRect(),n=e.elements.preview.getBoundingClientRect();d(e.elements.overlay,{width:n.width+"px",height:n.height+"px",top:n.top-t.top+"px",left:n.left-t.left+"px"})}}b.prototype.toString=function(){return this.x+"px "+this.y+"px"};var Y,F,W,k=(Y=X,F=500,function(){var e=this,t=arguments;clearTimeout(W),W=setTimeout(function(){W=null,Y.apply(e,t)},F)});function A(){var e,t=this,n=t.get();O.call(t)&&(t.options.update.call(t,n),t.$&&"undefined"==typeof Prototype?t.$(t.element).trigger("update.croppie",n):(window.CustomEvent?e=new CustomEvent("update",{detail:n}):(e=document.createEvent("CustomEvent")).initCustomEvent("update",!0,!0,n),t.element.dispatchEvent(e)))}function O(){return this.elements.preview.offsetHeight>0&&this.elements.preview.offsetWidth>0}function S(){var e,t=this,o={},r=t.elements.preview,a=new y(0,0,1),s=new b;O.call(t)&&!t.data.bound&&(t.data.bound=!0,o[i]=a.toString(),o[n]=s.toString(),o.opacity=1,d(r,o),e=t.elements.preview.getBoundingClientRect(),t._originalImageWidth=e.width,t._originalImageHeight=e.height,t.data.orientation=x(t.elements.img),t.options.enableZoom?H.call(t,!0):t._currentZoom=1,a.scale=t._currentZoom,o[i]=a.toString(),d(r,o),t.data.points.length?N.call(t,t.data.points):j.call(t),M.call(t),X.call(t))}function H(e){var t,n,i,o,r=this,a=0,s=r.options.maxZoom||1.5,l=r.elements.zoomer,u=parseFloat(l.value),c=r.elements.boundary.getBoundingClientRect(),h=g(r.elements.img,r.data.orientation),d=r.elements.viewport.getBoundingClientRect();r.options.enforceBoundary&&(i=d.width/h.width,o=d.height/h.height,a=Math.max(i,o)),a>=s&&(s=a+1),l.min=Q(a,4),l.max=Q(s,4),!e&&(u<l.min||u>
1l.max)?B.call(r,u<l.min?l.min:l.max):e&&(n=Math.max(c.width/h.width,c.height/h.height),t=null!==r.data.boundZoom?r.data.boundZoom:n,B.call(r,t)),p(l)}function N(e){if(4!==e.length)throw"Croppie - Invalid number of points supplied: "+e;var t=this,o=e[2]-e[0],r=t.elements.viewport.getBoundingClientRect(),a=t.elements.boundary.getBoundingClientRect(),s=r.left-a.left,l=r.top-a.top,u=r.width/o,c=e[1],h=e[0],p=-1*e[1]+l,m=-1*e[0]+s,v={};v[n]=h+"px "+c+"px",v[i]=new y(m,p,u).toString(),d(t.elements.preview,v),B.call(t,u),t._currentZoom=u}function j(){var e=this,t=e.elements.preview.getBoundingClientRect(),n=e.elements.viewport.getBoundingClientRect(),o=e.elements.boundary.getBoundingClientRect(),r=n.left-o.left,a=n.top-o.top,s=r-(t.width-n.width)/2,l=a-(t.height-n.height)/2,u=new y(s,l,e._currentZoom);d(e.elements.preview,i,u.toString())}function P(e){var t=this,n=t.elements.canvas,i=t.elements.img,o=n.getContext("2d"),r=L.call(t);e=t.options.enableOrientation&&e,o.clearRect(0,0,n.width,n.height),n.width=i.width,n.height=i.height,r&&!e?C(n,i,f(x(i)||0)):e&&C(n,i,e)}function D(e){var t=this,n=e.points,i=f(n[0]),o=f(n[1]),r=f(n[2])-i,a=f(n[3])-o,s=e.circle,l=document.createElement("canvas"),u=l.getContext("2d"),c=e.outputWidth||r,h=e.outputHeight||a;return e.outputWidth&&e.outputHeight,l.width=c,l.height=h,e.backgroundColor&&(u.fillStyle=e.backgroundColor,u.fillRect(0,0,c,h)),!1!==t.options.enforceBoundary&&(r=Math.min(r,t._originalImageWidth),a=Math.min(a,t._originalImageHeight)),u.drawImage(this.elements.preview,i,o,r,a,0,0,c,h),s&&(u.fillStyle="#fff",u.globalCompositeOperation="destination-in",u.beginPath(),u.arc(l.width/2,l.height/2,l.width/2,0,2*Math.PI,!0),u.closePath(),u.fill()),l}function T(e){var t=e.points,n=document.createElement("div"),i=document.createElement("img"),o=t[2]-t[0],r=t[3]-t[1];return m(n,"croppie-result"),n.appendChild(i),d(i,{left:-1*t[0]+"px",top:-1*t[1]+"px"}),i.src=e.url,d(n,{width:o+"px",height:r+"px"}),n}function q(e){return D.call(this,e).toDataURL(e.format,e.quality)}function K(e){var t=this;return new Promise(function(n,i){D.call(t,e).toBlob(function(e){n(e)},e.format,e.quality)})}function U(e){this.elements.img.parentNode&&(Array.prototype.forEach.call(this.elements.img.classList,function(t){e.classList.add(t)}),this.elements.img.parentNode.replaceChild(e,this.elements.img),this.elements.preview=e),this.elements.img=e}function $(e,t){var n,i,o,r,a=this,s=[],l=null,u=L.call(a);if("string"==typeof e)n=e,e={};else if(Array.isArray(e))s=e.slice();else{if(void 0===e&&a.data.url)return S.call(a),A.call(a),null;n=e.url,s=e.points||[],l=void 0===e.zoom?null:e.zoom}return a.data.bound=!1,a.data.url=n||a.data.url,a.data.boundZoom=l,(i=n,o=u,r=new Image,r.style.opacity=0,new Promise(function(e){function t(){r.style.opacity=1,setTimeout(function(){e(r)},1)}r.removeAttribute("crossOrigin"),i.match(/^https?:\/\/|^\/\//)&&r.setAttribute("crossOrigin","anonymous"),r.onload=function(){o?EXIF.getData(r,function(){t()}):t()},r.src=i})).then(function(n){if(U.call(a,n),s.length)a.options.relative&&(s=[s[0]*n.naturalWidth/100,s[1]*n.naturalHeight/100,s[2]*n.naturalWidth/100,s[3]*n.naturalHeight/100]);else{var i,o,r=g(n),l=a.elements.viewport.getBoundingClientRect(),u=l.width/l.height;r.width/r.height>u?i=(o=r.height)*u:(i=r.width,o=r.height/u);var c=(r.width-i)/2,h=(r.height-o)/2,p=c+i,d=h+o;a.data.points=[c,h,p,d]}a.data.points=s.map(function(e){return parseFloat(e)}),a.options.useCanvas&&P.call(a,e.orientation||1),S.call(a),A.call(a),t&&t()}).catch(function(e){console.error("Croppie:"+e)})}function Q(e,t){return parseFloat(e).toFixed(t||0)}function G(){var e=this,t=e.elements.preview.getBoundingClientRect(),n=e.elements.viewport.getBoundingClientRect(),i=n.left-t.left,o=n.top-t.top,r=(n.width-e.elements.viewport.offsetWidth)/2,a=(n.height-e.elements.viewport.offsetHeight)/2,s=i+e.elements.viewport.offsetWidth+r,l=o+e.elements.viewport.offsetHeight+a,u=e._currentZoom;(u===1/0||isNaN(u))&&(u=1);var c=e.options.enforceBoundary?0:Number.NEGATIVE_INFINITY;return i=Math.max(c,i/u),o=Math.max(c,o/u),s=Math.max(c,s/u),l=Math.max(c,l/u),{points:[Q(i),Q(o),Q(s),Q(l)],zoom:u,orientation:e.data.orientation}}var J={type:"canvas",format:"png",quality:1},V=["jpeg","webp","png"];function ee(e){var t=this,n=G.call(t),i=c(h(J),h(e)),o="string"==typeof e?e:i.type||"base64",r=i.size||"viewport",a=i.format,s=i.quality,l=i.backgroundColor,u="boolean"==typeof i.circle?i.circle:"circle"===t.options.viewport.type,p=t.elements.viewport.getBoundingClientRect(),d=p.width/p.height;return"viewport"===r?(n.outputWidth=p.width,n.outputHeight=p.height):"object"==typeof r&&(r.width&&r.height?(n.outputWidth=r.width,n.outputHeight=r.height):r.width?(n.outputWidth=r.width,n.outputHeight=r.width/d):r.height&&(n.outputWidth=r.height*d,n.outputHeight=r.height)),V.indexOf(a)>-1&&(n.format="image/"+a,n.quality=s),n.circle=u,n.url=t.data.url,n.backgroundColor=l,new Promise(function(e,i){switch(o.toLowerCase()){case"rawcanvas":e(D.call(t,n));break;case"canvas":case"base64":e(q.call(t,n));break;case"blob":K.call(t,n).then(e);break;default:e(T.call(t,n))}})}function te(){S.call(this)}function ne(e){if(!this.options.useCanvas||!this.options.enableOrientation)throw"Croppie: Cannot rotate without enableOrientation && EXIF.js included";var t,n,i,o,r,a=this,u=a.elements.canvas;a.data.orientation=(t=a.data.orientation,n=e,i=s.indexOf(t)>-1?s:l,o=i.indexOf(t),r=n/90%i.length,i[(i.length+o+r%i.length)%i.length]),C(u,a.elements.img,a.data.orientation),H.call(a),Z.call(a),copy=null}function ie(){var e,t,n=this;n.element.removeChild(n.elements.boundary),e=n.element,t="croppie-container",e.classList?e.classList.remove(t):e.className=e.className.replace(t,""),n.options.enableZoom&&n.element.removeChild(n.elements.zoomerWrap),delete n.elements}if(window.jQuery){var oe=window.jQuery;oe.fn.croppie=function(e){if("string"==typeof e){var t=Array.prototype.slice.call(arguments,1
1),n=oe(this).data("croppie");return"get"===e?n.get():"result"===e?n.result.apply(n,t):"bind"===e?n.bind.apply(n,t):this.each(function(){var n=oe(this).data("croppie");if(n){var i=n[e];if(!oe.isFunction(i))throw"Croppie "+e+" method not found";i.apply(n,t),"destroy"===e&&oe(this).removeData("croppie")}})}return this.each(function(){var t=new re(this,e);t.$=oe,oe(this).data("croppie",t)})}}function re(e,t){if(e.className.indexOf("croppie-container")>-1)throw new Error("Croppie: Can't initialize croppie more than once");if(this.element=e,this.options=c(h(re.defaults),t),"img"===this.element.tagName.toLowerCase()){var n=this.element;m(n,"cr-original-image"),v(n,{"aria-hidden":"true",alt:""});var i=document.createElement("div");this.element.parentNode.appendChild(i),i.appendChild(n),this.element=i,this.options.url=this.options.url||n.src}if(E.call(this),this.options.url){var o={url:this.options.url,points:this.options.points};delete this.options.url,delete this.options.points,$.call(this,o)}}re.defaults={viewport:{width:100,height:100,type:"square"},boundary:{},orientationControls:{enabled:!0,leftClass:"",rightClass:""},resizeControls:{width:!0,height:!0},customClass:"",showZoomer:!0,enableZoom:!0,enableResize:!1,mouseWheelZoom:!0,enableExif:!1,enforceBoundary:!0,enableOrientation:!1,enableKeyMovement:!0,update:function(){}},re.globals={translate:"translate3d"},c(re.prototype,{bind:function(e,t){return $.call(this,e,t)},get:function(){var e=G.call(this),t=e.points;return this.options.relative&&(t[0]/=this.elements.img.naturalWidth/100,t[1]/=this.elements.img.naturalHeight/100,t[2]/=this.elements.img.naturalWidth/100,t[3]/=this.elements.img.naturalHeight/100),e},result:function(e){return ee.call(this,e)},refresh:function(){return te.call(this)},setZoom:function(e){B.call(this,e),p(this.elements.zoomer)},rotate:function(e){ne.call(this,e)},destroy:function(){return ie.call(this)}}),t.Croppie=window.Croppie=re},"string"!=typeof t.nodeName?o(t):o(n.commonJsStrict={})}(n,n.exports)),n.exports))}}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.