vendor: 50,774 bytes, lines 1-3
1(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,function(t,e,i){(function(t){ 2/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ 3var n,r,s,o,a,l,h,c,u,d,f,p,g,m,v,y,_,A,b,C,w,S=S||{version:"3.6.6"};if(e.fabric=S,"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?S.document=document:S.document=document.implementation.createHTMLDocument(""),S.window=window;else{var x=new(i(49).JSDOM)(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;S.document=x.document,S.jsdomImplForWrapper=i(50).implForWrapper,S.nodeCanvas=i(51).Canvas,S.window=x,DOMParser=S.window.DOMParser}function T(t,e){var i=t.canvas,n=e.targetCanvas,r=n.getContext("2d");r.translate(0,n.height),r.scale(1,-1);var s=i.height-n.height;r.drawImage(i,0,s,n.width,n.height,0,0,n.width,n.height)}function k(t,e){var i=e.targetCanvas.getContext("2d"),n=e.destinationWidth,r=e.destinationHeight,s=n*r*4,o=new Uint8Array(this.imageBuffer,0,s),a=new Uint8ClampedArray(this.imageBuffer,0,s);t.readPixels(0,0,n,r,t.RGBA,t.UNSIGNED_BYTE,o);var l=new ImageData(a,n,r);i.putImageData(l,0,0)}S.isTouchSupported="ontouchstart"in S.window||"ontouchstart"in S.document||S.window&&S.window.navigator&&S.window.navigator.maxTouchPoints>0,S.isLikelyNode=void 0!==t&&"undefined"==typeof window,S.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],S.DPI=96,S.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",S.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,S.reNonWord=/[ \n\.,;!\?\-]/,S.fontPaths={},S.iMatrix=[1,0,0,1,0,0],S.svgNS="http://www.w3.org/2000/svg",S.perfLimitSizeTotal=2097152,S.maxCacheSideLimit=4096,S.minCacheSideLimit=256,S.charWidthsCache={},S.textureSize=2048,S.disableStyleCopyPaste=!1,S.enableGLFiltering=!0,S.devicePixelRatio=S.window.devicePixelRatio||S.window.webkitDevicePixelRatio||S.window.mozDevicePixelRatio||1,S.browserShadowBlurConstant=1,S.arcToSegmentsCache={},S.boundsOfCurveCache={},S.cachesBoundsOfCurve=!0,S.forceGLPutImageData=!1,S.initFilterBackend=function(){return S.enableGLFiltering&&S.isWebglSupported&&S.isWebglSupported(S.textureSize)?(console.log("max texture size: "+S.maxTextureSize),new S.WebglFilterBackend({tileSize:S.textureSize})):S.Canvas2dFilterBackend?new S.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=S),function(){function t(t,e){if(this.__eventListeners[t]){var i=this.__eventListeners[t];e?i[i.indexOf(e)]=!1:S.util.array.fill(i,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var i in t)this.on(i,t[i]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function i(e,i){if(!this.__eventListeners)return this;if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof arguments[0])for(var n in e)t.call(this,n,e[n]);else t.call(this,e,i);return this}function n(t,e){if(!this.__eventListeners)return this;var i=this.__eventListeners[t];if(!i)return this;for(var n=0,r=i.length;n<r;n++)i[n]&&i[n].call(this,e||{});return this.__eventListeners[t]=i.filter((function(t){return!1!==t})),this}S.Observable={observe:e,stopObserving:i,fire:n,on:e,off:i,trigger:n}}(),S.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var t=0,e=arguments.length;t<e;t++)this._onObjectAdded(arguments[t]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(t,e,i){var n=this._objects;return i?n[e]=t:n.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var t,e=this._objects,i=!1,n=0,r=arguments.length;n<r;n++)-1!==(t=e.indexOf(arguments[n]))&&(i=!0,e.splice(t,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[n]));return this.renderOnAddRemove&&i&&this.requestRenderAll(),this},forEachObject:function(t,e){for(var i=this.getObjects(),n=0,r=i.length;n<r;n++)t.call(e,i[n],n,i);return this},getObjects:function(t){return void 0===t?this._objects.concat():this._objects.filter((function(e){return e.type===t}))},item:function(t){return this._objects[t]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(t){return this._objects.indexOf(t)>-1},complexity:function(){return this._objects.reduce((function(t,e){return t+=e.complexity?e.complexity():0}),0)}},S.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof S.Gradient||this.set(e,new S.Gradient(t))},_initPattern:function(t,e,i){!t||!t.source||t instanceof S.Pattern?i&&i():this.set(e,new S.Pattern(t,i))},_initClipping:function(t){if(t.clipTo&&"string"==typeof t.clipTo){var e=S.util.getFunctionBody(t.clipTo);void 0!==e&&(this.clipTo=new Function("ctx",e))}},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(t):"function"==typeof e&&"clipTo"!==t?this._set(t,e(this.get(t))):this._set(t,e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return"boolean"==typeof e&&this.set(t,!e),this},get:function(t){return this[t]}},n=e,r=Math.sqrt,s=Math.atan2,o=Math.pow,a=Math.PI/180,l=Math.PI/2,S.util={cos:function(t){if(0===t)return 1;switch(t<0&&(t=-t),t/l){case 1:case 3:return 0;case 2:return-1}return Math.cos(t)},sin:function(t){if(0===t)return 0;var e=1;switch(t<0&&(e=-1),t/l){case 1:return e;case 2:return 0;case 3:return-e}return Math.sin(t)},removeFromArray:function(t,e){var i=t.indexOf(e);return-1!==i&&t.splice(i,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*a},radiansToDegrees:function(t){return t/a},rotatePoint:function(t,e,i){t.subtractEquals(e);var n=S.util.rotateVector(t,i);return new S.Point(n.x,n.y).addEquals(e)},rotateVector:function(t,e){var i=S.util.sin(e),n=S.util.cos(e);return{x:t.x*n-t.y*i,y:t.x*i+t.y*n}},transformPoint:function(t,e,i){return i?new S.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new S.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t,e){if(e)for(var i=0;i<t.length;i++)t[i]=S.util.transformPoint(t[i],e);var n=[t[0].x,t[1].x,t[2].x,t[3].x],r=S.util.array.min(n),s=S.util.array.max(n)-r,o=[t[0].y,t[1].y,t[2].y,t[3].y],a=S.util.array.min(o);return{left:r,top:a,width:s,height:S.util.array.max(o)-a}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),i=[e*t[3],-e*t[1],-e*t[2],e*t[0]],n=S.util.transformPoint({x:t[4],y:t[5]},i,!0);return i[4]=-n.x,i[5]=-n.y,i},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var i=/\D{0,2}$/.exec(t),n=parseFloat(t);switch(e||(e=S.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return n*S.DPI/25.4;case"cm":return n*S.DPI/2.54;case"in":return n*S.DPI;case"pt":return n*S.DPI/72;case"pc":return n*S.DPI/72*12;case"em":return n*e;default:return n}},falseFunction:function(){return!1},getKlass:function(t,e){return t=S.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),S.util.resolveNamespace(e)[t]},getSvgAttributes:function(t){var e=["instantiated_by_use","style","id","class"];switch(t){case"linearGradient":e=e.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":e=e.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":e=e.concat(["offset","stop-color","stop-opacity"])}return e},resolveNamespace:function(t){if(!t)return S;var e,i=t.split("."),r=i.length,s=n||S.window;for(e=0;e<r;++e)s=s[i[e]];return s},loadImage:function(t,e,i,n){if(t){var r=S.util.createImage(),s=function(){e&&e.call(i,r),r=r.onload=r.onerror=null};r.onload=s,r.onerror=function(){S.log("Error loading "+r.src),e&&e.call(i,null,!0),r=r.onload=r.onerror=null},0!==t.indexOf("data")&&n&&(r.crossOrigin=n),"data:image/svg"===t.substring(0,14)&&(r.onload=null,S.util.loadImageInDom(r,s)),r.src=t}else e&&e.call(i,t)},loadImageInDom:function(t,e){var i=S.document.createElement("div");i.style.width=i.style.height="1px",i.style.left=i.style.top="-100%",i.style.position="absolute",i.appendChild(t),S.document.querySelector("body").appendChild(i),t.onload=function(){e(),i.parentNode.removeChild(i),i=null}},enlivenObjects:function(t,e,i,n){var r=[],s=0,o=(t=t||[]).length;function a(){++s===o&&e&&e(r.filter((function(t){return t})))}o?t.forEach((function(t,e){t&&t.type?S.util.getKlass(t.type,i).fromObject(t,(function(i,s){s||(r[e]=i),n&&n(t,i,s),a()})):a()})):e&&e(r)},enlivenPatterns:function(t,e){function i(){++r===s&&e&&e(n)}var n=[],r=0,s=(t=t||[]).length;s?t.forEach((function(t,e){t&&t.source?new S.Pattern(t,(function(t){n[e]=t,i()})):(n[e]=t,i())})):e&&e(n)},groupSVGElements:function(t,e,i){var n;return t&&1===t.length?t[0]:(e&&(e.width&&e.height?e.centerPoint={x:e.width/2,y:e.height/2}:(delete e.width,delete e.height)),n=new S.Group(t,e),void 0!==i&&(n.sourcePath=i),n)},populateWithProperties:function(t,e,i){if(i&&"[object Array]"===Object.prototype.toString.call(i))for(var n=0,r=i.length;n<r;n++)i[n]in t&&(e[i[n]]=t[i[n]])},drawDashedLine:function(t,e,i,n,o,a){var l=n-e,h=o-i,c=r(l*l+h*h),u=s(h,l),d=a.length,f=0,p=!0;for(t.save(),t.translate(e,i),t.moveTo(0,0),t.rotate(u),e=0;c>e;)(e+=a[f++%d])>c&&(e=c),t[p?"lineTo":"moveTo"](e,0),p=!p;t.restore()},createCanvasElement:function(){return S.document.createElement("canvas")},copyCanvasElement:function(t){var e=S.util.createCanvasElement();return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e},toDataURL:function(t,e,i){return t.toDataURL("image/"+e,i)},createImage:function(){return S.document.createElement("img")},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},multiplyTransformMatrices:function(t,e,i){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],i?0:t[0]*e[4]+t[2]*e[5]+t[4],i?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var e=s(t[1],t[0]),i=o(t[0],2)+o(t[1],2),n=r(i),l=(t[0]*t[3]-t[2]*t[1])/n,h=s(t[0]*t[2]+t[1]*t[3],i);return{angle:e/a,scaleX:n,scaleY:l,skewX:h/a,skewY:0,translateX:t[4],translateY:t[5]}},calcRotateMatrix:function(t){if(!t.angle)return S.iMatrix.concat();var e=S.util.degreesToRadians(t.angle),i=S.util.cos(e),n=S.util.sin(e);return[i,n,-n,i,0,0]},calcDimensionsMatrix:function(t){var e=void 0===t.scaleX?1:t.scaleX,i=void 0===t.scaleY?1:t.scaleY,n=[t.flipX?-e:e,0,0,t.flipY?-i:i,0,0],r=S.util.multiplyTransformMatrices,s=S.util.degreesToRadians;return t.skewX&&(n=r(n,[1,0,Math.tan(s(t.skewX)),1],!0)),t.skewY&&(n=r(n,[1,Math.tan(s(t.skewY)),0,1],!0)),n},composeMatrix:function(t){var e=[1,0,0,1,t.translateX||0,t.translateY||0],i=S.util.multiplyTransformMatrices;return t.angle&&(e=i(e,S.util.calcRotateMatrix(t))),(t.scaleX||t.scaleY||t.skewX||t.skewY||t.flipX||t.flipY)&&(e=i(e,S.util.calcDimensionsMatrix(t))),e},customTransformMatrix:function(t,e,i){return S.util.composeMatrix({scaleX:t,scaleY:e,skewX:i})},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.rotate(0)},saveObjectTransform:function(t){return{scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,angle:t.angle,left:t.left,flipX:t.flipX,flipY:t.flipY,top:t.top}},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},isTransparent:function(t,e,i,n){n>0&&(e>n?e-=n:e=0,i>n?i-=n:i=0);var r,s=!0,o=t.getImageData(e,i,2*n||1,2*n||1),a=o.data.length;for(r=3;r<a&&!1!=(s=o.data[r]<=0);r+=4);return o=null,s},parsePreserveAspectRatioAttribute:function(t){var e,i="meet",n=t.split(" ");return n&&n.length&&("meet"!==(i=n.pop())&&"slice"!==i?(e=i,i="meet"):n.length&&(e=n.pop())),{meetOrSlice:i,alignX:"none"!==e?e.slice(1,4):"none",alignY:"none"!==e?e.slice(5,8):"none"}},clearFabricFontCache:function(t){(t=(t||"").toLowerCase())?S.charWidthsCache[t]&&delete S.charWidthsCache[t]:S.charWidthsCache={}},limitDimsByArea:function(t,e){var i=Math.sqrt(e*t),n=Math.floor(e/i);return{x:Math.floor(i),y:n}},capValue:function(t,e,i){return Math.max(t,Math.min(e,i))},findScaleToFit:function(t,e){return Math.min(e.width/t.width,e.height/t.height)},findScaleToCover:function(t,e){return Math.max(e.width/t.width,e.height/t.height)},matrixToSVG:function(t){return"matrix("+t.map((function(t){return S.util.toFixed(t,S.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"}},function(){var t=Array.prototype.join;function e(e,r,s,o,a,l,h){var c=t.call(arguments);if(S.arcToSegmentsCache[c])return S.arcToSegmentsCache[c];var u=Math.PI,d=h*u/180,f=S.util.sin(d),p=S.util.cos(d),g=0,m=0,v=-p*e*.5-f*r*.5,y=-p*r*.5+f*e*.5,_=(s=Math.abs(s))*s,A=(o=Math.abs(o))*o,b=y*y,C=v*v,w=_*A-_*b-A*C,x=0;if(w<0){var T=Math.sqrt(1-w/(_*A));s*=T,o*=T}else x=(a===l?-1:1)*Math.sqrt(w/(_*b+A*C));var k=x*s*y/o,O=-x*o*v/s,P=p*k-f*O+.5*e,D=f*k+p*O+.5*r,E=n(1,0,(v-k)/s,(y-O)/o),M=n((v-k)/s,(y-O)/o,(-v-k)/s,(-y-O)/o);0===l&&M>0?M-=2*u:1===l&&M<0&&(M+=2*u);for(var j=Math.ceil(Math.abs(M/u*2)),L=[],R=M/j,F=8/3*Math.sin(R/4)*Math.sin(R/4)/Math.sin(R/2),I=E+R,B=0;B<j;B++)L[B]=i(E,I,p,f,s,o,P,D,F,g,m),g=L[B][4],m=L[B][5],E=I,I+=R;return S.arcToSegmentsCache[c]=L,L}function i(t,e,i,n,r,s,o,a,l,h,c){var u=S.util.cos(t),d=S.util.sin(t),f=S.util.cos(e),p=S.util.sin(e),g=i*r*f-n*s*p+o,m=n*r*f+i*s*p+a;return[h+l*(-i*r*d-n*s*u),c+l*(-n*r*d+i*s*u),g+l*(i*r*p+n*s*f),m+l*(n*r*p-i*s*f),g,m]}function n(t,e,i,n){var r=Math.atan2(e,t),s=Math.atan2(n,i);return s>=r?s-r:2*Math.PI-(r-s)}function r(e,i,n,r,s,o,a,l){var h;if(S.cachesBoundsOfCurve&&(h=t.call(arguments),S.boundsOfCurveCache[h]))return S.boundsOfCurveCache[h];var c,u,d,f,p,g,m,v,y=Math.sqrt,_=Math.min,A=Math.max,b=Math.abs,C=[],w=[[],[]];u=6*e-12*n+6*s,c=-3*e+9*n-9*s+3*a,d=3*n-3*e;for(var x=0;x<2;++x)if(x>0&&(u=6*i-12*r+6*o,c=-3*i+9*r-9*o+3*l,d=3*r-3*i),b(c)<1e-12){if(b(u)<1e-12)continue;0<(f=-d/u)&&f<1&&C.push(f)}else(m=u*u-4*d*c)<0||(0<(p=(-u+(v=y(m)))/(2*c))&&p<1&&C.push(p),0<(g=(-u-v)/(2*c))&&g<1&&C.push(g));for(var T,k,O,P=C.length,D=P;P--;)T=(O=1-(f=C[P]))*O*O*e+3*O*O*f*n+3*O*f*f*s+f*f*f*a,w[0][P]=T,k=O*O*O*i+3*O*O*f*r+3*O*f*f*o+f*f*f*l,w[1][P]=k;w[0][D]=e,w[1][D]=i,w[0][D+1]=a,w[1][D+1]=l;var E=[{x:_.apply(null,w[0]),y:_.apply(null,w[1])},{x:A.apply(null,w[0]),y:A.apply(null,w[1])}];return S.cachesBoundsOfCurve&&(S.boundsOfCurveCache[h]=E),E}S.util.drawArc=function(t,i,n,r){for(var s=r[0],o=r[1],a=r[2],l=r[3],h=r[4],c=[[],[],[],[]],u=e(r[5]-i,r[6]-n,s,o,l,h,a),d=0,f=u.length;d<f;d++)c[d][0]=u[d][0]+i,c[d][1]=u[d][1]+n,c[d][2]=u[d][2]+i,c[d][3]=u[d][3]+n,c[d][4]=u[d][4]+i,c[d][5]=u[d][5]+n,t.bezierCurveTo.apply(t,c[d])},S.util.getBoundsOfArc=function(t,i,n,s,o,a,l,h,c){for(var u,d=0,f=0,p=[],g=e(h-t,c-i,n,s,a,l,o),m=0,v=g.length;m<v;m++)u=r(d,f,g[m][0],g[m][1],g[m][2],g[m][3],g[m][4],g[m][5]),p.push({x:u[0].x+t,y:u[0].y+i}),p.push({x:u[1].x+t,y:u[1].y+i}),d=g[m][4],f=g[m][5];return p},S.util.getBoundsOfCurve=r}(),function(){var t=Array.prototype.slice;function e(t,e,i){if(t&&0!==t.length){var n=t.length-1,r=e?t[n][e]:t[n];if(e)for(;n--;)i(t[n][e],r)&&(r=t[n][e]);else for(;n--;)i(t[n],r)&&(r=t[n]);return r}}S.util.array={fill:function(t,e){for(var i=t.length;i--;)t[i]=e;return t},invoke:function(e,i){for(var n=t.call(arguments,2),r=[],s=0,o=e.length;s<o;s++)r[s]=n.length?e[s][i].apply(e[s],n):e[s][i].call(e[s]);return r},min:function(t,i){return e(t,i,(function(t,e){return t<e}))},max:function(t,i){return e(t,i,(function(t,e){return t>=e}))}}}(),function(){function t(e,i,n){if(n)if(!S.isLikelyNode&&i instanceof Element)e=i;else if(i instanceof Array){e=[];for(var r=0,s=i.length;r<s;r++)e[r]=t({},i[r],n)}else if(i&&"object"==typeof i)for(var o in i)"canvas"===o?e[o]=t({},i[o]):i.hasOwnProperty(o)&&(e[o]=t({},i[o],n));else e=i;else for(var o in i)e[o]=i[o];return e}S.util.object={extend:t,clone:function(e,i){return t({},e,i)}},S.util.object.extend(S.util,S.Observable)}(),function(){function t(t,e){var i=t.charCodeAt(e);if(isNaN(i))return"";if(i<55296||i>57343)return t.charAt(e);if(55296<=i&&i<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var n=t.charCodeAt(e+1);if(56320>n||n>57343)throw"High surrogate without following low surrogate";return t.charAt(e)+t.charAt(e+1)}if(0===e)throw"Low surrogate without preceding high surrogate";var r=t.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}S.util.string={camelize:function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},capitalize:function(t,e){return t.charAt(0).toUpperCase()+(e?t.slice(1):t.slice(1).toLowerCase())},escapeXml:function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},graphemeSplit:function(e){var i,n=0,r=[];for(n=0;n<e.length;n++)!1!==(i=t(e,n))&&r.push(i);return r}}}(),function(){var t=Array.prototype.slice,e=function(){},i=function(){for(var t in{toString:1})if("toString"===t)return!1;return!0}(),n=function(t,e,n){for(var r in e)r in t.prototype&&"function"==typeof t.prototype[r]&&(e[r]+"").indexOf("callSuper")>-1?t.prototype[r]=function(t){return function(){var i=this.constructor.superclass;this.constructor.superclass=n;var r=e[t].apply(this,arguments);if(this.constructor.superclass=i,"initialize"!==t)return r}}(r):t.prototype[r]=e[r],i&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};function r(){}function s(e){for(var i=null,n=this;n.constructor.superclass;){var r=n.constructor.superclass.prototype[e];if(n[e]!==r){i=r;break}n=n.constructor.superclass.prototype}return i?arguments.length>1?i.apply(this,t.call(arguments,1)):i.call(this):console.log("tried to callSuper "+e+", method not found in prototype chain",this)}S.util.createClass=function(){var i=null,o=t.call(arguments,0);function a(){this.initialize.apply(this,arguments)}"function"==typeof o[0]&&(i=o.shift()),a.superclass=i,a.subclasses=[],i&&(r.prototype=i.prototype,a.prototype=new r,i.subclasses.push(a));for(var l=0,h=o.length;l<h;l++)n(a,o[l],i);return a.prototype.initialize||(a.prototype.initialize=e),a.prototype.constructor=a,a.prototype.callSuper=s,a}}(),h=!!S.document.createElement("div").attachEvent,S.util.addListener=function(t,e,i,n){t&&t.addEventListener(e,i,!h&&n)},S.util.removeListener=function(t,e,i,n){t&&t.removeEventListener(e,i,!h&&n)},S.util.getPointer=function(t){var e=t.target,i=S.util.getScrollLeftTop(e),n=function(t){var e=t.changedTouches;return e&&e[0]?e[0]:t}(t);return{x:n.clientX+i.left,y:n.clientY+i.top}},c=S.document.createElement("div"),u="string"==typeof c.style.opacity,d="string"==typeof c.style.filter,f=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,p=function(t){return t},u?p=function(t,e){return t.style.opacity=e,t}:d&&(p=function(t,e){var i=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(i.zoom=1),f.test(i.filter)?(e=e>=.9999?"":"alpha(opacity="+100*e+")",i.filter=i.filter.replace(f,e)):i.filter+=" alpha(opacity="+100*e+")",t}),S.util.setStyle=function(t,e){var i=t.style;if(!i)return t;if("string"==typeof e)return t.style.cssText+=";"+e,e.indexOf("opacity")>-1?p(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var n in e)"opacity"===n?p(t,e[n]):i["float"===n||"cssFloat"===n?void 0===i.styleFloat?"cssFloat":"styleFloat":n]=e[n];return t},function(){var t=Array.prototype.slice;var e,i,n,r,s=function(e){return t.call(e,0)};try{e=s(S.document.childNodes)instanceof Array}catch(t){}function o(t,e){var i=S.document.createElement(t);for(var n in e)"class"===n?i.className=e[n]:"for"===n?i.htmlFor=e[n]:i.setAttribute(n,e[n]);return i}function a(t){for(var e=0,i=0,n=S.document.documentElement,r=S.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&((t=t.parentNode||t.host)===S.document?(e=r.scrollLeft||n.scrollLeft||0,i=r.scrollTop||n.scrollTop||0):(e+=t.scrollLeft||0,i+=t.scrollTop||0),1!==t.nodeType||"fixed"!==t.style.position););return{left:e,top:i}}e||(s=function(t){for(var e=new Array(t.length),i=t.length;i--;)e[i]=t[i];return e}),i=S.document.defaultView&&S.document.defaultView.getComputedStyle?function(t,e){var i=S.document.defaultView.getComputedStyle(t,null);return i?i[e]:void 0}:function(t,e){var i=t.style[e];return!i&&t.currentStyle&&(i=t.currentStyle[e]),i},n=S.document.documentElement.style,r="userSelect"in n?"userSelect":"MozUserSelect"in n?"MozUserSelect":"WebkitUserSelect"in n?"WebkitUserSelect":"KhtmlUserSelect"in n?"KhtmlUserSelect":"",S.util.makeElementUnselectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=S.util.falseFunction),r?t.style[r]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t},S.util.makeElementSelectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=null),r?t.style[r]="":"string"==typeof t.unselectable&&(t.unselectable=""),t},S.util.getScript=function(t,e){var i=S.document.getElementsByTagName("head")[0],n=S.document.createElement("script"),r=!0;n.onload=n.onreadystatechange=function(t){if(r){if("string"==typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;r=!1,e(t||S.window.event),n=n.onload=n.onreadystatechange=null}},n.src=t,i.appendChild(n)},S.util.getById=function(t){return"string"==typeof t?S.document.getElementById(t):t},S.util.toArray=s,S.util.makeElement=o,S.util.addClass=function(t,e){t&&-1===(" "+t.className+" ").indexOf(" "+e+" ")&&(t.className+=(t.className?" ":"")+e)},S.util.wrapElement=function(t,e,i){return"string"==typeof e&&(e=o(e,i)),t.parentNode&&t.parentNode.replaceChild(e,t),e.appendChild(t),e},S.util.getScrollLeftTop=a,S.util.getElementOffset=function(t){var e,n,r=t&&t.ownerDocument,s={left:0,top:0},o={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return o;for(var h in l)o[l[h]]+=parseInt(i(t,h),10)||0;return e=r.documentElement,void 0!==t.getBoundingClientRect&&(s=t.getBoundingClientRect()),n=a(t),{left:s.left+n.left-(e.clientLeft||0)+o.left,top:s.top+n.top-(e.clientTop||0)+o.top}},S.util.getElementStyle=i,S.util.getNodeCanvas=function(t){var e=S.jsdomImplForWrapper(t);return e._canvas||e._image},S.util.cleanUpJsdomNode=function(t){if(S.isLikelyNode){var e=S.jsdomImplForWrapper(t);e&&(e._image=null,e._canvas=null,e._currentSrc=null,e._attributes=null,e._classList=null)}}}(),function(){function t(){}S.util.request=function(e,i){i||(i={});var n=i.method?i.method.toUpperCase():"GET",r=i.onComplete||function(){},s=new S.window.XMLHttpRequest,o=i.body||i.parameters;return s.onreadystatechange=function(){4===s.readyState&&(r(s),s.onreadystatechange=t)},"GET"===n&&(o=null,"string"==typeof i.parameters&&(e=function(t,e){return t+(/\?/.test(t)?"&":"?")+e}(e,i.parameters))),s.open(n,e,!0),"POST"!==n&&"PUT"!==n||s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(o),s}}(),S.log=console.log,S.warn=console.warn,function(){function t(){return!1}function e(t,e,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+e}var i=S.window.requestAnimationFrame||S.window.webkitRequestAnimationFrame||S.window.mozRequestAnimationFrame||S.window.oRequestAnimationFrame||S.window.msRequestAnimationFrame||function(t){return S.window.setTimeout(t,1e3/60)},n=S.window.cancelAnimationFrame||S.window.clearTimeout;function r(){return i.apply(S.window,arguments)}S.util.animate=function(i){r((function(n){i||(i={});var s,o=n||+new Date,a=i.duration||500,l=o+a,h=i.onChange||t,c=i.abort||t,u=i.onComplete||t,d=i.easing||e,f="startValue"in i?i.startValue:0,p="endValue"in i?i.endValue:100,g=i.byValue||p-f;i.onStart&&i.onStart(),function t(e){var i=(s=e||+new Date)>l?a:s-o,n=i/a,m=d(i,f,g,a),v=Math.abs((m-f)/g);if(!c())return s>l?(h(p,1,1),void u(p,1,1)):(h(m,v,n),void r(t));u(p,1,1)}(o)}))},S.util.requestAnimFrame=r,S.util.cancelAnimFrame=function(){return n.apply(S.window,arguments)}}(),S.util.animateColor=function(t,e,i,n){var r=new S.Color(t).getSource(),s=new S.Color(e).getSource();n=n||{},S.util.animate(S.util.object.extend(n,{duration:i||500,startValue:r,endValue:s,byValue:s,easing:function(t,e,i,r){var s,o,a,l,h=n.colorEasing?n.colorEasing(t,r):1-Math.cos(t/r*(Math.PI/2));return s=e,o=i,a=h,l="rgba("+parseInt(s[0]+a*(o[0]-s[0]),10)+","+parseInt(s[1]+a*(o[1]-s[1]),10)+","+parseInt(s[2]+a*(o[2]-s[2]),10),l+=","+(s&&o?parseFloat(s[3]+a*(o[3]-s[3])):1),l+=")"}}))},function(){function t(t,e,i,n){return t<Math.abs(e)?(t=e,n=i/4):n=0===e&&0===t?i/(2*Math.PI)*Math.asin(1):i/(2*Math.PI)*Math.asin(e/t),{a:t,c:e,p:i,s:n}}function e(t,e,i){return t.a*Math.pow(2,10*(e-=1))*Math.sin((e*i-t.s)*(2*Math.PI)/t.p)}function i(t,e,i,r){return i-n(r-t,0,i,r)+e}function n(t,e,i,n){return(t/=n)<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e}S.util.ease={easeInQuad:function(t,e,i,n){return i*(t/=n)*t+e},easeOutQuad:function(t,e,i,n){return-i*(t/=n)*(t-2)+e},easeInOutQuad:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,i,n){return i*(t/=n)*t*t+e},easeOutCubic:function(t,e,i,n){return i*((t=t/n-1)*t*t+1)+e},easeInOutCubic:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,i,n){return i*(t/=n)*t*t*t+e},easeOutQuart:function(t,e,i,n){return-i*((t=t/n-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t*t*t+e:-i/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,i,n){return i*(t/=n)*t*t*t*t+e},easeOutQuint:function(t,e,i,n){return i*((t=t/n-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+e},easeOutSine:function(t,e,i,n){return i*Math.sin(t/n*(Math.PI/2))+e},easeInOutSine:function(t,e,i,n){return-i/2*(Math.cos(Math.PI*t/n)-1)+e},easeInExpo:function(t,e,i,n){return 0===t?e:i*Math.pow(2,10*(t/n-1))+e},easeOutExpo:function(t,e,i,n){return t===n?e+i:i*(1-Math.pow(2,-10*t/n))+e},easeInOutExpo:function(t,e,i,n){return 0===t?e:t===n?e+i:(t/=n/2)<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(t,e,i,n){return-i*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOutCirc:function(t,e,i,n){return i*Math.sqrt(1-(t=t/n-1)*t)+e},easeInOutCirc:function(t,e,i,n){return(t/=n/2)<1?-i/2*(Math.sqrt(1-t*t)-1)+e:i/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(i,n,r,s){var o=0;return 0===i?n:1===(i/=s)?n+r:(o||(o=.3*s),-e(t(r,r,o,1.70158),i,s)+n)},easeOutElastic:function(e,i,n,r){var s=0;if(0===e)return i;if(1===(e/=r))return i+n;s||(s=.3*r);var o=t(n,n,s,1.70158);return o.a*Math.pow(2,-10*e)*Math.sin((e*r-o.s)*(2*Math.PI)/o.p)+o.c+i},easeInOutElastic:function(i,n,r,s){var o=0;if(0===i)return n;if(2===(i/=s/2))return n+r;o||(o=s*(.3*1.5));var a=t(r,r,o,1.70158);return i<1?-.5*e(a,i,s)+n:a.a*Math.pow(2,-10*(i-=1))*Math.sin((i*s-a.s)*(2*Math.PI)/a.p)*.5+a.c+n},easeInBack:function(t,e,i,n,r){return void 0===r&&(r=1.70158),i*(t/=n)*t*((r+1)*t-r)+e},easeOutBack:function(t,e,i,n,r){return void 0===r&&(r=1.70158),i*((t=t/n-1)*t*((r+1)*t+r)+1)+e},easeInOutBack:function(t,e,i,n,r){return void 0===r&&(r=1.70158),(t/=n/2)<1?i/2*(t*t*((1+(r*=1.525))*t-r))+e:i/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},easeInBounce:i,easeOutBounce:n,easeInOutBounce:function(t,e,r,s){return t<s/2?.5*i(2*t,0,r,s)+e:.5*n(2*t-s,0,r,s)+.5*r+e}}}(),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.util.object.clone,r=e.util.toFixed,s=e.util.parseUnit,o=e.util.multiplyTransformMatrices,a={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform"},l={stroke:"strokeOpacity",fill:"fillOpacity"};function h(t){return t in a?a[t]:t}function c(t,i,n,r){var a,l="[object Array]"===Object.prototype.toString.call(i);if("fill"!==t&&"stroke"!==t||"none"!==i)if("vector-effect"===t)i="non-scaling-stroke"===i;else if("strokeDashArray"===t)i="none"===i?null:i.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===t)i=n&&n.transformMatrix?o(n.transformMatrix,e.parseTransformAttribute(i)):e.parseTransformAttribute(i);else if("visible"===t)i="none"!==i&&"hidden"!==i,n&&!1===n.visible&&(i=!1);else if("opacity"===t)i=parseFloat(i),n&&void 0!==n.opacity&&(i*=n.opacity);else if("textAnchor"===t)i="start"===i?"left":"end"===i?"right":"center";else if("charSpacing"===t)a=s(i,r)/r*1e3;else if("paintFirst"===t){var h=i.indexOf("fill"),c=i.indexOf("stroke");i="fill";(h>-1&&c>-1&&c<h||-1===h&&c>-1)&&(i="stroke")}else{if("href"===t||"xlink:href"===t)return i;a=l?i.map(s):s(i,r)}else i="";return!l&&isNaN(a)?i:a}function u(t){return new RegExp("^("+t.join("|")+")\\b","i")}function d(t,e){var i,n,r,s,o=[];for(r=0,s=e.length;r<s;r++)i=e[r],n=t.getElementsByTagName(i),o=o.concat(Array.prototype.slice.call(n));return o}function f(t,e){var i,n=!0;return(i=p(t,e.pop()))&&e.length&&(n=function(t,e){var i,n=!0;for(;t.parentNode&&1===t.parentNode.nodeType&&e.length;)n&&(i=e.pop()),t=t.parentNode,n=p(t,i);return 0===e.length}(t,e)),i&&n&&0===e.length}function p(t,e){var i,n,r=t.nodeName,s=t.getAttribute("class"),o=t.getAttribute("id");if(i=new RegExp("^"+r,"i"),e=e.replace(i,""),o&&e.length&&(i=new RegExp("#"+o+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"")),s&&e.length)for(n=(s=s.split(" ")).length;n--;)i=new RegExp("\\."+s[n]+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"");return 0===e.length}function g(t,e){var i;if(t.getElementById&&(i=t.getElementById(e)),i)return i;var n,r,s,o=t.getElementsByTagName("*");for(r=0,s=o.length;r<s;r++)if(e===(n=o[r]).getAttribute("id"))return n}e.svgValidTagNamesRegEx=u(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),e.svgViewBoxElementsRegEx=u(["symbol","image","marker","pattern","view","svg"]),e.svgInvalidAncestorsRegEx=u(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),e.svgValidParentsRegEx=u(["symbol","g","a","svg","clipPath","defs"]),e.cssRules={},e.gradientDefs={},e.clipPaths={},e.parseTransformAttribute=function(){function t(t,i,n){t[n]=Math.tan(e.util.degreesToRadians(i[0]))}var i=e.iMatrix,n=e.reNum,r="(?:\\s+,?\\s*|,\\s*)",s="(?:"+("(?:(matrix)\\s*\\(\\s*("+n+")"+r+"("+n+")"+r+"("+n+")"+r+"("+n+")"+r+"("+n+")"+r+"("+n+")\\s*\\))")+"|"+("(?:(translate)\\s*\\(\\s*("+n+")(?:"+r+"("+n+"))?\\s*\\))")+"|"+("(?:(scale)\\s*\\(\\s*("+n+")(?:"+r+"("+n+"))?\\s*\\))")+"|"+("(?:(rotate)\\s*\\(\\s*("+n+")(?:"+r+"("+n+")"+r+"("+n+"))?\\s*\\))")+"|"+("(?:(skewX)\\s*\\(\\s*("+n+")\\s*\\))")+"|"+("(?:(skewY)\\s*\\(\\s*("+n+")\\s*\\))")+")",o=new RegExp("^\\s*(?:"+("(?:"+s+"(?:"+r+"*"+s+")*)")+"?)\\s*$"),a=new RegExp(s,"g");return function(n){var r=i.concat(),l=[];if(!n||n&&!o.test(n))return r;n.replace(a,(function(n){var o=new RegExp(s).exec(n).filter((function(t){return!!t})),a=o[1],h=o.slice(2).map(parseFloat);switch(a){case"translate":!function(t,e){t[4]=e[0],2===e.length&&(t[5]=e[1])}(r,h);break;case"rotate":h[0]=e.util.degreesToRadians(h[0]),function(t,i){var n=e.util.cos(i[0]),r=e.util.sin(i[0]),s=0,o=0;3===i.length&&(s=i[1],o=i[2]),t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t[4]=s-(n*s-r*o),t[5]=o-(r*s+n*o)}(r,h);break;case"scale":!function(t,e){var i=e[0],n=2===e.length?e[1]:e[0];t[0]=i,t[3]=n}(r,h);break;case"skewX":t(r,h,2);break;case"skewY":t(r,h,1);break;case"matrix":r=h}l.push(r.concat()),r=i.concat()}));for(var h=l[0];l.length>1;)l.shift(),h=e.util.multiplyTransformMatrices(h,l[0]);return h}}();var m=new RegExp("^\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*$");function v(t){var i,n,r,o,a,l,h=t.getAttribute("viewBox"),c=1,u=1,d=t.getAttribute("width"),f=t.getAttribute("height"),p=t.getAttribute("x")||0,g=t.getAttribute("y")||0,v=t.getAttribute("preserveAspectRatio")||"",y=!h||!e.svgViewBoxElementsRegEx.test(t.nodeName)||!(h=h.match(m)),_=!d||!f||"100%"===d||"100%"===f,A=y&&_,b={},C="",w=0,S=0;if(b.width=0,b.height=0,b.toBeParsed=A,A)return b;if(y)return b.width=s(d),b.height=s(f),b;if(i=-parseFloat(h[1]),n=-parseFloat(h[2]),r=parseFloat(h[3]),o=parseFloat(h[4]),b.minX=i,b.minY=n,b.viewBoxWidth=r,b.viewBoxHeight=o,_?(b.width=r,b.height=o):(b.width=s(d),b.height=s(f),c=b.width/r,u=b.height/o),"none"!==(v=e.util.parsePreserveAspectRatioAttribute(v)).alignX&&("meet"===v.meetOrSlice&&(u=c=c>u?u:c),"slice"===v.meetOrSlice&&(u=c=c>u?c:u),w=b.width-r*c,S=b.height-o*c,"Mid"===v.alignX&&(w/=2),"Mid"===v.alignY&&(S/=2),"Min"===v.alignX&&(w=0),"Min"===v.alignY&&(S=0)),1===c&&1===u&&0===i&&0===n&&0===p&&0===g)return b;if((p||g)&&(C=" translate("+s(p)+" "+s(g)+") "),a=C+" matrix("+c+" 0 0 "+u+" "+(i*c+w)+" "+(n*u+S)+") ",b.viewboxTransform=e.parseTransformAttribute(a),"svg"===t.nodeName){for(l=t.ownerDocument.createElementNS(e.svgNS,"g");t.firstChild;)l.appendChild(t.firstChild);t.appendChild(l)}else a=(l=t).getAttribute("transform")+a;return l.setAttribute("transform",a),b}function y(t,e){var i=g(t,e.getAttribute("xlink:href").substr(1));if(i&&i.getAttribute("xlink:href")&&y(t,i),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach((function(t){i&&!e.hasAttribute(t)&&i.hasAttribute(t)&&e.setAttribute(t,i.getAttribute(t))})),!e.children.length)for(var n=i.cloneNode(!0);n.firstChild;)e.appendChild(n.firstChild);e.removeAttribute("xlink:href")}e.parseSVGDocument=function(t,i,r,s){if(t){!function(t){for(var i=d(t,["use","svg:use"]),n=0;i.length&&n<i.length;){var r,s,o,a,l=i[n],h=(l.getAttribute("xlink:href")||l.getAttribute("href")).substr(1),c=l.getAttribute("x")||0,u=l.getAttribute("y")||0,f=g(t,h).cloneNode(!0),p=(f.getAttribute("transform")||"")+" translate("+c+", "+u+")",m=i.length,y=e.svgNS;if(v(f),/^svg$/i.test(f.nodeName)){var _=f.ownerDocument.createElementNS(y,"g");for(s=0,a=(o=f.attributes).length;s<a;s++)r=o.item(s),_.setAttributeNS(y,r.nodeName,r.nodeValue);for(;f.firstChild;)_.appendChild(f.firstChild);f=_}for(s=0,a=(o=l.attributes).length;s<a;s++)"x"!==(r=o.item(s)).nodeName&&"y"!==r.nodeName&&"xlink:href"!==r.nodeName&&"href"!==r.nodeName&&("transform"===r.nodeName?p=r.nodeValue+" "+p:f.setAttribute(r.nodeName,r.nodeValue));f.setAttribute("transform",p),f.setAttribute("instantiated_by_use","1"),f.removeAttribute("id"),l.parentNode.replaceChild(f,l),i.length===m&&n++}}(t);var o,a,l=e.Object.__uid++,h=v(t),c=e.util.toArray(t.getElementsByTagName("*"));if(h.crossOrigin=s&&s.crossOrigin,h.svgUid=l,0===c.length&&e.isLikelyNode){var u=[];for(o=0,a=(c=t.selectNodes('//*[name(.)!="svg"]')).length;o<a;o++)u[o]=c[o];c=u}var f=c.filter((function(t){return v(t),e.svgValidTagNamesRegEx.test(t.nodeName.replace("svg:",""))&&!function(t,e){for(;t&&(t=t.parentNode);)if(t.nodeName&&e.test(t.nodeName.replace("svg:",""))&&!t.getAttribute("instantiated_by_use"))return!0;return!1}(t,e.svgInvalidAncestorsRegEx)}));if(!f||f&&!f.length)i&&i([],{});else{var p={};c.filter((function(t){return"clipPath"===t.nodeName.replace("svg:","")})).forEach((function(t){var i=t.getAttribute("id");p[i]=e.util.toArray(t.getElementsByTagName("*")).filter((function(t){return e.svgValidTagNamesRegEx.test(t.nodeName.replace("svg:",""))}))})),e.gradientDefs[l]=e.getGradientDefs(t),e.cssRules[l]=e.getCSSRules(t),e.clipPaths[l]=p,e.parseElements(f,(function(t,n){i&&(i(t,h,n,c),delete e.gradientDefs[l],delete e.cssRules[l],delete e.clipPaths[l])}),n(h),r,s)}}};var _=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+e.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+e.reNum+"))?\\s+(.*)");i(e,{parseFontDeclaration:function(t,e){var i=t.match(_);if(i){var n=i[1],r=i[3],o=i[4],a=i[5],l=i[6];n&&(e.fontStyle=n),r&&(e.fontWeight=isNaN(parseFloat(r))?r:parseFloat(r)),o&&(e.fontSize=s(o)),l&&(e.fontFamily=l),a&&(e.lineHeight="normal"===a?1:a)}},getGradientDefs:function(t){var e,i=d(t,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),n=0,r={};for(n=i.length;n--;)(e=i[n]).getAttribute("xlink:href")&&y(t,e),r[e.getAttribute("id")]=e;return r},parseAttributes:function(t,n,o){if(t){var a,u,d,p={};void 0===o&&(o=t.getAttribute("svgUid")),t.parentNode&&e.svgValidParentsRegEx.test(t.parentNode.nodeName)&&(p=e.parseAttributes(t.parentNode,n,o));var g=n.reduce((function(e,i){return(a=t.getAttribute(i))&&(e[i]=a),e}),{}),m=i(function(t,i){var n={};for(var r in e.cssRules[i])if(f(t,r.split(" ")))for(var s in e.cssRules[i][r])n[s]=e.cssRules[i][r][s];return n}(t,o),e.parseStyleAttribute(t));g=i(g,m),m["clip-path"]&&t.setAttribute("clip-path",m["clip-path"]),u=d=p.fontSize||e.Text.DEFAULT_SVG_FONT_SIZE,g["font-size"]&&(g["font-size"]=u=s(g["font-size"],d));var v,y,_={};for(var A in g)y=c(v=h(A),g[A],p,u),_[v]=y;_&&_.font&&e.parseFontDeclaration(_.font,_);var b=i(p,_);return e.svgValidParentsRegEx.test(t.nodeName)?b:function(t){for(var i in l)if(void 0!==t[l[i]]&&""!==t[i]){if(void 0===t[i]){if(!e.Object.prototype[i])continue;t[i]=e.Object.prototype[i]}if(0!==t[i].indexOf("url(")){var n=new e.Color(t[i]);t[i]=n.setAlpha(r(n.getAlpha()*t[l[i]],2)).toRgba()}}return t}(b)}},parseElements:function(t,i,n,r,s){new e.ElementsParser(t,i,n,r,s).parse()},parseStyleAttribute:function(t){var e={},i=t.getAttribute("style");return i?("string"==typeof i?function(t,e){var i,n;t.replace(/;\s*$/,"").split(";").forEach((function(t){var r=t.split(":");i=r[0].trim().toLowerCase(),n=r[1].trim(),e[i]=n}))}(i,e):function(t,e){var i,n;for(var r in t)void 0!==t[r]&&(i=r.toLowerCase(),n=t[r],e[i]=n)}(i,e),e):e},parsePointsAttribute:function(t){if(!t)return null;var e,i,n=[];for(e=0,i=(t=(t=t.replace(/,/g," ").trim()).split(/\s+/)).length;e<i;e+=2)n.push({x:parseFloat(t[e]),y:parseFloat(t[e+1])});return n},getCSSRules:function(t){var i,n,r=t.getElementsByTagName("style"),s={};for(i=0,n=r.length;i<n;i++){var o=r[i].textContent||"";""!==(o=o.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&o.match(/[^{]*\{[\s\S]*?\}/g).map((function(t){return t.trim()})).forEach((function(t){var r=t.match(/([\s\S]*?)\s*\{([^}]*)\}/),o={},a=r[2].trim().replace(/;$/,"").split(/\s*;\s*/);for(i=0,n=a.length;i<n;i++){var l=a[i].split(/\s*:\s*/),h=l[0],c=l[1];o[h]=c}(t=r[1]).split(",").forEach((function(t){""!==(t=t.replace(/^svg/i,"").trim())&&(s[t]?e.util.object.extend(s[t],o):s[t]=e.util.object.clone(o))}))}))}return s},loadSVGFromURL:function(t,i,n,r){t=t.replace(/^\n\s*/,"").trim(),new e.util.request(t,{method:"get",onComplete:function(t){var s=t.responseXML;s&&!s.documentElement&&e.window.ActiveXObject&&t.responseText&&((s=new ActiveXObject("Microsoft.XMLDOM")).async="false",s.loadXML(t.responseText.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,"")));if(!s||!s.documentElement)return i&&i(null),!1;e.parseSVGDocument(s.documentElement,(function(t,e,n,r){i&&i(t,e,n,r)}),n,r)}})},loadSVGFromString:function(t,i,n,r){var s;if(t=t.trim(),void 0!==e.window.DOMParser){var o=new e.window.DOMParser;o&&o.parseFromString&&(s=o.parseFromString(t,"text/xml"))}else e.window.ActiveXObject&&((s=new ActiveXObject("Microsoft.XMLDOM")).async="false",s.loadXML(t.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,"")));e.parseSVGDocument(s.documentElement,(function(t,e,n,r){i(t,e,n,r)}),n,r)}})}(e),S.ElementsParser=function(t,e,i,n,r,s){this.elements=t,this.callback=e,this.options=i,this.reviver=n,this.svgUid=i&&i.svgUid||0,this.parsingOptions=r,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=s},(g=S.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},g.createObjects=function(){var t=this;this.elements.forEach((function(e,i){e.setAttribute("svgUid",t.svgUid),t.createObject(e,i)}))},g.findTag=function(t){return S[S.util.string.capitalize(t.tagName.replace("svg:",""))]},g.createObject=function(t,e){var i=this.findTag(t);if(i&&i.fromElement)try{i.fromElement(t,this.createCallback(e,t),this.options)}catch(t){S.log(t)}else this.checkIfDone()},g.createCallback=function(t,e){var i=this;return function(n){var r;i.resolveGradient(n,e,"fill"),i.resolveGradient(n,e,"stroke"),n instanceof S.Image&&n._originalElement&&(r=n.parsePreserveAspectRatioAttribute(e)),n._removeTransformMatrix(r),i.resolveClipPath(n,e),i.reviver&&i.reviver(e,n),i.instances[t]=n,i.checkIfDone()}},g.extractPropertyDefinition=function(t,e,i){var n=t[e],r=this.regexUrl;if(r.test(n)){r.lastIndex=0;var s=r.exec(n)[1];return r.lastIndex=0,S[i][this.svgUid][s]}},g.resolveGradient=function(t,e,i){var n=this.extractPropertyDefinition(t,i,"gradientDefs");if(n){var r=e.getAttribute(i+"-opacity"),s=S.Gradient.fromElement(n,t,r,this.options);t.set(i,s)}},g.createClipPathCallback=function(t,e){return function(t){t._removeTransformMatrix(),t.fillRule=t.clipRule,e.push(t)}},g.resolveClipPath=function(t,e){var i,n,r,s,o=this.extractPropertyDefinition(t,"clipPath","clipPaths");if(o){r=[],n=S.util.invertTransform(t.calcTransformMatrix());for(var a=o[0].parentNode,l=e;l.parentNode&&l.getAttribute("clip-path")!==t.clipPath;)l=l.parentNode;l.parentNode.appendChild(a);for(var h=0;h<o.length;h++)i=o[h],this.findTag(i).fromElement(i,this.createClipPathCallback(t,r),this.options);o=1===r.length?r[0]:new S.Group(r),s=S.util.multiplyTransformMatrices(n,o.calcTransformMatrix()),o.clipPath&&this.resolveClipPath(o,l);var c=S.util.qrDecompose(s);o.flipX=!1,o.flipY=!1,o.set("scaleX",c.scaleX),o.set("scaleY",c.scaleY),o.angle=c.angle,o.skewX=c.skewX,o.skewY=0,o.setPositionByOrigin({x:c.translateX,y:c.translateY},"center","center"),t.clipPath=o}else delete t.clipPath},g.checkIfDone=function(){0==--this.numElements&&(this.instances=this.instances.filter((function(t){return null!=t})),this.callback(this.instances,this.elements))},function(t){"use strict";var e=t.fabric||(t.fabric={});function i(t,e){this.x=t,this.y=e}e.Point?e.warn("fabric.Point is already defined"):(e.Point=i,i.prototype={type:"point",constructor:i,add:function(t){return new i(this.x+t.x,this.y+t.y)},addEquals:function(t){return this.x+=t.x,this.y+=t.y,this},scalarAdd:function(t){return new i(this.x+t,this.y+t)},scalarAddEquals:function(t){return this.x+=t,this.y+=t,this},subtract:function(t){return new i(this.x-t.x,this.y-t.y)},subtractEquals:function(t){return this.x-=t.x,this.y-=t.y,this},scalarSubtract:function(t){return new i(this.x-t,this.y-t)},scalarSubtractEquals:function(t){return this.x-=t,this.y-=t,this},multiply:function(t){return new i(this.x*t,this.y*t)},multiplyEquals:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return new i(this.x/t,this.y/t)},divideEquals:function(t){return this.x/=t,this.y/=t,this},eq:function(t){return this.x===t.x&&this.y===t.y},lt:function(t){return this.x<t.x&&this.y<t.y},lte:function(t){return this.x<=t.x&&this.y<=t.y},gt:function(t){return this.x>t.x&&this.y>t.y},gte:function(t){return this.x>=t.x&&this.y>=t.y},lerp:function(t,e){return void 0===e&&(e=.5),e=Math.max(Math.min(1,e),0),new i(this.x+(t.x-this.x)*e,this.y+(t.y-this.y)*e)},distanceFrom:function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},midPointFrom:function(t){return this.lerp(t)},min:function(t){return new i(Math.min(this.x,t.x),Math.min(this.y,t.y))},max:function(t){return new i(Math.max(this.x,t.x),Math.max(this.y,t.y))},toString:function(){return this.x+","+this.y},setXY:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setFromPoint:function(t){return this.x=t.x,this.y=t.y,this},swap:function(t){var e=this.x,i=this.y;this.x=t.x,this.y=t.y,t.x=e,t.y=i},clone:function(){return new i(this.x,this.y)}})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});function i(t){this.status=t,this.points=[]}e.Intersection?e.warn("fabric.Intersection is already defined"):(e.Intersection=i,e.Intersection.prototype={constructor:i,appendPoint:function(t){return this.points.push(t),this},appendPoints:function(t){return this.points=this.points.concat(t),this}},e.Intersection.intersectLineLine=function(t,n,r,s){var o,a=(s.x-r.x)*(t.y-r.y)-(s.y-r.y)*(t.x-r.x),l=(n.x-t.x)*(t.y-r.y)-(n.y-t.y)*(t.x-r.x),h=(s.y-r.y)*(n.x-t.x)-(s.x-r.x)*(n.y-t.y);if(0!==h){var c=a/h,u=l/h;0<=c&&c<=1&&0<=u&&u<=1?(o=new i("Intersection")).appendPoint(new e.Point(t.x+c*(n.x-t.x),t.y+c*(n.y-t.y))):o=new i}else o=new i(0===a||0===l?"Coincident":"Parallel");return o},e.Intersection.intersectLinePolygon=function(t,e,n){var r,s,o,a,l=new i,h=n.length;for(a=0;a<h;a++)r=n[a],s=n[(a+1)%h],o=i.intersectLineLine(t,e,r,s),l.appendPoints(o.points);return l.points.length>0&&(l.status="Intersection"),l},e.Intersection.intersectPolygonPolygon=function(t,e){var n,r=new i,s=t.length;for(n=0;n<s;n++){var o=t[n],a=t[(n+1)%s],l=i.intersectLinePolygon(o,a,e);r.appendPoints(l.points)}return r.points.length>0&&(r.status="Intersection"),r},e.Intersection.intersectPolygonRectangle=function(t,n,r){var s=n.min(r),o=n.max(r),a=new e.Point(o.x,s.y),l=new e.Point(s.x,o.y),h=i.intersectLinePolygon(s,a,t),c=i.intersectLinePolygon(a,o,t),u=i.intersectLinePolygon(o,l,t),d=i.intersectLinePolygon(l,s,t),f=new i;return f.appendPoints(h.points),f.appendPoints(c.points),f.appendPoints(u.points),f.appendPoints(d.points),f.points.length>0&&(f.status="Intersection"),f})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});function i(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}function n(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}e.Color?e.warn("fabric.Color is already defined."):(e.Color=i,e.Color.prototype={_tryParsingColor:function(t){var e;t in i.colorNameMap&&(t=i.colorNameMap[t]),"transparent"===t&&(e=[255,255,255,0]),e||(e=i.sourceFromHex(t)),e||(e=i.sourceFromRgb(t)),e||(e=i.sourceFromHsl(t)),e||(e=[0,0,0,1]),e&&this.setSource(e)},_rgbToHsl:function(t,i,n){t/=255,i/=255,n/=255;var r,s,o,a=e.util.array.max([t,i,n]),l=e.util.array.min([t,i,n]);if(o=(a+l)/2,a===l)r=s=0;else{var h=a-l;switch(s=o>.5?h/(2-a-l):h/(a+l),a){case t:r=(i-n)/h+(i<n?6:0);break;case i:r=(n-t)/h+2;break;case n:r=(t-i)/h+4}r/=6}return[Math.round(360*r),Math.round(100*s),Math.round(100*o)]},getSource:function(){return this._source},setSource:function(t){this._source=t},toRgb:function(){var t=this.getSource();return"rgb("+t[0]+","+t[1]+","+t[2]+")"},toRgba:function(){var t=this.getSource();return"rgba("+t[0]+","+t[1]+","+t[2]+","+t[3]+")"},toHsl:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsl("+e[0]+","+e[1]+"%,"+e[2]+"%)"},toHsla:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsla("+e[0]+","+e[1]+"%,"+e[2]+"%,"+t[3]+")"},toHex:function(){var t,e,i,n=this.getSource();return t=1===(t=n[0].toString(16)).length?"0"+t:t,e=1===(e=n[1].toString(16)).length?"0"+e:e,i=1===(i=n[2].toString(16)).length?"0"+i:i,t.toUpperCase()+e.toUpperCase()+i.toUpperCase()},toHexa:function(){var t,e=this.getSource();return t=1===(t=(t=Math.round(255*e[3])).toString(16)).length?"0"+t:t,this.toHex()+t.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(t){var e=this.getSource();return e[3]=t,this.setSource(e),this},toGrayscale:function(){var t=this.getSource(),e=parseInt((.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),10),i=t[3];return this.setSource([e,e,e,i]),this},toBlackWhite:function(t){var e=this.getSource(),i=(.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),n=e[3];return t=t||127,i=Number(i)<Number(t)?0:255,this.setSource([i,i,i,n]),this},overlayWith:function(t){t instanceof i||(t=new i(t));var e,n=[],r=this.getAlpha(),s=this.getSource(),o=t.getSource();for(e=0;e<3;e++)n.push(Math.round(.5*s[e]+.5*o[e]));return n[3]=r,this.setSource(n),this}},e.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,e.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,e.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,e.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA5
35D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},e.Color.fromRgb=function(t){return i.fromSource(i.sourceFromRgb(t))},e.Color.sourceFromRgb=function(t){var e=t.match(i.reRGBa);if(e){var n=parseInt(e[1],10)/(/%$/.test(e[1])?100:1)*(/%$/.test(e[1])?255:1),r=parseInt(e[2],10)/(/%$/.test(e[2])?100:1)*(/%$/.test(e[2])?255:1),s=parseInt(e[3],10)/(/%$/.test(e[3])?100:1)*(/%$/.test(e[3])?255:1);return[parseInt(n,10),parseInt(r,10),parseInt(s,10),e[4]?parseFloat(e[4]):1]}},e.Color.fromRgba=i.fromRgb,e.Color.fromHsl=function(t){return i.fromSource(i.sourceFromHsl(t))},e.Color.sourceFromHsl=function(t){var e=t.match(i.reHSLa);if(e){var r,s,o,a=(parseFloat(e[1])%360+360)%360/360,l=parseFloat(e[2])/(/%$/.test(e[2])?100:1),h=parseFloat(e[3])/(/%$/.test(e[3])?100:1);if(0===l)r=s=o=h;else{var c=h<=.5?h*(l+1):h+l-h*l,u=2*h-c;r=n(u,c,a+1/3),s=n(u,c,a),o=n(u,c,a-1/3)}return[Math.round(255*r),Math.round(255*s),Math.round(255*o),e[4]?parseFloat(e[4]):1]}},e.Color.fromHsla=i.fromHsl,e.Color.fromHex=function(t){return i.fromSource(i.sourceFromHex(t))},e.Color.sourceFromHex=function(t){if(t.match(i.reHex)){var e=t.slice(t.indexOf("#")+1),n=3===e.length||4===e.length,r=8===e.length||4===e.length,s=n?e.charAt(0)+e.charAt(0):e.substring(0,2),o=n?e.charAt(1)+e.charAt(1):e.substring(2,4),a=n?e.charAt(2)+e.charAt(2):e.substring(4,6),l=r?n?e.charAt(3)+e.charAt(3):e.substring(6,8):"FF";return[parseInt(s,16),parseInt(o,16),parseInt(a,16),parseFloat((parseInt(l,16)/255).toFixed(2))]}},e.Color.fromSource=function(t){var e=new i;return e.setSource(t),e})}(e),function(){function t(t,e){var i,n,r,s,o=t.getAttribute("style"),a=t.getAttribute("offset")||0;if(a=(a=parseFloat(a)/(/%$/.test(a)?100:1))<0?0:a>1?1:a,o){var l=o.split(/\s*;\s*/);for(""===l[l.length-1]&&l.pop(),s=l.length;s--;){var h=l[s].split(/\s*:\s*/),c=h[0].trim(),u=h[1].trim();"stop-color"===c?i=u:"stop-opacity"===c&&(r=u)}}return i||(i=t.getAttribute("stop-color")||"rgb(0,0,0)"),r||(r=t.getAttribute("stop-opacity")),n=(i=new S.Color(i)).getAlpha(),r=isNaN(parseFloat(r))?1:parseFloat(r),r*=n*e,{offset:a,color:i.toRgb(),opacity:r}}var e=S.util.object.clone;function i(t,e,i,n){var r,s;Object.keys(e).forEach((function(t){"Infinity"===(r=e[t])?s=1:"-Infinity"===r?s=0:(s=parseFloat(e[t],10),"string"==typeof r&&/^(\d+\.\d+)%|(\d+)%$/.test(r)&&(s*=.01,"pixels"===n&&("x1"!==t&&"x2"!==t&&"r2"!==t||(s*=i.viewBoxWidth||i.width),"y1"!==t&&"y2"!==t||(s*=i.viewBoxHeight||i.height)))),e[t]=s}))}S.Gradient=S.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(t){t||(t={}),t.coords||(t.coords={});var e,i=this;Object.keys(t).forEach((function(e){i[e]=t[e]})),this.id?this.id+="_"+S.Object.__uid++:this.id=S.Object.__uid++,e={x1:t.coords.x1||0,y1:t.coords.y1||0,x2:t.coords.x2||0,y2:t.coords.y2||0},"radial"===this.type&&(e.r1=t.coords.r1||0,e.r2=t.coords.r2||0),this.coords=e,this.colorStops=t.colorStops.slice()},addColorStop:function(t){for(var e in t){var i=new S.Color(t[e]);this.colorStops.push({offset:parseFloat(e),color:i.toRgb(),opacity:i.getAlpha()})}return this}
vendor: 37,225 bytes, line 3
3,toObject:function(t){var e={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return S.util.populateWithProperties(this,e,t),e},toSVG:function(t,i){var n,r,s,o,a=e(this.coords,!0),l=(i=i||{},e(this.colorStops,!0)),h=a.r1>a.r2,c=this.gradientTransform?this.gradientTransform.concat():S.iMatrix.concat(),u=-this.offsetX,d=-this.offsetY,f=!!i.additionalTransform,p="pixels"===this.gradientUnits?"userSpaceOnUse":"objectBoundingBox";if(l.sort((function(t,e){return t.offset-e.offset})),"objectBoundingBox"===p?(u/=t.width,d/=t.height):(u+=t.width/2,d+=t.height/2),"path"===t.type&&(u-=t.pathOffset.x,d-=t.pathOffset.y),c[4]-=u,c[5]-=d,o='id="SVGID_'+this.id+'" gradientUnits="'+p+'"',o+=' gradientTransform="'+(f?i.additionalTransform+" ":"")+S.util.matrixToSVG(c)+'" ',"linear"===this.type?s=["<linearGradient ",o,' x1="',a.x1,'" y1="',a.y1,'" x2="',a.x2,'" y2="',a.y2,'">\n']:"radial"===this.type&&(s=["<radialGradient ",o,' cx="',h?a.x1:a.x2,'" cy="',h?a.y1:a.y2,'" r="',h?a.r1:a.r2,'" fx="',h?a.x2:a.x1,'" fy="',h?a.y2:a.y1,'">\n']),"radial"===this.type){if(h)for((l=l.concat()).reverse(),n=0,r=l.length;n<r;n++)l[n].offset=1-l[n].offset;var g=Math.min(a.r1,a.r2);if(g>0){var m=g/Math.max(a.r1,a.r2);for(n=0,r=l.length;n<r;n++)l[n].offset+=m*(1-l[n].offset)}}for(n=0,r=l.length;n<r;n++){var v=l[n];s.push("<stop ",'offset="',100*v.offset+"%",'" style="stop-color:',v.color,void 0!==v.opacity?";stop-opacity: "+v.opacity:";",'"/>\n')}return s.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),s.join("")},toLive:function(t,e){var i,n,r,s=S.util.object.clone(this.coords),o=s.x1,a=s.y1,l=s.x2,h=s.y2,c=this.colorStops;if(this.type){for(e instanceof S.Text&&"percentage"===this.gradientUnits&&(o*=e.width,a*=e.height,l*=e.width,h*=e.height),"linear"===this.type?i=t.createLinearGradient(o,a,l,h):"radial"===this.type&&(i=t.createRadialGradient(o,a,s.r1,l,h,s.r2)),n=0,r=c.length;n<r;n++){var u=c[n].color,d=c[n].opacity,f=c[n].offset;void 0!==d&&(u=new S.Color(u).setAlpha(d).toRgba()),i.addColorStop(f,u)}return i}}}),S.util.object.extend(S.Gradient,{fromElement:function(e,n,r,s){var o=parseFloat(r)/(/%$/.test(r)?100:1);o=o<0?0:o>1?1:o,isNaN(o)&&(o=1);var a,l,h,c,u=e.getElementsByTagName("stop"),d="userSpaceOnUse"===e.getAttribute("gradientUnits")?"pixels":"percentage",f=e.getAttribute("gradientTransform")||"",p=[],g=0,m=0;for("linearGradient"===e.nodeName||"LINEARGRADIENT"===e.nodeName?(a="linear",l=function(t){return{x1:t.getAttribute("x1")||0,y1:t.getAttribute("y1")||0,x2:t.getAttribute("x2")||"100%",y2:t.getAttribute("y2")||0}}(e)):(a="radial",l=function(t){return{x1:t.getAttribute("fx")||t.getAttribute("cx")||"50%",y1:t.getAttribute("fy")||t.getAttribute("cy")||"50%",r1:0,x2:t.getAttribute("cx")||"50%",y2:t.getAttribute("cy")||"50%",r2:t.getAttribute("r")||"50%"}}(e)),h=u.length;h--;)p.push(t(u[h],o));return c=S.parseTransformAttribute(f),i(n,l,s,d),"pixels"===d&&(g=-n.left,m=-n.top),new S.Gradient({id:e.getAttribute("id"),type:a,coords:l,colorStops:p,gradientUnits:d,gradientTransform:c,offsetX:g,offsetY:m})},forObject:function(t,e){return e||(e={}),i(t,e.coords,e.gradientUnits,{viewBoxWidth:100,viewBoxHeight:100}),new S.Gradient(e)}})}(),function(){"use strict";var t=S.util.toFixed;S.Pattern=S.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(t,e){if(t||(t={}),this.id=S.Object.__uid++,this.setOptions(t),!t.source||t.source&&"string"!=typeof t.source)e&&e(this);else if(void 0!==S.util.getFunctionBody(t.source))this.source=new Function(S.util.getFunctionBody(t.source)),e&&e(this);else{var i=this;this.source=S.util.createImage(),S.util.loadImage(t.source,(function(t){i.source=t,e&&e(i)}),null,this.crossOrigin)}},toObject:function(e){var i,n,r=S.Object.NUM_FRACTION_DIGITS;return"function"==typeof this.source?i=String(this.source):"string"==typeof this.source.src?i=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(i=this.source.toDataURL()),n={type:"pattern",source:i,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:t(this.offsetX,r),offsetY:t(this.offsetY,r),patternTransform:this.patternTransform?this.patternTransform.concat():null},S.util.populateWithProperties(this,n,e),n},toSVG:function(t){var e="function"==typeof this.source?this.source():this.source,i=e.width/t.width,n=e.height/t.height,r=this.offsetX/t.width,s=this.offsetY/t.height,o="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,s&&(n+=Math.abs(s))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(i=1,r&&(i+=Math.abs(r))),e.src?o=e.src:e.toDataURL&&(o=e.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+r+'" y="'+s+'" width="'+i+'" height="'+n+'">\n<image x="0" y="0" width="'+e.width+'" height="'+e.height+'" xlink:href="'+o+'"></image>\n</pattern>\n'},setOptions:function(t){for(var e in t)this[e]=t[e]},toLive:function(t){var e="function"==typeof this.source?this.source():this.source;if(!e)return"";if(void 0!==e.src){if(!e.complete)return"";if(0===e.naturalWidth||0===e.naturalHeight)return""}return t.createPattern(e,this.repeat)}})}(),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.toFixed;e.Shadow?e.warn("fabric.Shadow is already defined."):(e.Shadow=e.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(t){for(var i in"string"==typeof t&&(t=this._parseShadow(t)),t)this[i]=t[i];this.id=e.Object.__uid++},_parseShadow:function(t){var i=t.trim(),n=e.Shadow.reOffsetsAndBlur.exec(i)||[];return{color:(i.replace(e.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseInt(n[1],10)||0,offsetY:parseInt(n[2],10)||0,blur:parseInt(n[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(t){var n=40,r=40,s=e.Object.NUM_FRACTION_DIGITS,o=e.util.rotateVector({x:this.offsetX,y:this.offsetY},e.util.degreesToRadians(-t.angle)),a=new e.Color(this.color);return t.width&&t.height&&(n=100*i((Math.abs(o.x)+this.blur)/t.width,s)+20,r=100*i((Math.abs(o.y)+this.blur)/t.height,s)+20),t.flipX&&(o.x*=-1),t.flipY&&(o.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+r+'%" height="'+(100+2*r)+'%" x="-'+n+'%" width="'+(100+2*n)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+i(this.blur?this.blur/2:0,s)+'"></feGaussianBlur>\n\t<feOffset dx="'+i(o.x,s)+'" dy="'+i(o.y,s)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+a.toRgb()+'" flood-opacity="'+a.getAlpha()+'"/>\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var t={},i=e.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach((function(e){this[e]!==i[e]&&(t[e]=this[e])}),this),t}}),e.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/)}(e),function(){"use strict";if(S.StaticCanvas)S.warn("fabric.StaticCanvas is already defined.");else{var t=S.util.object.extend,e=S.util.getElementOffset,i=S.util.removeFromArray,n=S.util.toFixed,r=S.util.transformPoint,s=S.util.invertTransform,o=S.util.getNodeCanvas,a=S.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");S.StaticCanvas=S.util.createClass(S.CommonMethods,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(t,e)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,clipTo:null,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:S.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,onBeforeScaleRotate:function(){},enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(t,e){var i=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(t),this._initOptions(e),this._setImageSmoothing(),this.interactive||this._initRetinaScaling(),e.overlayImage&&this.setOverlayImage(e.overlayImage,i),e.backgroundImage&&this.setBackgroundImage(e.backgroundImage,i),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor,i),e.overlayColor&&this.setOverlayColor(e.overlayColor,i),this.calcOffset()},_isRetinaScaling:function(){return 1!==S.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?S.devicePixelRatio:1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var t=S.devicePixelRatio;this.__initRetinaScaling(t,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(t,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(t,e,i){e.setAttribute("width",this.width*t),e.setAttribute("height",this.height*t),i.scale(t,t)},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(t,e,i){return this.__setBgOverlayImage("overlayImage",t,e,i)},setBackgroundImage:function(t,e,i){return this.__setBgOverlayImage("backgroundImage",t,e,i)},setOverlayColor:function(t,e){return this.__setBgOverlayColor("overlayColor",t,e)},setBackgroundColor:function(t,e){return this.__setBgOverlayColor("backgroundColor",t,e)},_setImageSmoothing:function(){var t=this.getContext();t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=this.imageSmoothingEnabled},__setBgOverlayImage:function(t,e,i,n){return"string"==typeof e?S.util.loadImage(e,(function(e){if(e){var r=new S.Image(e,n);this[t]=r,r.canvas=this}i&&i(e)}),this,n&&n.crossOrigin):(n&&e.setOptions(n),this[t]=e,e&&(e.canvas=this),i&&i(e)),this},__setBgOverlayColor:function(t,e,i){return this[t]=e,this._initGradient(e,t),this._initPattern(e,t,i),this},_createCanvasElement:function(){var t=a();if(!t)throw l;if(t.style||(t.style={}),void 0===t.getContext)throw l;return t},_initOptions:function(t){var e=this.lowerCanvasEl;this._setOptions(t),this.width=this.width||parseInt(e.width,10)||0,this.height=this.height||parseInt(e.height,10)||0,this.lowerCanvasEl.style&&(e.width=this.width,e.height=this.height,e.style.width=this.width+"px",e.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(t){t&&t.getContext?this.lowerCanvasEl=t:this.lowerCanvasEl=S.util.getById(t)||this._createCanvasElement(),S.util.addClass(this.lowerCanvasEl,"lower-canvas"),this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(t,e){return this.setDimensions({width:t},e)},setHeight:function(t,e){return this.setDimensions({height:t},e)},setDimensions:function(t,e){var i;for(var n in e=e||{},t)i=t[n],e.cssOnly||(this._setBackstoreDimension(n,t[n]),i+="px",this.hasLostContext=!0),e.backstoreOnly||this._setCssDimension(n,i);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(),this._initRetinaScaling(),this._setImageSmoothing(),this.calcOffset(),e.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(t,e){return this.lowerCanvasEl[t]=e,this.upperCanvasEl&&(this.upperCanvasEl[t]=e),this.cacheCanvasEl&&(this.cacheCanvasEl[t]=e),this[t]=e,this},_setCssDimension:function(t,e){return this.lowerCanvasEl.style[t]=e,this.upperCanvasEl&&(this.upperCanvasEl.style[t]=e),this.wrapperEl&&(this.wrapperEl.style[t]=e),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(t){var e,i,n,r=this._activeObject;for(this.viewportTransform=t,i=0,n=this._objects.length;i<n;i++)(e=this._objects[i]).group||e.setCoords(!1,!0);return r&&"activeSelection"===r.type&&r.setCoords(!1,!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(t,e){var i=t,n=this.viewportTransform.slice(0);t=r(t,s(this.viewportTransform)),n[0]=e,n[3]=e;var o=r(t,n);return n[4]+=i.x-o.x,n[5]+=i.y-o.y,this.setViewportTransform(n)},setZoom:function(t){return this.zoomToPoint(new S.Point(0,0),t),this},absolutePan:function(t){var e=this.viewportTransform.slice(0);return e[4]=-t.x,e[5]=-t.y,this.setViewportTransform(e)},relativePan:function(t){return this.absolutePan(new S.Point(-t.x-this.viewportTransform[4],-t.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},_onObjectAdded:function(t){this.stateful&&t.setupState(),t._set("canvas",this),t.setCoords(),this.fire("object:added",{target:t}),t.fire("added")},_onObjectRemoved:function(t){this.fire("object:removed",{target:t}),t.fire("removed"),delete t.canvas},clearContext:function(t){return t.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this._objects.length=0,this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},renderAll:function(){var t=this.contextContainer;return this.renderCanvas(t,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=S.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var t={},e=this.width,i=this.height,n=s(this.viewportTransform);return t.tl=r({x:0,y:0},n),t.br=r({x:e,y:i},n),t.tr=new S.Point(t.br.x,t.tl.y),t.bl=new S.Point(t.tl.x,t.br.y),this.vptCoords=t,t},cancelRequestedRender:function(){this.isRendering&&(S.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},renderCanvas:function(t,e){var i=this.viewportTransform,n=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(t),this.fire("before:render",{ctx:t}),this.clipTo&&S.util.clipContext(this,t),this._renderBackground(t),t.save(),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this._renderObjects(t,e),t.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.clipTo&&t.restore(),n&&(n.canvas=this,n.shouldCache(),n._transformDone=!0,n.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(t)),this._renderOverlay(t),this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.fire("after:render",{ctx:t})},drawClipPathOnCanvas:function(t){var e=this.viewportTransform,i=this.clipPath;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t.globalCompositeOperation="destination-in",i.transform(t),t.scale(1/i.zoomX,1/i.zoomY),t.drawImage(i._cacheCanvas,-i.cacheTranslationX,-i.cacheTranslationY),t.restore()},_renderObjects:function(t,e){var i,n;for(i=0,n=e.length;i<n;++i)e[i]&&e[i].render(t)},_renderBackgroundOrOverlay:function(t,e){var i=this[e+"Color"],n=this[e+"Image"],r=this.viewportTransform,s=this[e+"Vpt"];if(i||n){if(i){t.save(),t.beginPath(),t.moveTo(0,0),t.lineTo(this.width,0),t.lineTo(this.width,this.height),t.lineTo(0,this.height),t.closePath(),t.fillStyle=i.toLive?i.toLive(t,this):i,s&&t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),t.transform(1,0,0,1,i.offsetX||0,i.offsetY||0);var o=i.gradientTransform||i.patternTransform;o&&t.transform(o[0],o[1],o[2],o[3],o[4],o[5]),t.fill(),t.restore()}n&&(t.save(),s&&t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),n.render(t),t.restore())}},_renderBackground:function(t){this._renderBackgroundOrOverlay(t,"background")},_renderOverlay:function(t){this._renderBackgroundOrOverlay(t,"overlay")},getCenter:function(){return{top:this.height/2,left:this.width/2}},centerObjectH:function(t){return this._centerObject(t,new S.Point(this.getCenter().left,t.getCenterPoint().y))},centerObjectV:function(t){return this._centerObject(t,new S.Point(t.getCenterPoint().x,this.getCenter().top))},centerObject:function(t){var e=this.getCenter();return this._centerObject(t,new S.Point(e.left,e.top))},viewportCenterObject:function(t){var e=this.getVpCenter();return this._centerObject(t,e)},viewportCenterObjectH:function(t){var e=this.getVpCenter();return this._centerObject(t,new S.Point(e.x,t.getCenterPoint().y)),this},viewportCenterObjectV:function(t){var e=this.getVpCenter();return this._centerObject(t,new S.Point(t.getCenterPoint().x,e.y))},getVpCenter:function(){var t=this.getCenter(),e=s(this.viewportTransform);return r({x:t.left,y:t.top},e)},_centerObject:function(t,e){return t.setPositionByOrigin(e,"center","center"),t.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},toDatalessJSON:function(t){return this.toDatalessObject(t)},toObject:function(t){return this._toObjectMethod("toObject",t)},toDatalessObject:function(t){return this._toObjectMethod("toDatalessObject",t)},_toObjectMethod:function(e,i){var n=this.clipPath,r={version:S.version,objects:this._toObjects(e,i)};return n&&(r.clipPath=this._toObject(this.clipPath,e,i)),t(r,this.__serializeBgOverlay(e,i)),S.util.populateWithProperties(this,r,i),r},_toObjects:function(t,e){return this._objects.filter((function(t){return!t.excludeFromExport})).map((function(i){return this._toObject(i,t,e)}),this)},_toObject:function(t,e,i){var n;this.includeDefaultValues||(n=t.includeDefaultValues,t.includeDefaultValues=!1);var r=t[e](i);return this.includeDefaultValues||(t.includeDefaultValues=n),r},__serializeBgOverlay:function(t,e){var i={},n=this.backgroundImage,r=this.overlayImage;return this.backgroundColor&&(i.background=this.backgroundColor.toObject?this.backgroundColor.toObject(e):this.backgroundColor),this.overlayColor&&(i.overlay=this.overlayColor.toObject?this.overlayColor.toObject(e):this.overlayColor),n&&!n.excludeFromExport&&(i.backgroundImage=this._toObject(n,t,e)),r&&!r.excludeFromExport&&(i.overlayImage=this._toObject(r,t,e)),i},svgViewportTransformation:!0,toSVG:function(t,e){t||(t={}),t.reviver=e;var i=[];return this._setSVGPreamble(i,t),this._setSVGHeader(i,t),this.clipPath&&i.push('<g clip-path="url(#'+this.clipPath.clipPathId+')" >\n'),this._setSVGBgOverlayColor(i,"background"),this._setSVGBgOverlayImage(i,"backgroundImage",e),this._setSVGObjects(i,e),this.clipPath&&i.push("</g>\n"),this._setSVGBgOverlayColor(i,"overlay"),this._setSVGBgOverlayImage(i,"overlayImage",e),i.push("</svg>"),i.join("")},_setSVGPreamble:function(t,e){e.suppressPreamble||t.push('<?xml version="1.0" encoding="',e.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},_setSVGHeader:function(t,e){var i,r=e.width||this.width,s=e.height||this.height,o='viewBox="0 0 '+this.width+" "+this.height+'" ',a=S.Object.NUM_FRACTION_DIGITS;e.viewBox?o='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(i=this.viewportTransform,o='viewBox="'+n(-i[4]/i[0],a)+" "+n(-i[5]/i[3],a)+" "+n(this.width/i[0],a)+" "+n(this.height/i[3],a)+'" '),t.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',r,'" ','height="',s,'" ',o,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",S.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(e),"</defs>\n")},createSVGClipPathMarkup:function(t){var e=this.clipPath;return e?(e.clipPathId="CLIPPATH_"+S.Object.__uid++,'<clipPath id="'+e.clipPathId+'" >\n'+this.clipPath.toClipPathSVG(t.reviver)+"</clipPath>\n"):""},createSVGRefElementsMarkup:function(){var t=this;return["background","overlay"].map((function(e){var i=t[e+"Color"];if(i&&i.toLive){var n=t[e+"Vpt"],r=t.viewportTransform,s={width:t.width/(n?r[0]:1),height:t.height/(n?r[3]:1)};return i.toSVG(s,{additionalTransform:n?S.util.matrixToSVG(r):""})}})).join("")},createSVGFontFacesMarkup:function(){var t,e,i,n,r,s,o,a,l="",h={},c=S.fontPaths,u=[];for(this._objects.forEach((function t(e){u.push(e),e._objects&&e._objects.forEach(t)})),o=0,a=u.length;o<a;o++)if(e=(t=u[o]).fontFamily,-1!==t.type.indexOf("text")&&!h[e]&&c[e]&&(h[e]=!0,t.styles))for(r in i=t.styles)for(s in n=i[r])!h[e=n[s].fontFamily]&&c[e]&&(h[e]=!0);for(var d in h)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",d,"';\n","\t\t\tsrc: url('",c[d],"');\n","\t\t}\n"].join("");return l&&(l=['\t<style type="text/css">',"<![CDATA[\n",l,"]]>","</style>\n"].join("")),l},_setSVGObjects:function(t,e){var i,n,r,s=this._objects;for(n=0,r=s.length;n<r;n++)(i=s[n]).excludeFromExport||this._setSVGObject(t,i,e)},_setSVGObject:function(t,e,i){t.push(e.toSVG(i))},_setSVGBgOverlayImage:function(t,e,i){this[e]&&!this[e].excludeFromExport&&this[e].toSVG&&t.push(this[e].toSVG(i))},_setSVGBgOverlayColor:function(t,e){var i=this[e+"Color"],n=this.viewportTransform,r=this.width,s=this.height;if(i)if(i.toLive){var o=i.repeat,a=S.util.invertTransform(n),l=this[e+"Vpt"]?S.util.matrixToSVG(a):"";t.push('<rect transform="'+l+" translate(",r/2,",",s/2,')"',' x="',i.offsetX-r/2,'" y="',i.offsetY-s/2,'" ','width="',"repeat-y"===o||"no-repeat"===o?i.source.width:r,'" height="',"repeat-x"===o||"no-repeat"===o?i.source.height:s,'" fill="url(#SVGID_'+i.id+')"',"></rect>\n")}else t.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',i,'"',"></rect>\n")},sendToBack:function(t){if(!t)return this;var e,n,r,s=this._activeObject;if(t===s&&"activeSelection"===t.type)for(e=(r=s._objects).length;e--;)n=r[e],i(this._objects,n),this._objects.unshift(n);else i(this._objects,t),this._objects.unshift(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(t){if(!t)return this;var e,n,r,s=this._activeObject;if(t===s&&"activeSelection"===t.type)for(r=s._objects,e=0;e<r.length;e++)n=r[e],i(this._objects,n),this._objects.push(n);else i(this._objects,t),this._objects.push(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(t,e){if(!t)return this;var n,r,s,o,a,l=this._activeObject,h=0;if(t===l&&"activeSelection"===t.type)for(a=l._objects,n=0;n<a.length;n++)r=a[n],(s=this._objects.indexOf(r))>0+h&&(o=s-1,i(this._objects,r),this._objects.splice(o,0,r)),h++;else 0!==(s=this._objects.indexOf(t))&&(o=this._findNewLowerIndex(t,s,e),i(this._objects,t),this._objects.splice(o,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(t,e,i){var n,r;if(i)for(n=e,r=e-1;r>=0;--r){if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){n=r;break}}else n=e-1;return n},bringForward:function(t,e){if(!t)return this;var n,r,s,o,a,l=this._activeObject,h=0;if(t===l&&"activeSelection"===t.type)for(n=(a=l._objects).length;n--;)r=a[n],(s=this._objects.indexOf(r))<this._objects.length-1-h&&(o=s+1,i(this._objects,r),this._objects.splice(o,0,r)),h++;else(s=this._objects.indexOf(t))!==this._objects.length-1&&(o=this._findNewUpperIndex(t,s,e),i(this._objects,t),this._objects.splice(o,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(t,e,i){var n,r,s;if(i)for(n=e,r=e+1,s=this._objects.length;r<s;++r){if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){n=r;break}}else n=e+1;return n},moveTo:function(t,e){return i(this._objects,t),this._objects.splice(e,0,t),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.isRendering&&(S.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject((function(t){t.dispose&&t.dispose()})),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,S.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),t(S.StaticCanvas.prototype,S.Observable),t(S.StaticCanvas.prototype,S.Collection),t(S.StaticCanvas.prototype,S.DataURLExporter),t(S.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=a();if(!e||!e.getContext)return null;var i=e.getContext("2d");if(!i)return null;switch(t){case"setLineDash":return void 0!==i.setLineDash;default:return null}}}),S.StaticCanvas.prototype.toJSON=S.StaticCanvas.prototype.toObject,S.isLikelyNode&&(S.StaticCanvas.prototype.createPNGStream=function(){var t=o(this.lowerCanvasEl);return t&&t.createPNGStream()},S.StaticCanvas.prototype.createJPEGStream=function(t){var e=o(this.lowerCanvasEl);return e&&e.createJPEGStream(t)})}}(),S.BaseBrush=S.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,setShadow:function(t){return this.shadow=new S.Shadow(t),this},_setBrushStyles:function(){var t=this.canvas.contextTop;t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.miterLimit=this.strokeMiterLimit,t.lineJoin=this.strokeLineJoin,S.StaticCanvas.supports("setLineDash")&&t.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(t){var e=this.canvas.viewportTransform;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},_setShadow:function(){if(this.shadow){var t=this.canvas,e=this.shadow,i=t.contextTop,n=t.getZoom();t&&t._isRetinaScaling()&&(n*=S.devicePixelRatio),i.shadowColor=e.color,i.shadowBlur=e.blur*n,i.shadowOffsetX=e.offsetX*n,i.shadowOffsetY=e.offsetY*n}},needsFullRender:function(){return new S.Color(this.color).getAlpha()<1||!!this.shadow},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0}}),S.PencilBrush=S.util.createClass(S.BaseBrush,{decimate:.4,initialize:function(t){this.canvas=t,this._points=[]},_drawSegment:function(t,e,i){var n=e.midPointFrom(i);return t.quadraticCurveTo(e.x,e.y,n.x,n.y),n},onMouseDown:function(t,e){this.canvas._isMainEvent(e.e)&&(this._prepareForDrawing(t),this._captureDrawingPath(t),this._render())},onMouseMove:function(t,e){if(this.canvas._isMainEvent(e.e)&&this._captureDrawingPath(t)&&this._points.length>1)if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var i=this._points,n=i.length,r=this.canvas.contextTop;this._saveAndTransform(r),this.oldEnd&&(r.beginPath(),r.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(r,i[n-2],i[n-1],!0),r.stroke(),r.restore()}},onMouseUp:function(t){return!this.canvas._isMainEvent(t.e)||(this.oldEnd=void 0,this._finalizeAndAddPath(),!1)},_prepareForDrawing:function(t){var e=new S.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){return!(this._points.length>1&&t.eq(this._points[this._points.length-1])||(this._points.push(t),0))},_reset:function(){this._points=[],this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(t){var e=new S.Point(t.x,t.y);return this._addPoint(e)},_render:function(){var t,e,i=this.canvas.contextTop,n=this._points[0],r=this._points[1];if(this._saveAndTransform(i),i.beginPath(),2===this._points.length&&n.x===r.x&&n.y===r.y){var s=this.width/1e3;n=new S.Point(n.x,n.y),r=new S.Point(r.x,r.y),n.x-=s,r.x+=s}for(i.moveTo(n.x,n.y),t=1,e=this._points.length;t<e;t++)this._drawSegment(i,n,r),n=this._points[t],r=this._points[t+1];i.lineTo(n.x,n.y),i.stroke(),i.restore()},convertPointsToSVGPath:function(t){var e,i=[],n=this.width/1e3,r=new S.Point(t[0].x,t[0].y),s=new S.Point(t[1].x,t[1].y),o=t.length,a=1,l=0,h=o>2;for(h&&(a=t[2].x<s.x?-1:t[2].x===s.x?0:1,l=t[2].y<s.y?-1:t[2].y===s.y?0:1),i.push("M ",r.x-a*n," ",r.y-l*n," "),e=1;e<o;e++){if(!r.eq(s)){var c=r.midPointFrom(s);i.push("Q ",r.x," ",r.y," ",c.x," ",c.y," ")}r=t[e],e+1<t.length&&(s=t[e+1])}return h&&(a=r.x>t[e-2].x?1:r.x===t[e-2].x?0:-1,l=r.y>t[e-2].y?1:r.y===t[e-2].y?0:-1),i.push("L ",r.x+a*n," ",r.y+l*n),i},createPath:function(t){var e=new S.Path(t,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray});return this.shadow&&(this.shadow.affectStroke=!0,e.setShadow(this.shadow)),e},decimatePoints:function(t,e){if(t.length<=2)return t;var i,n=this.canvas.getZoom(),r=Math.pow(e/n,2),s=t.length-1,o=t[0],a=[o];for(i=1;i<s;i++)Math.pow(o.x-t[i].x,2)+Math.pow(o.y-t[i].y,2)>=r&&(o=t[i],a.push(o));return 1===a.length&&a.push(new S.Point(a[0].x,a[0].y)),a},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var t=this.convertPointsToSVGPath(this._points).join("");if("M 0 0 Q 0 0 0 0 L 0 0"!==t){var e=this.createPath(t);this.canvas.clearContext(this.canvas.contextTop),this.canvas.add(e),this.canvas.requestRenderAll(),e.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:e})}else this.canvas.requestRenderAll()}}),S.CircleBrush=S.util.createClass(S.BaseBrush,{width:10,initialize:function(t){this.canvas=t,this.points=[]},drawDot:function(t){var e=this.addPoint(t),i=this.canvas.contextTop;this._saveAndTransform(i),this.dot(i,e),i.restore()},dot:function(t,e){t.fillStyle=e.fill,t.beginPath(),t.arc(e.x,e.y,e.radius,0,2*Math.PI,!1),t.closePath(),t.fill()},onMouseDown:function(t){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(t)},_render:function(){var t,e,i=this.canvas.contextTop,n=this.points;for(this._saveAndTransform(i),t=0,e=n.length;t<e;t++)this.dot(i,n[t]);i.restore()},onMouseMove:function(t){this.needsFullRender()?(this.canvas.clearContext(this.canvas.contextTop),this.addPoint(t),this._render()):this.drawDot(t)},onMouseUp:function(){var t,e,i=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var n=[];for(t=0,e=this.points.length;t<e;t++){var r=this.points[t],s=new S.Circle({radius:r.radius,left:r.x,top:r.y,originX:"center",originY:"center",fill:r.fill});this.shadow&&s.setShadow(this.shadow),n.push(s)}var o=new S.Group(n);o.canvas=this.canvas,this.canvas.add(o),this.canvas.fire("path:created",{path:o}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=i,this.canvas.requestRenderAll()},addPoint:function(t){var e=new S.Point(t.x,t.y),i=S.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,n=new S.Color(this.color).setAlpha(S.util.getRandomInt(0,100)/100).toRgba();return e.radius=i,e.fill=n,this.points.push(e),e}}),S.SprayBrush=S.util.createClass(S.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(t){this.canvas=t,this.sprayChunks=[]},onMouseDown:function(t){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(t),this.render(this.sprayChunkPoints)},onMouseMove:function(t){this.addSprayChunk(t),this.render(this.sprayChunkPoints)},onMouseUp:function(){var t=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var e=[],i=0,n=this.sprayChunks.length;i<n;i++)for(var r=this.sprayChunks[i],s=0,o=r.length;s<o;s++){var a=new S.Rect({width:r[s].width,height:r[s].width,left:r[s].x+1,top:r[s].y+1,originX:"center",originY:"center",fill:this.color});e.push(a)}this.optimizeOverlapping&&(e=this._getOptimizedRects(e));var l=new S.Group(e);this.shadow&&l.setShadow(this.shadow),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=t,this.canvas.requestRenderAll()},_getOptimizedRects:function(t){var e,i,n,r={};for(i=0,n=t.length;i<n;i++)r[e=t[i].left+""+t[i].top]||(r[e]=t[i]);var s=[];for(e in r)s.push(r[e]);return s},render:function(t){var e,i,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),e=0,i=t.length;e<i;e++){var r=t[e];void 0!==r.opacity&&(n.globalAlpha=r.opacity),n.fillRect(r.x,r.y,r.width,r.width)}n.restore()},_render:function(){var t,e,i=this.canvas.contextTop;for(i.fillStyle=this.color,this._saveAndTransform(i),t=0,e=this.sprayChunks.length;t<e;t++)this.render(this.sprayChunks[t]);i.restore()},addSprayChunk:function(t){this.sprayChunkPoints=[];var e,i,n,r,s=this.width/2;for(r=0;r<this.density;r++){e=S.util.getRandomInt(t.x-s,t.x+s),i=S.util.getRandomInt(t.y-s,t.y+s),n=this.dotWidthVariance?S.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var o=new S.Point(e,i);o.width=n,this.randomOpacity&&(o.opacity=S.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(o)}this.sprayChunks.push(this.sprayChunkPoints)}}),S.PatternBrush=S.util.createClass(S.PencilBrush,{getPatternSrc:function(){var t=S.util.createCanvasElement(),e=t.getContext("2d");return t.width=t.height=25,e.fillStyle=this.color,e.beginPath(),e.arc(10,10,10,0,2*Math.PI,!1),e.closePath(),e.fill(),t},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(){return this.canvas.contextTop.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(){this.callSuper("_setBrushStyles"),this.canvas.contextTop.strokeStyle=this.getPattern()},createPath:function(t){var e=this.callSuper("createPath",t),i=e._getLeftTopCoords().scalarAdd(e.strokeWidth/2);return e.stroke=new S.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-i.x,offsetY:-i.y}),e}}),function(){var t=S.util.getPointer,e=S.util.degreesToRadians,i=S.util.radiansToDegrees,n=Math.atan2,r=Math.abs,s=S.StaticCanvas.supports("setLineDash");for(var o in S.Canvas=S.util.createClass(S.StaticCanvas,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(t,e),this._initInteractive(),this._createCacheCanvas()},uniScaleTransform:!1,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",altSelectionKey:null,selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",rotationCursor:"crosshair",notAllowedCursor:"not-allowed",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,snapAngle:0,snapThreshold:null,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,targets:[],_hoveredTarget:null,_hoveredTargets:[],_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=S.PencilBrush&&new S.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var t,e,i,n=this.getActiveObjects();if(n.length>0&&!this.preserveObjectStacking){e=[],i=[];for(var r=0,s=this._objects.length;r<s;r++)t=this._objects[r],-1===n.indexOf(t)?e.push(t):i.push(t);n.length>1&&(this._activeObject._objects=i),e.push.apply(e,i)}else e=this._objects;return e},renderAll:function(){!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&this.renderTopLayer(this.contextTop);var t=this.contextContainer;return this.renderCanvas(t,this._chooseObjectsToRender()),this},renderTopLayer:function(t){t.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(t),this.contextTopDirty=!0),t.restore()},renderTop:function(){var t=this.contextTop;return this.clearContext(t),this.renderTopLayer(t),this.fire("after:render"),this},_resetCurrentTransform:function(){var t=this._currentTransform;t.target.set({scaleX:t.original.scaleX,scaleY:t.original.scaleY,skewX:t.original.skewX,skewY:t.original.skewY,left:t.original.left,top:t.original.top}),this._shouldCenterTransform(t.target)?("center"!==t.originX&&("right"===t.originX?t.mouseXSign=-1:t.mouseXSign=1),"center"!==t.originY&&("bottom"===t.originY?t.mouseYSign=-1:t.mouseYSign=1),t.originX="center",t.originY="center"):(t.originX=t.original.originX,t.originY=t.original.originY)}
3,containsPoint:function(t,e,i){var n,r=i||this.getPointer(t,!0);return n=e.group&&e.group===this._activeObject&&"activeSelection"===e.group.type?this._normalizePointer(e.group,r):{x:r.x,y:r.y},e.containsPoint(n)||e._findTargetCorner(r)},_normalizePointer:function(t,e){var i=t.calcTransformMatrix(),n=S.util.invertTransform(i),r=this.restorePointerVpt(e);return S.util.transformPoint(r,n)},isTargetTransparent:function(t,e,i){if(t.shouldCache()&&t._cacheCanvas&&t!==this._activeObject){var n=this._normalizePointer(t,{x:e,y:i}),r=Math.max(t.cacheTranslationX+n.x*t.zoomX,0),s=Math.max(t.cacheTranslationY+n.y*t.zoomY,0);return S.util.isTransparent(t._cacheContext,Math.round(r),Math.round(s),this.targetFindTolerance)}var o=this.contextCache,a=t.selectionBackgroundColor,l=this.viewportTransform;return t.selectionBackgroundColor="",this.clearContext(o),o.save(),o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),t.render(o),o.restore(),t===this._activeObject&&t._renderControls(o,{hasBorders:!1,transparentCorners:!1},{hasBorders:!1}),t.selectionBackgroundColor=a,S.util.isTransparent(o,e,i,this.targetFindTolerance)},_isSelectionKeyPressed:function(t){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find((function(e){return!0===t[e]})):t[this.selectionKey]},_shouldClearSelection:function(t,e){var i=this.getActiveObjects(),n=this._activeObject;return!e||e&&n&&i.length>1&&-1===i.indexOf(e)&&n!==e&&!this._isSelectionKeyPressed(t)||e&&!e.evented||e&&!e.selectable&&n&&n!==e},_shouldCenterTransform:function(t){if(t){var e,i=this._currentTransform;return"scale"===i.action||"scaleX"===i.action||"scaleY"===i.action?e=this.centeredScaling||t.centeredScaling:"rotate"===i.action&&(e=this.centeredRotation||t.centeredRotation),e?!i.altKey:i.altKey}},_getOriginFromCorner:function(t,e){var i={x:t.originX,y:t.originY};return"ml"===e||"tl"===e||"bl"===e?i.x="right":"mr"!==e&&"tr"!==e&&"br"!==e||(i.x="left"),"tl"===e||"mt"===e||"tr"===e?i.y="bottom":"bl"!==e&&"mb"!==e&&"br"!==e||(i.y="top"),i},_getActionFromCorner:function(t,e,i){if(!e||!t)return"drag";switch(e){case"mtr":return"rotate";case"ml":case"mr":return i[this.altActionKey]?"skewY":"scaleX";case"mt":case"mb":return i[this.altActionKey]?"skewX":"scaleY";default:return"scale"}},_setupCurrentTransform:function(t,i,n){if(i){var r=this.getPointer(t),s=i._findTargetCorner(this.getPointer(t,!0)),o=this._getActionFromCorner(n,s,t,i),a=this._getOriginFromCorner(i,s);this._currentTransform={target:i,action:o,corner:s,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,offsetX:r.x-i.left,offsetY:r.y-i.top,originX:a.x,originY:a.y,ex:r.x,ey:r.y,lastX:r.x,lastY:r.y,theta:e(i.angle),width:i.width*i.scaleX,mouseXSign:1,mouseYSign:1,shiftKey:t.shiftKey,altKey:t[this.centeredKey],original:S.util.saveObjectTransform(i)},this._currentTransform.original.originX=a.x,this._currentTransform.original.originY=a.y,this._resetCurrentTransform(),this._beforeTransform(t)}},_translateObject:function(t,e){var i=this._currentTransform,n=i.target,r=t-i.offsetX,s=e-i.offsetY,o=!n.get("lockMovementX")&&n.left!==r,a=!n.get("lockMovementY")&&n.top!==s;return o&&n.set("left",r),a&&n.set("top",s),o||a},_changeSkewTransformOrigin:function(t,e,i){var n="originX",r={0:"center"},s=e.target.skewX,o="left",a="right",l="mt"===e.corner||"ml"===e.corner?1:-1,h=1;t=t>0?1:-1,"y"===i&&(s=e.target.skewY,o="top",a="bottom",n="originY"),r[-1]=o,r[1]=a,e.target.flipX&&(h*=-1),e.target.flipY&&(h*=-1),0===s?(e.skewSign=-l*t*h,e[n]=r[-t]):(s=s>0?1:-1,e.skewSign=s,e[n]=r[s*l*h])},_skewObject:function(t,e,i){var n,r=this._currentTransform,s=r.target,o=s.get("lockSkewingX"),a=s.get("lockSkewingY");if(o&&"x"===i||a&&"y"===i)return!1;var l,h,c=s.getCenterPoint(),u=s.toLocalPoint(new S.Point(t,e),"center","center")[i],d=s.toLocalPoint(new S.Point(r.lastX,r.lastY),"center","center")[i],f=s._getTransformedDimensions();return this._changeSkewTransformOrigin(u-d,r,i),l=s.toLocalPoint(new S.Point(t,e),r.originX,r.originY)[i],h=s.translateToOriginPoint(c,r.originX,r.originY),n=this._setObjectSkew(l,r,i,f),r.lastX=t,r.lastY=e,s.setPositionByOrigin(h,r.originX,r.originY),n}
3,_setObjectSkew:function(t,e,i,n){var r,s,o,a,l,h,c,u,d,f,p=e.target,g=e.skewSign;return"x"===i?(l="y",h="Y",c="X",d=0,f=p.skewY):(l="x",h="X",c="Y",d=p.skewX,f=0),a=p._getTransformedDimensions(d,f),(u=2*Math.abs(t)-a[i])<=2?r=0:(r=g*Math.atan(u/p["scale"+c]/(a[l]/p["scale"+h])),r=S.util.radiansToDegrees(r)),s=p["skew"+c]!==r,p.set("skew"+c,r),0!==p["skew"+h]&&(o=p._getTransformedDimensions(),r=n[l]/o[l]*p["scale"+h],p.set("scale"+h,r)),s},_scaleObject:function(t,e,i){var n=this._currentTransform,r=n.target,s=r.lockScalingX,o=r.lockScalingY,a=r.lockScalingFlip;if(s&&o)return!1;var l,h=r.translateToOriginPoint(r.getCenterPoint(),n.originX,n.originY),c=r.toLocalPoint(new S.Point(t,e),n.originX,n.originY),u=r._getTransformedDimensions();return this._setLocalMouse(c,n),l=this._setObjectScale(c,n,s,o,i,a,u),r.setPositionByOrigin(h,n.originX,n.originY),l},_setObjectScale:function(t,e,i,n,r,s,o){var a=e.target,l=!1,h=!1,c=!1,u=t.x*a.scaleX/o.x,d=t.y*a.scaleY/o.y,f=a.scaleX!==u,p=a.scaleY!==d;if(e.newScaleX=u,e.newScaleY=d,S.Textbox&&"x"===r&&a instanceof S.Textbox){var g=a.width*(t.x/o.x);return g>=a.getMinWidth()&&(c=g!==a.width,a.set("width",g),c)}return s&&u<=0&&u<a.scaleX&&(l=!0,t.x=0),s&&d<=0&&d<a.scaleY&&(h=!0,t.y=0),"equally"!==r||i||n?r?"x"!==r||a.get("lockUniScaling")?"y"!==r||a.get("lockUniScaling")||h||n||a.set("scaleY",d)&&(c=p):l||i||a.set("scaleX",u)&&(c=f):(l||i||a.set("scaleX",u)&&(c=c||f),h||n||a.set("scaleY",d)&&(c=c||p)):c=this._scaleObjectEqually(t,a,e,o),l||h||this._flipObject(e,r),c},_scaleObjectEqually:function(t,e,i,n){var r,s,o,a=t.y+t.x,l=n.y*i.original.scaleY/e.scaleY+n.x*i.original.scaleX/e.scaleX,h=t.x<0?-1:1,c=t.y<0?-1:1;return s=h*Math.abs(i.original.scaleX*a/l),o=c*Math.abs(i.original.scaleY*a/l),r=s!==e.scaleX||o!==e.scaleY,e.set("scaleX",s),e.set("scaleY",o),r},_flipObject:function(t,e){t.newScaleX<0&&"y"!==e&&("left"===t.originX?t.originX="right":"right"===t.originX&&(t.originX="left")),t.newScaleY<0&&"x"!==e&&("top"===t.originY?t.originY="bottom":"bottom"===t.originY&&(t.originY="top"))},_setLocalMouse:function(t,e){var i=e.target,n=this.getZoom(),s=i.padding/n;"right"===e.originX?t.x*=-1:"center"===e.originX&&(t.x*=2*e.mouseXSign,t.x<0&&(e.mouseXSign=-e.mouseXSign)),"bottom"===e.originY?t.y*=-1:"center"===e.originY&&(t.y*=2*e.mouseYSign,t.y<0&&(e.mouseYSign=-e.mouseYSign)),r(t.x)>s?t.x<0?t.x+=s:t.x-=s:t.x=0,r(t.y)>s?t.y<0?t.y+=s:t.y-=s:t.y=0},_rotateObject:function(t,e){var r=this._currentTransform,s=r.target,o=s.translateToOriginPoint(s.getCenterPoint(),r.originX,r.originY);if(s.lockRotation)return!1;var a=n(r.ey-o.y,r.ex-o.x),l=n(e-o.y,t-o.x),h=i(l-a+r.theta),c=!0;if(s.snapAngle>0){var u=s.snapAngle,d=s.snapThreshold||u,f=Math.ceil(h/u)*u,p=Math.floor(h/u)*u;Math.abs(h-p)<d?h=p:Math.abs(h-f)<d&&(h=f)}return h<0&&(h=360+h),h%=360,s.angle===h?c=!1:(s.angle=h,s.setPositionByOrigin(o,r.originX,r.originY)),c},setCursor:function(t){this.upperCanvasEl.style.cursor=t},_drawSelection:function(t){var e=this._groupSelector,i=e.left,n=e.top,o=r(i),a=r(n);if(this.selectionColor&&(t.fillStyle=this.selectionColor,t.fillRect(e.ex-(i>0?0:-i),e.ey-(n>0?0:-n),o,a)),this.selectionLineWidth&&this.selectionBorderColor)if(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,this.selectionDashArray.length>1&&!s){var l=e.ex+.5-(i>0?0:o),h=e.ey+.5-(n>0?0:a);t.beginPath(),S.util.drawDashedLine(t,l,h,l+o,h,this.selectionDashArray),S.util.drawDashedLine(t,l,h+a-1,l+o,h+a-1,this.selectionDashArray),S.util.drawDashedLine(t,l,h,l,h+a,this.selectionDashArray),S.util.drawDashedLine(t,l+o-1,h,l+o-1,h+a,this.selectionDashArray),t.closePath(),t.stroke()}else S.Object.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(e.ex+.5-(i>0?0:o),e.ey+.5-(n>0?0:a),o,a)},findTarget:function(t,e){if(!this.skipTargetFind){var i,n,r=this.getPointer(t,!0),s=this._activeObject,o=this.getActiveObjects();if(this.targets=[],o.length>1&&!e&&s===this._searchPossibleTargets([s],r))return s;if(1===o.length&&s._findTargetCorner(r))return s;if(1===o.length&&s===this._searchPossibleTargets([s],r)){if(!this.preserveObjectStacking)return s;i=s,n=this.targets,this.targets=[]}var a=this._searchPossibleTargets(this._objects,r);return t[this.altSelectionKey]&&a&&i&&a!==i&&(a=i,this.targets=n),a}}
vendor: 47,624 bytes, line 3
3,_checkTarget:function(t,e,i){if(e&&e.visible&&e.evented&&this.containsPoint(null,e,t)){if(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing)return!0;if(!this.isTargetTransparent(e,i.x,i.y))return!0}},_searchPossibleTargets:function(t,e){for(var i,n,r=t.length;r--;){var s=t[r],o=s.group&&"activeSelection"!==s.group.type?this._normalizePointer(s.group,e):e;if(this._checkTarget(o,s,e)){(i=t[r]).subTargetCheck&&i instanceof S.Group&&(n=this._searchPossibleTargets(i._objects,e))&&this.targets.push(n);break}}return i},restorePointerVpt:function(t){return S.util.transformPoint(t,S.util.invertTransform(this.viewportTransform))},getPointer:function(e,i){if(this._absolutePointer&&!i)return this._absolutePointer;if(this._pointer&&i)return this._pointer;var n,r=t(e),s=this.upperCanvasEl,o=s.getBoundingClientRect(),a=o.width||0,l=o.height||0;a&&l||("top"in o&&"bottom"in o&&(l=Math.abs(o.top-o.bottom)),"right"in o&&"left"in o&&(a=Math.abs(o.right-o.left))),this.calcOffset(),r.x=r.x-this._offset.left,r.y=r.y-this._offset.top,i||(r=this.restorePointerVpt(r));var h=this.getRetinaScaling();return 1!==h&&(r.x/=h,r.y/=h),n=0===a||0===l?{width:1,height:1}:{width:s.width/a,height:s.height/l},{x:r.x*n.width,y:r.y*n.height}},_createUpperCanvas:function(){var t=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),e=this.lowerCanvasEl,i=this.upperCanvasEl;i?i.className="":(i=this._createCanvasElement(),this.upperCanvasEl=i),S.util.addClass(i,"upper-canvas "+t),this.wrapperEl.appendChild(i),this._copyCanvasStyle(e,i),this._applyCanvasStyle(i),this.contextTop=i.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=S.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),S.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),S.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.width||t.width,i=this.height||t.height;S.util.setStyle(t,{position:"absolute",width:e+"px",height:i+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),t.width=e,t.height=i,S.util.makeElementUnselectable(t)},_copyCanvasStyle:function(t,e){e.style.cssText=t.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var t=this._activeObject;return t?"activeSelection"===t.type&&t._objects?t._objects.slice(0):[t]:[]},_onObjectRemoved:function(t){t===this._activeObject&&(this.fire("before:selection:cleared",{target:t}),this._discardActiveObject(),this.fire("selection:cleared",{target:t}),t.fire("deselected")),t===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",t)},_fireSelectionEvents:function(t,e){var i=!1,n=this.getActiveObjects(),r=[],s=[],o={e:e};t.forEach((function(t){-1===n.indexOf(t)&&(i=!0,t.fire("deselected",o),s.push(t))})),n.forEach((function(e){-1===t.indexOf(e)&&(i=!0,e.fire("selected",o),r.push(e))})),t.length>0&&n.length>0?(o.selected=r,o.deselected=s,o.updated=r[0]||s[0],o.target=this._activeObject,i&&this.fire("selection:updated",o)):n.length>0?(1===n.length&&(o.target=r[0],this.fire("object:selected",o)),o.selected=r,o.target=this._activeObject,this.fire("selection:created",o)):t.length>0&&(o.deselected=s,this.fire("selection:cleared",o))},setActiveObject:function(t,e){var i=this.getActiveObjects();return this._setActiveObject(t,e),this._fireSelectionEvents(i,e),this},_setActiveObject:function(t,e){return this._activeObject!==t&&(!!this._discardActiveObject(e,t)&&(!t.onSelect({e:e})&&(this._activeObject=t,!0)))},_discardActiveObject:function(t,e){var i=this._activeObject;if(i){if(i.onDeselect({e:t,object:e}))return!1;this._activeObject=null}return!0},discardActiveObject:function(t){var e=this.getActiveObjects(),i=this.getActiveObject();return e.length&&this.fire("before:selection:cleared",{target:i,e:t}),this._discardActiveObject(t),this._fireSelectionEvents(e,t),this},dispose:function(){var t=this.wrapperEl;return this.removeListeners(),t.removeChild(this.upperCanvasEl),t.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach(function(t){S.util.cleanUpJsdomNode(this[t]),this[t]=void 0}.bind(this)),t.parentNode&&t.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,S.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(t){var e=this._activeObject;e&&e._renderControls(t)},_toObject:function(t,e,i){var n=this._realizeGroupTransformOnObject(t),r=this.callSuper("_toObject",t,e,i);return this._unwindGroupTransformOnObject(t,n),r},_realizeGroupTransformOnObject:function(t){if(t.group&&"activeSelection"===t.group.type&&this._activeObject===t.group){var e={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach((function(i){e[i]=t[i]})),this._activeObject.realizeTransform(t),e}return null},_unwindGroupTransformOnObject:function(t,e){e&&t.set(e)},_setSVGObject:function(t,e,i){var n=this._realizeGroupTransformOnObject(e);this.callSuper("_setSVGObject",t,e,i),this._unwindGroupTransformOnObject(e,n)},setViewportTransform:function(t){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),S.StaticCanvas.prototype.setViewportTransform.call(this,t)}}),S.StaticCanvas)"prototype"!==o&&(S.Canvas[o]=S.StaticCanvas[o])}(),function(){var t={mt:0,tr:1,mr:2,br:3,mb:4,bl:5,ml:6,tl:7},e=S.util.addListener,i=S.util.removeListener,n={passive:!1};function r(t,e){return t.button&&t.button===e-1}S.util.object.extend(S.Canvas.prototype,{cursorMap:["n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize","w-resize","nw-resize"],mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(t,e){var i=this.upperCanvasEl,r=this._getEventPrefix();t(S.window,"resize",this._onResize),t(i,r+"down",this._onMouseDown),t(i,r+"move",this._onMouseMove,n),t(i,r+"out",this._onMouseOut),t(i,r+"enter",this._onMouseEnter),t(i,"wheel",this._onMouseWheel),t(i,"contextmenu",this._onContextMenu),t(i,"dblclick",this._onDoubleClick),t(i,"dragover",this._onDragOver),t(i,"dragenter",this._onDragEnter),t(i,"dragleave",this._onDragLeave),t(i,"drop",this._onDrop),this.enablePointerEvents||t(i,"touchstart",this._onTouchStart,n),"undefined"!=typeof eventjs&&e in eventjs&&(eventjs[e](i,"gesture",this._onGesture),eventjs[e](i,"drag",this._onDrag),eventjs[e](i,"orientation",this._onOrientationChange),eventjs[e](i,"shake",this._onShake),eventjs[e](i,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(i,"remove");var t=this._getEventPrefix();i(S.document,t+"up",this._onMouseUp),i(S.document,"touchend",this._onTouchEnd,n),i(S.document,t+"move",this._onMouseMove,n),i(S.document,"touchmove",this._onMouseMove,n)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._simpleEventHandler.bind(this,"drop"),this.eventsBound=!0)},_onGesture:function(t,e){this.__onTransformGesture&&this.__onTransformGesture(t,e)},_onDrag:function(t,e){this.__onDrag&&this.__onDrag(t,e)},_onMouseWheel:function(t){this.__onMouseWheel(t)},_onMouseOut:function(t){var e=this._hoveredTarget;this.fire("mouse:out",{target:e,e:t}),this._hoveredTarget=null,e&&e.fire("mouseout",{e:t});var i=this;this._hoveredTargets.forEach((function(n){i.fire("mouse:out",{target:e,e:t}),n&&e.fire("mouseout",{e:t})})),this._hoveredTargets=[],this._iTextInstances&&this._iTextInstances.forEach((function(t){t.isEditing&&t.hiddenTextarea.focus()}))},_onMouseEnter:function(t){this.currentTransform||this.findTarget(t)||(this.fire("mouse:over",{target:null,e:t}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(t,e){this.__onOrientationChange&&this.__onOrientationChange(t,e)},_onShake:function(t,e){this.__onShake&&this.__onShake(t,e)},_onLongPress:function(t,e){this.__onLongPress&&this.__onLongPress(t,e)},_onDragOver:function(t){t.preventDefault();var e=this._simpleEventHandler("dragover",t);this._fireEnterLeaveEvents(e,t)},_onContextMenu:function(t){return this.stopContextMenu&&(t.stopPropagation(),t.preventDefault()),!1},_onDoubleClick:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"dblclick"),this._resetTransformEventData(t)},getPointerId:function(t){var e=t.changedTouches;return e?e[0]&&e[0].identifier:this.enablePointerEvents?t.pointerId:-1},_isMainEvent:function(t){return!0===t.isPrimary||!1!==t.isPrimary&&("touchend"===t.type&&0===t.touches.length||(!t.changedTouches||t.changedTouches[0].identifier===this.mainTouchId))},_onTouchStart:function(t){t.preventDefault(),null===this.mainTouchId&&(this.mainTouchId=this.getPointerId(t)),this.__onMouseDown(t),this._resetTransformEventData();var r=this.upperCanvasEl,s=this._getEventPrefix();e(S.document,"touchend",this._onTouchEnd,n),e(S.document,"touchmove",this._onMouseMove,n),i(r,s+"down",this._onMouseDown)},_onMouseDown:function(t){this.__onMouseDown(t),this._resetTransformEventData();var r=this.upperCanvasEl,s=this._getEventPrefix();i(r,s+"move",this._onMouseMove,n),e(S.document,s+"up",this._onMouseUp),e(S.document,s+"move",this._onMouseMove,n)},_onTouchEnd:function(t){if(!(t.touches.length>0)){this.__onMouseUp(t),this._resetTransformEventData(),this.mainTouchId=null;var r=this._getEventPrefix();i(S.document,"touchend",this._onTouchEnd,n),i(S.document,"touchmove",this._onMouseMove,n);var s=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout((function(){e(s.upperCanvasEl,r+"down",s._onMouseDown),s._willAddMouseDown=0}),400)}},_onMouseUp:function(t){this.__onMouseUp(t),this._resetTransformEventData();var r=this.upperCanvasEl,s=this._getEventPrefix();this._isMainEvent(t)&&(i(S.document,s+"up",this._onMouseUp),i(S.document,s+"move",this._onMouseMove,n),e(r,s+"move",this._onMouseMove,n))},_onMouseMove:function(t){!this.allowTouchScrolling&&t.preventDefault&&t.preventDefault(),this.__onMouseMove(t)},_onResize:function(){this.calcOffset()},_shouldRender:function(t){var e=this._activeObject;return!!(!!e!=!!t||e&&t&&e!==t)||(e&&e.isEditing,!1)},__onMouseUp:function(t){var e,i=this._currentTransform,n=this._groupSelector,s=!1,o=!n||0===n.left&&0===n.top;if(this._cacheTransformEventData(t),e=this._target,this._handleEvent(t,"up:before"),!r(t,3))return r(t,2)?(this.fireMiddleClick&&this._handleEvent(t,"up",2,o),void this._resetTransformEventData()):void(this.isDrawingMode&&this._isCurrentlyDrawing?this._onMouseUpInDrawingMode(t):this._isMainEvent(t)&&(i&&(this._finalizeCurrentTransform(t),s=i.actionPerformed),o||(this._maybeGroupObjects(t),s||(s=this._shouldRender(e))),e&&(e.isMoving=!1),this._setCursorFromEvent(t,e),this._handleEvent(t,"up",1,o),this._groupSelector=null,this._currentTransform=null,e&&(e.__corner=0),s?this.requestRenderAll():o||this.renderTop()));this.fireRightClick&&this._handleEvent(t,"up",3,o)},_simpleEventHandler:function(t,e){var i=this.findTarget(e),n=this.targets,r={e:e,target:i,subTargets:n};if(this.fire(t,r),i&&i.fire(t,r),!n)return i;for(var s=0;s<n.length;s++)n[s].fire(t,r);return i},_handleEvent:function(t,e,i,n){var r=this._target,s=this.targets||[],o={e:t,target:r,subTargets:s,button:i||1,isClick:n||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};this.fire("mouse:"+e,o),r&&r.fire("mouse"+e,o);for(var a=0;a<s.length;a++)s[a].fire("mouse"+e,o)},_finalizeCurrentTransform:function(t){var e,i=this._currentTransform,n=i.target,r={e:t,target:n,transform:i};n._scaling&&(n._scaling=!1),n.setCoords(),(i.actionPerformed||this.stateful&&n.hasStateChanged())&&(i.actionPerformed&&(e=this._addEventOptions(r,i),this._fire(e,r)),this._fire("modified",r))},_addEventOptions:function(t,e){var i,n;switch(e.action){case"scaleX":i="scaled",n="x";break;case"scaleY":i="scaled",n="y";break;case"skewX":i="skewed",n="x";break;case"skewY":i="skewed",n="y";break;case"scale":i="scaled",n="equally";break;case"rotate":i="rotated";break;case"drag":i="moved"}return t.by=n,i},_onMouseDownInDrawingMode:function(t){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(t).requestRenderAll(),this.clipTo&&S.util.clipContext(this,this.contextTop);var e=this.getPointer(t);this.freeDrawingBrush.onMouseDown(e,{e:t,pointer:e}),this._handleEvent(t,"down")},_onMouseMoveInDrawingMode:function(t){if(this._isCurrentlyDrawing){var e=this.getPointer(t);this.freeDrawingBrush.onMouseMove(e,{e:t,pointer:e})}this.setCursor(this.freeDrawingCursor),this._handleEvent(t,"move")},_onMouseUpInDrawingMode:function(t){this.clipTo&&this.contextTop.restore();var e=this.getPointer(t);this._isCurrentlyDrawing=this.freeDrawingBrush.onMouseUp({e:t,pointer:e}),this._handleEvent(t,"up")},__onMouseDown:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"down:before");var e=this._target;if(r(t,3))this.fireRightClick&&this._handleEvent(t,"down",3);else if(r(t,2))this.fireMiddleClick&&this._handleEvent(t,"down",2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(t);else if(this._isMainEvent(t)&&!this._currentTransform){var i=this._pointer;this._previousPointer=i;var n=this._shouldRender(e),s=this._shouldGroup(t,e);if(this._shouldClearSelection(t,e)?this.discardActiveObject(t):s&&(this._handleGrouping(t,e),e=this._activeObject),!this.selection||e&&(e.selectable||e.isEditing||e===this._activeObject)||(this._groupSelector={ex:i.x,ey:i.y,top:0,left:0}),e){var o=e===this._activeObject;e.selectable&&this.setActiveObject(e,t),e!==this._activeObject||!e.__corner&&s||this._setupCurrentTransform(t,e,o)}this._handleEvent(t,"down"),(n||s)&&this.requestRenderAll()}},_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},_cacheTransformEventData:function(t){this._resetTransformEventData(),this._pointer=this.getPointer(t,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(t)||null},_beforeTransform:function(t){var e=this._currentTransform;this.stateful&&e.target.saveState(),this.fire("before:transform",{e:t,transform:e}),e.corner&&this.onBeforeScaleRotate(e.target)},__onMouseMove:function(t){var e,i;if(this._handleEvent(t,"move:before"),this._cacheTransformEventData(t),this.isDrawingMode)this._onMouseMoveInDrawingMode(t);else if(this._isMainEvent(t)){var n=this._groupSelector;n?(i=this._pointer,n.left=i.x-n.ex,n.top=i.y-n.ey,this.renderTop()):this._currentTransform?this._transformObject(t):(e=this.findTarget(t)||null,this._setCursorFromEvent(t,e),this._fireOverOutEvents(e,t)),this._handleEvent(t,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(t,e){var i=this._hoveredTarget,n=this._hoveredTargets,r=this.targets,s=Math.max(n.length,r.length);this.fireSyntheticInOutEvents(t,e,{oldTarget:i,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var o=0;o<s;o++)this.fireSyntheticInOutEvents(r[o],e,{oldTarget:n[o],evtOut:"mouseout",evtIn:"mouseover"});this._hoveredTarget=t,this._hoveredTargets=this.targets.concat()},_fireEnterLeaveEvents:function(t,e){var i=this._draggedoverTarget,n=this._hoveredTargets,r=this.targets,s=Math.max(n.length,r.length);this.fireSyntheticInOutEvents(t,e,{oldTarget:i,evtOut:"dragleave",evtIn:"dragenter"});for(var o=0;o<s;o++)this.fireSyntheticInOutEvents(r[o],e,{oldTarget:n[o],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=t},fireSyntheticInOutEvents:function(t,e,i){var n,r,s,o=i.oldTarget,a=o!==t,l=i.canvasEvtIn,h=i.canvasEvtOut;a&&(n={e:e,target:t,previousTarget:o},r={e:e,target:o,nextTarget:t}),s=t&&a,o&&a&&(h&&this.fire(h,r),o.fire(i.evtOut,r)),s&&(l&&this.fire(l,n),t.fire(i.evtIn,n))},__onMouseWheel:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"wheel"),this._resetTransformEventData()},_transformObject:function(t){var e=this.getPointer(t),i=this._currentTransform;i.reset=!1,i.target.isMoving=!0,i.shiftKey=t.shiftKey,i.altKey=t[this.centeredKey],this._beforeScaleTransform(t,i),this._performTransformAction(t,i,e),i.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(t,e,i){var n=i.x,r=i.y,s=e.action,o=!1,a={target:e.target,e:t,transform:e,pointer:i};"rotate"===s?(o=this._rotateObject(n,r))&&this._fire("rotating",a):"scale"===s?(o=this._onScale(t,e,n,r))&&this._fire("scaling",a):"scaleX"===s?(o=this._scaleObject(n,r,"x"))&&this._fire("scaling",a):"scaleY"===s?(o=this._scaleObject(n,r,"y"))&&this._fire("scaling",a):"skewX"===s?(o=this._skewObject(n,r,"x"))&&this._fire("skewing",a):"skewY"===s?(o=this._skewObject(n,r,"y"))&&this._fire("skewing",a):(o=this._translateObject(n,r))&&(this._fire("moving",a),this.setCursor(a.target.moveCursor||this.moveCursor)),e.actionPerformed=e.actionPerformed||o},_fire:function(t,e){this.fire("object:"+t,e),e.target.fire(t,e)},_beforeScaleTransform:function(t,e){if("scale"===e.action||"scaleX"===e.action||"scaleY"===e.action){var i=this._shouldCenterTransform(e.target);(i&&("center"!==e.originX||"center"!==e.originY)||!i&&"center"===e.originX&&"center"===e.originY)&&(this._resetCurrentTransform(),e.reset=!0)}},_onScale:function(t,e,i,n){return this._isUniscalePossible(t,e.target)?(e.currentAction="scale",this._scaleObject(i,n)):(e.reset||"scale"!==e.currentAction||this._resetCurrentTransform(),e.currentAction="scaleEqually",this._scaleObject(i,n,"equally"))},_isUniscalePossible:function(t,e){return(t[this.uniScaleKey]||this.uniScaleTransform)&&!e.get("lockUniScaling")},_setCursorFromEvent:function(t,e){if(!e)return this.setCursor(this.defaultCursor),!1;var i=e.hoverCursor||this.hoverCursor,n=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,r=(!n||!n.contains(e))&&e._findTargetCorner(this.getPointer(t,!0));r?this.setCursor(this.getCornerCursor(r,e,t)):(e.subTargetCheck&&this.targets.concat().reverse().map((function(t){i=t.hoverCursor||i})),this.setCursor(i))},getCornerCursor:function(e,i,n){return this.actionIsDisabled(e,i,n)?this.notAllowedCursor:e in t?this._getRotatedCornerCursor(e,i,n):"mtr"===e&&i.hasRotatingPoint?this.rotationCursor:this.defaultCursor},actionIsDisabled:function(t,e,i){return"mt"===t||"mb"===t?i[this.altActionKey]?e.lockSkewingX:e.lockScalingY:"ml"===t||"mr"===t?i[this.altActionKey]?e.lockSkewingY:e.lockScalingX:"mtr"===t?e.lockRotation:this._isUniscalePossible(i,e)?e.lockScalingX&&e.lockScalingY:e.lockScalingX||e.lockScalingY},_getRotatedCornerCursor:function(e,i,n){var r=Math.round(i.angle%360/45);return r<0&&(r+=8),r+=t[e],n[this.altActionKey]&&t[e]%2==0&&(r+=2),r%=8,this.cursorMap[r]}})}(),m=Math.min,v=Math.max,S.util.object.extend(S.Canvas.prototype,{_shouldGroup:function(t,e){var i=this._activeObject;return i&&this._isSelectionKeyPressed(t)&&e&&e.selectable&&this.selection&&(i!==e||"activeSelection"===i.type)&&!e.onSelect({e:t})},_handleGrouping:function(t,e){var i=this._activeObject;i.__corner||(e!==i||(e=this.findTarget(t,!0))&&e.selectable)&&(i&&"activeSelection"===i.type?this._updateActiveSelection(e,t):this._createActiveSelection(e,t))},_updateActiveSelection:function(t,e){var i=this._activeObject,n=i._objects.slice(0);i.contains(t)?(i.removeWithUpdate(t),this._hoveredTarget=t,this._hoveredTargets=this.targets.concat(),1===i.size()&&this._setActiveObject(i.item(0),e)):(i.addWithUpdate(t),this._hoveredTarget=i,this._hoveredTargets=this.targets.concat()),this._fireSelectionEvents(n,e)},_createActiveSelection:function(t,e){var i=this.getActiveObjects(),n=this._createGroup(t);this._hoveredTarget=n,this._setActiveObject(n,e),this._fireSelectionEvents(i,e)},_createGroup:function(t){var e=this._objects,i=e.indexOf(this._activeObject)<e.indexOf(t)?[this._activeObject,t]:[t,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new S.ActiveSelection(i,{canvas:this})},_groupSelectedObjects:function(t){var e,i=this._collectObjects(t);1===i.length?this.setActiveObject(i[0],t):i.length>1&&(e=new S.ActiveSelection(i.reverse(),{canvas:this}),this.setActiveObject(e,t))},_collectObjects:function(t){for(var e,i=[],n=this._groupSelector.ex,r=this._groupSelector.ey,s=n+this._groupSelector.left,o=r+this._groupSelector.top,a=new S.Point(m(n,s),m(r,o)),l=new S.Point(v(n,s),v(r,o)),h=!this.selectionFullyContained,c=n===s&&r===o,u=this._objects.length;u--&&!((e=this._objects[u])&&e.selectable&&e.visible&&(h&&e.intersectsWithRect(a,l)||e.isContainedWithinRect(a,l)||h&&e.containsPoint(a)||h&&e.containsPoint(l))&&(i.push(e),c)););return i.length>1&&(i=i.filter((function(e){return!e.onSelect({e:t})}))),i},_maybeGroupObjects:function(t){this.selection&&this._groupSelector&&this._groupSelectedObjects(t),this.setCursor(this.defaultCursor),this._groupSelector=null}}),S.util.object.extend(S.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",i=t.quality||1,n=(t.multiplier||1)*(t.enableRetinaScaling?this.getRetinaScaling():1),r=this.toCanvasElement(n,t);return S.util.toDataURL(r,e,i)},toCanvasElement:function(t,e){t=t||1;var i=((e=e||{}).width||this.width)*t,n=(e.height||this.height)*t,r=this.getZoom(),s=this.width,o=this.height,a=r*t,l=this.viewportTransform,h=(l[4]-(e.left||0))*t,c=(l[5]-(e.top||0))*t,u=this.interactive,d=[a,0,0,a,h,c],f=this.enableRetinaScaling,p=S.util.createCanvasElement(),g=this.contextTop;return p.width=i,p.height=n,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=d,this.width=i,this.height=n,this.calcViewportBoundaries(),this.renderCanvas(p.getContext("2d"),this._objects),this.viewportTransform=l,this.width=s,this.height=o,this.calcViewportBoundaries(),this.interactive=u,this.enableRetinaScaling=f,this.contextTop=g,p}}),S.util.object.extend(S.StaticCanvas.prototype,{loadFromDatalessJSON:function(t,e,i){return this.loadFromJSON(t,e,i)},loadFromJSON:function(t,e,i){if(t){var n="string"==typeof t?JSON.parse(t):S.util.object.clone(t),r=this,s=n.clipPath,o=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete n.clipPath,this._enlivenObjects(n.objects,(function(t){r.clear(),r._setBgOverlay(n,(function(){s?r._enlivenObjects([s],(function(i){r.clipPath=i[0],r.__setupCanvas.call(r,n,t,o,e)})):r.__setupCanvas.call(r,n,t,o,e)}))}),i),this}},__setupCanvas:function(t,e,i,n){var r=this;e.forEach((function(t,e){r.insertAt(t,e)})),this.renderOnAddRemove=i,delete t.objects,delete t.backgroundImage,delete t.overlayImage,delete t.background,delete t.overlay,this._setOptions(t),this.renderAll(),n&&n()},_setBgOverlay:function(t,e){var i={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(t.backgroundImage||t.overlayImage||t.background||t.overlay){var n=function(){i.backgroundImage&&i.overlayImage&&i.backgroundColor&&i.overlayColor&&e&&e()};this.__setBgOverlay("backgroundImage",t.backgroundImage,i,n),this.__setBgOverlay("overlayImage",t.overlayImage,i,n),this.__setBgOverlay("backgroundColor",t.background,i,n),this.__setBgOverlay("overlayColor",t.overlay,i,n)}else e&&e()},__setBgOverlay:function(t,e,i,n){var r=this;if(!e)return i[t]=!0,void(n&&n());"backgroundImage"===t||"overlayImage"===t?S.util.enlivenObjects([e],(function(e){r[t]=e[0],i[t]=!0,n&&n()})):this["set"+S.util.string.capitalize(t,!0)](e,(function(){i[t]=!0,n&&n()}))},_enlivenObjects:function(t,e,i){t&&0!==t.length?S.util.enlivenObjects(t,(function(t){e&&e(t)}),null,i):e&&e([])},_toDataURL:function(t,e){this.clone((function(i){e(i.toDataURL(t))}))},_toDataURLWithMultiplier:function(t,e,i){this.clone((function(n){i(n.toDataURLWithMultiplier(t,e))}))},clone:function(t,e){var i=JSON.stringify(this.toJSON(e));this.cloneWithoutData((function(e){e.loadFromJSON(i,(function(){t&&t(e)}))}))},cloneWithoutData:function(t){var e=S.util.createCanvasElement();e.width=this.width,e.height=this.height;var i=new S.Canvas(e);i.clipTo=this.clipTo,this.backgroundImage?(i.setBackgroundImage(this.backgroundImage.src,(function(){i.renderAll(),t&&t(i)})),i.backgroundImageOpacity=this.backgroundImageOpacity,i.backgroundImageStretch=this.backgroundImageStretch):t&&t(i)}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.util.object.clone,r=e.util.toFixed,s=e.util.string.capitalize,o=e.util.degreesToRadians,a=e.StaticCanvas.supports("setLineDash"),l=!e.isLikelyNode;e.Object||(e.Object=e.util.createClass(e.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgba(102,153,255,0.75)",borderDashArray:null,cornerColor:"rgba(102,153,255,0.5)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,transformMatrix:null,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,hasRotatingPoint:!0,rotatingPointOffset:40,perPixelTargetFind:!1,includeDefaultValues:!0,clipTo:null,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockUniScaling:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:l,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow clipTo visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(t){t&&this.setOptions(t)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=e.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(t){var i=e.perfLimitSizeTotal,n=t.width,r=t.height,s=e.maxCacheSideLimit,o=e.minCacheSideLimit;if(n<=s&&r<=s&&n*r<=i)return n<o&&(t.width=o),r<o&&(t.height=o),t;var a=n/r,l=e.util.limitDimsByArea(a,i),h=e.util.capValue,c=h(o,l.x,s),u=h(o,l.y,s);return n>c&&(t.zoomX/=n/c,t.width=c,t.capped=!0),r>u&&(t.zoomY/=r/u,t.height=u,t.capped=!0),t},_getCacheCanvasDimensions:function(){var t=this.getTotalObjectScaling(),e=this._getTransformedDimensions(0,0),i=e.x*t.scaleX/this.scaleX,n=e.y*t.scaleY/this.scaleY;return{width:i+2,height:n+2,zoomX:t.scaleX,zoomY:t.scaleY,x:i,y:n}},_updateCacheCanvas:function(){var t=this.canvas;if(this.noScaleCache&&t&&t._currentTransform){var i=t._currentTransform.target,n=t._currentTransform.action;if(this===i&&n.slice&&"scale"===n.slice(0,5))return!1}var r,s,o=this._cacheCanvas,a=this._limitCacheSize(this._getCacheCanvasDimensions()),l=e.minCacheSideLimit,h=a.width,c=a.height,u=a.zoomX,d=a.zoomY,f=h!==this.cacheWidth||c!==this.cacheHeight,p=this.zoomX!==u||this.zoomY!==d,g=f||p,m=0,v=0,y=!1;if(f){var _=this._cacheCanvas.width,A=this._cacheCanvas.height,b=h>_||c>A;y=b||(h<.9*_||c<.9*A)&&_>l&&A>l,b&&!a.capped&&(h>l||c>l)&&(m=.1*h,v=.1*c)}return!!g&&(y?(o.width=Math.ceil(h+m),o.height=Math.ceil(c+v)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),r=a.x/2,s=a.y/2,this.cacheTranslationX=Math.round(o.width/2-r)+r,this.cacheTranslationY=Math.round(o.height/2-s)+s,this.cacheWidth=h,this.cacheHeight=c,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(u,d),this.zoomX=u,this.zoomY=d,!0)},setOptions:function(t){this._setOptions(t),this._initGradient(t.fill,"fill"),this._initGradient(t.stroke,"stroke"),this._initClipping(t),this._initPattern(t.fill,"fill"),this._initPattern(t.stroke,"stroke")},transform:function(t){var e;e=this.group&&!this.group._transformDone?this.calcTransformMatrix():this.calcOwnMatrix(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},toObject:function(t){var i=e.Object.NUM_FRACTION_DIGITS,n={type:this.type,version:e.version,originX:this.originX,originY:this.originY,left:r(this.left,i),top:r(this.top,i),width:r(this.width,i),height:r(this.height,i),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:r(this.strokeWidth,i),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:r(this.strokeMiterLimit,i),scaleX:r(this.scaleX,i),scaleY:r(this.scaleY,i),angle:r(this.angle,i),flipX:this.flipX,flipY:this.flipY,opacity:r(this.opacity,i),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,clipTo:this.clipTo&&String(this.clipTo),backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,transformMatrix:this.transformMatrix?this.transformMatrix.concat():null,skewX:r(this.skewX,i),skewY:r(this.skewY,i)};return this.clipPath&&(n.clipPath=this.clipPath.toObject(t),n.clipPath.inverted=this.clipPath.inverted,n.clipPath.absolutePositioned=this.clipPath.absolutePositioned),e.util.populateWithProperties(this,n,t),this.includeDefaultValues||(n=this._removeDefaultValues(n)),n},toDatalessObject:function(t){return this.toObject(t)},_removeDefaultValues:function(t){var i=e.util.getKlass(t.type).prototype;return i.stateProperties.forEach((function(e){"left"!==e&&"top"!==e&&(t[e]===i[e]&&delete t[e],"[object Array]"===Object.prototype.toString.call(t[e])&&"[object Array]"===Object.prototype.toString.call(i[e])&&0===t[e].length&&0===i[e].length&&delete t[e])})),t},toString:function(){return"#<fabric."+s(this.type)+">"},getObjectScaling:function(){var t=e.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(t.scaleX),scaleY:Math.abs(t.scaleY)}},getTotalObjectScaling:function(){var t=this.getObjectScaling(),e=t.scaleX,i=t.scaleY;if(this.canvas){var n=this.canvas.getZoom(),r=this.canvas.getRetinaScaling();e*=n*r,i*=n*r}return{scaleX:e,scaleY:i}},getObjectOpacity:function(){var t=this.opacity;return this.group&&(t*=this.group.getObjectOpacity()),t},_set:function(t,i){var n="scaleX"===t||"scaleY"===t,r=this[t]!==i,s=!1;return n&&(i=this._constrainScale(i)),"scaleX"===t&&i<0?(this.flipX=!this.flipX,i*=-1):"scaleY"===t&&i<0?(this.flipY=!this.flipY,i*=-1):"shadow"!==t||!i||i instanceof e.Shadow?"dirty"===t&&this.group&&this.group.set("dirty",i):i=new e.Shadow(i),this[t]=i,r&&(s=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(t)>-1?(this.dirty=!0,s&&this.group.set("dirty",!0)):s&&this.stateProperties.indexOf(t)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:e.iMatrix.concat()},isNotVisible:function(){return 0===this.opacity||0===this.width&&0===this.height&&0===this.strokeWidth||!this.visible},render:function(t){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(t.save(),this._setupCompositeOperation(t),this.drawSelectionBackground(t),this.transform(t),this._setOpacity(t),this._setShadow(t,this),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.clipTo&&e.util.clipContext(this,t),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(t)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(t),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),this.clipTo&&t.restore(),t.restore())},renderCache:function(t){t=t||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,t.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&"transparent"!==this.stroke&&0!==this.strokeWidth},hasFill:function(){return this.fill&&"transparent"!==this.fill},needsItsOwnCache:function(){return!("stroke"!==this.paintFirst||!this.hasFill()||!this.hasStroke()||"object"!=typeof this.shadow)||!!this.clipPath},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},drawClipPathOnCache:function(t){var i=this.clipPath;if(t.save(),i.inverted?t.globalCompositeOperation="destination-out":t.globalCompositeOperation="destination-in",i.absolutePositioned){var n=e.util.invertTransform(this.calcTransformMatrix());t.transform(n[0],n[1],n[2],n[3],n[4],n[5])}i.transform(t),t.scale(1/i.zoomX,1/i.zoomY),t.drawImage(i._cacheCanvas,-i.cacheTranslationX,-i.cacheTranslationY),t.restore()},drawObject:function(t,e){var i=this.fill,n=this.stroke;e?(this.fill="black",this.stroke="",this._setClippingProperties(t)):(this._renderBackground(t),this._setStrokeStyles(t,this),this._setFillStyles(t,this)),this._render(t),this._drawClipPath(t),this.fill=i,this.stroke=n},_drawClipPath:function(t){var e=this.clipPath;e&&(e.canvas=this.canvas,e.shouldCache(),e._transformDone=!0,e.renderCache({forClipping:!0}),this.drawClipPathOnCache(t))},drawCacheOnCanvas:function(t){t.scale(1/this.zoomX,1/this.zoomY),t.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(t){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!t&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!t){var e=this.cacheWidth/this.zoomX,i=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-e/2,-i/2,e,i)}return!0}return!1},_renderBackground:function(t){if(this.backgroundColor){var e=this._getNonTransformedDimensions();t.fillStyle=this.backgroundColor,t.fillRect(-e.x/2,-e.y/2,e.x,e.y),this._removeShadow(t)}},_setOpacity:function(t){this.group&&!this.group._transformDone?t.globalAlpha=this.getObjectOpacity():t.globalAlpha*=this.opacity},_setStrokeStyles:function(t,e){e.stroke&&(t.lineWidth=e.strokeWidth,t.lineCap=e.strokeLineCap,t.lineDashOffset=e.strokeDashOffset,t.lineJoin=e.strokeLineJoin,t.miterLimit=e.strokeMiterLimit,t.strokeStyle=e.stroke.toLive?e.stroke.toLive(t,this):e.stroke)},_setFillStyles:function(t,e){e.fill&&(t.fillStyle=e.fill.toLive?e.fill.toLive(t,this):e.fill)},_setClippingProperties:function(t){t.globalAlpha=1,t.strokeStyle="transparent",t.fillStyle="#000000"},_setLineDash:function(t,e,i){e&&0!==e.length&&(1&e.length&&e.push.apply(e,e),a?t.setLineDash(e):i&&i(t))},_renderControls:function(t,i){var n,r,s,a=this.getViewportTransform(),l=this.calcTransformMatrix();r=void 0!==(i=i||{}).hasBorders?i.hasBorders:this.hasBorders,s=void 0!==i.hasControls?i.hasControls:this.hasControls,l=e.util.multiplyTransformMatrices(a,l),n=e.util.qrDecompose(l),t.save(),t.translate(n.translateX,n.translateY),t.lineWidth=1*this.borderScaleFactor,this.group||(t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),i.forActiveSelection?(t.rotate(o(n.angle)),r&&this.drawBordersInGroup(t,n,i)):(t.rotate(o(this.angle)),r&&this.drawBorders(t,i)),s&&this.drawControls(t,i),t.restore()},_setShadow:function(t){if(this.shadow){var i,n=this.shadow,r=this.canvas,s=r&&r.viewportTransform[0]||1,o=r&&r.viewportTransform[3]||1;i=n.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),r&&r._isRetinaScaling()&&(s*=e.devicePixelRatio,o*=e.devicePixelRatio),t.shadowColor=n.color,t.shadowBlur=n.blur*e.browserShadowBlurConstant*(s+o)*(i.scaleX+i.scaleY)/4,t.shadowOffsetX=n.offsetX*s*i.scaleX,t.shadowOffsetY=n.offsetY*o*i.scaleY}},_removeShadow:function(t){this.shadow&&(t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0)},_applyPatternGradientTransform:function(t,e){if(!e||!e.toLive)return{offsetX:0,offsetY:0};var i=e.gradientTransform||e.patternTransform,n=-this.width/2+e.offsetX||0,r=-this.height/2+e.offsetY||0;return"percentage"===e.gradientUnits?t.transform(this.width,0,0,this.height,n,r):t.transform(1,0,0,1,n,r),i&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),{offsetX:n,offsetY:r}},_renderPaintInOrder:function(t){"stroke"===this.paintFirst?(this._renderStroke(t),this._renderFill(t)):(this._renderFill(t),this._renderStroke(t))},_render:function(){},_renderFill:function(t){this.fill&&(t.save(),this._applyPatternGradientTransform(t,this.fill),"evenodd"===this.fillRule?t.fill("evenodd"):t.fill(),t.restore())},_renderStroke:function(t){if(this.stroke&&0!==this.strokeWidth){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this.strokeUniform&&this.group){var e=this.getObjectScaling();t.scale(1/e.scaleX,1/e.scaleY)}else this.strokeUniform&&t.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(t,this.strokeDashArray,this._renderDashedStroke),this.stroke.toLive&&"percentage"===this.stroke.gradientUnits?this._applyPatternForTransformedGradient(t,this.stroke):this._applyPatternGradientTransform(t,this.stroke),t.stroke(),t.restore()}},_applyPatternForTransformedGradient:function(t,i){var n,r=this._limitCacheSize(this._getCacheCanvasDimensions()),s=e.util.createCanvasElement(),o=this.canvas.getRetinaScaling(),a=r.x/this.scaleX/o,l=r.y/this.scaleY/o;s.width=a,s.height=l,(n=s.getContext("2d")).beginPath(),n.moveTo(0,0),n.lineTo(a,0),n.lineTo(a,l),n.lineTo(0,l),n.closePath(),n.translate(a/2,l/2),n.scale(r.zoomX/this.scaleX/o,r.zoomY/this.scaleY/o),this._applyPatternGradientTransform(n,i),n.fillStyle=i.toLive(t),n.fill(),t.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),t.scale(o*this.scaleX/r.zoomX,o*this.scaleY/r.zoomY),t.strokeStyle=n.createPattern(s,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var t=e.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",t.scaleX),this.set("scaleY",t.scaleY),this.angle=t.angle,this.skewX=t.skewX,this.skewY=0}},_removeTransformMatrix:function(t){var i=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),i=e.util.transformPoint(i,this.transformMatrix)),this.transformMatrix=null,t&&(this.scaleX*=t.scaleX,this.scaleY*=t.scaleY,this.cropX=t.cropX,this.cropY=t.cropY,i.x+=t.offsetLeft,i.y+=t.offsetTop,this.width=t.width,this.height=t.height),this.setPositionByOrigin(i,"center","center")},clone:function(t,i){var n=this.toObject(i);this.constructor.fromObject?this.constructor.fromObject(n,t):e.Object._fromObject("Object",n,t)},cloneAsImage:function(t,i){var n=this.toCanvasElement(i);return t&&t(new e.Image(n)),this},toCanvasElement:function(t){t||(t={});var i=e.util,n=i.saveObjectTransform(this),r=this.group,s=this.shadow,o=Math.abs,a=(t.multiplier||1)*(t.enableRetinaScaling?e.devicePixelRatio:1);delete this.group,t.withoutTransform&&i.resetObjectTransform(this),t.withoutShadow&&(this.shadow=null);var l,h,c,u,d=e.util.createCanvasElement(),f=this.getBoundingRect(!0,!0),p=this.shadow,g={x:0,y:0};p&&(h=p.blur,l=p.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),g.x=2*Math.round(o(p.offsetX)+h)*o(l.scaleX),g.y=2*Math.round(o(p.offsetY)+h)*o(l.scaleY)),c=f.width+g.x,u=f.height+g.y,d.width=Math.ceil(c),d.height=Math.ceil(u);var m=new e.StaticCanvas(d,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});"jpeg"===t.format&&(m.backgroundColor="#fff"),this.setPositionByOrigin(new e.Point(m.width/2,m.height/2),"center","center");var v=this.canvas;m.add(this);var y=m.toCanvasElement(a||1,t);return this.shadow=s,this.set("canvas",v),r&&(this.group=r),this.set(n).setCoords(),m._objects=[],m.dispose(),m=null,y},toDataURL:function(t){return t||(t={}),e.util.toDataURL(this.toCanvasElement(t),t.format||"png",t.quality||1)},isType:function(t){return this.type===t},complexity:function(){return 1},toJSON:function(t){return this.toObject(t)},setGradient:function(t,i){i||(i={});var n={colorStops:[]};return n.type=i.type||(i.r1||i.r2?"radial":"linear"),n.coords={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},n.gradientUnits=i.gradientUnits||"pixels",(i.r1||i.r2)&&(n.coords.r1=i.r1,n.coords.r2=i.r2),n.gradientTransform=i.gradientTransform,e.Gradient.prototype.addColorStop.call(n,i.colorStops),this.set(t,e.Gradient.forObject(this,n))},setPatternFill:function(t,i){return this.set("fill",new e.Pattern(t,i))},setShadow:function(t){return this.set("shadow",t?new e.Shadow(t):null)},setColor:function(t){return this.set("fill",t),this},rotate:function(t){var e=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return e&&this._setOriginToCenter(),this.set("angle",t),e&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(t,i){i=i||this.canvas.getPointer(t);var n=new e.Point(i.x,i.y),r=this._getLeftTopCoords();return this.angle&&(n=e.util.rotatePoint(n,r,o(-this.angle))),{x:n.x-r.x,y:n.y-r.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}}),e.util.createAccessors&&e.util.createAccessors(e.Object),i(e.Object.prototype,e.Observable),e.Object.NUM_FRACTION_DIGITS=2,e.Object._fromObject=function(t,i,r,s){var o=e[t];i=n(i,!0),e.util.enlivenPatterns([i.fill,i.stroke],(function(t){void 0!==t[0]&&(i.fill=t[0]),void 0!==t[1]&&(i.stroke=t[1]),e.util.enlivenObjects([i.clipPath],(function(t){i.clipPath=t[0];var e=s?new o(i[s],i):new o(i);r&&r(e)}))}))},e.Object.__uid=0)}(e),y=S.util.degreesToRadians,_={left:-.5,center:0,right:.5},A={top:-.5,center:0,bottom:.5},S.util.object.extend(S.Object.prototype,{translateToGivenOrigin:function(t,e,i,n,r){var s,o,a,l=t.x,h=t.y;return"string"==typeof e?e=_[e]:e-=.5,"string"==typeof n?n=_[n]:n-=.5,"string"==typeof i?i=A[i]:i-=.5,"string"==typeof r?r=A[r]:r-=.5,o=r-i,((s=n-e)||o)&&(a=this._getTransformedDimensions(),l=t.x+s*a.x,h=t.y+o*a.y),new S.Point(l,h)},translateToCenterPoint:function(t,e,i){var n=this.translateToGivenOrigin(t,e,i,"center","center");return this.angle?S.util.rotatePoint(n,t,y(this.angle)):n},translateToOriginPoint:function(t,e,i){var n=this.translateToGivenOrigin(t,"center","center",e,i);return this.angle?S.util.rotatePoint(n,t,y(this.angle)):n},getCenterPoint:function(){var t=new S.Point(this.left,this.top);return this.translateToCenterPoint(t,this.originX,this.originY)},getPointByOrigin:function(t,e){var i=this.getCenterPoint();return this.translateToOriginPoint(i,t,e)},toLocalPoint:function(t,e,i){var n,r,s=this.getCenterPoint();return n=void 0!==e&&void 0!==i?this.translateToGivenOrigin(s,"center","center",e,i):new S.Point(this.left,this.top),r=new S.Point(t.x,t.y),this.angle&&(r=S.util.rotatePoint(r,s,-y(this.angle))),r.subtractEquals(n)},setPositionByOrigin:function(t,e,i){var n=this.translateToCenterPoint(t,e,i),r=this.translateToOriginPoint(n,this.originX,this.originY);this.set("left",r.x),this.set("top",r.y)},adjustPosition:function(t){var e,i,n=y(this.angle),r=this.getScaledWidth(),s=S.util.cos(n)*r,o=S.util.sin(n)*r;e="string"==typeof this.originX?_[this.originX]:this.originX-.5,i="string"==typeof t?_[t]:t-.5,this.left+=s*(i-e),this.top+=o*(i-e),this.setCoords(),this.originX=t},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var t=this.getCenterPoint();this.originX="center",this.originY="center",this.left=t.x,this.top=t.y},_resetOrigin:function(){var t=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=t.x,this.top=t.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var t=S.util.degreesToRadians,e=S.util.multiplyTransformMatrices,i=S.util.transformPoint;S.util.object.extend(S.Object.prototype,{oCoords:null,aCoords:null,ownMatrixCache:null,matrixCache:null,getCoords:function(t,e){this.oCoords||this.setCoords();var i=t?this.aCoords:this.oCoords;return function(t){return[new S.Point(t.tl.x,t.tl.y),new S.Point(t.tr.x,t.tr.y),new S.Point(t.br.x,t.br.y),new S.Point(t.bl.x,t.bl.y)]}(e?this.calcCoords(t):i)},intersectsWithRect:function(t,e,i,n){var r=this.getCoords(i,n);return"Intersection"===S.Intersection.intersectPolygonRectangle(r,t,e).status},intersectsWithObject:function(t,e,i){return"Intersection"===S.Intersection.intersectPolygonPolygon(this.getCoords(e,i),t.getCoords(e,i)).status||t.isContainedWithinObject(this,e,i)||this.isContainedWithinObject(t,e,i)},isContainedWithinObject:function(t,e,i){for(var n=this.getCoords(e,i),r=0,s=t._getImageLines(i?t.calcCoords(e):e?t.aCoords:t.oCoords);r<4;r++)if(!t.containsPoint(n[r],s))return!1;return!0},isContainedWithinRect:function(t,e,i,n){var r=this.getBoundingRect(i,n);return r.left>=t.x&&r.left+r.width<=e.x&&r.top>=t.y&&r.top+r.height<=e.y}
3,containsPoint:function(t,e,i,n){e=e||this._getImageLines(n?this.calcCoords(i):i?this.aCoords:this.oCoords);var r=this._findCrossPoints(t,e);return 0!==r&&r%2==1},isOnScreen:function(t){if(!this.canvas)return!1;for(var e,i=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br,r=this.getCoords(!0,t),s=0;s<4;s++)if((e=r[s]).x<=n.x&&e.x>=i.x&&e.y<=n.y&&e.y>=i.y)return!0;return!!this.intersectsWithRect(i,n,!0,t)||this._containsCenterOfCanvas(i,n,t)},_containsCenterOfCanvas:function(t,e,i){var n={x:(t.x+e.x)/2,y:(t.y+e.y)/2};return!!this.containsPoint(n,null,!0,i)},isPartiallyOnScreen:function(t){if(!this.canvas)return!1;var e=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br;return!!this.intersectsWithRect(e,i,!0,t)||this._containsCenterOfCanvas(e,i,t)},_getImageLines:function(t){return{topline:{o:t.tl,d:t.tr},rightline:{o:t.tr,d:t.br},bottomline:{o:t.br,d:t.bl},leftline:{o:t.bl,d:t.tl}}},_findCrossPoints:function(t,e){var i,n,r,s=0;for(var o in e)if(!((r=e[o]).o.y<t.y&&r.d.y<t.y||r.o.y>=t.y&&r.d.y>=t.y||(r.o.x===r.d.x&&r.o.x>=t.x?n=r.o.x:(0,i=(r.d.y-r.o.y)/(r.d.x-r.o.x),n=-(t.y-0*t.x-(r.o.y-i*r.o.x))/(0-i)),n>=t.x&&(s+=1),2!==s)))break;return s},getBoundingRect:function(t,e){var i=this.getCoords(t,e);return S.util.makeBoundingBoxFromPoints(i)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(t){return Math.abs(t)<this.minScaleLimit?t<0?-this.minScaleLimit:this.minScaleLimit:0===t?1e-4:t},scale:function(t){return this._set("scaleX",t),this._set("scaleY",t),this.setCoords()},scaleToWidth:function(t,e){var i=this.getBoundingRect(e).width/this.getScaledWidth();return this.scale(t/this.width/i)},scaleToHeight:function(t,e){var i=this.getBoundingRect(e).height/this.getScaledHeight();return this.scale(t/this.height/i)},calcCoords:function(n){var r=this._calcRotateMatrix(),s=this._calcTranslateMatrix(),o=e(s,r),a=this.getViewportTransform(),l=n?o:e(a,o),h=this._getTransformedDimensions(),c=h.x/2,u=h.y/2,d=i({x:-c,y:-u},l),f=i({x:c,y:-u},l),p=i({x:-c,y:u},l),g=i({x:c,y:u},l);if(!n){var m=this.padding,v=t(this.angle),y=S.util.cos(v),_=S.util.sin(v),A=y*m,b=_*m,C=A+b,w=A-b;m&&(d.x-=w,d.y-=C,f.x+=C,f.y-=w,p.x-=C,p.y+=w,g.x+=w,g.y+=C);var x=new S.Point((d.x+p.x)/2,(d.y+p.y)/2),T=new S.Point((f.x+d.x)/2,(f.y+d.y)/2),k=new S.Point((g.x+f.x)/2,(g.y+f.y)/2),O=new S.Point((g.x+p.x)/2,(g.y+p.y)/2),P=new S.Point(T.x+_*this.rotatingPointOffset,T.y-y*this.rotatingPointOffset)}var D={tl:d,tr:f,br:g,bl:p};return n||(D.ml=x,D.mt=T,D.mr=k,D.mb=O,D.mtr=P),D},setCoords:function(t,e){return this.oCoords=this.calcCoords(t),e||(this.aCoords=this.calcCoords(!0)),t||this._setCornerCoords&&this._setCornerCoords(),this},_calcRotateMatrix:function(){return S.util.calcRotateMatrix(this)},_calcTranslateMatrix:function(){var t=this.getCenterPoint();return[1,0,0,1,t.x,t.y]},transformMatrixKey:function(t){var e="";return!t&&this.group&&(e=this.group.transformMatrixKey(t)+"_"),e+this.top+"_"+this.left+"_"+this.scaleX+"_"+this.scaleY+"_"+this.skewX+"_"+this.skewY+"_"+this.angle+"_"+this.originX+"_"+this.originY+"_"+this.width+"_"+this.height+"_"+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(t){if(t)return this.calcOwnMatrix();var i=this.transformMatrixKey(),n=this.matrixCache||(this.matrixCache={});if(n.key===i)return n.value;var r=this.calcOwnMatrix();return this.group&&(r=e(this.group.calcTransformMatrix(),r)),n.key=i,n.value=r,r},calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),e=this.ownMatrixCache||(this.ownMatrixCache={});if(e.key===t)return e.value;var i=this._calcTranslateMatrix();return this.translateX=i[4],this.translateY=i[5],e.key=t,e.value=S.util.composeMatrix(this),e.value},_calcDimensionsTransformMatrix:function(t,e,i){return S.util.calcDimensionsMatrix({skewX:t,skewY:e,scaleX:this.scaleX*(i&&this.flipX?-1:1),scaleY:this.scaleY*(i&&this.flipY?-1:1)})},_getNonTransformedDimensions:function(){var t=this.strokeWidth;return{x:this.width+t,y:this.height+t}},_getTransformedDimensions:function(t,e){void 0===t&&(t=this.skewX),void 0===e&&(e=this.skewY);var i,n,r=this._getNonTransformedDimensions(),s=0===t&&0===e;
vendor: 8,822 bytes, line 3
3if(this.strokeUniform?(i=this.width,n=this.height):(i=r.x,n=r.y),s)return this._finalizeDimensions(i*this.scaleX,n*this.scaleY);var o=[{x:-(i/=2),y:-(n/=2)},{x:i,y:-n},{x:-i,y:n},{x:i,y:n}],a=S.util.calcDimensionsMatrix({scaleX:this.scaleX,scaleY:this.scaleY,skewX:t,skewY:e}),l=S.util.makeBoundingBoxFromPoints(o,a);return this._finalizeDimensions(l.width,l.height)},_finalizeDimensions:function(t,e){return this.strokeUniform?{x:t+this.strokeWidth,y:e+this.strokeWidth}:{x:t,y:e}},_calculateCurrentDimensions:function(){var t=this.getViewportTransform(),e=this._getTransformedDimensions();return S.util.transformPoint(e,t,!0).scalarAdd(2*this.padding)}})}(),S.util.object.extend(S.Object.prototype,{sendToBack:function(){return this.group?S.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?S.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(t){return this.group?S.StaticCanvas.prototype.sendBackwards.call(this.group,this,t):this.canvas&&this.canvas.sendBackwards(this,t),this},bringForward:function(t){return this.group?S.StaticCanvas.prototype.bringForward.call(this.group,this,t):this.canvas&&this.canvas.bringForward(this,t),this},moveTo:function(t){return this.group&&"activeSelection"!==this.group.type?S.StaticCanvas.prototype.moveTo.call(this.group,this,t):this.canvas&&this.canvas.moveTo(this,t),this}}),function(){function t(t,e){if(e){if(e.toLive)return t+": url(#SVGID_"+e.id+"); ";var i=new S.Color(e),n=t+": "+i.toRgb()+"; ",r=i.getAlpha();return 1!==r&&(n+=t+"-opacity: "+r.toString()+"; "),n}return t+": none; "}var e=S.util.toFixed;S.util.object.extend(S.Object.prototype,{getSvgStyles:function(e){var i=this.fillRule?this.fillRule:"nonzero",n=this.strokeWidth?this.strokeWidth:"0",r=this.strokeDashArray?this.strokeDashArray.join(" "):"none",s=this.strokeDashOffset?this.strokeDashOffset:"0",o=this.strokeLineCap?this.strokeLineCap:"butt",a=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",h=void 0!==this.opacity?this.opacity:"1",c=this.visible?"":" visibility: hidden;",u=e?"":this.getSvgFilter(),d=t("fill",this.fill);return[t("stroke",this.stroke),"stroke-width: ",n,"; ","stroke-dasharray: ",r,"; ","stroke-linecap: ",o,"; ","stroke-dashoffset: ",s,"; ","stroke-linejoin: ",a,"; ","stroke-miterlimit: ",l,"; ",d,"fill-rule: ",i,"; ","opacity: ",h,";",u,c].join("")},getSvgSpanStyles:function(e,i){var n=e.fontFamily?"font-family: "+(-1===e.fontFamily.indexOf("'")&&-1===e.fontFamily.indexOf('"')?"'"+e.fontFamily+"'":e.fontFamily)+"; ":"",r=e.strokeWidth?"stroke-width: "+e.strokeWidth+"; ":"",s=(n=n,e.fontSize?"font-size: "+e.fontSize+"px; ":""),o=e.fontStyle?"font-style: "+e.fontStyle+"; ":"",a=e.fontWeight?"font-weight: "+e.fontWeight+"; ":"",l=e.fill?t("fill",e.fill):"",h=e.stroke?t("stroke",e.stroke):"",c=this.getSvgTextDecoration(e);return c&&(c="text-decoration: "+c+"; "),[h,r,n,s,o,a,c,l,e.deltaY?"baseline-shift: "+-e.deltaY+"; ":"",i?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(t){return["overline","underline","line-through"].filter((function(e){return t[e.replace("-","")]})).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(t,e){var i=t?this.calcTransformMatrix():this.calcOwnMatrix();return'transform="'+S.util.matrixToSVG(i)+(e||"")+this.getSvgTransformMatrix()+'" '},getSvgTransformMatrix:function(){return this.transformMatrix?" "+S.util.matrixToSVG(this.transformMatrix):""},_setSVGBg:function(t){if(this.backgroundColor){var i=S.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',e(-this.width/2,i),'" y="',e(-this.height/2,i),'" width="',e(this.width,i),'" height="',e(this.height,i),'"></rect>\n')}},toSVG:function(t){return this._createBaseSVGMarkup(this._toSVG(t),{reviver:t})},toClipPathSVG:function(t){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(t),{reviver:t})},_createBaseClipPathSVGMarkup:function(t,e){var i=(e=e||{}).reviver,n=e.additionalTransform||"",r=[this.getSvgTransform(!0,n),this.getSvgCommons()].join(""),s=t.indexOf("COMMON_PARTS");return t[s]=r,i?i(t.join("")):t.join("")},_createBaseSVGMarkup:function(t,e){var i,n,r=(e=e||{}).noStyle,s=e.reviver,o=r?"":'style="'+this.getSvgStyles()+'" ',a=e.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,h=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",c=l&&l.absolutePositioned,u=this.stroke,d=this.fill,f=this.shadow,p=[],g=t.indexOf("COMMON_PARTS"),m=e.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+S.Object.__uid++,n='<clipPath id="'+l.clipPathId+'" >\n'+l.toClipPathSVG(s)+"</clipPath>\n"),c&&p.push("<g ",a,this.getSvgCommons()," >\n"),p.push("<g ",this.getSvgTransform(!1),c?"":a+this.getSvgCommons()," >\n"),i=[o,h,r?"":this.addPaintOrder()," ",m?'transform="'+m+'" ':""].join(""),t[g]=i,d&&d.toLive&&p.push(d.toSVG(this)),u&&u.toLive&&p.push(u.toSVG(this)),f&&p.push(f.toSVG(this)),l&&p.push(n),p.push(t.join("")),p.push("</g>\n"),c&&p.push("</g>\n"),s?s(p.join("")):p.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var t=S.util.object.extend;function e(e,i,n){var r={};n.forEach((function(t){r[t]=e[t]})),t(e[i],r,!0)}S.util.object.extend(S.Object.prototype,{hasStateChanged:function(t){var e="_"+(t=t||"stateProperties");return Object.keys(this[e]).length<this[t].length||!function t(e,i,n){if(e===i)return!0;if(Array.isArray(e)){if(!Array.isArray(i)||e.length!==i.length)return!1;for(var r=0,s=e.length;r<s;r++)if(!t(e[r],i[r]))return!1;return!0}if(e&&"object"==typeof e){var o,a=Object.keys(e);if(!i||"object"!=typeof i||!n&&a.length!==Object.keys(i).length)return!1;for(r=0,s=a.length;r<s;r++)if("canvas"!==(o=a[r])&&!t(e[o],i[o]))return!1;return!0}}(this[e],this,!0)},saveState:function(t){var i=t&&t.propertySet||"stateProperties",n="_"+i;return this[n]?(e(this,n,this[i]),t&&t.stateProperties&&e(this,n,t.stateProperties),this):this.setupState(t)},setupState:function(t){var e=(t=t||{}).propertySet||"stateProperties";return t.propertySet=e,this["_"+e]={},this.saveState(t),this}})}(),function(){var t=S.util.degreesToRadians;S.util.object.extend(S.Object.prototype,{_controlsVisibility:null,_findTargetCorner:function(t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var e,i,n=t.x,r=t.y;for(var s in this.__corner=0,this.oCoords)if(this.isControlVisible(s)&&("mtr"!==s||this.hasRotatingPoint)&&(!this.get("lockUniScaling")||"mt"!==s&&"mr"!==s&&"mb"!==s&&"ml"!==s)&&(i=this._getImageLines(this.oCoords[s].corner),0!==(e=this._findCrossPoints({x:n,y:r},i))&&e%2==1))return this.__corner=s,s;return!1},_setCornerCoords:function(){var e,i,n=this.oCoords,r=t(45-this.angle),s=.707106*this.cornerSize,o=s*S.util.cos(r),a=s*S.util.sin(r);for(var l in n)e=n[l].x,i=n[l].y,n[l].corner={tl:{x:e-a,y:i-o},tr:{x:e+o,y:i-a},bl:{x:e-o,y:i+a},br:{x:e+a,y:i+o}}},drawSelectionBackground:function(e){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;e.save();var i=this.getCenterPoint(),n=this._calculateCurrentDimensions(),r=this.canvas.viewportTransform;return e.translate(i.x,i.y),e.scale(1/r[0],1/r[3]),e.rotate(t(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-n.x/2,-n.y/2,n.x,n.y),e.restore(),this},drawBorders:function(t,e){e=e||{};var i=this._calculateCurrentDimensions(),n=this.borderScaleFactor,r=i.x+n,s=i.y+n,o=void 0!==e.hasRotatingPoint?e.hasRotatingPoint:this.hasRotatingPoint,a=void 0!==e.hasControls?e.hasControls:this.hasControls,l=void 0!==e.rotatingPointOffset?e.rotatingPointOffset:this.rotatingPointOffset;if(t.save(),t.strokeStyle=e.borderColor||this.borderColor,this._setLineDash(t,e.borderDashArray||this.borderDashArray,null),t.strokeRect(-r/2,-s/2,r,s),o&&this.isControlVisible("mtr")&&a){var h=-s/2;t.beginPath(),t.moveTo(0,h),t.lineTo(0,h-l),t.stroke()}return t.restore(),this},drawBordersInGroup:function(t,e,i){i=i||{};var n={x:this.width,y:this.height},r=S.util.composeMatrix({scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX}),s=S.util.transformPoint(n,r),o=this.strokeWidth,a=this.borderScaleFactor,l=s.x+o*(this.strokeUniform?this.canvas.getZoom():e.scaleX)+a,h=s.y+o*(this.strokeUniform?this.canvas.getZoom():e.scaleY)+a;return t.save(),this._setLineDash(t,i.borderDashArray||this.borderDashArray,null),t.strokeStyle=i.borderColor||this.borderColor,t.strokeRect(-l/2,-h/2,l,h),t.restore(
3),this},drawControls:function(t,e){e=e||{};var i=this._calculateCurrentDimensions(),n=i.x,r=i.y,s=e.cornerSize||this.cornerSize,o=-(n+s)/2,a=-(r+s)/2,l=void 0!==e.transparentCorners?e.transparentCorners:this.transparentCorners,h=void 0!==e.hasRotatingPoint?e.hasRotatingPoint:this.hasRotatingPoint,c=l?"stroke":"fill";return t.save(),t.strokeStyle=t.fillStyle=e.cornerColor||this.cornerColor,this.transparentCorners||(t.strokeStyle=e.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(t,e.cornerDashArray||this.cornerDashArray,null),this._drawControl("tl",t,c,o,a,e),this._drawControl("tr",t,c,o+n,a,e),this._drawControl("bl",t,c,o,a+r,e),this._drawControl("br",t,c,o+n,a+r,e),this.get("lockUniScaling")||(this._drawControl("mt",t,c,o+n/2,a,e),this._drawControl("mb",t,c,o+n/2,a+r,e),this._drawControl("mr",t,c,o+n,a+r/2,e),this._drawControl("ml",t,c,o,a+r/2,e)),h&&this._drawControl("mtr",t,c,o+n/2,a-this.rotatingPointOffset,e),t.restore(),this},_drawControl:function(t,e,i,n,r,s){if(s=s||{},this.isControlVisible(t)){var o=this.cornerSize,a=!this.transparentCorners&&this.cornerStrokeColor;switch(s.cornerStyle||this.cornerStyle){case"circle":e.beginPath(),e.arc(n+o/2,r+o/2,o/2,0,2*Math.PI,!1),e[i](),a&&e.stroke();break;default:this.transparentCorners||e.clearRect(n,r,o,o),e[i+"Rect"](n,r,o,o),a&&e.strokeRect(n,r,o,o)}}},isControlVisible:function(t){return this._getControlsVisibility()[t]},setControlVisible:function(t,e){return this._getControlsVisibility()[t]=e,this},setControlsVisibility:function(t){for(var e in t||(t={}),t)this.setControlVisible(e,t[e]);return this},_getControlsVisibility:function(){return this._controlsVisibility||(this._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!0,mt:!0,mr:!0,mb:!0,mtr:!0}),this._controlsVisibility},onDeselect:function(){},onSelect:function(){}})}(),S.util.object.extend(S.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,s=this;return S.util.animate({startValue:t.left,endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(e){t.set("left",e),s.requestRenderAll(),r()},onComplete:function(){t.setCoords(),n()}}),this},fxCenterObjectV:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,s=this;return S.util.animate({startValue:t.top,endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(e){t.set("top",e),s.requestRenderAll(),r()},onComplete:function(){t.setCoords(),n()}}),this},fxRemove:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,s=this;return S.util.animate({startValue:t.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(e){t.set("opacity",e),s.requestRenderAll(),r()},onComplete:function(){s.remove(t),n()}}),this}}),S.util.object.extend(S.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var t,e,i=[];for(t in arguments[0])i.push(t);for(var n=0,r=i.length;n<r;n++)t=i[n],e=n!==r-1,this._animate(t,arguments[0][t],arguments[1],e)}else this._animate.apply(this,arguments);return this},_animate:function(t,e,i,n){var r,s=this;e=e.toString(),i=i?S.util.object.clone(i):{},~t.indexOf(".")&&(r=t.split("."));var o=r?this.get(r[0])[r[1]]:this.get(t);"from"in i||(i.from=o),e=~e.indexOf("=")?o+parseFloat(e.replace("=","")):parseFloat(e),S.util.animate({startValue:i.from,endValue:e,byValue:i.by,easing:i.easing,duration:i.duration,abort:i.abort&&function(){return i.abort.call(s)},onChange:function(e,o,a){r?s[r[0]][r[1]]=e:s.set(t,e),n||i.onChange&&i.onChange(e,o,a)},onComplete:function(t,e,r){n||(s.setCoords(),i.onComplete&&i.onComplete(t,e,r))}})}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.util.object.clone,r={x1:1,x2:1,y1:1,y2:1},s=e.StaticCanvas.supports("setLineDash");function o(t,e){var i=t.origin,n=t.axis1,r=t.axis2,s=t.dimension,o=e.nearest,a=e.center,l=e.farthest;return function(){switch(this.get(i)){case o:return Math.min(this.get(n),this.get(r));case a:return Math.min(this.get(n),this.get(r))+.5*this.get(s);case l:return Math.max(this.get(n),this.get(r))}}}e.Line?e.warn("fabric.Line is already defined"):(e.Line=e.util.createClass(e.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:e.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(t,e){t||(t=[0,0,0,0]),this.callSuper("initialize",e),this.set("x1",t[0]),this.set("y1",t[1]),this.set("x2",t[2]),this.set("y2",t[3]),this._setWi
vendor: 9,234 bytes, line 3
3dthHeight(e)},_setWidthHeight:function(t){t||(t={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in t?t.left:this._getLeftToOriginX(),this.top="top"in t?t.top:this._getTopToOriginY()},_set:function(t,e){return this.callSuper("_set",t,e),void 0!==r[t]&&this._setWidthHeight(),this},_getLeftToOriginX:o({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:o({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(t){if(t.beginPath(),!this.strokeDashArray||this.strokeDashArray&&s){var e=this.calcLinePoints();t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2)}t.lineWidth=this.strokeWidth;var i=t.strokeStyle;t.strokeStyle=this.stroke||t.fillStyle,this.stroke&&this._renderStroke(t),t.strokeStyle=i},_renderDashedStroke:function(t){var i=this.calcLinePoints();t.beginPath(),e.util.drawDashedLine(t,i.x1,i.y1,i.x2,i.y2,this.strokeDashArray),t.closePath()},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(t){return i(this.callSuper("toObject",t),this.calcLinePoints())},_getNonTransformedDimensions:function(){var t=this.callSuper("_getNonTransformedDimensions");return"butt"===this.strokeLineCap&&(0===this.width&&(t.y-=this.strokeWidth),0===this.height&&(t.x-=this.strokeWidth)),t},calcLinePoints:function(){var t=this.x1<=this.x2?-1:1,e=this.y1<=this.y2?-1:1,i=t*this.width*.5,n=e*this.height*.5;return{x1:i,x2:t*this.width*-.5,y1:n,y2:e*this.height*-.5}},_toSVG:function(){var t=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="',t.x1,'" y1="',t.y1,'" x2="',t.x2,'" y2="',t.y2,'" />\n']}}),e.Line.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),e.Line.fromElement=function(t,n,r){r=r||{};var s=e.parseAttributes(t,e.Line.ATTRIBUTE_NAMES),o=[s.x1||0,s.y1||0,s.x2||0,s.y2||0];n(new e.Line(o,i(s,r)))},e.Line.fromObject=function(t,i){var r=n(t,!0);r.points=[t.x1,t.y1,t.x2,t.y2],e.Object._fromObject("Line",r,(function(t){delete t.points,i&&i(t)}),"points")})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=Math.PI;e.Circle?e.warn("fabric.Circle is already defined."):(e.Circle=e.util.createClass(e.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*i,cacheProperties:e.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(t,e){return this.callSuper("_set",t,e),"radius"===t&&this.setRadius(e),this},toObject:function(t){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(t))},_toSVG:function(){var t,n=(this.endAngle-this.startAngle)%(2*i);if(0===n)t=["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',this.radius,'" />\n'];else{var r=e.util.cos(this.startAngle)*this.radius,s=e.util.sin(this.startAngle)*this.radius,o=e.util.cos(this.endAngle)*this.radius,a=e.util.sin(this.endAngle)*this.radius,l=n>i?"1":"0";t=['<path d="M '+r+" "+s," A "+this.radius+" "+this.radius," 0 ",+l+" 1"," "+o+" "+a,'" ',"COMMON_PARTS"," />\n"]}return t},_render:function(t){t.beginPath(),t.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderPaintInOrder(t)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(t){return this.radius=t,this.set("width",2*t).set("height",2*t)}}),e.Circle.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),e.Circle.fromElement=function(t,i){var n,r=e.parseAttributes(t,e.Circle.ATTRIBUTE_NAMES);if(!("radius"in(n=r)&&n.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");r.left=(r.left||0)-r.radius,r.top=(r.top||0)-r.radius,i(new e.Circle(r))},e.Circle.fromObject=function(t,i){return e.Object._fromObject("Circle",t,i)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Triangle?e.warn("fabric.Triangle is already defined"):(e.Triangle=e.util.createClass(e.Object,{type:"triangle",width:100,height:100,_render:function(t){var e=this.width/2,i=this.height/2;t.beginPath(),t.moveTo(-e,i),t.lineTo(0,-i),t.lineTo(e,i),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var i=this.width/2,n=this.height/2;t.beginPath(),e.util.drawDashedLine(t,-i,n,0,-n,this.strokeDashArray),e.util.drawDashedLine(t,0,-n,i,n,this.strokeDashArray),e.util.drawDashedLine(t,i,n,-i,n,this.strokeDashArray),t.closePath()},_toSVG:function(){var t=this.width/2,e=this.height/2;return["<polygon ","COMMON_PARTS",'points="',[-t+" "+e,"0 "+-e,t+" "+e].join(","),'" />']}}),e.Triangle.fromObject=function(t,i){return e.Object._fromObject("Triangle",t,i)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=2*Math.PI;e.Ellipse?e.warn("fabric.Ellipse is already defined."):(e.Ellipse=e.util.createClass(e.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:e.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this.set("rx",t&&t.rx||0),this.set("ry",t&&t.ry||0)},_set:function(t,e){switch(this.callSuper("_set",t,e),t){case"rx":this.rx=e,this.set("width",2*e);break;case"ry":this.ry=e,this.set("height",2*e)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},_toSVG:function(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,'" />\n']},_render:function(t){t.beginPath(),t.save(),t.transform(1,0,0,this.ry/this.rx,0,0),t.arc(0,0,this.rx,0,i,!1),t.restore(),this._renderPaintInOrder(t)}}),e.Ellipse.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),e.Ellipse.fromElement=function(t,i){var n=e.parseAttributes(t,e.Ellipse.ATTRIBUTE_NAMES);n.left=(n.left||0)-n.rx,n.top=(n.top||0)-n.ry,i(new e.Ellipse(n))},e.Ellipse.fromObject=function(t,i){return e.Object._fromObject("Ellipse",t,i)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Rect?e.warn("fabric.Rect is already defined"):(e.Rect=e.util.createClass(e.Object,{stateProperties:e.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:e.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(t){var e=this.rx?Math.min(this.rx,this.width/2):0,i=this.ry?Math.min(this.ry,this.height/2):0,n=this.width,r=this.height,s=-this.width/2,o=-this.height/2,a=0!==e||0!==i,l=.4477152502;t.beginPath(),t.moveTo(s+e,o),t.lineTo(s+n-e,o),a&&t.bezierCurveTo(s+n-l*e,o,s+n,o+l*i,s+n,o+i),t.lineTo(s+n,o+r-i),a&&t.bezierCurveTo(s+n,o+r-l*i,s+n-l*e,o+r,s+n-e,o+r),t.lineTo(s+e,o+r),a&&t.bezierCurveTo(s+l*e,o+r,s,o+r-l*i,s,o+r-i),t.lineTo(s,o+i),a&&t.bezierCurveTo(s,o+l*i,s+l*e,o,s+e,o),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var i=-this.width/2,n=-this.height/2,r=this.width,s=this.height;t.beginPath(),e.util.drawDashedLine(t,i,n,i+r,n,this.strokeDashArray),e.util.drawDashedLine(t,i+r,n,i+r,n+s,this.strokeDashArray),e.util.drawDashedLine(t,i+r,n+s,i,n+s,this.strokeDashArray),e.util.drawDashedLine(t,i,n+s,i,n,this.strokeDashArray),t.closePath()},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},_toSVG:function(){return["<rect ","COMMON_PARTS",'x="',-this.width/2,'" y="',-this.height/2,'" rx="',this.rx,'" ry="',this.ry,'" width="',this.width,'" height="',this.height,'" />\n']}}),e.Rect.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),e.Rect.fromElement=function(t,n,r){if(!t)return n(null);r=r||{};var s=e.parseAttributes(t,e.Rect.ATTRIBUTE_NAMES);s.left=s.left||0,s.top=s.top||0,s.height=s.height||0,s.width=s.width||0;var o=new e.Rect(i(r?e.util.object.clone(r):{},s));o.visible=o.visible&&o.width>0&&o.height>0,n(o)},e.Rect.fromObject=function(t,i){return e.Object._fromObject("Rect",t,i)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.util.array.min,r=e.util.array.max,s=e.util.toFixed;e.Polyline?e.warn("fabric.Polyline is already defined"):(e.Polyline=e.util.createClass(e.Object,{type:"polyline",points:null,cacheProperties:e.Object.prototype.cacheProperties.concat("points"),initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e),this._setPositionDimensions(e)},_setPositionDimensions:function(t){var e,i=this._calcDimensions(t);this.width=i.width,this.height=i.height,t.fromSVG||(e=this.translateToGivenOrigin({x:i.left-this.strokeWidth/2,y:i.top-this.strokeWidth/2},"left","top",this.originX,this.originY)),void 0===t.left&&(this.left=t.fromSVG?i.left:e.x),void 0===t.top&&(this.top=t.fromSVG?i.top:e.y),this.pathOffset={x:i.left+this.width/2,y:i.top+this.height/2}},_calcDimensions:function(){var t=this.points,e=n(t,"x")||0,i=n(t,"y")||0;return{left:e,top:i,width:(r(t,"x")||0)-e,height:(r(t,"y")||0)-i}},toObject:function(t){return i(this.callSuper("toObject",t),{points:this.points.concat()})},_toSVG:function(){for(var t=[],i=this.pathOffset.x,n=this.pathOffset.
3y,r=e.Object.NUM_FRACTION_DIGITS,o=0,a=this.points.length;o<a;o++)t.push(s(this.points[o].x-i,r),",",s(this.points[o].y-n,r)," ");return["<"+this.type+" ","COMMON_PARTS",'points="',t.join(""),'" />\n']},commonRender:function(t){var e,i=this.points.length,n=this.pathOffset.x,r=this.pathOffset.y;if(!i||isNaN(this.points[i-1].y))return!1;t.beginPath(),t.moveTo(this.points[0].x-n,this.points[0].y-r);for(var s=0;s<i;s++)e=this.points[s],t.lineTo(e.x-n,e.y-r);return!0},_render:function(t){this.commonRender(t)&&this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var i,n;t.beginPath();for(var r=0,s=this.points.length;r<s;r++)i=this.points[r],n=this.points[r+1]||i,e.util.drawDashedLine(t,i.x,i.y,n.x,n.y,this.strokeDashArray)},complexity:function(){return this.get("points").length}}),e.Polyline.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polyline.fromElementGenerator=function(t){return function(n,r,s){if(!n)return r(null);s||(s={});var o=e.parsePointsAttribute(n.getAttribute("points")),a=e.parseAttributes(n,e[t].ATTRIBUTE_NAMES);a.fromSVG=!0,r(new e[t](o,i(a,s)))}},e.Polyline.fromElement=e.Polyline.fromElementGenerator("Polyline"),e.Polyline.fromObject=function(t,i){return e.Object._fromObject("Polyline",t,i,"points")})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Polygon?e.warn("fabric.Polygon is already defined"):(e.Polygon=e.util.createClass(e.Polyline,{type:"polygon",_render:function(t){this.commonRender(t)&&(t.closePath(),this._renderPaintInOrder(t))},_renderDashedStroke:function(t){this.callSuper("_renderDashedStroke",t),t.closePath()}}),e.Polygon.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polygon.fromElement=e.Polyline.fromElementGenerator("Polygon"),e.Polygon.fromObject=function(t,i){return e.Object._fromObject("Polygon",t,i,"points")})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.array.min,n=e.util.array.max,r=e.util.object.extend,s=Object.prototype.toString,o=e.util.drawArc,a=e.util.toFixed,l={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},h={m:"l",M:"L"};e.Path?e.warn("fabric.Path is already defined"):(e.Path=e.util.createClass(e.Object,{type:"path",path:null,cacheProperties:e.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:e.Object.prototype.stateProperties.concat("path"),initialize:function(t,i){i=i||{},this.callSuper("initialize",i),t||(t=[]);var n="[object Array]"===s.call(t);this.path=n?t:t.match&&t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi),this.path&&(n||(this.path=this._parsePath()),e.Polyline.prototype._setPositionDimensions.call(this,i))},_renderPathCommands:function(t){var e,i,n,r=null,s=0,a=0,l=0,h=0,c=0,u=0,d=-this.pathOffset.x,f=-this.pathOffset.y;t.beginPath();for(var p=0,g=this.path.length;p<g;++p){switch((e=this.path[p])[0]){case"l":l+=e[1],h+=e[2],t.lineTo(l+d,h+f);break;case"L":l=e[1],h=e[2],t.lineTo(l+d,h+f);break;case"h":l+=e[1],t.lineTo(l+d,h+f);break;case"H":l=e[1],t.lineTo(l+d,h+f);break;case"v":h+=e[1],t.lineTo(l+d,h+f);break;case"V":h=e[1],t.lineTo(l+d,h+f);break;case"m":s=l+=e[1],a=h+=e[2],t.moveTo(l+d,h+f);break;case"M":s=l=e[1],a=h=e[2],t.moveTo(l+d,h+f);break;case"c":i=l+e[5],n=h+e[6],c=l+e[3],u=h+e[4],t.bezierCurveTo(l+e[1]+d,h+e[2]+f,c+d,u+f,i+d,n+f),l=i,h=n;break;case"C":l=e[5],h=e[6],c=e[3],u=e[4],t.bezierCurveTo(e[1]+d,e[2]+f,c+d,u+f,l+d,h+f);break;case"s":i=l+e[3],n=h+e[4],null===r[0].match(/[CcSs]/)?(c=l,u=h):(c=2*l-c,u=2*h-u),t.bezierCurveTo(c+d,u+f,l+e[1]+d,h+e[2]+f,i+d,n+f),c=l+e[1],u=h+e[2],l=i,h=n;break;case"S":i=e[3],n=e[4],null===r[0].match(/[CcSs]/)?(c=l,u=h):(c=2*l-c,u=2*h-u),t.bezierCurveTo(c+d,u+f,e[1]+d,e[2]+f,i+d,n+f),l=i,h=n,c=e[1],u=e[2];break;case"q":i=l+e[3],n=h+e[4],c=l+e[1],u=h+e[2],t.quadraticCurveTo(c+d,u+f,i+d,n+f),l=i,h=n;break;case"Q":i=e[3],n=e[4],t.quadraticCurveTo(e[1]+d,e[2]+f,i+d,n+f),l=i,h=n,c=e[1],u=e[2];break;case"t":i=l+e[1],n=h+e[2],null===r[0].match(/[QqTt]/)?(c=l,u=h):(c=2*l-c,u=2*h-u),t.quadraticCurveTo(c+d,u+f,i+d,n+f),l=i,h=n;break;case"T":i=e[1],n=e[2],null===r[0].match(/[QqTt]/)?(c=l,u=h):(c=2*l-c,u=2*h-u),t.quadraticCurveTo(c+d,u+f,i+d,n+f),l=i,h=n;break;case"a":o(t,l+d,h+f,[e[1],e[2],e[3],e[4],e[5],e[6]+l+d,e[7]+h+f]),l+=e[6],h+=e[7];break;case"A":o(t,l+d,h+f,[e[1],e[2],e[3],e[4],e[5],e[6]+d,e[7]+f]),l=e[6],h=e[7];break;case"z":case"Z":l=s,h=a,t.closePath()}r=e}},_render:function(t){this._renderPathCommands(t),this._renderPaintInOrder(t)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left"
3: '+this.left+" }>"},toObject:function(t){return r(this.callSuper("toObject",t),{path:this.path.map((function(t){return t.slice()}))})},toDatalessObject:function(t){var e=this.toObject(["sourcePath"].concat(t));return e.sourcePath&&delete e.path,e},_toSVG:function(){return["<path ","COMMON_PARTS",'d="',this.path.map((function(t){return t.join(" ")})).join(" "),'" stroke-linecap="round" ',"/>\n"]},_getOffsetTransform:function(){var t=e.Object.NUM_FRACTION_DIGITS;return" translate("+a(-this.pathOffset.x,t)+", "+a(-this.pathOffset.y,t)+")"},toClipPathSVG:function(t){var e=this._getOffsetTransform();return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:e})},toSVG:function(t){var e=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:e})},complexity:function(){return this.path.length},_parsePath:function(){for(var t,i,n,r,s,o=[],a=[],c=e.rePathCommand,u=0,d=this.path.length;u<d;u++){for(r=(t=this.path[u]).slice(1).trim(),a.length=0;n=c.exec(r);)a.push(n[0]);s=[t.charAt(0)];for(var f=0,p=a.length;f<p;f++)i=parseFloat(a[f]),isNaN(i)||s.push(i);var g=s[0],m=l[g.toLowerCase()],v=h[g]||g;if(s.length-1>m)for(var y=1,_=s.length;y<_;y+=m)o.push([g].concat(s.slice(y,y+m))),g=v;else o.push(s)}return o},_calcDimensions:function(){for(var t,r,s,o,a=[],l=[],h=null,c=0,u=0,d=0,f=0,p=0,g=0,m=0,v=this.path.length;m<v;++m){switch((t=this.path[m])[0]){case"l":d+=t[1],f+=t[2],o=[];break;case"L":d=t[1],f=t[2],o=[];break;case"h":d+=t[1],o=[];break;case"H":d=t[1],o=[];break;case"v":f+=t[1],o=[];break;case"V":f=t[1],o=[];break;case"m":c=d+=t[1],u=f+=t[2],o=[];break;case"M":c=d=t[1],u=f=t[2],o=[];break;case"c":r=d+t[5],s=f+t[6],p=d+t[3],g=f+t[4],o=e.util.getBoundsOfCurve(d,f,d+t[1],f+t[2],p,g,r,s),d=r,f=s;break;case"C":p=t[3],g=t[4],o=e.util.getBoundsOfCurve(d,f,t[1],t[2],p,g,t[5],t[6]),d=t[5],f=t[6];break;case"s":r=d+t[3],s=f+t[4],null===h[0].match(/[CcSs]/)?(p=d,g=f):(p=2*d-p,g=2*f-g),o=e.util.getBoundsOfCurve(d,f,p,g,d+t[1],f+t[2],r,s),p=d+t[1],g=f+t[2],d=r,f=s;break;case"S":r=t[3],s=t[4],null===h[0].match(/[CcSs]/)?(p=d,g=f):(p=2*d-p,g=2*f-g),o=e.util.getBoundsOfCurve(d,f,p,g,t[1],t[2],r,s),d=r,f=s,p=t[1],g=t[2];break;case"q":r=d+t[3],s=f+t[4],p=d+t[1],g=f+t[2],o=e.util.getBoundsOfCurve(d,f,p,g,p,g,r,s),d=r,f=s;break;case"Q":p=t[1],g=t[2],o=e.util.getBoundsOfCurve(d,f,p,g,p,g,t[3],t[4]),d=t[3],f=t[4];break;case"t":r=d+t[1],s=f+t[2],null===h[0].match(/[QqTt]/)?(p=d,g=f):(p=2*d-p,g=2*f-g),o=e.util.getBoundsOfCurve(d,f,p,g,p,g,r,s),d=r,f=s;break;case"T":r=t[1],s=t[2],null===h[0].match(/[QqTt]/)?(p=d,g=f):(p=2*d-p,g=2*f-g),o=e.util.getBoundsOfCurve(d,f,p,g,p,g,r,s),d=r,f=s;break;case"a":o=e.util.getBoundsOfArc(d,f,t[1],t[2],t[3],t[4],t[5],t[6]+d,t[7]+f),d+=t[6],f+=t[7];break;case"A":o=e.util.getBoundsOfArc(d,f,t[1],t[2],t[3],t[4],t[5],t[6],t[7]),d=t[6],f=t[7];break;case"z":case"Z":d=c,f=u}h=t,o.forEach((function(t){a.push(t.x),l.push(t.y)})),a.push(d),l.push(f)}var y=i(a)||0,_=i(l)||0;return{left:y,top:_,width:(n(a)||0)-y,height:(n(l)||0)-_}}}),e.Path.fromObject=function(t,i){if("string"==typeof t.sourcePath){var n=t.sourcePath;e.loadSVGFromURL(n,(function(e){var n=e[0];n.setOptions(t),i&&i(n)}))}else e.Object._fromObject("Path",t,i,"path")},e.Path.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(["d"]),e.Path.fromElement=function(t,i,n){var s=e.parseAttributes(t,e.Path.ATTRIBUTE_NAMES);s.fromSVG=!0,i(new e.Path(s.d,r(s,n)))})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.array.min,n=e.util.array.max;e.Group||(e.Group=e.util.createClass(e.Object,e.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(t,e,i){e=e||{},this._objects=[],i&&this.callSuper("initialize",e),this._objects=t||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;if(i)this._updateObjectsACoords();else{var r=e&&e.centerPoint;void 0!==e.originX&&(this.originX=e.originX),void 0!==e.originY&&(this.originY=e.originY),r||this._calcBounds(),this._updateObjectsCoords(r),delete e.centerPoint,this.callSuper("initialize",e)}this.setCoords()},_updateObjectsACoords:function(){for(var t=this._objects.length;t--;)this._objects[t].setCoords(!0,!0)},_updateObjectsCoords:function(t){t=t||this.getCenterPoint();for(var e=this._objects.length;e--;)this._updateObjectCoords(this._objects[e],t)},_updateObjectCoords:function(t,e){var i=t.left,n=t.top;t.set({left:i-e.x,top:n-e.y}),t.group=this,t.setCoords(!0,!0)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),t&&(this._objects.push(t),t.group=this,t._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},removeWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),this.remove(t),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(t){this.dirty=!0,t.group=this,t._set("canvas",this.canvas)},_onObjectRemoved:function(t){this.dirty=!0,delete t.group},_set:function(t,i){var n=this._objects.length;if(this.useSetOnGroup)for(;n--;)this._objects[n].setOnGroup(t,i);if("canvas"===t)for(;n--;)this._objects[n]._set(t,i);e.Object.prototype._set.call(this,t,i)},toObject:function(t){var i=this.includeDefaultValues,n=this._objects.map((function(e){var n=e.includeDefaultValues;e.includeDefaultValues=i;var r=e.toObject(t);return e.includeDefaultValues=n,r})),r=e.Object.prototype.toObject.call(this,t);return r.objects=n,r},toDatalessObject:function(t){var i,n=this.sourcePath;if(n)i=n;else{var r=this.includeDefaultValues;i=this._objects.map((function(e){var i=e.includeDefaultValues;e.includeDefaultValues=r;var n=e.toDatalessObject(t);return e.includeDefaultValues=i,n}))}var s=e.Object.prototype.toDatalessObject.call(this,t);return s.objects=i,s},render:function(t){this._transformDone=!0,this.callSuper("render",t),this._transformDone=!1},shouldCache:function(){var t=e.Object.prototype.shouldCache.call(this);if(t)for(var i=0,n=this._objects.length;i<n;i++)if(this._objects[i].willDrawShadow())return this.ownCaching=!1,!1;return t},willDrawShadow:function(){if(e.Object.prototype.willDrawShadow.call(this))return!0;for(var t=0,i=this._objects.length;t<i;t++)if(this._objects[t].willDrawShadow())return!0;return!1},isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},drawObject:function(t){for(var e=0,i=this._objects.length;e<i;e++)this._objects[e].render(t);this._drawClipPath(t)},isCacheDirty:function(t){if(this.callSuper("isCacheDirty",t))return!0;
vendor: 69,622 bytes, line 3
3if(!this.statefullCache)return!1;for(var e=0,i=this._objects.length;e<i;e++)if(this._objects[e].isCacheDirty(!0)){if(this._cacheCanvas){var n=this.cacheWidth/this.zoomX,r=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-n/2,-r/2,n,r)}return!0}return!1},_restoreObjectsState:function(){return this._objects.forEach(this._restoreObjectState,this),this},realizeTransform:function(t){var i=t.calcTransformMatrix(),n=e.util.qrDecompose(i),r=new e.Point(n.translateX,n.translateY);return t.flipX=!1,t.flipY=!1,t.set("scaleX",n.scaleX),t.set("scaleY",n.scaleY),t.skewX=n.skewX,t.skewY=n.skewY,t.angle=n.angle,t.setPositionByOrigin(r,"center","center"),t},_restoreObjectState:function(t){return this.realizeTransform(t),t.setCoords(),delete t.group,this},destroy:function(){return this._objects.forEach((function(t){t.set("dirty",!0)})),this._restoreObjectsState()},toActiveSelection:function(){if(this.canvas){var t=this._objects,i=this.canvas;this._objects=[];var n=this.toObject();delete n.objects;var r=new e.ActiveSelection([]);return r.set(n),r.type="activeSelection",i.remove(this),t.forEach((function(t){t.group=r,t.dirty=!0,i.add(t)})),r.canvas=i,r._objects=t,i._activeObject=r,r.setCoords(),r}},ungroupOnCanvas:function(){return this._restoreObjectsState()},setObjectsCoords:function(){return this.forEachObject((function(t){t.setCoords(!0,!0)})),this},_calcBounds:function(t){for(var e,i,n,r=[],s=[],o=["tr","br","bl","tl"],a=0,l=this._objects.length,h=o.length;a<l;++a)for((e=this._objects[a]).setCoords(!0),n=0;n<h;n++)i=o[n],r.push(e.oCoords[i].x),s.push(e.oCoords[i].y);this._getBounds(r,s,t)},_getBounds:function(t,r,s){var o=new e.Point(i(t),i(r)),a=new e.Point(n(t),n(r)),l=o.y||0,h=o.x||0,c=a.x-o.x||0,u=a.y-o.y||0;this.width=c,this.height=u,s||this.setPositionByOrigin({x:h,y:l},"left","top")},_toSVG:function(t){for(var e=["<g ","COMMON_PARTS"," >\n"],i=0,n=this._objects.length;i<n;i++)e.push("\t\t",this._objects[i].toSVG(t));return e.push("</g>\n"),e},getSvgStyles:function(){var t=void 0!==this.opacity&&1!==this.opacity?"opacity: "+this.opacity+";":"",e=this.visible?"":" visibility: hidden;";return[t,this.getSvgFilter(),e].join("")},toClipPathSVG:function(t){for(var e=[],i=0,n=this._objects.length;i<n;i++)e.push("\t",this._objects[i].toClipPathSVG(t));return this._createBaseClipPathSVGMarkup(e,{reviver:t})}}),e.Group.fromObject=function(t,i){var n=t.objects,r=e.util.object.clone(t,!0);delete r.objects,"string"!=typeof n?e.util.enlivenObjects(n,(function(n){e.util.enlivenObjects([t.clipPath],(function(r){var s=e.util.object.clone(t,!0);s.clipPath=r[0],delete s.objects,i&&i(new e.Group(n,s,!0))}))})):e.loadSVGFromURL(n,(function(s){var o=e.util.groupSVGElements(s,t,n);o.set(r),i&&i(o)}))})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});e.ActiveSelection||(e.ActiveSelection=e.util.createClass(e.Group,{type:"activeSelection",initialize:function(t,i){i=i||{},this._objects=t||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;i.originX&&(this.originX=i.originX),i.originY&&(this.originY=i.originY),this._calcBounds(),this._updateObjectsCoords(),e.Object.prototype.initialize.call(this,i),this.setCoords()},toGroup:function(){var t=this._objects.concat();this._objects=[];var i=e.Object.prototype.toObject.call(this),n=new e.Group([]);if(delete i.type,n.set(i),t.forEach((function(t){t.canvas.remove(t),t.group=n})),n._objects=t,!this.canvas)return n;var r=this.canvas;return r.add(n),r._activeObject=n,n.setCoords(),n},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(t,e,i){t.save(),t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",t,e),void 0===(i=i||{}).hasControls&&(i.hasControls=!1),void 0===i.hasRotatingPoint&&(i.hasRotatingPoint=!1),i.forActiveSelection=!0;for(var n=0,r=this._objects.length;n<r;n++)this._objects[n]._renderControls(t,i);t.restore()}}),e.ActiveSelection.fromObject=function(t,i){e.util.enlivenObjects(t.objects,(function(n){delete t.objects,i&&i(new e.ActiveSelection(n,t,!0))}))})}(e),function(t){"use strict";var e=S.util.object.extend;t.fabric||(t.fabric={}),t.fabric.Image?S.warn("fabric.Image is already defined."):(S.Image=S.util.createClass(S.Object,{type:"image",crossOrigin:"",strokeWidth:0,srcFromAttribute:!1,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:S.Object.prototype.stateProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,initialize:function(t,e){e||(e={}),this.filters=[],this.cacheKey="texture"+S.Object.__uid++,this.callSuper("initialize",e),this._initElement(t,e)},getElement:function(){return this._element||{}},setElement:function(t,e){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=t,this._originalElement=t,this._initConfig(e),0!==this.filters.length&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters(),this},removeTexture:function(t){var e=S.filterBackend;e&&e.evictCachesForKey&&e.evictCachesForKey(t)},dispose:function(){this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(function(t){S.util.cleanUpJsdomNode(this[t]),this[t]=void 0}.bind(this))},setCrossOrigin:function(t){return this.crossOrigin=t,this._element.crossOrigin=t,this},getOriginalSize:function(){var t=this.getElement();return{width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}},_stroke:function(t){if(this.stroke&&0!==this.strokeWidth){var e=this.width/2,i=this.height/2;t.beginPath(),t.moveTo(-e,-i),t.lineTo(e,-i),t.lineTo(e,i),t.lineTo(-e,i),t.lineTo(-e,-i),t.closePath()}},_renderDashedStroke:function(t){var e=-this.width/2,i=-this.height/2,n=this.width,r=this.height;t.save(),this._setStrokeStyles(t,this),t.beginPath(),S.util.drawDashedLine(t,e,i,e+n,i,this.strokeDashArray),S.util.drawDashedLine(t,e+n,i,e+n,i+r,this.strokeDashArray),S.util.drawDashedLine(t,e+n,i+r,e,i+r,this.strokeDashArray),S.util.drawDashedLine(t,e,i+r,e,i,this.strokeDashArray),t.closePath(),t.restore()},toObject:function(t){var i=[];this.filters.forEach((function(t){t&&i.push(t.toObject())}));var n=e(this.callSuper("toObject",["crossOrigin","cropX","cropY"].concat(t)),{src:this.getSrc(),filters:i});return this.resizeFilter&&(n.resizeFilter=this.resizeFilter.toObject()),n},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},_toSVG:function(){var t,e=[],i=[],n=-this.width/2,r=-this.height/2,s="";if(this.hasCrop()){var o=S.Object.__uid++;e.push('<clipPath id="imageCrop_'+o+'">\n','\t<rect x="'+n+'" y="'+r+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),s=' clip-path="url(#imageCrop_'+o+')" '}if(i.push("\t<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',n-this.cropX,'" y="',r-this.cropY,'" width="',this._element.width||this._element.naturalWidth,'" height="',this._element.height||this._element.height,'"',s,"></image>\n"),this.stroke||this.strokeDashArray){var a=this.fill;this.fill=null,t=["\t<rect ",'x="',n,'" y="',r,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'],this.fill=a}return e="fill"!==this.paintFirst?e.concat(t,i):e.concat(i,t)},getSrc:function(t){var e=t?this._element:this._originalElement;return e?e.toDataURL?e.toDataURL():this.srcFromAttribute?e.getAttribute("src"):e.src:this.src||""},setSrc:function(t,e,i){return S.util.loadImage(t,(function(t){this.setElement(t,i),this._setWidthHeight(),e&&e(this)}),this,i&&i.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var t=this.resizeFilter,e=this.minimumScaleTrigger,i=this.getTotalObjectScaling(),n=i.scaleX,r=i.scaleY,s=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!t||n>e&&r>e)return this._element=s,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=n,void(this._lastScaleY=r);S.filterBackend||(S.filterBackend=S.initFilterBackend());var o=S.util.createCanvasElement(),a=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=s.width,h=s.height;o.width=l,o.height=h,this._element=o,this._lastScaleX=t.scaleX=n,this._lastScaleY=t.scaleY=r,S.filterBackend.applyFilters([t],s,l,h,this._element,a),this._filterScalingX=o.width/this._originalElement.width,this._filterScalingY=o.height/this._originalElement.height},applyFilters:function(t){if(t=(t=t||this.filters||[]).filter((function(t){return t&&!t.isNeutralState()})),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===t.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var e=this._originalElement,i=e.naturalWidth||e.width,n=e.naturalHeight||e.height;if(this._element===this._originalElement){var r=S.util.createCanvasElement();r.width=i,r.height=n,this._element=r,this._filteredEl=r}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,i,n),this._lastScaleX=1,this._lastScaleY=1;return S.filterBackend||(S.filterBackend=S.initFilterBackend()),S.filterBackend.applyFilters(t,this._originalElement,i,n,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(t){!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(t),this._renderPaintInOrder(t)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(t){var e=this._element;if(e){var i=this._filterScalingX,n=this._filterScalingY,r=this.width,s=this.height,o=Math.min,a=Math.max,l=a(this.cropX,0),h=a(this.cropY,0),c=e.naturalWidth||e.width,u=e.naturalHeight||e.height,d=l*i,f=h*n,p=o(r*i,c-d),g=o(s*n,u-f),m=-r/2,v=-s/2,y=o(r,c/i-l),_=o(s,u/i-h);e&&t.drawImage(e,d,f,p,g,m,v,y,_)}},_needsResize:function(){var t=this.getTotalObjectScaling();return t.scaleX!==this._lastScaleX||t.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(t,e){this.setElement(S.util.getById(t),e),S.util.addClass(this.getElement(),S.Image.CSS_CANVAS)},_initConfig:function(t){t||(t={}),this.setOptions(t),this._setWidthHeight(t),this._element&&this.crossOrigin&&(this._element.crossOrigin=this.crossOrigin)},_initFilters:function(t,e){t&&t.length?S.util.enlivenObjects(t,(function(t){e&&e(t)}),"fabric.Image.filters"):e&&e()},_setWidthHeight:function(t){t||(t={});var e=this.getElement();this.width=t.width||e.naturalWidth||e.width||0,this.height=t.height||e.naturalHeight||e.height||0},parsePreserveAspectRatioAttribute:function(){var t,e=S.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),i=this._element.width,n=this._element.height,r=1,s=1,o=0,a=0,l=0,h=0,c=this.width,u=this.height,d={width:c,height:u};return!e||"none"===e.alignX&&"none"===e.alignY?(r=c/i,s=u/n):("meet"===e.meetOrSlice&&(t=(c-i*(r=s=S.util.findScaleToFit(this._element,d)))/2,"Min"===e.alignX&&(o=-t),"Max"===e.alignX&&(o=t),t=(u-n*s)/2,"Min"===e.alignY&&(a=-t),"Max"===e.alignY&&(a=t)),"slice"===e.meetOrSlice&&(t=i-c/(r=s=S.util.findScaleToCover(this._element,d)),"Mid"===e.alignX&&(l=t/2),"Max"===e.alignX&&(l=t),t=n-u/s,"Mid"===e.alignY&&(h=t/2),"Max"===e.alignY&&(h=t),i=c/r,n=u/s)),{width:i,height:n,scaleX:r,scaleY:s,offsetLeft:o,offsetTop:a,cropX:l,cropY:h}}}),S.Image.CSS_CANVAS="canvas-img",S.Image.prototype.getSvgSrc=S.Image.prototype.getSrc,S.Image.fromObject=function(t,e){var i=S.util.object.clone(t);S.util.loadImage(i.src,(function(t,n){n?e&&e(null,n):S.Image.prototype._initFilters.call(i,i.filters,(function(n){i.filters=n||[],S.Image.prototype._initFilters.call(i,[i.resizeFilter],(function(n){i.resizeFilter=n[0],S.util.enlivenObjects([i.clipPath],(function(n){i.clipPath=n[0];var r=new S.Image(t,i);e(r)}))}))}))}),null,i.crossOrigin)},S.Image.fromURL=function(t,e,i){S.util.loadImage(t,(function(t){e&&e(new S.Image(t,i))}),null,i&&i.crossOrigin)},S.Image.ATTRIBUTE_NAMES=S.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin".split(" ")),S.Image.fromElement=function(t,i,n){var r=S.parseAttributes(t,S.Image.ATTRIBUTE_NAMES);S.Image.fromURL(r["xlink:href"],i,e(n?S.util.object.clone(n):{},r))})}(e),S.util.object.extend(S.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.angle%360;return t>0?90*Math.round((t-1)/90):90*Math.round(t/90)},straighten:function(){return this.rotate(this._getAngleValueForStraighten()),this},fxStraighten:function(t){var e=function(){},i=(t=t||{}).onComplete||e,n=t.onChange||e,r=this;return S.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){r.rotate(t),n()},onComplete:function(){r.setCoords(),i()}}),this}}),S.util.object.extend(S.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.requestRenderAllBound}),this}}),function(){"use strict";function t(t,e){var i="precision "+e+" float;\nvoid main(){}",n=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(n,i),t.compileShader(n),!!t.getShaderParameter(n,t.COMPILE_STATUS)}function e(t){t&&t.tileSize&&(this.tileSize=t.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}S.isWebglSupported=function(e){if(S.isLikelyNode)return!1;e=e||S.WebglFilterBackend.prototype.tileSize;var i=document.createElement("canvas"),n=i.getContext("webgl")||i.getContext("experimental-webgl"),r=!1;if(n){S.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),r=S.maxTextureSize>=e;for(var s=["highp","mediump","lowp"],o=0;o<3;o++)if(t(n,s[o])){S.webGlPrecision=s[o];break}}return this.isSupported=r,r},S.WebglFilterBackend=e,e.prototype={tileSize:2048,resources:{},setupGLContext:function(t,e){this.dispose(),this.createWebGLCanvas(t,e),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(t,e)},chooseFastestCopyGLTo2DMethod:function(t,e){var i,n=void 0!==window.performance;try{new ImageData(1,1),i=!0}catch(t){i=!1}var r="undefined"!=typeof ArrayBuffer,s="undefined"!=typeof Uint8ClampedArray;if(n&&i&&r&&s){var o=S.util.createCanvasElement(),a=new ArrayBuffer(t*e*4);if(S.forceGLPutImageData)return this.imageBuffer=a,void(this.copyGLTo2D=k);var l,h,c={imageBuffer:a,destinationWidth:t,destinationHeight:e,targetCanvas:o};o.width=t,o.height=e,l=window.performance.now(),T.call(c,this.gl,c),h=window.performance.now()-l,l=window.performance.now(),k.call(c,this.gl,c),h>window.performance.now()-l?(this.imageBuffer=a,this.copyGLTo2D=k):this.copyGLTo2D=T}},createWebGLCanvas:function(t,e){var i=S.util.createCanvasElement();i.width=t,i.height=e;var n={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},r=i.getContext("webgl",n);r||(r=i.getContext("experimental-webgl",n)),r&&(r.clearColor(0,0,0,0),this.canvas=i,this.gl=r)},applyFilters:function(t,e,i,n,r,s){var o,a=this.gl;s&&(o=this.getCachedTexture(s,e));var l={originalWidth:e.width||e.originalWidth,originalHeight:e.height||e.originalHeight,sourceWidth:i,sourceHeight:n,destinationWidth:i,destinationHeight:n,context:a,sourceTexture:this.createTexture(a,i,n,!o&&e),targetTexture:this.createTexture(a,i,n),originalTexture:o||this.createTexture(a,i,n,!o&&e),passes:t.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:r},h=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,h),t.forEach((function(t){t&&t.applyTo(l)})),function(t){var e=t.targetCanvas,i=e.width,n=e.height,r=t.destinationWidth,s=t.destinationHeight;i===r&&n===s||(e.width=r,e.height=s)}(l),this.copyGLTo2D(a,l),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(l.sourceTexture),a.deleteTexture(l.targetTexture),a.deleteFramebuffer(h),r.getContext("2d").setTransform(1,0,0,1,0,0),l},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(t,e,i,n){var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),n?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,i,0,t.RGBA,t.UNSIGNED_BYTE,null),r},getCachedTexture:function(t,e){if(this.textureCache[t])return this.textureCache[t];var i=this.createTexture(this.gl,e.width,e.height,e);return this.textureCache[t]=i,i},evictCachesForKey:function(t){this.textureCache[t]&&(this.gl.deleteTexture(this.textureCache[t]),delete this.textureCache[t])},copyGLTo2D:T,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var t=this.gl,e={renderer:"",vendor:""};if(!t)return e;var i=t.getExtension("WEBGL_debug_renderer_info");if(i){var n=t.getParameter(i.UNMASKED_RENDERER_WEBGL),r=t.getParameter(i.UNMASKED_VENDOR_WEBGL);n&&(e.renderer=n.toLowerCase()),r&&(e.vendor=r.toLowerCase())}return this.gpuInfo=e,e}}}(),function(){"use strict";var t=function(){};function e(){}S.Canvas2dFilterBackend=e,e.prototype={evictCachesForKey:t,dispose:t,clearWebGLCaches:t,resources:{},applyFilters:function(t,e,i,n,r){var s=r.getContext("2d");s.drawImage(e,0,0,i,n);var o={sourceWidth:i,sourceHeight:n,imageData:s.getImageData(0,0,i,n),originalEl:e,originalImageData:s.getImageData(0,0,i,n),canvasEl:r,ctx:s,filterBackend:this};return t.forEach((function(t){t.applyTo(o)})),o.imageData.width===i&&o.imageData.height===n||(r.width=o.imageData.width,r.height=o.imageData.height),s.putImageData(o.imageData,0,0),o}}}(),S.Image=S.Image||{},S.Image.filters=S.Image.filters||{},S.Image.filters.BaseFilter=S.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(t){t&&this.setOptions(t)},setOptions:function(t){for(var e in t)this[e]=t[e]},createProgram:function(t,e,i){e=e||this.fragmentSource,i=i||this.vertexSource,"highp"!==S.webGlPrecision&&(e=e.replace(/precision highp float/g,"precision "+S.webGlPrecision+" float"));var n=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(n,i),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+t.getShaderInfoLog(n));var r=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(r,e),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+t.getShaderInfoLog(r));var s=t.createProgram();if(t.attachShader(s,n),t.attachShader(s,r),t.linkProgram(s),!t.getProgramParameter(s,t.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+t.getProgramInfoLog(s));var o=this.getAttributeLocations(t,s),a=this.getUniformLocations(t,s)||{};return a.uStepW=t.getUniformLocation(s,"uStepW"),a.uStepH=t.getUniformLocation(s,"uStepH"),{program:s,attributeLocations:o,uniformLocations:a}},getAttributeLocations:function(t,e){return{aPosition:t.getAttribLocation(e,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(t,e,i){var n=e.aPosition,r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r),t.enableVertexAttribArray(n),t.vertexAttribPointer(n,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW)},_setupFrameBuffer:function(t){var e,i,n=t.context;t.passes>1?(e=t.destinationWidth,i=t.destinationHeight,t.sourceWidth===e&&t.sourceHeight===i||(n.deleteTexture(t.targetTexture),t.targetTexture=t.filterBackend.createTexture(n,e,i)),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,t.targetTexture,0)):(n.bindFramebuffer(n.FRAMEBUFFER,null),n.finish())},_swapTextures:function(t){t.passes--,t.pass++;var e=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=e},isNeutralState:function(){var t=this.mainParameter,e=S.Image.filters[this.type].prototype;if(t){if(Array.isArray(e[t])){for(var i=e[t].length;i--;)if(this[t][i]!==e[t][i])return!1;return!0}return e[t]===this[t]}return!1},applyTo:function(t){t.webgl?(this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},retrieveShader:function(t){return t.programCache.hasOwnProperty(this.type)||(t.programCache[this.type]=this.createProgram(t.context)),t.programCache[this.type]},applyToWebGL:function(t){var e=t.context,i=this.retrieveShader(t);0===t.pass&&t.originalTexture?e.bindTexture(e.TEXTURE_2D,t.originalTexture):e.bindTexture(e.TEXTURE_2D,t.sourceTexture),e.useProgram(i.program),this.sendAttributeData(e,i.attributeLocations,t.aPosition),e.uniform1f(i.uniformLocations.uStepW,1/t.sourceWidth),e.uniform1f(i.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(e,i.uniformLocations),e.viewport(0,0,t.destinationWidth,t.destinationHeight),e.drawArrays(e.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(t,e,i){t.activeTexture(i),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE0)},unbindAdditionalTexture:function(t,e){t.activeTexture(e),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(t){this[this.mainParameter]=t},sendUniformData:function(){},createHelpLayer:function(t){if(!t.helpLayer){var e=document.createElement("canvas");e.width=t.sourceWidth,e.height=t.sourceHeight,t.helpLayer=e}},toObject:function(){var t={type:this.type},e=this.mainParameter;return e&&(t[e]=this[e]),t},toJSON:function(){return this.toObject()}}),S.Image.filters.BaseFilter.fromObject=function(t,e){var i=new S.Image.filters[t.type](t);return e&&e(i),i},function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.ColorMatrix=n(i.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(t){this.callSuper("initialize",t),this.matrix=this.matrix.slice(0)},applyTo2d:function(t){var e,i,n,r,s,o=t.imageData.data,a=o.length,l=this.matrix,h=this.colorsOnly;for(s=0;s<a;s+=4)e=o[s],i=o[s+1],n=o[s+2],h?(o[s]=e*l[0]+i*l[1]+n*l[2]+255*l[4],o[s+1]=e*l[5]+i*l[6]+n*l[7]+255*l[9],o[s+2]=e*l[10]+i*l[11]+n*l[12]+255*l[14]):(r=o[s+3],o[s]=e*l[0]+i*l[1]+n*l[2]+r*l[3]+255*l[4],o[s+1]=e*l[5]+i*l[6]+n*l[7]+r*l[8]+255*l[9],o[s+2]=e*l[10]+i*l[11]+n*l[12]+r*l[13]+255*l[14],o[s+3]=e*l[15]+i*l[16]+n*l[17]+r*l[18]+255*l[19])},getUniformLocations:function(t,e){return{uColorMatrix:t.getUniformLocation(e,"uColorMatrix"),uConstants:t.getUniformLocation(e,"uConstants")}},sendUniformData:function(t,e){var i=this.matrix,n=[i[0],i[1],i[2],i[3],i[5],i[6],i[7],i[8],i[10],i[11],i[12],i[13],i[15],i[16],i[17],i[18]],r=[i[4],i[9],i[14],i[19]];t.uniformMatrix4fv(e.uColorMatrix,!1,n),t.uniform4fv(e.uConstants,r)}}),e.Image.filters.ColorMatrix.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Brightness=n(i.BaseFilter,{type:"Brightness",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBrightness;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += uBrightness;\ngl_FragColor = color;\n}",brightness:0,mainParameter:"brightness",applyTo2d:function(t){if(0!==this.brightness){var e,i=t.imageData.data,n=i.length,r=Math.round(255*this.brightness);for(e=0;e<n;e+=4)i[e]=i[e]+r,i[e+1]=i[e+1]+r,i[e+2]=i[e+2]+r}},getUniformLocations:function(t,e){return{uBrightness:t.getUniformLocation(e,"uBrightness")}},sendUniformData:function(t,e){t.uniform1f(e.uBrightness,this.brightness)}}),e.Image.filters.Brightness.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.Image.filters,r=e.util.createClass;n.Convolute=r(n.BaseFilter,{type:"Convolute",opaque:!1,matrix:[0,0,0,0,1,0,0,0,0],fragmentSource:{Convolute_3_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_3_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_5_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_5_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_7_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_7_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_9_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_9_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}"},retrieveShader:function(t){var e=Math.sqrt(this.matrix.length),i=this.type+"_"+e+"_"+(this.opaque?1:0),n=this.fragmentSource[i];return t.programCache.hasOwnProperty(i)||(t.programCache[i]=this.createProgram(t.context,n)),t.programCache[i]},applyTo2d:function(t){var e,i,n,r,s,o,a,l,h,c,u,d,f,p=t.imageData,g=p.data,m=this.matrix,v=Math.round(Math.sqrt(m.length)),y=Math.floor(v/2),_=p.width,A=p.height,b=t.ctx.createImageData(_,A),C=b.data,w=this.opaque?1:0;for(u=0;u<A;u++)for(c=0;c<_;c++){for(s=4*(u*_+c),e=0,i=0,n=0,r=0,f=0;f<v;f++)for(d=0;d<v;d++)o=c+d-y,(a=u+f-y)<0||a>=A||o<0||o>=_||(l=4*(a*_+o),h=m[f*v+d],e+=g[l]*h,i+=g[l+1]*h,n+=g[l+2]*h,w||(r+=g[l+3]*h));C[s]=e,C[s+1]=i,C[s+2]=n,C[s+3]=w?g[s+3]:r}t.imageData=b},getUniformLocations:function(t,e){return{uMatrix:t.getUniformLocation(e,"uMatrix"),uOpaque:t.getUniformLocation(e,"uOpaque"),uHalfSize:t.getUniformLocation(e,"uHalfSize"),uSize:t.getUniformLocation(e,"uSize")}},sendUniformData:function(t,e){t.uniform1fv(e.uMatrix,this.matrix)},toObject:function(){return i(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),e.Image.filters.Convolute.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Grayscale=n(i.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(t){var e,i,n=t.imageData.data,r=n.length,s=this.mode;for(e=0;e<r;e+=4)"average"===s?i=(n[e]+n[e+1]+n[e+2])/3:"lightness"===s?i=(Math.min(n[e],n[e+1],n[e+2])+Math.max(n[e],n[e+1],n[e+2]))/2:"luminosity"===s&&(i=.21*n[e]+.72*n[e+1]+.07*n[e+2]),n[e]=i,n[e+1]=i,n[e+2]=i},retrieveShader:function(t){var e=this.type+"_"+this.mode;if(!t.programCache.hasOwnProperty(e)){var i=this.fragmentSource[this.mode];t.programCache[e]=this.createProgram(t.context,i)}return t.programCache[e]},getUniformLocations:function(t,e){return{uMode:t.getUniformLocation(e,"uMode")}},sendUniformData:function(t,e){t.uniform1i(e.uMode,1)},isNeutralState:function(){return!1}}),e.Image.filters.Grayscale.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Invert=n(i.BaseFilter,{type:"Invert",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uInvert;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nif (uInvert == 1) {\ngl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);\n} else {\ngl_FragColor = color;\n}\n}",invert:!0,mainParameter:"invert",applyTo2d:function(t){var e,i=t.imageData.data,n=i.length;for(e=0;e<n;e+=4)i[e]=255-i[e],i[e+1]=255-i[e+1],i[e+2]=255-i[e+2]},isNeutralState:function(){return!this.invert},getUniformLocations:function(t,e){return{uInvert:t.getUniformLocation(e,"uInvert")}},sendUniformData:function(t,e){t.uniform1i(e.uInvert,this.invert)}}),e.Image.filters.Invert.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.Image.filters,r=e.util.createClass;n.Noise=r(n.BaseFilter,{type:"Noise",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uStepH;\nuniform float uNoise;\nuniform float uSeed;\nvarying vec2 vTexCoord;\nfloat rand(vec2 co, float seed, float vScale) {\nreturn fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);\n}\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\ngl_FragColor = color;\n}",mainParameter:"noise",noise:0,applyTo2d:function(t){if(0!==this.noise){var e,i,n=t.imageData.data,r=n.length,s=this.noise;for(e=0,r=n.length;e<r;e+=4)i=(.5-Math.random())*s,n[e]+=i,n[e+1]+=i,n[e+2]+=i}},getUniformLocations:function(t,e){return{uNoise:t.getUniformLocation(e,"uNoise"),uSeed:t.getUniformLocation(e,"uSeed")}},sendUniformData:function(t,e){t.uniform1f(e.uNoise,this.noise/255),t.uniform1f(e.uSeed,Math.random())},toObject:function(){return i(this.callSuper("toObject"),{noise:this.noise})}}),e.Image.filters.Noise.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Pixelate=n(i.BaseFilter,{type:"Pixelate",blocksize:4,mainParameter:"blocksize",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBlocksize;\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nfloat blockW = uBlocksize * uStepW;\nfloat blockH = uBlocksize * uStepW;\nint posX = int(vTexCoord.x / blockW);\nint posY = int(vTexCoord.y / blockH);\nfloat fposX = float(posX);\nfloat fposY = float(posY);\nvec2 squareCoords = vec2(fposX * blockW, fposY * blockH);\nvec4 color = texture2D(uTexture, squareCoords);\ngl_FragColor = color;\n}",applyTo2d:function(t){var e,i,n,r,s,o,a,l,h,c,u,d=t.imageData,f=d.data,p=d.height,g=d.width;for(i=0;i<p;i+=this.blocksize)for(n=0;n<g;n+=this.blocksize)for(r=f[e=4*i*g+4*n],s=f[e+1],o=f[e+2],a=f[e+3],c=Math.min(i+this.blocksize,p),u=Math.min(n+this.blocksize,g),l=i;l<c;l++)for(h=n;h<u;h++)f[e=4*l*g+4*h]=r,f[e+1]=s,f[e+2]=o,f[e+3]=a},isNeutralState:function(){return 1===this.blocksize},getUniformLocations:function(t,e){return{uBlocksize:t.getUniformLocation(e,"uBlocksize"),uStepW:t.getUniformLocation(e,"uStepW"),uStepH:t.getUniformLocation(e,"uStepH")}},sendUniformData:function(t,e){t.uniform1f(e.uBlocksize,this.blocksize)}}),e.Image.filters.Pixelate.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.Image.filters,r=e.util.createClass;n.RemoveColor=r(n.BaseFilter,{type:"RemoveColor",color:"#FFFFFF",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uLow;\nuniform vec4 uHigh;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {\ngl_FragColor.a = 0.0;\n}\n}",distance:.02,useAlpha:!1,applyTo2d:function(t){var i,n,r,s,o=t.imageData.data,a=255*this.distance,l=new e.Color(this.color).getSource(),h=[l[0]-a,l[1]-a,l[2]-a],c=[l[0]+a,l[1]+a,l[2]+a];for(i=0;i<o.length;i+=4)n=o[i],r=o[i+1],s=o[i+2],n>h[0]&&r>h[1]&&s>h[2]&&n<c[0]&&r<c[1]&&s<c[2]&&(o[i+3]=0)},getUniformLocations:function(t,e){return{uLow:t.getUniformLocation(e,"uLow"),uHigh:t.getUniformLocation(e,"uHigh")}},sendUniformData:function(t,i){var n=new e.Color(this.color).getSource(),r=parseFloat(this.distance),s=[0+n[0]/255-r,0+n[1]/255-r,0+n[2]/255-r,1],o=[n[0]/255+r,n[1]/255+r,n[2]/255+r,1];t.uniform4fv(i.uLow,s),t.uniform4fv(i.uHigh,o)},toObject:function(){return i(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),e.Image.filters.RemoveColor.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass,r={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var s in r)i[s]=n(i.ColorMatrix,{type:s,matrix:r[s],mainParameter:!1,colorsOnly:!0}),e.Image.filters[s].fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric,i=e.Image.filters,n=e.util.createClass;i.BlendColor=n(i.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:"gl_FragColor.rgb *= uColor.rgb;\n",screen:"gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);\n",add:"gl_FragColor.rgb += uColor.rgb;\n",diff:"gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n",subtract:"gl_FragColor.rgb -= uColor.rgb;\n",lighten:"gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n",darken:"gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n",exclusion:"gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n",overlay:"if (uColor.r < 0.5) {\ngl_FragColor.r *= 2.0 * uColor.r;\n} else {\ngl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);\n}\nif (uColor.g < 0.5) {\ngl_FragColor.g *= 2.0 * uColor.g;\n} else {\ngl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);\n}\nif (uColor.b < 0.5) {\ngl_FragColor.b *= 2.0 * uColor.b;\n} else {\ngl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);\n}\n",tint:"gl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n"},buildSource:function(t){return"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ngl_FragColor = color;\nif (color.a > 0.0) {\n"+this.fragmentSource[t]+"}\n}"},retrieveShader:function(t){var e,i=this.type+"_"+this.mode;return t.programCache.hasOwnProperty(i)||(e=this.buildSource(this.mode),t.programCache[i]=this.createProgram(t.context,e)),t.programCache[i]},applyTo2d:function(t){var i,n,r,s,o,a,l,h=t.imageData.data,c=h.length,u=1-this.alpha;i=(l=new e.Color(this.color).getSource())[0]*this.alpha,n=l[1]*this.alpha,r=l[2]*this.alpha;for(var d=0;d<c;d+=4)switch(s=h[d],o=h[d+1],a=h[d+2],this.mode){case"multiply":h[d]=s*i/255,h[d+1]=o*n/255,h[d+2]=a*r/255;break;case"screen":h[d]=255-(255-s)*(255-i)/255,h[d+1]=255-(255-o)*(255-n)/255,h[d+2]=255-(255-a)*(255-r)/255;break;case"add":h[d]=s+i,h[d+1]=o+n,h[d+2]=a+r;break;case"diff":case"difference":h[d]=Math.abs(s-i),h[d+1]=Math.abs(o-n),h[d+2]=Math.abs(a-r);break;case"subtract":h[d]=s-i,h[d+1]=o-n,h[d+2]=a-r;break;case"darken":h[d]=Math.min(s,i),h[d+1]=Math.min(o,n),h[d+2]=Math.min(a,r);break;case"lighten":h[d]=Math.max(s,i),h[d+1]=Math.max(o,n),h[d+2]=Math.max(a,r);break;case"overlay":h[d]=i<128?2*s*i/255:255-2*(255-s)*(255-i)/255,h[d+1]=n<128?2*o*n/255:255-2*(255-o)*(255-n)/255,h[d+2]=r<128?2*a*r/255:255-2*(255-a)*(255-r)/255;break;case"exclusion":h[d]=i+s-2*i*s/255,h[d+1]=n+o-2*n*o/255,h[d+2]=r+a-2*r*a/255;break;case"tint":h[d]=i+s*u,h[d+1]=n+o*u,h[d+2]=r+a*u}},getUniformLocations:function(t,e){return{uColor:t.getUniformLocation(e,"uColor")}},sendUniformData:function(t,i){var n=new e.Color(this.color).getSource();n[0]=this.alpha*n[0]/255,n[1]=this.alpha*n[1]/255,n[2]=this.alpha*n[2]/255,n[3]=this.alpha,t.uniform4fv(i.uColor,n)},toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendColor.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric,i=e.Image.filters,n=e.util.createClass;i.BlendImage=n(i.BaseFilter,{type:"BlendImage",image:null,mode:"multiply",alpha:1,vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nuniform mat3 uTransformMatrix;\nvoid main() {\nvTexCoord = aPosition;\nvTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.rgba *= color2.rgba;\ngl_FragColor = color;\n}",mask:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.a = color2.a;\ngl_FragColor = color;\n}"},retrieveShader:function(t){var e=this.type+"_"+this.mode,i=this.fragmentSource[this.mode];return t.programCache.hasOwnProperty(e)||(t.programCache[e]=this.createProgram(t.context,i)),t.programCache[e]},applyToWebGL:function(t){var e=t.context,i=this.createTexture(t.filterBackend,this.image);this.bindAdditionalTexture(e,i,e.TEXTURE1),this.callSuper("applyToWebGL",t),this.unbindAdditionalTexture(e,e.TEXTURE1)},createTexture:function(t,e){return t.getCachedTexture(e.cacheKey,e._element)},calculateMatrix:function(){var t=this.image,e=t._element.width,i=t._element.height;return[1/t.scaleX,0,0,0,1/t.scaleY,0,-t.left/e,-t.top/i,1]},applyTo2d:function(t){var i,n,r,s,o,a,l,h,c,u,d,f=t.imageData,p=t.filterBackend.resources,g=f.data,m=g.length,v=f.width,y=f.height,_=this.image;p.blendImage||(p.blendImage=e.util.createCanvasElement()),u=(c=p.blendImage).getContext("2d"),c.width!==v||c.height!==y?(c.width=v,c.height=y):u.clearRect(0,0,v,y),u.setTransform(_.scaleX,0,0,_.scaleY,_.left,_.top),u.drawImage(_._element,0,0,v,y),d=u.getImageData(0,0,v,y).data;for(var A=0;A<m;A+=4)switch(o=g[A],a=g[A+1],l=g[A+2],h=g[A+3],i=d[A],n=d[A+1],r=d[A+2],s=d[A+3],this.mode){case"multiply":g[A]=o*i/255,g[A+1]=a*n/255,g[A+2]=l*r/255,g[A+3]=h*s/255;break;case"mask":g[A+3]=s}},getUniformLocations:function(t,e){return{uTransformMatrix:t.getUniformLocation(e,"uTransformMatrix"),uImage:t.getUniformLocation(e,"uImage")}},sendUniformData:function(t,e){var i=this.calculateMatrix();t.uniform1i(e.uImage,1),t.uniformMatrix3fv(e.uTransformMatrix,!1,i)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendImage.fromObject=function(t,i){e.Image.fromObject(t.image,(function(n){var r=e.util.object.clone(t);r.image=n,i(new e.Image.filters.BlendImage(r))}))}}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=Math.pow,n=Math.floor,r=Math.sqrt,s=Math.abs,o=Math.round,a=Math.sin,l=Math.ceil,h=e.Image.filters,c=e.util.createClass;h.Resize=c(h.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3,getUniformLocations:function(t,e){return{uDelta:t.getUniformLocation(e,"uDelta"),uTaps:t.getUniformLocation(e,"uTaps")}},sendUniformData:function(t,e){t.uniform2fv(e.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),t.uniform1fv(e.uTaps,this.taps)},retrieveShader:function(t){var e=this.getFilterWindow(),i=this.type+"_"+e;if(!t.programCache.hasOwnProperty(i)){var n=this.generateShader(e);t.programCache[i]=this.createProgram(t.context,n)}return t.programCache[i]},getFilterWindow:function(){var t=this.tempScale;return Math.ceil(this.lanczosLobes/t)},getTaps:function(){for(var t=this.lanczosCreate(this.lanczosLobes),e=this.tempScale,i=this.getFilterWindow(),n=new Array(i),r=1;r<=i;r++)n[r-1]=t(r*e);return n},generateShader:function(t){for(var e=new Array(t),i=this.fragmentSourceTOP,n=1;n<=t;n++)e[n-1]=n+".0 * uDelta";return i+="uniform float uTaps["+t+"];\n",i+="void main() {\n",i+=" vec4 color = texture2D(uTexture, vTexCoord);\n",i+=" float sum = 1.0;\n",e.forEach((function(t,e){i+=" color += texture2D(uTexture, vTexCoord + "+t+") * uTaps["+e+"];\n",i+=" color += texture2D(uTexture, vTexCoord - "+t+") * uTaps["+e+"];\n",i+=" sum += 2.0 * uTaps["+e+"];\n"})),i+=" gl_FragColor = color / sum;\n",i+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",applyTo:function(t){t.webgl?(t.passes++,this.width=t.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=t.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),t.destinationWidth=this.dW,this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t),t.sourceWidth=t.destinationWidth,this.height=t.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),t.destinationHeight=this.dH,this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t),t.sourceHeight=t.destinationHeight):this.applyTo2d(t)},isNeutralState:function(){return 1===this.scaleX&&1===this.scaleY},lanczosCreate:function(t){return function(e){if(e>=t||e<=-t)return 0;if(e<1.1920929e-7&&e>-1.1920929e-7)return 1;var i=(e*=Math.PI)/t;return a(e)/e*a(i)/i}},applyTo2d:function(t){var e=t.imageData,i=this.scaleX,n=this.scaleY;this.rcpScaleX=1/i,this.rcpScaleY=1/n;var r,s=e.width,a=e.height,l=o(s*i),h=o(a*n);"sliceHack"===this.resizeType?r=this.sliceByTwo(t,s,a,l,h):"hermite"===this.resizeType?r=this.hermiteFastResize(t,s,a,l,h):"bilinear"===this.resizeType?r=this.bilinearFiltering(t,s,a,l,h):"lanczos"===this.resizeType&&(r=this.lanczosResize(t,s,a,l,h)),t.imageData=r},sliceByTwo:function(t,i,r,s,o){var a,l,h=t.imageData,c=!1,u=!1,d=.5*i,f=.5*r,p=e.filterBackend.resources,g=0,m=0,v=i,y=0;for(p.sliceByTwo||(p.sliceByTwo=document.createElement("canvas")),((a=p.sliceByTwo).width<1.5*i||a.height<r)&&(a.width=1.5*i,a.height=r),(l=a.getContext("2d")).clearRect(0,0,1.5*i,r),l.putImageData(h,0,0),s=n(s),o=n(o);!c||!u;)i=d,r=f,s<n(.5*d)?d=n(.5*d):(d=s,c=!0),o<n(.5*f)?f=n(.5*f):(f=o,u=!0),l.drawImage(a,g,m,i,r,v,y,d,f),g=v,m=y,y+=f;return l.getImageData(g,m,s,o)},lanczosResize:function(t,e,o,a,h){var c=t.imageData.data,u=t.ctx.createImageData(a,h),d=u.data,f=this.lanczosCreate(this.lanczosLobes),p=this.rcpScaleX,g=this.rcpScaleY,m=2/this.rcpScaleX,v=2/this.rcpScaleY,y=l(p*this.lanczosLobes/2),_=l(g*this.lanczosLobes/2),A={},b={},C={};return function t(l){var w,S,x,T,k,O,P,D,E,M,j;for(b.x=(l+.5)*p,C.x=n(b.x),w=0;w<h;w++){for(b.y=(w+.5)*g,C.y=n(b.y),k=0,O=0,P=0,D=0,E=0,S=C.x-y;S<=C.x+y;S++)if(!(S<0||S>=e)){M=n(1e3*s(S-b.x)),A[M]||(A[M]={});for(var L=C.y-_;L<=C.y+_;L++)L<0||L>=o||(j=n(1e3*s(L-b.y)),A[M][j]||(A[M][j]=f(r(i(M*m,2)+i(j*v,2))/1e3)),(x=A[M][j])>0&&(k+=x,O+=x*c[T=4*(L*e+S)],P+=x*c[T+1],D+=x*c[T+2],E+=x*c[T+3]))}d[T=4*(w*a+l)]=O/k,d[T+1]=P/k,d[T+2]=D/k,d[T+3]=E/k}return++l<a?t(l):u}(0)},bilinearFiltering:function(t,e,i,r,s){var o,a,l,h,c,u,d,f,p,g=0,m=this.rcpScaleX,v=this.rcpScaleY,y=4*(e-1),_=t.imageData.data,A=t.ctx.createImageData(r,s),b=A.data;for(l=0;l<s;l++)for(h=0;h<r;h++)for(c=m*h-(o=n(m*h)),u=v*l-(a=n(v*l)),p=4*(a*e+o),d=0;d<4;d++)f=_[p+d]*(1-c)*(1-u)+_[p+4+d]*c*(1-u)+_[p+y+d]*u*(1-c)+_[p+y+4+d]*c*u,b[g++]=f;return A},hermiteFastResize:function(t,e,i,o,a){for(var h=this.rcpScaleX,c=this.rcpScaleY,u=l(h/2),d=l(c/2),f=t.imageData.data,p=t.ctx.createImageData(o,a),g=p.data,m=0;m<a;m++)for(var v=0;v<o;v++){for(var y=4*(v+m*o),_=0,A=0,b=0,C=0,w=0,S=0,x=0,T=(m+.5)*c,k=n(m*c);k<(m+1)*c;k++)for(var O=s(T-(k+.5))/d,P=(v+.5)*h,D=O*O,E=n(v*h);E<(v+1)*h;E++){var M=s(P-(E+.5))/u,j=r(D+M*M);j>1&&j<-1||(_=2*j*j*j-3*j*j+1)>0&&(x+=_*f[(M=4*(E+k*e))+3],b+=_,f[M+3]<255&&(_=_*f[M+3]/250),C+=_*f[M],w+=_*f[M+1],S+=_*f[M+2],A+=_)}g[y]=C/A,g[y+1]=w/A,g[y+2]=S/A,g[y+3]=x/b}return p},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),e.Image.filters.Resize.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Contrast=n(i.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(t){if(0!==this.contrast){var e,i=t.imageData.data,n=i.length,r=Math.floor(255*this.contrast),s=259*(r+255)/(255*(259-r));for(e=0;e<n;e+=4)i[e]=s*(i[e]-128)+128,i[e+1]=s*(i[e+1]-128)+128,i[e+2]=s*(i[e+2]-128)+128}},getUniformLocations:function(t,e){return{uContrast:t.getUniformLocation(e,"uContrast")}},sendUniformData:function(t,e){t.uniform1f(e.uContrast,this.contrast)}}),e.Image.filters.Contrast.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Saturation=n(i.BaseFilter,{type:"Saturation",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uSaturation;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat rgMax = max(color.r, color.g);\nfloat rgbMax = max(rgMax, color.b);\ncolor.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;\ncolor.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;\ncolor.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;\ngl_FragColor = color;\n}",saturation:0,mainParameter:"saturation",applyTo2d:function(t){if(0!==this.saturation){var e,i,n=t.imageData.data,r=n.length,s=-this.saturation;for(e=0;e<r;e+=4)i=Math.max(n[e],n[e+1],n[e+2]),n[e]+=i!==n[e]?(i-n[e])*s:0,n[e+1]+=i!==n[e+1]?(i-n[e+1])*s:0,n[e+2]+=i!==n[e+2]?(i-n[e+2])*s:0}},getUniformLocations:function(t,e){return{uSaturation:t.getUniformLocation(e,"uSaturation")}},sendUniformData:function(t,e){t.uniform1f(e.uSaturation,-this.saturation)}}),e.Image.filters.Saturation.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Blur=n(i.BaseFilter,{type:"Blur",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\nconst float nSamples = 15.0;\nvec3 v3offset = vec3(12.9898, 78.233, 151.7182);\nfloat random(vec3 scale) {\nreturn fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);\n}\nvoid main() {\nvec4 color = vec4(0.0);\nfloat total = 0.0;\nfloat offset = random(v3offset);\nfor (float t = -nSamples; t <= nSamples; t++) {\nfloat percent = (t + offset - 0.5) / nSamples;\nfloat weight = 1.0 - abs(percent);\ncolor += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;\ntotal += weight;\n}\ngl_FragColor = color / total;\n}",blur:0,mainParameter:"blur",applyTo:function(t){t.webgl?(this.aspectRatio=t.sourceWidth/t.sourceHeight,t.passes++,this._setupFrameBuffer(t),this.horizontal=!0,this.applyToWebGL(t),this._swapTextures(t),this._setupFrameBuffer(t),this.horizontal=!1,this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},applyTo2d:function(t){t.imageData=this.simpleBlur(t)},simpleBlur:function(t){var i,n,r=t.filterBackend.resources,s=t.imageData.width,o=t.imageData.height;r.blurLayer1||(r.blurLayer1=e.util.createCanvasElement(),r.blurLayer2=e.util.createCanvasElement()),i=r.blurLayer1,n=r.blurLayer2,i.width===s&&i.height===o||(n.width=i.width=s,n.height=i.height=o);var a,l,h,c,u=i.getContext("2d"),d=n.getContext("2d"),f=.06*this.blur*.5;for(u.putImageData(t.imageData,0,0),d.clearRect(0,0,s,o),c=-15;c<=15;c++)h=f*(l=c/15)*s+(a=(Math.random()-.5)/4),d.globalAlpha=1-Math.abs(l),d.drawImage(i,h,a),u.drawImage(n,0,0),d.globalAlpha=1,d.clearRect(0,0,n.width,n.height);for(c=-15;c<=15;c++)h=f*(l=c/15)*o+(a=(Math.random()-.5)/4),d.globalAlpha=1-Math.abs(l),d.drawImage(i,a,h),u.drawImage(n,0,0),d.globalAlpha=1,d.clearRect(0,0,n.width,n.height);t.ctx.drawImage(i,0,0);var p=t.ctx.getImageData(0,0,i.width,i.height);return u.globalAlpha=1,u.clearRect(0,0,i.width,i.height),p},getUniformLocations:function(t,e){return{delta:t.getUniformLocation(e,"uDelta")}},sendUniformData:function(t,e){var i=this.chooseRightDelta();t.uniform2fv(e.delta,i)},chooseRightDelta:function(){var t,e=1,i=[0,0];return this.horizontal?this.aspectRatio>1&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio),t=e*this.blur*.12,this.horizontal?i[0]=t:i[1]=t,i}}),i.Blur.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Gamma=n(i.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",initialize:function(t){this.gamma=[1,1,1],i.BaseFilter.prototype.initialize.call(this,t)},applyTo2d:function(t){var e,i=t.imageData.data,n=this.gamma,r=i.length,s=1/n[0],o=1/n[1],a=1/n[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),e=0,r=256;e<r;e++)this.rVals[e]=255*Math.pow(e/255,s),this.gVals[e]=255*Math.pow(e/255,o),this.bVals[e]=255*Math.pow(e/255,a);for(e=0,r=i.length;e<r;e+=4)i[e]=this.rVals[i[e]],i[e+1]=this.gVals[i[e+1]],i[e+2]=this.bVals[i[e+2]]},getUniformLocations:function(t,e){return{uGamma:t.getUniformLocation(e,"uGamma")}},sendUniformData:function(t,e){t.uniform3fv(e.uGamma,this.gamma)}}),e.Image.filters.Gamma.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Composed=n(i.BaseFilter,{type:"Composed",subFilters:[],initialize:function(t){this.callSuper("initialize",t),this.subFilters=this.subFilters.slice(0)},applyTo:function(t){t.passes+=this.subFilters.length-1,this.subFilters.forEach((function(e){e.applyTo(t)}))},toObject:function(){return e.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map((function(t){return t.toObject()}))})},isNeutralState:function(){return!this.subFilters.some((function(t){return!t.isNeutralState()}))}}),e.Image.filters.Composed.fromObject=function(t,i){var n=(t.subFilters||[]).map((function(t){return new e.Image.filters[t.type](t)})),r=new e.Image.filters.Composed({subFilters:n});return i&&i(r),r}}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.HueRotation=n(i.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var t=this.rotation*Math.PI,i=e.util.cos(t),n=e.util.sin(t),r=Math.sqrt(1/3)*n,s=1-i;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=i+s/3,this.matrix[1]=1/3*s-r,this.matrix[2]=1/3*s+r,this.matrix[5]=1/3*s+r,this.matrix[6]=i+1/3*s,this.matrix[7]=1/3*s-r,this.matrix[10]=1/3*s-r,this.matrix[11]=1/3*s+r,this.matrix[12]=i+1/3*s},isNeutralState:function(t){return this.calculateMatrix(),i.BaseFilter.prototype.isNeutralState.call(this,t)},applyTo:function(t){this.calculateMatrix(),i.BaseFilter.prototype.applyTo.call(this,t)}}),e.Image.filters.HueRotation.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.clone;e.Text?e.warn("fabric.Text is already defined"):(e.Text=e.util.createClass(e.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles"],_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:"left",fontStyle:"normal",lineHeight:1.16,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},textBackgroundColor:"",stateProperties:e.Object.prototype.stateProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),cacheProperties:e.Object.prototype.cacheProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),stroke:null,shadow:null,_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],__charBounds:[],CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,initialize:function(t,e){this.styles=e&&e.styles||{},this.text=t,this.__skipDimension=!0,this.callSuper("initialize",e),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},getMeasuringContext:function(){return e._measuringContext||(e._measuringContext=this.canvas&&this.canvas.contextCache||e.util.createCanvasElement().getContext("2d")),e._measuringContext},_splitText:function(){var t=this._splitTextIntoLines(this.text);return this.textLines=t.lines,this._textLines=t.graphemeLines,this._unwrappedTextLines=t._unwrappedLines,this._text=t.graphemeText,t},initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},enlargeSpaces:function(){for(var t,e,i,n,r,s,o,a=0,l=this._textLines.length;a<l;a++)if(("justify"===this.textAlign||a!==l-1&&!this.isEndOfWrapping(a))&&(n=0,r=this._textLines[a],(e=this.getLineWidth(a))<this.width&&(o=this.textLines[a].match(this._reSpacesAndTabs)))){i=o.length,t=(this.width-e)/i;for(var h=0,c=r.length;h<=c;h++)s=this.__charBounds[a][h],this._reSpaceAndTab.test(r[h])?(s.width+=t,s.kernedWidth+=t,s.left+=n,n+=t):s.left+=n}},isEndOfWrapping:function(t){return t===this._textLines.length-1},missingNewlineOffset:function(){return 1},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_getCacheCanvasDimensions:function(){var t=this.callSuper("_getCacheCanvasDimensions"),e=this.fontSize;return t.width+=e*t.zoomX,t.height+=e*t.zoomY,t},_render:function(t){this._setTextStyles(t),this._renderTextLinesBackground(t),this._renderTextDecoration(t,"underline"),this._renderText(t),this._renderTextDecoration(t,"overline"),this._renderTextDecoration(t,"linethrough")},_renderText:function(t){"stroke"===this.paintFirst?(this._renderTextStroke(t),this._renderTextFill(t)):(this._renderTextFill(t),this._renderTextStroke(t))},_setTextStyles:function(t,e,i){t.textBaseline="alphabetic",t.font=this._getFontDeclaration(e,i)},calcTextWidth:function(){for(var t=this.getLineWidth(0),e=1,i=this._textLines.length;e<i;e++){var n=this.getLineWidth(e);n>t&&(t=n)}return t},_renderTextLine:function(t,e,i,n,r,s){this._renderChars(t,e,i,n,r,s)},_renderTextLinesBackground:function(t){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var e,i,n,r,s,o,a=0,l=t.fillStyle,h=this._getLeftOffset(),c=this._getTopOffset(),u=0,d=0,f=0,p=this._textLines.length;f<p;f++)if(e=this.getHeightOfLine(f),this.textBackgroundColor||this.styleHas("textBackgroundColor",f)){n=this._textLines[f],i=this._getLineLeftOffset(f),d=0,u=0,r=this.getValueOfPropertyAt(f,0,"textBackgroundColor");for(var g=0,m=n.length;g<m;g++)s=this.__charBounds[f][g],(o=this.getValueOfPropertyAt(f,g,"textBackgroundColor"))!==r?(t.fillStyle=r,r&&t.fillRect(h+i+u,c+a,d,e/this.lineHeight),u=s.left,d=s.width,r=o):d+=s.kernedWidth;o&&(t.fillStyle=o,t.fillRect(h+i+u,c+a,d,e/this.lineHeight)),a+=e}else a+=e;t.fillStyle=l,this._removeShadow(t)}},getFontCache:function(t){var i=t.fontFamily.toLowerCase();e.charWidthsCache[i]||(e.charWidthsCache[i]={});var n=e.charWidthsCache[i],r=t.fontStyle.toLowerCase()+"_"+(t.fontWeight+"").toLowerCase();return n[r]||(n[r]={}),n[r]},_applyCharStyles:function(t,e,i,n,r){this._setFillStyles(e,r),this._setStrokeStyles(e,r),e.font=this._getFontDeclaration(r)},_measureChar:function(t,e,i,n){var r,s,o,a,l=this.getFontCache(e),h=i+t,c=this._getFontDeclaration(e)===this._getFontDeclaration(n),u=e.fontSize/this.CACHE_FONT_SIZE;if(i&&void 0!==l[i]&&(o=l[i]),void 0!==l[t]&&(a=r=l[t]),c&&void 0!==l[h]&&(a=(s=l[h])-o),void 0===r||void 0===o||void 0===s){var d=this.getMeasuringContext();this._setTextStyles(d,e,!0)}return void 0===r&&(a=r=d.measureText(t).width,l[t]=r),void 0===o&&c&&i&&(o=d.measureText(i).width,l[i]=o),c&&void 0===s&&(s=d.measureText(h).width,l[h]=s,a=s-o),{width:r*u,kernedWidth:a*u}},getHeightOfChar:function(t,e){return this.getValueOfPropertyAt(t,e,"fontSize")},measureLine:function(t){var e=this._measureLine(t);return 0!==this.charSpacing&&(e.width-=this._getWidthOfCharSpacing()),e.width<0&&(e.width=0),e},_measureLine:function(t){var e,i,n,r,s=0,o=this._textLines[t],a=new Array(o.length);for(this.__charBounds[t]=a,e=0;e<o.length;e++)i=o[e],r=this._getGraphemeBox(i,t,e,n),a[e]=r,s+=r.kernedWidth,n=i;return a[e]={left:r?r.left+r.width:0,width:0,kernedWidth:0,height:this.fontSize},{width:s,numOfSpaces:0}},_getGraphemeBox:function(t,e,i,n,r){var s,o=this.getCompleteStyleDeclaration(e,i),a=n?this.getCompleteStyleDeclaration(e,i-1):{},l=this._measureChar(t,o,n,a),h=l.kernedWidth,c=l.width;0!==this.charSpacing&&(c+=s=this._getWidthOfCharSpacing(),h+=s);var u={width:c,left:0,height:o.fontSize,kernedWidth:h,deltaY:o.deltaY};if(i>0&&!r){var d=this.__charBounds[e][i-1];u.left=d.left+d.width+l.kernedWidth-l.width}return u},getHeightOfLine:function(t){if(this.__lineHeights[t])return this.__lineHeights[t];for(var e=this._textLines[t],i=this.getHeightOfChar(t,0),n=1,r=e.length;n<r;n++)i=Math.max(this.getHeightOfChar(t,n),i);return this.__lineHeights[t]=i*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var t,e=0,i=0,n=this._textLines.length;i<n;i++)t=this.getHeightOfLine(i),e+=i===n-1?t/this.lineHeight:t;return e},_getLeftOffset:function(){return-this.width/2},_getTopOffset:function(){return-this.height/2},_applyPatternGradientTransform:function(t,e){if(!e||!e.toLive)return{offsetX:0,offsetY:0};var i=-this.width/2+e.offsetX||0,n=-this.height/2+e.offsetY||0;return t.transform(1,0,0,1,i,n),{offsetX:i,offsetY:n}},_renderTextCommon:function(t,e){t.save();for(var i=0,n=this._getLeftOffset(),r=this._getTopOffset(),s=this._applyPatternGradientTransform(t,"fillText"===e?this.fill:this.stroke),o=0,a=this._textLines.length;o<a;o++){var l=this.getHeightOfLine(o),h=l/this.lineHeight,c=this._getLineLeftOffset(o);this._renderTextLine(e,t,this._textLines[o],n+c-s.offsetX,r+i+h-s.offsetY,o),i+=l}t.restore()},_renderTextFill:function(t){(this.fill||this.styleHas("fill"))&&this._renderTextCommon(t,"fillText")},_renderTextStroke:function(t){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray),t.beginPath(),this._renderTextCommon(t,"strokeText"),t.closePath(),t.restore())},_renderChars:function(t,e,i,n,r,s){var o,a,l,h,c=this.getHeightOfLine(s),u=-1!==this.textAlign.indexOf("justify"),d="",f=0,p=!u&&0===this.charSpacing&&this.isEmptyStyles(s);if(e.save(),r-=c*this._fontSizeFraction/this.lineHeight,p)return this._renderChar(t,e,s,0,this.textLines[s],n,r,c),void e.restore();for(var g=0,m=i.length-1;g<=m;g++)h=g===m||this.charSpacing,d+=i[g],l=this.__charBounds[s][g],0===f?(n+=l.kernedWidth-l.width,f+=l.width):f+=l.kernedWidth,u&&!h&&this._reSpaceAndTab.test(i[g])&&(h=!0),h||(o=o||this.getCompleteStyleDeclaration(s,g),a=this.getCompleteStyleDeclaration(s,g+1),h=this._hasStyleChanged(o,a)),h&&(this._renderChar(t,e,s,g,d,n,r,c),d="",o=a,n+=f,f=0);e.restore()},_renderChar:function(t,e,i,n,r,s,o){var a=this._getStyleDeclaration(i,n),l=this.getCompleteStyleDeclaration(i,n),h="fillText"===t&&l.fill,c="strokeText"===t&&l.stroke&&l.strokeWidth;(c||h)&&(a&&e.save(),this._applyCharStyles(t,e,i,n,l),a&&a.textBackgroundColor&&this._removeShadow(e),a&&a.deltaY&&(o+=a.deltaY),h&&e.fillText(r,s,o),c&&e.strokeText(r,s,o),a&&e.restore())},setSuperscript:function(t,e){return this._setScript(t,e,this.superscript)},setSubscript:function(t,e){return this._setScript(t,e,this.subscript)},_setScript:function(t,e,i){var n=this.get2DCursorLocation(t,!0),r=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"fontSize"),s=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"deltaY"),o={fontSize:r*i.size,deltaY:s+r*i.baseline};return this.setSelectionStyles(o,t,e),this},_hasStyleChanged:function(t,e){return t.fill!==e.fill||t.stroke!==e.stroke||t.strokeWidth!==e.strokeWidth||t.fontSize!==e.fontSize||t.fontFamily!==e.fontFamily||t.fontWeight!==e.fontWeight||t.fontStyle!==e.fontStyle||t.deltaY!==e.deltaY},_hasStyleChangedForSvg:function(t,e){return this._hasStyleChanged(t,e)||t.overline!==e.overline||t.underline!==e.underline||t.linethrough!==e.linethrough},_getLineLeftOffset:function(t){var e=this.getLineWidth(t);return"center"===this.textAlign?(this.width-e)/2:"right"===this.textAlign?this.width-e:"justify-center"===this.textAlign&&this.isEndOfWrapping(t)?(this.width-e)/2:"justify-right"===this.textAlign&&this.isEndOfWrapping(t)?this.width-e:0},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},_shouldClearDimensionCache:function(){var t=this._forceClearCache;return t||(t=this.hasStateChanged("_dimensionAffectingProps")),t&&(this.dirty=!0,this._forceClearCache=!1),t},getLineWidth:function(t){return this.__lineWidths[t]?this.__lineWidths[t]:(e=""===this._textLines[t]?0:this.measureLine(t).width,this.__lineWidths[t]=e,e);var e},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(t,e,i){var n=this._getStyleDeclaration(t,e);return n&&void 0!==n[i]?n[i]:this[i]},_renderTextDecoration:function(t,e){if(this[e]||this.styleHas(e)){for(var i,n,r,s,o,a,l,h,c,u,d,f,p,g,m,v,y=this._getLeftOffset(),_=this._getTopOffset(),A=this._getWidthOfCharSpacing(),b=0,C=this._textLines.length;b<C;b++)if(i=this.getHeightOfLine(b),this[e]||this.styleHas(e,b)){l=this._textLines[b],g=i/this.lineHeight,s=this._getLineLeftOffset(b),u=0,d=0,h=this.getValueOfPropertyAt(b,0,e),v=this.getValueOfPropertyAt(b,0,"fill"),c=_+g*(1-this._fontSizeFraction),n=this.getHeightOfChar(b,0),o=this.getValueOfPropertyAt(b,0,"deltaY");for(var w=0,S=l.length;w<S;w++)f=this.__charBounds[b][w],p=this.getValueOfPropertyAt(b,w,e),m=this.getValueOfPropertyAt(b,w,"fill"),r=this.getHeightOfChar(b,w),a=this.getValueOfPropertyAt(b,w,"deltaY"),(p!==h||m!==v||r!==n||a!==o)&&d>0?(t.fillStyle=v,h&&v&&t.fillRect(y+s+u,c+this.offsets[e]*n+o,d,this.fontSize/15),u=f.left,d=f.width,h=p,v=m,n=r,o=a):d+=f.kernedWidth;t.fillStyle=m,p&&m&&t.fillRect(y+s+u,c+this.offsets[e]*n+o,d-A,this.fontSize/15),_+=i}else _+=i;this._removeShadow(t)}},_getFontDeclaration:function(t,i){var n=t||this,r=this.fontFamily,s=e.Text.genericFonts.indexOf(r.toLowerCase())>-1,o=void 0===r||r.indexOf("'")>-1||r.indexOf(",")>-1||r.indexOf('"')>-1||s?n.fontFamily:'"'+n.fontFamily+'"';return[e.isLikelyNode?n.fontWeight:n.fontStyle,e.isLikelyNode?n.fontStyle:n.fontWeight,i?this.CACHE_FONT_SIZE+"px":n.fontSize+"px",o].join(" ")},render:function(t){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",t)))},_splitTextIntoLines:function(t){for(var i=t.split(this._reNewline),n=new Array(i.length),r=["\n"],s=[],o=0;o<i.length;o++)n[o]=e.util.string.graphemeSplit(i[o]),s=s.concat(n[o],r);return s.pop(),{_unwrappedLines:n,lines:i,graphemeText:s,graphemeLines:n}},toObject:function(t){var e=["text","fontSize","fontWeight","fontFamily","fontStyle","lineHeight","underline","overline","linethrough","textAlign","textBackgroun
3dColor","charSpacing"].concat(t),n=this.callSuper("toObject",e);return n.styles=i(this.styles,!0),n},set:function(t,e){this.callSuper("set",t,e);var i=!1;if("object"==typeof t)for(var n in t)i=i||-1!==this._dimensionAffectingProps.indexOf(n);else i=-1!==this._dimensionAffectingProps.indexOf(t);return i&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),e.Text.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),e.Text.DEFAULT_SVG_FONT_SIZE=16,e.Text.fromElement=function(t,n,r){if(!t)return n(null);var s=e.parseAttributes(t,e.Text.ATTRIBUTE_NAMES),o=s.textAnchor||"left";if((r=e.util.object.extend(r?i(r):{},s)).top=r.top||0,r.left=r.left||0,s.textDecoration){var a=s.textDecoration;-1!==a.indexOf("underline")&&(r.underline=!0),-1!==a.indexOf("overline")&&(r.overline=!0),-1!==a.indexOf("line-through")&&(r.linethrough=!0),delete r.textDecoration}"dx"in s&&(r.left+=s.dx),"dy"in s&&(r.top+=s.dy),"fontSize"in r||(r.fontSize=e.Text.DEFAULT_SVG_FONT_SIZE);var l="";"textContent"in t?l=t.textContent:"firstChild"in t&&null!==t.firstChild&&"data"in t.firstChild&&null!==t.firstChild.data&&(l=t.firstChild.data),l=l.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var h=r.strokeWidth;r.strokeWidth=0;var c=new e.Text(l,r),u=c.getScaledHeight()/c.height,d=((c.height+c.strokeWidth)*c.lineHeight-c.height)*u,f=c.getScaledHeight()+d,p=0;"center"===o&&(p=c.getScaledWidth()/2),"right"===o&&(p=c.getScaledWidth()),c.set({left:c.left-p,top:c.top-(f-c.fontSize*(.07+c._fontSizeFraction))/c.lineHeight,strokeWidth:void 0!==h?h:1}),n(c)},e.Text.fromObject=function(t,i){return e.Object._fromObject("Text",t,i,"text")},e.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],e.util.createAccessors&&e.util.createAccessors(e.Text))}(e),S.util.object.extend(S.Text.prototype,{isEmptyStyles:function(t){if(!this.styles)return!0;if(void 0!==t&&!this.styles[t])return!0;var e=void 0===t?this.styles:{line:this.styles[t]};for(var i in e)for(var n in e[i])for(var r in e[i][n])return!1;return!0},styleHas:function(t,e){if(!this.styles||!t||""===t)return!1;if(void 0!==e&&!this.styles[e])return!1;var i=void 0===e?this.styles:{0:this.styles[e]};for(var n in i)for(var r in i[n])if(void 0!==i[n][r][t])return!0;return!1},cleanStyle:function(t){if(!this.styles||!t||""===t)return!1;var e,i,n=this.styles,r=0,s=!0,o=0;for(var a in n){for(var l in e=0,n[a]){var h;r++,(h=n[a][l]).hasOwnProperty(t)?(i?h[t]!==i&&(s=!1):i=h[t],h[t]===this[t]&&delete h[t]):s=!1,0!==Object.keys(h).length?e++:delete n[a][l]}0===e&&delete n[a]}for(var c=0;c<this._textLines.length;c++)o+=this._textLines[c].length;s&&r===o&&(this[t]=i,this.removeStyle(t))},removeStyle:function(t){if(this.styles&&t&&""!==t){var e,i,n,r=this.styles;for(i in r){for(n in e=r[i])delete e[n][t],0===Object.keys(e[n]).length&&delete e[n];0===Object.keys(e).length&&delete r[i]}}},_extendStyles:function(t,e){var i=this.get2DCursorLocation(t);this._getLineStyle(i.lineIndex)||this._setLineStyle(i.lineIndex),this._getStyleDeclaration(i.lineIndex,i.charIndex)||this._setStyleDeclaration(i.lineIndex,i.charIndex,{}),S.util.object.extend(this._getStyleDeclaration(i.lineIndex,i.charIndex),e)},get2DCursorLocation:function(t,e){void 0===t&&(t=this.selectionStart);for(var i=e?this._unwrappedTextLines:this._textLines,n=i.length,r=0;r<n;r++){if(t<=i[r].length)return{lineIndex:r,charIndex:t};t-=i[r].length+this.missingNewlineOffset(r)}return{lineIndex:r-1,charIndex:i[r-1].length<t?i[r-1].length:t}},getSelectionStyles:function(t,e,i){void 0===t&&(t=this.selectionStart||0),void 0===e&&(e=this.selectionEnd||t);for(var n=[],r=t;r<e;r++)n.push(this.getStyleAtPosition(r,i));return n},getStyleAtPosition:function(t,e){var i=this.get2DCursorLocation(t);return(e?this.getCompleteStyleDeclaration(i.lineIndex,i.charIndex):this._getStyleDeclaration(i.lineIndex,i.charIndex))||{}},setSelectionStyles:function(t,e,i){void 0===e&&(e=this.selectionStart||0),void 0===i&&(i=this.selectionEnd||e);for(var n=e;n<i;n++)this._extendStyles(n,t);return this._forceClearCache=!0,this},_getStyleDeclaration:function(t,e){var i=this.styles&&this.styles[t];return i?i[e]:null},getCompleteStyleDeclaration:function(t,e){for(var i,n=this._getStyleDeclaration(t,e)||{},r={},s=0;s<this._styleProperties.length;s++)r[i=this._styleProperties[s]]=void 0===n[i]?this[i]:n[i];return r}
vendor: 35,552 bytes, line 3
3,_setStyleDeclaration:function(t,e,i){this.styles[t][e]=i},_deleteStyleDeclaration:function(t,e){delete this.styles[t][e]},_getLineStyle:function(t){return!!this.styles[t]},_setLineStyle:function(t){this.styles[t]={}},_deleteLineStyle:function(t){delete this.styles[t]}}),function(){function t(t){t.textDecoration&&(t.textDecoration.indexOf("underline")>-1&&(t.underline=!0),t.textDecoration.indexOf("line-through")>-1&&(t.linethrough=!0),t.textDecoration.indexOf("overline")>-1&&(t.overline=!0),delete t.textDecoration)}S.IText=S.util.createClass(S.Text,S.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"#333",cursorDelay:1e3,cursorDuration:600,caching:!0,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(t,e){this.callSuper("initialize",t,e),this.initBehavior()},setSelectionStart:function(t){t=Math.max(t,0),this._updateAndFire("selectionStart",t)},setSelectionEnd:function(t){t=Math.min(t,this.text.length),this._updateAndFire("selectionEnd",t)},_updateAndFire:function(t,e){this[t]!==e&&(this._fireSelectionChanged(),this[t]=e),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(t){this.clearContextTop(),this.callSuper("render",t),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(t){this.callSuper("_render",t)},clearContextTop:function(t){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this.canvas.contextTop,i=this.canvas.viewportTransform;e.save(),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this.transform(e),this.transformMatrix&&e.transform.apply(e,this.transformMatrix),this._clearTextArea(e),t||e.restore()}},renderCursorOrSelection:function(){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var t=this._getCursorBoundaries(),e=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(t,e):this.renderSelection(t,e),e.restore()}},_clearTextArea:function(t){var e=this.width+4,i=this.height+4;t.clearRect(-e/2,-i/2,e,i)},_getCursorBoundaries:function(t){void 0===t&&(t=this.selectionStart);var e=this._getLeftOffset(),i=this._getTopOffset(),n=this._getCursorBoundariesOffsets(t);return{left:e,top:i,leftOffset:n.left,topOffset:n.top}},_getCursorBoundariesOffsets:function(t){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var e,i,n,r,s=0,o=0,a=this.get2DCursorLocation(t);n=a.charIndex,i=a.lineIndex;for(var l=0;l<i;l++)s+=this.getHeightOfLine(l);e=this._getLineLeftOffset(i);var h=this.__charBounds[i][n];return h&&(o=h.left),0!==this.charSpacing&&n===this._textLines[i].length&&(o-=this._getWidthOfCharSpacing()),r={top:s,left:e+(o>0?o:0)},this.cursorOffsetCache=r,this.cursorOffsetCache},renderCursor:function(t,e){var i=this.get2DCursorLocation(),n=i.lineIndex,r=i.charIndex>0?i.charIndex-1:0,s=this.getValueOfPropertyAt(n,r,"fontSize"),o=this.scaleX*this.canvas.getZoom(),a=this.cursorWidth/o,l=t.topOffset,h=this.getValueOfPropertyAt(n,r,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(n)/this.lineHeight-s*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(t,e),e.fillStyle=this.getValueOfPropertyAt(n,r,"fill"),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-a/2,l+t.top+h,a,s)},renderSelection:function(t,e){for(var i=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,n=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,r=-1!==this.textAlign.indexOf("justify"),s=this.get2DCursorLocation(i),o=this.get2DCursorLocation(n),a=s.lineIndex,l=o.lineIndex,h=s.charIndex<0?0:s.charIndex,c=o.charIndex<0?0:o.charIndex,u=a;u<=l;u++){var d,f=this._getLineLeftOffset(u)||0,p=this.getHeightOfLine(u),g=0,m=0;if(u===a&&(g=this.__charBounds[a][h].left),u>=a&&u<l)m=r&&!this.isEndOfWrapping(u)?this.width:this.getLineWidth(u)||5;else if(u===l)if(0===c)m=this.__charBounds[l][c].left;else{var v=this._getWidthOfCharSpacing();m=this.__charBounds[l][c-1].left+this.__charBounds[l][c-1].width-v}d=p,(this.lineHeight<1||u===l&&this.lineHeight>1)&&(p/=this.lineHeight),this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",e.fillRect(t.left+f+g,t.top+t.topOffset+p,m-g,1)):(e.fillStyle=this.selectionColor,e.fillRect(t.left+f+g,t.top+t.topOffset,m-g,p)),t.topOffset+=d}},getCurrentCharFontSize:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fontSize")},getCurrentCharColor:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fill")},_getCurrentCharIndex:function(){var t=this.get2DCursorLocation(this.selectionStart,!0),e=t.charIndex>0?t.charIndex-1:0;return{l:t.lineIndex,c:e}}}),S.IText.fromObject=function(e,i){if(t(e),e.styles)for(var n in e.styles)for(var r in e.styles[n])t(e.styles[n][r]);S.Object._fromObject("IText",e,i,"text")}}(),b=S.util.object.clone,S.util.object.extend(S.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var t=this;this.on("added",(function(){var e=t.canvas;e&&(e._hasITextHandlers||(e._hasITextHandlers=!0,t._initCanvasHandlers(e)),e._iTextInstances=e._iTextInstances||[],e._iTextInstances.push(t))}))},initRemovedHandler:function(){var t=this;this.on("removed",(function(){var e=t.canvas;e&&(e._iTextInstances=e._iTextInstances||[],S.util.removeFromArray(e._iTextInstances,t),0===e._iTextInstances.length&&(e._hasITextHandlers=!1,t._removeCanvasHandlers(e)))}))},_initCanvasHandlers:function(t){t._mouseUpITextHandler=function(){t._iTextInstances&&t._iTextInstances.forEach((function(t){t.__isMousedown=!1}))},t.on("mouse:up",t._mouseUpITextHandler)},_removeCanvasHandlers:function(t){t.off("mouse:up",t._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(t,e,i,n){var r;return r={isAborted:!1,abort:function(){this.isAborted=!0}},t.animate("_currentCursorOpacity",e,{duration:i,onComplete:function(){r.isAborted||t[n]()},onChange:function(){t.canvas&&t.selectionStart===t.selectionEnd&&t.renderCursorOrSelection()},abort:function(){return r.isAborted}}),r},_onTickComplete:function(){var t=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout((function(){t._currentTickCompleteState=t._animateCursor(t,0,this.cursorDuration/2,"_tick")}),100)},initDelayedCursor:function(t){var e=this,i=t?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout((function(){e._tick()}),i)},abortCursorAnimation:function(){var t=this._currentTickState||this._currentTickCompleteState,e=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,t&&e&&e.clearContext(e.contextTop||e.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(t){var e=0,i=t-1;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)e++,i--;for(;/\S/.test(this._text[i])&&i>-1;)e++,i--;return t-e},findWordBoundaryRight:function(t){var e=0,i=t;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)e++,i++;for(;/\S/.test(this._text[i])&&i<this._text.length;)e++,i++;return t+e},findLineBoundaryLeft:function(t){for(var e=0,i=t-1;!/\n/.test(this._text[i])&&i>-1;)e++,i--;return t-e},findLineBoundaryRight:function(t){for(var e=0,i=t;!/\n/.test(this._text[i])&&i<this._text.length;)e++,i++;return t+e},searchWordBoundary:function(t,e){for(var i=this._text,n=this._reSpace.test(i[t])?t-1:t,r=i[n],s=S.reNonWord;!s.test(r)&&n>0&&n<i.length;)r=i[n+=e];return s.test(r)&&(n+=1===e?0:1),n},selectWord:function(t){t=t||this.selectionStart;var e=this.searchWordBoundary(t,-1),i=this.searchWordBoundary(t,1);this.selectionStart=e,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(t){t=t||this.selectionStart;var e=this.findLineBoundaryLeft(t),i=this.findLineBoundaryRight(t);return this.selectionStart=e,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this},enterEditing:function(t){if(!this.isEditing&&this.editable)return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(t),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(t){t._iTextInstances&&t._iTextInstances.forEach((function(t){t.selected=!1,t.isEditing&&t.exitEditing()}))},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},mouseMoveHandler:function(t){if(this.__isMousedown&&this.isEditing){var e=this.getSelectionStartFromPointer(t.e),i=this.selectionStart,n=this.selectionEnd;(e===this.__selectionStartOnMouseDown&&i!==n||i!==e&&n!==e)&&(e>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=e):(this.selectionStart=e,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===i&&this.selectionEnd===n||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(t,e,i){var n=i.slice(0,t),r=S.util.string.graphemeSplit(n).length;if(t===e)return{selectionStart:r,selectionEnd:r};var s=i.slice(t,e);return{selectionStart:r,selectionEnd:r+S.util.string.graphemeSplit(s).length}},fromGraphemeToStringSelection:function(t,e,i){var n=i.slice(0,t).join("").length;return t===e?{selectionStart:n,selectionEnd:n}:{selectionStart:n,selectionEnd:n+i.slice(t,e).join("").length}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var t=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=t.selectionStart,this.hiddenTextarea.selectionEnd=t.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var t=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=t.selectionEnd,this.inCompositionMode||(this.selectionStart=t.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var t=this._calcTextareaPosition();this.hiddenTextarea.style.left=t.left,this.hiddenTextarea.style.top=t.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var t=this.inCompositionMode?this.compositionStart:this.selectionStart,e=this._getCursorBoundaries(t),i=this.get2DCursorLocation(t),n=i.lineIndex,r=i.charIndex,s=this.getValueOfPropertyAt(n,r,"fontSize")*this.lineHeight,o=e.leftOffset,a=this.calcTransformMatrix(),l={x:e.left+o,y:e.top+e.topOffset+s},h=this.canvas.getRetinaScaling(),c=this.canvas.upperCanvasEl,u=c.width/h,d=c.height/h,f=u-s,p=d-s,g=c.clientWidth/u,m=c.clientHeight/d;return l=S.util.transformPoint(l,a),(l=S.util.transformPoint(l,this.canvas.viewportTransform)).x*=g,l.y*=m,l.x<0&&(l.x=0),l.x>f&&(l.x=f),l.y<0&&(l.y=0),l.y>p&&(l.y=p),l.x+=this.canvas._offset.left,l.y+=this.canvas._offset.top,{left:l.x+"px",top:l.y+"px",fontSize:s+"px",charHeight:s}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var t=this._textBeforeEdit!==this.text,e=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,e&&(e.blur&&e.blur(),e.parentNode&&e.parentNode.removeChild(e)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),t&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),t&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var t in this.styles)this._textLines[t]||delete this.styles[t]},removeStyleFromTo:function(t,e){var i,n,r=this.get2DCursorLocation(t,!0),s=this.get2DCursorLocation(e,!0),o=r.lineIndex,a=r.charIndex,l=s.lineIndex,h=s.charIndex;if(o!==l){if(this.styles[o])for(i=a;i<this._unwrappedTextLines[o].length;i++)delete this.styles[o][i];if(this.styles[l])for(i=h;i<this._unwrappedTextLines[l].length;i++)(n=this.styles[l][i])&&(this.styles[o]||(this.styles[o]={}),this.styles[o][a+i-h]=n);for(i=o+1;i<=l;i++)delete this.styles[i];this.shiftLineStyles(l,o-l)}else if(this.styles[o]){n=this.styles[o];var c,u,d=h-a;for(i=a;i<h;i++)delete n[i];for(u in this.styles[o])(c=parseInt(u,10))>=h&&(n[c-d]=n[u],delete n[u])}},shiftLineStyles:function(t,e){var i=b(this.styles);for(var n in this.styles){var r=parseInt(n,10);r>t&&(this.styles[r+e]=i[r],i[r-e]||delete this.styles[r])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(t,e,i,n){var r,s={},o=!1,a=this._unwrappedTextLines[t].length===e;for(var l in i||(i=1),this.shiftLineStyles(t,i),this.styles[t]&&(r=this.styles[t][0===e?e:e-1]),this.styles[t]){var h=parseInt(l,10);h>=e&&(o=!0,s[h-e]=this.styles[t][l],a&&0===e||delete this.styles[t][l])}var c=!1;for(o&&!a&&(this.styles[t+i]=s,c=!0),c&&i--;i>0;)n&&n[i-1]?this.styles[t+i]={0:b(n[i-1])}:r?this.styles[t+i]={0:b(r)}:delete this.styles[t+i],i--;this._forceClearCache=!0},insertCharStyleObject:function(t,e,i,n){this.styles||(this.styles={});var r=this.styles[t],s=r?b(r):{};for(var o in i||(i=1),s){var a=parseInt(o,10);a>=e&&(r[a+i]=s[a],s[a-i]||delete r[a])}if(this._forceClearCache=!0,n)for(;i--;)Object.keys(n[i]).length&&(this.styles[t]||(this.styles[t]={}),this.styles[t][e+i]=b(n[i]));else if(r)for(var l=r[e?e-1:1];l&&i--;)this.styles[t][e+i]=b(l)},insertNewStyleBlock:function(t,e,i){for(var n=this.get2DCursorLocation(e,!0),r=[0],s=0,o=0;o<t.length;o++)"\n"===t[o]?r[++s]=0:r[s]++;for(r[0]>0&&(this.insertCharStyleObject(n.lineIndex,n.charIndex,r[0],i),i=i&&i.slice(r[0]+1)),s&&this.insertNewlineStyleObject(n.lineIndex,n.charIndex+r[0],s),o=1;o<s;o++)r[o]>0?this.insertCharStyleObject(n.lineIndex+o,0,r[o],i):i&&(this.styles[n.lineIndex+o][0]=i[0]),i=i&&i.slice(r[o]+1);r[o]>0&&this.insertCharStyleObject(n.lineIndex+o,0,r[o],i)},setSelectionStartEndWithShift:function(t,e,i){i<=t?(e===t?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=t),this.selectionStart=i):i>t&&i<e?"right"===this._selectionDirection?this.selectionEnd=i:this.selectionStart=i:(e===t?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=e),this.selectionEnd=i)},setSelectionInBoundaries:function(){var t=this.text.length;this.selectionStart>t?this.selectionStart=t:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>t?this.selectionEnd=t:this.selectionEnd<0&&(this.selectionEnd=0)}}),S.util.object.extend(S.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(t){if(this.canvas){this.__newClickTime=+new Date;var e=t.pointer;this.isTripleClick(e)&&(this.fire("tripleclick",t),this._stopEvent(t.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=e,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y},_stopEvent:function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(t){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(t.e))},tripleClickHandler:function(t){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(t.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||(this.__isMousedown=!0,this.selected&&this.setCursorByClick(t.e),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(t){if(this.__isMousedown=!1,!(!this.editable||this.group||t.transform&&t.transform.actionPerformed||t.e.button&&1!==t.e.button)){if(this.canvas){var e=this.canvas._activeObject;if(e&&e!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t),i=this.selectionStart,n=this.selectionEnd;t.shiftKey?this.setSelectionStartEndWithShift(i,n,e):(this.selectionStart=e,this.selectionEnd=e),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(t){for(var e=this.getLocalPointer(t),i=0,n=0,r=0,s=0,o=0,a=0,l=this._textLines.length;a<l&&r<=e.y;a++)r+=this.getHeightOfLine(a)*this.scaleY,o=a,a>0&&(s+=this._textLines[a-1].length+this.missingNewlineOffset(a-1));n=this._getLineLeftOffset(o)*this.scaleX;for(var h=0,c=this._textLines[o].length;h<c&&(i=n,(n+=this.__charBounds[o][h].kernedWidth*this.scaleX)<=e.x);h++)s++;return this._getNewSelectionStartFromOffset(e,i,n,s,c)},_getNewSelectionStartFromOffset:function(t,e,i,n,r){var s=t.x-e,o=i-t.x,a=n+(o>s||o<0?0:1);return this.flipX&&(a=r-a),a>this._text.length&&(a=this._text.length),a}}),S.util.object.extend(S.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=S.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var t=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+t.top+"; left: "+t.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; paddingï½°top: "+t.fontSize+";",S.document.body.appendChild(this.hiddenTextarea),S.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),S.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),S.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),S.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),S.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),S.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),S.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),S.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),S.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(S.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing&&!this.inCompositionMode){if(t.keyCode in this.keysMap)this[this.keysMap[t.keyCode]](t);else{if(!(t.keyCode in this.ctrlKeysMapDown)||!t.ctrlKey&&!t.metaKey)return;this[this.ctrlKeysMapDown[t.keyCode]](t)}t.stopImmediatePropagation(),t.preventDefault(),t.keyCode>=33&&t.keyCode<=40?(this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(t){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:t.keyCode in this.ctrlKeysMapUp&&(t.ctrlKey||t.metaKey)&&(this[this.ctrlKeysMapUp[t.keyCode]](t),t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},onInput:function(t){var e=this.fromPaste;if(this.fromPaste=!1,t&&t.stopPropagation(),this.isEditing){var i,n,r,s,o=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,a=this._text.length,l=o.length,h=l-a,c=this.selectionStart,u=this.selectionEnd,d=c!==u;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var f,p=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),g=c>p.selectionStart;d?(i=this._text.slice(c,u),h+=u-c):l<a&&(i=g?this._text.slice(u+h,u):this._text.slice(c,c-h)),n=o.slice(p.selectionEnd-h,p.selectionEnd),i&&i.length&&(n.length&&(f=this.getSelectionStyles(c,c+1,!0),f=n.map((function(){return f[0]}))),d?(r=c,s=u):g?(r=u-i.length,s=u):(r=u,s=u+i.length),this.removeStyleFromTo(r,s)),n.length&&(e&&n.join("")===S.copiedText&&!S.disableStyleCopyPaste&&(f=S.copiedTextStyle),this.insertNewStyleBlock(n,c,f)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(t){this.compositionStart=t.target.selectionStart,this.compositionEnd=t.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(S.copiedText=this.getSelectedText(),S.disableStyleCopyPaste?S.copiedTextStyle=null:S.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(t){return t&&t.clipboardData||S.window.clipboardData},_getWidthBeforeCursor:function(t,e){var i,n=this._getLineLeftOffset(t);return e>0&&(n+=(i=this.__charBounds[t][e-1]).left+i.width),n},getDownCursorOffset:function(t,e){var i=this._getSelectionForOffset(t,e),n=this.get2DCursorLocation(i),r=n.lineIndex;if(r===this._textLines.length-1||t.metaKey||34===t.keyCode)return this._text.length-i;var s=n.charIndex,o=this._getWidthBeforeCursor(r,s),a=this._getIndexOnLine(r+1,o);return this._textLines[r].slice(s).length+a+1+this.missingNewlineOffset(r)},_getSelectionForOffset:function(t,e){return t.shiftKey&&this.selectionStart!==this.selectionEnd&&e?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(t,e){var i=this._getSelectionForOffset(t,e),n=this.get2DCursorLocation(i),r=n.lineIndex;if(0===r||t.metaKey||33===t.keyCode)return-i;var s=n.charIndex,o=this._getWidthBeforeCursor(r,s),a=this._getIndexOnLine(r-1,o),l=this._textLines[r].slice(0,s),h=this.missingNewlineOffset(r-1);return-this._textLines[r-1].length+a-l.length+(1-h)},_getIndexOnLine:function(t,e){for(var i,n,r=this._textLines[t],s=this._getLineLeftOffset(t),o=0,a=0,l=r.length;a<l;a++)if((s+=i=this.__charBounds[t][a].width)>e){n=!0;var h=s-i,c=s,u=Math.abs(h-e);o=Math.abs(c-e)<u?a:a-1;break}return n||(o=r.length-1),o},moveCursorDown:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",t)},moveCursorUp:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",t)},_moveCursorUpOrDown:function(t,e){var i=this["get"+t+"CursorOffset"](e,"right"===this._selectionDirection);e.shiftKey?this.moveCursorWithShift(i):this.moveCursorWithoutShift(i),0!==i&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(t){var e="left"===this._selectionDirection?this.selectionStart+t:this.selectionEnd+t;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,e),0!==t},moveCursorWithoutShift:function(t){return t<0?(this.selectionStart+=t,this.selectionEnd=this.selectionStart):(this.selectionEnd+=t,this.selectionStart=this.selectionEnd),0!==t},moveCursorLeft:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",t)},_move:function(t,e,i){var n;if(t.altKey)n=this["findWordBoundary"+i](this[e]);else{if(!t.metaKey&&35!==t.keyCode&&36!==t.keyCode)return this[e]+="Left"===i?-1:1,!0;n=this["findLineBoundary"+i](this[e])}if(void 0!==typeof n&&this[e]!==n)return this[e]=n,!0},_moveLeft:function(t,e){return this._move(t,e,"Left")},_moveRight:function(t,e){return this._move(t,e,"Right")},moveCursorLeftWithoutShift:function(t){var e=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(e=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,e},moveCursorLeftWithShift:function(t){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(t,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(t,"selectionStart")):void 0},moveCursorRight:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",t)},_moveCursorLeftOrRight:function(t,e){var i="moveCursor"+t+"With";this._currentCursorOpacity=1,e.shiftKey?i+="Shift":i+="outShift",this[i](e)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(t){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(t,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(t,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(t){var e=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(e=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,e},removeChars:function(t,e){void 0===e&&(e=t+1),this.removeStyleFromTo(t,e),this._text.splice(t,e-t),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(t,e,i,n){void 0===n&&(n=i),n>i&&this.removeStyleFromTo(i,n);var r=S.util.string.graphemeSplit(t);this.insertNewStyleBlock(r,i,e),this._text=[].concat(this._text.slice(0,i),r,this._text.slice(n)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),C=S.util.toFixed,w=/ +/g,S.util.object.extend(S.Text.prototype,{_toSVG:function(){var t=this._getSVGLeftTopOffsets(),e=this._getSVGTextAndBg(t.textTop,t.textLeft);return this._wrapSVGTextAndBg(e)},toSVG:function(t){return this._createBaseSVGMarkup(this._toSVG(),{reviver:t,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(t){var e=this.getSvgTextDecoration(this);return[t.textBgRects.join(""),'\t\t<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",e?'text-decoration="'+e+'" ':"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",t.textSpans.join(""),"</text>\n"]},_getSVGTextAndBg:function(t,e){var i,n=[],r=[],s=t;this._setSVGBg(r);for(var o=0,a=this._textLines.length;o<a;o++)i=this._getLineLeftOffset(o),(this.textBackgroundColor||this.styleHas("textBackgroundColor",o))&&this._setSVGTextLineBg(r,o,e+i,s),this._setSVGTextLineText(n,o,e+i,s),s+=this.getHeightOfLine(o);return{textSpans:n,textBgRects:r}},_createTextCharSpan:function(t,e,i,n){var r=t!==t.trim()||t.match(w),s=this.getSvgSpanStyles(e,r),o=s?'style="'+s+'"':"",a=e.deltaY,l="",h=S.Object.NUM_FRACTION_DIGITS;return a&&(l=' dy="'+C(a,h)+'" '),['<tspan x="',C(i,h),'" y="',C(n,h),'" ',l,o,">",S.util.string.escapeXml(t),"</tspan>"].join("")},_setSVGTextLineText:function(t,e,i,n){var r,s,o,a,l,h=this.getHeightOfLine(e),c=-1!==this.textAlign.indexOf("justify"),u="",d=0,f=this._textLines[e];n+=h*(1-this._fontSizeFraction)/this.lineHeight;for(var p=0,g=f.length-1;p<=g;p++)l=p===g||this.charSpacing,u+=f[p],o=this.__charBounds[e][p],0===d?(i+=o.kernedWidth-o.width,d+=o.width):d+=o.kernedWidth,c&&!l&&this._reSpaceAndTab.test(f[p])&&(l=!0),l||(r=r||this.getCompleteStyleDeclaration(e,p),s=this.getCompleteStyleDeclaration(e,p+1),l=this._hasStyleChangedForSvg(r,s)),l&&(a=this._getStyleDeclaration(e,p)||{},t.push(this._createTextCharSpan(u,a,i,n)),u="",r=s,i+=d,d=0)},_pushTextBgRect:function(t,e,i,n,r,s){var o=S.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(e),' x="',C(i,o),'" y="',C(n,o),'" width="',C(r,o),'" height="',C(s,o),'"></rect>\n')},_setSVGTextLineBg:function(t,e,i,n){for(var r,s,o=this._textLines[e],a=this.getHeightOfLine(e)/this.lineHeight,l=0,h=0,c=this.getValueOfPropertyAt(e,0,"textBackgroundColor"),u=0,d=o.length;u<d;u++)r=this.__charBounds[e][u],(s=this.getValueOfPropertyAt(e,u,"textBackgroundColor"))!==c?(c&&this._pushTextBgRect(t,c,i+h,n,l,a),h=r.left,l=r.width,c=s):l+=r.kernedWidth;s&&this._pushTextBgRect(t,s,i+h,n,l,a)},_getFillAttributes:function(t){var e=t&&"string"==typeof t?new S.Color(t):"";return e&&e.getSource()&&1!==e.getAlpha()?'opacity="'+e.getAlpha()+'" fill="'+e.setAlpha(1).toRgb()+'"':'fill="'+t+'"'},_getSVGLineTopOffset:function(t){for(var e,i=0,n=0;n<t;n++)i+=this.getHeightOfLine(n);return e=this.getHeightOfLine(n),{lineTop:i,offset:(this._fontSizeMult-this._fontSizeFraction)*e/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(t){return S.Object.prototype.getSvgStyles.call(this,t)+" white-space: pre;"}}),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Textbox=e.util.createClass(e.IText,e.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:e.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(t){for(var e=0,i=0,n=0,r={},s=0;s<t.graphemeLines.length;s++)"\n"===t.graphemeText[n]&&s>0?(i=0,n++,e++):!this.splitByGrapheme&&this._reSpaceAndTab.test(t.graphemeText[n])&&s>0&&(i++,n++),r[s]={line:e,offset:i},n+=t.graphemeLines[s].length,i+=t.graphemeLines[s].length;return r},styleHas:function(t,i){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[i];n&&(i=n.line)}return e.Text.prototype.styleHas.call(this,t,i)},isEmptyStyles:function(t){if(!this.styles)return!0;var e,i,n=0,r=!1,s=this._styleMap[t],o=this._styleMap[t+1];for(var a in s&&(t=s.line,n=s.offset),o&&(r=o.line===t,e=o.offset),i=void 0===t?this.styles:{line:this.styles[t]})for(var l in i[a])if(l>=n&&(!r||l<e))for(var h in i[a][l])return!1;return!0},_getStyleDeclaration:function(t,e){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[t];if(!i)return null;t=i.line,e=i.offset+e}return this.callSuper("_getStyleDeclaration",t,e)},_setStyleDeclaration:function(t,e,i){var n=this._styleMap[t];t=n.line,e=n.offset+e,this.styles[t][e]=i},_deleteStyleDeclaration:function(t,e){var i=this._styleMap[t];t=i.line,e=i.offset+e,delete this.styles[t][e]},_getLineStyle:function(t){var e=this._styleMap[t];return!!this.styles[e.line]},_setLineStyle:function(t){var e=this._styleMap[t];this.styles[e.line]={}},_wrapText:function(t,e){var i,n=[];for(this.isWrapping=!0,i=0;i<t.length;i++)n=n.concat(this._wrapLine(t[i],i,e));return this.isWrapping=!1,n}
3,_measureWord:function(t,e,i){var n,r=0;i=i||0;for(var s=0,o=t.length;s<o;s++){r+=this._getGraphemeBox(t[s],e,s+i,n,!0).kernedWidth,n=t[s]}return r},_wrapLine:function(t,i,n,r){var s=0,o=this.splitByGrapheme,a=[],l=[],h=o?e.util.string.graphemeSplit(t):t.split(this._wordJoiners),c="",u=0,d=o?"":" ",f=0,p=0,g=0,m=!0,v=o?0:this._getWidthOfCharSpacing();r=r||0;0===h.length&&h.push([]),n-=r;for(var y=0;y<h.length;y++)c=o?h[y]:e.util.string.graphemeSplit(h[y]),f=this._measureWord(c,i,u),u+=c.length,(s+=p+f-v)>=n&&!m?(a.push(l),l=[],s=f,m=!0):s+=v,m||o||l.push(d),l=l.concat(c),p=this._measureWord([d],i,u),u++,m=!1,f>g&&(g=f);return y&&a.push(l),g+r>this.dynamicMinWidth&&(this.dynamicMinWidth=g-v+r),a},isEndOfWrapping:function(t){return!this._styleMap[t+1]||this._styleMap[t+1].line!==this._styleMap[t].line},missingNewlineOffset:function(t){return this.splitByGrapheme?this.isEndOfWrapping(t)?1:0:1},_splitTextIntoLines:function(t){for(var i=e.Text.prototype._splitTextIntoLines.call(this,t),n=this._wrapText(i.lines,this.width),r=new Array(n.length),s=0;s<n.length;s++)r[s]=n[s].join("");return i.lines=r,i.graphemeLines=n,i},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var t={};for(var e in this._styleMap)this._textLines[e]&&(t[this._styleMap[e].line]=1);for(var e in this.styles)t[e]||delete this.styles[e]},toObject:function(t){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(t))}}),e.Textbox.fromObject=function(t,i){return e.Object._fromObject("Textbox",t,i,"text")}}(e)}).call(this,i(96).Buffer)},function(t,e,i){"use strict";function n(t,e,i,n,r,s,o,a){var l,h="function"==typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=i,h._compiled=!0),n&&(h.functional=!0),s&&(h._scopeId="data-v-"+s),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},h._ssrRegister=l):r&&(l=a?function(){r.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(h.functional){h._injectStyles=l;var c=h.render;h.render=function(t,e){return l.call(e),c(t,e)}}else{var u=h.beforeCreate;h.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:h}}i.d(e,"a",(function(){return n}))},,,,,function(t,e,i){var n,r; 4/*! 5 * JavaScript Cookie v2.2.1 6 * https://github.com/js-cookie/js-cookie 7 * 8 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 9 * Released under the MIT license 10 */!function(s){if(void 0===(r="function"==typeof(n=s)?n.call(e,i,e,t):n)||(t.exports=r),!0,t.exports=s(),!!0){var o=window.Cookies,a=window.Cookies=s();a.noConflict=function(){return window.Cookies=o,a}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2}
10)+/g,decodeURIComponent)}return function i(n){function r(){}function s(e,i,s){if("undefined"!=typeof document){"number"==typeof(s=t({path:"/"},r.defaults,s)).expires&&(s.expires=new Date(1*new Date+864e5*s.expires)),s.expires=s.expires?s.expires.toUTCString():"";try{var o=JSON.stringify(i);/^[\{\[]/.test(o)&&(i=o)}catch(t){}i=n.write?n.write(i,e):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,!0!==s[l]&&(a+="="+s[l].split(";")[0]));return document.cookie=e+"="+i+a}}function o(t,i){if("undefined"!=typeof document){for(var r={},s=document.cookie?document.cookie.split("; "):[],o=0;o<s.length;o++){var a=s[o].split("="),l=a.slice(1).join("=");i||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var h=e(a[0]);if(l=(n.read||n)(l,h)||e(l),i)try{l=JSON.parse(l)}catch(t){}if(r[h]=l,t===h)break}catch(t){}}return t?r[t]:r}}return r.set=s,r.get=function(t){return o(t,!1)},r.getJSON=function(t){return o(t,!0)},r.remove=function(e,i){s(e,"",t(i,{expires:-1}))},r.defaults={},r.withConverter=i,r}((function(){}))}))},,function(t,e,i){(function(e){var i;i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=i}).call(this,i(36))},function(t,e){t.exports=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,i){var n=i(89),r=i(90),s=i(91),o=i(93);t.exports=function(t,e){return n(t)||r(t,e)||s(t,e)||o()},t.exports.default=t.exports,t.exports.__esModule=!0},,,function(t,e){function i(t,e,i){var n,r,s,o,a;function l(){var h=Date.now()-o;h<e&&h>=0?n=setTimeout(l,e-h):(n=null,i||(a=t.apply(s,r),s=r=null))}null==e&&(e=100);var h=function(){s=this,r=arguments,o=Date.now();var h=i&&!n;return n||(n=setTimeout(l,e)),h&&(a=t.apply(s,r),s=r=null),a};return h.clear=function(){n&&(clearTimeout(n),n=null)},h.flush=function(){n&&(a=t.apply(s,r),s=r=null,clearTimeout(n),n=null)},h}i.debounce=i,t.exports=i},,,function(t,e,i){t.exports=i(70)},,,,function(t,e,i){"use strict";var n=i(60),r=Object.prototype.toString;function s(t){return"[object Array]"===r.call(t)}function o(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===r.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var i=0,n=t.length;i<n;i++)e.call(null,t[i],i,t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(null,t[r],r,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===r.call(t)},isBuffer:function(t){return null!==t&&!o(t)&&null!==t.constructor&&!o(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:o,isDate:function(t){return"[object Date]"===r.call(t)},isFile:function(t){return"[object File]"===r.call(t)},isBlob:function(t){return"[object Blob]"===r.call(t)},isFunction:l,isStream:function(t){return a(t)&&l(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:h,merge:function t(){var e={};function i(i,n){"object"==typeof e[n]&&"object"==typeof i?e[n]=t(e[n],i):e[n]=i}for(var n=0,r=arguments.length;n<r;n++)h(arguments[n],i);return e},deepMerge:function t(){var e={};function i(i,n){"object"==typeof e[n]&&"object"==typeof i?e[n]=t(e[n],i):e[n]="object"==typeof i?t({},i):i}for(var n=0,r=arguments.length;n<r;n++)h(arguments[n],i);return e}
10,extend:function(t,e,i){return h(e,(function(e,r){t[r]=i&&"function"==typeof e?n(e,i):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},,,,function(t,e){function i(t){var e=[],i=0;if(this.trie=this.createTrie(t.patterns),this.leftMin=t.leftmin,this.rightMin=t.rightmin,this.exceptions={},t.exceptions)for(e=t.exceptions.split(/,\s?/g);i<e.length;i+=1)this.exceptions[e[i].replace(/\u2027/g,"").toLowerCase()]=new RegExp("("+e[i].split("â§").join(")(")+")","i")}i.TrieNode,i.prototype.createTrie=function(t){var e,i=0,n=0,r=0,s=0,o=null,a=null,l=null,h=null,c={_points:[]};for(i in t)if(t.hasOwnProperty(i))for(e=t[i].match(new RegExp(".{1,"+ +i+"}","g")),n=0;n<e.length;n+=1){for(o=e[n].replace(/[0-9]/g,"").split(""),a=e[n].split(/\D/),h=c,r=0;r<o.length;r+=1)h[l=o[r].charCodeAt(0)]||(h[l]={}),h=h[l];for(h._points=[],s=0;s<a.length;s+=1)h._points[s]=a[s]||0}return c},i.prototype.hyphenateText=function(t,e){e=e||4;for(var i=t.split(/([a-zA-Z0-9_\u0027\u00AD\u00DF-\u00EA\u00EB\u00EC-\u00EF\u00F1-\u00F6\u00F8-\u00FD\u0101\u0103\u0105\u0107\u0109\u010D\u010F\u0111\u0113\u0117\u0119\u011B\u011D\u011F\u0123\u0125\u012B\u012F\u0131\u0135\u0137\u013C\u013E\u0142\u0144\u0146\u0148\u0151\u0153\u0155\u0159\u015B\u015D\u015F\u0161\u0165\u016B\u016D\u016F\u0171\u0173\u017A\u017C\u017E\u017F\u0219\u021B\u02BC\u0390\u03AC-\u03CE\u03F2\u0401\u0410-\u044F\u0451\u0454\u0456\u0457\u045E\u0491\u0531-\u0556\u0561-\u0587\u0902\u0903\u0905-\u090B\u090E-\u0910\u0912\u0914-\u0928\u092A-\u0939\u093E-\u0943\u0946-\u0948\u094A-\u094D\u0982\u0983\u0985-\u098B\u098F\u0990\u0994-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BE-\u09C3\u09C7\u09C8\u09CB-\u09CD\u09D7\u0A02\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A14-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A82\u0A83\u0A85-\u0A8B\u0A8F\u0A90\u0A94-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABE-\u0AC3\u0AC7\u0AC8\u0ACB-\u0ACD\u0B02\u0B03\u0B05-\u0B0B\u0B0F\u0B10\u0B14-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3E-\u0B43\u0B47\u0B48\u0B4B-\u0B4D\u0B57\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C02\u0C03\u0C05-\u0C0B\u0C0E-\u0C10\u0C12\u0C14-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3E-\u0C43\u0C46-\u0C48\u0C4A-\u0C4D\u0C82\u0C83\u0C85-\u0C8B\u0C8E-\u0C90\u0C92\u0C94-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBE-\u0CC3\u0CC6-\u0CC8\u0CCA-\u0CCD\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D3E-\u0D43\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D60\u0D61\u0D7A-\u0D7F\u1F00-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB2-\u1FB4\u1FB6\u1FB7\u1FBD\u1FBF\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD2\u1FD3\u1FD6\u1FD7\u1FE2-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u200D\u2019]+)/gi),n=0;n<i.length;n+=1)-1!==i[n].indexOf("/")?0===n||n===i.length-1||/\s+\/|\/\s+/.test(i[n])||(i[n]+="â"):i[n].length>e&&(i[n]=this.hyphenate(i[n]).join("Â"));return i.join("")},i.prototype.hyphenate=function(t){var e,i,n,r,s,o,a,l,h,c=[],u=[],d=t.toLowerCase(),f=Math.max,p=this.trie,g=[""];if(this.exceptions.hasOwnProperty(d))return t.match(this.exceptions[d]).slice(1);if(-1!==t.indexOf("Â"))return[t];for(e=(t="_"+t+"_").toLowerCase().split(""),i=t.split(""),a=e.length,n=0;n<a;n+=1)u[n]=0,c[n]=e[n].charCodeAt(0);for(n=0;n<a;n+=1)for(o=p,r=n;r<a&&(o=o[c[r]]);r+=1)if(l=o._points)for(s=0,h=l.length;s<h;s+=1)u[n+s]=f(u[n+s],l[s]);for(n=1;n<a-1;n+=1)n>this.leftMin&&n<a-this.rightMin&&u[n]%2?g.push(i[n]):g[g.length-1]+=i[n];return g},t.exports=i},function(t,e){t.exports={id:"ru",leftmin:2,rightmin:2,patterns:{2:"1г1ж1м1п1Ñ1Ñ1Ñ1ÑÑ1Ñ1Ñ11Ñ1Ñ",3:"а1ба1да1еа1иа1ка1Ñа1Ñа1Ñ1баб1вбг21бе2бжб1л1боб1Ñ2бÑ2бÑ2бÑ2бÑ1бÑ1бÑ1бÑ1вав1дв1л2вмвÑ22вÑ2вÑ2вÑвÑ21вÑ1вÑг2а2ггг2и2гп2гÑ1дадв21де1дид1л1до2дп1дÑ2дÑд1Ñ
2дÑ2дÑ1дÑ1дÑе1а2ебе1ее1и2еоеÑ2е1Ñжг2ж2м2жÑ2жÑ2жÑ2зг1зе1зиз1лз1н2зÑ1зÑ2зÑз1Ñ2зÑ1зÑ1зÑи1аи1еи1ии1ки1л2ипи1Ñи1Ñи1Ñи1Ñ2й1йд2йÑ12кг1ке2кмк2о2кп2кÑк2Ñ2кÑ2кÑ2кÑ1кÑк2Ñ2лб1ли2лм1ло2лпл1Ñ2лÑл1Ñл2Ñ1лÑ2мж2мм2мп2мÑ2мÑ2мÑ2мÑм2Ñ1на2нг1не1нин1л1но1нÑн1Ñ
2нÑ2нÑ2нÑ
101нÑн2Ñ1нÑо1вог2о1ео3и2ойо1ко1Ñ2оÑо1Ñпе1пÑ
22пÑ2пÑ2пÑ2Ñг2Ñз2Ñм2Ñп2ÑÑ2ÑÑ
2ÑÑ2ÑÑ2ÑÑ2ÑÑÑ2Ñ1ÑаÑг2Ñ1зÑ2мÑ1н1ÑоÑп21ÑÑ1ÑÑÑÑ2ÑÑ21ÑÑ1ÑÑ2Ñг2ÑжÑм22ÑÑ4ÑÑ2ÑÑ2ÑÑ2ÑÑ2ÑÑÑ2ÑÑ1аÑ1еÑ1иÑ1оÑ1Ñ2ÑÑÑ1Ñ2ÑгÑ4и2Ñм2ÑÑ1Ñ
а2Ñ
г1Ñ
е1Ñ
и1Ñ
оÑ
п22Ñ
ÑÑа12ÑгÑи12Ñм3ÑÑ2ÑÑ3ÑÑÑÑ11ÑаÑ1в1ÑеÑ2ж1Ñи1Ñм3Ñо1ÑÑÑ2Ñ
Ñ2в2Ñм2ÑÑÑ1Ñ
2ÑÑ2ÑÑ2ÑмÑÑ2ÑÑ2Ñе2Ñи2ÑÑ2Ñб2Ñ2еÑ2оÑ2ÑÑ2ÑÑ1в2ÑгÑ2мÑ2нÑ2пÑÑ1Ñ2ÑÑÑ
2Ñ2ÑÑÑ2Ñ1аÑ1бÑ1вÑ1еÑ1иÑ1к2ÑмÑ1Ñ
Ñ1ÑÑ1ÑÑ1еÑ1иÑ1кÑ1лÑ1Ñа1Ñ1бÑ1дÑе1Ñ2Ñб1зÑи1Ñ1кÑ1нÑо1ÑпÑ1Ñ1Ñ1ÑÑÑ2ÑÑ1Ñ",4:"_аи2_аÑ2_ии2_ио2_иÑ3_лÑ2_оз4_Ñк2_ÑÑ2_Ñб2_Ñд2_Ñе2_Ñк2_Ñо3_Ñп2_ÑÑ2_ÑÑ2_ÑÑ14а3ааа2паа2Ñаа2Ñа3бÑав1ва1веа1виа1воа2вÑа1вÑа2вÑ
2агаа2гд2агоа3гÑ2адва2длад2Ñае2ла2епае2Ñазв2азг2аз1Ñа2иÑ
ак1в1аккак2лак1Ñа1лаа1леа3лиа1лÑа1лÑа1лÑ2амаамб42амоа2мÑан1Ñа1нÑ2а1оао2дао2као2Ñао2Ñ2апоа1Ñаа1Ñеа1Ñиа1Ñоа1ÑÑаÑ1Ñ
а1ÑÑа1ÑÑа1ÑÑа1Ñаа1Ñиа1Ñоа1ÑÑаÑ2Ñ
а1ÑÑа1ÑÑа1ÑÑа2ÑбаÑ2даÑ2Ñ
аÑ2ÑаÑÑ1аÑ
2ааÑ
3Ñ2аÑаа2ÑлаÑ1Ñа2Ñла2ÑÑаÑ2баÑ2ваÑ2зба1зба2о2б1ббвÑ22б1д3бев3бее3беÑ2беÑб1з21б2и3биаби2б2биж3бик3биоби1Ñ
2б3к2блÑ2блÑ2б3н3боÑ2бÑ_2бÑÑб1ÑÑ2бÑÑб1ÑÑб3ÑкбÑ4л1б2ÑбÑ1Ñ2б1Ñ
2б1ÑбÑ2Ñ2бÑ_2бÑÑ2бÑÑбÑ1Ñ3б2Ñ3вагва1зваÑ
13ваÑ3ваÑ2в1бв1вив1вÑ2вг21вев3вег1вее1вез1веÑ1веÑ1веÑ1веÑвзг2взд2взÑ21визви1овиÑ3ви2Ñ2в1квк2лв2ла2вли2влÑ2влÑ1вме2в1нвно1в3нÑвов21вод1воквоп21воÑ
1воÑ2вп22вÑ_1вÑÑв1ÑÑв1Ñ21вÑавÑ3г2вÑивÑ3п1вÑ
о2в1ÑвÑп2вÑÑ
22вÑ_1вÑе2вÑÑ2вÑÑ1вÑÑ1вÑÑ1в2Ñга1зга2Ñ2г3бгба2г1ви3ге_2г3ж2г1з2г1кг1ле2г3мг3нÑго1з3гойг2ол3гоÑ2гÑ_2гÑÑг4Ñаг4Ñб2г3ÑгÑ1вгÑ1Ñ2г1Ñ2г3Ñ2г3Ñда1зда2о2д1бд1ве1двид3вкд1вл2двÑ2дг23дез2дж_2джÑдип2диÑ3ди1Ñ
2д1к2д1нд3надо1здоп2до1Ñ2дÑ_д1Ñед1Ñид1ÑÑд1ÑÑдÑк22д1ÑдÑ3гдÑ2одÑ1Ñ
2дÑÑ2дÑÑ2д1Ñ2дÑг2дÑд2дÑÑ2дÑÑ2дÑ_1дÑе2дÑк2дÑÑ1дÑÑ1дÑÑ1д2Ñеа2деа2зе1вее1вие1вое2вÑе1вÑе1вÑ
е1вÑег2дед2жее2Ñ
е2жг2ежее3зее3зÑеи2деи2меи2ое1каек2зе1кие1кÑе1лае1лее1лÑе1лÑе1лÑе3лÑе2мÑе3наенÑ2е1нÑе1оде2оие2омеоп2еоÑ22епее2пле4пн2епое4пÑе1Ñае2Ñве1Ñее1Ñие1Ñое1ÑÑе1ÑÑе1ÑÑе1ÑÑе1Ñге1Ñк2еÑле3Ñо2еÑпе1ÑÑе1Ñае1Ñие1ÑоеÑ1Ñе1ÑÑе1ÑÑе1ÑÑе1ÑÑе1Ñ22еÑбеÑз2еÑ2л2еÑве1Ñле2ÑлеÑ2геÑ2зжа1з2ж1в2жгаж2гиж2гÑ2ж1дж2диждо3ждÑ14ждÑ3жев2жжаж2жежи1о2ж1к2ж1лж3ма2ж1нжно1жоÑ32жп2жпо1ж2ÑÑ2ж1Ñ2ж1Ñ2жÑ_2жÑÑ2жÑÑ1за1заа2заб2заг4зап2заÑ2заÑ2заÑ2заÑ
2заÑ2з1б2з1вез1виз1воз1вÑ1звÑз1вÑз3га2зж2з3з23зи_3зиÑ3зиÑ2з1кзко12зм2з3мн2зне2зно2знÑ1зов1зое1зои1зон1зоозоÑ21зоÑ
зоÑ21зоÑ1зоÑз1Ñаз1Ñоз1ÑÑз2ÑÑз1ÑÑ2з1Ñз1Ñи3зÑ_зÑ1в3зÑе2зÑпзÑ2з2зÑÑ1зÑе1зÑи1зÑÑ3зÑÑ1з2Ñи2аби2авиаг2иао2и2апи2аÑ2и1би1вии1вÑ2ивÑиг2ди3ге2игли2гни1двид1Ñи1дÑие2гие2дие2Ñи1зоиз1ÑийÑ2и3кои3кÑилп2и2лÑ2имаи3мии2мÑинд21инжинÑ21инÑ1инÑи1оби2оги1оди1ози1они1оÑи1оÑип3ни2Ñви2Ñж1иÑÑи2Ñби2ÑдиÑ1ки4ÑÑи1ÑÑи2Ñми1Ñ2иÑ3пиÑ1ли2ÑÑи1Ñ
Ñи2ÑÑиÑ4лиÑ2ниÑ2ÑиÑ2дйно1йп2лй2Ñбй2Ñнй2ÑÑй2Ñмй2Ñ
м1кавк2ад1кае1кай1кам1кан1каÑ1каÑ
1каÑ2к1бк1вик1вÑ2к1дкда22кеа2к1з1кивки1о1киÑкк3Ñк3лÑ2клÑ1клÑ2к1н1ков1код1коз1коÑ1коÑ2кÑ_кÑ3гкÑ3мк3Ñок3ÑÑ2к1ÑкÑ2Ñ3кÑе1кÑй3кÑм1кÑÑ1кÑÑ2к1Ñ1ла_1лаел2аклаÑ11лаÑл1бÑл1вел1вил1вол1вÑл2гллго11ле_1лен1леÑ
л1зо2л1клк2в2л1лл2лÑллÑ12л1нлÑ3б1лÑ_лÑ1влÑ3г1лÑе1лÑнлÑ1Ñ1лÑÑ1лÑ_1лÑе1лÑж1лÑй1лÑм4лÑ_2лÑд3лÑе3лÑи2лÑк2лÑм2лÑн3лÑо2лÑÑ2лÑÑ2лÑÑ3лÑÑ3лÑÑ1лÑ_1лÑж3лÑ_2лÑд3лÑм3лÑÑ
3магма2ÑмаÑ23маÑ4м1бм3бимб2л2мг22м1д3мкн2м1л2м1н3мод3мон3моп3моÑмп2л2мÑим1ÑÑ2м1ÑмÑ2кмÑ2н2м1ÑмÑи32м1Ñ
2мÑ2мÑм1мÑ2Ñ2мÑ_2мÑÑмÑÑ1мÑ
101ÑмÑ1Ñ2наÑ2наÑ3наÑ2н1внг4лнг2Ñ2н1днд2жн2длн2дÑнег23недне3енеи23неÑнеÑ23нийниÑ3ни1Ñ
3ниÑ3ниÑ2н1кнк2внк2лнк1Ñ2н1нноб2ноÑ2н3п2н1Ñо2н1Ñн2Ñгн2Ñлн2Ñн2н1Ñн2ÑмнÑ1Ñ
3нÑÑ2нÑ2нÑ
о12н1Ñн2ÑлнÑ2Ñ3нÑ_2нÑ_1нÑе1нÑи2нÑк1нÑо2нÑÑ2нÑÑ2нÑÑ1нÑÑ1нÑÑ1н2Ñо3авоап12оба1обмоб1Ñ1обÑ2обÑов2Ñо2вÑ
о1дÑое1бое2дое1оое2Ñо1зооие3ои2зои2мои2оойÑ2ок2в1окÑо3лао1лео3лоо1лÑо1лÑо1лÑо3лÑо3ма2омеом2Ñо2мÑо3наонд2о1нÑонÑ2о1о2о2оло2оÑо1Ñао1Ñео1Ñио1Ñо2оÑÑо1ÑÑо1ÑÑо1ÑÑоÑ2бо1ÑÑ2оÑÑ
оÑв21оÑг1оÑдо3Ñио2Ñм1оÑÑ
о1Ñ2оÑп2о3Ñе2оÑ
ио1Ñ
Ñо1Ñ
Ñо2ÑооÑ2ло1ÑÑоÑ2ÑоÑ2воÑ2доÑ2зпа3Ñ2п1дпе2з4п3к2пл_2п1нп3нап3нÑ3пой2пп22пÑ_пÑи12пÑÑп2ÑÑп3Ñо2п1Ñп3ÑÑ3пÑб2пÑ24п3Ñ2пÑ_2пÑÑп2Ñ11Ñа_Ñаа21ÑаÑ1ÑаÑ2Ñ1бÑ1виÑ1воÑ1вÑÑ2гвÑ2гнÑг2Ñ2Ñ1дÑд2жÑ2длÑ2дÑ1Ñе_Ñ1зоÑи3аÑиб2Ñ2ин1ÑиÑ1ÑиÑ1ÑиÑ2Ñ1кÑ2квÑк1ÑÑ2лÑÑлÑ1Ñ3лÑÑ2мÑ2Ñ1н1Ñо_1ÑоÑ2Ñ1Ñ4Ñ1ÑÑÑ2кÑ2ÑнÑÑ2п2Ñ1ÑÑ2Ñм1ÑÑ_1ÑÑлÑÑ2лÑ2Ñ
вÑÑ
1лÑÑ
1ÑÑ2Ñв2Ñ1ÑÑ2ÑлÑ2ÑмÑÑ2Ñ1ÑÑ_1ÑÑб2ÑÑз1ÑÑм2ÑÑ_1ÑÑе1ÑÑи2ÑÑк2ÑÑÑ2ÑÑÑ1ÑÑÑ1ÑÑÑÑÑ1л1ÑÑ_1ÑÑÑ1ÑÑÑ1Ñб2Ñ2бÑ2ÑбÑ1Ñ2вÑ2гиÑ2гнÑ2го1Ñд2Ñ2даÑ2деÑ3диÑ2до1Ñ2е1Ñ2ж1Ñ2и3ÑизÑи1Ñ
4Ñк_Ñк2л2ÑкнÑк2ÑÑк1Ñ2ÑлÑ2ÑноÑ2овÑо1дÑ3пн2ÑпÑ2ÑÑ_2Ñ1ÑÑ2ÑбÑÑ2лÑ2ÑнÑÑ2пÑÑÑ2ÑÑ2Ñ2ÑÑ_2ÑÑбÑ2Ñе1ÑÑи2ÑÑк2ÑÑм2ÑÑн2ÑÑп2ÑÑÑ2ÑÑÑ2ÑÑÑ1ÑÑÑÑ4ÑÑÑÑ2бÑÑ1вÑÑ2зÑÑ1Ñ
Ñ1Ñ
22ÑÑа2ÑÑо1ÑÑаÑ1Ñл2ÑÑоÑ3Ñн1ÑÑ2ÑÑ2зÑÑ2Ñ2ÑÑ_1ÑÑе2ÑÑк2ÑÑÑ1ÑÑÑ1ÑÑÑÑÑ1ÑÑ2ÑÑ1Ñ2ÑÑÑ1Ñ2ÑÑз1ÑагÑ2ан1ÑаÑ1ÑаÑ2Ñв_2Ñви2ÑвÑ2ÑвÑ2ÑвÑ2Ñ1д1Ñ2еÑе1д2Ñ1зÑии2Ñик23Ñкн2Ñ1лÑ2лÑÑ3мÑ2Ñ1нÑо1д1ÑоÑ2Ñп22ÑÑб2ÑÑв2ÑÑг2ÑÑд2ÑÑм2ÑÑн2ÑÑп2ÑÑÑ2ÑÑÑ2ÑÑÑ2ÑÑÑÑ1ÑÑÑ2Ñб2Ñ1ÑÑ2Ñм1ÑÑÑ2Ñ1Ñ
2Ñ1Ñ2ÑÑ24ÑÑ_3ÑÑе3ÑÑиÑÑ2м4ÑÑÑÑÑÑ1ÑÑ1Ñ1ÑÑг1ÑÑж1ÑÑпÑ2аÑÑб1ÑÑ1виÑв2лÑ1воÑ1вÑÑ2гвÑ2глÑ2гнÑд2вÑ3дÑÑе2дÑе2лÑе1ÑÑе2Ñ
Ñ2жжÑ1зоÑ1каÑк1вÑ1киÑ1коÑ1лаÑ1леÑ1лÑÑ1лÑÑ2мÑÑ3наÑ1нÑÑо2бÑо2вÑо2кÑо2пÑо2ÑÑо2ÑÑ2плÑ1ÑаÑ1ÑеÑ1ÑиÑ1ÑоÑ3ÑÑÑ1ÑÑÑ1ÑÑÑ1ÑÑÑ1ÑгÑÑ2лÑ1ÑмÑ2ÑнÑÑ2пÑÑ3ÑÑ1ÑÑ2ÑÑÑÑ2ÑÑÑ2ÑÑÑ1ÑаÑ1ÑиÑ1ÑоÑ1ÑÑÑ1ÑÑ1ÑÑÑÑ1ÑÑÑÑг2ÑÑ2ÑÑ3ÑиÑÑ1лÑ2ÑÑÑ2Ñ
вÑÑ
1лÑÑ
1Ñ1ÑÑÑÑ1ÑÑÑ3ÑеÑ3ÑиÑ2ÑлÑ2ÑпÑÑ2зÑа2Ñ
3ÑаÑÑаÑ12Ñ1б2Ñ1в2Ñ1дÑи2жÑи1о3ÑиÑ2Ñ1кÑ2лаÑ2лиÑ2ло2Ñ1н3Ñон3ÑоÑÑ1ÑиÑ1ÑоÑ1ÑÑ2Ñ3Ñ2Ñ1ÑÑ2Ñм2ÑÑÑ2Ñ1Ñ2ÑÑ22ÑÑ_Ñ2Ñ1Ñ
а2дÑ
ао32Ñ
1б1Ñ
2вÑ
3вÑÑ
3д2Ñ
ео3Ñ
1з2Ñ
ие2Ñ
1к2Ñ
1лÑ2Ñ
1нÑ
оп2Ñ
оÑ2Ñ
оÑ2Ñ
1ÑÑÑ
1ÑÑ2Ñ
1Ñ1Ñ
Ñ_2Ñ
Ñе2Ñ
Ñй1Ñ
Ñн1Ñ
ÑÑ1Ñ
ÑÑ2Ñ
ÑÑÑ
1Ñ
2Ñ
ÑÑ13Ñа_3Ñам3ÑаÑ
2Ñ1бÑ2ве2ÑвÑ2Ñ1дÑе1зÑе1кÑе1Ñ2Ñ1зÑип2ÑиÑ32Ñ1л2Ñ1н2Ñп22Ñ1Ñ2Ñ1Ñ2Ñ1ÑÑÑ2п2Ñ1б2Ñ1дÑе1оÑжо23Ñик3ÑиÑ2Ñ1кÑ2ле2Ñли2Ñма2ÑмеÑ2мо2Ñ1н2Ñ1ÑÑ2Ñе2ÑÑм3ÑÑк2Ñ1Ñ2ÑÑ_1ÑÑе1ÑÑи2ÑÑÑ2ÑÑÑ1ÑÑÑ1ÑÑÑ2Ñ1бÑе1кÑ1лÑÑ2лÑ2Ñ1н4ÑниÑ2п2Ñ3пÑ2Ñ1Ñ2Ñ1ÑÑ1Ñи2ÑÑÑ2Ñ1Ñ4ÑÑ_3ÑÑе3ÑÑи3ÑÑÑ3ÑÑÑÑ2Ñ1Ñеи2Ñе1ÑÑе1Ñ
ÑеÑ22Ñ1н2Ñ1Ñ2ÑÑ_Ñе2гÑе2дÑе2лÑе2ÑÑÑ3нÑ2блÑ3гаÑ3гиÑг2лÑ2гнÑ2длÑз2дÑ2злÑ2знÑиг1Ñк2лÑк1ÑÑ2лÑÑ2мÑÑ3поÑÑ2вÑ3ÑаÑ3ÑеÑ2ÑнÑ3ÑоÑÑ2пÑ2ÑÑ
ÑÑ2ÑÑ2ÑÑÑÑ2ÑÑ3ÑÑÑ2вÑÑ2дÑÑе1кÑ2знÑ2и1Ñ2клÑмо1ÑÑ2кÑ2ÑнÑ2ÑмÑÑ
о2Ñ2ÑаÑ2ÑеÑ2ÑÑÑÑ1вÑв1ÑÑд1ÑÑк1лÑкÑ1Ñ3маÑ3нÑÑо2зÑ1ÑеÑ1ÑиÑ1ÑÑÑ1ÑÑÑÑк2ÑÑ3мÑ2ÑоÑ2ÑеÑÑ
о3Ñ2бвÑ2блÑ1дÑÑз2гÑ1зоÑ1лаÑ1леÑ2лиÑ1лÑÑ2мÑÑ2нÑÑ1о1Ñ1ÑаÑ1ÑеÑ1ÑиÑ1ÑоÑ1ÑÑÑ1ÑÑÑ1ÑиÑ1ÑоÑ1ÑÑÑ1ÑÑÑ2ÑÑÑ2бÑÑ1воÑ1вÑÑ2гнÑд1вÑд1ÑÑ1зоÑк1ÑÑ2лÑÑ2мÑÑ3наÑнÑ2Ñ1ÑаÑ1ÑиÑ1ÑоÑ1ÑÑÑÑ1кÑÑ1лÑÑ2ÑÑ1ÑаÑÑ3вÑ3ÑиÑ1ÑоÑ1ÑÑÑ1ÑÑÑ1ÑÑÑÑ
1лÑ1Ñ
ÑÑÑе1Ñ2Ñл2ÑÑ_2Ñ1Ñ6зÑ_й2кÑ6ÑÑ_а1вÑа1лÑа1ÑÑ1веÑ1вÑз1вÑÑ1вмÑ1вÑÑг1лÑд1вÑд1ÑÑ1дÑÑе1вÑ2ежÑе3зÑе1лÑ2епÑе1ÑÑÑ1веÑ1воÑ1вÑ2ÑжеÑ3зеÑ1каÑ1киÑ1кÑÑ1лаÑ1леÑ1лÑÑ1лÑÑ2мÑÑ3наÑнÑ22ÑпеÑ2плÑ4пн2ÑпоÑ4пÑÑ1ÑаÑ1ÑеÑ1ÑиÑ1ÑоÑ1ÑÑÑ1ÑÑÑ1Ñк2ÑÑлÑ3ÑоÑ1ÑÑÑ1ÑаÑ1ÑиÑ1ÑоÑÑ1ÑÑ1ÑÑÑ1ÑÑÑ1ÑÑÑ1ÑÑ3жÑвж2жÑз1вÑ2знÑ3зÑÑ1каÑ3кÑÑ1лÑн1лÑÑ
1лÑÑ3лÑÑне3Ñ1нÑÑо1лÑ2омÑо1ÑÑо3ÑÑ1ÑÑÑÑ2дÑ1Ñ2ÑÑ2ÑÑ1ÑÑÑ1Ñ2Ñ3ÑÑÑ_ÑÑ2Ñ1лÑÑ1ÑÑÑ3ÑÑÑ2вÑÑ2ÑÑ1ÑÑÑ3ÑÑÑÑ3ÑÑÑ2ÑÑ_не88не_8бÑ_8вÑ_8гÑ_8дÑ_8жÑ_8зÑ_8кÑ_8лÑ_8мÑ_8нÑ_8пÑ_8ÑÑ_8ÑÑ_8ÑÑ_8ÑÑ_8Ñ
Ñ_8ÑÑ_8ÑÑ_8ÑÑ_8ÑÑ_",5:"_аб1Ñ_ади2_ак1Ñ_би2о_го2Ñ_дек2_ди1о_до3п_епи3_за3п_иг1Ñ_изг2_из3н_ик1Ñ_ле2о_на1в_на3Ñ_не3Ñ_ово1_ог3н_оÑ2п_оÑ1в_Ñи2Ñ_Ñо2Ñ
_ÑÑ2ж_Ñиа3_Ñи2г_Ñи2о_Ñм2Ñ_ÑÑ2в_ÑÑ2Ñа3блааб2лÑаб1Ñиав3зоави2ааво1Ñа2воÑав1Ñаав2Ñеа2глеаг2лиа2двеад2жиад1ÑоадÑ3Ñа2дÑнае2гоае2диае2Ñеаз1влаз1дÑаз1обаи2г1аи3глако3Ñ2акÑиа3лаг2алекало1залÑ2Ñа2лÑÑ2амеÑамои2а2наÑан2ÑпанÑ1ÑаоÑÑ1а3плаап2Ñа1аÑгÑаÑ2жа2аÑ1каÑ3миаÑ3ноа1ÑÑи1аÑакаÑ3вааÑ1виаÑ1вÑ2аÑезаÑо2ÑаÑ1Ñиа1ÑÑеа3ÑÑÑа3ÑÑÑаÑ3доа2ÑлеаÑÑ1ÑаÑ3ÑÑа2Ñ1лаÑ
ми2аÑ2лиаÑ1Ñаба2бвба2дÑба3зÑбал
10Ñ1баÑ3мба1ÑÑба1ÑÑбе2глбе2гн3бе2збе3зибез3нбез1ÑбеÑ3пби2обби2одби2онби2оÑби2Ñв1благб2ланб3ленб2лÑд2б2лÑб2лÑдб2лÑеб2лÑлбо3вÑбо2гдбо1з2бо2мÑбо3мÑбонÑ1бо1ÑÑбо2Ñабо1Ñкбо2ÑвбоÑ2ÑбоÑ2Ñб3Ñабб2Ñавб2Ñан1бÑаÑб1ÑаÑ
б1Ñейб1Ñекб2Ñемб2ÑеÑ
б2Ñидб1Ñол1б2ÑÑ2б1Ñ2бÑк1лбÑ2г1бÑÑ1кбÑÑÑ1бÑ1Ñава2бÑвадÑ2ванÑ2ва1ÑÑва1ÑÑв2доÑ
вед1Ñве3дÑ3везе3везлвез2Ñ1вей_ве2п12веÑдвеÑ3Ñ1в2з2взо1бви2азви2акви2аÑвиа1Ñви3аÑви2гвви2гл1винÑ1винÑв2левв2лекв2леÑв2леÑв2лиÑв2лÑб4в3нав2неÑв3нÑ_во1б2во3вкво1двво1дÑво2еÑво2жжво3м2во1ÑÑ2воÑÑ2воÑÑвоÑ1кво1Ñмво1ÑнвоÑ2Ñво1Ñ
л2вÑа_в2Ñавв1ÑаÑ2вÑаÑ2вÑе_1вÑидв1Ñиив1Ñикв1Ñилв1ÑиÑв1ÑиÑ2в1Ñо2в1ÑÑ2в1Ñ23вÑе33в2Ñп3в2ÑÑвÑо3Ñ1вÑ1з2вÑ1квÑ1Ñ2вÑÑ
3ввÑ1ÑлвÑ3г2вÑ3знвÑ3Ñ21вÑин1в2Ñ1г3дан2г3диге2б1гено1ге2обге2одге1оÑги2блги3бÑги2гÑги1ÑлгиÑÑ22гла_г2лавг1лай2глаÑг2леÑ2гли_г2лин2гло_2глов2глог2глое2глой2глоÑ2глÑÑ2г1лÑг2лÑж2глÑкг2навг2нанг3не_г2невг3ненг3непг3неÑг2ниÑг2ноег2ноиг2ноÑго1б2го2влго2злгоз2нгоиг2гоми2го2Ñдго1Ñн2гоÑдгоÑ3Ñго1Ñлг1Ñаег1Ñайг1ÑаÑг1Ñегг1Ñекг1ÑеÑг1Ñикг1Ñилг1Ñинг1ÑиÑг1ÑиÑг1Ñовг2Ñозг1Ñокг1Ñонг1Ñопг1ÑоÑг1ÑоÑгÑÑ2пг1ÑÑвг1ÑÑег1ÑÑлг1ÑÑÑ2г3Ñ2да2б1да2гÑдаÑ1Ñ2двиз2дводд1воз2д1д23девÑде2зиде2зÑдеио2де1кл3демеде2оддео3пде3плдеÑ2кде2ÑÑде1Ñ
лд2жамд2ж3м2д1з2ди2аддиа2зди2аÑди2аÑди2обди2оÑдио1Ñди2пиди3пÑди3ÑÑд2лев2д3м2днеа2дноÑ24д3нÑдо2блдов2лдо1д2до3дндоз2ндои2Ñ2докÑдо3плдоÑ2п2доÑд2доÑл2доÑÑдо3ÑÑ3доÑ
лдо2ÑÑд1Ñабд1ÑаÑд1ÑаÑ
д1ÑаÑд2ÑаÑд2Ñеб2дÑезд2Ñелд2Ñемд2Ñий2дÑинд2Ñипд2ÑиÑ
д1Ñодд1Ñоед1Ñойд1Ñолд1Ñонд1ÑоÑд1ÑоÑд1ÑоÑд1ÑÑб1дÑÑг1дÑÑжд1ÑÑмд1ÑÑÑ2дÑÑвд2ÑÑбд2ÑÑÑ
2д1Ñ2дÑ3кндÑб3Ñ2д1ÑддÑ2дадÑп1лдÑÑ1кд1ÑÑлдÑ1ÑÑдÑ2ÑидÑÑ1Ñ2д3Ñе2д3Ñ2дÑе2м2дÑмедÑ3ÑÑеади3еа3доеаÑ1Ñеба2Ñе1бÑаеб1Ñие1бÑоеб1ÑÑ2евеÑ2еволев1Ñиев2Ñ
ое2глее2глие2глоег2наег2но2ег2Ñед1вое1джее2доÑ
е1дÑÑе2дÑге2дÑÑе2дÑнее2гиее1Ñ2ее2ÑÑеж3дие2ж1ÑезаÑ3езд1ÑеззÑ3е3зиÑез1обе1зомез1опез1оÑез1оÑез2ÑÑез1Ñпез1ÑÑеи2г1еиÑ1лека2б2е1ко2е1кÑек2Ñоек1Ñкеми3кемо1Ñ2емÑж2емÑÑ2е1нÑен3Ñ2е1о2бео3даео2деео2дое1о2жео3кле1ол_е1олаео3лие1олке1олÑе1олÑе1он_е2онае2ониео3ное1онÑе1опеео2пÑео4пÑео1Ñке1оÑме1оÑнео3ÑÑ
е1оÑле1о2Ñе1о2ÑепаÑ2е3плаеп1лÑе3плÑе4п3ÑеÑ1вее3Ñе_еÑе3пеÑо2б2еÑолеÑ3Ñке3Ñ2аеÑ2бае2Ñкее1ÑлÑе1ÑлÑе1Ñ4ме2ÑпÑе2ÑÑле3ÑÑÑеÑ1вееÑ1вие1Ñво2еÑеÑеÑо1ÑеÑ2ÑÑе1ÑÑее3ÑÑÑе3ÑÑÑеÑб3ÑеÑ1ÑееÑ
а2ÑеÑ
1обеÑ
1ÑееÑ
1ÑÑжа2блжа2бÑжаÑ1в2ж1б23ж2глж2дакж2даÑж2деп4ж2дл3ж2дÑже3д2же1клже1о2же3п2же1Ñ2же3Ñк2жжев2ж1з22жиÑÑ2ж3мо2ж1обжоÑ1Ñз1авÑз1адÑзае2дзае2Ñ
за3з2з1акÑ3з2анза3назанÑ2заÑ2взаÑ2жзаÑÑ2за3ÑкзаÑ2Ñза3Ñ2з2вавз2ван2зваÑз2везз3в2кз1вла2зволз2глизг2наз2гнÑз1д2вз2деÑздож3зе2б1зе2евзе2од3зий_з1инÑзи2оззи1опзиÑ3мз2лаÑз2лобз2лопз2лоÑз2лÑÑ2зна_з2навз2наез2найз2накз2нанз2наÑз2наÑ2знаÑ2з3ни2з3нÑз2обезо2бизо2глзо
101дÑзо1з21зой_1зок_з1окÑ1зол2зо1лгзо1лжзо3м21зом_2зомн2зонÑзо2оÑзо2паз2оплз2опÑз1оÑгз1оÑнзо1Ñпзо2Ñвз2оÑез1оÑкз2оÑозо2Ñиз2ÑакзÑа2Ñз2ÑаÑз2Ñенз1ÑеÑз2ÑиÑ2зÑве2зÑ2г2зÑ1к3зÑмезÑ2пÑз1ÑÑбзÑе2м2зÑме2зÑмÑи2агÑи2адеи2адииа2мÑи3анаианд2и3аÑÑи2а1Ñ
иа2Ñеи2б1Ñ2иваж2и1веи2в3з2и1вои1в2Ñи3в2Ñив2Ñ
ои2глеи2глиигни3иг1Ñоиг1ÑÑиг1ÑÑи2дейи1д2жие3деие2зÑи3ениие1о2иепи1и3ж2диз1в21из1дизо2ои3к2аик2ваи2квии2клÑик1Ñоик1ÑкилÑÑ2имои2им3пли2м1Ñим2Ñаино1Ñ1инÑп1инÑÑио2боио2вÑио2деио3зои1окÑи1олеи1опÑи3оÑаио1ÑÑио2Ñаи1оÑаи1оÑки1оÑÑиоÑг2ио2Ñ
оипаÑ2ип2лÑиÑиÑ3иÑ3кеиÑ3кииÑ1лÑиÑ3меиÑ3мÑиÑ3нои2ÑÑли1ÑÑииÑа2виÑ3ваиÑ1вииÑ1вÑи2Ñ1Ñи3ÑÑÑи3ÑÑÑиÑ2лÑиÑ
а3ди3Ñ
2оиÑ
о3киÑ
1ÑеиÑ
1ÑииÑ2лии2ÑлÑиÑ3Ñай2д3вй2о1Ñйо2ÑÑй3ÑкайÑ2кейÑ4мой2Ñ3ÑйÑ
2Ñ3ка2блказ3нка1зо1кал_1кало1калÑ3к2аÑка1ÑÑк2вакк2ваÑк2ваÑк2возке2глкед1ÑкиоÑ1ки2пл2к1к22клемк3ленк1леок2ликк2линк3лиÑк2лозк3ломкло3Ñ1клÑк2клÑ_2клÑм2клÑÑ
к2ноп3ковако1дÑ3конÑкоп2Ñко1ÑÑко1ÑккоÑ3мко1Ñп1коÑнко2ÑÑк1ÑелкÑе1ок1ÑеÑ1кÑибк1Ñидк2Ñизк2ÑиÑк1ÑиÑ
к1Ñоак1Ñобк2Ñоек1Ñокк1Ñоок1ÑоÑк1ÑоÑк1ÑоÑк1ÑоÑ
к1ÑоÑкÑÑ1Ñк1ÑÑдк2Ñ3вк2Ñ3дк2Ñибк1ÑкикÑ1клк1ÑкокÑ3Ñек1ÑÑокÑ1ÑÑк1ÑÑÑкÑа2ккÑо1ÑкÑ1ве1кÑлÑкÑп1лкÑ3ÑокÑÑ1ккÑ1ÑÑкÑ3ÑÑ1кÑÑе1кÑÑÑ3кÑÑÑ2к1Ñ
22лабела2бл2лагола2гÑла1золак2Ñ1лам_ла2ÑÑла2ÑÑ1ла1Ñ
2л3д2ле1влле1джле3доле1зÑлек1л2лемнле2Ñбле2Ñкле1Ñвле1Ñ
Ñлиа2м3ливо3ливÑлиг2ллие3Ñли2кв2лимплио1Ñли2пллиÑ3мли2ÑвлиÑ3мли1Ñ
лли1Ñ
Ñл2к1ллни2ело2блло2влло1дÑ2лоенло1звло2клло2Ñвло1ÑÑлоÑ1к2лоÑдлоÑ2Ñло2Ñл2л1Ñ2лÑ1бÑлÑ1знлÑ1кÑлÑо2длÑ3ÑÑ2л3Ñ22л1Ñ
2л2Ñ
3в1лÑÑ
_2лÑÑк1лÑÑа1лÑÑе1лÑÑÑ1лÑÑÑлÑ1ÑалÑ1ви3лÑво3лÑвÑлÑ1ÑелÑ1ÑÑма2взма2гнма2дÑма2дÑма1зомаÑ3лма2ÑÑм3блÑ2м3в23м2глмеан2ме2егме2елме1зомеÑ1Ñ2м1з2ми1зв2миздми1знми2кÑми2озми2оÑ2м1к2м2леем2лел4м3намне1д4мноем2нож4мной4мномм2ноÑ4мноÑм2нÑÑ4м3нÑмо1б2мо3влмо1дÑмо2жжмо1звмо1зÑмо3м2мо1ÑÑмо1Ñммо1Ñн3моÑим1Ñаб2м1ÑомÑ1ÑÑмÑÑ1ÑмÑ3ÑÑм2Ñавм2Ñалм2ÑиÑм2ÑиÑ3м2ÑемÑ2мÑмÑ1ÑÑнаб2Ñнаг2нна3ждна1з2на2илна2ин4наккнап2лна1Ñ2на1Ñвна1Ñ
2наÑ1Ñ2н1б2н2г1внги2онго1Ñн2дакн2д1внде3знде2Ñн3д2знд2Ñен2дÑÑнд2Ñпне1б22невннед2оне3дÑнее2дне1звне1знне1зоне1зÑне1клне2олне3п2неÑ2кнеÑÑ2не2ÑÑне1Ñ
Ñне3Ñк2н1з2нзо1Ñни3б2ни2енни2клнила2ни1ÑлниÑ3пнкоб2но1бÑно2влно1двно1дÑно2еÑно1звно2здно1зÑно3кн3номеном3Ñно2Ñвно1ÑÑно2ÑÑ2ноÑдно3Ñ22н1Ñе2н1Ñин2Ñ3внÑ2кен3Ñлан2Ñ3мнÑÑ2ÑнÑÑ2Ñн2Ñ3Ñн2ÑÑ3н2Ñ1внÑ2ÑанÑ2ÑенÑ2ÑÑнÑ2ÑÑнÑÑ1ÑнÑ1ви2о1а22обиоо1блÑобо2Ñ2обоÑо3влаов3ноов2Ñе2о3гео3гÑÑ2одано3де_о2дÑно2дÑбое2жиое1Ñ2ое2ÑÑо2еÑоо3жди2озавоз2вио1здÑозе1ооз3но2озоно2зопоз1Ñго2зÑмо3зÑÑои2г1оиг2нои3мо2ок2ло3клÑоко1бок1Ñк2окÑи2окÑмом2блом1Ñиом2Ñео3мÑÑоно1боо3пÑооÑ3мо2оÑио3пако3паÑо2плиоп2лоо2плÑоп2Ñиоп2Ñоо1Ñ2воÑ2ÑÑо1ÑÑео1ÑÑко1ÑÑÑо3Ñадо2ÑкеоÑ1кио1Ñ2лоÑ3миоÑ2пÑоÑ2ÑвоÑ2Ñао2ÑÑÑо1Ñ2ÑоÑ3ваоÑ1веоÑ1виоÑ1вло3ÑеÑоÑ1ÑиоÑ3ÑмоÑÑ2ао3ÑÑÑо3ÑÑÑоÑÑ2коÑ3ÑаоÑ3Ñо2оÑаÑ2оÑиÑ2оÑон2оÑоÑо2ÑÑиоÑ
1лÑо2Ñ
лÑоÑ
2ме2оÑ
оÑоÑа1ÑоÑ1лео3ÑлиоÑ3ваоÑ2лаоÑ1ÑиоÑ2Ñипави3пав3лпа2вÑпа2дÑпа2енпа1зопаÑ1лпа2Ñнпа1Ñ
Ñпа2ÑÑ2п1в2пе2двпе3запе3зопе2лÑпе4плпе2Ñнпе2ÑÑпе2ÑÑпе2ÑÑпе2ÑÑ3пинк3пиÑÑ4пла_пла1Ñ2пленп1леÑ2плив2пло_2плов2плог2плÑй2плÑмп1лÑнп1лÑÑ
2плÑ_п1лÑÑп2лÑÑп2лÑÑп3но1по1б2по3влпое2лпое2Ñ
по1знпои2Ñ3полкп1оÑгпоÑ2жпо1ÑÑпо1Ñ43поÑлпо3ÑÑпоÑ2впоÑ2Ñпо1Ñ
2поÑ3мппо1д3пÑевпÑе1зпÑей2пÑе1л3пÑеÑпÑи3впÑиг2пÑи3кпÑи3лпÑип2п2ÑиÑ3пÑоипÑо3п2п1Ñ2п3Ñинп2Ñ3впÑг3нпÑ1ÑÑпÑ3ÑÑпÑ1ÑаÑа2бл1ÑабоÑа2гвÑа2глÑад2жÑа2дÑÑак2в1Ñалг1Ñамк1Ñамн1ÑаÑлÑаÑ3пÑаÑ1ÑÑаÑ1в2ÑаÑ
и1ÑаÑи2ÑаÑÑÑб2лаÑ2блеÑб2лоÑб2лÑÑбо3ÑÑ3вакÑ3ваÑÑ3вежÑ2вео1ÑвеÑÑ3винÑ2виÑÑ2г1лÑда1ÑÑ2д1вÑди2аÑдоÑ2Ñе1вÑÑег2нÑее2вÑее2дÑее2л1ÑезкÑе1зÑÑез2Ñ1ÑейÑ1ÑекÑ3Ñемо1Ñенк1ÑенÑÑе1онÑе1опÑе1оÑ
1ÑепÑÑе3Ñ2Ñе1ÑлÑе1ÑÑÑе1ÑвÑе1ÑÑÑе3ÑлÑ3жа_Ñ3жамÑ3жанÑ3ж2дÑ1з2вÑи3бÑ2Ñиги2ÑиджÑие2лÑие3ÑÑиз2вÑик2Ñ1ÑинÑÑио2зÑио2ÑÑи1оÑÑи3Ñ2Ñи1Ñ2Ñи3Ñб2ÑиÑпÑи2ÑлÑи3ÑÑÑи1Ñ
лÑ2к1л2Ñ1л2ÑнаÑ4Ñне3оÑо2влÑо1двÑо1длÑо1дÑ1ÑодÑÑое2лÑое2мÑое2Ñ
Ñо1зÑ1ÑокÑÑо3пÑÑо1ÑÑÑо1Ñк1ÑоÑлÑо1ÑмÑоÑ2Ñ1ÑоÑÑ1ÑоÑÑ1ÑоÑкÑоÑг2Ñо2ÑÑÑо1Ñ
лÑоÑ2лÑо3Ñн1ÑоÑзÑп2лоÑ2плÑÑÑÑв2Ñ2Ñ1вÑÑ3ваÑÑ2влÑÑ1ÑаÑÑ1ÑеÑÑ1ÑиÑÑÑÑ1Ñ3ÑÑÑÑÑ1ÑÑ1ÑÑбаÑÑг3н2ÑÑкÑÑÑÑ1кÑÑÑ3лÑÑ3ÑÑ1ÑÑÑ
а1ÑÑÑ
о1
10ÑÑÑнÑ3Ñ2мÑÑ2двÑÑ2клÑÑ2Ñ
1ÑÑ1виÑа2блÑа2дÑÑа2квÑа2клÑ1аппÑа1ÑÑÑа2ÑнÑа1Ñ
22Ñ3бÑÑег2нÑе1з2Ñе1квÑек1лÑекÑ4Ñеми1Ñе2ÑкÑе2ÑÑÑи1омÑи1опÑи2пл2Ñкам2ÑкаÑ
Ñк2ваÑ2квиÑ2клÑÑ1кон2ÑкоÑÑ1кÑа2ÑкÑе1Ñлав1ÑладÑ1ламÑ3левÑ3лееÑ1лейÑлео2Ñ1леÑÑ3леÑ2ÑлиÑÑ2ложÑ1лÑÑ2Ñ3лÑ1ÑмеÑÑ4меÑÑ3мÑÑÑ2наÑ2ÑнаÑ2ÑнÑÑ2Ñ3нÑÑов2ÑÑо1з2Ñо3м2Ñо1ÑÑÑо1ÑкÑо2ÑÑÑоÑ2ÑÑо1ÑлÑоÑ2лÑ2павÑ2пееÑ2пелÑ2пенÑ2пеÑ
Ñ2пеÑÑ2пеÑÑ2пим2ÑполÑ2поÑÑ2ÑабÑÑа2ÑÑ1ÑаÑÑÑ3во4Ñ5ÑиÑ3Ñ2к1ÑÑа_4ÑÑв_2ÑÑвлÑÑ2вÑ1ÑÑей1ÑÑелÑÑе3Ñ
Ñ3ÑеÑÑ2ÑиеÑ2ÑииÑ2ÑиÑÑ2ÑиÑÑÑ2ла2ÑÑли2ÑÑлÑ1ÑÑо_1ÑÑов1ÑÑог1ÑÑод1ÑÑое1ÑÑок1ÑÑом1ÑÑон1ÑÑоÑ1ÑÑоÑÑ2ÑоÑ1ÑÑоÑ2ÑÑÑ_Ñ1ÑÑÑ1ÑÑÑÑÑ2ÑÑв2ÑÑÑ_2ÑÑÑÑ3ÑÑÑÑ1ÑÑÑÑ1ÑÑÑм1ÑÑÑÑ
ÑÑб1оÑÑ3глÑÑ2евÑÑ1кÑÑÑма1ÑÑпе2ÑÑÑ3лÑÑÑ3пÑÑ1ÑÑÑÑÑ1ÑÑÑ2Ñ31Ñ2Ñе1Ñ2Ñ
е2Ñ3ÑиÑ2ÑаÑÑ3Ñив2ÑÑикÑ2ÑиÑÑÑе3дÑÑе3лÑÑ2г1ÑÑ3ÑÑÑа2блÑаб2ÑÑа2гнÑа1з2Ñа2плÑа1ÑÑÑа1ÑÑ2Ñ1б22Ñ2ваÑ1вейÑ1велÑ1веÑÑ1воеÑ1воÑ2ÑвоÑ2Ñ1вÑÑе2гнÑе1зо3ÑекаÑек1л3ÑекÑÑе1оÑ
3ÑеÑзÑеÑ3к3ÑеÑÑÑеÑÑ2Ñе2Ñ
оÑиа2мÑи2блÑи3д2ÑииÑ1Ñ1импÑ1инд2Ñинж2ÑинÑÑи1Ñ
Ñ2Ñ1к2Ñло2бÑми2Ñ2ÑобÑÑо2влÑо1з2Ñок2Ñ2ÑомÑ2Ñонг1ÑоÑг1ÑоÑж1ÑоÑÑÑо1ÑÑ1ÑоÑÑ2ÑоÑдÑо3ÑкÑпа1ÑÑÑдо2Ñ1ÑеаÑ1ÑегÑ1ÑедÑ1ÑееÑ1ÑеÑÑ1ÑеÑ1ÑÑибÑ1ÑивÑ1ÑилÑ1ÑимÑÑи1оÑ1ÑиÑÑÑи3ÑÑ1ÑиÑ2ÑÑойÑ1ÑоÑÑÑо3Ñ2ÑÑоÑ1ÑÑÑбÑ2ÑÑд2ÑÑÑкÑ2ÑÑмÑ2ÑÑÑÑ1ÑÑ_Ñ1ÑÑвÑ1ÑÑеÑ1ÑÑжÑ1ÑÑйÑ3ÑÑкÑ1ÑÑÑÑ1ÑÑÑÑ1ÑÑÑ4Ñ1Ñ2Ñ2Ñ3дÑÑеп2Ñ2Ñ3мÑ2Ñ3пÑÑ2гÑÑÑ1ÑлÑÑ1ÑÑÑÑ2Ñл1ÑÑÑа1ÑÑÑо1ÑÑÑÑÑÑ2г12ÑÑ2ÑÑ2алеÑ3белÑбо1дÑбоÑ21ÑбÑаÑб3ÑÑÑ1ве_Ñг2наÑг2неÑг1ÑеÑг1ÑÑÑда1ÑÑд1ÑоÑеÑ2лÑ1з2вÑзо3пÑко1бÑ1кÑ1Ñ1лÑÑ
Ñ2озаÑоÑÑ1Ñо2Ñ1Ñп1лÑÑ3пÑоÑÑке3Ñ2ÑодÑÑÑ2ÑÑ2ÑадÑÑ1каÑÑ1киÑÑк3лÑ1ÑкÑÑÑ3лиÑ1ÑÑеÑ1ÑÑÑÑ3ÑÑÑÑ3ÑеÑÑÑ2лÑÑÑ1ÑиÑ1ÑÑеÑ3ÑÑÑÑÑ2лÑÑÑ
1адÑÑ
а2ÑÑÑ
3лÑÑ2ÑебÑÑ1лаÑа2б1Ñа2гнÑа1зоÑан2дÑа1ÑÑÑев1ÑÑед1ÑÑе1о3Ñи2глÑи2зо2ÑобÑÑо2ÑвÑо1ÑÑÑоÑ1кÑ1ÑабÑÑа1зÑÑа1ÑÑ1ÑаÑÑ2ÑенÑÑе2ÑÑ2ÑижÑ2ÑизÑ2ÑонÑ2ÑоÑÑÑ3ÑлÑ
а2бл2Ñ
1акÑ
ан2дÑ
1аÑÑ2Ñ
3ве2Ñ
3виÑ
иаÑ1Ñ
и1Ñ2Ñ
1лавÑ
1лаÑÑ
1лаÑÑ
1лаÑ1Ñ
лебÑ
2леÑÑ
1леÑÑ
3ло_Ñ
2лоп1Ñ
2мÑ3Ñ
2нÑÑ
о2пеÑ
о1ÑÑÑ
1оÑмÑ
оÑ
1лÑ
1Ñаз1Ñ
ÑанÑ
1ÑейÑ
2ÑиÑÑ
1Ñов1Ñ
Ñом2Ñ
1Ñ2Ñ
1Ñ2гÑ
1Ñ2ÑÑ
Ñ3Ñа2Ñ
1Ñ2Ñа2плÑе1оÑÑеп1лÑеÑ2лÑи2к1Ñик3лÑи2олÑи2ÑкÑиÑ1Ñ2Ñ1к2Ñ1о2б2Ñ1оÑ2Ñ3Ñ2ÑÑп3лÑа2дÑÑа2дÑÑа2еÑ3ÑаÑо3ÑаÑÑÑе1влÑе2глÑеÑ2ÑÑе1Ñл1Ñ2лаÑ3легÑ3лежÑ2ли_1Ñ2ло2Ñ1ÑаÑа2блÑа2гнÑа2дÑÑа1ÑÑÑ3венÑе2глÑе1о2Ñе3плÑе1Ñ2Ñи2блÑи2плÑиÑ1Ñ2Ñ1к22ÑленÑ2ли_2Ñлив2ÑлилÑ2линÑ2лиÑÑ2лиÑÑ2ло_2ÑловÑ2лог2ÑлÑе2ÑлÑкÑ2лÑп2ÑлÑÑ2ÑлÑÑ2ÑлÑÑ3Ñ2мÑÑ2нÑÑÑÑ2евÑÑÑÑ12Ñ3в2Ñе2глÑед1ÑÑеиÑ1Ñе3ÑкÑе3доÑ2е2ÑÑе2Ñ
иÑд2ÑеÑ2дÑÑÑ3ж2дÑз2ваÑз2наÑ2к1вÑко1зÑÑе2Ñ
ÑÑ1киÑÑ1кÑÑÑ1виÑ3ÑÑÑÑ3ÑÑÑÑ2Ñ1лÑе1зоÑми3дÑми3кÑне2оÑ2п1лÑ2ÑÑиÑ2ÑÑÑÑÑи3мÑ2ÑоÑÑÑ2ÑеÑÑ2ÑÑÑÑ2ÑÑÑÑ
оз1Ñ3ÑгÑÑк2ÑÑÑле1оÑпи3кÑÑ3ÑеÑÑ1ÑаÑзи2кÑ2к1вÑÑе4мÑ2Ñ1кÑ1ÑÑаÑ1ÑÑеÑ1ÑÑоÑ1ÑÑÑÑÑ
а1ÑÑб1ÑаÑб3ÑеÑб1ÑиÑб3ÑÑÑ1в2Ñ
Ñ2г1лÑз2гнÑ2к1вÑ2к1лÑÑÑ3вÑ1ÑÑоÑÑÑ1ÑÑÑи1зÑ3ÑÑÑÑ3ÑÑÑа2нÑÑгÑÑ4Ñе2мÑдзаи2лзао2ззаÑ2лз2ÑÑÑзÑ2мÑпое2ж2ÑÑÑÑ6Ñ
10ÑÑ_Ñ2ÑÑмÑÑ2вÑÑбаÑ2а2двÑ2алÑк2амÑÑа1ÑÑÑб3лÑнб2лÑÑб1ÑÑкб2ÑÑмб2ÑÑÑ
3везÑвÑд1Ñ2вÑÑдв2лÑкв2лÑÑв2нÑÑ3вÑÑ3г2лÑÑг2нÑвг3нÑнг2ноÑд2ÑÑбд2ÑÑмдÑÑ2м2евÑÑе2глÑеÑ1вÑеÑ1вÑе1ÑÑÑÑ1бÑаÑб1ÑÑÑ1дÑÑÑ1зом2Ñ1ко2Ñ1кÑÑк2Ñо2ÑмÑжÑпаÑ2Ñ3плаÑп1лÑÑ3плÑÑ3Ñе_ÑÑ3ÑкÑ3Ñ2аÑ2ÑкеÑ3ÑÑÑ2ÑÑеÑÑÑо1ÑÑÑ
а2ÑÑÑ
1ÑÑжÑ1Ñ2з2вÑзз2наÑз2оÑÑзÑÑ2м2зÑмÑ2и1вÑиÑ
1ÑÑк3лÑнк2ÑоÑлÑ3долÑк1ллÑ2Ñк2лоÑн1лÑÑÑ3м2ÑÑнд2ÑÑнÑ1б23номÑоÑ2жио2ÑкÑоÑ1вÑо3ÑÑÑпÑ2ÑÑ2плÑнп1лÑÑпоÑ2ж3пÑÑÑÑ2блÑ1ÑвÑÑ1ÑÑзкÑÑз2Ñ1ÑÑкÑ3ÑÑмо1ÑÑнкÑоÑ2мÑÑкÑ4ÑÑ2ÑÑ2ÑкÑÑÑ1лÑÑ1ÑÑÑлÑÑÑ3Ñ
Ñ3ÑÑÑÑ1вÑлÑ1воÑÑÑ2гнÑÑ1зо3ÑÑкаÑÑк1л3ÑÑкÑÑÑÑ3кÑÑ2Ñ
оÑг2нÑÑг1ÑÑÑ1ÑÑÑÑ3ÑÑÑÑ1ÑÑÑÑ2ÑÑб2Ñ
3вÑ1Ñ
лÑбÑ
2лÑÑÑÑÑ2Ñ2ÑлÑнÑ2Ñ2ÑÑд2ÑÑÑÑÑ2Ñ
ÑÑ1зоÑб3ÑÑ",6:"_аг1Ñо_алÑ3Ñ_аÑ1Ñо_аÑÑ1Ñ_де1кв_ди2ак_до3Ñ2_зав2Ñ_ио4на_леÑ1к_лÑÑÑ1_ми1ом_мо2к1_на3Ñ2_не3вн_не1дÑ_не1з2_не1Ñл_ноÑ1к_нÑк1л_оÑ2ка_оÑ3пи_оÑ1Ñо_оÑ1ÑÑ_оÑ1Ñж_по3в2_по3ж2_поз2н_пÑоÑ2_Ñе2бÑ_Ñи2Ñк_ÑепÑ2_Ñе2о3_Ñиг1Ñ_Ñз2наабе3ÑÑа3в2Ñеага1Ñ2а2гиÑиа2глоÑаг2лоÑади2ода2д1ÑÑаза4Ñ3аз3веза2зовÑа2золÑа1зоÑиаз2о1Ñак3лемако1б22аконÑалÑÑ1Ñа2минÑам2неÑамо1з2ана2дÑан2дÑаан2ÑÑÑа2н1Ñзап2ломапо4вÑап1ÑелаÑа2ÑÑаÑ2бокаÑ2валаÑе1дваÑе1олаÑ2ÑоÑаÑ2Ñ1Ñ1аÑÑигаÑÑ1вÑаÑ3ÑемаÑ2ÑинаÑ2ÑиÑаÑ1ÑооаÑ1ÑÑÑ
а1ÑÑÑеаÑ2ÑедаÑ2ÑеÑаÑ1обеа2ÑомнаÑ1ÑаÑ
ба2г1Ñбе2д1Ñбез1а2без5д4без1о2бе2Ñ1кбе2Ñ1ÑбеÑ3ÑебеÑ3Ñи1б2лазб3лази1б2лее1б2леÑ1б2лÑж2б3лÑ_бо1бÑабо1дÑабо1л2жбо1лÑÑбо3м2лбо3Ñкобо3ÑÑибÑа1зо1б2Ñал2б1Ñамб2ÑаÑÑ1б2ÑаÑ2б3ÑаÑ1б2Ñедб2ÑиÑоб2ÑиÑÑб1Ñом_3бÑÑкÑ2б3ÑÑ_бÑ2г1Ñва2д1Ñва3ж2два2ÑÑÑве2Ñ1квзÑе3д3в2кÑÑ2в3лаб3в2нÑк3в2нÑÑвои2Ñ1воÑ3пево2ÑÑÑво3Ñ
2Ñ2в1Ñам2в1ÑаÑ
2в1Ñен1в2ÑизвÑо3Ñ2в3ÑкаÑ4в3Ñки4в3ÑкÑвÑо1б2вÑ2Ñ
1а3в2ÑиввÑ3Ñ2лга1ÑÑ2г1лами2глаÑÑ3г2лиÑг3лоблгниÑ2Ñго3ж2дго2Ñ1аго1Ñклго1ÑпагÑ2Ñ1кда2гендаÑÑ1Ñ2д1вид2двинÑ2двинÑ2д1виÑ2д1виÑ1двоÑÑде1б2лде1б2Ñдез1о2деÑаÑ2де2Ñ3вди2алиди2алодио3деди1оÑиди3ÑÑо3дневн4д3но1дно3д23д2нÑÑдо3в2мдо3ж2д2долимдо2м1Ñ2допледо2пÑедо2ÑÑбдоÑ2Ñидо2Ñ3вдо3Ñ2кдо2ÑлÑ1дÑавÑ2дÑазвд1Ñане2д3Ñеж1дÑема1дÑемлдÑем3н1дÑемÑ2д3ÑендÑе2Ñкд2ÑеÑÑ1д2Ñож2д3Ñоз1д2ÑÑг1д2ÑÑгдÑ2ÑÑа2дÑÑ1ÑдÑ2г1Ñ2дÑ2Ñ1еб1Ñенеб1Ñове2б3ÑÑе3в2меев2нимев2нÑÑевÑа1Ñ2е1вÑеев1Ñееев1Ñейев1ÑеÑега1Ñ2е2гланедноÑ3ед1опÑе2доÑве2д1оÑе2дÑÑ_е2дÑ2бед1Ñбое2дÑвеед1ÑÑÑ2е3дÑÑе2евидее2в1ÑееÑÑ1Ñе4ждевеза2вÑе1з2ваез1о2гез1о2Ñез1Ñ2дез1Ñ2кезÑ2ÑоезÑ2ÑÑез1Ñ2Ñ
ез1ÑÑаеиÑ1ÑÑек1ÑÑееле3Ñкеле1ÑÑеми3д2ен2д1Ñеоб2Ñое2о3глео2гÑоеоде3зе2о3ÑоеоÑÑ1ÑеоÑ2ÑÑепа1ÑÑепиÑ2кеп1леÑеп1лÑÑеÑ1акÑеÑе3доеÑе1дÑеÑе1к2еÑе1Ñ
4еÑио3зеÑ1обл2еÑови2еÑокÑеÑо3Ñ2еÑ1кале2ÑковеÑ1лаÑеÑ2линеÑ2ловеÑ2ломеÑ2пекеÑ3полеÑ2ÑанеÑ2ÑеÑеÑк2лоеÑи3б2еÑ
1аÑоеÑ
3валеÑ
3лопеÑ
1опоеÑ
1Ñ2Ñ3ж2дел4ждемеже1к2вза2вÑÑза3ж2дза3мнеза3Ñ2д2з3ва_з3валÑ1з2вон2з1вÑÑзи2онози3Ñ2Ñзко3п2зо3в2мзо2о3пзоÑ2ÑезоÑ2ÑизÑо2Ñ3зÑ2б3Ñ2з1Ñз3з1Ñ2моз1Ñ2ÑезÑ2ÑаÑ2зÑ2г12зÑ2Ñ1иа2зовиа2налиа1Ñ2киа1ÑÑаиа1ÑÑоиаÑ1Ñоиг1Ñени2г1ÑÑиди1омиди1оÑи2еводиз2гнеиз2налика1Ñ2ик2Ñ1Ñило1Ñки2менои2менÑ2именÑ1инÑÑии3оновио3Ñклио1Ñ2пио2Ñ1випа1ÑÑипо3к2иÑа2ÑÑи2Ñ1аÑиÑи2ÑкиÑо1з2иÑ3ка_иÑ3камиÑ3каÑ
иÑ3ковиÑ3кÑ_и2ÑламиÑо2Ñки2Ñ3пÑи2ÑÑ1виÑ1ÑÑзи2Ñ1веиÑ2ÑеÑиÑ3Ñоми2Ñ1ÑÑи2Ñ
1аÑиÑ
2ло2иÑ
лоÑ1й2Ñ3мÑка2бÑика3днека2д1Ñка2п1лка2пÑекаÑ3ÑÑка1Ñ2Ñка2Ñ1Ñке2Ñ1кке2ÑÑ12к3ла_2к3ле_к3лем_2к3ли_2к3лив2к3лиÑ2к3ло_2к3лоÑ2к3лÑ_3к2ниж3к2нÑж1колÑÑ2коминко2Ñ3вкÑе2ÑлкÑи2о3кÑанд2к1ÑÑамк1ÑÑан3к2Ñо_кÑ2п1Ñла3ж2д1лами_ла1ÑÑалаÑÑ1вла1ÑÑела1ÑÑола1ÑÑÑла1ÑÑÑла1Ñ2Ñ1л2галлев1Ñале2г1лле1онÑле1о2Ñле4Ñкале1Ñ2лле1Ñпеле1Ñ2Ñли2гÑо2л1иÑпли2Ñ
3вло1б2Ñ2ловиÑ3ловодло2г3длого1Ñлок3ла3лопаÑ2л1оÑгло1
10Ñ2плÑ1д4Ñ1лÑÑÑи1лÑÑÑÑма2к1Ñ2м1аллма1Ñ4Ñма2Ñобма2Ñ1Ñме2Ñ1кми2гÑемик1Ñими1опими1Ñ2л3м2неÑмоиÑ1Ñмо2к3вмоÑ1камо1Ñ2пмо2Ñ1Ñм2Ñ1оÑ3м2ÑÑимÑ1Ñ2кмÑ1Ñ4лнаби1она1в2Ñна3м2нна1Ñвана1Ñ2Ñн1а2ÑÑна3Ñ2лнд1Ñагнд1Ñажнд2Ñиане1в2дне3внÑне1д2лне2дÑане1дÑоне3ж2дне1з2лне1к2вне3м2н3не1о2не2одане1Ñ2жне3Ñ2нне1Ñ2пне1Ñ2Ñ
не1Ñ2Ñне1Ñ2вне3Ñ2лне1Ñ2Ñ2нинÑпниÑÑ2Ñнко3п2н2к1Ñонно3п2но3з2оно1Ñклно2Ñлино1Ñ2пн2Ñконн2Ñ1окн3Ñ2пенÑÑ1ажн2ÑÑаÑнÑÑаÑ2н2ÑÑивн2ÑÑокнÑÑ1Ñдн2Ñ1ÑÑ2н3Ñ2Ñоб2левоб2лемобо3м2о2бÑа_о1бÑаво1бÑано3в2лоо2в1Ñиов3Ñкоог3ла_ог3ли_ог3ло_од1вое2оди3а2о3димод2лиÑодо3пÑо2доÑио1дÑагод1Ñажод1Ñазод1Ñако1дÑалод3Ñебо1дÑобод1Ñово2дÑмао2дÑмÑо2е1вло3ежеко3ж2дÑо1з2ваоз2вено1з2вÑоз2глооз2доÑо2з1обозо1ÑÑ2о3кан2о3колол2ган1олимполÑ3д2о3множоне3Ñ2он2ÑÑÑооÑÑ1Ñо2пле_оп2лиÑоп3лÑ_о3плÑÑопо4вÑопоз2но3п2ÑеоÑа2Ñ3оÑ2б3л2о3ÑегоÑе2ÑкоÑ1иÑпоÑ1ÑкÑоÑа3ж2о2Ñ3баоÑ3каÑоÑк1воо2Ñки_о2ÑковоÑ1койоÑ1комоÑ1коÑоÑ1кÑÑоÑ3лейоÑ3логоÑ3лÑÑ
оÑ3моÑоÑ2нÑлоÑ2паÑо1Ñ2пÑоÑ2Ñ3мо3ÑÑÑаоÑ2Ñен2о3Ñек2о3ÑеÑ
о3ÑкалоÑ1ÑабоÑ1ÑадоÑ1ÑазоÑÑа2ÑоÑ1ÑежоÑ1ÑекоÑ1ÑеÑоÑ1ÑеÑоÑ1ÑодоÑ1ÑоеоÑ1ÑокоÑ1ÑоÑоÑ1ÑоÑоÑ1ÑÑгоÑ1Ñ2Ñо2ÑоÑио2Ñ1ÑопаÑ1Ñапа1ÑÑепаÑ1ÑопаÑ1ÑÑпа1ÑÑопеÑи1опе2Ñ1кпиаÑÑ1пи2ж3мпи2к1Ñп1лем_п1лемÑп2ленкп1ле2оплеÑ1к3п2ликпо3в2Ñпод1вопо1звепо1здопо1з2лпо3мнопо3мнÑ3по3п2по2Ñлопо2ÑлÑпо2ÑлÑпÑе1огпÑи3д2пÑилÑ2пÑо1блпÑод2лпÑо3ж2пÑо1з2п1ÑозопÑоÑо23п2Ñал3п2ÑиÑ
3п2ÑиÑ
пÑÑ1кÑÑа2б1Ñ1ÑавнÑÑа2жÑÑÑа2зийÑа2зÑб1ÑакизÑа2к3лÑа2ноÑ
Ñан2ÑÑÑа2п1лÑаÑ3к21ÑаÑÑаÑа2ÑакÑа1Ñ2Ñ1Ñ2вавÑ3ваÑаÑег2лÑÑе2доÑÑе3ж2дÑе1з2лÑе1зна1Ñе1зоÑе1к2лÑе3мноÑе1о2ÑÑе1о2ÑÑе1о2ÑÑеÑ1киÑе1Ñ2пÑе3ÑÑаÑе3ÑÑоÑе1Ñ2ÑÑеÑÑ3ÑÑи3в2нÑи2глоÑи3г2нÑи1д2ÑÑи3м2нÑи3м2ÑÑи3ÑÑвÑи3Ñ2ÑÑиÑÑи2Ñне1Ñ2Ñно3ÑлÑо2блÑÑо1б2Ñ1Ñогол1ÑогÑÑÑо3д2зÑод2ле1ÑозаÑÑо1з2в3ÑозÑÑÑои2Ñ31Ñокон1ÑолиÑ1ÑолиÑ1ÑомоÑ1Ñонаж1Ñонап1ÑоноÑÑооп1ÑÑо2плÑ2Ñ1оÑгÑо1Ñ2жÑо2ÑкиÑо2ÑкÑÑо1Ñ2п1ÑоÑ2вÑоÑ2ÑиÑ3ÑÑвлÑ2ÑаккÑ2Ñ1обÑÑ1оÑгÑÑ2ÑанÑÑ2даÑ1ÑÑжейÑÑ1ÑÑаÑÑÑÑ1ÑÑ2Ñ
1инÑ1Ñ
2лоÑ2Ñ
1опÑÑ2Ñ1к2Ñ1аÑк2Ñ1аÑлÑа2Ñ1ÑÑбезо3Ñбе3Ñ22Ñ3венÑе2к1ÑÑеÑе2бÑе3ÑÑаÑе3ÑÑеÑеÑÑ1ÑÑ2канд1Ñ2каÑ3ÑкиноÑк3лÑв2ÑконаÑ2копÑ2ÑкÑиб2Ñ3ла_2Ñ3лаÑ2Ñ3ли_2Ñ3ло_Ñ3ломÑ2Ñ3лоÑ2Ñ3лÑÑ2Ñ3лÑе2Ñ3лÑй2Ñ3лÑм1Ñ2наб1Ñ2неж2Ñ3никÑно1з2Ñо1б2ÑÑо1л2гÑо2ÑиеÑо1Ñ2п1Ñ2пеÑ2ÑпиÑÑÑпо1з2ÑÑе2б1ÑÑе3доÑÑанд2Ñ3Ñ2неÑ2ÑоÑиÑÑ1веÑÑÑ2вол1Ñ4Ñе_1ÑÑен_Ñ3ÑеÑ_Ñ3ÑеÑе2ÑÑимп2ÑÑинд2ÑÑинÑ2ÑÑинÑÑ2ÑиÑкÑ3Ñ2леÑÑ2лилÑÑ2лиÑÑ2Ñо1б3Ñ2Ñои2ÑÑоÑг2ÑÑоÑж2ÑÑоÑÑÑÑÑаÑ24ÑÑÑаÑ2ÑÑÑедÑÑ1Ñей2ÑÑÑивÑÑ1Ñиз2ÑÑÑил2ÑÑÑиÑÑÑ1ÑоаÑÑ1ÑодÑÑ1ÑоÑ
ÑÑ2ÑÑбÑÑ1ÑÑÑÑÑб1а2Ñ2ÑенаÑÑ2п1лÑÑÑ1каÑа1вÑиÑак3леÑ1во1з2Ñ1войÑеле1оÑем2б1Ñе2о3дÑе4п1лÑе2ÑакÑеÑе2оÑе2ÑкаÑе2ÑкÑÑи1знаÑила2м2Ñ1инвÑи1Ñ2лÑи3ÑÑвÑи3Ñ2Ñ3Ñ2кав3Ñ2кан3Ñ2кеÑÑмиÑÑ1Ñо2беÑÑо1б2лÑо3д2Ñ2Ñ1оммÑо1Ñ2нÑо1Ñ2пÑо1Ñ2ÑÑ1Ñага2Ñ1Ñаж1ÑÑебо1ÑÑебÑÑ1ÑебÑÑ1ÑевеÑ1ÑевÑÑ1ÑезаÑ1ÑезнÑÑеп1л3ÑÑе2ÑÑÑеÑ1кÑ1ÑеÑÑÑ1ÑеÑÑÑ2ÑеÑÑ4ÑÑинÑÑ1ÑоглÑ1ÑоидÑÑо3плÑ1ÑоÑо4Ñ3ÑоÑ2Ñ1ÑÑдÑÑ2жинÑÑ2Ñ1к1Ñ2бÑÑÑд1ÑамÑе2Ñ1кÑн2д1ÑÑÑо2длÑÑ1комÑÑ1кÑ_Ñ3Ñ
4воÑанд1ÑÑе2Ñ1кÑиа2к1Ñи2нин2Ñ1оÑгÑоÑ3ÑÑÑоÑо3п2Ñ1Ñ2п2Ñ
1изÑ1Ñ
2лоÑ2Ñ
1о2кÑ
о2поÑ2Ñ
1оÑнÑ
Ñи2плÑ
Ñо2мÑ2ÑеÑаÑ2Ñ1о2дÑа2евоÑа2евÑÑаÑÑ1вÑа1ÑÑеÑа1ÑÑÑÑа1ÑÑÑÑеÑÑÑ1Ñа2г1ÑÑан2кÑÑаÑ3Ñ2Ñа1ÑÑо3Ñ2кол2Ñ1лейÑ2лиÑе4Ñ3мÑ_Ñе1б2лÑи2п1лÑ2д1
10ÑоÑ2к3лоÑноÑ3лÑÑа2Ñ3Ñе2Ñ1кÑ3п2ÑоÑ2ÑÑабÑÑи4ÑÑÑÑо1Ñ2ÑÑ2Ñ1ÑÑÑил1аÑ2б1ÑеÑ2идалÑÑи2Ñк3ÑвикÑÑм2б3л_вÑÑ2Ñ_Ñеа2нбезÑ2Ñвиз2гнвÑб2ÑедоÑ2нÑ4ж3дик4ж3диÑла2б1ÑлÑ3Ñ4нни4ÑÑ_о2плÑÑоÑи4днпÑи4днÑеж4ди2ÑÑÑе_ÑÑ2миÑ2ÑÑÑÑ_аз3вÑзам2нÑÑаÑ3ÑÑмбÑ2д1Ñ2в1ÑÑн2доплÑдо2пÑÑ2д3ÑÑж1дÑÑма1дÑÑмÑ2д3ÑÑнеб1ÑÑн2е1вÑÑеÑÑ3доеÑÑ1к2еÑ2ÑÑÑ2Ñ1вÑе2Ñ3дÑÑÑз1о2гÑн2д1ÑÑÑ2ÑанÑÑ
1аÑоÑÑ
3валÑÑ
3лопÑÑ
1опоза3мнÑзоÑ2ÑÑиг1ÑÑнла1ÑÑÑлÑ4Ñка3м2нÑÑод3ÑÑб2о3ÑÑкоÑ1ÑÑкоÑ1ÑÑÑп2лÑнкплÑÑ1к_ÑÑ2бÑÑÑ1зна1ÑÑ1зоÑÑ3ÑÑаÑÑ3ÑÑоÑод2лÑÑе3ÑÑÑÑÑÑÑ1Ñ1ÑÑÑн_Ñ3ÑÑÑ_Ñ3ÑÑÑеÑ3Ñ2лÑÑÑ4п1лÑÑ2ÑкаÑÑ2ÑкÑ3Ñ2кÑÑÑ1ÑевÑÑ2ÑÑÑÑÑÑÑÑÑ1",7:"_во2б3л_во3ж2д_за3м2н_ле2п3Ñ_мÑ2ÑÑ1_не1Ñ2Ñ_обо3ж2_Ñа2Ñ3Ñ_Ñе2з3в_Ñо2з3в_Ñо2Ñ3л_Ñ
о2Ñ3в_Ñе2Ñ1ка2д1облаз2о1бÑа2н1о2бан1о2Ñ
Ñапо3Ñ2Ñбили3Ñ2б2леÑ1к2б3лÑÑÑ1б2Ñоди1б2ÑоÑибÑо2Ñ1кве2ÑÑ1вви2а1Ñ2ви1Ñ2ниво2б3лагÑи4в3нде2з1а2ди2Ñ1ÑÑ2д1обладо1б2Ñад1о2Ñенд1о2Ñин2д1оÑно2д1оÑÑÑ1д2Ñазнд1Ñа2Ñ3дÑо2г3неан2д1Ñе1д2лине1о2Ñвие3п2лодеÑе3м2не2Ñ1Ñ2пе2Ñ1ка_е4Ñ1кÑ_2ж1о2Ñ1за2в1Ñи1з2о3Ñе2з1Ñ2беи2л1а2Ñи2л1Ñ2пино2к3лино3п2лиÑан2д1ки1Ñ2ни2к3лаÑÑко1б2ÑикоÑ
о2Ñ3ла2д1аглан2д1Ñла2ÑÑ1Ñле1з2о3лÑ3п2ломан2д1Ñме2ж1аÑме2ÑÑ1Ñна2и1Ñ2на1Ñ2вине2Ñ1оÑни2л1ални2л1ам2н1инÑÑнÑи1о2кобо1л2го3в2нÑÑ1о2деÑло2д1оÑÑо2д1Ñ2Ñоза2б3воко3п2ло3м2немо3м2неÑо2п1лейопо2Ñ3лоÑо2Ñ3ло2Ñ1ка_о1Ñ2копо2Ñ1кÑ_о1Ñ2нимо1Ñ2ÑивоÑпа2к3па2Ñ1ÑÑпе2д1инпе2к1лапе2ÑÑ1Ñподо3м2Ñадо1б2ÑаÑ3Ñ2лÑво1з2дÑемо2г3ÑеÑ2Ñ3мÑо2д1оÑÑо2Ñ1акÑ2Ñ1акÑ2Ñ1алÑп2Ñбе3з2ÑÑо2г3нÑ4Ñ1ÑовÑÑе2Ñ1кÑе2Ñ1киÑе2Ñ1ко3Ñ2Ñе2Ñ
ÑÑи2г1л2Ñ1Ñ2пÑÑÑе2Ñ3ÑÑÑла4ж3ÑÑо3п2ÑÑ
1Ñа1Ñ2Ñ2Ñ1амп_бо2дÑа_об2лÑÑ_об2Ñее_об2Ñей_об2ÑеÑ_об2Ñив_об2Ñил_об2ÑиÑ_пом2нÑ_Ñо2плааÑÑо2Ñкбино2ÑкдÑо2ж3ж2дÑÑжейилло3к2ме2динÑмиÑ4Ñ3ннаÑ2ваÑне2о3Ñен2ÑÑаÑÑо4ж3девойÑ4ково2м3Ñе_он2ÑÑаÑоÑо4м3нпо2додепо2ÑÑинпÑем2ноÑедо4плÑоб2леÑ2ÑбÑÑк1б2лÑÑ1кÑ2Ñ1ка_Ñ4Ñ1кÑ_1з2о3ÑÑлÑ1з2о3о3м2нÑмо3м2нÑÑо2п1лÑйпÑ2ÑÑ1ÑÑÑÑ2Ñ1кÑÑ2Ñ1киÑÑ2Ñ1ко3Ñ2ÑÑ2Ñ
_ÑÑ2Ñ1к",8:"_аÑ2Ñ1о2_ме2ж1Ñ2а2н1а2ме2д1о2бедло2к1а2Ñн2ÑÑ1а2го2д1о2пео2д1о2пÑпо2д1о2кÑе2д1о2пÑ2Ñ1Ñ2Ñи_доб2Ñел_до1б2Ñи_па2н1иÑ_Ñо2Ñ3пиди1Ñ2лове2о3позиеÑе3Ñ2Ñо2з1а2Ñ
авни1Ñ2коло1и2Ñ1ÑÑони3л2ампеÑе1Ñ2нÑо2ÑÑÑиÑÑо3Ñ2калÑÑо2еÑеÑ_доб2ÑÑлÑÑо2еÑÑÑ",9:"е2о3плаÑои2л1а2минме2д1о2ÑммеÑи2л1амо2д1о2болпо2д1Ñ2ÑопÑиÑе2Ñ1кÑни3л2а3мпÑиÑÑ2Ñ1к",10:"но4л1а2мин"}}},function(t,e){function i(t,e,i,n,r,s,o){try{var a=t[s](o),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,r)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,s){var o=t.apply(e,n);function a(t){i(o,r,s,a,l,"next",t)}function l(t){i(o,r,s,a,l,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){"use strict";var n=i(71),r=i(72),s=i(59);t.exports={formats:s,parse:r,stringify:n}},function(t,e,i){t.exports=i(73)},function(t,e){t.exports=function(t,e){var i="function"==typeof t.exports?t.exports.extendOptions:t.options;for(var n in"function"==typeof t.exports&&(i.directives=t.exports.options.directives),i.directives=i.directives||{},e)i.directives[n]=i.directives[n]||e[n]}}
10,function(t,e,i){"use strict";function n(t){if("function"!=typeof t.getRootNode){for(;t.parentNode;)t=t.parentNode;return t!==document?null:document}const e=t.getRootNode();return e!==document&&e.getRootNode({composed:!0})!==document?null:e}function r(){return!0}function s(t,e,i){if(!t||!1===o(t,i))return!1;const r=n(e);if(r instanceof ShadowRoot&&r.host===t.target)return!1;const s=("object"==typeof i.value&&i.value.include||(()=>[]))();return s.push(e),!s.some(e=>e.contains(t.target))}function o(t,e){return("object"==typeof e.value&&e.value.closeConditional||r)(t)}function a(t,e){const i=n(t);e(document.body),i instanceof ShadowRoot&&e(i)}const l={inserted(t,e){const i=i=>function(t,e,i){const n="function"==typeof i.value?i.value:i.value.handler;e._clickOutside.lastMousedownWasOutside&&s(t,e,i)&&setTimeout(()=>{o(t,i)&&n&&n(t)},0)}(i,t,e),n=i=>{t._clickOutside.lastMousedownWasOutside=s(i,t,e)};a(t,t=>{t.addEventListener("click",i,!0),t.addEventListener("mousedown",n,!0)}),t._clickOutside={lastMousedownWasOutside:!0,onClick:i,onMousedown:n}},unbind(t){t._clickOutside&&(a(t,e=>{e&&t._clickOutside&&(e.removeEventListener("click",t._clickOutside.onClick,!0),e.removeEventListener("mousedown",t._clickOutside.onMousedown,!0))}),delete t._clickOutside)}};e.a=l},function(t,e,i){(function(t){t.exports=function(){"use strict";var e,i;function n(){return e.apply(null,arguments)}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function a(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(o(t,e))return!1;return!0}function l(t){return void 0===t}function h(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var i,n=[],r=t.length;for(i=0;i<r;++i)n.push(e(t[i],i));return n}function d(t,e){for(var i in e)o(e,i)&&(t[i]=e[i]);return o(e,"toString")&&(t.toString=e.toString),o(e,"valueOf")&&(t.valueOf=e.valueOf),t}function f(t,e,i,n){return Se(t,e,i,n,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),n=i.call(e.parsedDateParts,(function(t){return null!=t})),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function m(t){var e=f(NaN);return null!=t?d(p(e),t):p(e).userInvalidated=!0,e}i=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),n=i.length>>>0;for(e=0;e<n;e++)if(e in i&&t.call(this,i[e],e,i))return!0;return!1};var v=n.momentProperties=[],y=!1;function _(t,e){var i,n,r,s=v.length;if(l(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),l(e._i)||(t._i=e._i),l(e._f)||(t._f=e._f),l(e._l)||(t._l=e._l),l(e._strict)||(t._strict=e._strict),l(e._tzm)||(t._tzm=e._tzm),l(e._isUTC)||(t._isUTC=e._isUTC),l(e._offset)||(t._offset=e._offset),l(e._pf)||(t._pf=p(e)),l(e._locale)||(t._locale=e._locale),s>0)for(i=0;i<s;i++)l(r=e[n=v[i]])||(t[n]=r);return t}function A(t){_(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,n.updateOffset(this),y=!1)}function b(t){return t instanceof A||null!=t&&null!=t._isAMomentObject}function C(t){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function w(t,e){var i=!0;return d((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,t),i){var r,s,a,l=[],h=arguments.length;for(s=0;s<h;s++){if(r="","object"==typeof arguments[s]){for(a in r+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[s];l.push(r)}C(t+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)}),e)}var S,x={};function T(t,e){null!=n.deprecationHandler&&n.deprecationHandler(t,e),x[t]||(C(e),x[t]=!0)}function k(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function O(t,e){var i,n=d({},t);for(i in e)o(e,i)&&(s(t[i])&&s(e[i])?(n[i]={},d(n[i],t[i]),d(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)o(t,i)&&!o(e,i)&&s(t[i])&&(n[i]=d({},n[i]));return n}function P(t){null!=t&&this.set(t)}function D(t,e,i){var n=""+Math.abs(t),r=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)o(t,e)&&i.push(e);return i};var E=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
vendor: 18,242 bytes, line 10
10|x|X|zz?|ZZ?|.)/g,M=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},L={};function R(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(L[t]=r),e&&(L[e[0]]=function(){return D(r.apply(this,arguments),e[1],e[2])}),i&&(L[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function F(t,e){return t.isValid()?(e=I(e,t.localeData()),j[e]=j[e]||function(t){var e,i,n,r=t.match(E);for(e=0,i=r.length;e<i;e++)L[r[e]]?r[e]=L[r[e]]:r[e]=(n=r[e]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(e){var n,s="";for(n=0;n<i;n++)s+=k(r[n])?r[n].call(e,t):r[n];return s}}(e),j[e](t)):t.localeData().invalidDate()}function I(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(M.lastIndex=0;i>=0&&M.test(t);)t=t.replace(M,n),M.lastIndex=0,i-=1;return t}var B={};function Y(t,e){var i=t.toLowerCase();B[i]=B[i+"s"]=B[e]=t}function N(t){return"string"==typeof t?B[t]||B[t.toLowerCase()]:void 0}function U(t){var e,i,n={};for(i in t)o(t,i)&&(e=N(i))&&(n[e]=t[i]);return n}var W={};function H(t,e){W[t]=e}function V(t){return t%4==0&&t%100!=0||t%400==0}function z(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function G(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=z(e)),i}function X(t,e){return function(i){return null!=i?(Z(this,t,i),n.updateOffset(this,e),this):q(this,t)}}function q(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Z(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&V(t.year())&&1===t.month()&&29===t.date()?(i=G(i),t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),bt(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](i))}var $,K=/\d/,J=/\d\d/,Q=/\d{3}/,tt=/\d{4}/,et=/[+-]?\d{6}/,it=/\d\d?/,nt=/\d\d\d\d?/,rt=/\d\d\d\d\d\d?/,st=/\d{1,3}/,ot=/\d{1,4}/,at=/[+-]?\d{1,6}/,lt=/\d+/,ht=/[+-]?\d+/,ct=/Z|[+-]\d\d:?\d\d/gi,ut=/Z|[+-]\d\d(?::?\d\d)?/gi,dt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ft(t,e,i){$[t]=k(e)?e:function(t,n){return t&&i?i:e}}function pt(t,e){return o($,t)?$[t](e._strict,e._locale):new RegExp(gt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,n,r){return e||i||n||r}))))}function gt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}$={};var mt,vt={};function yt(t,e){var i,n,r=e;for("string"==typeof t&&(t=[t]),h(e)&&(r=function(t,i){i[e]=G(t)}),n=t.length,i=0;i<n;i++)vt[t[i]]=r}function _t(t,e){yt(t,(function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)}))}function At(t,e,i){null!=e&&o(vt,t)&&vt[t](e,i._a,i,t)}function bt(t,e){if(isNaN(t)||isNaN(e))return NaN;var i,n=(e%(i=12)+i)%i;return t+=(e-n)/12,1===n?V(t)?29:28:31-n%7%2}mt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},R("M",["MM",2],"Mo",(function(){return this.month()+1})),R("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),R("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),Y("month","M"),H("month",8),ft("M",it),ft("MM",it,J),ft("MMM",(function(t,e){return e.monthsShortRegex(t)})),ft("MMMM",(function(t,e){return e.monthsRegex(t)})),yt(["M","MM"],(function(t,e){e[1]=G(t)-1})),yt(["MMM","MMMM"],(function(t,e,i,n){var r=i._locale.monthsParse(t,n,i._strict);null!=r?e[1]=r:p(i).invalidMonth=t}));var Ct="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),wt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),St=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,xt=dt,Tt=dt;function kt(t,e,i){var n,r,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=mt.call(this._shortMonthsParse,o))?r:null:-1!==(r=mt.call(this._longMonthsParse,o))?r:null:"MMM"===e?-1!==(r=mt.call(this._shortMonthsParse,o))||-1!==(r=mt.call(this._longMonthsParse,o))?r:null:-1!==(r=mt.call(this._longMonthsParse,o))||-1!==(r=mt.call(this._shortMonthsParse,o))?r:null}function Ot(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=G(e);else if(!h(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),bt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Pt(t){return null!=t?(Ot(this,t),n.updateOffset(this,!0),this):q(this,"Month")}function Dt(){function t(t,e){return e.length-t.length}var e,i,n=[],r=[],s=[];for(e=0;e<12;e++)i=f([2e3,e]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(t),r.sort(t),s.sort(t),e=0;e<12;e++)n[e]=gt(n[e]),r[e]=gt(r[e]);for(e=0;e<24;e++)s[e]=gt(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Et(t){return V(t)?366:365}R("Y",0,0,(function(){var t=this.year();return t<=9999?D(t,4):"+"+t})),R(0,["YY",2],0,(function(){return this.year()%100})),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),Y("year","y"),H("year",1),ft("Y",ht),ft("YY",it,J),ft("YYYY",ot,tt),ft("YYYYY",at,et),ft("YYYYYY",at,et),yt(["YYYYY","YYYYYY"],0),yt("YYYY",(function(t,e){e[0]=2===t.length?n.parseTwoDigitYear(t):G(t)})),yt("YY",(function(t,e){e[0]=n.parseTwoDigitYear(t)})),yt("Y",(function(t,e){e[0]=parseInt(t,10)})),n.parseTwoDigitYear=function(t){return G(t)+(G(t)>68?1900:2e3)};var Mt=X("FullYear",!0);function jt(t,e,i,n,r,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,n,r,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,n,r,s,o),a}function Lt(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Rt(t,e,i){var n=7+e-i;return-(7+Lt(t,0,n).getUTCDay()-e)%7+n-1}function Ft(t,e,i,n,r){var s,o,a=1+7*(e-1)+(7+i-n)%7+Rt(t,n,r);return a<=0?o=Et(s=t-1)+a:a>Et(t)?(s=t+1,o=a-Et(t)):(s=t,o=a),{year:s,dayOfYear:o}}function It(t,e,i){var n,r,s=Rt(t.year(),e,i),o=Math.floor((t.dayOfYear()-s-1)/7)+1;return o<1?n=o+Bt(r=t.year()-1,e,i):o>Bt(t.year(),e,i)?(n=o-Bt(t.year(),e,i),r=t.year()+1):(r=t.year(),n=o),{week:n,year:r}}function Bt(t,e,i){var n=Rt(t,e,i),r=Rt(t+1,e,i);return(Et(t)-n+r)/7}function Yt(t,e){return t.slice(e,7).concat(t.slice(0,e))}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),Y("week","w"),Y("isoWeek","W"),H("week",5),H("isoWeek",5),ft("w",it),ft("ww",it,J),ft("W",it),ft("WW",it,J),_t(["w","ww","W","WW"],(function(t,e,i,n){e[n.substr(0,1)]=G(t)})),R("d",0,"do","day"),R("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),R("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),R("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),Y("day","d"),Y("weekday","e"),Y("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),ft("d",it),ft("e",it),ft("E",it),ft("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ft("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ft("dddd",(function(t,e){return e.weekdaysRegex(t)})),_t(["dd","ddd","dddd"],(function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:p(i).invalidWeekday=t})),_t(["d","e","E"],(function(t,e,i,n){e[n]=G(t)}));var Nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Wt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ht=dt,Vt=dt,zt=dt;function Gt(t,e,i){var n,r,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=mt.call(this._weekdaysParse,o))?r:null:"ddd"===e?-1!==(r=mt.call(this._shortWeekdaysParse,o))?r:null:-1!==(r=mt.call(this._minWeekdaysParse,o))?r:null:"dddd"===e?-1!==(r=mt.call(this._weekdaysParse,o))||-1!==(r=mt.call(this._shortWeekdaysParse,o))||-1!==(r=mt.call(this._minWeekdaysParse,o))?r:null:"ddd"===e?-1!==(r=mt.call(this._shortWeekdaysParse,o))||-1!==(r=mt.call(this._weekdaysParse,o))||-1!==(r=mt.call(this._minWeekdaysParse,o))?r:null:-1!==(r=mt.call(this._minWeekdaysParse,o))||-1!==(r=mt.call(this._weekdaysParse,o))||-1!==(r=mt.call(this._shortWeekdaysParse,o))?r:null}function Xt(){function t(t,e){return e.length-t.length}var e,i,n,r,s,o=[],a=[],l=[],h=[];for(e=0;e<7;e++)i=f([2e3,1]).day(e),n=gt(this.weekdaysMin(i,"")),r=gt(this.weekdaysShort(i,"")),s=gt(this.weekdays(i,"")),o.push(n),a.push(r),l.push(s),h.push(n),h.push(r),h.push(s);o.sort(t),a.sort(t),l.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function qt(){return this.hours()%12||12}function Zt(t,e){R(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function $t(t,e){return e._meridiemParse}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,qt),R("k",["kk",2],0,(function(){return this.hours()||24})),R("hmm",0,0,(function(){return""+qt.apply(this)+D(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+qt.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+D(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)})),Zt("a",!0),Zt("A",!1),Y("hour","h"),H("hour",13),ft("a",$t),ft("A",$t),ft("H",it),ft("h",it),ft("k",it),ft("HH",it,J),ft("hh",it,J),ft("kk",it,J),ft("hmm",nt),ft("hmmss",rt),ft("Hmm",nt),ft("Hmmss",rt),yt(["H","HH"],3),yt(["k","kk"],(function(t,e,i){var n=G(t);e[3]=24===n?0:n})),yt(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),yt(["h","hh"],(function(t,e,i){e[3]=G(t),p(i).bigHour=!0})),yt("hmm",(function(t,e,i){var n=t.length-2;e[3]=G(t.substr(0,n)),e[4]=G(t.substr(n)),p(i).bigHour=!0})),yt("hmmss",(function(t,e,i){var n=t.length-4,r=t.length-2;e[3]=G(t.substr(0,n)),e[4]=G(t.substr(n,2)),e[5]=G(t.substr(r)),p(i).bigHour=!0})),yt("Hmm",(function(t,e,i){var n=t.length-2;e[3]=G(t.substr(0,n)),e[4]=G(t.substr(n))})),yt("Hmmss",(function(t,e,i){var n=t.length-4,r=t.length-2;e[3]=G(t.substr(0,n)),e[4]=G(t.substr(n,2)),e[5]=G(t.substr(r))}));var Kt,Jt=X("Hours",!0),Qt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ct,monthsShort:wt,week:{dow:0,doy:6},weekdays:Nt,weekdaysMin:Wt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},te={},ee={};function ie(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i<n;i+=1)if(t[i]!==e[i])return i;return n}function ne(t){return t?t.toLowerCase().replace("_","-"):t}function re(e){var i=null;if(void 0===te[e]&&void 0!==t&&t&&t.exports&&function(t){return null!=t.match("^[^/\\\\]*$")}(e))try{i=Kt._abbr,function(){var t=new Error("Cannot find module 'undefined'");throw t.code="MODULE_NOT_FOUND",t}(),se(i)}catch(t){te[e]=null}return te[e]}function se(t,e){var i;return t&&((i=l(e)?ae(t):oe(t,e))?Kt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Kt._abbr}function oe(t,e){if(null!==e){var i,n=Qt;if(e.abbr=t,null!=te[t])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=te[t]._config;else if(null!=e.parentLocale)if(null!=te[e.parentLocale])n=te[e.parentLocale]._config;else{if(null==(i=re(e.parentLocale)))return ee[e.parentLocale]||(ee[e.parentLocale]=[]),ee[e.parentLocale].push({name:t,config:e}),null;n=i._config}return te[t]=new P(O(n,e)),ee[t]&&ee[t].forEach((function(t){oe(t.name,t.config)})),se(t),te[t]}return delete te[t],null}function ae(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Kt;if(!r(t)){if(e=re(t))return e;t=[t]}return function(t){for(var e,i,n,r,s=0;s<t.length;){for(e=(r=ne(t[s]).split("-")).length,i=(i=ne(t[s+1]))?i.split("-"):null;e>0;){if(n=re(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&ie(r,i)>=e-1)break;e--}s++}return Kt}(t)}function le(t){var e,i=t._a;return i&&-2===p(t).overflow&&(e=i[1]<0||i[1]>11?1:i[2]<1||i[2]>bt(i[0],i[1])?2:i[3]<0||i[3]>24||24===i[3]&&(0!==i[4]||0!==i[5]||0!==i[6])?3:i[4]<0||i[4]>59?4:i[5]<0||i[5]>59?5:i[6]<0||i[6]>999?6:-1,p(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}var he=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,de=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fe=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pe=/^\/?Date\((-?\d+)/i,ge=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,me={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ve(t){var e,i,n,r,s,o,a=t._i,l=he.exec(a)||ce.exec(a),h=de.length,c=fe.length;if(l){for(p(t).iso=!0,e=0,i=h;e<i;e++)if(de[e][1].exec(l[1])){r=de[e][0],n=!1!==de[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=c;e<i;e++)if(fe[e][1].exec(l[3])){s=(l[2]||" ")+fe[e][0];break}if(null==s)return void(t._isValid=!1)}if(!n&&null!=s)return void(t._isValid=!1);if(l[4]){if(!ue.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=r+(s||"")+(o||""),Ce(t)}else t._isValid=!1}function ye(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function _e(t){var e,i,n,r,s,o,a,l,h=ge.exec(t._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(h){if(i=h[4],n=h[3],r=h[2],s=h[5],o=h[6],a=h[7],l=[ye(i),wt.indexOf(n),parseInt(r,10),parseInt(s,10),parseInt(o,10)],a&&l.push(parseInt(a,10)),e=l,!function(t,e,i){return!t||Ut.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(p(i).weekdayMismatch=!0,i._isValid=!1,!1)}(h[1],e,t))return;t._a=e,t._tzm=function(t,e,i){if(t)return me[t];if(e)return 0;var n=parseInt(i,10),r=n%100;return(n-r)/100*60+r}(h[8],h[9],h[10]),t._d=Lt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function Ae(t,e,i){return null!=t?t:null!=e?e:i}function be(t){var e,i,r,s,o,a=[];if(!t._d){for(r=function(t){var e=new Date(n.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,i,n,r,s,o,a,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(s=1,o=4,i=Ae(e.GG,t._a[0],It(xe(),1,4).year),n=Ae(e.W,1),((r=Ae(e.E,1))<1||r>7)&&(l=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,h=It(xe(),s,o),i=Ae(e.gg,t._a[0],h.year),n=Ae(e.w,h.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+s,(e.e<0||e.e>6)&&(l=!0)):r=s),n<1||n>Bt(i,s,o)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(a=Ft(i,n,r,s,o),t._a[0]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(o=Ae(t._a[0],r[0]),(t._dayOfYear>Et(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),i=Lt(o,0,t._dayOfYear),t._a[1]=i.getUTCMonth(),t._a[2]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Lt:jt).apply(null,a),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==s&&(p(t).weekdayMismatch=!0)}}function Ce(t){if(t._f!==n.ISO_8601)if(t._f!==n.RFC_2822){t._a=[],p(t).empty=!0;var e,i,r,s,o,a,l,h=""+t._i,c=h.length,u=0;for(l=(r=I(t._f,t._locale).match(E)||[]).length,e=0;e<l;e++)s=r[e],(i=(h.match(pt(s,t))||[])[0])&&((o=h.substr(0,h.indexOf(i))).length>0&&p(t).unusedInput.push(o),h=h.slice(h.indexOf(i)+i.length),u+=i.length),L[s]?(i?p(t).empty=!1:p(t).unusedTokens.push(s),At(s,i,t)):t._strict&&!i&&p(t).unusedTokens.push(s);p(t).charsLeftOver=c-u,h.length>0&&p(t).unusedInput.push(h),t._a[3]<=12&&!0===p(t).bigHour&&t._a[3]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,
vendor: 6,190 bytes, line 10
10i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),null!==(a=p(t).era)&&(t._a[0]=t._locale.erasConvertYear(a,t._a[0])),be(t),le(t)}else _e(t);else ve(t)}function we(t){var e=t._i,i=t._f;return t._locale=t._locale||ae(t._l),null===e||void 0===i&&""===e?m({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),b(e)?new A(le(e)):(c(e)?t._d=e:r(i)?function(t){var e,i,n,r,s,o,a=!1,l=t._f.length;if(0===l)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<l;r++)s=0,o=!1,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Ce(e),g(e)&&(o=!0),s+=p(e).charsLeftOver,s+=10*p(e).unusedTokens.length,p(e).score=s,a?s<n&&(n=s,i=e):(null==n||s<n||o)&&(n=s,i=e,o&&(a=!0));d(t,i||e)}(t):i?Ce(t):function(t){var e=t._i;l(e)?t._d=new Date(n.now()):c(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=pe.exec(t._i);null===e?(ve(t),!1===t._isValid&&(delete t._isValid,_e(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:n.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):r(e)?(t._a=u(e.slice(0),(function(t){return parseInt(t,10)})),be(t)):s(e)?function(t){if(!t._d){var e=U(t._i),i=void 0===e.day?e.date:e.day;t._a=u([e.year,e.month,i,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),be(t)}}(t):h(e)?t._d=new Date(e):n.createFromInputFallback(t)}(t),g(t)||(t._d=null),t))}function Se(t,e,i,n,o){var l,h={};return!0!==e&&!1!==e||(n=e,e=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(s(t)&&a(t)||r(t)&&0===t.length)&&(t=void 0),h._isAMomentObject=!0,h._useUTC=h._isUTC=o,h._l=i,h._i=t,h._f=e,h._strict=n,(l=new A(le(we(h))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function xe(t,e,i,n){return Se(t,e,i,n,!1)}n.createFromInputFallback=w("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Te=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:m()})),ke=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:m()}));function Oe(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return xe();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}var Pe=["year","quarter","month","week","day","hour","minute","second","millisecond"];function De(t){var e=U(t),i=e.year||0,n=e.quarter||0,r=e.month||0,s=e.week||e.isoWeek||0,a=e.day||0,l=e.hour||0,h=e.minute||0,c=e.second||0,u=e.millisecond||0;this._isValid=function(t){var e,i,n=!1,r=Pe.length;for(e in t)if(o(t,e)&&(-1===mt.call(Pe,e)||null!=t[e]&&isNaN(t[e])))return!1;for(i=0;i<r;++i)if(t[Pe[i]]){if(n)return!1;parseFloat(t[Pe[i]])!==G(t[Pe[i]])&&(n=!0)}return!0}(e),this._milliseconds=+u+1e3*c+6e4*h+1e3*l*60*60,this._days=+a+7*s,this._months=+r+3*n+12*i,this._data={},this._locale=ae(),this._bubble()}function Ee(t){return t instanceof De}function Me(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function je(t,e){R(t,0,0,(function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+D(~~(t/60),2)+e+D(~~t%60,2)}))}je("Z",":"),je("ZZ",""),ft("Z",ut),ft("ZZ",ut),yt(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=Re(ut,t)}));var Le=/([\+\-]|\d\d)/gi;function Re(t,e){var i,n,r=(e||"").match(t);return null===r?null:0===(n=60*(i=((r[r.length-1]||[])+"").match(Le)||["-",0,0])[1]+G(i[2]))?0:"+"===i[0]?n:-n}function Fe(t,e){var i,r;return e._isUTC?(i=e.clone(),r=(b(t)||c(t)?t.valueOf():xe(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+r),n.updateOffset(i,!1),i):xe(t).local()}function Ie(t){return-Math.round(t._d.getTimezoneOffset())}function Be(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Ye=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ne=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ue(t,e){var i,n,r,s,a,l,c=t,u=null;return Ee(t)?c={ms:t._milliseconds,d:t._days,M:t._months}:h(t)||!isNaN(+t)?(c={},e?c[e]=+t:c.milliseconds=+t):(u=Ye.exec(t))?(i="-"===u[1]?-1:1,c={y:0,d:G(u[2])*i,h:G(u[3])*i,m:G(u[4])*i,s:G(u[5])*i,ms:G(Me(1e3*u[6]))*i}):(u=Ne.exec(t))?(i="-"===u[1]?-1:1,c={y:We(u[2],i),M:We(u[3],i),w:We(u[4],i),d:We(u[5],i),h:We(u[6],i),m:We(u[7],i),s:We(u[8],i)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(s=xe(c.from),a=xe(c.to),r=s.isValid()&&a.isValid()?(a=Fe(a,s),s.isBefore(a)?l=He(s,a):((l=He(a,s)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(c={}).ms=r.milliseconds,c.M=r.months),n=new De(c),Ee(t)&&o(t,"_locale")&&(n._locale=t._locale),Ee(t)&&o(t,"_isValid")&&(n._isValid=t._isValid),n}function We(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function He(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ve(t,e){return function(i,n){var r;return null===n||isNaN(+n)||(T(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=n,n=r),ze(this,Ue(i,n),t),this}}function ze(t,e,i,r){var s=e._milliseconds,o=Me(e._days),a=Me(e._months);t.isValid()&&(r=null==r||r,a&&Ot(t,q(t,"Month")+a*i),o&&Z(t,"Date",q(t,"Date")+o*i),s&&t._d.setTime(t._d.valueOf()+s*i),r&&n.updateOffset(t,o||a))}Ue.fn=De.prototype,Ue.invalid=function(){return Ue(NaN)};var Ge=Ve(1,"add"),Xe=Ve(-1,"subtract");function qe(t){return"string"==typeof t||t instanceof String}
10function Ze(t){return b(t)||c(t)||qe(t)||h(t)||function(t){var e=r(t),i=!1;return e&&(i=0===t.filter((function(e){return!h(e)&&qe(t)})).length),e&&i}(t)||function(t){var e,i,n=s(t)&&!a(t),r=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h=l.length;for(e=0;e<h;e+=1)i=l[e],r=r||o(t,i);return n&&r}(t)||null==t}function $e(t){var e,i=s(t)&&!a(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<r.length;e+=1)n=n||o(t,r[e]);return i&&n}function Ke(t,e){if(t.date()<e.date())return-Ke(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(i,"months");return-(i+(e-n<0?(e-n)/(n-t.clone().add(i-1,"months")):(e-n)/(t.clone().add(i+1,"months")-n)))||0}function Je(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ae(t))&&(this._locale=e),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qe=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function ti(){return this._locale}function ei(t,e){return(t%e+e)%e}function ii(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-126227808e5:new Date(t,e,i).valueOf()}function ni(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-126227808e5:Date.UTC(t,e,i)}function ri(t,e){return e.erasAbbrRegex(t)}function si(){var t,e,i=[],n=[],r=[],s=[],o=this.eras();for(t=0,e=o.length;t<e;++t)n.push(gt(o[t].name)),i.push(gt(o[t].abbr)),r.push(gt(o[t].narrow)),s.push(gt(o[t].name)),s.push(gt(o[t].abbr)),s.push(gt(o[t].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function oi(t,e){R(0,[t,t.length],0,e)}function ai(t,e,i,n,r){var s;return null==t?It(this,n,r).year:(e>(s=Bt(t,n,r))&&(e=s),li.call(this,t,e,i,n,r))}function li(t,e,i,n,r){var s=Ft(t,e,i,n,r),o=Lt(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),ft("N",ri),ft("NN",ri),ft("NNN",ri),ft("NNNN",(function(t,e){return e.erasNameRegex(t)})),ft("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),yt(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,i,n){var r=i._locale.erasParse(t,n,i._strict);r?p(i).era=r:p(i).invalidEra=t})),ft("y",lt),ft("yy",lt),ft("yyy",lt),ft("yyyy",lt),ft("yo",(function(t,e){return e._eraYearOrdinalRegex||lt})),yt(["y","yy","yyy","yyyy"],0),yt(["yo"],(function(t,e,i,n){var r;i._locale._eraYearOrdinalRegex&&(r=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[0]=i._locale.eraYearOrdinalParse(t,r):e[0]=parseInt(t,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),oi("gggg","weekYear"),oi("ggggg","weekYear"),oi("GGGG","isoWeekYear"),oi("GGGGG","isoWeekYear"),Y("weekYear","gg"),Y("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),ft("G",ht),ft("g",ht),ft("GG",it,J),ft("gg",it,J),ft("GGGG",ot,tt),ft("gggg",ot,tt),ft("GGGGG",at,et),ft("ggggg",at,et),_t(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,n){e[n.substr(0,2)]=G(t)})),_t(["gg","GG"],(function(t,e,i,r){e[r]=n.parseTwoDigitYear(t)})),R("Q",0,"Qo","quarter"),Y("quarter","Q"),H("quarter",7),ft("Q",K),yt("Q",(function(t,e){e[1]=3*(G(t)-1)})),R("D",["DD",2],"Do","date"),Y("date","D"),H("date",9),ft("D",it),ft("DD",it,J),ft("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),yt(["D","DD"],2),yt("Do",(function(t,e){e[2]=G(t.match(it)[0])}));var hi=X("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),Y("dayOfYear","DDD"),H("dayOfYear",4),ft("DDD",st),ft("DDDD",Q),yt(["DDD","DDDD"],(function(t,e,
vendor: 6,172 bytes, line 10
10i){i._dayOfYear=G(t)})),R("m",["mm",2],0,"minute"),Y("minute","m"),H("minute",14),ft("m",it),ft("mm",it,J),yt(["m","mm"],4);var ci=X("Minutes",!1);R("s",["ss",2],0,"second"),Y("second","s"),H("second",15),ft("s",it),ft("ss",it,J),yt(["s","ss"],5);var ui,di,fi=X("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Y("millisecond","ms"),H("millisecond",16),ft("S",st,K),ft("SS",st,J),ft("SSS",st,Q),ui="SSSS";ui.length<=9;ui+="S")ft(ui,lt);function pi(t,e){e[6]=G(1e3*("0."+t))}for(ui="S";ui.length<=9;ui+="S")yt(ui,pi);di=X("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var gi=A.prototype;function mi(t){return t}gi.add=Ge,gi.calendar=function(t,e){1===arguments.length&&(arguments[0]?Ze(arguments[0])?(t=arguments[0],e=void 0):$e(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var i=t||xe(),r=Fe(i,this).startOf("day"),s=n.calendarFormat(this,r)||"sameElse",o=e&&(k(e[s])?e[s].call(this,i):e[s]);return this.format(o||this.localeData().calendar(s,this,xe(i)))},gi.clone=function(){return new A(this)},gi.diff=function(t,e,i){var n,r,s;if(!this.isValid())return NaN;if(!(n=Fe(t,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),e=N(e)){case"year":s=Ke(this,n)/12;break;case"month":s=Ke(this,n);break;case"quarter":s=Ke(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-r)/864e5;break;case"week":s=(this-n-r)/6048e5;break;default:s=this-n}return i?s:z(s)},gi.endOf=function(t){var e,i;if(void 0===(t=N(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?ni:ii,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-ei(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-ei(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-ei(e,1e3)-1}return this._d.setTime(e),n.updateOffset(this,!0),this},gi.format=function(t){t||(t=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var e=F(this,t);return this.localeData().postformat(e)},gi.from=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Ue({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gi.fromNow=function(t){return this.from(xe(),t)},gi.to=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Ue({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gi.toNow=function(t){return this.to(xe(),t)},gi.get=function(t){return k(this[t=N(t)])?this[t]():this},gi.invalidAt=function(){return p(this).overflow},gi.isAfter=function(t,e){var i=b(t)?t:xe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},gi.isBefore=function(t,e){var i=b(t)?t:xe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},gi.isBetween=function(t,e,i,n){var r=b(t)?t:xe(t),s=b(e)?e:xe(e);return!!(this.isValid()&&r.isValid()&&s.isValid())&&(("("===(n=n||"()")[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i)))},gi.isSame=function(t,e){var i,n=b(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=N(e)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},gi.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},gi.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},gi.isValid=function(){return g(this)},gi.lang=Qe,gi.locale=Je,gi.localeData=ti,gi.max=ke,gi.min=Te,gi.parsingFlags=function(){return d({},p(this))},gi.set=function(t,e){if("object"==typeof t){var i,n=function(t){var e,i=[];for(e in t)o(t,e)&&i.push({unit:e,priority:W[e]});return i.sort((function(t,e){return t.priority-e.priority})),i}(t=U(t)),r=n.length;for(i=0;i<r;i++)this[n[i].unit](t[n[i].unit])}else if(k(this[t=N(t)]))return this[t](e);return this},gi.startOf=function(t){var e,i;if(void 0===(t=N(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?ni:ii,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=ei(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=ei(e,6e4);break;case"second":e=this._d.valueOf(),e-=ei(e,1e3)}return this._d.setTime(e),n.updateOffset(this,!0),this},gi.subtract=Xe,gi.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},gi.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},gi.toDate=function(){return new Date(this.valueOf())},gi.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;
10return i.year()<0||i.year()>9999?F(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(i,"Z")):F(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),t="["+n+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=r+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+i)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(gi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),gi.toJSON=function(){return this.isValid()?this.toISOString():null},gi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gi.unix=function(){return Math.floor(this.valueOf()/1e3)},gi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gi.eraName=function(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].name;if(n[t].until<=i&&i<=n[t].since)return n[t].name}return""},gi.eraNarrow=function(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].narrow;if(n[t].until<=i&&i<=n[t].since)return n[t].narrow}return""},gi.eraAbbr=function(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].abbr;if(n[t].until<=i&&i<=n[t].since)return n[t].abbr}return""},gi.eraYear=function(){var t,e,i,r,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t)if(i=s[t].since<=s[t].until?1:-1,r=this.clone().startOf("day").valueOf(),s[t].since<=r&&r<=s[t].until||s[t].until<=r&&r<=s[t].since)return(this.year()-n(s[t].since).year())*i+s[t].offset;return this.year()},gi.year=Mt,gi.isLeapYear=function(){return V(this.year())},gi.weekYear=function(t){return ai.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},gi.isoWeekYear=function(t){return ai.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},gi.quarter=gi.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},gi.month=Pt,gi.daysInMonth=function(){return bt(this.year(),this.month())},gi.week=gi.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},gi.isoWeek=gi.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},gi.weeksInYear=function(){var t=this.localeData()._week;return Bt(this.year(),t.dow,t.doy)},gi.weeksInWeekYear=function(){var t=this.localeData()._week;return Bt(this.weekYear(),t.dow,t.doy)},gi.isoWeeksInYear=function(){return Bt(this.year(),1,4)},gi.isoWeeksInISOWeekYear=function(){return Bt(this.isoWeekYear(),1,4)},gi.date=hi,gi.day=gi.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},gi.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},gi.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},gi.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},gi.hour=gi.hours=Jt,gi.minute=gi.minutes=ci,gi.second=gi.seconds=fi,gi.millisecond=gi.milliseconds=di,gi.utcOffset=function(t,e,
vendor: 5,315 bytes, line 10
10i){var r,s=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Re(ut,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(r=Ie(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),s!==t&&(!e||this._changeInProgress?ze(this,Ue(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:Ie(this)},gi.utc=function(t){return this.utcOffset(0,t)},gi.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),"m")),this},gi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Re(ct,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},gi.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},gi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gi.isLocal=function(){return!!this.isValid()&&!this._isUTC},gi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gi.isUtc=Be,gi.isUTC=Be,gi.zoneAbbr=function(){return this._isUTC?"UTC":""},gi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gi.dates=w("dates accessor is deprecated. Use date instead.",hi),gi.months=w("months accessor is deprecated. Use month instead",Pt),gi.years=w("years accessor is deprecated. Use year instead",Mt),gi.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),gi.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var t,e={};return _(e,this),(e=we(e))._a?(t=e._isUTC?f(e._a):xe(e._a),this._isDSTShifted=this.isValid()&&function(t,e,i){var n,r=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),o=0;for(n=0;n<r;n++)(i&&t[n]!==e[n]||!i&&G(t[n])!==G(e[n]))&&o++;return o+s}(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var vi=P.prototype;function yi(t,e,i,n){var r=ae(),s=f().set(n,e);return r[i](s,t)}function _i(t,e,i){if(h(t)&&(e=t,t=void 0),t=t||"",null!=e)return yi(t,e,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=yi(t,n,i,"month");return r}function Ai(t,e,i,n){"boolean"==typeof t?(h(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,h(e)&&(i=e,e=void 0),e=e||"");var r,s=ae(),o=t?s._week.dow:0,a=[];if(null!=i)return yi(e,(i+o)%7,n,"day");for(r=0;r<7;r++)a[r]=yi(e,(r+o)%7,n,"day");return a}vi.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return k(n)?n.call(e,i):n},vi.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(E).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},vi.invalidDate=function(){return this._invalidDate},vi.ordinal=function(t){return this._ordinal.replace("%d",t)},vi.preparse=mi,vi.postformat=mi,vi.relativeTime=function(t,e,i,n){var r=this._relativeTime[i];return k(r)?r(t,e,i,n):r.replace(/%d/i,t)},vi.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return k(i)?i(e):i.replace(/%s/i,e)},vi.set=function(t){var e,i;for(i in t)o(t,i)&&(k(e=t[i])?this[i]=e:this["_"+i]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vi.eras=function(t,e){var i,r,s,o=this._eras||ae("en")._eras;for(i=0,r=o.length;i<r;++i){switch(typeof o[i].since){case"string":s=n(o[i].since).startOf("day"),o[i].since=s.valueOf()}switch(typeof o[i].until){case"undefined":o[i].until=1/0;break;case"string":s=n(o[i].until).startOf("day").valueOf(),o[i].until=s.valueOf()}}return o},vi.erasParse=function(t,e,i){var n,r,s,o,a,l=this.eras();for(t=t.toUpperCase(),n=0,r=l.length;n<r;++n)if(s=l[n].name.toUpperCase(),o=l[n].abbr.toUpperCase(),a=l[n].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(o===t)return l[n];break;case"NNNN":if(s===t)return l[n];break;case"NNNNN":if(a===t)return l[n]}else if([s,o,a].indexOf(t)>=0)return l[n]},vi.erasConvertYear=function(t,e){var i=t.since<=t.until?1:-1;return void 0===e?n(t.since).year():n(t.since).year()+(e-t.offset)*i},vi.erasAbbrRegex=function(t){return o(this,"_erasAbbrRegex")||si.call(this),t?this._erasAbbrRegex:this._erasRegex},vi.erasNameRegex=function(t){return o(this,"_erasNameRegex")||si.call(this),t?this._erasNameRegex:this._erasRegex},vi.erasNarrowRegex=function(t){return o(this,"_erasNarrowRegex")||si.call(this),t?this._erasNarrowRegex:this._erasRegex},vi.months=function(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||St).test(e)?"format":"standalone"][t.month()]:r(this._months)?this._months:this._months.standalone},vi.monthsShort=function(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[St.test(e)?"format":"standalone"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}
vendor: 7,268 bytes, line 10
10,vi.monthsParse=function(t,e,i){var n,r,s;if(this._monthsParseExact)return kt.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=f([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},vi.monthsRegex=function(t){return this._monthsParseExact?(o(this,"_monthsRegex")||Dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Tt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},vi.monthsShortRegex=function(t){return this._monthsParseExact?(o(this,"_monthsRegex")||Dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=xt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},vi.week=function(t){return It(t,this._week.dow,this._week.doy).week},vi.firstDayOfYear=function(){return this._week.doy},vi.firstDayOfWeek=function(){return this._week.dow},vi.weekdays=function(t,e){var i=r(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Yt(i,this._week.dow):t?i[t.day()]:i},vi.weekdaysMin=function(t){return!0===t?Yt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},vi.weekdaysShort=function(t){return!0===t?Yt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},vi.weekdaysParse=function(t,e,i){var n,r,s;if(this._weekdaysParseExact)return Gt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=f([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},vi.weekdaysRegex=function(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Ht),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},vi.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Vt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vi.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=zt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vi.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},vi.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},se("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===G(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),n.lang=w("moment.lang is deprecated. Use moment.locale instead.",se),n.langData=w("moment.langData is deprecated. Use moment.localeData instead.",ae);var bi=Math.abs;function Ci(t,e,i,n){var r=Ue(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function wi(t){return t<0?Math.floor(t):Math.ceil(t)}function Si(t){return 4800*t/146097}function xi(t){return 146097*t/4800}function Ti(t){return function(){return this.as(t)}}var ki=Ti("ms"),Oi=Ti("s"),Pi=Ti("m"),Di=Ti("h"),Ei=Ti("d"),Mi=Ti("w"),ji=Ti("M"),Li=Ti("Q"),Ri=Ti("y");function Fi(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ii=Fi("milliseconds"),Bi=Fi("seconds"),Yi=Fi("minutes"),Ni=Fi("hours"),Ui=Fi("days"),Wi=Fi("months"),Hi=Fi("years"),Vi=Math.round,zi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Gi(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}var Xi=Math.abs;function qi(t){return(t>0)-(t<0)||+t}function Zi(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n,r,s,o,a,l=Xi(this._milliseconds)/1e3,h=Xi(this._days),c=Xi(this._months),u=this.asSeconds();return u?(t=z(l/60),e=z(t/60),l%=60,t%=60,i=z(c/12),c%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=u<0?"-":"",s=qi(this._months)!==qi(u)?"-":"",o=qi(this._days)!==qi(u)?"-":"",a=qi(this._milliseconds)!==qi(u)?"-":"",r+"P"+(i?s+i+"Y":"")+(c?s+c+"M":"")+(h?o+h+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+n+"S":"")):"P0D"}var $i=De.prototype;return $i.isValid=function(){return this._isValid},$i.abs=function(){var t=this._data;return this._milliseconds=bi(this._milliseconds),this._days=bi(this._days),this._months=bi(this._months),t.milliseconds=bi(t.milliseconds),t.seconds=bi(t.seconds),t.minutes=bi(t.minutes),t.hours=bi(t.hours),t.months=bi(t.months),t.years=bi(t.years),this},$i.add=function(t,e){return Ci(this,t,e,1)},$i.subtract=function(t,e){return Ci(this,t,e,-1)},$i.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=N(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+Si(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(xi(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},$i.asMilliseconds=ki,$i.asSeconds=Oi,$i.asMinutes=Pi,$i.asHours=Di,$i.asDays=Ei,$i.asWeeks=Mi,$i.asMonths=ji,$i.asQuarters=Li,$i.asYears=Ri,$i.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},$i._bubble=function(){var t,e,i,n,r,s=this._milliseconds,o=this._days,a=this._months,l=this._data;return s>=0&&o>=0&&a>=0||s<=0&&o<=0&&a<=0||(s+=864e5*wi(xi(a)+o),o=0,a=0),l.milliseconds=s%1e3,t=z(s/1e3),l.seconds=t%60,e=z(t/60),l.minutes=e%60,i=z(e/60),l.hours=i%24,o+=z(i/24),r=z
vendor: 5,119 bytes, lines 10-12
10(Si(o)),a+=r,o-=wi(xi(r)),n=z(a/12),a%=12,l.days=o,l.months=a,l.years=n,this},$i.clone=function(){return Ue(this)},$i.get=function(t){return t=N(t),this.isValid()?this[t+"s"]():NaN},$i.milliseconds=Ii,$i.seconds=Bi,$i.minutes=Yi,$i.hours=Ni,$i.days=Ui,$i.weeks=function(){return z(this.days()/7)},$i.months=Wi,$i.years=Hi,$i.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,n,r=!1,s=zi;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(r=t),"object"==typeof e&&(s=Object.assign({},zi,e),null!=e.s&&null==e.ss&&(s.ss=e.s-1)),i=this.localeData(),n=function(t,e,i,n){var r=Ue(t).abs(),s=Vi(r.as("s")),o=Vi(r.as("m")),a=Vi(r.as("h")),l=Vi(r.as("d")),h=Vi(r.as("M")),c=Vi(r.as("w")),u=Vi(r.as("y")),d=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||o<=1&&["m"]||o<i.m&&["mm",o]||a<=1&&["h"]||a<i.h&&["hh",a]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(d=d||c<=1&&["w"]||c<i.w&&["ww",c]),(d=d||h<=1&&["M"]||h<i.M&&["MM",h]||u<=1&&["y"]||["yy",u])[2]=e,d[3]=+t>0,d[4]=n,Gi.apply(null,d)}(this,!r,s,i),r&&(n=i.pastFuture(+this,n)),i.postformat(n)},$i.toISOString=Zi,$i.toString=Zi,$i.toJSON=Zi,$i.locale=Je,$i.localeData=ti,$i.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zi),$i.lang=Qe,R("X",0,0,"unix"),R("x",0,0,"valueOf"),ft("x",ht),ft("X",/[+-]?\d+(\.\d{1,3})?/),yt("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t))})),yt("x",(function(t,e,i){i._d=new Date(G(t))})), 11//! moment.js 12n.version="2.29.4",e=xe,n.fn=gi,n.min=function(){var t=[].slice.call(arguments,0);return Oe("isBefore",t)},n.max=function(){var t=[].slice.call(arguments,0);return Oe("isAfter",t)},n.now=function(){return Date.now?Date.now():+new Date},n.utc=f,n.unix=function(t){return xe(1e3*t)},n.months=function(t,e){return _i(t,e,"months")},n.isDate=c,n.locale=se,n.invalid=m,n.duration=Ue,n.isMoment=b,n.weekdays=function(t,e,i){return Ai(t,e,i,"weekdays")},n.parseZone=function(){return xe.apply(null,arguments).parseZone()},n.localeData=ae,n.isDuration=Ee,n.monthsShort=function(t,e){return _i(t,e,"monthsShort")},n.weekdaysMin=function(t,e,i){return Ai(t,e,i,"weekdaysMin")},n.defineLocale=oe,n.updateLocale=function(t,e){if(null!=e){var i,n,r=Qt;null!=te[t]&&null!=te[t].parentLocale?te[t].set(O(te[t]._config,e)):(null!=(n=re(t))&&(r=n._config),e=O(r,e),null==n&&(e.abbr=t),(i=new P(e)).parentLocale=te[t],te[t]=i),se(t)}else null!=te[t]&&(null!=te[t].parentLocale?(te[t]=te[t].parentLocale,t===se()&&se(t)):null!=te[t]&&delete te[t]);return te[t]},n.locales=function(){return S(te)},n.weekdaysShort=function(t,e,i){return Ai(t,e,i,"weekdaysShort")},n.normalizeUnits=N,n.relativeTimeRounding=function(t){return void 0===t?Vi:"function"==typeof t&&(Vi=t,!0)},n.relativeTimeThreshold=function(t,e){return void 0!==zi[t]&&(void 0===e?zi[t]:(zi[t]=e,"s"===t&&(zi.ss=e-1),!0))},n.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},n.prototype=gi,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()}).call(this,i(95)(t))},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){var i,n,r=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var l,h=[],c=!1,u=-1;function d(){c&&l&&(c=!1,l.length?h=l.concat(h):u=-1,h.length&&f())}function f(){if(!c){var t=a(d);c=!0;for(var e=h.length;e;){for(l=h,h=[];++u<e;)l&&l[u].run();u=-1,e=h.length}l=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];h.push(new p(t,e)),1!==h.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}
12,function(t,e,i){ 13/*! 14 * Compressor.js v1.0.7 15 * https://fengyuanchen.github.io/compressorjs 16 * 17 * Copyright 2018-present Chen Fengyuan 18 * Released under the MIT license 19 * 20 * Date: 2020-11-28T07:13:17.754Z 21 */ 22t.exports=function(){"use strict";function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function r(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?n(Object(r),!0).forEach((function(i){e(t,i,r[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var s=function(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}((function(t){"undefined"!=typeof window&&function(e){var i=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,n=e.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),r=n&&e.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),s=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,o=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(n||s)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(t){var e,i,a,l,h,c,u,d,f;if(!(e=t.match(o)))throw new Error("invalid data URI");for(i=e[2]?e[1]:"text/plain"+(e[3]||";charset=US-ASCII"),a=!!e[4],l=t.slice(e[0].length),h=a?atob(l):decodeURIComponent(l),c=new ArrayBuffer(h.length),u=new Uint8Array(c),d=0;d<h.length;d+=1)u[d]=h.charCodeAt(d);return n?new Blob([r?u:c],{type:i}):((f=new s).append(c),f.getBlob(i))};e.HTMLCanvasElement&&!i.toBlob&&(i.mozGetAsFile?i.toBlob=function(t,e,n){var r=this;setTimeout((function(){n&&i.toDataURL&&a?t(a(r.toDataURL(e,n))):t(r.mozGetAsFile("blob",e))}))}:i.toDataURL&&a&&(i.msToBlob?i.toBlob=function(t,e,n){var r=this;setTimeout((function(){(e&&"image/png"!==e||n)&&i.toDataURL&&a?t(a(r.toDataURL(e,n))):t(r.msToBlob(e))}))}:i.toBlob=function(t,e,i){var n=this;setTimeout((function(){t(a(n.toDataURL(e,i)))}))})),t.exports?t.exports=a:e.dataURLtoBlob=a}(window)})),o={strict:!0,checkOrientation:!0,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,quality:.8,mimeType:"auto",convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},a="undefined"!=typeof window&&void 0!==window.document?window:{},l=Array.prototype.slice,h=/^image\/.+$/;function c(t){return h.test(t)}var u=String.fromCharCode,d=a.btoa;function f(t){var e,i=new DataView(t);try{var n,r,s;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var o=i.byteLength,a=2;a+1<o;){if(255===i.getUint8(a)&&225===i.getUint8(a+1)){r=a;break}a+=1}if(r){var l=r+10;if("Exif"===function(t,e,i){var n,r="";for(i+=e,n=e;n<i;n+=1)r+=u(t.getUint8(n));return r}(i,r+4,4)){var h=i.getUint16(l);if(((n=18761===h)||19789===h)&&42===i.getUint16(l+2,n)){var c=i.getUint32(l+4,n);c>=8&&(s=l+c)}}}if(s){var d,f,p=i.getUint16(s,n);for(f=0;f<p;f+=1)if(d=s+12*f+2,274===i.getUint16(d,n)){d+=8,e=i.getUint16(d,n),i.setUint16(d,1,n);break}}}catch(t){e=1}return e}var p=/\.\d*(?:0|9){12}\d*$/;function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return p.test(t)?Math.round(t*e)/e:t}var m=a.ArrayBuffer,v=a.FileReader,y=a.URL||a.webkitURL,_=/\.\w+$/,A=a.Compressor;return function(){function e(t,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.file=t,this.image=new Image,this.options=r(r({},o),i),this.aborted=!1,this.result=null,this.init()}var n,h,p;return n=e,p=[{key:"noConflict",value:function(){return window.Compressor=A,e}},{key:"setDefaults",value:function(t){i(o,t)}}],(h=[{key:"init",value:function(){var t=this,e=this.file,n=this.options;if(r=e,"undefined"!=typeof Blob&&(r instanceof Blob||"[object Blob]"===Object.prototype.toString.call(r))){var r,s=e.type;if(c(s))if(y&&v)if(m||(n.checkOrientation=!1),y&&!n.checkOrientation)this.load({url:y.createObjectURL(e)});else{var o=new v,a=n.checkOrientation&&"image/jpeg"===s;this.reader=o,o.onload=function(n){var r=n.target.result,o={};if(a){var h=f(r);h>1||!y?(o.url=function(t,e){for(var i,n=[],r=new Uint8Array(t);r.length>0;)n.push(u.apply(null,(i=r.subarray(0,8192),Array.from?Array.from(i):l.call(i)))),r=r.subarray(8192);return"data:".concat(e,";base64,").concat(d(n.join("")))}(r,s),h>1&&i(o,function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(h))):o.url=y.createObjectURL(e)}else o.url=r;t.load(o)},o.onabort=function(){t.fail(new Error("Aborted to read the image with FileReader."))},o.onerror=function(){t.fail(new Error("Failed to read the image with FileReader."))},o.onloadend=function(){t.reader=null},a?o.readAsArrayBuffer(e):o.readAsDataURL(e)}else this.fail(new Error("The current browser does not support image compression."));else this.fail(new Error("The first argument must be an image File or Blob object."))}else this.fail(new Error("The first argument must be a File or Blob object."))}},{key:"load",value:function(t){var e=this,i=this.file,n=this.image;n.onload=function(){e.draw(r(r({},t),{}
22,{naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}))},n.onabort=function(){e.fail(new Error("Aborted to load the image."))},n.onerror=function(){e.fail(new Error("Failed to load the image."))},a.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(a.navigator.userAgent)&&(n.crossOrigin="anonymous"),n.alt=i.name,n.src=t.url}},{key:"draw",value:function(t){var e=this,i=t.naturalWidth,n=t.naturalHeight,r=t.rotate,o=void 0===r?0:r,a=t.scaleX,l=void 0===a?1:a,h=t.scaleY,u=void 0===h?1:h,d=this.file,f=this.image,p=this.options,m=document.createElement("canvas"),v=m.getContext("2d"),y=i/n,_=Math.abs(o)%180==90,A=Math.max(p.maxWidth,0)||1/0,b=Math.max(p.maxHeight,0)||1/0,C=Math.max(p.minWidth,0)||0,w=Math.max(p.minHeight,0)||0,S=Math.max(p.width,0)||i,x=Math.max(p.height,0)||n;if(_){var T=[b,A];A=T[0],b=T[1];var k=[w,C];C=k[0],w=k[1];var O=[x,S];S=O[0],x=O[1]}A<1/0&&b<1/0?b*y>A?b=A/y:A=b*y:A<1/0?b=A/y:b<1/0&&(A=b*y),C>0&&w>0?w*y>C?w=C/y:C=w*y:C>0?w=C/y:w>0&&(C=w*y),x*y>S?x=S/y:S=x*y;var P=-(S=Math.floor(g(Math.min(Math.max(S,C),A))))/2,D=-(x=Math.floor(g(Math.min(Math.max(x,w),b))))/2,E=S,M=x;if(_){var j=[x,S];S=j[0],x=j[1]}m.width=S,m.height=x,c(p.mimeType)||(p.mimeType=d.type);var L="transparent";if(d.size>p.convertSize&&"image/png"===p.mimeType&&(L="#fff",p.mimeType="image/jpeg"),v.fillStyle=L,v.fillRect(0,0,S,x),p.beforeDraw&&p.beforeDraw.call(this,v,m),!this.aborted&&(v.save(),v.translate(S/2,x/2),v.rotate(o*Math.PI/180),v.scale(l,u),v.drawImage(f,P,D,E,M),v.restore(),p.drew&&p.drew.call(this,v,m),!this.aborted)){var R=function(t){e.aborted||e.done({naturalWidth:i,naturalHeight:n,result:t})};m.toBlob?m.toBlob(R,p.mimeType,p.quality):R(s(m.toDataURL(p.mimeType,p.quality)))}}},{key:"done",value:function(t){var e,i,n=t.naturalWidth,r=t.naturalHeight,s=t.result,o=this.file,a=this.image,l=this.options;if(y&&!l.checkOrientation&&y.revokeObjectURL(a.src),s)if(l.strict&&s.size>o.size&&l.mimeType===o.type&&!(l.width>n||l.height>r||l.minWidth>n||l.minHeight>r))s=o;else{var h=new Date;s.lastModified=h.getTime(),s.lastModifiedDate=h,s.name=o.name,s.name&&s.type!==o.type&&(s.name=s.name.replace(_,(e=s.type,"jpeg"===(i=c(e)?e.substr(6):"")&&(i="jpg"),".".concat(i))))}else s=o;this.result=s,l.success&&l.success.call(this,s)}},{key:"fail",value:function(t){var e=this.options;if(!e.error)throw t;e.error.call(this,t)}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}])&&t(n.prototype,h),p&&t(n,p),e}()}()},,function(t,e,i){"use strict";var n=i(2),r=i.n(n),s=i(68),o=i(11),a=i.n(o);var l=r.a.getComponent("Tech"),h=r.a.dom,c=r.a.url,u=r.a.createTimeRange,d=r.a.mergeOptions,f=a.a&&a.a.navigator||{},p=function(t){function e(i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,i,n));return i.source&&r.ready((function(){this.setSource(i.source)}),!0),i.startTime&&r.ready((function(){this.load(),this.play(),this.currentTime(i.startTime)}),!0),a.a.videojs=a.a.videojs||{},a.a.videojs.Flash=a.a.videojs.Flash||{},a.a.videojs.Flash.onReady=e.onReady,a.a.videojs.Flash.onEvent=e.onEvent,a.a.videojs.Flash.onError=e.onError,r.on("seeked",(function(){this.lastSeekTarget_=void 0})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.createEl=function(){var t=this.options_;t.swf||(t.swf="https://vjs.zencdn.net/swf/"+s.a+"/video-js.swf");var i=t.techId,n=d({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:t.autoplay,preload:t.preload,loop:t.loop,muted:t.muted},t.flashVars),r=d({wmode:"opaque",bgcolor:"#000000"},t.params),o=d({id:i,name:i,class:"vjs-tech"},t.attributes);return this.el_=e.embed(t.swf,n,r,o),this.el_.tech=this,this.el_},e.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},e.prototype.pause=function(){this.el_.vjs_pause()},e.prototype.src=function(t){return void 0===t?this.currentSrc():this.setSrc(t)},e.prototype.setSrc=function(t){var e=this;t=c.getAbsoluteURL(t),this.el_.vjs_src(t),this.autoplay()&&this.setTimeout((function(){return e.play()}),0)},e.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},e.prototype.setCurrentTime=function(e){var i=this.seekable();i.length&&(e=(e=e>i.start(0)?e:i.start(0))<i.end(i.length-1)?e:i.end(i.length-1),this.lastSeekTarget_=e,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",e),t.prototype.setCurrentTime.call(this))},e.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},e.prototype.duration=function(){if(0===this.readyState())return NaN;var t=this.el_.vjs_getProperty("duration");return t>=0?t:1/0},e.prototype.load=function(){this.el_.vjs_load()},e.prototype.poster=function(){this.el_.vjs_getProperty("poster")},e.prototype.setPoster=function(){},e.prototype.seekable=function(){var t=this.duration();return 0===t?u():u(0,t)},e.prototype.buffered=function(){var t=this.el_.vjs_getProperty("buffered");return 0===t.length?u():u(t[0][0],t[0][1])},e.prototype.supportsFullScreen=function(){return!1},e.prototype.enterFullScreen=function(){return!1},e.prototype.getVideoPlaybackQuality=function(){var t=this.el_.vjs_getProperty("getVideoPlaybackQuality");return a.a.performance&&"function"==typeof a.a.performance.now?t.creationTime=a.a.performance.now():a.a.performance&&a.a.performance.timing&&"number"==typeof a.a.performance.timing.navigationStart&&(t.creationTime=a.a.Date.now()-a.a.performance.timing.navigationStart),t},e}(l),g=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","loop","controls","volume","muted","defaultMuted"],m=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"],v=p.prototype;function y(t){var e=t.charAt(0).toUpperCase()+t.slice(1);v["set"+e]=function(e){return this.el_.vjs_setProperty(t,e)}}function _(t){v[t]=function(){return this.el_.vjs_getProperty(t)}}for(var A=0;A<g.length;A++)_(g[A]),y(g[A]);for(var b=0;b<m.length;b++)_(m[b]);p.isSupported=function(){return!((!r.a.browser.IS_CHROME||r.a.browser.IS_ANDROID&&r.a.browser.IS_IOS)&&(!r.a.browser.IS_SAFARI||r.a.browser.IS_IOS)&&!r.a.browser.IS_EDGE)||p.version()[0]>=10},l.withSourceHandlers(p),p.nativeSourceHandler={},p.nativeSourceHandler.canPlayType=function(t){return t in p.formats?"maybe":""},p.nativeSourceHandler.canHandleSource=function(t,e){var i,n,r=void 0;return t.type?r=t.type.replace(/;
22.*/,"").toLowerCase():(i=t.src,r=(n=c.getFileExtension(i))?"video/"+n:""),p.nativeSourceHandler.canPlayType(r)},p.nativeSourceHandler.handleSource=function(t,e,i){e.setSrc(t.src)},p.nativeSourceHandler.dispose=function(){},p.registerSourceHandler(p.nativeSourceHandler),p.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},p.onReady=function(t){var e=h.$("#"+t),i=e&&e.tech;i&&i.el()&&p.checkReady(i)},p.checkReady=function(t){t.el()&&(t.el().vjs_getProperty?t.triggerReady():this.setTimeout((function(){p.checkReady(t)}),50))},p.onEvent=function(t,e){var i=h.$("#"+t).tech,n=Array.prototype.slice.call(arguments,2);i.setTimeout((function(){i.trigger(e,n)}),1)},p.onError=function(t,e){var i=h.$("#"+t).tech;if("srcnotfound"===e)return i.error(4);"string"==typeof e?i.error("FLASH: "+e):(e.origin="flash",i.error(e))},p.version=function(){var t="0,0,0";try{t=new a.a.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(e){try{f.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(t=(f.plugins["Shockwave Flash 2.0"]||f.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(t){}}return t.split(",")},p.embed=function(t,e,i,n){var r=p.getEmbedCode(t,e,i,n);return h.createEl("div",{innerHTML:r}).childNodes[0]},p.getEmbedCode=function(t,e,i,n){var r="",s="",o="";return e&&Object.getOwnPropertyNames(e).forEach((function(t){r+=t+"="+e[t]+"&"})),i=d({movie:t,flashvars:r,allowScriptAccess:"always",allowNetworking:"all"},i),Object.getOwnPropertyNames(i).forEach((function(t){s+='<param name="'+t+'" value="'+i[t]+'" />'})),n=d({data:t,width:"100%",height:"100%"},n),Object.getOwnPropertyNames(n).forEach((function(t){o+=t+'="'+n[t]+'" '})),'<object type="application/x-shockwave-flash" '+o+">"+s+"</object>"},function(t){t.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},t.streamFromParts=function(t,e){return t+"&"+e},t.streamToParts=function(t){var e={connection:"",stream:""};if(!t)return e;var i=t.search(/&(?![\w-]+=)/),n=void 0;return-1!==i?n=i+1:0===(i=n=t.lastIndexOf("/")+1)&&(i=n=t.length),e.connection=t.substring(0,i),e.stream=t.substring(n,t.length),e},t.isStreamingType=function(e){return e in t.streamingFormats},t.RTMP_RE=/^rtmp[set]?:\/\//i,t.isStreamingSrc=function(e){return t.RTMP_RE.test(e)},t.rtmpSourceHandler={},t.rtmpSourceHandler.canPlayType=function(e){return t.isStreamingType(e)?"maybe":""},t.rtmpSourceHandler.canHandleSource=function(e,i){var n=t.rtmpSourceHandler.canPlayType(e.type);return n||(t.isStreamingSrc(e.src)?"maybe":"")},t.rtmpSourceHandler.handleSource=function(e,i,n){var r=t.streamToParts(e.src);i.setRtmpConnection(r.connection),i.setRtmpStream(r.stream)},t.registerSourceHandler(t.rtmpSourceHandler)}(p),l.getTech("Flash")?(r.a.log.warn("Not using videojs-flash as it appears to already be registered"),r.a.log.warn("videojs-flash should only be used with video.js@6 and above")):r.a.registerTech("Flash",p),p.VERSION="2.2.1"},,function(t,e,i){"use strict";var n=i(2),r=i.n(n),s=i(11),o=i.n(s),a=i(53),l=i.n(a);var h=function(t,e){e.isImmediatePropagationStopped=function(){return!0},e.cancelBubble=!0,e.isPropagationStopped=function(){return!0}},c=function(t,e,i){h(0,i),t.trigger({type:e+i.type,originalEvent:i})};function u(t){"playing"===t.type?function(t,e){t.ads.isInAdMode()&&(t.ads.isContentResuming()?t.ads._contentEnding&&c(t,"content",e):c(t,"ad",e))}(this,t):"ended"===t.type?function(t,e){t.ads.isInAdMode()?t.ads.isContentResuming()?(h(0,e),t.trigger("resumeended")):c(t,"ad",e):t.ads._contentHasEnded||t.ads.stitchedAds()||(c(t,"content",e),t.trigger("readyforpostroll"))}(this,t):"loadstart"===t.type||"loadeddata"===t.type||"loadedmetadata"===t.type?function(t,e){if(!("loadstart"===e.type&&!t.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===e.type&&!t.ads._hasThereBeenALoadedData||"loadedmetadata"===e.type&&!t.ads._hasThereBeenALoadedMetaData))if(t.ads.inAdBreak())c(t,"ad",e);else{if(t.currentSrc()!==t.ads.contentSrc)return;c(t,"content",e)}}(this,t):"play"===t.type?function(t,e){t.ads.inAdBreak()?c(t,"ad",e):t.ads.isContentResuming()&&c(t,"content",e)}(this,t):this.ads.isInAdMode()&&(this.ads.isContentResuming()?c(this,"content",t):c(this,"ad",t))}function d(){return(d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p(t,e)}
vendor: 20,746 bytes, line 22
22function p(t,e){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var g={},m=function(){!function(t){if(r.a.dom.isInFrame()&&"function"!=typeof o.a.__tcfapi){for(var e,i=o.a,n={};i;){try{if(i.frames.__tcfapiLocator){e=i;break}}catch(t){}if(i===o.a.top)break;i=i.parent}if(!e)return;o.a.__tcfapi=function(t,i,r,s){var o=Math.random()+"",a={__tcfapiCall:{command:t,parameter:s,version:i,callId:o}};n[o]=r,e.postMessage(a,"*")},o.a.addEventListener("message",(function(t){var e={};try{e="string"==typeof t.data?JSON.parse(t.data):t.data}catch(t){}var i=e.__tcfapiReturn;i&&"function"==typeof n[i.callId]&&(n[i.callId](i.returnValue,i.success),n[i.callId]=null)}),!1)}}(),"function"==typeof o.a.__tcfapi&&o.a.__tcfapi("addEventListener",2,(function(t,e){e&&(g=t)}))},v="",y=function(t,e){if(void 0===e&&(e=o.a),e.__uspapi)e.__uspapi("getUSPData",1,(function(e,i){var n=i?e.uspString:null;v=n,t(n)}));else{var i=function(t){for(var e=t.parent;e!==t.top;){try{if(e.frames&&e.frames.__uspapiLocator)return e}catch(t){}e=e.parent}try{if(t.top.frames&&t.top.frames.__uspapiLocator)return t.top}catch(t){}return null}(e);if(!i)return void t(null);var n=Math.random().toString(36).substring(2),r={__uspapiCall:{command:"getUSPData",version:1,callId:n}};e.addEventListener("message",(function i(r){if(r&&r.data&&r.data.__uspapiReturn&&r.data.__uspapiReturn.callId===n){e.removeEventListener("message",i,!1);var s=r.data.__uspapiReturn,o=s.returnValue,a=s.success?o.uspString:null;v=a,t(a)}}),!1),i.postMessage(r,"*")}},_={AdsBeforePrerollError:"ads-before-preroll-error",AdsPrerollError:"ads-preroll-error",AdsMidrollError:"ads-midroll-error",AdsPostrollError:"ads-postroll-error",AdsMacroReplacementFailed:"ads-macro-replacement-failed",AdsResumeContentFailed:"ads-resume-content-failed"},A=function(t,e){return e?encodeURIComponent(t):t},b=function(t,e){var i={};return["description","tags","reference_id","ad_keys"].forEach((function(n){t&&t[n]?i["{mediainfo."+n+"}"]=t[n]:e["{mediainfo."+n+"}"]?i["{mediainfo."+n+"}"]=e["{mediainfo."+n+"}"]:i["{mediainfo."+n+"}"]=""})),["custom_fields","customFields"].forEach((function(e){!function(t,e,i){if(t&&t[i])for(var n=t[i],r=Object.keys(n),s=0;s<r.length;s++){e["{mediainfo."+i+"."+r[s]+"}"]=n[r[s]]}}(t,i,e)})),i},C=function(t,e,i,n,s){for(var o in void 0===n&&(n={}),e){var a=n.hasOwnProperty(o)?n[o]:o;if(a.startsWith("r:"))try{var l=new RegExp(a.slice(2),"g");t=t.replace(l,A(e[o],i))}catch(t){s.ads.error({errorType:_.AdsMacroReplacementFailed,macro:o,error:t}),r.a.log.warn('Unable to replace macro with regex "'+a+'". The provided regex may be invalid.')}else t=t.split(a).join(A(e[o],i))}return t};function w(t,e,i){void 0===e&&(e=!1),void 0===i&&(i={});var n=i.disableDefaultMacros||!1,s=i.macroNameOverrides||{};delete i.disableDefaultMacros,delete i.macroNameOverrides;var a=i;if(n)return C(t,a,e,s);var h,c,u,f=function(t){var e={},i=t.replace(/{([^}=]+)=([^}]*)}/g,(function(t,i,n){return e["{"+i+"}"]=n,"{"+i+"}"}));return{defaults:e,modifiedString:i}}(t),p=f.defaults,m=f.modifiedString;for(var y in t=m,d(a,{"{player.id}":(u=this).options_["data-player"]||u.id_,"{player.height}":u.currentHeight(),"{player.width}":u.currentWidth(),"{player.heightInt}":Math.round(u.currentHeight()),"{player.widthInt}":Math.round(u.currentWidth()),"{player.autoplay}":u.autoplay()?1:0,"{player.muted}":u.muted()?1:0,"{player.language}":u.language()||"","{mediainfo.id}":u.mediainfo?u.mediainfo.id:"","{mediainfo.name}":u.mediainfo?u.mediainfo.name:"","{mediainfo.duration}":u.mediainfo?u.mediainfo.duration:"","{player.duration}":u.duration(),"{player.durationInt}":Math.round(u.duration()),"{player.live}":u.duration()===1/0?1:0,"{player.pageUrl}":r.a.dom.isInFrame()?l.a.referrer:o.a.location.href,"{playlistinfo.id}":u.playlistinfo?u.playlistinfo.id:"","{playlistinfo.name}":u.playlistinfo?u.playlistinfo.name:"","{timestamp}":(new Date).getTime(),"{document.referrer}":l.a.referrer,"{window.location.href}":o.a.location.href,"{random}":Math.floor(1e12*Math.random())},b(this.mediainfo,p),(h=g,c={},Object.keys(h).forEach((function(t){c["{tcf."+t+"}"]=h[t]})),c["{tcf.gdprAppliesInt}"]=h.gdprApplies?1:0,c),{"{usp.uspString}":v},function(t,e,i){var n=new RegExp("{pageVariable\\.([^}]+)}","g"),s={},a=(t.match(n)||[]).concat(Object.keys(i).filter((function(e){return n.test(e)&&t.includes(i[e])})));if(a)return a.forEach((function(t){for(var i,n=t,a=t.slice(14,-1),l=a.split("."),h=o.a,c=0;c<l.length;c++)if(c===l.length-1)i=h[l[c]];else if(void 0===(h=h[l[c]]))break;var u=typeof i;null===i?s[n]="null":void 0===i?e[n]?s[n]=e[n]:(r.a.log.warn('Page variable "'+a+'" not found'),s[n]=""):"string"!==u&&"number"!==u&&"boolean"!==u?(r.a.log.warn('Page variable "'+a+'" is not a supported type'),s[n]=""):s[n]=i})),s}(t,p,s)),t=C(t,a,e,s,this),p)t=t.replace(y,p[y]);return t}var S={processMetadataTracks:function(t,e){for(var i=t.textTracks(),n=function(i){"metadata"===i.kind&&(t.ads.cueTextTracks.setMetadataTrackMode(i),e(t,i))},r=0;r<i.length;r++)n(i[r]);i.addEventListener("addtrack",(function(t){n(t.track)}))},setMetadataTrackMode:function(t){},getSupportedAdCue:function(t,e){return e},isSupportedAdCue:function(t,e){return!0},getCueId:function(t,e){return e.id}},x=function(t,e){return void 0!==e&&t.ads.includedCues[e]},T=function(t,e){void 0!==e&&""!==e&&(t.ads.includedCues[e]=!0)};function k(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}S.processAdTrack=function(t,e,i,n){t.ads.includedCues={};for(var s=0;s<e.length;s++){var o=e[s],a=this.getSupportedAdCue(t,o);if(!this.isSupportedAdCue(t,o))return void r.a.log.warn("Skipping as this is not a supported ad cue.",o);var l=this.getCueId(t,o),h=o.startTime;if(x(t,l))return void r.a.log("Skipping ad already seen with ID "+l);n&&n(t,a,l,h),i(t,a,l,h),T(t,l)}};var O={},P=r.a;O.isMiddlewareMediatorSupported=function(){return!P.browser.IS_IOS&&!P.browser.IS_ANDROID&&!!(P.use&&P.middleware&&P.middleware.TERMINATOR)},O.playMiddleware=function(t){return{setSource:function(t,e){e(null,t)},callPlay:function(){if(t.ads&&!0===t.ads._shouldBlockPlay)return t.ads.debug("Using playMiddleware to block content playback"),t.ads._playBlocked=!0,P.middleware.TERMINATOR},play:function(e,i){t.ads&&t.ads._playBlocked&&e?(t.ads.debug("Play call to Tech was terminated."),t.trigger("play"),t.addClass("vjs-has-started"),t.ads._playBlocked=!1):i&&i.catch&&i.catch((function(e){"NotAllowedError"!==e.name||r.a.browser.IS_SAFARI||t.trigger("pause")}))}}},O.testHook=function(t){P=t};var D=O.playMiddleware,E=O.isMiddlewareMediatorSupported;var M={src:"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAxJtZGF03ABMYXZjNjEuMy4xMDAAQiAIwRg4AAACrgYF//+q3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2NCByMzEwOCAzMWUxOWY5IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMyAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAAn//71sXwKaunqigzoMi7hlyTJrrYi4m0AwABFxzcqWKGahTaoBcQAAMWK4AlcFlIICBeldSEQBGCMHAAABVNtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAAIgABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAACQXRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAIgAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAABQAAAAPAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAACIAAAAAAAEAAAAAAbltZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAADwAAAACAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAFkbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAADAc3RzZAAAAAAAAAABAAAAsGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABQADwAEgAAABIAAAAAAAAAAEUTGF2YzYxLjMuMTAwIGxpYngyNjQAAAAAAAAAAAAAAAAY//8AAAA2YXZjQwFkAA3/4QAZZ2QADazZQUH7ARAAAAMAEAAAAwPA8UKZYAEABmjr48siwP34+AAAAAAQcGFzcAAAAAEAAAABAAAAFGJ0cnQAAAAAAALAEAACwBAAAAAYc3R0cwAAAAAAAAABAAAAAQAAAgAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAC7wAAAAEAAAAUc3RjbwAAAAAAAAABAAAARQAAAj10cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAABgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAAXAAAEAAABAAAAAAG1bWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAAACABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABYG1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABJHN0YmwAAAB+c3RzZAAAAAAAAAABAAAAbm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAH0AAAAEisFgICABRIQVuUABoCAgAECAAAAFGJ0cnQAAAAAAAH0AAAAEisAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAAVAAAABgAAABhzdGNvAAAAAAAAAAIAAAAwAAADNAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAACAAAAAQAAAGF1ZHRhAAAAWW1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALGlsc3QAAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjEuMS4xMDA=",type:"video/mp4"},j=function(){function t(){}return t.getState=function(e){if(e)return t.states_&&t.states_[e]?t.states_[e]:void 0},t.registerState=function(e,i){if("string"!=typeof e||!e)throw new Error('Illegal state name, "'+e+'"; must be a non-empty string.');return t.states_||(t.states_={}),t.states_[e]=i,i},t}(),L=function(){function t(t){this.player=t}t._getName=function(){return"Anonymous State"};var e=t.prototype;return e.transitionTo=function(t){var e=this.player;this.cleanup(e);var i=new t(e);e.ads._state=i,e.ads.debug(this.constructor._getName()+" -> "+i.constructor._getName());for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];i.init.apply(i,[e].concat(r))},e.init=function(){},e.cleanup=function(){},e.onPlay=function(){},e.onPlaying=function(){},e.onEnded=function(){},e.onAdEnded=function(){},e.onAdsReady=function(){r.a.log.warn("Unexpected adsready event")},e.onAdsError=function(){},e.onAdsCanceled=function(){},e.onAdTimeout=function(){},e.onAdStarted=function(){},e.onAdSkipped=function(){},e.onContentChanged=function(){},e.onContentResumed=function(){},e.onReadyForPostroll=function(){r.a.log.warn("Unexpected readyforpostroll event")},e.onNoPreroll=function(){},e.onNoPostroll=function(){},e.startLinearAdMode=function(){r.a.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},e.endLinearAdMode=function(){r.a.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},e.skipLinearAdMode=function(){r.a.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},e.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},e.isWaitingForAdBreak=function(){return!1},e.isContentResuming=function(){return!1},e.inAdBreak=function(){return!1},e.handleEvent=function(t){var e=this.player;"play"===t?this.onPlay(e):"adsready"===t?this.onAdsReady(e):"adserror"===t?this.onAdsError(e):"adscanceled"===t?this.onAdsCanceled(e):"adtimeout"===t?this.onAdTimeout(e):"ads-ad-started"===t?this.onAdStarted(e):"ads-ad-skipped"===t?this.onAdSkipped(e):"contentchanged"===t?this.onContentChanged(e):"contentresumed"===t?this.onContentResumed(e):"readyforpostroll"===t?this.onReadyForPostroll(e):"playing"===t?this.onPlaying(e):"ended"===t?this.onEnded(e):"nopreroll"===t?this.onNoPreroll(e):"nopostroll"===t?this.onNoPostroll(e):"adended"===t&&this.onAdEnded(e)},t}();j.registerState("State",L);var R=function(t){function e(e){var i;return(i=t.call(this,e)||this).contentResuming=!1,i.waitingForAdBreak=!1,i}f(e,t);var i=e.prototype;return i.isAdState=function(){return!0},i.onPlaying=function(){var t=j.getState("ContentPlayback");this.contentResuming&&this.transitionTo(t)},i.onContentResumed=function(){var t=j.getState("ContentPlayback");this.contentResuming&&this.transitionTo(t)},i.isWaitingForAdBreak=function(){return this.waitingForAdBreak},i.isContentResuming=function(){return this.contentResuming},i.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},e}(L);j.registerState("AdState",R);var F=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var i=e.prototype;return i.isAdState=function(){return!1},i.onContentChanged=function(t){var e=j.getState("BeforePreroll"),i=j.getState("Preroll");t.ads.debug("Received contentchanged event (ContentState)"),t.paused()?this.transitionTo(e):(this.transitionTo(i,!1),t.pause(),t.ads._pausedOnContentupdate=!0)},e}(L);j.registerState("ContentState",F);var I,B=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"AdsDone"};var i=e.prototype;return i.init=function(t){t.ads._contentHasEnded=!0,t.trigger("ended")},i.startLinearAdMode=function(){r.a.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},e}(j.getState("ContentState"));j.registerState("AdsDone",B);var Y={start:function(t){t.ads.debug("Starting ad break"),t.ads._inLinearAdMode=!0,t.trigger("adstart"),t.ads.shouldTakeSnapshots()&&(t.ads.snapshot=function(t){var e;e=r.a.browser.IS_IOS&&t.ads.isLive(t)&&t.seekable().length>0?t.currentTime()-t.seekable().end(0):t.currentTime();var i=t.$(".vjs-tech"),n=t.textTracks?t.textTracks():[],s=[],o={ended:t.ended(),currentSrc:t.currentSrc(),sources:t.currentSources(),src:t.tech_.src(),currentTime:e,type:t.currentType()};i&&(o.style=i.getAttribute("style"));for(var a=0;a<n.length;a++){var l=n[a];s.push({track:l,mode:l.mode}),l.mode="disabled"}return o.suppressedTracks=s,o}(t)),t.ads.shouldPlayContentBehindAd(t)&&!t.ads.settings.stitchedAds&&(t.ads.preAdVolume_=t.volume(),t.volume(0)),t.addClass("vjs-ad-playing"),t.hasClass("vjs-live")&&t.removeClass("vjs-live"),t.ads.removeNativePoster(),t.ads.preAdPlaybackRate_=t.playbackRate(),t.playbackRate(1),t.controlBar&&t.controlBar.playbackRateMenuButton&&t.controlBar.playbackRateMenuButton.playbackRateSupported&&!t.controlBar.playbackRateMenuButton.hasClass("vjs-hidden")?(t.controlBar.playbackRateMenuButton.hide(),t.ads.showPlaybackMenuOnAdEnd_=!0):t.ads.showPlaybackMenuOnAdEnd_=!1},end:function(t,e){t.ads.debug("Ending ad break"),void 0===e&&(e=function(){}),t.ads.adType=null,t.ads._inLinearAdMode=!1,t.trigger("adend"),t.removeClass("vjs-ad-playing"),t.ads.isLive(t)&&t.addClass("vjs-live"),t.ads.shouldTakeSnapshots()?function(t,e){var i=t.ads.snapshot;if(void 0===e&&(e=function(){}),!0===t.ads.disableNextSnapshotRestore)return t.ads.disableNextSnapshotRestore=!1,delete t.ads.snapshot,void e();var n,s=t.$(".vjs-tech"),o=20,a=i.suppressedTracks,l=function(){for(var t=0;t<a.length;t++)(n=a[t]).track.mode=n.mode},h=function(){var e;if(r.a.browser.IS_IOS&&t.ads.isLive(t)){if(i.currentTime<0&&(e=t.seekable().length>0?t.seekable().end(0)+i.currentTime:t.currentTime(),t.currentTime(e)),t.paused()){var n=t.play();n&&n.catch&&n.catch((function(t){r.a.log.warn("Play promise rejected in IOS snapshot resume",t)}))}}else if(i.ended)t.currentTime(t.duration());else{t.currentTime(i.currentTime);var s=t.play();s&&s.catch&&s.catch((function(t){r.a.log.warn("Play promise rejected in snapshot resume",t)}))}t.ads.shouldRemoveAutoplay_&&(t.autoplay(!1),t.ads.shouldRemoveAutoplay_=!1)},c=function e(){if(t.off("contentcanplay",e),I&&t.clearTimeout(I),(s=t.el().querySelector(".vjs-tech")).readyState>1)return h();if(void 0===s.seekable)return h();if(s.seekable.length>0)return h();if(o--)t.setTimeout(e,50);else try{h()}catch(e){t.ads.error({errorType:_.AdsResumeContentFailed,error:e}),r.a.log.warn("Failed to resume the content after an advertisement",e)}};if("style"in i&&s.setAttribute("style",i.style||""),t.ads.videoElementRecycled())t.one("resumeended",(function(){delete t.ads.snapshot,e()})),t.one("contentloadedmetadata",l),r.a.browser.IS_IOS&&!t.autoplay()&&"function"==typeof t.techCall_&&(t.techCall_("setAutoplay",!0),t.ads.shouldRemoveAutoplay_=!0),t.src(i.sources),t.one("contentcanplay",c),I=t.setTimeout(c,2e3);else{if(l(),!t.ended()){var u=t.play();u&&u.catch&&u.catch((function(t){r.a.log.warn("Play promise rejected in snapshot restore",t)}))}delete t.ads.snapshot,e()}}(t,e):(t.ads.preAdVolume_&&t.volume(t.ads.preAdVolume_),e()),t.playbackRate(t.ads.preAdPlaybackRate_),t.ads.showPlaybackMenuOnAdEnd_&&t.controlBar.playbackRateMenuButton.show()}},N=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"Preroll"};var i=e.prototype;return i.init=function(t,e,i){if(this.waitingForAdBreak=!0,t.addClass("vjs-ad-loading"),i||t.ads.nopreroll_)return this.resumeAfterNoPreroll(t);var n=t.ads.settings.timeout;"number"==typeof t.ads.settings.prerollTimeout&&(n=t.ads.settings.prerollTimeout),this._timeout=t.setTimeout((function(){t.trigger("adtimeout")}),n),e?this.handleAdsReady():this.adsReady=!1},i.onAdsReady=function(t){t.ads.inAdBreak()?r.a.log.warn("Unexpected adsready event (Preroll)"):(t.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},i.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},i.afterLoadStart=function(t){var e=this.player;e.ads._hasThereBeenALoadStartDuringPlayerLife?t():(e.ads.debug("Waiting for loadstart..."),e.one("loadstart",(function(){e.ads.debug("Received loadstart event"),t()})))},i.noPreroll=function(){var t=this;this.afterLoadStart((function(){t.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),t.resumeAfterNoPreroll(t.player)}))},i.readyForPreroll=function(){var t=this.player;this.afterLoadStart((function(){t.ads.debug("Triggered readyforpreroll event (Preroll)"),t.trigger("readyforpreroll")}))},i.onAdsCanceled=function(t){var e=this;t.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){e.resumeAfterNoPreroll(t)}))},i.onAdsError=function(t){var e=this;r.a.log("adserror (Preroll)"),t.ads.error({errorType:_.AdsPrerollError}),this.inAdBreak()?t.ads.endLinearAdMode():this.afterLoadStart((function(){e.resumeAfterNoPreroll(t)}))},i.startLinearAdMode=function(){var t=this.player;!this.adsReady||t.ads.inAdBreak()||this.isContentResuming()?r.a.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(t),t.ads.adType="preroll",this.waitingForAdBreak=!1,Y.start(t),t.ads._shouldBlockPlay=!1)},i.onAdStarted=function(t){t.removeClass("vjs-ad-loading")},i.endLinearAdMode=function(){var t=this.player;this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),t.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,Y.end(t))},i.skipLinearAdMode=function(){var t=this,e=this.player;e.ads.inAdBreak()||this.isContentResuming()?r.a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){e.trigger("adskip"),e.ads.debug("skipLinearAdMode (Preroll)"),t.resumeAfterNoPreroll(e)}))},i.onAdTimeout=function(t){var e=this;this.afterLoadStart((function(){t.ads.debug("adtimeout (Preroll)"),e.resumeAfterNoPreroll(t)}))},i.onNoPreroll=function(t){t.ads.inAdBreak()||this.isContentResuming()?r.a.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},i.resumeAfterNoPreroll=function(t){if(this.contentResuming=!0,t.ads._shouldBlockPlay=!1,this.cleanupPartial(t),t.ads._playRequested||t.ads._pausedOnContentupdate)if(t.paused()){t.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var e=t.play();e&&e.then&&e.then(null,(function(t){}))}else t.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),t.trigger("play"),t.trigger("playing")},i.cleanup=function(t){t.ads._hasThereBeenALoadStartDuringPlayerLife||r.a.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(t)},i.cleanupPartial=function(t){t.removeClass("vjs-ad-loading"),t.removeClass("vjs-ad-content-resuming"),this.clearTimeout(t)},i.clearTimeout=function(t){t.clearTimeout(this._timeout),this._timeout=null},e}(j.getState("AdState"));j.registerState("Preroll",N);var U=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"BeforePreroll"};var i=e.prototype;return i.init=function(t){this.adsReady=!1,this.shouldResumeToContent=!1,t.ads._shouldBlockPlay=!t.ads.settings.allowVjsAutoplay||!t.auto
vendor: 4,100 bytes, line 22
22play()},i.onAdsReady=function(t){t.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},i.onPlay=function(t){var e=j.getState("Preroll");t.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(e,this.adsReady,this.shouldResumeToContent)},i.onAdsCanceled=function(t){t.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},i.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.player.ads.error({errorType:_.AdsBeforePrerollError}),this.shouldResumeToContent=!0},i.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},i.skipLinearAdMode=function(){var t=this.player;t.trigger("adskip"),t.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},i.onContentChanged=function(){this.init(this.player)},e}(j.getState("ContentState"));j.registerState("BeforePreroll",U);var W=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"Midroll"};var i=e.prototype;return i.init=function(t){t.ads.adType="midroll",Y.start(t),t.addClass("vjs-ad-loading")},i.onAdStarted=function(t){t.removeClass("vjs-ad-loading")},i.endLinearAdMode=function(){var t=this.player;this.inAdBreak()&&(this.contentResuming=!0,t.addClass("vjs-ad-content-resuming"),t.removeClass("vjs-ad-loading"),Y.end(t))},i.onAdsError=function(t){t.ads.error({errorType:_.AdsMidrollError}),this.inAdBreak()&&t.ads.endLinearAdMode()},i.cleanup=function(t){t.removeClass("vjs-ad-loading"),t.removeClass("vjs-ad-content-resuming")},e}(j.getState("AdState"));j.registerState("Midroll",W);var H=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"Postroll"};var i=e.prototype;return i.init=function(t){if(this.waitingForAdBreak=!0,t.ads._contentEnding=!0,t.ads.nopostroll_){this.resumeContent(t);var e=j.getState("AdsDone");this.transitionTo(e)}else{t.addClass("vjs-ad-loading");var i=t.ads.settings.timeout;"number"==typeof t.ads.settings.postrollTimeout&&(i=t.ads.settings.postrollTimeout),this._postrollTimeout=t.setTimeout((function(){t.trigger("adtimeout")}),i)}},i.startLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?r.a.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(t.ads.adType="postroll",t.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,Y.start(t))},i.onAdStarted=function(t){t.removeClass("vjs-ad-loading")},i.endLinearAdMode=function(){var t=this,e=this.player,i=j.getState("AdsDone");this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),this.resumeContent(e),Y.end(e,(function(){t.transitionTo(i)})))},i.skipLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?r.a.log.warn("Unexpected skipLinearAdMode invocation"):(t.ads.debug("Postroll abort (skipLinearAdMode)"),t.trigger("adskip"),this.abort(t))},i.onAdTimeout=function(t){t.ads.debug("Postroll abort (adtimeout)"),this.abort(t)},i.onAdsError=function(t){t.ads.debug("Postroll abort (adserror)"),t.ads.error({errorType:_.AdsPostrollError}),t.ads.inAdBreak()?t.ads.endLinearAdMode():this.abort(t)},i.onContentChanged=function(t){if(this.isContentResuming()){var e=j.getState("BeforePreroll");this.transitionTo(e)}else if(!this.inAdBreak()){var i=j.getState("Preroll");this.transitionTo(i)}},i.onNoPostroll=function(t){this.isContentResuming()||this.inAdBreak()?r.a.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(t)},i.resumeContent=function(t){this.contentResuming=!0,t.addClass("vjs-ad-content-resuming")},i.abort=function(t){var e=j.getState("AdsDone");this.resumeContent(t),t.removeClass("vjs-ad-loading"),this.transitionTo(e)},i.cleanup=function(t){t.removeClass("vjs-ad-content-resuming"),t.clearTimeout(this._postrollTimeout),t.ads._contentEnding=!1},e}(j.getState("AdState"));j.registerState("Postroll",H);var V=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"ContentPlayback"};var i=e.prototype;return i.init=function(t){t.ads._shouldBlockPlay=!1}
vendor: 16,096 bytes, line 22
22,i.onAdsReady=function(t){t.ads.debug("Received adsready event (ContentPlayback)"),t.ads.nopreroll_||(t.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),t.trigger("readyforpreroll"))},i.onReadyForPostroll=function(t){var e=j.getState("Postroll");t.ads.debug("Received readyforpostroll event"),this.transitionTo(e)},i.startLinearAdMode=function(){var t=j.getState("Midroll");this.transitionTo(t)},e}(j.getState("ContentState"));j.registerState("ContentPlayback",V);var z=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"StitchedContentPlayback"};var i=e.prototype;return i.init=function(){this.player.ads._shouldBlockPlay=!1},i.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},i.startLinearAdMode=function(){var t=j.getState("StitchedAdRoll");this.transitionTo(t)},e}(j.getState("ContentState"));j.registerState("StitchedContentPlayback",z);var G=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"StitchedAdRoll"};var i=e.prototype;return i.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",Y.start(this.player)},i.onPlaying=function(){},i.onContentResumed=function(){},i.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},i.endLinearAdMode=function(){var t=j.getState("StitchedContentPlayback");Y.end(this.player),this.transitionTo(t)},e}(j.getState("AdState"));j.registerState("StitchedAdRoll",G);var X=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"OutstreamPending"};var i=e.prototype;return i.init=function(t){this.adsReady=!1},i.onPlay=function(t){var e=j.getState("OutstreamPlayback");t.ads.debug("Received play event (OutstreamPending)"),this.transitionTo(e,this.adsReady)},i.onAdsReady=function(t){t.ads.debug("Received adsready event (OutstreamPending)"),this.adsReady=!0},i.onAdsError=function(){this.player.ads.debug("adserror (OutstreamPending)"),this.adsReady=!1},e}(j.getState("AdState"));j.registerState("OutstreamPending",X);var q=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"OutstreamPlayback"};var i=e.prototype;return i.init=function(t,e){t.addClass("vjs-ad-loading"),e?this.handleAdsReady():this.abort(t)},i.onAdsReady=function(t){t.ads.inAdBreak()?r.a.log.warn("Unexpected adsready event (Preroll)"):(t.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},i.abort=function(t){var e=j.getState("OutstreamDone");t.removeClass("vjs-ad-loading"),this.transitionTo(e)},i.onAdStarted=function(t){t.removeClass("vjs-ad-loading")},i.handleAdsReady=function(){this.adsReady=!0,this.readyForOutstreamPlayback()},i.readyForOutstreamPlayback=function(){var t=this.player;this.afterLoadStart((function(){t.trigger("readyforoutstream")}))},i.startLinearAdMode=function(){var t=this.player;this.adsReady&&!t.ads.inAdBreak()&&Y.start(t)},i.cleanup=function(t){t.ads._hasThereBeenALoadStartDuringPlayerLife||r.a.log.warn("Leaving OutstreamPlayback state before loadstart event can cause issues."),this.cleanupPartial(t)},i.cleanupPartial=function(t){t.removeClass("vjs-ad-loading"),t.removeClass("vjs-ad-content-resuming"),this.clearTimeout(t)},i.clearTimeout=function(t){t.clearTimeout(this._timeout),this._timeout=null},i.onAdStarted=function(t){t.removeClass("vjs-ad-loading")},i.onAdsError=function(t){var e=this;r.a.log("adserror (OutstreamPlayback)"),this.inAdBreak()?t.ads.endLinearAdMode():this.afterLoadStart((function(){e.abort(t)}))},i.onAdTimeout=function(t){var e=this;this.afterLoadStart((function(){t.ads.debug("adtimeout (OutstreamPlayback)"),e.abort(t)}))},i.onAdsCanceled=function(t){var e=this;t.ads.debug("adscanceled (OutstreamPlaybac)"),this.afterLoadStart((function(){e.abort(t)}))},i.endLinearAdMode=function(){var t=this;if(this.inAdBreak()){this.player.removeClass("vjs-ad-loading");var e=j.getState("OutstreamDone");Y.end(this.player,(function(){t.transitionTo(e)}))}},i.afterLoadStart=function(t){var e=this.player;e.ads._hasThereBeenALoadStartDuringPlayerLife?t():(e.ads.debug("Waiting for loadstart..."),e.one("loadstart",(function(){e.ads.debug("Received loadstart event"),t()})))},i.skipLinearAdMode=function(){var t=this,e=this.player,i=j.getState("OutstreamDone");this.inAdBreak()?r.a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){e.trigger("adskip"),e.ads.debug("skipLinearAdMode (OutstreamPlayback)"),t.transitionTo(i)}))},e}(j.getState("AdState"));j.registerState("OutstreamPlayback",q);var Z=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e._getName=function(){return"OutstreamDone"};var i=e.prototype;return i.init=function(t){t.trigger("ended")},i.startLinearAdMode=function(){r.a.log.warn("Unexpected startLinearAdMode invocation (OutstreamDone)")},e}(j.getState("AdState"));j.registerState("OutstreamDone",Z);var $=O.isMiddlewareMediatorSupported,K=r.a.getTech("Html5").Events,J={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:r.a.options.normalizeAutoplay||!1},Q=function(t){var e=this,i=r.a.obj.merge(J,t),n=[];K.concat(["firstplay","loadedalldata"]).forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),e.on(n,u),$()||function(t,e){e&&r.a.log("Using cancelContentPlay to block content playback"),t.on("play",k)}(e,i.debug),e.setTimeout((function(){e.ads._hasThereBeenALoadStartDuringPlayerLife||""===e.src()||r.a.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")}),5e3),e.on("ended",(function(){e.hasClass("vjs-has-started")||e.addClass("vjs-has-started")})),e.on("contenttimeupdate",(function(){e.removeClass("vjs-waiting")})),e.on(["addurationchange","adcanplay"],(function(){if(!e.ads.settings.stitchedAds&&!e.hasStarted()&&(!e.ads.snapshot||e.currentSrc()!==e.ads.snapshot.currentSrc)&&e.ads.inAdBreak()){var t=e.play();t&&t.catch&&t.catch((function(t){r.a.log.warn("Play promise rejected when playing ad",t)}))}})),e.on("nopreroll",(function(){e.ads.debug("Received nopreroll event"),e.ads.nopreroll_=!0})),e.on("nopostroll",(function(){e.ads.debug("Received nopostroll event"),e.ads.nopostroll_=!0})),e.on("playing",(function(){e.ads._cancelledPlay=!1,e.ads._pausedOnContentupdate=!1})),e.on("play",(function(){e.ads._playRequested=!0})),e.one("loadstart",(function(){e.ads._hasThereBeenALoadStartDuringPlayerLife=!0})),e.on("loadeddata",(function(){e.ads._hasThereBeenALoadedData=!0})),e.on("loadedmetadata",(function(){e.ads._hasThereBeenALoadedMetaData=!0})),e.ads=function(t){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,_error:null,adType:null,VERSION:"7.5.2",reset:function(){t.ads.disableNextSnapshotRestore=!1,t.ads._contentEnding=!1,t.ads._contentHasEnded=!1,t.ads.snapshot=null,t.ads.adType=null,t.ads._hasThereBeenALoadedData=!1,t.ads._hasThereBeenALoadedMetaData=!1,t.ads._cancelledPlay=!1,t.ads._shouldBlockPlay=!1,t.ads._playBlocked=!1,t.ads.nopreroll_=!1,t.ads.nopostroll_=!1,t.ads._playRequested=!1,t.ads._error=null},startLinearAdMode:function(){t.ads._state.startLinearAdMode()},endLinearAdMode:function(){t.ads._state.endLinearAdMode()},skipLinearAdMode:function(){t.ads._state.skipLinearAdMode()},stitchedAds:function(t){return void 0!==t&&(r.a.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!t),this.settings.stitchedAds},videoElementRecycled:function(){if(t.ads.shouldPlayContentBehindAd(t))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var e=t.tech_.src()!==this.snapshot.src,i=t.currentSrc()!==this.snapshot.currentSrc;return e||i},isLive:function(e){return void 0===e&&(e=t),"boolean"==typeof e.ads.settings.contentIsLive?e.ads.settings.contentIsLive:e.duration()===1/0||"8"===r.a.browser.IOS_VERSION&&0===e.duration()},shouldPlayContentBehindAd:function(e){if(void 0===e&&(e=t),e)return!!e.ads.settings.liveCuePoints&&(!r.a.browser.IS_IOS&&!r.a.browser.IS_ANDROID&&e.duration()===1/0);throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(e){return void 0===e&&(e=t),!this.shouldPlayContentBehindAd(e)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var e=t.$(".vjs-tech");e&&e.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];1===e.length&&"string"==typeof e[0]?r.a.log("ADS: "+e[0]):r.a.log.apply(r.a,["ADS:"].concat(e))}},error:function(e){if(void 0===e)return this._error||null;null!==e&&e.errorType?(this._error=e,r.a.log.error("An error with Ads occured. Type: "+e.errorType+"."),t.trigger({type:"vjsadserror",error:this._error})):this._error=null}}}(e),e.ads.settings=i,i.stitchedAds=!!i.stitchedAds,"outstream"===i.playerMode?(e.src(M),e.ads._state=new(j.getState("OutstreamPending"))(e)):i.stitchedAds?e.ads._state=new(j.getState("StitchedContentPlayback"))(e):e.ads._state=new(j.getState("BeforePreroll"))(e),e.ads._state.init(e),e.ads.cueTextTracks=S,e.ads.adMacroReplacement=w.bind(e),function(t){t.ads.contentSrc=t.currentSrc(),t.ads._seenInitialLoadstart=!1,t.on("loadstart",(function(){if(!t.ads.inAdBreak()){var e=t.currentSrc();e!==t.ads.contentSrc&&(t.ads._seenInitialLoadstart&&t.trigger({type:"contentchanged"}),t.trigger({type:"contentupdate",oldValue:t.ads.contentSrc,newValue:e}),t.ads.contentSrc=e),t.ads._seenInitialLoadstart=!0}}))}(e),e.on("contentchanged",e.ads.reset);var s=function(){var t=e.textTracks();if(!e.ads.shouldPlayContentBehindAd(e)&&e.ads.inAdBreak()&&e.tech_.featuresNativeTextTracks&&r.a.browser.IS_IOS&&!Array.isArray(e.textTracks()))for(var i=0;i<t.length;i++){var n=t[i];"showing"===n.mode&&(n.mode="disabled")}};e.ready((function(){e.textTracks().addEventListener("change",s)})),e.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","ads-ad-skipped","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],(function(t){e.ads._state.handleEvent(t.type)})),e.on("dispose",(function(){e.ads.reset(),e.textTracks().removeEventListener("change",s)})),m(),y((function(){})),e.ads.listenToTcf=m,e.ads.updateUsPrivacyString=function(t){return y(t)}};Q.Error=_,Q.VERSION="7.5.2",function(t){!function(){if(r.a.getPlugin)return Boolean(r.a.getPlugin("ads"));var t=r.a.getComponent("Player");return Boolean(t&&t.prototype.ads)}(r.a)&&((r.a.registerPlugin||r.a.plugin)("ads",t),E()&&!r.a.usingContribAdsMiddleware_&&(r.a.use("*",D),r.a.usingContribAdsMiddleware_=!0,r.a.log.debug("Play middleware has been registered with videojs")))}(Q)},,function(t,e,i){"use strict";var n=i(2),r=i.n(n);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e,i){return Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return s(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(t,e):void 0}}(t))||e){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}function h(t){return(h="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})(t)}var c=function(t,e,i){this.vjsPlayer=t,this.controller=i,this.contentTrackingTimer=null,this.contentComplete=!1,this.updateTimeIntervalHandle=null,this.updateTimeInterval=1e3,this.seekCheckIntervalHandle=null,this.seekCheckInterval=1e3,this.resizeCheckIntervalHandle=null,this.resizeCheckInterval=250,this.seekThreshold=100,this.contentEndedListeners=[],this.contentSource="",this.contentSourceType="",this.contentPlayheadTracker={currentTime:0,previousTime:0,seeking:!1,duration:0},this.vjsPlayerDimensions={width:this.getPlayerWidth(),height:this.getPlayerHeight()},this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this)),this.boundContentEndedListener=this.localContentEndedListener.bind(this),this.vjsPlayer.on("readyforpostroll",this.boundContentEndedListener),this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("readyforpreroll",this.onReadyForPreroll.bind(this)),this.vjsPlayer.on("adtimeout",this.onAdTimeout.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),"onPlay"===this.controller.getSettings().requestMode&&this.vjsPlayer.one("play",this.controller.requestAds.bind(this.controller)),this.vjsPlayer.ads||window.console.warn("You may be using a version of videojs-contrib-ads that is not compatible with your version of video.js."),this.vjsPlayer.ads(e)};c.prototype.setUpPlayerIntervals=function(){this.updateTimeIntervalHandle&&clearInterval(this.updateTimeIntervalHandle),this.seekCheckIntervalHandle&&clearInterval(this.seekCheckIntervalHandle),this.resizeCheckIntervalHandle&&clearInterval(this.resizeCheckIntervalHandle),this.updateTimeIntervalHandle=setInterval(this.updateCurrentTime.bind(this),this.updateTimeInterval),this.seekCheckIntervalHandle=setInterval(this.checkForSeeking.bind(this),this.seekCheckInterval),this.resizeCheckIntervalHandle=setInterval(this.checkForResize.bind(this),this.resizeCheckInterval)},c.prototype.updateCurrentTime=function(){this.contentPlayheadTracker.seeking||(this.contentPlayheadTracker.currentTime=this.vjsPlayer.currentTime())},c.prototype.checkForSeeking=function(){var t=1e3*(this.vjsPlayer.currentTime()-this.contentPlayheadTracker.previousTime);Math.abs(t)>this.seekCheckInterval+this.seekThreshold?this.contentPlayheadTracker.seeking=!0:this.contentPlayheadTracker.seeking=!1,this.contentPlayheadTracker.previousTime=this.vjsPlayer.currentTime()},c.prototype.checkForResize=function(){var t=this.getPlayerWidth(),e=this.getPlayerHeight();t==this.vjsPlayerDimensions.width&&e==this.vjsPlayerDimensions.height||(this.vjsPlayerDimensions.width=t,this.vjsPlayerDimensions.height=e,this.controller.onPlayerResize(t,e))},c.prototype.localContentEndedListener=function(){for(var t in this.contentComplete||(this.contentComplete=!0,this.controller.onContentComplete()),this.contentEndedListeners)"function"==typeof this.contentEndedListeners[t]&&this.contentEndedListeners[t]();
vendor: 31,948 bytes, line 22
22this.vjsPlayer.el()&&this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this))},c.prototype.onNoPostroll=function(){this.vjsPlayer.trigger("nopostroll")},c.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.controller.onPlayerDisposed(),this.contentComplete=!0,this.vjsPlayer.off("readyforpostroll",this.boundContentEndedListener),this.vjsPlayer.ads.adTimeoutTimeout&&clearTimeout(this.vjsPlayer.ads.adTimeoutTimeout);var t=[this.updateTimeIntervalHandle,this.seekCheckIntervalHandle,this.resizeCheckIntervalHandle];for(var e in t)t[e]&&clearInterval(t[e])},c.prototype.onReadyForPreroll=function(){this.controller.onPlayerReadyForPreroll()},c.prototype.onAdTimeout=function(){this.controller.onAdTimeout()},c.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.h5Player.hasAttribute("autoplay")&&this.controller.setSetting("adWillAutoPlay",!0),this.onVolumeChange(),this.vjsPlayer.on("fullscreenchange",this.onFullscreenChange.bind(this)),this.vjsPlayer.on("volumechange",this.onVolumeChange.bind(this)),this.controller.onPlayerReady()},c.prototype.onFullscreenChange=function(){this.vjsPlayer.isFullscreen()?this.controller.onPlayerEnterFullscreen():this.controller.onPlayerExitFullscreen()},c.prototype.onVolumeChange=function(){var t=this.vjsPlayer.muted()?0:this.vjsPlayer.volume();this.controller.onPlayerVolumeChanged(t)},c.prototype.injectAdContainerDiv=function(t){this.vjsControls.el().parentNode.appendChild(t)},c.prototype.getContentPlayer=function(){return this.h5Player},c.prototype.getVolume=function(){return this.vjsPlayer.muted()?0:this.vjsPlayer.volume()},c.prototype.setVolume=function(t){this.vjsPlayer.volume(t),0==t?this.vjsPlayer.muted(!0):this.vjsPlayer.muted(!1)},c.prototype.unmute=function(){this.vjsPlayer.muted(!1)},c.prototype.mute=function(){this.vjsPlayer.muted(!0)},c.prototype.play=function(){this.vjsPlayer.play()},c.prototype.togglePlayback=function(){this.vjsPlayer.paused()?this.vjsPlayer.play():this.vjsPlayer.pause()},c.prototype.getPlayerWidth=function(){var t=(getComputedStyle(this.vjsPlayer.el())||{}).width;return t&&0!==parseFloat(t)||(t=(this.vjsPlayer.el().getBoundingClientRect()||{}).width),parseFloat(t)||this.vjsPlayer.width()},c.prototype.getPlayerHeight=function(){var t=(getComputedStyle(this.vjsPlayer.el())||{}).height;return t&&0!==parseFloat(t)||(t=(this.vjsPlayer.el().getBoundingClientRect()||{}).height),parseFloat(t)||this.vjsPlayer.height()},c.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},c.prototype.getPlayerId=function(){return this.vjsPlayer.id()},c.prototype.toggleFullscreen=function(){this.vjsPlayer.isFullscreen()?this.vjsPlayer.exitFullscreen():this.vjsPlayer.requestFullscreen()},c.prototype.getContentPlayheadTracker=function(){return this.contentPlayheadTracker},c.prototype.onAdError=function(t){this.vjsControls.show();var e=void 0!==t.getError?t.getError():t.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:e,AdErrorEvent:t}})},c.prototype.onAdLog=function(t){var e=t.getAdData(),i=void 0!==e.adError?e.adError.getMessage():void 0;this.vjsPlayer.trigger({type:"adslog",data:{AdError:i,AdEvent:t}})},c.prototype.onAdBreakStart=function(){this.contentSource=this.vjsPlayer.currentSrc(),this.contentSourceType=this.vjsPlayer.currentType(),this.vjsPlayer.off("readyforpostroll",this.boundContentEndedListener),this.vjsPlayer.ads.startLinearAdMode(),this.vjsControls.hide(),this.vjsPlayer.pause()},c.prototype.onAdBreakEnd=function(){this.vjsPlayer.on("readyforpostroll",this.boundContentEndedListener),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.vjsControls.show()},c.prototype.onAdStart=function(){this.vjsPlayer.trigger("ads-ad-started")},c.prototype.onAllAdsCompleted=function(){1==this.contentComplete&&(this.contentSource&&this.vjsPlayer.currentSrc()!=this.contentSource&&this.vjsPlayer.src({src:this.contentSource,type:this.contentSourceType}),this.controller.onContentAndAdsCompleted())},c.prototype.onAdsReady=function(){this.vjsPlayer.trigger("adsready")},c.prototype.changeSource=function(t){this.vjsPlayer.currentSrc()&&(this.vjsPlayer.currentTime(0),this.vjsPlayer.pause()),t&&this.vjsPlayer.src(t),this.vjsPlayer.one("loadedmetadata",this.seekContentToZero.bind(this))},c.prototype.seekContentToZero=function(){this.vjsPlayer.currentTime(0)},c.prototype.triggerPlayerEvent=function(t,e){this.vjsPlayer.trigger(t,e)},c.prototype.addContentEndedListener=function(t){this.contentEndedListeners.push(t)},c.prototype.reset=function(){this.vjsPlayer.off("readyforpostroll",this.boundContentEndedListener),this.vjsPlayer.on("readyforpostroll",this.boundContentEndedListener),this.vjsControls.show(),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.contentPlayheadTracker.currentTime=0,this.contentComplete=!1};var u=function(t){this.controller=t,this.adContainerDiv=document.createElement("div"),this.controlsDiv=document.createElement("div"),this.countdownDiv=document.createElement("div"),this.seekBarDiv=document.createElement("div"),this.progressDiv=document.createElement("div"),this.playPauseDiv=document.createElement("div"),this.muteDiv=document.createElement("div"),this.sliderDiv=document.createElement("div"),this.sliderLevelDiv=document.createElement("div"),this.fullscreenDiv=document.createElement("div"),this.boundOnMouseUp=this.onMouseUp.bind(this),this.boundOnMouseMove=this.onMouseMove.bind(this),this.adPlayheadTracker={currentTime:0,duration:0,isPod:!1,adPosition:0,totalAds:0},this.controlPrefix=this.controller.getPlayerId()+"_",this.showCountdown=!0,!1===this.controller.getSettings().showCountdown&&(this.showCountdown=!1),this.isAdNonlinear=!1,this.createAdContainer()};u.prototype.createAdContainer=function(){this.assignControlAttributes(this.adContainerDiv,"ima-ad-container"),this.adContainerDiv.classList.add("hide-ad-container"),this.adContainerDiv.addEventListener("mouseenter",this.showAdControls.bind(this),!1),this.adContainerDiv.addEventListener("mouseleave",this.hideAdControls.bind(this),!1),this.adContainerDiv.addEventListener("click",this.onAdContainerClick.bind(this),!1),this.createControls(),this.controller.injectAdContainerDiv(this.adContainerDiv)},u.prototype.createControls=function(){this.assignControlAttributes(this.controlsDiv,"ima-controls-div"),this.controlsDiv.style.width="100%",this.controller.getIsMobile()?this.countdownDiv.style.display="none":(this.assignControlAttributes(this.countdownDiv,"ima-countdown-div"),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel,this.countdownDiv.style.display=this.showCountdown?"block":"none"),this.assignControlAttributes(this.seekBarDiv,"ima-seek-bar-div"),this.seekBarDiv.style.width="100%",this.assignControlAttributes(this.progressDiv,"ima-progress-div"),this.assignControlAttributes(this.playPauseDiv,"ima-play-pause-div"),this.addClass(this.playPauseDiv,"ima-playing"),this.playPauseDiv.addEventListener("click",this.onAdPlayPauseClick.bind(this),!1),this.assignControlAttributes(this.muteDiv,"ima-mute-div"),this.addClass(this.muteDiv,"ima-non-muted"),this.muteDiv.addEventListener("click",this.onAdMuteClick.bind(this),!1),this.assignControlAttributes(this.sliderDiv,"ima-slider-div"),this.sliderDiv.addEventListener("mousedown",this.onAdVolumeSliderMouseDown.bind(this),!1),this.controller.getIsIos()&&(this.sliderDiv.style.display="none"),this.assignControlAttributes(this.sliderLevelDiv,"ima-slider-level-div"),this.assignControlAttributes(this.fullscreenDiv,"ima-fullscreen-div"),this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.fullscreenDiv.addEventListener("click",this.onAdFullscreenClick.bind(this),!1),this.adContainerDiv.appendChild(this.controlsDiv),this.controlsDiv.appendChild(this.countdownDiv),this.controlsDiv.appendChild(this.seekBarDiv),this.controlsDiv.appendChild(this.playPauseDiv),this.controlsDiv.appendChild(this.muteDiv),this.controlsDiv.appendChild(this.sliderDiv),this.controlsDiv.appendChild(this.fullscreenDiv),this.seekBarDiv.appendChild(this.progressDiv),this.sliderDiv.appendChild(this.sliderLevelDiv)},u.prototype.onAdPlayPauseClick=function(){this.controller.onAdPlayPauseClick()},u.prototype.onAdMuteClick=function(){this.controller.onAdMuteClick()},u.prototype.onAdFullscreenClick=function(){this.controller.toggleFullscreen()},u.prototype.onAdsPaused=function(){this.controller.sdkImpl.adPlaying=!1,this.addClass(this.playPauseDiv,"ima-paused"),this.removeClass(this.playPauseDiv,"ima-playing"),this.showAdControls()},u.prototype.onAdsResumed=function(){this.onAdsPlaying(),this.showAdControls()},u.prototype.onAdsPlaying=function(){this.controller.sdkImpl.adPlaying=!0,this.addClass(this.playPauseDiv,"ima-playing"),this.removeClass(this.playPauseDiv,"ima-paused")},u.prototype.updateAdUi=function(t,e,i,n,r){var s=Math.floor(e/60),o=Math.floor(e%60);o.toString().length<2&&(o="0"+o);var a=": ";r>1&&(a=" ("+n+" "+this.controller.getSettings().adLabelNofN+" "+r+"): "),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel+a+s+":"+o;var l=100*(t/i);this.progressDiv.style.width=l+"%"},u.prototype.unmute=function(){this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*this.controller.getPlayerVolume()+"%"},u.prototype.mute=function(){this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"},u.prototype.onAdVolumeSliderMouseDown=function(){document.addEventListener("mouseup",this.boundOnMouseUp,!1),document.addEventListener("mousemove",this.boundOnMouseMove,!1)},u.prototype.onMouseMove=function(t){this.changeVolume(t)},u.prototype.onMouseUp=function(t){this.changeVolume(t),document.removeEventListener("mouseup",this.boundOnMouseUp),document.removeEventListener("mousemove",this.boundOnMouseMove)},u.prototype.changeVolume=function(t){var e=(t.clientX-this.sliderDiv.getBoundingClientRect().left)/this.sliderDiv.offsetWidth;e*=100,e=Math.min(Math.max(e,0),100),this.sliderLevelDiv.style.width=e+"%",0==this.percent?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted")):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted")),this.controller.setVolume(e/100)},u.prototype.showAdContainer=function(){this.adContainerDiv.classList.remove("hide-ad-container")},u.prototype.hideAdContainer=function(){this.adContainerDiv.classList.add("hide-ad-container")},u.prototype.onAdContainerClick=function(){this.isAdNonlinear&&this.controller.togglePlayback()},u.prototype.reset=function(){this.hideAdContainer()},u.prototype.onAdError=function(){this.hideAdContainer()},u.prototype.onAdBreakStart=function(t){this.showAdContainer(),"application/javascript"!==t.getAd().getContentType()||this.controller.getSettings().showControlsForJSAds?this.controlsDiv.style.display="block":this.controlsDiv.style.display="none",this.onAdsPlaying(),this.hideAdControls()},u.prototype.onAdBreakEnd=function(){var t=this.controller.getCurrentAd();(null==t||t.isLinear())&&this.hideAdContainer(),this.controlsDiv.style.display="none",this.countdownDiv.innerHTML=""},u.prototype.onAllAdsCompleted=function(){this.hideAdContainer()},u.prototype.onLinearAdStart=function(){this.removeClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!1},u.prototype.onNonLinearAdLoad=function(){this.addClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!0},u.prototype.onPlayerEnterFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-non-fullscreen")},u.prototype.onPlayerExitFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-fullscreen")},u.prototype.onPlayerVolumeChanged=function(t){0==t?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*t+"%")},u.prototype.showAdControls=function(){this.controller.getSettings().disableAdControls||this.addClass(this.controlsDiv,"ima-controls-div-showing")},u.prototype.hideAdControls=function(){this.removeClass(this.controlsDiv,"ima-controls-div-showing")},u.prototype.assignControlAttributes=function(t,e){t.id=this.controlPrefix+e,t.className=this.controlPrefix+e+" "+e},u.prototype.getClassRegexp=function(t){return new RegExp("(^|[^A-Za-z-])"+t+"((?![A-Za-z-])|$)","gi")},u.prototype.elementHasClass=function(t,e){return this.getClassRegexp(e).test(t.className)},u.prototype.addClass=function(t,e){t.className=t.className.trim()+" "+e},u.prototype.removeClass=function(t,e){var i=this.getClassRegexp(e);t.className=t.className.trim().replace(i,"")},u.prototype.getAdContainerDiv=function(){return this.adContainerDiv},u.prototype.setShowCountdown=function(t){this.showCountdown=t,this.countdownDiv.style.display=this.showCountdown?"block":"none"};var d="2.5.0",f=function(t){this.controller=t,this.adDisplayContainer=null,this.adDisplayContainerInitialized=!1,this.adsLoader=null,this.adsManager=null,this.adsRenderingSettings=null,this.adsResponse=null,this.currentAd=null,this.adTrackingTimer=null,this.allAdsCompleted=!1,this.adsActive=!1,this.adPlaying=!1,this.adMuted=!1,this.adBreakReadyListener=void 0,this.contentCompleteCalled=!1,this.isAdTimedOut=!1,this.adsManagerDimensions={width:0,height:0},this.autoPlayAdBreaks=!0,!1===this.controller.getSettings().autoPlayAdBreaks&&(this.autoPlayAdBreaks=!1),this.controller.getSettings().locale&&google.ima.settings.setLocale(this.controller.getSettings().locale),this.controller.getSettings().disableFlashAds&&google.ima.settings.setDisableFlashAds(this.controller.getSettings().disableFlashAds),this.controller.getSettings().disableCustomPlaybackForIOS10Plus&&google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.controller.getSettings().disableCustomPlaybackForIOS10Plus),this.controller.getSettings().ppid&&google.ima.settings.setPpid(this.controller.getSettings().ppid),this.controller.getSettings().featureFlags&&google.ima.settings.setFeatureFlags(this.controller.getSettings().featureFlags)};f.prototype.initAdObjects=function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.controller.getAdContainerDiv(),this.controller.getContentPlayer()),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),0==this.controller.getSettings().vpaidAllowed&&this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED),void 0!==this.controller.getSettings().vpaidMode&&this.adsLoader.getSettings().setVpaidMode(this.controller.getSettings().vpaidMode),this.controller.getSettings().locale&&this.adsLoader.getSettings().setLocale(this.controller.getSettings().locale),this.controller.getSettings().numRedirects&&this.adsLoader.getSettings().setNumRedirects(this.controller.getSettings().numRedirects),this.controller.getSettings().sessionId&&this.adsLoader.getSettings().setSessionId(this.controller.getSettings().sessionId),this.adsLoader.getSettings().setPlayerType("videojs-ima"),this.adsLoader.getSettings().setPlayerVersion(d),this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded.bind(this),!1),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsLoaderError.bind(this),!1),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-loader",adsLoader:this.adsLoader})},f.prototype.requestAds=function(){var t=new google.ima.AdsRequest;if(this.controller.getSettings().adTagUrl?t.adTagUrl=this.controller.getSettings().adTagUrl:t.adsResponse=this.controller.getSettings().adsResponse,this.controller.getSettings().forceNonLinearFullSlot&&(t.forceNonLinearFullSlot=!0),this.controller.getSettings().vastLoadTimeout&&(t.vastLoadTimeout=this.controller.getSettings().vastLoadTimeout),this.controller.getSettings().omidMode&&window.console.warn("The additional setting `omidMode` has been removed. Use `omidVendorAccess` instead."),this.controller.getSettings().omidVendorAccess){t.omidAccessModeRules={};var e=this.controller.getSettings().omidVendorAccess;Object.keys(e).forEach((function(i){t.omidAccessModeRules[i]=e[i]}))}t.linearAdSlotWidth=this.controller.getPlayerWidth(),t.linearAdSlotHeight=this.controller.getPlayerHeight(),t.nonLinearAdSlotWidth=this.controller.getSettings().nonLinearWidth||this.controller.getPlayerWidth(),t.nonLinearAdSlotHeight=this.controller.getSettings().nonLinearHeight||this.controller.getPlayerHeight(),t.setAdWillAutoPlay(this.controller.adsWillAutoplay()),t.setAdWillPlayMuted(this.controller.adsWillPlayMuted());var i=this.controller.getSettings().adsRequest;i&&"object"===h(i)&&Object.keys(i).forEach((function(e){t[e]=i[e]})),this.adsLoader.requestAds(t),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-request",AdsRequest:t})},f.prototype.onAdsManagerLoaded=function(t){this.createAdsRenderingSettings(),this.adsManager=t.getAdsManager(this.controller.getContentPlayheadTracker(),this.adsRenderingSettings),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this.onAdBreakReady.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.onAllAdsCompleted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this.onAdLoaded.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this.onAdStarted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this.onAdLog.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this.onAdPaused.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this.onAdResumed.bind(this)),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-manager",adsManager:this.adsManager}),this.autoPlayAdBreaks||this.initAdsManager();var e=this.controller.getSettings().preventLateAdStart;e?e&&!this.isAdTimedOut&&this.controller.onAdsReady():this.controller.onAdsReady(),this.controller.getSettings().adsManagerLoadedCallback&&this.controller.getSettings().adsManagerLoadedCallback()},f.prototype.onAdsLoaderError=function(t){window.console.warn("AdsLoader error: "+t.getError()),this.controller.onErrorLoadingAds(t),this.adsManager&&this.adsManager.destroy()},f.prototype.initAdsManager=function(){try{var t=this.controller.getPlayerWidth(),e=this.controller.getPlayerHeight();this.adsManagerDimensions.width=t,this.adsManagerDimensions.height=e,this.adsManager.init(t,e),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.initializeAdDisplayContainer()}catch(t){this.onAdError(t)}},f.prototype.createAdsRenderingSettings=function(){if(this.adsRenderingSettings=new google.ima.AdsRenderingSettings,this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete=!0,this.controller.getSettings().adsRenderingSettings)for(var t in this.controller.getSettings().adsRenderingSettings)""!==t&&(this.adsRenderingSettings[t]=this.controller.getSettings().adsRenderingSettings[t])},f.prototype.onAdError=function(t){var e=void 0!==t.getError?t.getError():t.stack;window.console.warn("Ad error: "+e),this.adsManager.destroy(),this.controller.onAdError(t),this.adsActive=!1,this.adPlaying=!1},f.prototype.onAdBreakReady=function(t){this.adBreakReadyListener(t)},f.prototype.onContentPauseRequested=function(t){this.adsActive=!0,this.adPlaying=!0,this.controller.onAdBreakStart(t)},f.prototype.onContentResumeRequested=function(t){this.adsActive=!1,this.adPlaying=!1,this.controller.onAdBreakEnd()},f.prototype.onAllAdsCompleted=function(t){this.allAdsCompleted=!0,this.controller.onAllAdsCompleted()},f.prototype.onAdLoaded=function(t){t.getAd().isLinear()||(this.controller.onNonLinearAdLoad(),this.controller.playContent())},f.prototype.onAdStarted=function(t){this.currentAd=t.getAd(),this.currentAd.isLinear()?(this.adTrackingTimer=setInterval(this.onAdPlayheadTrackerInterval.bind(this),250),this.controller.onLinearAdStart()):this.controller.onNonLinearAdStart()},f.prototype.onAdPaused=function(){this.controller.onAdsPaused()},f.prototype.onAdResumed=function(t){this.controller.onAdsResumed()},f.prototype.onAdComplete=function(){this.currentAd.isLinear()&&clearInterval(this.adTrackingTimer)},f.prototype.onAdLog=function(t){this.controller.onAdLog(t)},f.prototype.onAdPlayheadTrackerInterval=function(){if(null!==this.adsManager){var t=this.adsManager.getRemainingTime(),e=this.currentAd.getDuration(),i=e-t;i=i>0?i:0;var n,r=0;this.currentAd.getAdPodInfo()&&(n=this.currentAd.getAdPodInfo().getAdPosition(),r=this.currentAd.getAdPodInfo().getTotalAds()),this.controller.onAdPlayheadUpdated(i,t,e,n,r)}},f.prototype.onContentComplete=function(){this.adsLoader&&(this.adsLoader.contentComplete(),this.contentCompleteCalled=!0),(this.adsManager&&this.adsManager.getCuePoints()&&!this.adsManager.getCuePoints().includes(-1)||!this.adsManager)&&this.controller.onNoPostroll(),this.allAdsCompleted&&this.controller.onContentAndAdsCompleted()},f.prototype.onPlayerDisposed=function(){this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null)},f.prototype.onPlayerReadyForPreroll=function(){if(this.autoPlayAdBreaks){this.initAdsManager();try{this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start()}catch(t){this.onAdError(t)}}},f.prototype.onAdTimeout=function(){this.isAdTimedOut=!0},f.prototype.onPlayerReady=function(){this.initAdObjects(),(this.controller.getSettings().adTagUrl||this.controller.getSettings().adsResponse)&&"onLoad"===this.controller.getSettings().requestMode&&this.requestAds()},f.prototype.onPlayerEnterFullscreen=function(){this.adsManager&&this.adsManager.resize(window.screen.width,window.screen.height)},f.prototype.onPlayerExitFullscreen=function(){this.adsManager&&this.adsManager.resize(this.controller.getPlayerWidth(),this.controller.getPlayerHeight())},f.prototype.onPlayerVolumeChanged=function(t){this.adsManager&&this.adsManager.setVolume(t),this.adMuted=0==t},f.prototype.onPlayerResize=function(t,e){this.adsManager&&(this.adsManagerDimensions.width=t,this.adsManagerDimensions.height=e,this.adsManager.resize(t,e))},f.prototype.getCurrentAd=function(){return this.currentAd},f.prototype.setAdBreakReadyListener=function(t){this.adBreakReadyListener=t},f.prototype.isAdPlaying=function(){return this.adPlaying},f.prototype.isAdMuted=function(){return this.adMuted},f.prototype.pauseAds=function(){this.adsManager.pause(),this.adPlaying=!1},f.prototype.resumeAds=function(){this.adsManager.resume(),this.adPlaying=!0},f.prototype.unmute=function(){this.adsManager.setVolume(1),this.adMuted=!1},f.prototype.mute=function(){this.adsManager.setVolume(0),this.adMuted=!0},f.prototype.setVolume=function(t){this.adsManager.setVolume(t),this.adMuted=0==t},f.prototype.initializeAdDisplayContainer=function(){this.adDisplayContainer&&(this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0))},f.prototype.playAdBreak=function(){this.autoPlayAdBreaks||(this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start())},f.prototype.addEventListener=function(t,e){this.adsManager&&this.adsManager.addEventListener(t,e)},f.prototype.getAdsManager=function(){return this.adsManager},f.prototype.reset=function(){this.adsActive=!1,this.adPlaying=!1,this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null),this.adsLoader&&!this.contentCompleteCalled&&this.adsLoader.contentComplete(),this.contentCompleteCalled=!1,this.allAdsCompleted=!1};var p=function(t,e){this.settings={},this.contentAndAdsEndedListeners=[],this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(e);var i={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},n=Object.assign({},i,e.contribAdsSettings||{});this.playerWrapper=new c(t,n,this),this.adUi=new u(this),this.sdkImpl=new f(this)};p.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,prerollTimeout:1e3,preventLateAdStart:!1,requestMode:"onLoad",showControlsForJSAds:!0,timeout:5e3},p.prototype.initWithSettings=function(t){this.settings=Object.assign({},p.IMA_DEFAULTS,t||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},p.prototype.warnAboutDeprecatedSettings=function(){var t=this;["adWillAutoplay","adsWillAutoplay","adWillPlayMuted","adsWillPlayMuted"].forEach((function(e){void 0!==t.settings[e]&&console.warn("WARNING: videojs.ima setting "+e+" is deprecated")}))},p.prototype.getSettings=function(){return this.settings},p.prototype.getIsMobile=function(){return this.isMobile},p.prototype.getIsIos=function(){return this.isIos},p.prototype.injectAdContainerDiv=function(t){this.playerWrapper.injectAdContainerDiv(t)},p.prototype.getAdContainerDiv=function(){return this.adUi.getAdContainerDiv()},p.prototype.getContentPlayer=function(){return this.playerWrapper.getContentPlayer()},p.prototype.getContentPlayheadTracker=function(){return this.playerWrapper.getContentPlayheadTracker()},p.prototype.requestAds=function(){this.sdkImpl.requestAds()},p.prototype.setSetting=function(t,e){this.settings[t]=e},p.prototype.onErrorLoadingAds=function(t){this.adUi.onAdError(),this.playerWrapper.onAdError(t)},p.prototype.onAdPlayPauseClick=function(){this.sdkImpl.isAdPlaying()?(this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()):(this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds())},p.prototype.onAdMuteClick=function(){this.sdkImpl.isAdMuted()?(this.playerWrapper.unmute(),this.adUi.unmute(),this.sdkImpl.unmute()):(this.playerWrapper.mute(),this.adUi.mute(),this.sdkImpl.mute())},p.prototype.setVolume=function(t){this.playerWrapper.setVolume(t),this.sdkImpl.setVolume(t)},p.prototype.getPlayerVolume=function(){return this.playerWrapper.getVolume()},p.prototype.toggleFullscreen=function(){this.playerWrapper.toggleFullscreen()},p.prototype.onAdError=function(t){this.adUi.onAdError(),this.playerWrapper.onAdError(t)},p.prototype.onAdBreakStart=function(t){this.playerWrapper.onAdBreakStart(),this.adUi.onAdBreakStart(t)},p.prototype.showAdContainer=function(){this.adUi.showAdContainer()},p.prototype.onAdBreakEnd=function(){this.playerWrapper.onAdBreakEnd(),this.adUi.onAdBreakEnd()},p.prototype.onAllAdsCompleted=function(){this.adUi.onAllAdsCompleted(),this.playerWrapper.onAllAdsCompleted()},p.prototype.onAdsPaused=function(){this.adUi.onAdsPaused()},p.prototype.onAdsResumed=function(){this.adUi.onAdsResumed()},p.prototype.onAdPlayheadUpdated=function(t,e,i,n,r){this.adUi.updateAdUi(t,e,i,n,r)},p.prototype.onAdLog=function(t){this.playerWrapper.onAdLog(t)},p.prototype.getCurrentAd=function(){return this.sdkImpl.getCurrentAd()},p.prototype.playContent=function(){this.playerWrapper.play()},p.prototype.onLinearAdStart=function(){this.adUi.onLinearAdStart(),this.playerWrapper.onAdStart()},p.prototype.onNonLinearAdLoad=function(){this.adUi.onNonLinearAdLoad()},p.prototype.onNonLinearAdStart=function(){this.adUi.onNonLinearAdLoad(),this.playerWrapper.onAdStart()},p.prototype.getPlayerWidth=function(){return this.playerWrapper.getPlayerWidth()},p.prototype.getPlayerHeight=function(){return this.playerWrapper.getPlayerHeight()},p.prototype.onAdsReady=function(){this.playerWrapper.onAdsReady()},p.prototype.onPlayerResize=function(t,e){this.sdkImpl.onPlayerResize(t,e)},p.prototype.onContentComplete=function(){this.sdkImpl.onContentComplete()},p.prototype.onNoPostroll=function(){this.playerWrapper.onNoPostroll()},p.prototype.onContentAndAdsCompleted=function(){for(var t in this.contentAndAdsEndedListeners)"function"==typeof this.contentAndAdsEndedListeners[t]&&this.contentAndAdsEndedListeners[t]()},p.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},p.prototype.onPlayerReadyForPreroll=function(){this.sdkImpl.onPlayerReadyForPreroll()},p.prototype.onAdTimeout=function(){this.sdkImpl.onAdTimeout()},p.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},p.prototype.onPlayerEnterFullscreen=function(){this.adUi.onPlayerEnterFullscreen(),this.sdkImpl.onPlayerEnterFullscreen()},p.prototype.onPlayerExitFullscreen=function(){this.adUi.onPlayerExitFullscreen(),this.sdkImpl.onPlayerExitFullscreen()},p.prototype.onPlayerVolumeChanged=function(t){this.adUi.onPlayerVolumeChanged(t),this.sdkImpl.onPlayerVolumeChanged(t)},p.prototype.setContentWithAdTag=function(t,e){this.reset(),this.settings.adTagUrl=e||this.settings.adTagUrl,this.playerWrapper.changeSource(t)},p.prototype.setContentWithAdsResponse=function(t,e){this.reset(),this.settings.adsResponse=e||this.settings.adsResponse,this.playerWrapper.changeSource(t)},p.prototype.setContentWithAdsRequest=function(t,e){this.reset(),this.settings.adsRequest=e||this.settings.adsRequest,this.playerWrapper.changeSource(t)},p.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset(),this.adUi.reset()},p.prototype.addContentEndedListener=function(t){this.playerWrapper.addContentEndedListener(t)},p.prototype.addContentAndAdsEndedListener=function(t){this.contentAndAdsEndedListeners.push(t)},p.prototype.setAdBreakReadyListener=function(t){this.sdkImpl.setAdBreakReadyListener(t)},p.prototype.setShowCountdown=function(t){this.adUi.setShowCountdown(t),this.showCountdown=t,this.adUi.countdownDiv.style.display=this.showCountdown?"block":"none"},p.prototype.initializeAdDisplayContainer=function(){this.sdkImpl.initializeAdDisplayContainer()},p.prototype.playAdBreak=function(){this.sdkImpl.playAdBreak()},p.prototype.addEventListener=function(t,e){this.sdkImpl.addEventListener(t,e)},p.prototype.getAdsManager=function(){return this.sdkImpl.getAdsManager()},p.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},p.prototype.changeAdTag=function(t){this.reset(),this.settings.adTagUrl=t},p.prototype.pauseAd=function(){this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()},p.prototype.resumeAd=function(){this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds()},p.prototype.togglePlayback=function(){this.playerWrapper.togglePlayback()},p.prototype.adsWillAutoplay=function(){return void 0!==this.settings.adsWillAutoplay?this.settings.adsWillAutoplay:void 0!==this.settings.adWillAutoplay?this.settings.adWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},p.prototype.adsWillPlayMuted=function(){return void 0!==this.settings.adsWillPlayMuted?this.settings.adsWillPlayMuted:void 0!==this.settings.adWillPlayMuted?this.settings.adWillPlayMuted:void 0!==this.playerWrapper.getPlayerOptions().muted?this.playerWrapper.getPlayerOptions().muted:0==this.playerWrapper.getVolume()},p.prototype.triggerPlayerEvent=function(t,e){this.playerWrapper.triggerPlayerEvent(t,e)};
vendor: 11,206 bytes, line 22
22var g=function(t,e,i){this.vjsPlayer=t,this.daiController=i,this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("pause",this.onPause.bind(this)),this.vjsPlayer.on("play",this.onPlay.bind(this)),this.vjsPlayer.on("seeked",this.onSeekEnd.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),this.vjsPlayer.ads||window.console.warn("You may be using a version of videojs-contrib-ads that is not compatible with your version of video.js."),this.vjsPlayer.ads(e)};g.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.daiController.onPlayerDisposed()},g.prototype.onPause=function(){this.daiController.isInAdBreak()&&this.vjsControls.show()},g.prototype.onPlay=function(){this.daiController.isInAdBreak()&&this.vjsControls.hide()},g.prototype.onSeekEnd=function(){this.daiController.onSeekEnd(this.vjsPlayer.currentTime())},g.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.daiController.onPlayerReady()},g.prototype.getStreamPlayer=function(){return this.h5Player},g.prototype.getVjsPlayer=function(){return this.vjsPlayer},g.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},g.prototype.getPlayerId=function(){return this.vjsPlayer.id()},g.prototype.onAdError=function(t){this.vjsControls.show();var e=void 0!==t.getError?t.getError():t.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:e,AdErrorEvent:t}})},g.prototype.onAdBreakStart=function(){this.vjsControls.hide()},g.prototype.onAdBreakEnd=function(){this.vjsControls.show()},g.prototype.reset=function(){this.vjsControls.show()};var m=function(t){this.daiController=t,this.streamPlayer=null,this.vjsPlayer=null,this.streamManager=null,this.uiSettings=new google.ima.dai.api.UiSettings,this.isAdBreak=!1,this.isSnapback=!1,this.snapForwardTime=0,this.timedMetadata,this.metadataLoaded={},this.SOURCE_TYPES={hls:"application/x-mpegURL",dash:"application/dash+xml"}};m.prototype.initImaDai=function(){var t=this;this.streamPlayer=this.daiController.getStreamPlayer(),this.vjsPlayer=this.daiController.getVjsPlayer(),this.createAdUiDiv(),this.daiController.getSettings().locale&&this.uiSettings.setLocale(this.daiController.getSettings().locale),this.streamManager=new google.ima.dai.api.StreamManager(this.streamPlayer,this.adUiDiv,this.uiSettings),this.streamPlayer.addEventListener("pause",this.onStreamPause),this.streamPlayer.addEventListener("play",this.onStreamPlay),[google.ima.dai.api.StreamEvent.Type.LOADED,google.ima.dai.api.StreamEvent.Type.ERROR,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED].forEach((function(e){t.streamManager.addEventListener(e,t.onStreamEvent.bind(t))})),this.vjsPlayer.textTracks().onaddtrack=this.onAddTrack.bind(this),this.vjsPlayer.trigger({type:"stream-manager",StreamManager:this.streamManager}),this.requestStream()},m.prototype.onAddTrack=function(t){var e=this,i=t.track;"metadata"===i.kind&&(i.mode="hidden",i.addEventListener("cuechange",(function(t){var n,r=l(i.activeCues);try{for(r.s();!(n=r.n()).done;){var s=n.value,o={};o[s.value.key]=s.value.data,e.streamManager.onTimedMetadata(o)}}catch(t){r.e(t)}finally{r.f()}})))},m.prototype.createAdUiDiv=function(){var t=document.createElement("div");t.id="ad-ui",t.style.height="calc(100% - 3em)",this.streamPlayer.parentNode.appendChild(t),this.adUiDiv=t},m.prototype.onStreamPause=function(){this.isAdBreak&&(this.adUiDiv.style.display="none")},m.prototype.onStreamPlay=function(){this.isAdBreak&&(this.adUiDiv.style.display="block")},m.prototype.onSeekEnd=function(t){if("live"!==this.daiController.getSettings().streamType)if(this.isSnapback)this.isSnapback=!1;else{var e=this.streamManager.previousCuePointForStreamTime(t);e&&!e.played&&(this.isSnapback=!0,this.snapForwardTime=t,this.vjsPlayer.currentTime(e.start))}},m.prototype.onStreamEvent=function(t){switch(t.type){case google.ima.dai.api.StreamEvent.Type.LOADED:this.loadUrl(t.getStreamData().url);break;case google.ima.dai.api.StreamEvent.Type.ERROR:window.console.warn("Error loading stream, attempting to play backup stream. "+t.getStreamData().errorMessage),this.daiController.onErrorLoadingAds(t),this.daiController.getSettings().fallbackStreamUrl&&this.loadUrl(this.daiController.getSettings().fallbackStreamUrl);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:this.isAdBreak=!0,this.adUiDiv.style.display="block",this.daiController.onAdBreakStart();break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:this.isAdBreak=!1,this.adUiDiv.style.display="none",this.daiController.onAdBreakEnd(),this.snapForwardTime&&this.snapForwardTime>this.vjsPlayer.currentTime()&&(this.vjsPlayer.currentTime(this.snapForwardTime),this.snapForwardTime=0)}},m.prototype.loadUrl=function(t){this.vjsPlayer.ready(function(){var e=this.daiController.getSettings().streamFormat;this.vjsPlayer.src({src:t,type:this.SOURCE_TYPES[e]});var i=this.daiController.getSettings().bookmarkTime;if(i){var n=this.streamManager.streamTimeForContentTime(i);this.isSnapback=!0,this.vjsPlayer.currentTime(n)}}.bind(this))},m.prototype.requestStream=function(){var t,e=this.daiController.getSettings().streamType;if("vod"===e?((t=new google.ima.dai.api.VODStreamRequest).contentSourceId=this.daiController.getSettings().cmsId,t.videoId=this.daiController.getSettings().videoId):"live"===e?(t=new google.ima.dai.api.LiveStreamRequest).assetKey=this.daiController.getSettings().assetKey:window.console.warn("No valid stream type selected"),t.format=this.daiController.getSettings().streamFormat,this.daiController.getSettings().apiKey&&(t.apiKey=this.daiController.getSettings().apiKey),this.daiController.getSettings().authToken&&(t.authToken=this.daiController.getSettings().authToken),this.daiController.getSettings().adTagParameters&&(t.adTagParameters=this.daiController.getSettings().adTagParameters),this.daiController.getSettings().streamActivityMonitorId&&(t.streamActivityMonitorId=this.daiController.getSettings().streamActivityMonitorId),this.daiController.getSettings().omidMode){t.omidAccessModeRules={};var i=this.daiController.getSettings().omidMode;i.FULL&&(t.omidAccessModeRules[google.ima.OmidAccessMode.FULL]=i.FULL),i.DOMAIN&&(t.omidAccessModeRules[google.ima.OmidAccessMode.DOMAIN]=i.DOMAIN),i.LIMITED&&(t.omidAccessModeRules[google.ima.OmidAccessMode.LIMITED]=i.LIMITED)}this.streamManager.requestStream(t),this.vjsPlayer.trigger({type:"stream-request",StreamRequest:t})},m.prototype.onPlayerReady=function(){this.initImaDai()},m.prototype.onPlayerDisposed=function(){this.streamManager&&this.streamManager.reset()},m.prototype.addEventListener=function(t,e){this.streamManager&&this.streamManager.addEventListener(t,e)},m.prototype.getStreamManager=function(){return this.streamManager},m.prototype.reset=function(){this.streamManager&&this.streamManager.reset()};var v=function(t,e){this.inAdBreak=!1,this.settings={},this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(e);var i={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},n=Object.assign({},i,e.contribAdsSettings||{});this.playerWrapper=new g(t,n,this),this.sdkImpl=new m(this)};v.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,showControlsForJSAds:!0},v.prototype.initWithSettings=function(t){this.settings=Object.assign({},v.IMA_DEFAULTS,t||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},v.prototype.warnAboutDeprecatedSettings=function(){var t=this;[].forEach((function(e){void 0!==t.settings[e]&&console.warn("WARNING: videojs.imaDai setting "+e+" is deprecated")}))},v.prototype.getSettings=function(){return this.settings},v.prototype.getIsMobile=function(){return this.isMobile},v.prototype.getIsIos=function(){return this.isIos},v.prototype.getStreamPlayer=function(){return this.playerWrapper.getStreamPlayer()},v.prototype.getVjsPlayer=function(){return this.playerWrapper.getVjsPlayer()},v.prototype.requestStream=function(){this.sdkImpl.requestStream()},v.prototype.setSetting=function(t,e){this.settings[t]=e},v.prototype.onErrorLoadingAds=function(t){this.playerWrapper.onAdError(t)},v.prototype.onAdError=function(t){this.playerWrapper.onAdError(t)},v.prototype.onAdBreakStart=function(){this.inAdBreak=!0,this.playerWrapper.onAdBreakStart()},v.prototype.onAdBreakEnd=function(){this.inAdBreak=!1,this.playerWrapper.onAdBreakEnd()},v.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},v.prototype.isInAdBreak=function(){return this.inAdBreak},v.prototype.onSeekEnd=function(t){this.sdkImpl.onSeekEnd(t)},v.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},v.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset()},v.prototype.addEventListener=function(t,e){this.sdkImpl.addEventListener(t,e)},v.prototype.getStreamManager=function(){return this.sdkImpl.getStreamManager()},v.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},v.prototype.streamWillAutoplay=function(){return void 0!==this.settings.streamWillAutoplay?this.settings.streamWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},v.prototype.triggerPlayerEvent=function(t,e){this.playerWrapper.triggerPlayerEvent(t,e)};var y=function(t,e){this.controller=new p(t,e),this.addContentAndAdsEndedListener=function(t){this.controller.addContentAndAdsEndedListener(t)}.bind(this),this.addContentEndedListener=function(t){this.controller.addContentEndedListener(t)}.bind(this),this.addEventListener=function(t,e){this.controller.addEventListener(t,e)}.bind(this),this.changeAdTag=function(t){this.controller.changeAdTag(t)}.bind(this),this.getAdsManager=function(){return this.controller.getAdsManager()}.bind(this),this.initializeAdDisplayContainer=function(){this.controller.initializeAdDisplayContainer()}.bind(this),this.pauseAd=function(){this.controller.pauseAd()}.bind(this),this.playAdBreak=function(){this.controller.playAdBreak()}.bind(this),this.requestAds=function(){this.controller.requestAds()}.bind(this),this.resumeAd=function(){this.controller.resumeAd()}.bind(this),this.setAdBreakReadyListener=function(t){this.controller.setAdBreakReadyListener(t)}.bind(this),this.setContentWithAdTag=function(t,e){this.controller.setContentWithAdTag(t,e)}.bind(this),this.setContentWithAdsResponse=function(t,e){this.controller.setContentWithAdsResponse(t,e)}.bind(this),this.setContentWithAdsRequest=function(t,e){this.controller.setContentWithAdsRequest(t,e)}.bind(this),this.setShowCountdown=function(t){this.controller.setShowCountdown(t)}.bind(this)},_=function(t,e){this.controller=new v(t,e),this.streamEndedListener=function(t){this.controller.addStreamEndedListener(t)}.bind(this),this.addEventListener=function(t,e){this.controller.addEventListener(t,e)}
22.bind(this),this.getStreamManager=function(){return this.controller.getStreamManager()}.bind(this)},A=a((function t(e,i){o(this,t),"hls"===(e=e.toLowerCase())||"dash"===e?"dash"!==e?"string"==typeof i?(this.streamFormat=e,this.assetKey=i):window.console.error("assetKey error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")})),b=a((function t(e,i,n){o(this,t),"hls"===(e=e.toLowerCase())||"dash"===e?"dash"!==e?"string"==typeof i?"string"==typeof n?(this.streamFormat=e,this.cmsId=i,this.videoId=n):window.console.error("videoId error: value must be string."):window.console.error("cmsId error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")})),C=r.a.registerPlugin||r.a.plugin;C("ima",(function(t){this.ima=new y(this,t)})),C("imaDai",(function(t,e){if(t instanceof A)e.streamType="live",e.assetKey=t.assetKey;else{if(!(t instanceof b))return void window.console.error("initDai() first parameter must be an instance of LiveStream or VodStream.");e.streamType="vod",e.cmsId=t.cmsId,e.videoId=t.videoId}e.streamFormat=t.streamFormat,this.imaDai=new _(this,e)}))},function(t,e,i){},function(t,e,i){},function(t,e){function i(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=i=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){!function(t){"use strict";
vendor: 4,140 bytes, lines 23-24
23//! moment.js locale configuration 24function e(t,e,i){var n,r;return"m"===i?e?"минÑÑа":"минÑÑÑ":t+" "+(n=+t,r={ss:e?"ÑекÑнда_ÑекÑндÑ_ÑекÑнд":"ÑекÑндÑ_ÑекÑндÑ_ÑекÑнд",mm:e?"минÑÑа_минÑÑÑ_минÑÑ":"минÑÑÑ_минÑÑÑ_минÑÑ",hh:"ÑаÑ_ÑаÑа_ÑаÑов",dd:"денÑ_днÑ_дней",ww:"неделÑ_недели_неделÑ",MM:"меÑÑÑ_меÑÑÑа_меÑÑÑев",yy:"год_года_леÑ"}[i].split("_"),n%10==1&&n%100!=11?r[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?r[1]:r[2])}var i=[/^Ñнв/i,/^Ñев/i,/^маÑ/i,/^апÑ/i,/^ма[йÑ]/i,/^иÑн/i,/^иÑл/i,/^авг/i,/^Ñен/i,/^окÑ/i,/^ноÑ/i,/^дек/i];t.defineLocale("ru",{months:{format:"ÑнваÑÑ_ÑевÑалÑ_маÑÑа_апÑелÑ_маÑ_иÑнÑ_иÑлÑ_авгÑÑÑа_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ".split("_"),standalone:"ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ".split("_")},monthsShort:{format:"Ñнв._ÑевÑ._маÑ._апÑ._маÑ_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.".split("_"),standalone:"Ñнв._ÑевÑ._маÑÑ_апÑ._май_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.".split("_")},weekdays:{standalone:"воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑеда_ÑеÑвеÑг_пÑÑниÑа_ÑÑббоÑа".split("_"),format:"воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑедÑ_ÑеÑвеÑг_пÑÑниÑÑ_ÑÑббоÑÑ".split("_"),isFormat:/\[ ?[Ðв] ?(?:пÑоÑлÑÑ|ÑледÑÑÑÑÑ|ÑÑÑ)? ?] ?dddd/},weekdaysShort:"вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),weekdaysMin:"вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(ÑнваÑ[ÑÑ]|Ñнв\.?|ÑевÑал[ÑÑ]|ÑевÑ?\.?|маÑÑа?|маÑ\.?|апÑел[ÑÑ]|апÑ\.?|ма[йÑ]|иÑн[ÑÑ]|иÑн\.?|иÑл[ÑÑ]|иÑл\.?|авгÑÑÑа?|авг\.?|ÑенÑÑбÑ[ÑÑ]|ÑенÑ?\.?|окÑÑбÑ[ÑÑ]|окÑ\.?|ноÑбÑ[ÑÑ]|ноÑб?\.?|декабÑ[ÑÑ]|дек\.?)/i,monthsShortRegex:/^(ÑнваÑ[ÑÑ]|Ñнв\.?|ÑевÑал[ÑÑ]|ÑевÑ?\.?|маÑÑа?|маÑ\.?|апÑел[ÑÑ]|апÑ\.?|ма[йÑ]|иÑн[ÑÑ]|иÑн\.?|иÑл[ÑÑ]|иÑл\.?|авгÑÑÑа?|авг\.?|ÑенÑÑбÑ[ÑÑ]|ÑенÑ?\.?|окÑÑбÑ[ÑÑ]|окÑ\.?|ноÑбÑ[ÑÑ]|ноÑб?\.?|декабÑ[ÑÑ]|дек\.?)/i,monthsStrictRegex:/^(ÑнваÑ[ÑÑ]|ÑевÑал[ÑÑ]|маÑÑа?|апÑел[ÑÑ]|ма[Ñй]|иÑн[ÑÑ]|иÑл[ÑÑ]|авгÑÑÑа?|ÑенÑÑбÑ[ÑÑ]|окÑÑбÑ[ÑÑ]|ноÑбÑ[ÑÑ]|декабÑ[ÑÑ])/i,monthsShortStrictRegex:/^(Ñнв\.|ÑевÑ?\.|маÑ[Ñ.]|апÑ\.|ма[Ñй]|иÑн[ÑÑ.]|иÑл[ÑÑ.]|авг\.|ÑенÑ?\.|окÑ\.|ноÑб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[СегоднÑ, в] LT",nextDay:"[ÐавÑÑа, в] LT",lastDay:"[ÐÑеÑа, в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Ðо] dddd, [в] LT":"[Ð] dddd, [в] LT";switch(this.day()){case 0:return"[Ð ÑледÑÑÑее] dddd, [в] LT";case 1:case 2:case 4:return"[Ð ÑледÑÑÑий] dddd, [в] LT";case 3:case 5:case 6:return"[Ð ÑледÑÑÑÑÑ] dddd, [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Ðо] dddd, [в] LT":"[Ð] dddd, [в] LT";switch(this.day()){case 0:return"[РпÑоÑлое] dddd, [в] LT";case 1:case 2:case 4:return"[РпÑоÑлÑй] dddd, [в] LT";case 3:case 5:case 6:return"[РпÑоÑлÑÑ] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"ÑеÑез %s",past:"%s назад",s:"неÑколÑко ÑекÑнд",ss:e,m:e,mm:e,h:"ÑаÑ",hh:e,d:"денÑ",dd:e,w:"неделÑ",ww:e,M:"меÑÑÑ",MM:e,y:"год",yy:e},meridiemParse:/ноÑи|ÑÑÑа|днÑ|веÑеÑа/i,isPM:function(t){return/^(днÑ|веÑеÑа)$/.test(t)}
24,meridiem:function(t,e,i){return t<4?"ноÑи":t<12?"ÑÑÑа":t<17?"днÑ":"веÑеÑа"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|Ñ)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-Ñ";default:return t}},week:{dow:1,doy:4}})}(i(35))},,,,,function(t,e,i){(function(e){var n,r=void 0!==e?e:"undefined"!=typeof window?window:{},s=i(43);"undefined"!=typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),t.exports=n}).call(this,i(36))},,,,,function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,r=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),o=function(t,e){for(var i=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(i[n]=t[n]);return i};t.exports={arrayToObject:o,assign:function(t,e){return Object.keys(e).reduce((function(t,i){return t[i]=e[i],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],i=[],n=0;n<e.length;++n)for(var s=e[n],o=s.obj[s.prop],a=Object.keys(o),l=0;l<a.length;++l){var h=a[l],c=o[h];"object"==typeof c&&null!==c&&-1===i.indexOf(c)&&(e.push({obj:o,prop:h}),i.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),i=e.obj[e.prop];if(r(i)){for(var n=[],s=0;s<i.length;++s)void 0!==i[s]&&n.push(i[s]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,i){var n=t.replace(/\+/g," ");if("iso-8859-1"===i)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,i){if(0===t.length)return t;var n="string"==typeof t?t:String(t);if("iso-8859-1"===i)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var r="",o=0;o<n.length;++o){var a=n.charCodeAt(o);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+=n.charAt(o):a<128?r+=s[a]:a<2048?r+=s[192|a>>6]+s[128|63&a]:a<55296||a>=57344?r+=s[224|a>>12]+s[128|a>>6&63]+s[128|63&a]:(o+=1,a=65536+((1023&a)<<10|1023&n.charCodeAt(o)),r+=s[240|a>>18]+s[128|a>>12&63]+s[128|a>>6&63]+s[128|63&a])}return r},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},merge:function t(e,i,s){if(!i)return e;if("object"!=typeof i){if(r(e))e.push(i);else{if(!e||"object"!=typeof e)return[e,i];(s&&(s.plainObjects||s.allowPrototypes)||!n.call(Object.prototype,i))&&(e[i]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(i);var a=e;return r(e)&&!r(i)&&(a=o(e,s)),r(e)&&r(i)?(i.forEach((function(i,r){if(n.call(e,r)){var o=e[r];o&&"object"==typeof o&&i&&"object"==typeof i?e[r]=t(o,i,s):e.push(i)}else e[r]=i})),e):Object.keys(i).reduce((function(e,r){var o=i[r];return n.call(e,r)?e[r]=t(e[r],o,s):e[r]=o,e}),a)}}},function(t,e,i){"use strict";var n=String.prototype.replace,r=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return n.call(t,r,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(t,e,i){"use strict";t.exports=function(t,e){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return t.apply(e,i)}}},function(t,e,i){"use strict";var n=i(24);function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,i){if(!e)return t;var s;if(i)s=i(e);else if(n.isURLSearchParams(e))s=e.toString();else{var o=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),o.push(r(e)+"="+r(t))})))})),s=o.join("&")}if(s){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},function(t,e,i){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,i){"use strict";(function(e){var n=i(24),r=i(78),s={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,l={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==e&&"[object process]"===Object.prototype.toString.call(e))&&(a=i(64)),a),transformRequest:[function(t,e){return r(e,"Accept"),r(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(o(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}}
vendor: 1,541 bytes, line 24
24,n.forEach(["delete","get","head"],(function(t){l.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){l.headers[t]=n.merge(s)})),t.exports=l}).call(this,i(37))},function(t,e,i){"use strict";var n=i(24),r=i(79),s=i(61),o=i(81),a=i(84),l=i(85),h=i(65);t.exports=function(t){return new Promise((function(e,c){var u=t.data,d=t.headers;n.isFormData(u)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var p=t.auth.username||"",g=t.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}var m=o(t.baseURL,t.url);if(f.open(t.method.toUpperCase(),s(m,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:t,request:f};r(e,c,n),f=null}},f.onabort=function(){f&&(c(h("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(h("Network Error",t,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),c(h(e,t,"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var v=i(86),y=(t.withCredentials||l(m))&&t.xsrfCookieName?v.read(t.xsrfCookieName):void 0;y&&(d[t.xsrfHeaderName]=y)}if("setRequestHeader"in f&&n.forEach(d,(function(t,e){void 0===u&&"content-type"===e.toLowerCase()?delete d[e]:f.setRequestHeader(e,t)}
24)),n.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),c(t),f=null)})),void 0===u&&(u=null),f.send(u)}))}},function(t,e,i){"use strict";var n=i(80);t.exports=function(t,e,i,r,s){var o=new Error(t);return n(o,e,i,r,s)}},function(t,e,i){"use strict";var n=i(24);t.exports=function(t,e){e=e||{};var i={},r=["url","method","params","data"],s=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(r,(function(t){void 0!==e[t]&&(i[t]=e[t])})),n.forEach(s,(function(r){n.isObject(e[r])?i[r]=n.deepMerge(t[r],e[r]):void 0!==e[r]?i[r]=e[r]:n.isObject(t[r])?i[r]=n.deepMerge(t[r]):void 0!==t[r]&&(i[r]=t[r])})),n.forEach(o,(function(n){void 0!==e[n]?i[n]=e[n]:void 0!==t[n]&&(i[n]=t[n])}));var a=r.concat(s).concat(o),l=Object.keys(e).filter((function(t){return-1===a.indexOf(t)}));return n.forEach(l,(function(n){void 0!==e[n]?i[n]=e[n]:void 0!==t[n]&&(i[n]=t[n])})),i}},function(t,e,i){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t){t.exports=JSON.parse('{"a":"5.4.2"}')},,function(t,e,i){var n=function(t){"use strict";var e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function a(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,i){return t[e]=i}}function l(t,e,i,n){var r=e&&e.prototype instanceof u?e:u,s=Object.create(r.prototype),o=new w(n||[]);return s._invoke=function(t,e,i){var n="suspendedStart";return function(r,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw s;return x()}for(i.method=r,i.arg=s;;){var o=i.delegate;if(o){var a=A(o,i);if(a){if(a===c)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=h(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(t,i,o),s}function h(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var c={};function u(){}function d(){}function f(){}var p={};a(p,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&i.call(m,r)&&(p=m);var v=f.prototype=u.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){var n;this._invoke=function(r,s){function o(){return new e((function(n,o){!function n(r,s,o,a){var l=h(t[r],t,s);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,o,a)}),(function(t){n("throw",t,o,a)})):e.resolve(u).then((function(t){c.value=t,o(c)}),(function(t){return n("throw",t,o,a)}))}a(l.arg)}(r,s,n,o)}))}return n=n?n.then(o,o):o()}}function A(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=h(i,t.iterator,e.arg);
vendor: 4,205 bytes, line 24
24if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var r=n.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function S(t){if(t){var e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return s.next=s}}return{next:x}}function x(){return{value:void 0,done:!0}}return d.prototype=f,a(v,"constructor",f),a(f,"constructor",d),d.displayName=a(f,o,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,a(t,o,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},y(_.prototype),a(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,i,n,r,s){void 0===s&&(s=Promise);var o=new _(l(e,i,n,r),s);return t.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},y(v),a(v,o,"Generator"),a(v,r,(function(){return this})),a(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},t.values=S,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return o.type="throw",o.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var a=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(a&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(a){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var s=r;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return o.type=t,o.arg=e,s?(this.method="next",this.next=s.finallyLoc,c):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),C(i),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;C(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:S(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}
vendor: 8,356 bytes, line 24
24,function(t,e,i){"use strict";var n=i(58),r=i(59),s=Object.prototype.hasOwnProperty,o={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Array.isArray,l=Array.prototype.push,h=function(t,e){l.apply(t,a(e)?e:[e])},c=Date.prototype.toISOString,u={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,formatter:r.formatters[r.default],indices:!1,serializeDate:function(t){return c.call(t)},skipNulls:!1,strictNullHandling:!1},d=function t(e,i,r,s,o,l,c,d,f,p,g,m,v){var y=e;if("function"==typeof c?y=c(i,y):y instanceof Date?y=p(y):"comma"===r&&a(y)&&(y=y.join(",")),null===y){if(s)return l&&!m?l(i,u.encoder,v):i;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||n.isBuffer(y))return l?[g(m?i:l(i,u.encoder,v))+"="+g(l(y,u.encoder,v))]:[g(i)+"="+g(String(y))];var _,A=[];if(void 0===y)return A;if(a(c))_=c;else{var b=Object.keys(y);_=d?b.sort(d):b}for(var C=0;C<_.length;++C){var w=_[C];o&&null===y[w]||(a(y)?h(A,t(y[w],"function"==typeof r?r(i,w):i,r,s,o,l,c,d,f,p,g,m,v)):h(A,t(y[w],i+(f?"."+w:"["+w+"]"),r,s,o,l,c,d,f,p,g,m,v)))}return A};t.exports=function(t,e){var i,n=t,l=function(t){if(!t)return u;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||u.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=r.default;if(void 0!==t.format){if(!s.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");i=t.format}var n=r.formatters[i],o=u.filter;return("function"==typeof t.filter||a(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:u.addQueryPrefix,allowDots:void 0===t.allowDots?u.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:u.charsetSentinel,delimiter:void 0===t.delimiter?u.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:u.encode,encoder:"function"==typeof t.encoder?t.encoder:u.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:u.encodeValuesOnly,filter:o,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:u.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:u.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:u.strictNullHandling}}(e);"function"==typeof l.filter?n=(0,l.filter)("",n):a(l.filter)&&(i=l.filter);var c,f=[];if("object"!=typeof n||null===n)return"";c=e&&e.arrayFormat in o?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var p=o[c];i||(i=Object.keys(n)),l.sort&&i.sort(l.sort);for(var g=0;g<i.length;++g){var m=i[g];l.skipNulls&&null===n[m]||h(f,d(n[m],m,p,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.formatter,l.encodeValuesOnly,l.charset))}var v=f.join(l.delimiter),y=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""}},function(t,e,i){"use strict";var n=i(58),r=Object.prototype.hasOwnProperty,s={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},a=function(t,e,i){if(t){var n=i.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(n),a=o?n.slice(0,o.index):n,l=[];if(a){if(!i.plainObjects&&r.call(Object.prototype,a)&&!i.allowPrototypes)return;l.push(a)}for(var h=0;null!==(o=s.exec(n))&&h<i.depth;){if(h+=1,!i.plainObjects&&r.call(Object.prototype,o[1].slice(1,-1))&&!i.allowPrototypes)return;l.push(o[1])}return o&&l.push("["+n.slice(o.index)+"]"),function(t,e,i){for(var n=e,r=t.length-1;r>=0;--r){var s,o=t[r];if("[]"===o&&i.parseArrays)s=[].concat(n);else{s=i.plainObjects?Object.create(null):{};var a="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,l=parseInt(a,10);i.parseArrays||""!==a?!isNaN(l)&&o!==a&&String(l)===a&&l>=0&&i.parseArrays&&l<=i.arrayLimit?(s=[])[l]=n:s[a]=n:s={0:n}}n=s}return n}(l,e,i)}};t.exports=function(t,e){var i=function(t){if(!t)return s;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?s.charset:t.charset;return{allowDots:void 0===t.allowDots?s.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth?t.depth:s.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null==t)return i.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var i,a={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,c=l.split(e.delimiter,h),u=-1,d=e.charset;if(e.charsetSentinel)for(i=0;i<c.length;++i)0===c[i].indexOf("utf8=")&&("utf8=%E2%9C%93"===c[i]?d="utf-8":"utf8=%26%2310003%3B"===c[i]&&(d="iso-8859-1"),u=i,i=c.length);for(i=0;i<c.length;++i)if(i!==u){var f,p,g=c[i],m=g.indexOf("]="),v=-1===m?g.indexOf("="):m+1;-1===v?(f=e.decoder(g,s.decoder,d),p=e.strictNullHandling?null:""):(f=e.decoder(g.slice(0,v),s.decoder,d),p=e.decoder(g.slice(v+1),s.decoder,d)),p&&e.interpretNumericEntities&&"iso-8859-1"===d&&(p=o(p)),p&&e.comma&&p.indexOf(",")>-1&&(p=p.split(",")),r.call(a,f)?a[f]=n.combine(a[f],p):a[f]=p}return a}(t,i):t,h=i.plainObjects?Object.create(null):{},c=Object.keys(l),u=0;u<c.length;++u){var d=c[u],f=a(d,l[d],i);h=n.merge(h,f,i)}return n.compact(h)}},function(t,e,i){"use strict";var n=i(24),r=i(60),s=i(74),o=i(66);function a(t){var e=new s(t),i=r(s.prototype.request,e);return n.extend(i,s.prototype,e),n.extend(i,e),i}var l=a(i(63));l.Axios=s,l.create=function(t){return a(o(l.defaults,t))},l.Cancel=i(67),l.CancelToken=i(87),l.isCancel=i(62),l.all=function(t){return Promise.all(t)},l.spread=i(88),t.exports=l,t.exports.default=l},function(t,e,i){"use strict";var n=i(24),r=i(61),s=i(75),o=i(76),a=i(66);function l(t){this.defaults=t,this.interceptors={request:new s,response:new s}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[o,void 0],i=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)i=i.then(e.shift(),e.shift());return i},l.prototype.getUri=function(t){return t=a(this.defaults,t),r(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,i){return this.request(n.merge(i||{},{method:t,url:e}))}})),n.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,i,r){return this.request(n.merge(r||{},{method:t,url:e,data:i}))}})),t.exports=l}
vendor: 6,106 bytes, line 24
24,function(t,e,i){"use strict";var n=i(24);function r(){this.handlers=[]}r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=r},function(t,e,i){"use strict";var n=i(24),r=i(77),s=i(62),o=i(63);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=r(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||o.adapter)(t).then((function(e){return a(t),e.data=r(e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(a(t),e&&e.response&&(e.response.data=r(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,i){"use strict";var n=i(24);t.exports=function(t,e,i){return n.forEach(i,(function(i){t=i(t,e)})),t}},function(t,e,i){"use strict";var n=i(24);t.exports=function(t,e){n.forEach(t,(function(i,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[n])}))}},function(t,e,i){"use strict";var n=i(65);t.exports=function(t,e,i){var r=i.config.validateStatus;!r||r(i.status)?t(i):e(n("Request failed with status code "+i.status,i.config,null,i.request,i))}},function(t,e,i){"use strict";t.exports=function(t,e,i,n,r){return t.config=e,i&&(t.code=i),t.request=n,t.response=r,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,i){"use strict";var n=i(82),r=i(83);t.exports=function(t,e){return t&&!n(e)?r(t,e):e}},function(t,e,i){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,i){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,i){"use strict";var n=i(24),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,i,s,o={};return t?(n.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=n.trim(t.substr(0,s)).toLowerCase(),i=n.trim(t.substr(s+1)),e){if(o[e]&&r.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([i]):o[e]?o[e]+", "+i:i}})),o):o}},function(t,e,i){"use strict";var n=i(24);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function r(t){var n=t;return e&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=r(window.location.href),function(e){var i=n.isString(e)?r(e):e;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0}},function(t,e,i){"use strict";var n=i(24);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,i,r,s,o){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),n.isString(r)&&a.push("path="+r),n.isString(s)&&a.push("domain="+s),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,i){"use strict";var n=i(67);function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var i=this;t((function(t){i.reason||(i.reason=new n(t),e(i.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r((function(e){t=e})),cancel:t}},t.exports=r},function(t,e,i){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,s=[],o=!0,a=!1;try{for(i=i.call(t);!(o=(n=i.next()).done)&&(s.push(n.value),!e||s.length!==e);o=!0);}catch(t){a=!0,r=t}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return s}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){var n=i(92);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}}
vendor: 12,516 bytes, lines 24-31
24,function(t,e,i){"use strict";(function(t){ 25/*! 26 * The buffer module from node.js, for the browser. 27 * 28 * @author Feross Aboukhadijeh <[email protected]> <http://feross.org> 29 * @license MIT 30 */ 31var n=i(97),r=i(98),s=i(99);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,i){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(t,e,i);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return u(this,t)}return h(this,t,e,i)}function h(t,e,i,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,n){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===i&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,i):new Uint8Array(e,i,n);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=d(t,e);return t}(t,e,i,n):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,i),r=(t=a(t,n)).write(e,i);r!==n&&(t=t.slice(0,r));return t}(t,e,i):function(t,e){if(l.isBuffer(e)){var i=0|f(e.length);return 0===(t=a(t,i)).length||e.copy(t,0,0,i),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):d(t,e);if("Buffer"===e.type&&s(e.data))return d(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e){if(c(e),t=a(t,e<0?0:0|f(e)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function d(t,e){var i=e.length<0?0:0|f(e.length);t=a(t,i);for(var n=0;n<i;n+=1)t[n]=255&e[n];return t}function f(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return U(t).length;default:if(n)return N(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,i){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,i);case"utf8":case"utf-8":return T(this,e,i);case"ascii":return k(this,e,i);case"latin1":case"binary":return O(this,e,i);case"base64":return x(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,i);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function v(t,e,i,n,r){if(0===t.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(r)return-1;i=t.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:y(t,e,i,n,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,n,r);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,n,r){var s,o=1,a=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,l/=2,i/=2}function h(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var c=-1;for(s=i;s<a;s++)if(h(t,s)===h(e,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*o}else-1!==c&&(s-=s-c),c=-1}else for(i+l>a&&(i=a-l),s=i;s>=0;s--){for(var u=!0,d=0;d<l;d++)if(h(t,s+d)!==h(e,d)){u=!1;break}if(u)return s}return-1}function _(t,e,i,n){i=Number(i)||0;var r=t.length-i;n?(n=Number(n))>r&&(n=r):n=r;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[i+o]=a}return o}function A(t,e,i,n){return W(N(e,t.length-i),t,i,n)}function b(t,e,i,n){return W(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,n)}function C(t,e,i,n){return b(t,e,i,n)}function w(t,e,i,n){return W(U(e),t,i,n)}function S(t,e,i,n){return W(function(t,e){for(var i,n,r,s=[],o=0;o<t.length&&!((e-=2)<0);++o)i=t.charCodeAt(o),n=i>>8,r=i%256,s.push(r),s.push(n);return s}(e,t.length-i),t,i,n)}function x(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function T(t,e,i){i=Math.min(t.length,i);for(var n=[],r=e;r<i;){var s,o,a,l,h=t[r],c=null,u=h>239?4:h>223?3:h>191?2:1;if(r+u<=i)switch(u){case 1:h<128&&(c=h);break;case 2:128==(192&(s=t[r+1]))&&(l=(31&h)<<6|63&s)>127&&(c=l);break;case 3:s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&(l=(15&h)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&h)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,u=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=u}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var i="",n=0;for(;n<e;)i+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return i}(n)}e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=o(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,i){return h(null,t,e,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,i){return function(t,e,i,n){return c(e),e<=0?a(t,e):void 0!==i?"string"==typeof n?a(t,e).fill(i,n):a(t,e).fill(i):a(t,e)}(null,t,e,i)},l.allocUnsafe=function(t){return u(null,t)},l.allocUnsafeSlow=function(t){return u(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,n=e.length,r=0,s=Math.min(i,n);r<s;++r)if(t[r]!==e[r]){i=t[r],n=e[r];break}return i<n?-1:n<i?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var n=l.allocUnsafe(e),r=0;for(i=0;i<t.length;++i){var o=t[i];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,r),r+=o.length}return n},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?T(this,0,t):g.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",i=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,i,n,r){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),e<0||i>t.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&e>=i)return 0;if(n>=r)return-1;if(e>=i)return 1;if(this===t)return 0;for(var s=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(e>>>=0),a=Math.min(s,o),h=this.slice(n,r),c=t.slice(e,i),u=0;u<a;++u)if(h[u]!==c[u]){s=h[u],o=c[u];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},l.prototype.indexOf=function(t,e,i){return v(this,t,e,i,!0)},l.prototype.lastIndexOf=function(t,e,i){return v(this,t,e,i,!1)},l.prototype.write=function(t,e,i,n){if(void 0===e)n="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)n=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-e;if((void 0===i||i>r)&&(i=r),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return _(this,t,e,i);case"utf8":case"utf-8":return A(this,t,e,i);case"ascii":return b(this,t,e,i);case"latin1":case"binary":return C(this,t,e,i);case"base64":return w(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,i){var n="";i=Math.min(t.length,i);for(var r=e;r<i;++r)n+=String.fromCharCode(127&t[r]);return n}function O(t,e,i){var n="";i=Math.min(t.length,i);for(var r=e;r<i;++r)n+=String.fromCharCode(t[r]);return n}function P(t,e,i){var n=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>n)&&(i=n);for(var r="",s=e;s<i;++s)r+=Y(t[s]);return r}function D(t,e,i){for(var n=t.slice(e,i),r="",s=0;s<n.length;s+=2)r+=String.fromCharCode(n[s]+256*n[s+1]);return r}function E(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,i,n,r,s){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<s)throw new RangeError('"value" argument is out of bounds');if(i+n>t.length)throw new RangeError("Index out of range")}function j(t,e,i,n){e<0&&(e=65535+e+1);for(var r=0,s=Math.min(t.length-i,2);r<s;++r)t[i+r]=(e&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function L(t,e,i,n){e<0&&(e=4294967295+e+1);for(var r=0,s=Math.min(t.length-i,4);r<s;++r)t[i+r]=e>>>8*(n?r:3-r)&255}function R(t,e,i,n,r,s){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function F(t,e,i,n,s){return s||R(t,0,i,4),r.write(t,e,i,n,23,4),i+4}function I(t,e,i,n,s){return s||R(t,0,i,8),r.write(t,e,i,n,52,8),i+8}l.prototype.slice=function(t,e){var i,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=l.prototype;else{var r=e-t;i=new l(r,void 0);for(var s=0;s<r;++s)i[s]=this[s+t]}return i}
vendor: 8,268 bytes, line 31
31,l.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||E(t,e,this.length);for(var n=this[t],r=1,s=0;++s<e&&(r*=256);)n+=this[t+s]*r;return n},l.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||E(t,e,this.length);for(var n=this[t+--e],r=1;e>0&&(r*=256);)n+=this[t+--e]*r;return n},l.prototype.readUInt8=function(t,e){return e||E(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||E(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||E(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||E(t,e,this.length);for(var n=this[t],r=1,s=0;++s<e&&(r*=256);)n+=this[t+s]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||E(t,e,this.length);for(var n=e,r=1,s=this[t+--n];n>0&&(r*=256);)s+=this[t+--n]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*e)),s},l.prototype.readInt8=function(t,e){return e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||E(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(t,e){e||E(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(t,e){return e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||E(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||E(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||E(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||E(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,i,n){(t=+t,e|=0,i|=0,n)||M(this,t,e,i,Math.pow(2,8*i)-1,0);var r=1,s=0;for(this[e]=255&t;++s<i&&(r*=256);)this[e+s]=t/r&255;return e+i},l.prototype.writeUIntBE=function(t,e,i,n){(t=+t,e|=0,i|=0,n)||M(this,t,e,i,Math.pow(2,8*i)-1,0);var r=i-1,s=1;for(this[e+r]=255&t;--r>=0&&(s*=256);)this[e+r]=t/s&255;return e+i},l.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);M(this,t,e,i,r-1,-r)}var s=0,o=1,a=0;for(this[e]=255&t;++s<i&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+i},l.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);M(this,t,e,i,r-1,-r)}var s=i-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+i},l.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,i){return F(this,t,e,!0,i)},l.prototype.writeFloatBE=function(t,e,i){return F(this,t,e,!1,i)},l.prototype.writeDoubleLE=function(t,e,i){return I(this,t,e,!0,i)},l.prototype.writeDoubleBE=function(t,e,i){return I(this,t,e,!1,i)},l.prototype.copy=function(t,e,i,n){if(i||(i=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-i&&(n=t.length-e+i);var r,s=n-i;if(this===t&&i<e&&e<n)for(r=s-1;r>=0;--r)t[r+e]=this[r+i];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<s;++r)t[r+e]=this[r+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+s),e);return s},l.prototype.fill=function(t,e,i,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var s;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(s=e;s<i;++s)this[s]=t;else{var o=l.isBuffer(t)?t:N(new l(t,n).toString()),a=o.length;for(s=0;s<i-e;++s)this[s+e]=o[s%a]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function Y(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var i;e=e||1/0;for(var n=t.length,r=null,s=[],o=0;o<n;++o){if((i=t.charCodeAt(o))>55295&&i<57344){if(!r){if(i>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}r=i;continue}if(i<56320){(e-=3)>-1&&s.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(e-=3)>-1&&s.push(239,191,189);if(r=null,i<128){if((e-=1)<0)break;s.push(i)}else if(i<2048){if((e-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function U(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,i,n){for(var r=0;r<n&&!(r+i>=e.length||r>=t.length);++r)e[r+i]=t[r];return r}}).call(this,i(36))},function(t,e,i){"use strict";e.byteLength=function(t){return 3*t.length/4-h(t)},e.toByteArray=function(t){var e,i,n,o,a,l=t.length;o=h(t),a=new s(3*l/4-o),i=o>0?l-4:l;var c=0;for(e=0;e<i;e+=4)n=r[t.charCodeAt(e)]<<18|r[t.charCodeAt(e+1)]<<12|r[t.charCodeAt(e+2)]<<6|r[t.charCodeAt(e+3)],a[c++]=n>>16&255,a[c++]=n>>8&255,a[c++]=255&n;2===o?(n=r[t.charCodeAt(e)]<<2|r[t.charCodeAt(e+1)]>>4,a[c++]=255&n):1===o&&(n=r[t.charCodeAt(e)]<<10|r[t.charCodeAt(e+1)]<<4|r[t.charCodeAt(e+2)]>>2,a[c++]=n>>8&255,a[c++]=255&n);return a},e.fromByteArray=function(t){for(var e,i=t.length,r=i%3,s="",o=[],a=0,l=i-r;a<l;a+=16383)o.push(c(t,a,a+16383>l?l:a+16383));1===r?(e=t[i-1],s+=n[e>>2],s+=n[e<<4&63],s+="=="):2===r&&(e=(t[i-2]<<8)+t[i-1],s+=n[e>>10],s+=n[e>>4&63],s+=n[e<<2&63],s+="=");return o.push(s),o.join("")};for(var n=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
31+/",a=0,l=o.length;a<l;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function h(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function c(t,e,i){for(var r,s,o=[],a=e;a<i;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(n[(s=r)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,i,n,r){var s,o,a=8*r-n-1,l=(1<<a)-1,h=l>>1,c=-7,u=i?r-1:0,d=i?-1:1,f=t[e+u];for(u+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+t[e+u],u+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+t[e+u],u+=d,c-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),s-=h}return(f?-1:1)*o*Math.pow(2,s-n)},e.write=function(t,e,i,n,r,s){var o,a,l,h=8*s-r-1,c=(1<<h)-1,u=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=c?(a=0,o=c):o+u>=1?(a=(e*l-1)*Math.pow(2,r),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,r),o=0));r>=8;t[i+f]=255&a,f+=p,a/=256,r-=8);for(o=o<<r|a,h+=r;h>0;t[i+f]=255&o,f+=p,o/=256,h-=8);t[i+f-p]|=128*g}},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},,,,function(t,e,i){ 32/*! 33 * Name: vue-upload-component 34 * Version: 2.8.21 35 * Author: Marco Lang 36 */ 37t.exports=function(){"use strict";var t=function(t){var e=new XMLHttpRequest;return e.open(t.method||"GET",t.url),e.responseType="json",t.headers&&Object.keys(t.headers).forEach((function(i){e.setRequestHeader(i,t.headers[i])})),e};function e(e){return function(t,e){return new Promise((function(i,n){t.onload=function(){if(t.status>=200&&t.status<300){var e;try{e=JSON.parse(t.response)}catch(i){e=t.response}i(e)}else n(t.response)},t.onerror=function(){return n(t.response)},t.send(JSON.stringify(e))}))}(t(e),e.body)}var i=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),n=function(){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.file=t,this.options=e,this.chunks=[],this.sessionId=null,this.chunkSize=null,this.speedInterval=null}return i(n,[{key:"createChunks",value:function(){this.chunks=[];for(var t=0,e=this.chunkSize;t<this.fileSize;)this.chunks.push({blob:this.file.file.slice(t,e),startOffset:t,active:!1,retries:this.maxRetries}),e=(t=e)+this.chunkSize}},{key:"updateFileProgress",value:function(){this.file.progress=this.progress}},{key:"pause",value:function(){this.file.active=!1,this.stopChunks()}},{key:"stopChunks",value:function(){this.chunksUploading.forEach((function(t){t.xhr.abort(),t.active=!1})),this.stopSpeedCalc()}},{key:"resume",value:function(){this.file.active=!0,this.startChunking()}},{key:"upload",value:function(){var t=this;return this.promise=new Promise((function(e,i){t.resolve=e,t.reject=i})),this.start(),this.promise}},{key:"start",value:function(){var t=this;e({method:"POST",headers:Object.assign({},this.headers,{"Content-Type":"application/json"}),url:this.action,body:Object.assign(this.startBody,{phase:"start",mime_type:this.fileType,size:this.fileSize,name:this.fileName})}).then((function(e){if("success"!==e.status)return t.file.response=e,t.reject("server");t.sessionId=e.data.session_id,t.chunkSize=e.data.end_offset,t.createChunks(),t.startChunking()})).catch((function(e){t.file.response=e,t.reject("server")}))}},{key:"startChunking",value:function(){for(var t=0;t<this.maxActiveChunks;t++)this.uploadNextChunk();this.startSpeedCalc()}},{key:"uploadNextChunk",value:function(){if(this.file.active){if(this.hasChunksToUpload)return this.uploadChunk(this.chunksToUpload[0]);if(0===this.chunksUploading.length)return this.finish()}}},{key:"uploadChunk",value:function(e){var i=this;e.progress=0,e.active=!0,this.updateFileProgress(),e.xhr=t({method:"POST",headers:this.headers,url:this.action}),e.xhr.upload.addEventListener("progress",(function(t){t.lengthComputable&&(e.progress=Math.round(t.loaded/t.total*100))}),!1),function(t,e){var i=new FormData;for(var n in e)i.append(n,e[n]);return new Promise((function(e,n){t.onload=function(){if(t.status>=200&&t.status<300){var i;try{i=JSON.parse(t.response)}catch(e){i=t.response}e(i)}else n(t.response)},t.onerror=function(){return n(t.response)},t.send(i)}))}(e.xhr,Object.assign(this.uploadBody,{phase:"upload",session_id:this.sessionId,start_offset:e.startOffset,chunk:e.blob})).then((function(t){if(e.active=!1,"success"===t.status)e.uploaded=!0;else if(e.retries--<=0)return i.stopChunks(),i.reject("upload");i.uploadNextChunk()})).catch((function(){if(e.active=!1,e.retries--<=0)return i.stopChunks(),i.reject("upload");i.uploadNextChunk()}))}},{key:"finish",value:function(){var t=this;this.updateFileProgress(),this.stopSpeedCalc(),e({method:"POST",headers:Object.assign({},this.headers,{"Content-Type":"application/json"}),url:this.action,body:Object.assign(this.finishBody,{phase:"finish",session_id:this.sessionId})}).then((function(e){if(t.file.response=e,"success"!==e.status)return t.reject("server");t.resolve(e)})).catch((function(e){t.file.response=e,t.reject("server")}))}},{key:"startSpeedCalc",value:function(){var t=this;this.file.speed=0;var e=0;this.speedInterval||(this.speedInterval=window.setInterval((function(){var i=t.progress/100*t.fileSize;t.file.speed=i-e,e=i}),1e3))}},{key:"stopSpeedCalc",value:function(){this.speedInterval&&window.clearInterval(this.speedInterval),this.speedInterval=null,this.file.speed=0}},{key:"maxRetries",get:function(){return parseInt(this.options.maxRetries,10)}},{key:"maxActiveChunks",get:function(){return parseInt(this.options.maxActive,10)}},{key:"fileType",get:function(){return this.file.type}},{key:"fileSize",get:function(){return this.file.size}},{key:"fileName",get:function(){return this.file.name}},{key:"action",get:function(){return this.options.action||null}},{key:"startBody",get:function(){return this.options.startBody||{}}},{key:"uploadBody",get:function(){return this.options.uploadBody||{}}},{key:"finishBody",get:function(){return this.options.finishBody||{}}},{key:"headers",get:function(){return this.options.headers||{}}},{key:"readyToUpload",get:function(){return!!this.chunks}},{key:"progress",get:function(){var t=this,e=this.chunksUploaded.length/this.chunks.length*100,i=this.chunksUploading.reduce((function(e,i){return e+(0|i.progress)/t.chunks.length}),0);return Math.min(e+i,100)}},{key:"chunksToUpload",get:function(){return this.chunks.filter((function(t){return!t.active&&!t.uploaded}))}},{key:"hasChunksToUpload",get:function(){return this.chunksToUpload.length>0}},{key:"chunksUploading",get:function(){return this.chunks.filter((function(t){return!!t.xhr&&!!t.active}))}},{key:"chunksUploaded",get:function(){return this.chunks.filter((function(t){return!!t.uploaded}))}}]),n}
37(),r=function(t,e,i,n,r,s,o,a,l,h){"boolean"!=typeof o&&(l=a,a=o,o=!1);var c,u="function"==typeof i?i.options:i;if(t&&t.render&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),n&&(u._scopeId=n),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):e&&(c=o?function(){e.call(this,h(this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),c)if(u.functional){var d=u.render;u.render=function(t,e){return c.call(e),d(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return i},s=r({render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{attrs:{type:"file",name:t.$parent.name,id:t.$parent.inputId||t.$parent.name,accept:t.$parent.accept,capture:t.$parent.capture,disabled:t.$parent.disabled,webkitdirectory:t.$parent.directory&&t.$parent.features.directory,directory:t.$parent.directory&&t.$parent.features.directory,multiple:t.$parent.multiple&&t.$parent.features.html5},on:{change:t.change}})},staticRenderFns:[]},void 0,{methods:{change:function(t){this.$parent.addInputFile(t.target),t.target.files?(t.target.value="",t.target.files.length&&!/safari/i.test(navigator.userAgent)&&(t.target.type="",t.target.type="file")):(this.$destroy(),new this.constructor({parent:this.$parent,el:this.$el}))}}},void 0,!1,void 0,void 0,void 0),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},a="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};function l(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var h,c={headers:{},action:"",minSize:1048576,maxActive:3,maxRetries:5,handler:n},u={components:{InputFile:s},props:{inputId:{type:String},name:{type:String,default:"file"},accept:{type:String},capture:{},disabled:{},multiple:{type:Boolean},maximum:{type:Number,default:function(){return this.multiple?0:1}},addIndex:{type:[Boolean,Number]},directory:{type:Boolean},postAction:{type:String},putAction:{type:String},customAction:{type:Function},headers:{type:Object,default:Object},data:{type:Object,default:Object},timeout:{type:Number,default:0},drop:{default:!1},dropDirectory:{type:Boolean,default:!0},size:{type:Number,default:0},extensions:{default:Array},value:{type:Array,default:Array},thread:{type:Number,default:1},chunkEnabled:{type:Boolean,default:!1},chunk:{type:Object,default:function(){return c}}},data:function(){return{files:this.value,features:{html5:!0,directory:!1,drop:!1},active:!1,dropActive:!1,uploading:0,destroy:!1}},mounted:function(){var t=document.createElement("input");if(t.type="file",t.multiple=!0,window.FormData&&t.files?("boolean"!=typeof t.webkitdirectory&&"boolean"!=typeof t.directory||(this.features.directory=!0),this.features.html5&&void 0!==t.ondrop&&(this.features.drop=!0)):this.features.html5=!1,this.maps={},this.files)for(var e=0;e<this.files.length;e++){var i=this.files[e];this.maps[i.id]=i}this.$nextTick((function(){var t=this;this.$parent?(this.$parent.$forceUpdate(),this.$parent.$nextTick((function(){t.watchDrop(t.drop)}))):this.watchDrop(this.drop)}))},beforeDestroy:function(){this.destroy=!0,this.active=!1,this.watchDrop(!1)},computed:{uploaded:function(){for(var t=void 0,e=0;e<this.files.length;e++)if((t=this.files[e]).fileObject&&!t.error&&!t.success)return!1;return!0},chunkOptions:function(){return Object.assign(c,this.chunk)},className:function(){return["file-uploads",this.features.html5?"file-uploads-html5":"file-uploads-html4",this.features.directory&&this.directory?"file-uploads-directory":void 0,this.features.drop&&this.drop?"file-uploads-drop":void 0,this.disabled?"file-uploads-disabled":void 0]}},watch:{active:function(t){this.watchActive(t)},dropActive:function(){this.$parent&&this.$parent.$forceUpdate()},drop:function(t){this.watchDrop(t)},value:function(t){if(this.files!==t){this.files=t;var e=this.maps;this.maps={};for(var i=0;i<this.files.length;i++){var n=this.files[i];this.maps[n.id]=n}for(var r in this.maps){var s=this.maps[r],o=e[r];s!==o&&this.emitFile(s,o)}for(var a in e)this.maps[a]||this.emitFile(void 0,e[a])}}},methods:{clear:function(){if(this.files.length){var t=this.files;this.files=[],this.maps={},this.emitInput();for(var e=0;e<t.length;e++)this.emitFile(void 0,t[e])}return!0},get:function(t){return!!t&&("object"===(void 0===t?"undefined":a(t))?this.maps[t.id]||!1:this.maps[t]||!1)},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.addIndex,i=t,n=i instanceof Array;n||(i=[i]);for(var r=[],s=0;s<i.length;s++){var a=i[s];this.features.html5&&a instanceof Blob&&(a={file:a,size:a.size,name:a.webkitRelativePath||a.relativePath||a.name||"unknown",type:a.type});var l=!1;if(!1===a.fileObject||(a.fileObject||"undefined"!=typeof Element&&a.el instanceof Element||"undefined"!=typeof Blob&&a.file instanceof Blob)&&(l=!0),l&&((a=o({fileObject:!0,size:-1,name:"Filename",type:"",active:!1,error:"",success:!1,putAction:this.putAction,postAction:this.postAction,timeout:this.timeout},a,{response:{},progress:"0.00",speed:0})).data=o({},this.data,a.data?a.data:{}),a.headers=o({},this.headers,a.headers?a.headers:{})),a.id||(a.id=Math.random().toString(36).substr(2)),!this.emitFilter(a,void 0)){if(this.maximum>1&&r.length+this.files.length>=this.maximum)break;
37if(r.push(a),1===this.maximum)break}}if(!r.length)return!1;1===this.maximum&&this.clear();var h=void 0;if(!0===e||0===e)h=r.concat(this.files);else if(e){var c;(c=h=this.files.concat([])).splice.apply(c,[e,0].concat(r))}else h=this.files.concat(r);this.files=h;for(var u=0;u<r.length;u++){var d=r[u];this.maps[d.id]=d}this.emitInput();for(var f=0;f<r.length;f++)this.emitFile(r[f],void 0);return n?r:r[0]},addInputFile:function(t){var e=[];if(t.files)for(var i=0;i<t.files.length;i++){var n=t.files[i];e.push({size:n.size,name:n.webkitRelativePath||n.relativePath||n.name,type:n.type,file:n})}else{var r=t.value.replace(/\\/g,"/").split("/");delete t.__vuex__,e.push({name:r[r.length-1],el:t})}return this.add(e)},addDataTransfer:function(t){var e=this,i=[];if(t.items&&t.items.length){for(var n=[],r=0;r<t.items.length;r++){var s=t.items[r];(s=s.getAsEntry?s.getAsEntry()||s.getAsFile():s.webkitGetAsEntry&&s.webkitGetAsEntry()||s.getAsFile())&&n.push(s)}return new Promise((function(t,r){!function r(s){var o=n[s];if(!o||e.maximum>0&&i.length>=e.maximum)return t(e.add(i));e.getEntry(o).then((function(t){i.push.apply(i,l(t)),r(s+1)}))}(0)}))}if(t.files.length){for(var o=0;o<t.files.length&&(i.push(t.files[o]),!(this.maximum>0&&i.length>=this.maximum));o++);return Promise.resolve(this.add(i))}return Promise.resolve([])},getEntry:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Promise((function(n,r){if(t.isFile)t.file((function(t){n([{size:t.size,name:i+t.name,type:t.type,file:t}])}));else if(t.isDirectory&&e.dropDirectory){var s=[],o=t.createReader();!function r(){o.readEntries((function(o){!function a(h){return!o[h]&&0===h||e.maximum>0&&s.length>=e.maximum?n(s):o[h]?void e.getEntry(o[h],i+t.name+"/").then((function(t){s.push.apply(s,l(t)),a(h+1)})):r()}(0)}))}()}else n([])}))},replace:function(t,e){var i=this.get(t),n=this.get(e);if(!i||!n||i===n)return!1;var r=this.files.concat([]),s=r.indexOf(i),o=r.indexOf(n);return-1!==s&&-1!==o&&(r[s]=n,r[o]=i,this.files=r,this.emitInput(),!0)},remove:function(t){var e=this.get(t);if(e){if(this.emitFilter(void 0,e))return!1;var i=this.files.concat([]),n=i.indexOf(e);if(-1===n)return console.error("remove",e),!1;i.splice(n,1),this.files=i,delete this.maps[e.id],this.emitInput(),this.emitFile(void 0,e)}return e},update:function(t,e){var i=this.get(t);if(i){var n=o({},i,e);if(!i.fileObject||!i.active||n.active||n.error||n.success||(n.error="abort"),this.emitFilter(n,i))return!1;var r=this.files.concat([]),s=r.indexOf(i);return-1===s?(console.error("update",i),!1):(r.splice(s,1,n),this.files=r,delete this.maps[i.id],this.maps[n.id]=n,this.emitInput(),this.emitFile(n,i),n)}return!1},emitFilter:function(t,e){var i=!1;return this.$emit("input-filter",t,e,(function(){return i=!0})),i},emitFile:function(t,e){this.$emit("input-file",t,e),!(t&&t.fileObject&&t.active)||e&&e.active?t&&t.fileObject&&t.active||!e||!e.fileObject||!e.active||this.uploading--:(this.uploading++,this.$nextTick((function(){var e=this;setTimeout((function(){e.upload(t).then((function(){(t=e.get(t))&&t.fileObject&&e.update(t,{active:!1,success:!t.error})})).catch((function(i){e.update(t,{active:!1,success:!1,error:i.code||i.error||i.message||i})}))}),parseInt(50*Math.random()+50,10))}))),!this.active||Boolean(t)===Boolean(e)&&t.active===e.active||this.watchActive(!0)},emitInput:function(){this.$emit("input",this.files)},upload:function(t){var e=this.get(t);if(!e)return Promise.reject("not_exists");if(!e.fileObject)return Promise.reject("file_object");if(e.error)return Promise.reject(e.error);if(e.success)return Promise.resolve(e);var i=this.extensions;if(i&&(i.length||void 0===i.length)&&("object"===(void 0===i?"undefined":a(i))&&i instanceof RegExp||("string"==typeof i&&(i=i.split(",").map((function(t){return t.trim()})).filter((function(t){return t}))),i=new RegExp("\\.("+i.join("|").replace(/\./g,"\\.")+")$","i")),-1===e.name.search(i)))return Promise.reject("extension");if(this.size>0&&e.size>=0&&e.size>this.size)return Promise.reject("size");if(this.customAction)return this.customAction(e,this);if(this.features.html5){if(this.shouldUseChunkUpload(e))return this.uploadChunk(e);if(e.putAction)return this.uploadPut(e);if(e.postAction)return this.uploadHtml5(e)}return e.postAction?this.uploadHtml4(e):Promise.reject("No action configured")},shouldUseChunkUpload:function(t){return this.chunkEnabled&&!!this.chunkOptions.handler&&t.size>this.chunkOptions.minSize},uploadChunk:function(t){var e=this.chunkOptions.handler;return t.chunk=new e(t,this.chunkOptions),t.chunk.upload()},uploadPut:function(t){var e=[],i=void 0;for(var n in t.data)null!=(i=t.data[n])&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(i));var r=e.length?(-1===t.putAction.indexOf("?")?"?":"&")+e.join("&"):"",s=new XMLHttpRequest;return s.open("PUT",t.putAction+r),this.uploadXhr(s,t,t.file)},uploadHtml5:function(t){var e=new window.FormData,i=void 0;for(var n in t.data)(i=t.data[n])&&"object"===(void 0===i?"undefined":a(i))&&"function"!=typeof i.toString?i instanceof File?e.append(n,i,i.name):e.append(n,JSON.stringify(i)):null!=i&&e.append(n,i);e.append(this.name,t.file,t.file.filename||t.name);var r=new XMLHttpRequest;return r.open("POST",t.postAction),this.uploadXhr(r,t,e)}
37,uploadXhr:function(t,e,i){var n=this,r=e,s=0,o=0;t.upload.onprogress=function(t){if(r=n.get(r),t.lengthComputable&&r&&r.fileObject&&r.active){var e=Math.round(Date.now()/1e3);e!==s&&(s=e,r=n.update(r,{progress:(t.loaded/t.total*100).toFixed(2),speed:t.loaded-o}),o=t.loaded)}};var a=setInterval((function(){if(!(r=n.get(r))||!r.fileObject||r.success||r.error||!r.active){a&&(clearInterval(a),a=!1);try{t.abort(),t.timeout=1}catch(t){}}}),100);return new Promise((function(e,s){var o=void 0,l=function(i){if(!o){if(o=!0,a&&(clearInterval(a),a=!1),!(r=n.get(r)))return s("not_exists");if(!r.fileObject)return s("file_object");if(r.error)return s(r.error);if(!r.active)return s("abort");if(r.success)return e(r);var l={};switch(i.type){case"timeout":case"abort":l.error=i.type;break;case"error":t.status?t.status>=500?l.error="server":t.status>=400&&(l.error="denied"):l.error="network";break;default:t.status>=500?l.error="server":t.status>=400?l.error="denied":l.progress="100.00"}if(t.responseText){var h=t.getResponseHeader("Content-Type");h&&-1!==h.indexOf("/json")?l.response=JSON.parse(t.responseText):l.response=t.responseText}return(r=n.update(r,l)).error?s(r.error):e(r)}};for(var h in t.onload=l,t.onerror=l,t.onabort=l,t.ontimeout=l,r.timeout&&(t.timeout=r.timeout),r.headers)t.setRequestHeader(h,r.headers[h]);r=n.update(r,{xhr:t}),t.send(i)}))},uploadHtml4:function(t){var e=this,i=t,n=function(t){27===t.keyCode&&t.preventDefault()},r=document.createElement("iframe");r.id="upload-iframe-"+i.id,r.name="upload-iframe-"+i.id,r.src="about:blank",r.setAttribute("style","width:1px;height:1px;top:-999em;position:absolute; margin-top:-999em;");var s=document.createElement("form");s.action=i.postAction,s.name="upload-form-"+i.id,s.setAttribute("method","POST"),s.setAttribute("target","upload-iframe-"+i.id),s.setAttribute("enctype","multipart/form-data");var o=void 0,l=void 0;for(var h in i.data)(o=i.data[h])&&"object"===(void 0===o?"undefined":a(o))&&"function"!=typeof o.toString&&(o=JSON.stringify(o)),null!=o&&((l=document.createElement("input")).type="hidden",l.name=h,l.value=o,s.appendChild(l));return s.appendChild(i.el),document.body.appendChild(r).appendChild(s),new Promise((function(t,o){setTimeout((function(){if(!(i=e.update(i,{iframe:r})))return o("not_exists");var a=setInterval((function(){(i=e.get(i))&&i.fileObject&&!i.success&&!i.error&&i.active||(a&&(clearInterval(a),a=!1),r.onabort({type:i?"abort":"not_exists"}))}),100),l=void 0,h=function(s){if(!l){if(l=!0,a&&(clearInterval(a),a=!1),document.body.removeEventListener("keydown",n),!(i=e.get(i)))return o("not_exists");if(!i.fileObject)return o("file_object");if(i.error)return o(i.error);if(!i.active)return o("abort");if(i.success)return t(i);var h=function(){var t=void 0;try{r.contentWindow&&(t=r.contentWindow.document)}catch(t){}if(!t)try{t=r.contentDocument?r.contentDocument:r.document}catch(e){t=r.document}return t&&t.body?t.body.innerHTML:null}(),c={};switch(s.type){case"abort":c.error="abort";break;case"error":i.error?c.error=i.error:c.error=null===h?"network":"denied";break;default:i.error?c.error=i.error:null===c?c.error="network":c.progress="100.00"}if(null!==h){if(h&&"{"===h.substr(0,1)&&"}"===h.substr(h.length-1,1))try{h=JSON.parse(h)}catch(t){}c.response=h}return(i=e.update(i,c)).error?o(i.error):t(i)}};r.onload=h,r.onerror=h,r.onabort=h,document.body.addEventListener("keydown",n),s.submit()}),50)})).then((function(t){return r.parentNode&&r.parentNode.removeChild(r),t})).catch((function(t){return r.parentNode&&r.parentNode.removeChild(r),t}))},watchActive:function(t){for(var e=void 0,i=0;e=this.files[i];)if(i++,e.fileObject)if(t&&!this.destroy){if(this.uploading>=this.thread||this.uploading&&!this.features.html5)break;e.active||e.error||e.success||this.update(e,{active:!0})}else e.active&&this.update(e,{active:!1});0===this.uploading&&(this.active=!1)},watchDrop:function(t){var e=t;if(this.features.drop){if(this.dropElement)try{document.removeEventListener("dragenter",this.onDragenter,!1),document.removeEventListener("dragleave",this.onDragleave,!1),document.removeEventListener("drop",this.onDocumentDrop,!1),this.dropElement.removeEventListener("dragover",this.onDragover,!1),this.dropElement.removeEventListener("drop",this.onDrop,!1)}catch(t){}e?"string"==typeof e?e=document.querySelector(e)||this.$root.$el.querySelector(e):!0===e&&(e=this.$parent.$el):e=!1,this.dropElement=e,this.dropElement&&(document.addEventListener("dragenter",this.onDragenter,!1),document.addEventListener("dragleave",this.onDragleave,!1),document.addEventListener("drop",this.onDocumentDrop,!1),this.dropElement.addEventListener("dragover",this.onDragover,!1),this.dropElement.addEventListener("drop",this.onDrop,!1))}},onDragenter:function(t){if(t.preventDefault(),!this.dropActive&&t.dataTransfer){var e=t.dataTransfer;e.files&&e.files.length?this.dropActive=!0:e.types?(e.types.indexOf&&-1!==e.types.indexOf("Files")||e.types.contains&&e.types.contains("Files"))&&(this.dropActive=!0):this.dropActive=!0}},onDragleave:function(t){t.preventDefault(),this.dropActive&&("HTML"===t.target.nodeName||t.target===t.explicitOriginalTarget||!t.fromElement&&(t.clientX<=0||t.clientY
37<=0||t.clientX>=window.innerWidth||t.clientY>=window.innerHeight))&&(this.dropActive=!1)},onDragover:function(t){t.preventDefault()},onDocumentDrop:function(){this.dropActive=!1},onDrop:function(t){t.preventDefault(),this.addDataTransfer(t.dataTransfer)}}},d="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()),f=document.head||document.getElementsByTagName("head")[0],p={},g=r({render:function(){var t=this.$createElement,e=this._self._c||t;return e("span",{class:this.className},[this._t("default"),this._v(" "),e("label",{attrs:{for:this.inputId||this.name}}),this._v(" "),e("input-file")],2)},staticRenderFns:[]},(function(t){t&&t("data-v-76d380b6_0",{source:".file-uploads{overflow:hidden;position:relative;text-align:center;display:inline-block}.file-uploads.file-uploads-html4 input,.file-uploads.file-uploads-html5 label{background:#fff;opacity:0;font-size:20em;z-index:1;top:0;left:0;right:0;bottom:0;position:absolute;width:100%;height:100%}.file-uploads.file-uploads-html4 label,.file-uploads.file-uploads-html5 input{background:rgba(255,255,255,0);overflow:hidden;position:fixed;width:1px;height:1px;z-index:-1;opacity:0}",map:void 0,media:void 0})}),u,void 0,!1,void 0,(function(t){return function(t,e){return function(t,e){var i=d?e.media||"default":t,n=p[i]||(p[i]={ids:new Set,styles:[]});if(!n.ids.has(t)){n.ids.add(t);var r=e.source;if(e.map&&(r+="\n/*# sourceURL="+e.map.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+" */"),n.element||(n.element=document.createElement("style"),n.element.type="text/css",e.media&&n.element.setAttribute("media",e.media),f.appendChild(n.element)),"styleSheet"in n.element)n.styles.push(r),n.element.styleSheet.cssText=n.styles.filter(Boolean).join("\n");else{var s=n.ids.size-1,o=document.createTextNode(r),a=n.element.childNodes;a[s]&&n.element.removeChild(a[s]),a.length?n.element.insertBefore(o,a[s]):n.element.appendChild(o)}}}(t,e)}}),void 0);return(h=Object.freeze({default:g}))&&h.default||h}()}]]);
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.