vendor: 4,921 bytes, lines 1-2
1/*! For license information please see app.js.LICENSE.txt */ 2(()=>{var t,e={4199(t,e,i){"use strict";i.r(e),i.d(e,{afterMain:()=>x,afterRead:()=>b,afterWrite:()=>T,applyStyles:()=>F,arrow:()=>J,auto:()=>a,basePlacements:()=>l,beforeMain:()=>_,beforeRead:()=>v,beforeWrite:()=>C,bottom:()=>r,clippingParents:()=>u,computeStyles:()=>it,createPopper:()=>Ft,createPopperBase:()=>Dt,createPopperLite:()=>jt,detectOverflow:()=>yt,end:()=>h,eventListeners:()=>rt,flip:()=>bt,hide:()=>xt,left:()=>s,main:()=>w,modifierPhases:()=>O,offset:()=>Ct,placements:()=>m,popper:()=>d,popperGenerator:()=>Pt,popperOffsets:()=>St,preventOverflow:()=>Tt,read:()=>y,reference:()=>p,right:()=>o,start:()=>c,top:()=>n,variationPlacements:()=>g,viewport:()=>f,write:()=>S});var n="top",r="bottom",o="right",s="left",a="auto",l=[n,r,o,s],c="start",h="end",u="clippingParents",f="viewport",d="popper",p="reference",g=l.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+h])}),[]),m=[].concat(l,[a]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+h])}),[]),v="beforeRead",y="read",b="afterRead",_="beforeMain",w="main",x="afterMain",C="beforeWrite",S="write",T="afterWrite",O=[v,y,b,_,w,x,C,S,T];function E(t){return t?(t.nodeName||"").toLowerCase():null}function A(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function k(t){return t instanceof A(t).Element||t instanceof Element}function P(t){return t instanceof A(t).HTMLElement||t instanceof HTMLElement}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof A(t).ShadowRoot||t instanceof ShadowRoot)}const F={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];P(r)&&E(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});P(n)&&E(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function j(t){return t.split("-")[0]}var I=Math.max,M=Math.min,L=Math.round;function R(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(R())}function $(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&P(t)&&(r=t.offsetWidth>0&&L(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&L(n.height)/t.offsetHeight||1);var s=(k(t)?A(t):window).visualViewport,a=!B()&&i,l=(n.left+(a&&s?s.offsetLeft:0))/r,c=(n.top+(a&&s?s.offsetTop:0))/o,h=n.width/r,u=n.height/o;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function N(t){var e=$(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function z(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&D(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function V(t){return A(t).getComputedStyle(t)}function W(t){return["table","td","th"].indexOf(E(t))>=0}function H(t){return((k(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===E(t)?t:t.assignedSlot||t.parentNode||(D(t)?t.host:null)||H(t)}function X(t){return P(t)&&"fixed"!==V(t).position?t.offsetParent:null}function Y(t){for(var e=A(t),i=X(t);i&&W(i)&&"static"===V(i).position;)i=X(i);return i&&("html"===E(i)||"body"===E(i)&&"static"===V(i).position)?e:i||function(t){var e=/firefox/i.test(R());if(/Trident/i.test(R())&&P(t)&&"fixed"===V(t).position)return null;var i=U(t);for(D(i)&&(i=i.host);P(i)&&["html","body"].indexOf(E(i))<0;){var n=V(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function G(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function q(t,e,i){return I(t,M(e,i))}function K(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,a=t.name,c=t.o
vendor: 1,488 bytes, line 2
2ptions,h=i.elements.arrow,u=i.modifiersData.popperOffsets,f=j(i.placement),d=G(f),p=[s,o].indexOf(f)>=0?"height":"width";if(h&&u){var g=function(t,e){return K("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,l))}(c.padding,i),m=N(h),v="y"===d?n:s,y="y"===d?r:o,b=i.rects.reference[p]+i.rects.reference[d]-u[d]-i.rects.popper[p],_=u[d]-i.rects.reference[d],w=Y(h),x=w?"y"===d?w.clientHeight||0:w.clientWidth||0:0,C=b/2-_/2,S=g[v],T=x-m[p]-g[y],O=x/2-m[p]/2+C,E=q(S,O,T),A=d;i.modifiersData[a]=((e={})[A]=E,e.centerOffset=E-O,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&z(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,i=t.popper,a=t.popperRect,l=t.placement,c=t.variation,u=t.offsets,f=t.position,d=t.gpuAcceleration,p=t.adaptive,g=t.roundOffsets,m=t.isFixed,v=u.x,y=void 0===v?0:v,b=u.y,_=void 0===b?0:b,w="function"==typeof g?g({x:y,y:_}):{x:y,y:_};y=w.x,_=w.y;var x=u.hasOwnProperty("x"),C=u.hasOwnProperty("y"),S=s,T=n,O=window;if(p){var E=Y(i),k="clientHeight",P="clientWidth";if(E===A(i)&&"static"!==V(E=H(i)).position&&"absolute"===f&&(k="scrollHeight",P="scrollWidth"),l===n||(l===s||l===o)&&c===h)T=r,_-=(m&&E===O&&O.visualVie
vendor: 10,349 bytes, line 2
2wport?O.visualViewport.height:E[k])-a.height,_*=d?1:-1;if(l===s||(l===n||l===r)&&c===h)S=o,y-=(m&&E===O&&O.visualViewport?O.visualViewport.width:E[P])-a.width,y*=d?1:-1}var D,F=Object.assign({position:f},p&&tt),j=!0===g?function(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:L(i*r)/r||0,y:L(n*r)/r||0}}({x:y,y:_},A(i)):{x:y,y:_};return y=j.x,_=j.y,d?Object.assign({},F,((D={})[T]=C?"0":"",D[S]=x?"0":"",D.transform=(O.devicePixelRatio||1)<=1?"translate("+y+"px, "+_+"px)":"translate3d("+y+"px, "+_+"px, 0)",D)):Object.assign({},F,((e={})[T]=C?_+"px":"",e[S]=x?y+"px":"",e.transform="",e))}const it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:j(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var nt={passive:!0};const rt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=A(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,nt)})),a&&l.addEventListener("resize",i.update,nt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,nt)})),a&&l.removeEventListener("resize",i.update,nt)}},data:{}};var ot={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return ot[t]}))}var at={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,(function(t){return at[t]}))}function ct(t){var e=A(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ht(t){return $(H(t)).left+ct(t).scrollLeft}function ut(t){var e=V(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function ft(t){return["html","body","#document"].indexOf(E(t))>=0?t.ownerDocument.body:P(t)&&ut(t)?t:ft(U(t))}function dt(t,e){var i;void 0===e&&(e=[]);var n=ft(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=A(n),s=r?[o].concat(o.visualViewport||[],ut(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(dt(U(s)))}function pt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===f?pt(function(t,e){var i=A(t),n=H(t),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=B();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+ht(t),y:l}}(t,i)):k(e)?function(t,e){var i=$(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):pt(function(t){var e,i=H(t),n=ct(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=I(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=I(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+ht(t),l=-n.scrollTop;return"rtl"===V(r||i).direction&&(a+=I(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(H(t)))}function mt(t,e,i,n){var r="clippingParents"===e?function(t){var e=dt(U(t)),i=["absolute","fixed"].indexOf(V(t).position)>=0&&P(t)?Y(t):t;return k(i)?e.filter((function(t){return k(t)&&z(t,i)&&"body"!==E(t)})):[]}(t):[].concat(e),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(e,i){var r=gt(t,i,n);return e.top=I(r.top,e.top),e.right=M(r.right,e.right),e.bottom=M(r.bottom,e.bottom),e.left=I(r.left,e.left),e}),gt(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function vt(t){var e,i=t.reference,a=t.element,l=t.placement,u=l?j(l):null,f=l?Z(l):null,d=i.x+i.width/2-a.width/2,p=i.y+i.height/2-a.height/2;switch(u){case n:e={x:d,y:i.y-a.height};break;case r:e={x:d,y:i.y+i.height};break;case o:e={x:i.x+i.width,y:p};break;case s:e={x:i.x-a.width,y:p};break;default:e={x:i.x,y:i.y}}var g=u?G(u):null;if(null!=g){var m="y"===g?"height":"width";switch(f){case c:e[g]=e[g]-(i[m]/2-a[m]/2);break;case h:e[g]=e[g]+(i[m]/2-a[m]/2)}}return e}function yt(t,e){void 0===e&&(e={});var i=e,s=i.placement,a=void 0===s?t.placement:s,c=i.strategy,h=void 0===c?t.strategy:c,g=i.boundary,m=void 0===g?u:g,v=i.rootBoundary,y=void 0===v?f:v,b=i.elementContext,_=void 0===b?d:b,w=i.altBoundary,x=void 0!==w&&w,C=i.padding,S=void 0===C?0:C,T=K("number"!=typeof S?S:Q(S,l)),O=_===d?p:d,E=t.rects.popper,A=t.elements[x?O:_],P=mt(k(A)?A:A.contextElement||H(t.elements.popper),m,y,h),D=$(t.elements.reference),F=vt({reference:D,element:E,strategy:"absolute",placement:a}),j=pt(Object.assign({},E,F)),I=_===d?j:D,M={top:P.top-I.top+T.top,bottom:I.bottom-P.bottom+T.bottom,left:P.left-I.left+T.left,right:I.right-P.right+T.right},L=t.modifiersData.offset;if(_===d&&L){var R=L[a];Object.keys(M).forEach((function(t){var e=[o,r].indexOf(t)>=0?1:-1,i=[n,r].indexOf(t)>=0?"y":"x";M[t]+=R[i]*e}))}return M}const bt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,h=t.name;if(!e.modifiersData[h]._skip){for(var u=i.mainAxis,f=void 0===u||u,d=i.altAxis,p=void 0===d||d,v=i.fallbackPlacements,y=i.padding,b=i.boundary,_=i.rootBoundary,w=i.altBoundary,x=i.flipVariations,C=void 0===x||x,S=i.allowedAutoPlacements,T=e.options.placement,O=j(T),E=v||(O===T||!C?[st(T)]:function(t){if(j(t)===a)return[];var e=st(t);return[lt(t),e,lt(e)]}(T)),A=[T].concat(E).reduce((function(t,i){return t.concat(j(i)===a?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,c=i.allowedAutoPlacements,h=void 0===c?m:c,u=Z(n),f=u?a?g:g.filter((function(t){return Z(t)===u})):l,d=f.filter((function(t){return h.indexOf(t)>=0}));0===d.length&&(d=f);var p=d.reduce((function(e,i){return e[i]=yt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[j(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:b,rootBoundary:_,padding:y,flipVariations:C,allowedAutoPlacements:S}):i)}),[]),k=e.rects.reference,P=e.rects.popper,D=new Map,F=!0,I=A[0],M=0;M<A.length;M++){var L=A[M],R=j(L),B=Z(L)===c,$=[n,r].indexOf(R)>=0,N=$?"width":"height",z=yt(e,{placement:L,boundary:b,rootBoundary:_,altBoundary:w,padding:y}),V=$?B?o:s:B?r:n;k[N]>P[N]&&(V=st(V));var W=st(V),H=[];if(f&&H.push(z[R]<=0),p&&H.push(z[V]<=0,z[W]<=0),H.every((function(t){return t}))){I=L,F=!1;break}D.set(L,H)}if(F)for(var U=function(t){var e=A.find((function(e){var i=D.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return I=e,"break"},X=C?3:1;X>0;X--){if("break"===U(X))break}e.placement!==I&&(e.modifiersData[h]._skip=!0,e.placement=I,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _t(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[n,o,r,s].some((function(e){return t[e]>=0}))}const xt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),a=yt(e,{altBoundary:!0}),l=_t(s,n),c=_t(a,r,o),h=wt(l),u=wt(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}};const Ct={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,r=t.name,a=i.offset,l=void 0===a?[0,0]:a,c=m.reduce((function(t,i){return t[i]=function(t,e,i){var r=j(t),a=[s,n].indexOf(r)>=0?-1:1,l="function"==typeof i?i(Object.assign({},e,{placement:t})):i,c=l[0],h=l[1];return c=c||0,h=(h||0)*a,[s,o].indexOf(r)>=0?{x:h,y:c}:{x:c,y:h}}(i,e.rects,l),t}),{}),h=c[e.placement],u=h.x,f=h.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=f),e.modifiersData[r]=c}};const St={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=vt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,a=t.name,l=i.mainAxis,h=void 0===l||l,u=i.altAxis,f=void 0!==u&&u,d=i.boundary,p=i.rootBoundary,g=i.altBoundary,m=i.padding,v=i.tether,y=void 0===v||v,b=i.tetherOffset,_=void 0===b?0:b,w=yt(e,{boundary:d,rootBoundary:p,padding:m,altBoundary:g}),x=j(e.placement),C=Z(e.placement),S=!C,T=G(x),O="x"===T?"y":"x",E=e.modifiersData.popperOffsets,A=e.rects.reference,k=e.rects.popper,P="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,D="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(E){if(h){var R,B="y"===T?n:s,$="y"===T?r:o,z="y"===T?"height":"width",V=E[T],W=V+w[B],H=V-w[$],U=y?-k[z]/2:0,X=C===c?A[z]:k[z],K=C===c?-k[z]:-A[z],Q=e.elements.arrow,J=y&&Q?N(Q):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[B],it=tt[$],nt=q(0,A[z],J[z]),rt=S?A[z]/2-U-nt-et-D.mainAxis:X-nt-et-D.mainAxis,ot=S?-A[z]/2+U+nt+it+D.mainAxis:K+nt+it+D.mainAxis,st=e.elements.arrow&&Y(e.elements.arrow),at=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,lt=null!=(R=null==F?void 0:F[T])?R:0,ct=V+ot-lt,ht=q(y?M(W,V+rt-lt-at):W,V,y?I(H,ct):H);E[T]=ht,L[T]=ht-V}if(f){var ut,ft="x"===T?n:s,dt="x"===T?r:o,pt=E[O],gt="y"===O?"he
2ight":"width",mt=pt+w[ft],vt=pt-w[dt],bt=-1!==[n,s].indexOf(x),_t=null!=(ut=null==F?void 0:F[O])?ut:0,wt=bt?mt:pt-A[gt]-k[gt]-_t+D.altAxis,xt=bt?pt+A[gt]+k[gt]-_t-D.altAxis:vt,Ct=y&&bt?function(t,e,i){var n=q(t,e,i);return n>i?i:n}(wt,pt,xt):q(y?wt:mt,pt,y?xt:vt);E[O]=Ct,L[O]=Ct-pt}e.modifiersData[a]=L}},requiresIfExists:["offset"]};function Ot(t,e,i){void 0===i&&(i=!1);var n,r,o=P(e),s=P(e)&&function(t){var e=t.getBoundingClientRect(),i=L(e.width)/t.offsetWidth||1,n=L(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=H(e),l=$(t,s,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==E(e)||ut(a))&&(c=(n=e)!==A(n)&&P(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:ct(n)),P(e)?((h=$(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=ht(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Et(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var At={placement:"bottom",modifiers:[],strategy:"absolute"};function kt(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Pt(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?At:r;return function(t,e,i){void 0===i&&(i=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},At,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var r="function"==typeof i?i(a.options):i;u(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:k(t)?dt(t):t.contextElement?dt(t.contextElement):[],popper:dt(e)};var s,c,f=function(t){var e=Et(t);return O.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((s=[].concat(n,a.options.modifiers),c=s.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=f.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,r=t.effect;if("function"==typeof r){var o=r({state:a,name:e,instance:h,options:n}),s=function(){};l.push(o||s)}})),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(kt(e,i)){a.rects={reference:Ot(e,Y(i),"fixed"===a.options.strategy),popper:N(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var r=a.orderedModifiers[n],o=r.fn,s=r.options,l=void 0===s?{}:s,u=r.name;"function"==typeof o&&(a=o({state:a,options:l,name:u,instance:h})||a)}else a.reset=!1,n=-1}}},update:(r=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){u(),c=!0}};if(!kt(t,e))return h;function u(){l.forEach((function(t){return t()})),l=[]}return h.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),h}}var Dt=Pt(),Ft=Pt({defaultModifiers:[rt,St,it,F,Ct,bt,Tt,J,xt]}),jt=Pt({defaultModifiers:[rt,St,it,F]})},1874(t,e,i){var n,r,o;r=[i(1669)],n=function(t){"use strict";var e=function(t,e){if("string"!=typeof e||e.length){var i="string"==typeof e?new RegExp(e,"i"):e,n=function(t){var e=0;if(3===t.nodeType){var r=t.data.search(i);if(r>=0&&t.data.length>0){var o=t.data.match(i),s=document.createElement("span");s.className="highlight";var a=t.splitText(r),l=(a.splitText(o[0].length),a.cloneNode(!0));s.appendChild(l),a.parentNode.replaceChild(s,a),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&("highlight"!==t.className||"SPAN"!==t.tagName))for(var c=0;c<t.childNodes.length;++c)c+=n(t.childNodes[c]);return e};return t.each((function(){n(this)}))}};t.fn.removeHighlight=function(){return this.find("span.highlight").each((function(){this.parentNode.firstChild.nodeName;var t=this.parentNode;t.replaceChild(this.firstChild,this),t.normalize()})).end()};var i=function(){};i.prototype={on:function(t,e){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)},off:function(t,e){var i=arguments.length;return 0===i?delete this._events:1===i?delete this._events[t]:(this._events=this._events||{},void(t in this._events!=0&&this._events[t].splice(this._events[t].indexOf(e),1)))},trigger:function(t){const e=this._events=this._events||{};if(t in e!=0)for(var i=0;i<e[t].length;
2i++)e[t][i].apply(this,Array.prototype.slice.call(arguments,1))}},i.mixin=function(t){for(var e=["on","off","trigger"],n=0;n<e.length;n++)t.prototype[e[n]]=i.prototype[e[n]]};var n={mixin:function(t){t.plugins={},t.prototype.initializePlugins=function(t){var e,i,n,o=this,s=[];if(o.plugins={names:[],settings:{},requested:{},loaded:{}},r.isArray(t))for(e=0,i=t.length;e<i;e++)"string"==typeof t[e]?s.push(t[e]):(o.plugins.settings[t[e].name]=t[e].options,s.push(t[e].name));else if(t)for(n in t)t.hasOwnProperty(n)&&(o.plugins.settings[n]=t[n],s.push(n));for(;s.length;)o.require(s.shift())},t.prototype.loadPlugin=function(e){var i=this,n=i.plugins,r=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=r.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)},t.prototype.require=function(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]},t.define=function(e,i){t.plugins[e]={name:e,fn:i}}}},r={isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},o=function(t,e){this.items=t,this.settings=e||{diacritics:!0}};o.prototype.tokenize=function(t,e){if(!(t=c(String(t||"").toLowerCase()))||!t.length)return[];var i,n,r,o,s=[],a=t.split(/ +/);for(i=0,n=a.length;i<n;i++){if(r=h(a[i]),this.settings.diacritics)for(o in f)f.hasOwnProperty(o)&&(r=r.replace(new RegExp(o,"g"),f[o]));e&&(r="\\b"+r),s.push({string:a[i],regex:new RegExp(r,"i")})}return s},o.prototype.iterator=function(t,e){var i;i=u(t)?Array.prototype.forEach||function(t){for(var e=0,i=this.length;e<i;e++)t(this[e],e,this)}:function(t){for(var e in this)this.hasOwnProperty(e)&&t(this[e],e,this)},i.apply(t,[e])},o.prototype.getScoreFunction=function(t,e){var i,n,r,o;t=this.prepareSearch(t,e),n=t.tokens,i=t.options.fields,r=n.length,o=t.options.nesting;var s,a=function(t,e){var i,n;return t?-1===(n=(t=String(t||"")).search(e.regex))?0:(i=e.string.length/t.length,0===n&&(i+=.5),i):0},c=(s=i.length)?1===s?function(t,e){return a(l(e,i[0],o),t)}:function(t,e){for(var n=0,r=0;n<s;
2n++)r+=a(l(e,i[n],o),t);return r/s}:function(){return 0};return r?1===r?function(t){return c(n[0],t)}:"and"===t.options.conjunction?function(t){for(var e,i=0,o=0;i<r;i++){if((e=c(n[i],t))<=0)return 0;o+=e}return o/r}:function(t){for(var e=0,i=0;e<r;e++)i+=c(n[e],t);return i/r}:function(){return 0}},o.prototype.getSortFunction=function(t,e){var i,n,r,o,a,c,h,u,f,d,p;if(p=!(t=(r=this).prepareSearch(t,e)).query&&e.sort_empty||e.sort,f=function(t,i){return"$score"===t?i.score:l(r.items[i.id],t,e.nesting)},a=[],p)for(i=0,n=p.length;i<n;i++)(t.query||"$score"!==p[i].field)&&a.push(p[i]);if(t.query){for(d=!0,i=0,n=a.length;i<n;i++)if("$score"===a[i].field){d=!1;break}d&&a.unshift({field:"$score",direction:"desc"})}else for(i=0,n=a.length;i<n;i++)if("$score"===a[i].field){a.splice(i,1);break}for(u=[],i=0,n=a.length;i<n;i++)u.push("desc"===a[i].direction?-1:1);return(c=a.length)?1===c?(o=a[0].field,h=u[0],function(t,e){return h*s(f(o,t),f(o,e))}):function(t,e){var i,n,r;for(i=0;i<c;i++)if(r=a[i].field,n=u[i]*s(f(r,t),f(r,e)))return n;return 0}:null},o.prototype.prepareSearch=function(t,e){if("object"==typeof t)return t;var i=(e=a({},e)).fields,n=e.sort,r=e.sort_empty;return i&&!u(i)&&(e.fields=[i]),n&&!u(n)&&(e.sort=[n]),r&&!u(r)&&(e.sort_empty=[r]),{options:e,query:String(t||"").toLowerCase(),tokens:this.tokenize(t,e.respect_word_boundaries),total:0,items:[]}},o.prototype.search=function(t,e){var i,n,r,o,s=this;return n=this.prepareSearch(t,e),e=n.options,t=n.query,o=e.score||s.getScoreFunction(n),t.length?s.iterator(s.items,(function(t,r){i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:r})})):s.iterator(s.items,(function(t,e){n.items.push({score:1,id:e})})),(r=s.getSortFunction(n,e))&&n.items.sort(r),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n};var s=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=d(String(t||"")))>(e=d(String(e||"")))?1:e>t?-1:0},a=function(t,e){var i,n,r,o;for(i=1,n=arguments.length;i<n;i++)if(o=arguments[i])for(r in o)o.hasOwnProperty(r)&&(t[r]=o[r]);return t},l=function(t,e,i){if(t&&e){if(!i)return t[e];for(var n=e.split(".");n.length&&(t=t[n.shift()]););return t}},c=function(t){return(t+"").replace(/^\s+|\s+$|/g,"")},h=function(t){return(t+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},u=Array.isArray||void 0!==t&&t.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},f={a:"[aá¸á¸ÄÄÃâÇÇȺⱥȦȧẠạÃäÃà ÃáÄÄÃãÃ
Ã¥Ä
ÄÃÄ
Ä]",b:"[bâ¢Î²ÎB฿ðá]",c:"[cÄÄÄÄÄÄÄÄCÌcÌÃçá¸á¸È»È¼ÆÆÉá´ï¼£ï½]",d:"[dÄÄá¸á¸á¸á¸á¸á¸á¸á¸á¸á¸ÄÄD̦d̦ÆÉÆÉÆÆáµá¶á¶È¡á´
Dï½Ã°]",e:"[eÃéÃèÃêá¸á¸ÄÄÄÄẼẽá¸á¸áººáº»ÄÄÃëÄÄȨȩÄÄá¶ÉÉÈÈ
Ếếá»á»á»á»
á»á»á¸á¸á¸á¸á¸á¸ÈÈẸẹá»á»â±¸á´ï¼¥ï½
ÉÇÆÆÎµ]",f:"[fÆÆá¸á¸]",g:"[gÉ¢â²Ç¤Ç¥ÄÄÄÄĢģÆÉ Ä Ä¡]",h:"[hĤĥĦħḨḩáºáºá¸¤á¸¥á¸¢á¸£É¦Ê°Ç¶Æ]",i:"[iÃÃÃìĬÄÃîÇÇÃïḮḯĨĩĮįĪīá»á»ÈÈÈÈá»á»á¸¬á¸ÆÉ¨É¨Ìáµ»á¶Ä°iIıɪIï½]",j:"[jȷĴĵÉÉÊÉʲ]",k:"[kÆÆêêḰḱǨǩḲḳḴḵκϰâ]",l:"[lÅÅĽľĻļĹĺḶḷḸḹḼḽḺḻĿÅȽÆâ± ⱡⱢɫɬá¶
ÉÈ´ÊLï½]",n:"[nÅÅǸǹÅÅÃñá¹á¹
Å
Åá¹á¹á¹á¹á¹á¹NÌnÌÆÉ²È Æáµ°á¶É³ÈµÉ´ï¼®ï½ÅÅ]",o:"[oÃøÃöÃóÃòÃôÇÇÅÅÅÅȮȯá»á»ÆÉµÆ Æ¡á»á»ÅÅÃõǪǫÈÈÕÖ
]",p:"[pá¹á¹á¹á¹â±£áµ½Æ¤Æ¥áµ±]",q:"[qêêÊ ÉÉêêqÌ]",r:"[rÅÅÉÉÅÅÅÅá¹á¹ÈÈÈÈá¹á¹â±¤É½]",s:"[sÅÅṠṡṢṣê¨ê©ÅÅÅ Å¡ÅÅÈÈSÌsÌ]",t:"[tÅ¤Å¥á¹ªá¹«Å¢Å£á¹¬á¹Æ®ÊÈÈṰṱṮṯƬÆ]",u:"[uŬÅÉÊỤụÃüÃúÃùÃûÇÇŰűŬů¯Æ°á»¦á»§ÅªÅ«Å¨Å©Å²Å³ÈÈâª]",v:"[vṼṽṾṿƲÊêêâ±±Ê]",w:"[wáºáºáºáºÅ´Åµáºáº
áºáºáºáº]",x:"[xáºáºáºáºÏ]",y:"[yÃýỲỳŶŷŸÿỸỹáºáºá»´á»µÉÉÆ³Æ´]",z:"[zŹźáºáºÅ½Å¾Å»Å¼áºáºáºáºÆµÆ¶]"},d=function(){var t,e,i,n,r="",o={};for(i in f)if(f.hasOwnProperty(i))for(r+=n=f[i].substring(2,f[i].length-1),t=0,e=n.length;t<e;t++)o[n.charAt(t)]=i;var s=new RegExp("["+r+"]","g");return function(t){return t.replace(s,(function(t){return o[t]})).toLowerCase()}}();function p(t,e){return navigator.userAgentData?t===navigator.userAgentData.platform:e.test(navigator.userAgent)}var g=p("macOS",/Mac/),m=65,v=13,y=27,b=37,_=38,w=80,x=39,C=40,S=78,T=8,O=46,E=16,A=g?91:17,k=g?18:17,P=9,D=1,F=2,j=!p("Android",/android/i)&&!!document.createElement("input").validity,I=function(t){return void 0!==t},M=function(t){return null==t?null:"boolean"==typeof t?t?"1":"0":t+""},L=function(t){return(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}
2,R={before:function(t,e,i){var n=t[e];t[e]=function(){return i.apply(t,arguments),n.apply(t,arguments)}},after:function(t,e,i){var n=t[e];t[e]=function(){var e=n.apply(t,arguments);return i.apply(t,arguments),e}}},B=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},$=function(t,e){var i;return function(){var n=this,r=arguments;window.clearTimeout(i),i=window.setTimeout((function(){t.apply(n,r)}),e)}},N=function(t,e,i){var n,r=t.trigger,o={};for(n in t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return r.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=r,o)o.hasOwnProperty(n)&&r.apply(t,o[n])},z=function(t,e,i,n){t.on(e,i,(function(e){for(var i=e.target;i&&i.parentNode!==t[0];)i=i.parentNode;return e.currentTarget=i,n.apply(this,[e])}))},V=function(t){var e={};if(void 0===t)return console.warn("WARN getInputSelection cannot locate input control"),e;if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var i=document.selection.createRange(),n=document.selection.createRange().text.length;i.moveStart("character",-t.value.length),e.start=i.text.length-n,e.length=n}return e},W=function(t,e,i){var n,r,o={};if(i)for(n=0,r=i.length;n<r;n++)o[i[n]]=t.css(i[n]);else o=t.css();e.css(o)},H=function(e,i){return e?(G.$testInput||(G.$testInput=t("<span />").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),t("<div />").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(G.$testInput).appendTo("body")),G.$testInput.text(e),W(i,G.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),G.$testInput.width()):0},U=function(t){var e=null,i=function(i,n){var r,o,s,a,l,c,h,u,f;n=n||{},(i=i||window.event||{}).metaKey||i.altKey||(n.force||!1!==t.data("grow"))&&(r=t.val(),i.type&&"keydown"===i.type.toLowerCase()&&(s=(o=i.keyCode)>=48&&o<=57||o>=65&&o<=90||o>=96&&o<=111||o>=186&&o<=222||32===o,o===O||o===T?(f=V(t[0])).length?r=r.substring(0,f.start)+r.substring(f.start+f.length):o===T&&f.start?r=r.substring(0,f.start-1)+r.substring(f.start+1):o===O&&void 0!==f.start&&(r=r.substring(0,f.start)+r.substring(f.start+1)):s&&(h=i.shiftKey,u=String.fromCharCode(i.keyCode),r+=u=h?u.toUpperCase():u.toLowerCase())),c=(l=t.attr("placeholder"))?H(l,t)+4:0,(a=Math.max(H(r,t),c)+4)!==e&&(e=a,t.width(a),t.triggerHandler("resize")))};t.on("keydown keyup update blur",i),i()},X=function(t){var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML},Y=function(t){try{JSON.parse(str)}catch(t){return!1}return!0},G=function(e,i){var n,r,s,a,l=this;(a=e[0]).selectize=l;var c=window.getComputedStyle&&window.getComputedStyle(a,null);if(s=(s=c?c.getPropertyValue("direction"):a.currentStyle&&a.currentStyle.direction)||e.parents("[dir]:first").attr("dir")||"",t.extend(l,{order:0,settings:i,$input:e,tabIndex:e.attr("tabindex")||"",tagType:"select"===a.tagName.toLowerCase()?D:F,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++G.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:e.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",lastValidValue:"",lastOpenTarget:!1,caretPos:0,loading:0,loadedSearches:{},isDropdownClosing:!1,$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===i.loadThrottle?l.onSearchChange:$(l.onSearchChange,i.loadThrottle)}),l.sifter=new o(this.options,{diacritics:i.diacritics}),l.settings.options){for(n=0,r=l.settings.options.length;n<r;n++)l.registerOption(l.settings.options[n]);delete l.settings.options}if(l.settings.optgroups){for(n=0,r=l.settings.optgroups.length;n<r;n++)l.registerOptionGroup(l.settings.optgroups[n]);delete l.settings.optgroups}l.settings.mode=l.settings.mode||(1===l.settings.maxItems?"single":"multi"),"boolean"!=typeof l.settings.hideSelected&&(l.settings.hideSelected="multi"===l.settings.mode),l.initializePlugins(l.settings.plugins),l.setupCallbacks(),l.setupTemplates(),l.setup()};return i.mixin(G),n.mixin(G),t.extend(G.prototype,{setup:function(){var e,i,n,r,o,s,a,l,c,h,u=this,f=u.settings,d=u.eventNS,p=t(window),m=t(document),v=u.$input;if(a=u.settings.mode,l=v.attr("class")||"",e=t("<div>").addClass(f.wrapperClass).addClass(l+" selectize-control").addClass(a),i=t("<div>").addClass(f.inputClass+" selectize-input items").appendTo(e),n=t('<input type="select-one" autocomplete="new-password" autofill="no" />').appendTo(i).attr("tabindex",v.is(":disabled")?"-1":u.tabIndex),s=t(f.dropdownParent||e),r=t("<div>").addClass(f.dropdownClass).addClass(a+" selectize-dropdown").hide().appendTo(s),o=t("<
2div>").addClass(f.dropdownContentClass+" selectize-dropdown-content").attr("tabindex","-1").appendTo(r),(h=v.attr("id"))&&(n.attr("id",h+"-selectized"),t("label[for='"+h+"']").attr("for",h+"-selectized")),u.settings.copyClassesToDropdown&&r.addClass(l),e.css({width:v[0].style.width}),u.plugins.names.length&&(c="plugin-"+u.plugins.names.join(" plugin-"),e.addClass(c),r.addClass(c)),(null===f.maxItems||f.maxItems>1)&&u.tagType===D&&v.attr("multiple","multiple"),u.settings.placeholder&&n.attr("placeholder",f.placeholder),u.settings.search||(n.attr("readonly",!0),n.attr("inputmode","none"),i.css("cursor","pointer")),!u.settings.splitOn&&u.settings.delimiter){var y=u.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");u.settings.splitOn=new RegExp("\\s*"+y+"+\\s*")}v.attr("autocorrect")&&n.attr("autocorrect",v.attr("autocorrect")),v.attr("autocapitalize")&&n.attr("autocapitalize",v.attr("autocapitalize")),v.is("input")&&(n[0].type=v[0].type),u.$wrapper=e,u.$control=i,u.$control_input=n,u.$dropdown=r,u.$dropdown_content=o,r.on("mouseenter mousedown mouseup click","[data-disabled]>[data-selectable]",(function(t){t.stopImmediatePropagation()})),r.on("mouseenter","[data-selectable]",(function(){return u.onOptionHover.apply(u,arguments)})),r.on("mouseup click","[data-selectable]",(function(){return u.onOptionSelect.apply(u,arguments)})),z(i,"mouseup","*:not(input)",(function(){return u.onItemSelect.apply(u,arguments)})),U(n),i.on({mousedown:function(){return u.onMouseDown.apply(u,arguments)},click:function(){return u.onClick.apply(u,arguments)}}),n.on({mousedown:function(t){(""!==u.$control_input.val()||u.settings.openOnFocus)&&t.stopPropagation()},keydown:function(){return u.onKeyDown.apply(u,arguments)},keypress:function(){return u.onKeyPress.apply(u,arguments)},input:function(){return u.onInput.apply(u,arguments)},resize:function(){u.positionDropdown.apply(u,[])},focus:function(){return u.ignoreBlur=!1,u.onFocus.apply(u,arguments)},paste:function(){return u.onPaste.apply(u,arguments)}}),m.on("keydown"+d,(function(t){u.isCmdDown=t[g?"metaKey":"ctrlKey"],u.isCtrlDown=t[g?"altKey":"ctrlKey"],u.isShiftDown=t.shiftKey})),m.on("keyup"+d,(function(t){t.keyCode===k&&(u.isCtrlDown=!1),t.keyCode===E&&(u.isShiftDown=!1),t.keyCode===A&&(u.isCmdDown=!1)})),m.on("mousedown"+d,(function(t){if(u.isFocused){if(t.target===u.$dropdown[0]||t.target.parentNode===u.$dropdown[0])return!1;u.$dropdown.has(t.target).length||t.target===u.$control[0]||u.blur(t.target)}})),p.on(["scroll"+d,"resize"+d].join(" "),(function(){u.isOpen&&u.positionDropdown.apply(u,arguments)})),p.on("mousemove"+d,(function(){u.ignoreHover=u.settings.ignoreHover}));var b=t("<div></div>"),_=v.children().detach();v.replaceWith(b),b.replaceWith(v),this.revertSettings={$children:_,tabindex:v.attr("tabindex")},v.attr("tabindex",-1).hide().after(u.$wrapper),Array.isArray(f.items)&&(u.lastValidValue=f.items,u.setValue(f.items),delete f.items),j&&v.on("invalid"+d,(function(t){t.preventDefault(),u.isInvalid=!0,u.refreshState()})),u.updateOriginalInput(),u.refreshItems(),u.refreshState(),u.updatePlaceholder(),u.isSetup=!0,v.is(":disabled")&&u.disable(),u.on("change",this.onChange),v.data("selectize",u),v.addClass("selectized"),u.trigger("initialize"),!0===f.preload&&u.onSearchChange("")},setupTemplates:function(){var e=this,i=e.settings.labelField,n=e.settings.valueField,r=e.settings.optgroupLabelField,o={optgroup:function(t){return'<div class="optgroup">'+t.html+"</div>"},optgroup_header:function(t,e){return'<div class="optgroup-header">'+e(t[r])+"</div>"},option:function(t,e){var r=t.classes?" "+t.classes:"";return r+=""===t[n]?" selectize-dropdown-emptyoptionlabel":"","<div"+(t.styles?' style="'+t.styles+'"':"")+' class="option'+r+'">'+e(t[i])+"</div>"},item:function(t,e){return'<div class="item">'+e(t[i])+"</div>"},option_create:function(t,e){return'<div class="create">Add <strong>'+e(t.input)+"</strong>…</div>"}};e.settings.render=t.extend({},o,e.settings.render)},setupCallbacks:function(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(t in i)i.hasOwnProperty(t)&&(e=this.settings[i[t]])&&this.on(t,e)},onClick:function(t){var e=this;e.isDropdownClosing||e.isFocused&&e.isOpen||(e.focus(),t.preventDefault())},onMouseDown:function(e){var i=this,n=e.isDefaultPrevented();if(t(e.target),i.isFocused||n||window.setTimeout((function(){i.focus()}),0),e.target!==i.$control_input[0]||""===i.$control_input.val())return"single"===i.settings.mode?i.isOpen?i.close():i.open():(n||i.setActiveItem(null),i.settings.openOnFocus||(i.isOpen&&e.target===i.lastOpenTarget?(i.close(),i.lastOpenTarget=!1):(i.isOpen||(i.refreshOptions(),i.open()),i.lastOpenTarget=e.target))),!1},onChange:function(){var t=this;""!==t.getValue()&&(t.lastValidValue=t.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(t){var e=this;
2e.isFull()||e.isInputHidden||e.isLocked?t.preventDefault():e.settings.splitOn&&setTimeout((function(){var t=e.$control_input.val();if(t.match(e.settings.splitOn))for(var i=t.trim().split(e.settings.splitOn),n=0,r=i.length;n<r;n++)e.createItem(i[n])}),0)},onKeyPress:function(t){if(this.isLocked)return t&&t.preventDefault();var e=String.fromCharCode(t.keyCode||t.which);return this.settings.create&&"multi"===this.settings.mode&&e===this.settings.delimiter?(this.createItem(),t.preventDefault(),!1):void 0},onKeyDown:function(t){t.target,this.$control_input[0];var e=this;if(e.isLocked)t.keyCode!==P&&t.preventDefault();else{switch(t.keyCode){case m:if(e.isCmdDown)return void e.selectAll();break;case y:return void(e.isOpen&&(t.preventDefault(),t.stopPropagation(),e.close()));case S:if(!t.ctrlKey||t.altKey)break;case C:if(!e.isOpen&&e.hasOptions)e.open();else if(e.$activeOption){e.ignoreHover=!0;var i=e.getAdjacentOption(e.$activeOption,1);i.length&&e.setActiveOption(i,!0,!0)}return void t.preventDefault();case w:if(!t.ctrlKey||t.altKey)break;case _:if(e.$activeOption){e.ignoreHover=!0;var n=e.getAdjacentOption(e.$activeOption,-1);n.length&&e.setActiveOption(n,!0,!0)}return void t.preventDefault();case v:return void(e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),t.preventDefault()));case b:return void e.advanceSelection(-1,t);case x:return void e.advanceSelection(1,t);case P:return e.settings.selectOnTab&&e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),e.isFull()||t.preventDefault()),void(e.settings.create&&e.createItem()&&e.settings.showAddOptionOnCreate&&t.preventDefault());case T:case O:return void e.deleteSelection(t)}!e.isFull()&&!e.isInputHidden||(g?t.metaKey:t.ctrlKey)||t.preventDefault()}},onInput:function(t){var e=this,i=e.$control_input.val()||"";e.lastValue!==i&&(e.lastValue=i,e.onSearchChange(i),e.refreshOptions(),e.trigger("type",i))},onSearchChange:function(t){var e=this,i=e.settings.load;i&&(e.loadedSearches.hasOwnProperty(t)||(e.loadedSearches[t]=!0,e.load((function(n){i.apply(e,[t,n])}))))},onFocus:function(t){var e=this,i=e.isFocused;if(e.isDisabled)return e.blur(),t&&t.preventDefault(),!1;e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.onSearchChange(""),i||e.trigger("focus"),e.$activeItems.length||(e.showInput(),e.setActiveItem(null),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())},onBlur:function(t,e){var i=this;if(i.isFocused&&(i.isFocused=!1,!i.ignoreFocus)){var n=function(){i.close(),i.setTextboxValue(""),i.setActiveItem(null),i.setActiveOption(null),i.setCaret(i.items.length),i.refreshState(),e&&e.focus&&e.focus(),i.isBlurring=!1,i.ignoreFocus=!1,i.trigger("blur")};i.isBlurring=!0,i.ignoreFocus=!0,i.settings.create&&i.settings.createOnBlur?i.createItem(null,!1,n):n()}},onOptionHover:function(t){this.ignoreHover||this.setActiveOption(t.currentTarget,!1)},onOptionSelect:function(e){var i,n,r=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),(n=t(e.currentTarget)).hasClass("create")?r.createItem(null,(function(){r.settings.closeAfterSelect&&r.close()})):void 0!==(i=n.attr("data-value"))&&(r.lastQuery=null,r.setTextboxValue(""),r.addItem(i),r.settings.closeAfterSelect?r.close():!r.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&r.setActiveOption(r.getOption(i)))},onItemSelect:function(t){var e=this;e.isLocked||"multi"===e.settings.mode&&(t.preventDefault(),e.setActiveItem(t.currentTarget,t))},load:function(t){var e=this,i=e.$wrapper.addClass(e.settings.loadingClass);e.loading++,t.apply(e,[function(t){e.loading=Math.max(e.loading-1,0),t&&t.length&&(e.addOption(t),e.refreshOptions(e.isFocused&&!e.isInputHidden)),e.loading||i.removeClass(e.settings.loadingClass),e.trigger("load",t)}])},getTextboxValue:function(){return this.$control_input.val()},setTextboxValue:function(t){var e=this.$control_input;e.val()!==t&&(e.val(t).triggerHandler("update"),this.lastValue=t)},getValue:function(){return this.tagType===D&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(t,e){(Array.isArray(t)?t:[t]).join("")!==this.items.join("")&&N(this,e?[]:["change"],(function(){this.clear(e),this.addItems(t,e)}))}
2,setMaxItems:function(t){0===t&&(t=null),this.settings.maxItems=t,this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),this.refreshState()},setActiveItem:function(e,i){var n,r,o,s,a,l,c,h,u=this;if("single"!==u.settings.mode){if(!(e=t(e)).length)return t(u.$activeItems).removeClass("active"),u.$activeItems=[],void(u.isFocused&&u.showInput());if("mousedown"===(n=i&&i.type.toLowerCase())&&u.isShiftDown&&u.$activeItems.length){for(h=u.$control.children(".active:last"),(s=Array.prototype.indexOf.apply(u.$control[0].childNodes,[h[0]]))>(a=Array.prototype.indexOf.apply(u.$control[0].childNodes,[e[0]]))&&(c=s,s=a,a=c),r=s;r<=a;r++)l=u.$control[0].childNodes[r],-1===u.$activeItems.indexOf(l)&&(t(l).addClass("active"),u.$activeItems.push(l));i.preventDefault()}else"mousedown"===n&&u.isCtrlDown||"keydown"===n&&this.isShiftDown?e.hasClass("active")?(o=u.$activeItems.indexOf(e[0]),u.$activeItems.splice(o,1),e.removeClass("active")):u.$activeItems.push(e.addClass("active")[0]):(t(u.$activeItems).removeClass("active"),u.$activeItems=[e.addClass("active")[0]]);u.hideInput(),this.isFocused||u.focus()}},setActiveOption:function(e,i,n){var r,o,s,a,l,c=this;c.$activeOption&&(c.$activeOption.removeClass("active"),c.trigger("dropdown_item_deactivate",c.$activeOption.attr("data-value"))),c.$activeOption=null,(e=t(e)).length&&(c.$activeOption=e.addClass("active"),c.isOpen&&c.trigger("dropdown_item_activate",c.$activeOption.attr("data-value")),!i&&I(i)||(r=c.$dropdown_content.height(),o=c.$activeOption.outerHeight(!0),i=c.$dropdown_content.scrollTop()||0,a=s=c.$activeOption.offset().top-c.$dropdown_content.offset().top+i,l=s-r+o,s+o>r+i?c.$dropdown_content.stop().animate({scrollTop:l},n?c.settings.scrollDuration:0):s<i&&c.$dropdown_content.stop().animate({scrollTop:a},n?c.settings.scrollDuration:0)))},selectAll:function(){var t=this;"single"!==t.settings.mode&&(t.$activeItems=Array.prototype.slice.apply(t.$control.children(":not(input)").addClass("active")),t.$activeItems.length&&(t.hideInput(),t.close()),t.focus())},hideInput:function(){var t=this;t.setTextboxValue(""),t.$control_input.css({opacity:0,position:"absolute",left:t.rtl?1e4:0}),t.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var t=this;return t.isDisabled||(t.ignoreFocus=!0,t.$control_input[0].focus(),window.setTimeout((function(){t.ignoreFocus=!1,t.onFocus()}),0)),t},blur:function(t){return this.$control_input[0].blur(),this.onBlur(null,t),this},getScoreFunction:function(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())},getSearchOptions:function(){var t=this.settings,e=t.sortField;return"string"==typeof e&&(e=[{field:e}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting,filter:t.filter,respect_word_boundaries:t.respect_word_boundaries}},search:function(e){var i,n,r,o=this,s=o.settings,a=this.getSearchOptions();if(s.score&&"function"!=typeof(r=o.settings.score.apply(this,[e])))throw new Error('Selectize "score" setting must be a function that returns a function');if(e!==o.lastQuery?(s.normalize&&(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),o.lastQuery=e,n=o.sifter.search(e,t.extend(a,{score:r})),o.currentResults=n):n=t.extend(!0,{},o.currentResults),s.hideSelected)for(i=n.items.length-1;i>=0;i--)-1!==o.items.indexOf(M(n.items[i].id))&&n.items.splice(i,1);return n},refreshOptions:function(i){var n,r,o,s,a,l,c,h,u,f,d,p,g,m,v,y;void 0===i&&(i=!0);var b=this,_=b.$control_input.val().trim(),w=b.search(_),x=b.$dropdown_content,C=b.$activeOption&&M(b.$activeOption.attr("data-value"));for(s=w.items.length,"number"==typeof b.settings.maxOptions&&(s=Math.min(s,b.settings.maxOptions)),a={},l=[],n=0;n<s;n++)for(c=b.options[w.items[n].id],h=b.render("option",c),u=c[b.settings.optgroupField]||"",r=0,o=(f=Array.isArray(u)?u:[u])&&f.length;r<o;r++){var S;u=f[r],b.optgroups.hasOwnProperty(u)||"function"!=typeof b.settings.optionGroupRegister||(S=b.settings.optionGroupRegister.apply(b,[u]))&&b.registerOptionGroup(S),b.optgroups.hasOwnProperty(u)||(u=""),a.hasOwnProperty(u)||(a[u]=document.createDocumentFragment(),l.push(u)),a[u].appendChild(h)}for(this.settings.lockOptgroupOrder&&l.sort((function(t,e){return(b.optgroups[t]&&b.optgroups[t].$order||0)-(b.optgroups[e]&&b.optgroups[e].$order||0)})),d=document.createDocumentFragment(),n=0,s=l.length;n<s;n++)u=l[n],b.optgroups.hasOwnProperty(u)&&a[u].childNodes.length?((p=document.createDocumentFragment()).appendChild(b.render("optgroup_header",b.optgroups[u])),p.appendChild(a[u]),d.appendChild(b.render("optgroup",t.extend({},b.optgroups[u],{html:X(p),dom:p})))):d.appendChild(a[u]);if(x.html(d),b.settings.highlight&&(x.removeHighlight(),w.query.length&&w.tokens.length))for(n=0,s=w.tokens.length;n<s;n++)e(x,w.tokens[n].regex);if(!b.settings.hideSelected)for(b.$dropdown.find(".selected").removeClass("selected"),n=0,s=b.items.length;n<s;n++)b.getOption(b.items[n]).addClass("selected");"auto"!==b.settings.dropdownSize.sizeType&&b.isOpen&&b.setupDropdownHeight(),(g=b.canCreate(_))&&b.settings.showAddOptionOnCreate&&(x.prepend(b.render("option_create",{input
2:_})),y=t(x[0].childNodes[0])),b.hasOptions=w.items.length>0||g&&b.settings.showAddOptionOnCreate||b.settings.setFirstOptionActive,b.hasOptions?(w.items.length>0?(v=C&&b.getOption(C),""!==w.query&&b.settings.setFirstOptionActive?m=x.find("[data-selectable]:first"):""!==w.query&&v&&v.length?m=v:"single"===b.settings.mode&&b.items.length&&(m=b.getOption(b.items[0])),m&&m.length||(m=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):x.find("[data-selectable]:first"))):m=y,b.setActiveOption(m),i&&!b.isOpen&&b.open()):(b.setActiveOption(null),i&&b.isOpen&&b.close())},addOption:function(t){var e,i,n,r=this;if(Array.isArray(t))for(e=0,i=t.length;e<i;e++)r.addOption(t[e]);else(n=r.registerOption(t))&&(r.userOptions[n]=!0,r.lastQuery=null,r.trigger("option_add",n,t))},registerOption:function(t){var e=M(t[this.settings.valueField]);return null!=e&&!this.options.hasOwnProperty(e)&&(t.$order=t.$order||++this.order,this.options[e]=t,e)},registerOptionGroup:function(t){var e=M(t[this.settings.optgroupValueField]);return!!e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)},addOptionGroup:function(t,e){e[this.settings.optgroupValueField]=t,(t=this.registerOptionGroup(e))&&this.trigger("optgroup_add",t,e)},removeOptionGroup:function(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.renderCache={},this.trigger("optgroup_remove",t))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(e,i){var n,r,o,s,a,l,c,h=this;if(e=M(e),o=M(i[h.settings.valueField]),null!==e&&h.options.hasOwnProperty(e)){if("string"!=typeof o)throw new Error("Value must be set in option data");c=h.options[e].$order,o!==e&&(delete h.options[e],-1!==(s=h.items.indexOf(e))&&h.items.splice(s,1,o)),i.$order=i.$order||c,h.options[o]=i,a=h.renderCache.item,l=h.renderCache.option,a&&(delete a[e],delete a[o]),l&&(delete l[e],delete l[o]),-1!==h.items.indexOf(o)&&(n=h.getItem(e),r=t(h.render("item",i)),n.hasClass("active")&&r.addClass("active"),n.replaceWith(r)),h.lastQuery=null,h.isOpen&&h.refreshOptions(!1)}},removeOption:function(t,e){var i=this;t=M(t);var n=i.renderCache.item,r=i.renderCache.option;n&&delete n[t],r&&delete r[t],delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)},clearOptions:function(e){var i=this;i.loadedSearches={},i.userOptions={},i.renderCache={};var n=i.options;t.each(i.options,(function(t,e){-1==i.items.indexOf(t)&&delete n[t]})),i.options=i.sifter.items=n,i.lastQuery=null,i.trigger("option_clear"),i.clear(e)},getOption:function(t){return this.getElementWithValue(t,this.$dropdown_content.find("[data-selectable]"))},getFirstOption:function(){var e=this.$dropdown.find("[data-selectable]");return e.length>0?e.eq(0):t()},getAdjacentOption:function(e,i){var n=this.$dropdown.find("[data-selectable]"),r=n.index(e)+i;return r>=0&&r<n.length?n.eq(r):t()},getElementWithValue:function(e,i){if(null!=(e=M(e)))for(var n=0,r=i.length;n<r;n++)if(i[n].getAttribute("data-value")===e)return t(i[n]);return t()},getElementWithTextContent:function(e,i,n){if(null!=(e=M(e)))for(var r=0,o=n.length;r<o;r++){var s=n[r].textContent;if(1==i&&(s=null!==s?s.toLowerCase():null,e=e.toLowerCase()),s===e)return t(n[r])}return t()},getItem:function(t){return this.getElementWithValue(t,this.$control.children())},getFirstItemMatchedByTextContent:function(t,e){return e=null!==e&&!0===e,this.getElementWithTextContent(t,e,this.$dropdown_content.find("[data-selectable]"))},addItems:function(t,e){this.buffer=document.createDocumentFragment();for(var i=this.$control[0].childNodes,n=0;n<i.length;n++)this.buffer.appendChild(i[n]);for(var r=Array.isArray(t)?t:[t],o=(n=0,r.length);n<o;n++)this.isPending=n<o-1,this.addItem(r[n],e);var s=this.$control[0];s.insertBefore(this.buffer,s.firstChild),this.buffer=null},addItem:function(e,i){N(this,i?[]:["change"],(function(){var n,r,o,s,a,l=this,c=l.settings.mode;e=M(e),-1===l.items.indexOf(e)?l.options.hasOwnProperty(e)&&("single"===c&&l.clear(i),"multi"===c&&l.isFull()||(n=t(l.render("item",l.options[e])),a=l.isFull(),l.items.splice(l.caretPos,0,e),l.insertAtCaret(n),(!l.isPending||!a&&l.isFull())&&l.refreshState(),l.
2isSetup&&(o=l.$dropdown_content.find("[data-selectable]"),l.isPending||(r=l.getOption(e),s=l.getAdjacentOption(r,1).attr("data-value"),l.refreshOptions(l.isFocused&&"single"!==c),s&&l.setActiveOption(l.getOption(s))),!o.length||l.isFull()?l.close():l.isPending||l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",e,n),l.isPending||l.updateOriginalInput({silent:i})))):"single"===c&&l.close()}))},removeItem:function(e,i){var n,r,o,s=this;n=e instanceof t?e:s.getItem(e),e=M(n.attr("data-value")),-1!==(r=s.items.indexOf(e))&&(s.trigger("item_before_remove",e,n),n.remove(),n.hasClass("active")&&(n.removeClass("active"),o=s.$activeItems.indexOf(n[0]),s.$activeItems.splice(o,1),n.removeClass("active")),s.items.splice(r,1),s.lastQuery=null,!s.settings.persist&&s.userOptions.hasOwnProperty(e)&&s.removeOption(e,i),r<s.caretPos&&s.setCaret(s.caretPos-1),s.refreshState(),s.updatePlaceholder(),s.updateOriginalInput({silent:i}),s.positionDropdown(),s.trigger("item_remove",e,n))},createItem:function(t,e){var i=this,n=i.caretPos;t=t||(i.$control_input.val()||"").trim();var r=arguments[arguments.length-1];if("function"!=typeof r&&(r=function(){}),"boolean"!=typeof e&&(e=!0),!i.canCreate(t))return r(),!1;i.lock();var o="function"==typeof i.settings.create?this.settings.create:function(t){var e={};e[i.settings.labelField]=t;var n=t;if(i.settings.formatValueToKey&&"function"==typeof i.settings.formatValueToKey&&(null==(n=i.settings.formatValueToKey.apply(this,[n]))||"object"==typeof n||"function"==typeof n))throw new Error('Selectize "formatValueToKey" setting must be a function that returns a value other than object or function.');return e[i.settings.valueField]=n,e},s=B((function(t){if(i.unlock(),!t||"object"!=typeof t)return r();var o=M(t[i.settings.valueField]);if("string"!=typeof o)return r();i.setTextboxValue(""),i.addOption(t),i.setCaret(n),i.addItem(o),i.refreshOptions(e&&"single"!==i.settings.mode),r(t)})),a=o.apply(this,[t,s]);return void 0!==a&&s(a),!0},refreshItems:function(t){this.lastQuery=null,this.isSetup&&this.addItem(this.items,t),this.refreshState(),this.updateOriginalInput({silent:t})},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var t=!this.items.length;this.isInvalid=t,this.$control_input.prop("required",t),this.$input.prop("required",!t)},refreshClasses:function(){var e=this,i=e.isFull(),n=e.isLocked;e.$wrapper.toggleClass("rtl",e.rtl),e.$control.toggleClass("focus",e.isFocused).toggleClass("disabled",e.isDisabled).toggleClass("required",e.isRequired).toggleClass("invalid",e.isInvalid).toggleClass("locked",n).toggleClass("full",i).toggleClass("not-full",!i).toggleClass("input-active",e.isFocused&&!e.isInputHidden).toggleClass("dropdown-active",e.isOpen).toggleClass("has-options",!t.isEmptyObject(e.options)).toggleClass("has-items",e.items.length>0),e.$control_input.data("grow",!i&&!n)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(t){var e,i,n,r,o,s,a=this;t=t||{},a.tagType===D?(r=a.$input.find("option"),e=[],i=[],n=[],s=[],r.get().forEach((function(t){e.push(t.value)})),a.items.forEach((function(t){o=a.options[t][a.settings.labelField]||"",s.push(t),-1==e.indexOf(t)&&i.push('<option value="'+L(t)+'" selected="selected">'+L(o)+"</option>")})),n=e.filter((function(t){return s.indexOf(t)<0})).map((function(t){return'option[value="'+t+'"]'})),e.length-n.length+i.length!==0||a.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),a.$input.find(n.join(", ")).remove(),a.$input.append(i.join(""))):(a.$input.val(a.getValue()),a.$input.attr("value",a.$input.val())),a.isSetup&&(t.silent||a.trigger("change",a.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.focus(),t.isOpen=!0,t.refreshState(),t.$dropdown.css({visibility:"hidden",display:"block"}),t.setupDropdownHeight(),t.positionDropdown(),t.$dropdown.css({visibility:"visible"}),t.trigger("dropdown_open",t.$dropdown))},close:function(){var t=this,e=t.isOpen;"single"===t.settings.mode&&t.items.length&&(t.hideInput(),t.isBlurring&&t.$control_input[0].blur()),t.isOpen=!1,t.$dropdown.hide(),t.setActiveOption(null),t.refreshState(),e&&t.trigger("dropdown_close",t.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position();e.top+=t.outerHeight(!0);var i=t[0].getBoundingClientRect().width;this.settings.minWidth&&this.settings.minWidth>i&&(i=this.settings.minWidth),this.$dropdown.css({width:i,top:e.top,left
2:e.left})},setupDropdownHeight:function(){if("object"==typeof this.settings.dropdownSize&&"auto"!==this.settings.dropdownSize.sizeType){var e=this.settings.dropdownSize.sizeValue;if("numberItems"===this.settings.dropdownSize.sizeType){for(var i=this.$dropdown_content.find("*").not(".optgroup, .highlight").not(this.settings.ignoreOnDropwdownHeight),n=0,r=0,o=0,s=0,a=0;a<e;a++){var l=t(i[a]);if(0===l.length)break;if(n+=l.outerHeight(!0),void 0===l.data("selectable")){if(l.hasClass("optgroup-header")){var c=window.getComputedStyle(l.parent()[0],":before");c&&(r=c.marginTop?Number(c.marginTop.replace(/\W*(\w)\w*/g,"$1")):0,o=c.marginBottom?Number(c.marginBottom.replace(/\W*(\w)\w*/g,"$1")):0,s=c.borderTopWidth?Number(c.borderTopWidth.replace(/\W*(\w)\w*/g,"$1")):0)}e++}}e=n+(this.$dropdown_content.css("padding-top")?Number(this.$dropdown_content.css("padding-top").replace(/\W*(\w)\w*/g,"$1")):0)+(this.$dropdown_content.css("padding-bottom")?Number(this.$dropdown_content.css("padding-bottom").replace(/\W*(\w)\w*/g,"$1")):0)+r+o+s+"px"}else if("fixedHeight"!==this.settings.dropdownSize.sizeType)return void console.warn('Selectize.js - Value of "sizeType" must be "fixedHeight" or "numberItems');this.$dropdown_content.css({height:e,maxHeight:"none"})}},clear:function(t){var e=this;e.items.length&&(e.$control.children(":not(input)").remove(),e.items=[],e.lastQuery=null,e.setCaret(0),e.setActiveItem(null),e.updatePlaceholder(),e.updateOriginalInput({silent:t}),e.refreshState(),e.showInput(),e.trigger("clear"))},insertAtCaret:function(t){var e=Math.min(this.caretPos,this.items.length),i=t[0],n=this.buffer||this.$control[0];0===e?n.insertBefore(i,n.firstChild):n.insertBefore(i,n.childNodes[e]),this.setCaret(e+1)},deleteSelection:function(e){var i,n,r,o,s,a,l,c,h,u=this;if(r=e&&e.keyCode===T?-1:1,o=V(u.$control_input[0]),u.$activeOption&&!u.settings.hideSelected&&(l="string"==typeof u.settings.deselectBehavior&&"top"===u.settings.deselectBehavior?u.getFirstOption().attr("data-value"):u.getAdjacentOption(u.$activeOption,-1).attr("data-value")),s=[],u.$activeItems.length){for(h=u.$control.children(".active:"+(r>0?"last":"first")),a=u.$control.children(":not(input)").index(h),r>0&&a++,i=0,n=u.$activeItems.length;i<n;i++)s.push(t(u.$activeItems[i]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(u.isFocused||"single"===u.settings.mode)&&u.items.length&&(r<0&&0===o.start&&0===o.length?s.push(u.items[u.caretPos-1]):r>0&&o.start===u.$control_input.val().length&&s.push(u.items[u.caretPos]));if(!s.length||"function"==typeof u.settings.onDelete&&!1===u.settings.onDelete.apply(u,[s]))return!1;for(void 0!==a&&u.setCaret(a);s.length;)u.removeItem(s.pop());return u.showInput(),u.positionDropdown(),u.refreshOptions(!0),l&&(c=u.getOption(l)).length&&u.setActiveOption(c),!0},advanceSelection:function(t,e){var i,n,r,o,s,a=this;0!==t&&(a.rtl&&(t*=-1),i=t>0?"last":"first",n=V(a.$control_input[0]),a.isFocused&&!a.isInputHidden?(o=a.$control_input.val().length,(t<0?0===n.start&&0===n.length:n.start===o)&&!o&&a.advanceCaret(t,e)):(s=a.$control.children(".active:"+i)).length&&(r=a.$control.children(":not(input)").index(s),a.setActiveItem(null),a.setCaret(t>0?r+1:r)))},advanceCaret:function(t,e){var i,n,r=this;0!==t&&(i=t>0?"next":"prev",r.isShiftDown?(n=r.$control_input[i]()).length&&(r.hideInput(),r.setActiveItem(n),e&&e.preventDefault()):r.setCaret(r.caretPos+t))},setCaret:function(e){var i,n,r,o,s=this;if(e="single"===s.settings.mode?s.items.length:Math.max(0,Math.min(s.items.length,e)),!s.isPending)for(i=0,n=(r=s.$control.children(":not(input)")).length;i<n;i++)o=t(r[i]).detach(),i<e?s.$control_input.before(o):s.$control.append(o);s.caretPos=e},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var t=this;t.$input.prop("disabled",!0),t.$control_input.prop("disabled",!0).prop("tabindex",-1),t.isDisabled=!0,t.lock()},enable:function(){var t=this;t.$input.prop("disabled",!1),t.$control_input.prop("disabled",!1).prop("tabindex",t.tabIndex),t.isDisabled=!1,t.unlock()},destroy:function(){var e=this,i=e.eventNS,n=e.revertSettings;e.trigger("destroy"),e.off(),e.$wrapper.remove(),e.$dropdown.remove(),e.$input.html("").append(n.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:n.tabindex}).show(),e.$control_input.removeData("grow"),e.$input.removeData("selectize"),0==--G.count&&G.$testInput&&(G.$testInput.remove(),G.$testInput=void 0),t(window).off(i),t(document).off(i),t(document.body).off(i),delete e.$input[0].selectize},render:function(e,i){var n,r,o="",s=!1,a=this;return"option"!==e&&"item"!==e||(s=!!(n=M(i[a.settings.valueField]))),s&&(I(a.renderCache[e])||(a.renderCache[e]={}),a.renderCache[e].hasOwnProperty(n))?a.renderCache[e][n]:(o=t(a.settings.render[e].apply(this,[i,L])),"option"===e||"option_create"===e?i[a.settings.disabledField]||o.attr("data-selectable",""):"optgroup"===e&&(r=i[a.settings.optgroupValueField]||"",o.attr("data-group",r),i[a.settings.disabledField]&&o.attr("data-disabled","")),"option"!==e&&"item"!==e||o.attr("data-value",n||""),s&&(a.renderCache[e][n]=o[0]),o[0])},clearCache:function(t){var e=this;void 0===t?e.renderCache={}:delete e.renderCache[t]},canCreate:function(t){var e=this;if(!e.settings.create)return!1;var i=e.settings.createFilter;return t.length&&("function"!=typeof i||i.apply(e,[t]))&&("string"!=typeof i||new RegExp(i).test(t))&&(!(i instanceof RegExp)||i.test(t))}}),G.count=0,G.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,showAddOptionOnCreate:!0,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!0,preload:!1,allowEmptyOption:!1,showEmptyOptionInDropdown:!1,emptyOptionLabel:"--",setFirstOptionActive:!1,closeAfterSelect:!1,closeDropdownThreshold:250,scrollDuration:60,deselectBehavior:"previous",loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",respect_word_boundaries:!0,mode:null,wrapperClass:"",inputClass:"",dropdownClass:"",dropdownContentClass:"",dropdownParent:null,copyClassesToDropdown:!0,dropdownSize:{sizeType:"auto",sizeValue:"auto"},normalize:!1,ignoreOnDropwdownHeight:"img, i",search:!0,render:{}},t.fn.selectize=function(e){var i=t.fn.selectize.defaults,n=t.extend({},i,e),r=n.dataAttr,o=n.labelField,s=n.valueField,a=n.disabledField,l=n.optgroupField,c=n.optgroupLabelField,h=n.optgroupValueField,u=function(t,e){var i,a,l,c,h=t.attr(r);if(h)for(e.options=JSON.parse(h),i=0,a=e.options.length;i<a;i++)e.items.push(e.options[i][s]);else{var u=(t.val()||"").trim();if(!n.allowEmptyOption&&!u.length)return;for(i=0,a=(l=u.split(n.delimiter)).length;i<a;i++)(c={})[o]=l[i],c[s]=l[i],e.options.push(c);e.items=l}},f=function(e,i){var u,f,d,p,g=i.options,m={},v=function(t){var e=r&&t.attr(r),i=t.data(),n={};return"string"==typeof e&&e.length&&(Y(e)?Object.assign(n,JSON.parse(e)):n[e]=e),Object.assign(n,i),n||null},y=function(e,r){e=t(e);var c=M(e.val());if(c||n.allowEmptyOption)if(m.hasOwnProperty(c)){if(r){var h=m[c][l];h?Array.isArray(h)?h.push(r):m[c][l]=[h,r]:m[c][l]=r}}else{var u=v(e)||{};u[o]=u[o]||e.text(),u[s]=u[s]||c,u[a]=u[a]||e.prop("disabled"),u[l]=u[l]||r,u.
2styles=e.attr("style")||"",u.classes=e.attr("class")||"",m[c]=u,g.push(u),e.is(":selected")&&i.items.push(c)}},b=function(e){var n,r,o,s,l;for((o=(e=t(e)).attr("label"))&&((s=v(e)||{})[c]=o,s[h]=o,s[a]=e.prop("disabled"),i.optgroups.push(s)),n=0,r=(l=t("option",e)).length;n<r;n++)y(l[n],o)};for(i.maxItems=e.attr("multiple")?null:1,u=0,f=(p=e.children()).length;u<f;u++)"optgroup"===(d=p[u].tagName.toLowerCase())?b(p[u]):"option"===d&&y(p[u])};return this.each((function(){if(!this.selectize){var r=t(this),o=this.tagName.toLowerCase(),s=r.attr("placeholder")||r.attr("data-placeholder");if(s||n.allowEmptyOption||(s=r.children('option[value=""]').text()),n.allowEmptyOption&&n.showEmptyOptionInDropdown&&!r.children('option[value=""]').length){var a=r.html(),l=L(n.emptyOptionLabel||"--");r.html('<option value="">'+l+"</option>"+a)}var c={placeholder:s,options:[],optgroups:[],items:[]};"select"===o?f(r,c):u(r,c),new G(r,t.extend(!0,{},i,c,e)).settings_user=e}}))},t.fn.selectize.defaults=G.defaults,t.fn.selectize.support={validity:j},G.define("auto_position",(function(){const t={top:"top",bottom:"bottom"};this.positionDropdown=function(){const e=this.$control,i="body"===this.settings.dropdownParent?e.offset():e.position();i.top+=e.outerHeight(!0);const n=this.$dropdown.prop("scrollHeight")+5,r=this.$control.get(0).getBoundingClientRect().top+n+this.$wrapper.height()>window.innerHeight?t.top:t.bottom,o={width:e.outerWidth(),left:i.left};if(r===t.top){const t={bottom:i.top,top:"unset"};"body"===this.settings.dropdownParent&&(t.top=i.top-this.$dropdown.outerHeight(!0)-e.outerHeight(!0),t.bottom="unset"),Object.assign(o,t),this.$dropdown.addClass("selectize-position-top"),this.$control.addClass("selectize-position-top")}else Object.assign(o,{top:i.top,bottom:"unset"}),this.$dropdown.removeClass("selectize-position-top"),this.$control.removeClass("selectize-position-top");this.$dropdown.css(o)}})),G.define("auto_select_on_type",(function(t){var e,i=this;i.onBlur=(e=i.onBlur,function(t){var n=i.getFirstItemMatchedByTextContent(i.lastValue,!0);return void 0!==n.attr("data-value")&&i.getValue()!==n.attr("data-value")&&i.setValue(n.attr("data-value")),e.apply(this,arguments)})})),G.define("autofill_disable",(function(t){var e,i=this;i.setup=(e=i.setup,function(){e.apply(i,arguments),i.$control_input.attr({autocomplete:"new-password",autofill:"no"})})})),G.define("clear_button",(function(e){var i,n=this;e=t.extend({title:"Clear",className:"clear",label:"Ã",html:function(t){return'<a class="'+t.className+'" title="'+t.title+'"> '+t.label+"</a>"}},e),n.setup=(i=n.setup,function(){i.apply(n,arguments),n.$button_clear=t(e.html(e)),"single"===n.settings.mode&&n.$wrapper.addClass("single"),n.$wrapper.append(n.$button_clear),""!==n.getValue()&&0!==n.getValue().length||n.$wrapper.find("."+e.className).css("display","none"),n.on("change",(function(){""===n.getValue()||0===n.getValue().length?n.$wrapper.find("."+e.className).css("display","none"):n.$wrapper.find("."+e.className).css("display","")})),n.$wrapper.on("click","."+e.className,(function(t){t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),n.isLocked||(n.clear(),n.$wrapper.find("."+e.className).css("display","none"))}))})})),G.define("drag_drop",(function(e){if(!t.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var i,n=this;n.lock=(i=n.lock,function(){var t=n.$control.data("sortable");return t&&t.disable(),i.apply(n,arguments)}),n.unlock=function(){var t=n.unlock;return function(){var e=n.$control.data("sortable");return e&&e.enable(),t.apply(n,arguments)}}(),n.setup=function(){var e=n.setup;return function(){e.apply(this,arguments);var i=n.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:n.isLocked,start:function(t,e){e.placeholder.css("width",e.helper.css("width")),i.addClass("dragging")},stop:function(){i.removeClass("dragging");var e=n.$activeItems?n.$activeItems.slice():null,r=[];i.children("[data-value]").each((function(){r.push(t(this).attr("data-value"))})),n.isFocused=!1,n.setValue(r),n.isFocused=!0,n.setActiveItem(e),n.positionDropdown()}})}}()}})),G.define("dropdown_header",(function(e){var i,n=this;e=t.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(t){return'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a href="javascript:void(0)" class="'+t.closeClass+'">×</a></div></div>'}},e),n.setup=(i=n.setup,function(){i.apply(n,arguments),n.$dropdown_header=t(e.html(e)),n.$dropdown.prepend(n.$dropdown_header),n.$dropdown_header.find("."+e.closeClass).on("click",(function(){n.close()}))})})),G.define("optgroup_columns",(function(e){var i,n=this;
2e=t.extend({equalizeWidth:!0,equalizeHeight:!0},e),this.getAdjacentOption=function(e,i){var n=e.closest("[data-group]").find("[data-selectable]"),r=n.index(e)+i;return r>=0&&r<n.length?n.eq(r):t()},this.onKeyDown=(i=n.onKeyDown,function(t){var e,r,o,s;return!this.isOpen||t.keyCode!==b&&t.keyCode!==x?i.apply(this,arguments):(n.ignoreHover=!0,e=(s=this.$activeOption.closest("[data-group]")).find("[data-selectable]").index(this.$activeOption),void((r=(o=(s=t.keyCode===b?s.prev("[data-group]"):s.next("[data-group]")).find("[data-selectable]")).eq(Math.min(o.length-1,e))).length&&this.setActiveOption(r)))});var r=function(){var t,e=r.width,i=document;return void 0===e&&((t=i.createElement("div")).innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',t=t.firstChild,i.body.appendChild(t),e=r.width=t.offsetWidth-t.clientWidth,i.body.removeChild(t)),e},o=function(){var i,o,s,a,l,c,h;if((o=(h=t("[data-group]",n.$dropdown_content)).length)&&n.$dropdown_content.width()){if(e.equalizeHeight){for(s=0,i=0;i<o;i++)s=Math.max(s,h.eq(i).height());h.css({height:s})}e.equalizeWidth&&(c=n.$dropdown_content.innerWidth()-r(),a=Math.round(c/o),h.css({width:a}),o>1&&(l=c-a*(o-1),h.eq(o-1).css({width:l})))}};(e.equalizeHeight||e.equalizeWidth)&&(R.after(this,"positionDropdown",o),R.after(this,"refreshOptions",o))})),G.define("remove_button",(function(e){if("single"!==this.settings.mode){var i=function(e,i){var n,r=e,o='<a href="javascript:void(0)" class="'+i.className+'" tabindex="-1" title="'+L(i.title)+'">'+i.label+"</a>",s=function(t,e){var i=t.search(/(<\/[^>]+>\s*)$/);return t.substring(0,i)+e+t.substring(i)};e.setup=(n=r.setup,function(){if(i.append){var a=r.settings.render.item;r.settings.render.item=function(t){return s(a.apply(e,arguments),o)}}n.apply(e,arguments),e.$control.on("click","."+i.className,(function(e){if(e.preventDefault(),!r.isLocked){var i=t(e.currentTarget).parent();return r.setActiveItem(i),r.deleteSelection()&&r.setCaret(r.items.length),!1}}))})};i(this,e=t.extend({label:"×",title:"Remove",className:"remove",append:!0},e))}})),G.define("restore_on_backspace",(function(t){var e,i=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=(e=i.onKeyDown,function(i){var n,r;return i.keyCode===T&&""===this.$control_input.val()&&!this.$activeItems.length&&(n=this.caretPos-1)>=0&&n<this.items.length?(r=this.options[this.items[n]],this.deleteSelection(i)&&(this.setTextboxValue(t.text.apply(this,[r])),this.refreshOptions(!0)),void i.preventDefault()):e.apply(this,arguments)})})),G.define("select_on_focus",(function(t){var e,i,n=this;n.on("focus",(e=n.onFocus,function(t){var i=n.getItem(n.getValue()).text();return n.clear(),n.setTextboxValue(i),n.$control_input.select(),setTimeout((function(){n.settings.selectOnTab&&n.setActiveOption(n.getFirstItemMatchedByTextContent(i)),n.settings.score=null}),0),e.apply(this,arguments)})),n.onBlur=(i=n.onBlur,function(t){return""===n.getValue()&&n.lastValidValue!==n.getValue()&&n.setValue(n.lastValidValue),setTimeout((function(){n.settings.score=function(){return function(){return 1}}}),0),i.apply(this,arguments)}),n.settings.score=function(){return function(){return 1}}})),G.define("tag_limit",(function(e){const i=this;e.tagLimit=e.tagLimit,this.onBlur=function(){const n=i.onBlur;return function(i){if(n.apply(this,i),!i)return;const r=this.$control,o=r.find(".item"),s=e.tagLimit;void 0===s||o.length<=s||(o.toArray().forEach((function(e,i){i<s||t(e).hide()})),r.append("<span><b>"+(o.length-s)+"</b></span>"))}}(),this.onFocus=function(){const t=i.onFocus;return function(e){if(t.apply(this,e),!e)return;const i=this.$control;i.find(".item").show(),i.find("span").remove()}}()})),G},void 0===(o="function"==typeof n?n.apply(e,r):n)||(t.exports=o)},8827(t,e,i){t.exports=function(){"use strict";var t="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e="Expected a function",n=NaN,r="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,h="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,f=h||u||Function("return this")(),d=Object.prototype.toString,p=Math.max,g=Math.min,m=function(){return f.Date.now()};function v(t,i,n){var r,o,s,a,l,c,h=0,u=!1,f=!1,d=!0;if("function"!=typeof t)throw new TypeError(e);function v(e){var i=r,n=o;return r=o=void 0,h=e,a=t.apply(n,i)}function _(t){var e=t-c;return void 0===c||e>=i||e<0||f&&t-h>=s}function w(){var t=m();if(_(t))return x(t);l=setTimeout(w,function(t){var e=i-(t-c);return f?g(e,s-(t-h)):e}(t))}function x(t){return l=void 0,d&&r?v(t):(r=o=void 0,a)}function C(){var t=m(),e=_(t);if(r=arguments,o=this,c=t,e){if(void 0===l)return function(t){return h=t,l=setTimeout(w,i),u?v(t):a}(c);if(f)return l=setTimeout(w,i),v(c)}return void 0===l&&(l=setTimeout(w,i)),a}return i=b(i)||0,y(n)&&(u=!!n.leading,s=(f="maxWait"in n)?p(b(n.maxWait)||0,i):s,d="trailing"in n?!!n.trailing:d),C.cancel=function(){void 0!==l&&clearTimeout(l),h=0,r=c=o=l=void 0},C.flush=function(){return void 0===l?a:x(m())},C}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function b(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&d.call(t)==r}(t))return n;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var i=a.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):s.test(t)?n:+t}var _=function(t,i,n){var r=!0,o=!0;if("function"!=typeof t)throw new TypeError(e);return y(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),v(t,i,{leading:r,maxWait:i,trailing:o})},w="Expected a function",x=NaN,C="[object Symbol]",S=/^\s+|\s+$/g,T=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,E=/^0o[0-7]+$/i,A=parseInt,k="object"==typeof t&&t&&t.Object===Object&&t,P="object"==typeof self&&self&&self.Object===Object&&self,D=k||P||Function("return this")(),F=Object.prototype.toString,j=Math.max,I=Math.min,M=function(){return D.Date.now()};function L(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function R(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&F.call(t)==C}(t))return x;if(L(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=L(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(S,"");var i=O.test(t);return i||E.test(t)?A(t.slice(2),i?2:8):T.test(t)?x:+t}
2var B=function(t,e,i){var n,r,o,s,a,l,c=0,h=!1,u=!1,f=!0;if("function"!=typeof t)throw new TypeError(w);function d(e){var i=n,o=r;return n=r=void 0,c=e,s=t.apply(o,i)}function p(t){var i=t-l;return void 0===l||i>=e||i<0||u&&t-c>=o}function g(){var t=M();if(p(t))return m(t);a=setTimeout(g,function(t){var i=e-(t-l);return u?I(i,o-(t-c)):i}(t))}function m(t){return a=void 0,f&&n?d(t):(n=r=void 0,s)}function v(){var t=M(),i=p(t);if(n=arguments,r=this,l=t,i){if(void 0===a)return function(t){return c=t,a=setTimeout(g,e),h?d(t):s}(l);if(u)return a=setTimeout(g,e),d(l)}return void 0===a&&(a=setTimeout(g,e)),s}return e=R(e)||0,L(i)&&(h=!!i.leading,o=(u="maxWait"in i)?j(R(i.maxWait)||0,e):o,f="trailing"in i?!!i.trailing:f),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=r=a=void 0},v.flush=function(){return void 0===a?s:m(M())},v},$=function(){};function N(t){t&&t.forEach((function(t){var e=Array.prototype.slice.call(t.addedNodes),i=Array.prototype.slice.call(t.removedNodes);if(function t(e){var i=void 0,n=void 0;for(i=0;i<e.length;i+=1){if((n=e[i]).dataset&&n.dataset.aos)return!0;if(n.children&&t(n.children))return!0}return!1}(e.concat(i)))return $()}))}function z(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}var V={isSupported:function(){return!!z()},ready:function(t,e){var i=window.document,n=new(z())(N);$=e,n.observe(i.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}},W=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},H=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}}(),U=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},X=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,Y=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,G=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,q=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
2sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function K(){return navigator.userAgent||navigator.vendor||window.opera||""}var Q=new(function(){function t(){W(this,t)}return H(t,[{key:"phone",value:function(){var t=K();return!(!X.test(t)&&!Y.test(t.substr(0,4)))}},{key:"mobile",value:function(){var t=K();return!(!G.test(t)&&!q.test(t.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}},{key:"ie11",value:function(){return"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style}}]),t}()),J=function(t,e){var i=void 0;return Q.ie11()?(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{detail:e}):i=new CustomEvent(t,{detail:e}),document.dispatchEvent(i)},Z=function(t){return t.forEach((function(t,e){return function(t,e){var i=t.options,n=t.position,r=t.node,o=(t.data,function(){t.animated&&(function(t,e){e&&e.forEach((function(e){return t.classList.remove(e)}))}(r,i.animatedClassNames),J("aos:out",r),t.options.id&&J("aos:in:"+t.options.id,r),t.animated=!1)});i.mirror&&e>=n.out&&!i.once?o():e>=n.in?t.animated||(function(t,e){e&&e.forEach((function(e){return t.classList.add(e)}))}(r,i.animatedClassNames),J("aos:in",r),t.options.id&&J("aos:in:"+t.options.id,r),t.animated=!0):t.animated&&!i.once&&o()}(t,window.pageYOffset)}))},tt=function(t){for(var e=0,i=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-("BODY"!=t.tagName?t.scrollLeft:0),i+=t.offsetTop-("BODY"!=t.tagName?t.scrollTop:0),t=t.offsetParent;return{top:i,left:e}},et=function(t,e,i){var n=t.getAttribute("data-aos-"+e);if(void 0!==n){if("true"===n)return!0;if("false"===n)return!1}return n||i},it=function(t,e){return t.forEach((function(t,i){var n=et(t.node,"mirror",e.mirror),r=et(t.node,"once",e.once),o=et(t.node,"id"),s=e.useClassNames&&t.node.getAttribute("data-aos"),a=[e.animatedClassName].concat(s?s.split(" "):[]).filter((function(t){return"string"==typeof t}));e.initClassName&&t.node.classList.add(e.initClassName),t.position={in:function(t,e,i){var n=window.innerHeight,r=et(t,"anchor"),o=et(t,"anchor-placement"),s=Number(et(t,"offset",o?0:e)),a=o||i,l=t;r&&document.querySelectorAll(r)&&(l=document.querySelectorAll(r)[0]);var c=tt(l).top-n;switch(a){case"top-bottom":break;case"center-bottom":c+=l.offsetHeight/2;break;case"bottom-bottom":c+=l.offsetHeight;break;case"top-center":c+=n/2;break;case"center-center":c+=n/2+l.offsetHeight/2;break;case"bottom-center":c+=n/2+l.offsetHeight;break;case"top-top":c+=n;break;case"bottom-top":c+=n+l.offsetHeight;break;case"center-top":c+=n+l.offsetHeight/2}return c+s}(t.node,e.offset,e.anchorPlacement),out:n&&function(t,e){window.innerHeight;var i=et(t,"anchor"),n=et(t,"offset",e),r=t;return i&&document.querySelectorAll(i)&&(r=document.querySelectorAll(i)[0]),tt(r).top+r.offsetHeight-n}(t.node,e.offset)},t.options={once:r,mirror:n,animatedClassNames:a,id:o}})),t},nt=function(){var t=document.querySelectorAll("[data-aos]");return Array.prototype.map.call(t,(function(t){return{node:t}}))},rt=[],ot=!1,st={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,mirror:!1,anchorPlacement:"top-bottom",startEvent:"DOMContentLoaded",animatedClassName:"aos-animate",initClassName:"aos-init",useClassNames:!1,disableMutationObserver:!1,throttleDelay:99,debounceDelay:50},at=function(){return document.all&&!window.atob},lt=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(ot=!0),ot&&(rt=it(rt,st),Z(rt),window.addEventListener("scroll",_((function(){Z(rt,st.once)}),st.throttleDelay)))},ct=function(){if(rt=nt(),ut(st.disable)||at())return ht();lt()},ht=function(){rt.forEach((function(t,e){t.node.removeAttribute("data-aos"),t.node.removeAttribute("data-aos-easing"),t.node.removeAttribute("data-aos-duration"),t.node.removeAttribute("data-aos-delay"),st.initClassName&&t.node.classList.remove(st.
2initClassName),st.animatedClassName&&t.node.classList.remove(st.animatedClassName)}))},ut=function(t){return!0===t||"mobile"===t&&Q.mobile()||"phone"===t&&Q.phone()||"tablet"===t&&Q.tablet()||"function"==typeof t&&!0===t()};return{init:function(t){return st=U(st,t),rt=nt(),st.disableMutationObserver||V.isSupported()||(console.info('\n aos: MutationObserver is not supported on this browser,\n code mutations observing has been disabled.\n You may have to call "refreshHard()" by yourself.\n '),st.disableMutationObserver=!0),st.disableMutationObserver||V.ready("[data-aos]",ct),ut(st.disable)||at()?ht():(document.querySelector("body").setAttribute("data-aos-easing",st.easing),document.querySelector("body").setAttribute("data-aos-duration",st.duration),document.querySelector("body").setAttribute("data-aos-delay",st.delay),-1===["DOMContentLoaded","load"].indexOf(st.startEvent)?document.addEventListener(st.startEvent,(function(){lt(!0)})):window.addEventListener("load",(function(){lt(!0)})),"DOMContentLoaded"===st.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1&<(!0),window.addEventListener("resize",B(lt,st.debounceDelay,!0)),window.addEventListener("orientationchange",B(lt,st.debounceDelay,!0)),rt)},refresh:lt,refreshHard:ct}}()},1783(){$(document).ready((function(){var t=function(t,e,i){return i=void 0===i?null:encodeURIComponent(i),e=encodeURI(e),"facebook"==t?"https://www.facebook.com/sharer.php?u="+e:"twitter"==t?"https://twitter.com/share?url="+e+"&text="+i:"pinterest"==t?"https://pinterest.com/pin/create/bookmarklet/?url="+e+"&description="+i:"linkedin"==t?"https://www.linkedin.com/sharing/share-offsite/?url="+e:"whatsapp"==t?"https://wa.me/?text="+encodeURIComponent(e):"email"==t?"mailto:?subject="+i+"&body="+encodeURIComponent(e)+"&title="+i:""};$("[social-share]").each((function(e,i){var n=$(i),r=n.attr("social-share"),o=n.attr("social-share-url"),s=n.attr("social-share-title");if(n.attr("href",t(r,o,s)),"link"==r){var a=n.attr("social-share-tooltip");n.tooltip({trigger:"manual",title:a})}})),$("[social-share]").on("click",(function(e){var i=$(this),n=i.attr("social-share");if("email"!=n){e.preventDefault();var r=i.attr("social-share-url"),o=i.attr("social-share-title");if("link"==n){var s=document.createElement("textarea");return s.value=r,s.setAttribute("readonly",""),s.style.position="absolute",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s),i.tooltip("show"),void setTimeout((function(){i.tooltip("hide")}),1500)}var a=t(n,r,o);window.open(a,o,"width=640,height=560")}}))}))},5483(t,e,i){var n=i(5184);$(document).ready((function(){$('[data-popup="start"]').each((function(t,e){var i=$(e).attr("id");if(!n.get("start-"+i)){var r,o=$(e).data("popup-referrer"),s=document.referrer,a=(r="referrer",new URLSearchParams(window.location.search).get(r)),l=$(e).data("cookie-expires"),c=null==l||""===l?null:parseInt(l,10);if(void 0===o)u();else{var h=o.split(",").map((function(t){return t.trim()}));(s&&h.some((function(t){return s.startsWith(t)}))||a&&h.some((function(t){return a===t})))&&u()}}function u(){setTimeout((function(){$(e).modal("show"),!c||isNaN(c)||0===c?n.set("start-"+i,!0):n.set("start-"+i,!0,{expires:c})}),1e3)}}))}))},2006(t,e,i){i(2165),i(2931),i(3570),i(4072),i(1113),i(8209),i(5279),i(1013),i(9492),i(5970),i(5886),i(1874),i(1783),i(5483),i(9367),i(8721),i(9155),i(7593),i(3457),i(6594),i(5553),i(7121),i(6375),i(8645),i(8184),i(9309)},8184(){$(document).ready((function(){["#allergies","#allergies-accompany","#allergies-2","#allergies-3","#allergies-4"].forEach((function(t){$(t).selectize({plugins:["remove_button"]})}))}))},3457(t,e,i){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var r,o,s;i(8827).init((r={disable:!1,startEvent:"DOMContentLoaded",initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:!1,disableMutationObserver:!1,debounceDelay:50,throttleDelay:99},s=function(){return window.innerWidth<1175},(o=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
2(t,"string");return"symbol"==n(e)?e:e+""}(o="disable"))in r?Object.defineProperty(r,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[o]=s,r))},6375(){$(document).ready((function(){var t=$('input[name="accompanied"]'),e=$('input[name="accompanied_two"]'),i=$('input[name="accompanied_three"]'),n=$('input[name="accompanied_four"]'),r=$('[data-accompanied="true"]'),o=$('[data-accompanied-two="true"]'),s=$('[data-accompanied-three="true"]'),a=$('[data-accompanied-four="true"]');function l(){var l="yes"===t.filter(":checked").val(),c="yes"===e.filter(":checked").val(),h="yes"===i.filter(":checked").val(),u="yes"===n.filter(":checked").val();r.closest(".form-group").toggle(l),o.closest(".form-group").toggle(c),s.closest(".form-group").toggle(h),a.closest(".form-group").toggle(u)}t.on("change",l),e.on("change",l),i.on("change",l),n.on("change",l),l()}))},9155(t,e,i){var n=i(9409).T;$(document).ready((function(){$("[data-counter]").each((function(t,e){var i={useGrouping:!0,separator:".",decimal:",",duration:1,suffix:"%"},r=$(e),o=$(e).data("counter").toString(),s=i;-1===o.indexOf(",")&&-1===o.indexOf(".")||(s.decimalPlaces=2,o=o.replace(",","."));var a=new n(r.get(0),o,i);r.waypoint({handler:function(){a&&a.start()},offset:"bottom-in-view"})}))}))},8645(){$(document).ready((function(){$("#domain-selector").selectize({plugins:["remove_button"]})}))},9367(){$(document).ready((function(){$(":input").parent(".form-group").after('<div class="form-errors">'),window.parsleyErrorsContainer=function(t){return t.$element.parent(".form-group").next(".form-errors")},$("form").parsley({errorClass:"is-invalid",successClass:"is-valid",classHandler:function(t){return t.$element}}),window.Parsley.on("field:error",(function(){var t=this.$element.parent(".form-group");this.$element.removeClass("is-valid"),this.$element.removeClass("is-invalid"),t.removeClass("is-valid"),t.removeClass("is-invalid"),t.addClass("is-invalid"),this.$element.addClass("is-invalid")})),window.Parsley.on("field:success",(function(){var t=this.$element.parent(".form-group");this.$element.removeClass("is-valid"),this.$element.removeClass("is-invalid"),t.removeClass("is-valid"),t.removeClass("is-invalid"),t.addClass("is-valid"),this.$element.addClass("is-valid")})),$(":input").on("focus",(function(t){$(t.target).parent(".form-group").addClass("focused")})),$(":input").on("focusout",(function(t){$(t.target).parent(".form-group").removeClass("focused")}))}))},5553(){$(document).ready((function(){$(document).on("click","[data-hyperlink]",(function(t){t.preventDefault();var e=$(this);if(!e.hasClass("disabled")&&!e.attr("disabled")){var i=e.data("hyperlink-target");i||(i="_self"),window.open(e.data("hyperlink"),i)}}))}))},7121(){$(document).ready((function(){$(window).on("init-scrolling scroll",(function(){$(document).scrollTop()>0?$(".logo-wrapper").removeClass("nav-logo-open"):$(".logo-wrapper").addClass("nav-logo-open")})),$(window).trigger("init-scrolling")}))},8721(t,e,i){i(9575);var n=i(5203),r={stopVideo:!1,startVideo:!1};$(document).ready((function(){$(document).on("click",".menu-button",(function(){var t=$("body");t.hasClass("menu-open")?($(".menu-button").removeClass("active"),t.removeClass("menu-open")):(t.addClass("menu-open"),$(".menu-button").addClass("active"))}));var t=document.getElementById("menu-video");$(".play-menu-video").on("click",(function(){t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>t.HAVE_CURRENT_DATA?(t.pause(),$(this).attr("data-state","play"),r.startVideo=!0,n.set("video-settings",JSON.stringify(r))):(t.play(),$(this).attr("data-state","pause"),r.startVideo=!1,n.set("video-settings",JSON.stringify(r)))}))})),$(document).ready((function(){var t=document.getElementById("menu-video"),e=n.get("video-settings"),i=$(".play-menu-video");if(e){if(!1===(r=JSON.parse(e)).stopVideo){var o=t.play();void 0!==o&&o.then((function(t){})).catch((function(t){})),i.attr("data-state","pause")}!0===r.startVideo&&(t.pause(),i.attr("data-state","play"))}}))},7593(t,e,i){var n=i(7796);document.querySelectorAll(".scene").forEach((function(t){var e=t.getAttribute("data-modifier");n.create({elem:t,from:0,to:800,direct:!0,props:{"--translateY":{from:"0",to:"".concat(10*e,"px")}}}).start()}))},9309(){$(document).ready((function(){var t=$('div[data-form="form-anchor"]');if(t.length){$("html, body").animate({scrollTop:t.offset().top-100},"slow")}}
2))},6594(t,e,i){var n=i(7404).fabric;$(document).ready((function(){if($("#signature-field").length){var t=new n.Canvas("signature-field",{isDrawingMode:!0,freeDrawingBrush:{width:1,color:"#000000"}});$("#reset-canvas").on("click",(function(){t.clear()})),$("#signature-field").before('<input id="signature-field-input" name="signature" type="hidden" required>'),t.on("object:added",(function(e){var i=t.toDataURL("image/png");$("#signature-field-input").val(i)}))}}))},5350(t,e){"use strict";e.byteLength=function(t){var e=a(t),i=e[0],n=e[1];return 3*(i+n)/4-n},e.toByteArray=function(t){var e,i,o=a(t),s=o[0],l=o[1],c=new r(function(t,e,i){return 3*(e+i)/4-i}(0,s,l)),h=0,u=l>0?s-4:s;for(i=0;i<u;i+=4)e=n[t.charCodeAt(i)]<<18|n[t.charCodeAt(i+1)]<<12|n[t.charCodeAt(i+2)]<<6|n[t.charCodeAt(i+3)],c[h++]=e>>16&255,c[h++]=e>>8&255,c[h++]=255&e;2===l&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,c[h++]=255&e);1===l&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,c[h++]=e>>8&255,c[h++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,r=n%3,o=[],s=16383,a=0,c=n-r;a<c;a+=s)o.push(l(t,a,a+s>c?c:a+s));1===r?(e=t[n-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return o.join("")};for(var i=[],n=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)i[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function l(t,e,n){for(var r,o,s=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},7796(t){t.exports=function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};e[s][0].call(c.exports,(function(t){return r(e[s][1][t]||t)}),c,c.exports,t,e,i,n)}return i[s].exports}for(var o=void 0,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){e.exports=function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},{}],2:[function(t,e,i){e.exports=function(t){var e=1.70158;return t*t*((e+1)*t-e)}},{}],3:[function(t,e,i){e.exports=function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1}},{}],4:[function(t,e,i){var n=t("./bounce-out");e.exports=function(t){return t<.5?.5*(1-n(1-2*t)):.5*n(2*t-1)+.5}},{"./bounce-out":6}],5:[function(t,e,i){var n=t("./bounce-out");e.exports=function(t){return 1-n(1-t)}},{"./bounce-out":6}],6:[function(t,e,i){e.exports=function(t){var e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72}},{}],7:[function(t,e,i){e.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},{}],8:[function(t,e,i){e.exports=function(t){return 1-Math.sqrt(1-t*t)}},{}],9:[function(t,e,i){e.exports=function(t){return Math.sqrt(1- --t*t)}},{}],10:[function(t,e,i){e.exports=function(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}},{}],11:[function(t,e,i){e.exports=function(t){return t*t*t}},{}],12:[function(t,e,i){e.exports=function(t){var e=t-1;return e*e*e+1}},{}],13:[function(t,e,i){e.exports=function(t){return t<.5?.5*Math.sin(13*Math.PI/2*2*t)*Math.pow(2,10*(2*t-1)):.5*Math.sin(-13*Math.PI/2*(2*t-1+1))*Math.pow(2,-10*(2*t-1))+1}},{}],14:[function(t,e,i){e.exports=function(t){return Math.sin(13*t*Math.PI/2)*Math.pow(2,10*(t-1))}},{}],15:[function(t,e,i){e.exports=function(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-10*t)+1}},{}],16:[function(t,e,i){e.exports=function(t){return 0===t||1===t?t:t<.5?.5*Math.pow(2,20*t-10):-.5*Math.pow(2,10-20*t)+1}},{}],17:[function(t,e,i){e.exports=function(t){return 0===t?t:Math.pow(2,10*(t-1))}},{}],18:[function(t,e,i){e.exports=function(t){return 1===t?t:1-Math.pow(2,-10*t)}},{}],19:[function(t,e,i){e.exports={backInOut:t("./back-in-out"),backIn:t("./back-in"),backOut:t("./back-out"),bounceInOut:t("./bounce-in-out"),bounceIn:t("./bounce-in"),bounceOut:t("./bounce-out"),circInOut:t("./circ-in-out"),circIn:t("./circ-in"),circOut:t("./circ-out"),cub
vendor: 4,690 bytes, line 2
2icInOut:t("./cubic-in-out"),cubicIn:t("./cubic-in"),cubicOut:t("./cubic-out"),elasticInOut:t("./elastic-in-out"),elasticIn:t("./elastic-in"),elasticOut:t("./elastic-out"),expoInOut:t("./expo-in-out"),expoIn:t("./expo-in"),expoOut:t("./expo-out"),linear:t("./linear"),quadInOut:t("./quad-in-out"),quadIn:t("./quad-in"),quadOut:t("./quad-out"),quartInOut:t("./quart-in-out"),quartIn:t("./quart-in"),quartOut:t("./quart-out"),quintInOut:t("./quint-in-out"),quintIn:t("./quint-in"),quintOut:t("./quint-out"),sineInOut:t("./sine-in-out"),sineIn:t("./sine-in"),sineOut:t("./sine-out")}},{"./back-in":2,"./back-in-out":1,"./back-out":3,"./bounce-in":5,"./bounce-in-out":4,"./bounce-out":6,"./circ-in":8,"./circ-in-out":7,"./circ-out":9,"./cubic-in":11,"./cubic-in-out":10,"./cubic-out":12,"./elastic-in":14,"./elastic-in-out":13,"./elastic-out":15,"./expo-in":17,"./expo-in-out":16,"./expo-out":18,"./linear":20,"./quad-in":22,"./quad-in-out":21,"./quad-out":23,"./quart-in":25,"./quart-in-out":24,"./quart-out":26,"./quint-in":28,"./quint-in-out":27,"./quint-out":29,"./sine-in":31,"./sine-in-out":30,"./sine-out":32}],20:[function(t,e,i){e.exports=function(t){return t}},{}],21:[function(t,e,i){e.exports=function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)}},{}],22:[function(t,e,i){e.exports=function(t){return t*t}},{}],23:[function(t,e,i){e.exports=function(t){return-t*(t-2)}},{}],24:[function(t,e,i){e.exports=function(t){return t<.5?8*Math.pow(t,4):-8*Math.pow(t-1,4)+1}},{}],25:[function(t,e,i){e.exports=function(t){return Math.pow(t,4)}},{}],26:[function(t,e,i){e.exports=function(t){return Math.pow(t-1,3)*(1-t)+1}},{}],27:[function(t,e,i){e.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},{}],28:[function(t,e,i){e.exports=function(t){return t*t*t*t*t}},{}],29:[function(t,e,i){e.exports=function(t){return--t*t*t*t*t+1}},{}],30:[function(t,e,i){e.exports=function(t){return-.5*(Math.cos(Math.PI*t)-1)}},{}],31:[function(t,e,i){e.exports=function(t){var e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}},{}],32:[function(t,e,i){e.exports=function(t){return Math.sin(t*Math.PI/2)}},{}],33:[function(t,e,i){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var i=parseFloat(t,10);return e[0]=i,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],34:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.create=void 0;var n=o(t("parse-unit")),r=o(t("eases"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return(s="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 a,l,c,h=[],u="undefined"!=typeof window,f=function(){return(document.scrollingElement||document.documentElement).scrollTop},d=function(){return window.innerHeight||window.outerHeight},p=function(t){return!1===isNaN((0,n.default)(t)[0])},g=function(t){var e=(0,n.default)(t);return{value:e[0],unit:e[1]}},m=function(t){return null!==String(t).match(/^[a-z]+-[a-z]+$/)},v=function(t,e){return!0===t?e.elem:t instanceof HTMLElement==1?e.direct:e.global},y=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f(),n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d(),r=e.getBoundingClientRect(),o=t.match(/^[a-z]+/)[0],s=t.match(/[a-z]+$/)[0],a=0;return"top"===s&&(a-=0),"middle"===s&&(a-=n/2),"bottom"===s&&(a-=n),"top"===o&&(a+=r.top+i),"middle"===o&&(a+=r.top+i+r.height/2),"bottom"===o&&(a+=r.top+i+r.height),"".concat(a,"px")},b=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f(),i=t.getData(),n=i.to.value-i.from.value,r=(e-i.from.value)/(n/100),o=Math.min(Math.max(r,0),100),s=v(i.direct,{global:document.documentElement,elem:i.elem,direct:i.direct}),a=Object.keys(i.props).reduce((function(t,e){var n=i.props[e],r=n.from.unit||n.to.unit,s=n.from.value-n.to.value,a=n.timing(o/100),l=n.from.value-s*a,c=Math.round(1e4*l)/1e4;return t[e]=c+r,t}),{}),l=r<0||r>100;return 1==(r>=0&&r<=100)&&i.inside(t,r,a),!0===l&&i.outside(t,r,a),{elem:s,props:a}},_=function(t,e){Object.keys(e).forEach((function(i){return function(t,e){t.style.setProperty(e.key,e.value)}(t,{key:i,value:e[i]})}))};i.create=function(t){var e=null,i=!1,n={isActive:function(){return i},getData:function(){return e},calculate:function(){e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==(t=Object.assign({},t)).inside&&(t.inside=function(){}),null==t.outside&&(t.outside=function(){}),null==t.direct&&(t.direct=!1),null==t.track&&(t.track=!0),null==t.props&&(t.props={}),null==t.from)throw new Error("Missing property `from`");
2if(null==t.to)throw new Error("Missing property `to`");if("function"!=typeof t.inside)throw new Error("Property `inside` must be undefined or a function");if("function"!=typeof t.outside)throw new Error("Property `outside` must be undefined or a function");if("boolean"!=typeof t.direct&&t.direct instanceof HTMLElement==0)throw new Error("Property `direct` must be undefined, a boolean or a DOM element/node");if(!0===t.direct&&null==t.elem)throw new Error("Property `elem` is required when `direct` is true");if("boolean"!=typeof t.track)throw new Error("Property `track` must be undefined or a boolean");if("object"!==s(t.props))throw new Error("Property `props` must be undefined or an object");if(null==t.elem){if(!1===p(t.from))throw new Error("Property `from` must be a absolute value when no `elem` has been provided");if(!1===p(t.to))throw new Error("Property `to` must be a absolute value when no `elem` has been provided")}else!0===m(t.from)&&(t.from=y(t.from,t.elem)),!0===m(t.to)&&(t.to=y(t.to,t.elem));return t.from=g(t.from),t.to=g(t.to),t.props=Object.keys(t.props).reduce((function(e,i){var n=Object.assign({},t.props[i]);if(!1===p(n.from))throw new Error("Property `from` of prop must be a absolute value");if(!1===p(n.to))throw new Error("Property `from` of prop must be a absolute value");if(n.from=g(n.from),n.to=g(n.to),null==n.timing&&(n.timing=r.default.linear),"string"!=typeof n.timing&&"function"!=typeof n.timing)throw new Error("Property `timing` of prop must be undefined, a string or a function");if("string"==typeof n.timing&&null==r.default[n.timing])throw new Error("Unknown timing for property `timing` of prop");return"string"==typeof n.timing&&(n.timing=r.default[n.timing]),e[i]=n,e}),{}),t}(t)},update:function(){var t=b(n),e=t.elem,i=t.props;return _(e,i),i},start:function(){i=!0},stop:function(){i=!1},destroy:function(){h[o]=void 0}},o=h.push(n)-1;return n.calculate(),n},!0===u?(function t(e,i){var n=function(){requestAnimationFrame((function(){return t(e,i)}))},r=function(t){return t.filter((function(t){return null!=t&&t.isActive()}))}(h);if(0===r.length)return n();var o=f();if(i===o)return n();i=o,r.map((function(t){return b(t,o)})).forEach((function(t){var e=t.elem,i=t.props;return _(e,i)})),n()}(),window.addEventListener("resize",(a=function(){(function(t){return t.filter((function(t){return null!=t&&t.getData().track}))})(h).forEach((function(t){t.calculate(),t.update()}))},l=50,c=null,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];clearTimeout(c),c=setTimeout((function(){return a.apply(void 0,e)}),l)}))):console.warn("basicScroll is not executing because you are using it in an environment without a `window` object")},{eases:19,"parse-unit":33}]},{},[34])(34)},5886(){!function(t){"use strict";var e=0,i=function(e,i){this.options=i,this.$elementFilestyle=[],this.$element=t(e)};i.prototype={clear:function(){this.$element.val(""),this.$elementFilestyle.find(":text").val(""),this.$elementFilestyle.find(".badge").remove()},destroy:function(){this.$element.removeAttr("style").removeData("filestyle"),this.$elementFilestyle.remove()},disabled:function(t){if(!0===t)this.options.disabled||(this.$element.attr("disabled","true"),this.$elementFilestyle.find("label").attr("disabled","true"),this.options.disabled=!0);else{if(!1!==t)return this.options.disabled;this.options.disabled&&(this.$element.removeAttr("disabled"),this.$elementFilestyle.find("label").removeAttr("disabled"),this.options.disabled=!1)}},buttonBefore:function(t){if(!0===t)this.options.buttonBefore||(this.options.buttonBefore=!0,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()));else{if(!1!==t)return this.options.buttonBefore;this.options.buttonBefore&&(this.options.buttonBefore=!1,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()))}},icon:function(t){if(!0===t)this.options.icon||(this.options.icon=!0,this.$elementFilestyle.find("label").prepend(this.htmlIcon()));else{if(!1!==t)return this.options.icon;this.options.icon&&(this.options.icon=!1,this.$elementFilestyle.find(".
2icon-span-filestyle").remove())}},input:function(t){if(!0===t)this.options.input||(this.options.input=!0,this.options.buttonBefore?this.$elementFilestyle.append(this.htmlInput()):this.$elementFilestyle.prepend(this.htmlInput()),this.$elementFilestyle.find(".badge").remove(),this.pushNameFiles(),this.$elementFilestyle.find(".group-span-filestyle").addClass("input-group-btn"));else{if(!1!==t)return this.options.input;if(this.options.input){this.options.input=!1,this.$elementFilestyle.find(":text").remove();var e=this.pushNameFiles();e.length>0&&this.options.badge&&this.$elementFilestyle.find("label").append(' <span class="badge">'+e.length+"</span>"),this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}},size:function(t){if(void 0===t)return this.options.size;var e=this.$elementFilestyle.find("label"),i=this.$elementFilestyle.find("input");e.removeClass("btn-lg btn-sm"),i.removeClass("input-lg input-sm"),"nr"!=t&&(e.addClass("btn-"+t),i.addClass("input-"+t))},placeholder:function(t){if(void 0===t)return this.options.placeholder;this.options.placeholder=t,this.$elementFilestyle.find("input").attr("placeholder",t)},buttonText:function(t){if(void 0===t)return this.options.buttonText;this.options.buttonText=t,this.$elementFilestyle.find("label .buttonText").html(this.options.buttonText)},buttonName:function(t){if(void 0===t)return this.options.buttonName;this.options.buttonName=t,this.$elementFilestyle.find("label").attr({class:"btn "+this.options.buttonName})},iconName:function(t){if(void 0===t)return this.options.iconName;this.$elementFilestyle.find(".icon-span-filestyle").attr({class:"icon-span-filestyle "+this.options.iconName})},htmlIcon:function(){return this.options.icon?'<span class="icon-span-filestyle '+this.options.iconName+'"></span> ':""},htmlInput:function(){return this.options.input?'<input type="text" class="form-control '+("nr"==this.options.size?"":"input-"+this.options.size)+'" placeholder="'+this.options.placeholder+'" disabled> ':""},pushNameFiles:function(){var t="",e=[];void 0===this.$element[0].files?e[0]={name:this.$element[0]&&this.$element[0].value}:e=this.$element[0].files;for(var i=0;i<e.length;i++)t+=e[i].name.split("\\").pop()+", ";return""!==t?this.$elementFilestyle.find(":text").val(t.replace(/\, $/g,"")):this.$elementFilestyle.find(":text").val(""),e},constructor:function(){var i,n,r=this,o=r.$element.attr("id");""!==o&&o||(o="filestyle-"+e,r.$element.attr({id:o}),e++),n='<span class="group-span-filestyle '+(r.options.input?"input-group-btn":"")+'"><label for="'+o+'" class="btn '+r.options.buttonName+" "+("nr"==r.options.size?"":"btn-"+r.options.size)+'" '+(r.options.disabled?'disabled="true"':"")+">"+r.htmlIcon()+'<span class="buttonText">'+r.options.buttonText+"</span></label></span>",i=r.options.buttonBefore?n+r.htmlInput():r.htmlInput()+n,r.$elementFilestyle=t('<div class="bootstrap-filestyle input-group">'+i+"</div>"),r.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress((function(t){if(13===t.keyCode||32===t.charCode)return r.$elementFilestyle.find("label").click(),!1})),r.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(r.$elementFilestyle),r.options.disabled&&r.$element.attr("disabled","true"),r.$element.change((function(){var t=r.pushNameFiles();0==r.options.input&&r.options.badge?0==r.$elementFilestyle.find(".badge").length?r.$elementFilestyle.find("label").append(' <span class="badge">'+t.length+"</span>"):0==t.length?r.$elementFilestyle.find(".badge").remove():r.$elementFilestyle.find(".badge").html(t.length):r.$elementFilestyle.find(".badge").remove()}
2)),window.navigator.userAgent.search(/firefox/i)>-1&&r.$elementFilestyle.find("label").click((function(){return r.$element.click(),!1}))}};var n=t.fn.filestyle;t.fn.filestyle=function(e,n){var r="",o=this.each((function(){if("file"===t(this).attr("type")){var o=t(this),s=o.data("filestyle"),a=t.extend({},t.fn.filestyle.defaults,e,"object"==typeof e&&e);s||(o.data("filestyle",s=new i(this,a)),s.constructor()),"string"==typeof e&&(r=s[e](n))}}));return void 0!==typeof r?r:o},t.fn.filestyle.defaults={buttonText:"Choose file",iconName:"glyphicon glyphicon-folder-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1,placeholder:""},t.fn.filestyle.noConflict=function(){return t.fn.filestyle=n,this},t((function(){t(".filestyle").each((function(){var e=t(this),i={input:"false"!==e.attr("data-input"),icon:"false"!==e.attr("data-icon"),buttonBefore:"true"===e.attr("data-buttonBefore"),disabled:"true"===e.attr("data-disabled"),size:e.attr("data-size"),buttonText:e.attr("data-buttonText"),buttonName:e.attr("data-buttonName"),iconName:e.attr("data-iconName"),badge:"false"!==e.attr("data-badge"),placeholder:e.attr("data-placeholder")};e.filestyle(i)}))}))}(window.jQuery)},2165(t,e,i){t.exports=function(t,e,i,n){"use strict";const r="5.3.8";class o extends i{constructor(e,i){super(),(e=n.getElement(e))&&(this._element=e,this._config=this._getConfig(i),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),e.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){n.executeAfterTransition(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(e){return t.get(n.getElement(e),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return r}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}return o}(i(8331),i(2214),i(2235),i(1801))},3570(t,e,i){t.exports=function(t,e,i){"use strict";const n="button",r="active",o='[data-bs-toggle="button"]',s="click.bs.button.data-api";class a extends t{static get NAME(){return n}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(r))}static jQueryInterface(t){return this.each((function(){const e=a.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}return e.on(document,s,o,(t=>{t.preventDefault();const e=t.target.closest(o);a.getOrCreateInstance(e).toggle()})),i.defineJQueryPlugin(a),a}(i(2165),i(2214),i(1801))},4072(t,e,i){t.exports=function(t,e,i,n,r,o){"use strict";const s="carousel",a=".bs.carousel",l=".data-api",c="ArrowLeft",h="ArrowRight",u=500,f="next",d="prev",p="left",g="right",m=`slide${a}`,v=`slid${a}`,y=`keydown${a}`,b=`mouseenter${a}`,_=`mouseleave${a}`,w=`dragstart${a}`,x=`load${a}${l}`,C=`click${a}${l}`,S="carousel",T="active",O="slide",E="carousel-item-end",A="carousel-item-start",k="carousel-item-next",P="carousel-item-prev",D=".active",F=".carousel-item",j=D+F,I=".carousel-item img",M=".carousel-indicators",L="[data-bs-slide], [data-bs-slide-to]",R='[data-bs-ride="carousel"]',B={[c]:g,[h]:p},$={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},N={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class z extends t{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=n.findOne(M,this._element),this._addEventListeners(),this._config.ride===S&&this.cycle()}static get Default(){return $}static get DefaultType(){return N}static get NAME(){return s}next(){this._slide(f)}nextWhenVisible(){!document.hidden&&r.isVisible(this._element)&&this.next()}prev(){this._slide(d)}pause(){this._isSliding&&r.triggerTransitionEnd(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?e.one(this._element,v,(()=>this.cycle())):this.cycle())}to(t){const i=this._getItems();if(t>i.length-1||t<0)return;if(this._isSliding)return void e.one(this._element,v,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const r=t>n?f:d;this._slide(r,i[t])}
vendor: 5,233 bytes, line 2
2dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&e.on(this._element,y,(t=>this._keydown(t))),"hover"===this._config.pause&&(e.on(this._element,b,(()=>this.pause())),e.on(this._element,_,(()=>this._maybeEnableCycle()))),this._config.touch&&o.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of n.find(I,this._element))e.on(t,w,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(p)),rightCallback:()=>this._slide(this._directionToOrder(g)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),u+this._config.interval))}};this._swipeHelper=new o(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=B[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=n.findOne(D,this._indicatorsElement);e.classList.remove(T),e.removeAttribute("aria-current");const i=n.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(T),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,i=null){if(this._isSliding)return;const n=this._getActive(),o=t===f,s=i||r.getNextActiveElement(this._getItems(),n,o,this._config.wrap);if(s===n)return;const a=this._getItemIndex(s),l=i=>e.trigger(this._element,i,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:a});if(l(m).defaultPrevented)return;if(!n||!s)return;const c=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=s;const h=o?A:E,u=o?k:P;s.classList.add(u),r.reflow(s),n.classList.add(h),s.classList.add(h);const d=()=>{s.classList.remove(h,u),s.classList.add(T),n.classList.remove(T,u,h),this._isSliding=!1,l(v)};this._queueCallback(d,n,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains(O)}_getActive(){return n.findOne(j,this._element)}_getItems(){return n.find(F,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return r.isRTL()?t===p?d:f:t===p?f:d}_orderToDirection(t){return r.isRTL()?t===d?p:g:t===d?g:p}static jQueryInterface(t){return this.each((function(){const e=z.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}return e.on(document,C,L,(function(t){const e=n.getElementFromSelector(this);if(!e||!e.classList.contains(S))return;t.preventDefault();const r=z.getOrCreateInstance(e),o=this.getAttribute("data-bs-slide-to");return o?(r.to(o),void r._maybeEnableCycle()):"next"===i.getDataAttribute(this,"slide")?(r.next(),void r._maybeEnableCycle()):(r.prev(),void r._maybeEnableCycle())})),e.on(window,x,(()=>{const t=n.find(R);for(const e of t)z.getOrCreateInstance(e)})),r.defineJQueryPlugin(z),z}(i(2165),i(2214),i(9339),i(4929),i(1801),i(7367))},1113(t,e,i){t.exports=function(t,e,i,n){"use strict";const r="collapse",o=".bs.collapse",s=`show${o}`,a=`shown${o}`,l=`hide${o}`,c=`hidden${o}`,h=`click${o}.data-api`,u="show",f="collapse",d="collapsing",p="collapsed",g=`:scope .${f} .${f}`,m="collapse-horizontal",v="width",y="height",b=".collapse.show, .collapse.collapsing",_='[data-bs-toggle="collapse"]',w={parent:null,toggle:!0},x={parent:"(null|element)",toggle:"boolean"};class C extends t{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=i.find(_);for(const t of n){const e=i.getSelectorFromElement(t),n=i.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return w}static get DefaultType(){return x}static get NAME(){return r}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(b).filter((t=>t!==this._element)).map((t=>C.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(e.trigger(this._element,s).defaultPrevented)return;for(const e of t)e.hide();const i=this._getDimension();this._element.classList.remove(f),this._element.classList.add(d),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(d),this._element.classList.add(f,u),this._element.style[i]="",e.trigger(this._element,a)},r=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(n,this._element,!0),this._element.style[i]=`${this._element[r]}px`}
2hide(){if(this._isTransitioning||!this._isShown())return;if(e.trigger(this._element,l).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,n.reflow(this._element),this._element.classList.add(d),this._element.classList.remove(f,u);for(const t of this._triggerArray){const e=i.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(d),this._element.classList.add(f),e.trigger(this._element,c)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(t=this._element){return t.classList.contains(u)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=n.getElement(t.parent),t}_getDimension(){return this._element.classList.contains(m)?v:y}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(_);for(const e of t){const t=i.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=i.find(g,this._config.parent);return i.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(p,!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=C.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}return e.on(document,h,_,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of i.getMultipleElementsFromSelector(this))C.getOrCreateInstance(t,{toggle:!1}).toggle()})),n.defineJQueryPlugin(C),C}(i(2165),i(2214),i(4929),i(1801))},8331(t){t.exports=function(){"use strict";const t=new Map;return{set(e,i,n){t.has(e)||t.set(e,new Map);const r=t.get(e);r.has(i)||0===r.size?r.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}}}()},2214(t,e,i){t.exports=function(t){"use strict";const e=/[^.]*(?=\..*)\.|.*/,i=/\..*/,n=/::\d+$/,r={};let o=1;
vendor: 5,179 bytes, line 2
2const s={mouseenter:"mouseover",mouseleave:"mouseout"},a=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function l(t,e){return e&&`${e}::${o++}`||t.uidEvent||o++}function c(t){const e=l(t);return t.uidEvent=e,r[e]=r[e]||{},r[e]}function h(t,e){return function i(n){return b(n,{delegateTarget:t}),i.oneOff&&y.off(t,n.type,e),e.apply(t,[n])}}function u(t,e,i){return function n(r){const o=t.querySelectorAll(e);for(let{target:s}=r;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return b(r,{delegateTarget:s}),n.oneOff&&y.off(t,r.type,e,i),i.apply(s,[r])}}function f(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function d(t,e,i){const n="string"==typeof e,r=n?i:e||i;let o=v(t);return a.has(o)||(o=t),[n,r,o]}function p(t,i,n,r,o){if("string"!=typeof i||!t)return;let[a,p,g]=d(i,n,r);if(i in s){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};p=t(p)}const m=c(t),v=m[g]||(m[g]={}),y=f(v,p,a?n:null);if(y)return void(y.oneOff=y.oneOff&&o);const b=l(p,i.replace(e,"")),_=a?u(t,n,p):h(t,p);_.delegationSelector=a?n:null,_.callable=p,_.oneOff=o,_.uidEvent=b,v[b]=_,t.addEventListener(g,_,a)}function g(t,e,i,n,r){const o=f(e[i],n,r);o&&(t.removeEventListener(i,o,Boolean(r)),delete e[i][o.uidEvent])}function m(t,e,i,n){const r=e[i]||{};for(const[o,s]of Object.entries(r))o.includes(n)&&g(t,e,i,s.callable,s.delegationSelector)}function v(t){return t=t.replace(i,""),s[t]||t}const y={on(t,e,i,n){p(t,e,i,n,!1)},one(t,e,i,n){p(t,e,i,n,!0)},off(t,e,i,r){if("string"!=typeof e||!t)return;const[o,s,a]=d(e,i,r),l=a!==e,h=c(t),u=h[a]||{},f=e.startsWith(".");if(void 0===s){if(f)for(const i of Object.keys(h))m(t,h,i,e.slice(1));for(const[i,r]of Object.entries(u)){const o=i.replace(n,"");l&&!e.includes(o)||g(t,h,a,r.callable,r.delegationSelector)}}else{if(!Object.keys(u).length)return;g(t,h,a,s,o?i:null)}},trigger(e,i,n){if("string"!=typeof i||!e)return null;const r=t.getjQuery();let o=null,s=!0,a=!0,l=!1;i!==v(i)&&r&&(o=r.Event(i,n),r(e).trigger(o),s=!o.isPropagationStopped(),a=!o.isImmediatePropagationStopped(),l=o.isDefaultPrevented());const c=b(new Event(i,{bubbles:s,cancelable:!0}),n);return l&&c.preventDefault(),a&&e.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function b(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}return y}(i(1801))},9339(t){t.exports=function(){"use strict";function t(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function e(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}return{setDataAttribute(t,i,n){t.setAttribute(`data-bs-${e(i)}`,n)},removeDataAttribute(t,i){t.removeAttribute(`data-bs-${e(i)}`)},getDataAttributes(e){if(!e)return{};const i={},n=Object.keys(e.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),i[n]=t(e.dataset[r])}return i},getDataAttribute:(i,n)=>t(i.getAttribute(`data-bs-${e(n)}`))}}()},4929(t,e,i){t.exports=function(t){"use strict";const e=e=>{let i=e.getAttribute("data-bs-target");if(!i||"#"===i){let t=e.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),i=t&&"#"!==t?t.trim():null}return i?i.split(",").map((e=>t.parseSelector(e))).join(","):null},i={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(i,e).filter((e=>!t.isDisabled(e)&&t.isVisible(e)))},getSelectorFromElement(t){const n=e(t);return n&&i.findOne(n)?n:null},getElementFromSelector(t){const n=e(t);return n?i.findOne(n):null},getMultipleElementsFromSelector(t){const n=e(t);return n?i.find(n):[]}};return i}(i(1801))}
vendor: 4,268 bytes, line 2
2,8209(t,e,i){t.exports=function(t,e,i,n,r,o,s,a){"use strict";const l="modal",c=".bs.modal",h="Escape",u=`hide${c}`,f=`hidePrevented${c}`,d=`hidden${c}`,p=`show${c}`,g=`shown${c}`,m=`resize${c}`,v=`click.dismiss${c}`,y=`mousedown.dismiss${c}`,b=`keydown.dismiss${c}`,_=`click${c}.data-api`,w="modal-open",x="fade",C="show",S="modal-static",T=".modal.show",O=".modal-dialog",E=".modal-body",A='[data-bs-toggle="modal"]',k={backdrop:!0,focus:!0,keyboard:!0},P={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class D extends t{constructor(t,e){super(t,e),this._dialog=i.findOne(O,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new a,this._addEventListeners()}static get Default(){return k}static get DefaultType(){return P}static get NAME(){return l}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||e.trigger(this._element,p,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(w),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(e.trigger(this._element,u).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(C),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){e.off(window,c),e.off(this._dialog,c),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new n({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new o({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=i.findOne(E,this._dialog);n&&(n.scrollTop=0),s.reflow(this._element),this._element.classList.add(C);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,e.trigger(this._element,g,{relatedTarget:t})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){e.on(this._element,b,(t=>{t.key===h&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),e.on(window,m,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),e.on(this._element,y,(t=>{e.one(this._element,v,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(w),this._resetAdjustments(),this._scrollBar.reset(),e.trigger(this._element,d)}))}_isAnimated(){return this._element.classList.contains(x)}_triggerBackdropTransition(){if(e.trigger(this._element,f).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,i=this._element.style.overflowY;"hidden"===i||this._element.classList.contains(S)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(S),this._queueCallback((()=>{this._element.classList.remove(S),this._queueCallback((()=>{this._element.style.overflowY=i}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=s.isRTL()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=s.isRTL()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=D.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
2amed "${t}"`);i[t](e)}}))}}return e.on(document,_,A,(function(t){const n=i.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),e.one(n,p,(t=>{t.defaultPrevented||e.one(n,d,(()=>{s.isVisible(this)&&this.focus()}))}));const r=i.findOne(T);r&&D.getInstance(r).hide(),D.getOrCreateInstance(n).toggle(this)})),r.enableDismissTrigger(D),s.defineJQueryPlugin(D),D}(i(2165),i(2214),i(4929),i(4687),i(4062),i(2294),i(1801),i(2067))},2931(t,e,i){t.exports=function(t,e,i,n){"use strict";const r="tab",o=".bs.tab",s=`hide${o}`,a=`hidden${o}`,l=`show${o}`,c=`shown${o}`,h=`click${o}`,u=`keydown${o}`,f=`load${o}`,d="ArrowLeft",p="ArrowRight",g="ArrowUp",m="ArrowDown",v="Home",y="End",b="active",_="fade",w="show",x="dropdown",C=".dropdown-toggle",S=".dropdown-menu",T=`:not(${C})`,O='.list-group, .nav, [role="tablist"]',E=".nav-item, .list-group-item",A='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',k=`.nav-link${T}, .list-group-item${T}, [role="tab"]${T}, ${A}`,P=`.${b}[data-bs-toggle="tab"], .${b}[data-bs-toggle="pill"], .${b}[data-bs-toggle="list"]`;class D extends t{constructor(t){super(t),this._parent=this._element.closest(O),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),e.on(this._element,u,(t=>this._keydown(t))))}static get NAME(){return r}show(){const t=this._element;if(this._elemIsActive(t))return;const i=this._getActiveElem(),n=i?e.trigger(i,s,{relatedTarget:t}):null;e.trigger(t,l,{relatedTarget:i}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(i,t),this._activate(t,i))}_activate(t,n){if(!t)return;t.classList.add(b),this._activate(i.getElementFromSelector(t));const r=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),e.trigger(t,c,{relatedTarget:n})):t.classList.add(w)};this._queueCallback(r,t,t.classList.contains(_))}_deactivate(t,n){if(!t)return;t.classList.remove(b),t.blur(),this._deactivate(i.getElementFromSelector(t));const r=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),e.trigger(t,a,{relatedTarget:n})):t.classList.remove(w)};this._queueCallback(r,t,t.classList.contains(_))}_keydown(t){if(![d,p,g,m,v,y].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!n.isDisabled(t)));let i;if([v,y].includes(t.key))i=e[t.key===v?0:e.length-1];else{const r=[p,m].includes(t.key);i=n.getNextActiveElement(e,t.target,r,!0)}i&&(i.focus({preventScroll:!0}),D.getOrCreateInstance(i).show())}_getChildren(){return i.find(k,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=i.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains(x))return;const r=(t,r)=>{const o=i.findOne(t,n);o&&o.classList.toggle(r,e)};r(C,b),r(S,w),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(b)}_getInnerElement(t){return t.matches(k)?t:i.findOne(k,t)}_getOuterElement(t){return t.closest(E)||t}static jQueryInterface(t){return this.each((function(){const e=D.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}return e.on(document,h,A,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),n.isDisabled(this)||D.getOrCreateInstance(this).show()})),e.on(window,f,(()=>{for(const t of i.find(P))D.getOrCreateInstance(t)})),n.defineJQueryPlugin(D),D}(i(2165),i(2214),i(4929),i(1801))}
vendor: 4,116 bytes, line 2
2,5279(t,e,i){t.exports=function(t,e,i,n,r,o,s){"use strict";function a(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const l=a(t),c="tooltip",h=new Set(["sanitize","allowList","sanitizeFn"]),u="fade",f="show",d=".tooltip-inner",p=".modal",g="hide.bs.modal",m="hover",v="focus",y="click",b="manual",_="hide",w="hidden",x="show",C="shown",S="inserted",T="click",O="focusin",E="focusout",A="mouseenter",k="mouseleave",P={AUTO:"auto",TOP:"top",RIGHT:r.isRTL()?"left":"right",BOTTOM:"bottom",LEFT:r.isRTL()?"right":"left"},D={allowList:o.DefaultAllowlist,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},F={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class j extends e{constructor(t,e){if(void 0===l)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return D}static get DefaultType(){return F}static get NAME(){return c}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),i.off(this._element.closest(p),g,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=i.trigger(this._element,this.constructor.eventName(x)),e=(r.findShadowRoot(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:o}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(o.append(n),i.trigger(this._element,this.constructor.eventName(S))),this._popper=this._createPopper(n),n.classList.add(f),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))i.on(t,"mouseover",r.noop);const s=()=>{i.trigger(this._element,this.constructor.eventName(C)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(i.trigger(this._element,this.constructor.eventName(_)).defaultPrevented)return;if(this._getTipElement().classList.remove(f),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))i.off(t,"mouseover",r.noop);this._activeTrigger[y]=!1,this._activeTrigger[v]=!1,this._activeTrigger[m]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),i.trigger(this._element,this.constructor.eventName(w)))};this._queueCallback(t,this.tip,this._isAnimated())}
vendor: 4,760 bytes, line 2
2update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(u,f),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=r.getUID(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(u),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new s({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[d]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(u)}_isShown(){return this.tip&&this.tip.classList.contains(f)}_createPopper(t){const e=r.execute(this._config.placement,[this,t,this._element]),i=P[e.toUpperCase()];return l.createPopper(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return r.execute(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...r.execute(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)i.on(this._element,this.constructor.eventName(T),this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[y]=!(e._isShown()&&e._activeTrigger[y]),e.toggle()}));else if(e!==b){const t=e===m?this.constructor.eventName(A):this.constructor.eventName(O),n=e===m?this.constructor.eventName(k):this.constructor.eventName(E);i.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?v:m]=!0,e._enter()})),i.on(this._element,n,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?v:m]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},i.on(this._element.closest(p),g,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=n.getDataAttributes(this._element);for(const t of Object.keys(e))h.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:r.getElement(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=j.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
2amed "${t}"`);e[t]()}}))}}return r.defineJQueryPlugin(j),j}(i(4199),i(2165),i(2214),i(9339),i(1801),i(8534),i(412))},4687(t,e,i){t.exports=function(t,e,i){"use strict";const n="backdrop",r="fade",o="show",s=`mousedown.bs.${n}`,a={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},l={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class c extends e{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return a}static get DefaultType(){return l}static get NAME(){return n}show(t){if(!this._config.isVisible)return void i.execute(t);this._append();const e=this._getElement();this._config.isAnimated&&i.reflow(e),e.classList.add(o),this._emulateAnimation((()=>{i.execute(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(o),this._emulateAnimation((()=>{this.dispose(),i.execute(t)}))):i.execute(t)}dispose(){this._isAppended&&(t.off(this._element,s),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(r),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=i.getElement(t.rootElement),t}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),t.on(e,s,(()=>{i.execute(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){i.executeAfterTransition(t,this._getElement(),this._config.isAnimated)}}return c}(i(2214),i(2235),i(1801))},4062(t,e,i){!function(t,e,i,n){"use strict";const r=(t,r="hide")=>{const o=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;e.on(document,o,`[data-bs-dismiss="${s}"]`,(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),n.isDisabled(this))return;const o=i.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(o)[r]()}))};t.enableDismissTrigger=r,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e,i(2214),i(4929),i(1801))},2235(t,e,i){t.exports=function(t,e){"use strict";class i{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(i,n){const r=e.isElement(n)?t.getDataAttribute(n,"config"):{};return{...this.constructor.Default,..."object"==typeof r?r:{},...e.isElement(n)?t.getDataAttributes(n):{},..."object"==typeof i?i:{}}}_typeCheckConfig(t,i=this.constructor.DefaultType){for(const[n,r]of Object.entries(i)){const i=t[n],o=e.isElement(i)?"element":e.toType(i);if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${r}".`)}}}return i}(i(9339),i(1801))},2294(t,e,i){t.exports=function(t,e,i){"use strict";const n="focustrap",r=".bs.focustrap",o=`focusin${r}`,s=`keydown.tab${r}`,a="Tab",l="forward",c="backward",h={autofocus:!0,trapElement:null},u={autofocus:"boolean",trapElement:"element"};class f extends i{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return h}static get DefaultType(){return u}static get NAME(){return n}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),t.off(document,r),t.on(document,o,(t=>this._handleFocusin(t))),t.on(document,s,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,t.off(document,r))}_handleFocusin(t){const{trapElement:i}=this._config;if(t.target===document||t.target===i||i.contains(t.target))return;const n=e.focusableChildren(i);0===n.length?i.focus():this._lastTabNavDirection===c?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){t.key===a&&(this._lastTabNavDirection=t.shiftKey?c:l)}}return f}(i(2214),i(4929),i(2235))},1801(t,e){!function(t){"use strict";const e=1e6,i=1e3,n="transitionend",r=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),o=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),s=t=>{do{t+=Math.floor(Math.random()*e)}while(document.getElementById(t));return t},a=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),o=Number.parseFloat(n);return r||o?(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*i):0},l=t=>{t.dispatchEvent(new Event(n))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),h=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(r(t)):null,u=t=>{if(!c(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},f=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),d=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?d(t.parentNode):null},p=()=>{},g=t=>{t.offsetHeight},m=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,v=[],y=t=>{"loading"===document.readyState?(v.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of v)t()})),v.push(t)):t()},b=()=>"rtl"===document.documentElement.dir,_=t=>{y((()=>{const e=m();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}}))},w=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,x=(t,e,i=!0)=>
vendor: 5,238 bytes, line 2
2{if(!i)return void w(t);const r=5,o=a(e)+r;let s=!1;const c=({target:i})=>{i===e&&(s=!0,e.removeEventListener(n,c),w(t))};e.addEventListener(n,c),setTimeout((()=>{s||l(e)}),o)},C=(t,e,i,n)=>{const r=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[r-1]:t[0]:(o+=i?1:-1,n&&(o=(o+r)%r),t[Math.max(0,Math.min(o,r-1))])};t.defineJQueryPlugin=_,t.execute=w,t.executeAfterTransition=x,t.findShadowRoot=d,t.getElement=h,t.getNextActiveElement=C,t.getTransitionDurationFromElement=a,t.getUID=s,t.getjQuery=m,t.isDisabled=f,t.isElement=c,t.isRTL=b,t.isVisible=u,t.noop=p,t.onDOMContentLoaded=y,t.parseSelector=r,t.reflow=g,t.toType=o,t.triggerTransitionEnd=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e)},8534(t,e){!function(t){"use strict";const e={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},i=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),n=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,r=(t,e)=>{const r=t.nodeName.toLowerCase();return e.includes(r)?!i.has(r)||Boolean(n.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(r)))};function o(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...n.body.querySelectorAll("*"));for(const t of o){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),o=[].concat(e["*"]||[],e[i]||[]);for(const e of n)r(e,o)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}t.DefaultAllowlist=e,t.sanitizeHtml=o,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e)},2067(t,e,i){t.exports=function(t,e,i){"use strict";const n=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",r=".sticky-top",o="padding-right",s="margin-right";class a{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,o,(e=>e+t)),this._setElementAttributes(n,o,(e=>e+t)),this._setElementAttributes(r,s,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,o),this._resetElementAttributes(n,o),this._resetElementAttributes(r,s)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth(),r=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const r=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(r))}px`)};this._applyManipulationCallback(t,r)}_saveInitialAttribute(e,i){const n=e.style.getPropertyValue(i);n&&t.setDataAttribute(e,i,n)}_resetElementAttributes(e,i){const n=e=>{const n=t.getDataAttribute(e,i);null!==n?(t.removeDataAttribute(e,i),e.style.setProperty(i,n)):e.style.removeProperty(i)};this._applyManipulationCallback(e,n)}_applyManipulationCallback(t,n){if(i.isElement(t))n(t);else for(const i of e.find(t,this._element))n(i)}}return a}(i(9339),i(4929),i(1801))},7367(t,e,i){t.exports=function(t,e,i){"use strict";const n="swipe",r=".bs.swipe",o=`touchstart${r}`,s=`touchmove${r}`,a=`touchend${r}`,l=`pointerdown${r}`,c=`pointerup${r}`,h="touch",u="pen",f="pointer-event",d=40,p={endCallback:null,leftCallback:null,rightCallback:null},g={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class m extends e{constructor(t,e){super(),this._element=t,t&&m.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return p}static get DefaultType(){return g}static get NAME(){return n}dispose(){t.off(this._element,r)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),i.execute(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=d)return;const e=t/this._deltaX;this._deltaX=0,e&&i.execute(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(t.on(this._element,l,(t=>this._start(t))),t.on(this._element,c,(t=>this._end(t))),this._element.classList.add(f)):(t.on(this._element,o,(t=>this._start(t))),t.on(this._element,s,(t=>this._move(t))),t.on(this._element,a,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===u||t.pointerType===h)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}return m}(i(2214),i(2235),i(1801))}
vendor: 9,201 bytes, line 2
2,412(t,e,i){t.exports=function(t,e,i,n){"use strict";const r="TemplateFactory",o={allowList:i.DefaultAllowlist,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},s={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},a={entry:"(string|element|function|null)",selector:"(string|element)"};class l extends e{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return o}static get DefaultType(){return s}static get NAME(){return r}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},a)}_setContent(e,i,r){const o=t.findOne(r,e);o&&((i=this._resolvePossibleFunction(i))?n.isElement(i)?this._putElementInTemplate(n.getElement(i),o):this._config.html?o.innerHTML=this._maybeSanitize(i):o.textContent=i:o.remove())}_maybeSanitize(t){return this._config.sanitize?i.sanitizeHtml(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return n.execute(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}return l}(i(4929),i(2235),i(8534),i(1801))},4686(t,e,i){"use strict";const n=i(5350),r=i(7947),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=l,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,i){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return c(t,e,i)}function c(t,e,i){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const i=0|g(t,e);let n=a(i);const r=n.write(t,e);r!==i&&(n=n.slice(0,r));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return d(t,e,i);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return d(t,e,i);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,i);const r=function(t){if(l.isBuffer(t)){const e=0|p(t.length),i=a(e);return 0===i.length||t.copy(i,0,0,e),i}if(void 0!==t.length)return"number"!=typeof t.length||K(t.length)?a(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return h(t),a(t<0?0:0|p(t))}function f(t){const e=t.length<0?0:0|p(t.length),i=a(e);for(let n=0;n<e;n+=1)i[n]=255&t[n];return i}function d(t,e,i){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(i||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,e):new Uint8Array(t,e,i),Object.setPrototypeOf(n,l.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const i=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;let r=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return X(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Y(t).length;default:if(r)return n?-1:X(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,i){let 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 O(this,e,i);case"ascii":return A(this,e,i);case"latin1":case"binary":return k(this,e,i);case"base64":return T(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 v(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}function y(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),K(i=+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:b(t,e,i,n,r);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):b(t,[e],i,n,r);throw new TypeError("val must be string, number or Buffer")}function b(t,e,i,n,r){let o,s=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;s=2,a/=2,l/=2,i/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(r){let n=-1;for(o=i;o<a;o++)if(c(t,o)===c(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===l)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(i+l>a&&(i=a-l),o=i;o>=0;o--){let i=!0;for(let n=0;n<l;n++)if(c(t,o+n)!==c(e,n)){i=!1;break}if(i)return o}return-1}function _(t,e,i,n){i=Number(i)||0;const r=t.length-i;n?(n=Number(n))>r&&(n=r):n=r;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(K(n))return s;t[i+s]=n}return s}function w(t,e,i,n){return G(X(e,t.length-i),t,i,n)}function x(t,e,i,n){return G(function(t){const e=[];for(let 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 G(Y(e),t,i,n)}function S(t,e,i,n){return G(function(t,e){let i,n,r;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)i=t.charCodeAt(s),n=i>>8,r=i%256,o.push(r),o.push(n);return o}(e,t.length-i),t,i,n)}function T(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function O(t,e,i){i=Math.min(t.length,i);const n=[];let r=e;for(;r<i;){const e=t[r];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(r+s<=i){let i,n,a,l;switch(s){case 1:e<128&&(o=e);break;case 2:i=t[r+1],128==(192&i)&&(l=(31&e)<<6|63&i,l>127&&(o=l));break;case 3:i=t[r+1],n=t[r+2],128==(192&i)&&128==(192&n)&&(l=(15&e)<<12|(63&i)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:i=t[r+1],n=t[r+2],a=t[r+3],128==(192&i)&&128==(192&n)&&128==(192&a)&&(l=(15&e)<<18|(63&i)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),r+=s}return function(t){const e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);let i="",n=0;for(;n<e;)i+=String.fromCharCode.apply(String,t.slice(n,n+=E));return i}(n)}l.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}
vendor: 6,370 bytes, line 2
2),l.poolSize=8192,l.from=function(t,e,i){return c(t,e,i)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,i){return function(t,e,i){return h(t),t<=0?a(t):void 0!==e?"string"==typeof i?a(t).fill(e,i):a(t).fill(e):a(t)}(t,e,i)},l.allocUnsafe=function(t){return u(t)},l.allocUnsafeSlow=function(t){return u(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let i=t.length,n=e.length;for(let r=0,o=Math.min(i,n);r<o;++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(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;const n=l.allocUnsafe(e);let r=0;for(i=0;i<t.length;++i){let e=t[i];if(q(e,Uint8Array))r+e.length>n.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,r)):Uint8Array.prototype.set.call(n,e,r);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,r)}r+=e.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)v(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?O(this,0,t):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,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(){let t="";const i=e.IS;return t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(t+=" ... "),"<Buffer "+t+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,i,n,r){if(q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);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;let o=(r>>>=0)-(n>>>=0),s=(i>>>=0)-(e>>>=0);const a=Math.min(o,s),c=this.slice(n,r),h=t.slice(e,i);for(let t=0;t<a;++t)if(c[t]!==h[t]){o=c[t],s=h[t];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},l.prototype.indexOf=function(t,e,i){return y(this,t,e,i,!0)},l.prototype.lastIndexOf=function(t,e,i){return y(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)}const 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");let o=!1;for(;;)switch(n){case"hex":return _(this,t,e,i);case"utf8":case"utf-8":return w(this,t,e,i);case"ascii":case"latin1":case"binary":return x(this,t,e,i);case"base64":return C(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function A(t,e,i){let n="";i=Math.min(t.length,i);for(let r=e;r<i;++r)n+=String.fromCharCode(127&t[r]);return n}function k(t,e,i){let n="";i=Math.min(t.length,i);for(let r=e;r<i;++r)n+=String.fromCharCode(t[r]);return n}function P(t,e,i){const n=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>n)&&(i=n);let r="";for(let n=e;n<i;++n)r+=Q[t[n]];return r}function D(t,e,i){const n=t.slice(e,i);let r="";for(let t=0;t<n.length-1;t+=2)r+=String.fromCharCode(n[t]+256*n[t+1]);return r}function F(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 j(t,e,i,n,r,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<o)throw new RangeError('"value" argument is out of bounds');if(i+n>t.length)throw new RangeError("Index out of range")}function I(t,e,i,n,r){V(e,n,r,t,i,7);let o=Number(e&BigInt(4294967295));t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[i++]=s,s>>=8,t[i++]=s,s>>=8,t[i++]=s,s>>=8,t[i++]=s,i}function M(t,e,i,n,r){V(e,n,r,t,i,7);let o=Number(e&BigInt(4294967295));t[i+7]=o,o>>=8,t[i+6]=o,o>>=8,t[i+5]=o,o>>=8,t[i+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[i+3]=s,s>>=8,t[i+2]=s,s>>=8,t[i+1]=s,s>>=8,t[i]=s,i+8}function L(t,e,i,n,r,o){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function R(t,e,i,n,o){return e=+e,i>>>=0,o||L(t,0,i,4),r.write(t,e,i,n,23,4),i+4}function B(t,e,i,n,o){return e=+e,i>>>=0,o||L(t,0,i,8),r.write(t,e,i,n,52,8),i+8}l.prototype.slice=function(t,e){const i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,l.prototype),n}
vendor: 4,226 bytes, line 2
2,l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,i){t>>>=0,e>>>=0,i||F(t,e,this.length);let n=this[t],r=1,o=0;for(;++o<e&&(r*=256);)n+=this[t+o]*r;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,i){t>>>=0,e>>>=0,i||F(t,e,this.length);let n=this[t+--e],r=1;for(;e>0&&(r*=256);)n+=this[t+--e]*r;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,r=this[++t]+256*this[++t]+65536*this[++t]+i*2**24;return BigInt(n)+(BigInt(r)<<BigInt(32))})),l.prototype.readBigUInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],r=this[++t]*2**24+65536*this[++t]+256*this[++t]+i;return(BigInt(n)<<BigInt(32))+BigInt(r)})),l.prototype.readIntLE=function(t,e,i){t>>>=0,e>>>=0,i||F(t,e,this.length);let n=this[t],r=1,o=0;for(;++o<e&&(r*=256);)n+=this[t+o]*r;return r*=128,n>=r&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,i){t>>>=0,e>>>=0,i||F(t,e,this.length);let n=e,r=1,o=this[t+--n];for(;n>0&&(r*=256);)o+=this[t+--n]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||F(t,2,this.length);const i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(t,e){t>>>=0,e||F(t,2,this.length);const i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||F(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 t>>>=0,e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),l.prototype.readBigInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+i)})),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||F(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||F(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||F(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||F(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,i,n){if(t=+t,e>>>=0,i>>>=0,!n){j(this,t,e,i,Math.pow(2,8*i)-1,0)}let r=1,o=0;for(this[e]=255&t;++o<i&&(r*=256);)this[e+o]=t/r&255;return e+i},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,i,n){if(t=+t,e>>>=0,i>>>=0,!n){j(this,t,e,i,Math.pow(2,8*i)-1,0)}let r=i-1,o=1;for(this[e+r]=255&t;--r>=0&&(o*=256);)this[e+r]=t/o&255;return e+i},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,
vendor: 4,694 bytes, line 2
2i){return t=+t,e>>>=0,i||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=J((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=J((function(t,e=0){return M(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*i-1);j(this,t,e,i,n-1,-n)}let r=0,o=1,s=0;for(this[e]=255&t;++r<i&&(o*=256);)t<0&&0===s&&0!==this[e+r-1]&&(s=1),this[e+r]=(t/o|0)-s&255;return e+i},l.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*i-1);j(this,t,e,i,n-1,-n)}let r=i-1,o=1,s=0;for(this[e+r]=255&t;--r>=0&&(o*=256);)t<0&&0===s&&0!==this[e+r+1]&&(s=1),this[e+r]=(t/o|0)-s&255;return e+i},l.prototype.writeInt8=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,1,127,-128),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||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,i){return t=+t,e>>>=0,i||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=J((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=J((function(t,e=0){return M(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,i){return R(this,t,e,!0,i)},l.prototype.writeFloatBE=function(t,e,i){return R(this,t,e,!1,i)},l.prototype.writeDoubleLE=function(t,e,i){return B(this,t,e,!0,i)},l.prototype.writeDoubleBE=function(t,e,i){return B(this,t,e,!1,i)},l.prototype.copy=function(t,e,i,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");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("Index out of range");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);const r=n-i;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,i,n):Uint8Array.prototype.set.call(t,this.subarray(i,n),e),r},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),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);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;let r;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(r=e;r<i;++r)this[r]=t;else{const o=l.isBuffer(t)?t:l.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(r=0;r<i-e;++r)this[r+e]=o[r%s]}return this};const $={};function N(t,e,i){$[t]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function z(t){let e="",i=t.length;const n="-"===t[0]?1:0;for(;i>=n+4;i-=3)e=`_${t.slice(i-3,i)}${e}`;return`${t.slice(0,i)}${e}`}function V(t,e,i,n,r,o){if(t>i||t<e){const n="bigint"==typeof e?"n":"";let r;throw r=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${i}${n}`,new $.ERR_OUT_OF_RANGE("value",r,t)}
vendor: 4,306 bytes, line 2
2!function(t,e,i){W(e,"offset"),void 0!==t[e]&&void 0!==t[e+i]||H(e,t.length-(i+1))}(n,r,o)}function W(t,e){if("number"!=typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,i){if(Math.floor(t)!==t)throw W(t,i),new $.ERR_OUT_OF_RANGE(i||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${e}`,t)}N("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),N("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),N("ERR_OUT_OF_RANGE",(function(t,e,i){let n=`The value of "${t}" is out of range.`,r=i;return Number.isInteger(i)&&Math.abs(i)>2**32?r=z(String(i)):"bigint"==typeof i&&(r=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(r=z(r)),r+="n"),n+=` It must be ${e}. Received ${r}`,n}),RangeError);const U=/[^+/0-9A-Za-z-_]/g;function X(t,e){let i;e=e||1/0;const n=t.length;let r=null;const o=[];for(let s=0;s<n;++s){if(i=t.charCodeAt(s),i>55295&&i<57344){if(!r){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(e-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((e-=1)<0)break;o.push(i)}else if(i<2048){if((e-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.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;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function Y(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,i,n){let r;for(r=0;r<n&&!(r+i>=e.length||r>=t.length);++r)e[r+i]=t[r];return r}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let i=0;i<16;++i){const n=16*i;for(let r=0;r<16;++r)e[n+r]=t[i]+t[r]}return e}();function J(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},9409(t,e,i){"use strict";i.d(e,{T:()=>r});var n=function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},n.apply(this,arguments)},r=function(){function t(t,e,i){var r=this;this.endVal=e,this.options=i,this.version="2.10.0",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",autoAnimate:!1,autoAnimateDelay:200,autoAnimateOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(t){r.startTime||(r.startTime=t);var e=t-r.startTime;r.remaining=r.duration-e,r.useEasing?r.countDown?r.frameVal=r.startVal-r.easingFn(e,0,r.startVal-r.endVal,r.duration):r.frameVal=r.easingFn(e,r.startVal,r.endVal-r.startVal,r.duration):r.frameVal=r.startVal+(r.endVal-r.startVal)*(e/r.duration);var i=r.countDown?r.frameVal<r.endVal:r.frameVal>r.endVal;r.frameVal=i?r.endVal:r.frameVal,r.frameVal=Number(r.frameVal.toFixed(r.options.decimalPlaces)),r.printValue(r.frameVal),e<r.duration?r.rAF=requestAnimationFrame(r.count):null!==r.finalEndVal?r.update(r.finalEndVal):r.options.onCompleteCallback&&r.options.onCompleteCallback()},this.formatNumber=function(t){var e,i,n,o,s=t<0?"-":"";e=Math.abs(t).toFixed(r.options.decimalPlaces);var a=(e+="").split(".");if(i=a[0],n=a.length>1?r.options.decimal+a[1]:"",r.options.useGrouping){o="";for(var l=3,c=0,h=0,u=i.length;h<u;++h)r.options.useIndianSeparators&&4===h&&(l=2,c=1),0!==h&&c%l==0&&(o=r.options.separator+o),c++,o=i[u-h-1]+o;i=o}return r.options.numerals&&r.options.numerals.length&&(i=i.replace(/[0-9]/g,(function(t){return r.options.numerals[+t]})),n=n.replace(/[0-9]/g,(function(t){return r.options.numerals[+t]}))),s+r.options.prefix+i+n+r.options.suffix}
vendor: 4,164 bytes, line 2
2,this.easeOutExpo=function(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e},this.options=n(n({},this.defaults),i),this.options.enableScrollSpy&&(this.options.autoAnimate=!0),void 0!==this.options.scrollSpyDelay&&(this.options.autoAnimateDelay=this.options.scrollSpyDelay),this.options.scrollSpyOnce&&(this.options.autoAnimateOnce=!0),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.el="string"==typeof t?document.getElementById(t):t,e=null==e?this.parse(this.el.innerHTML):e,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(e),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined","undefined"!=typeof window&&this.options.autoAnimate&&(this.error||"undefined"==typeof IntersectionObserver?this.error?console.error(this.error,t):console.error("IntersectionObserver is not supported by this browser"):this.setupObserver())}return t.prototype.setupObserver=function(){var e=this,i=t.observedElements.get(this.el);i&&i.unobserve(),t.observedElements.set(this.el,this),this.observer=new IntersectionObserver((function(t){for(var i=0,n=t;i<n.length;i++){var r=n[i];r.isIntersecting&&e.paused&&!e.once?(e.paused=!1,e.autoAnimateTimeout=setTimeout((function(){return e.start()}),e.options.autoAnimateDelay),e.options.autoAnimateOnce&&(e.once=!0,e.observer.disconnect())):r.isIntersecting||e.paused||(clearTimeout(e.autoAnimateTimeout),e.reset())}}),{threshold:0}),this.observer.observe(this.el)},t.prototype.unobserve=function(){var e;clearTimeout(this.autoAnimateTimeout),null===(e=this.observer)||void 0===e||e.disconnect(),t.observedElements.delete(this.el)},t.prototype.onDestroy=function(){clearTimeout(this.autoAnimateTimeout),cancelAnimationFrame(this.rAF),this.paused=!0,this.unobserve(),this.options.onCompleteCallback=null,this.options.onStartCallback=null},t.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var e=t-this.startVal;if(Math.abs(e)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;var i=this.countDown?1:-1;this.endVal=t+i*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},t.prototype.start=function(t){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},t.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},t.prototype.reset=function(){clearTimeout(this.autoAnimateTimeout),cancelAnimationFrame(this.rAF),this.paused=!0,this.once=!1,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},t.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},t.prototype.printValue=function(t){var e;if(this.el){var i=this.formattingFn(t);if(null===(e=this.options.plugin)||void 0===e?void 0:e.render)this.options.plugin.render(this.el,i);else if("INPUT"===this.el.tagName)this.el.value=i;else"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=i:this.el.
vendor: 4,668 bytes, line 2
2innerHTML=i}},t.prototype.ensureNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.prototype.validateValue=function(t){var e=Number(t);return this.ensureNumber(e)?e:(this.error="[CountUp] invalid start or end value: ".concat(t),null)},t.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},t.prototype.parse=function(t){var e=function(t){return t.replace(/([.,'Â ])/g,"\\$1")},i=e(this.options.separator),n=e(this.options.decimal),r=t.replace(new RegExp(i,"g"),"").replace(new RegExp(n,"g"),".");return parseFloat(r)},t.observedElements=new WeakMap,t}()},7404(t,e,i){var n,r,o,s,a,l,c,h,u,f,d,p,g,m,v,y,b,_,w,x,C,S,T,O,E,A=i(4686).hp,k=k||{version:"5.5.2"};if(e.fabric=k,"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?k.document=document:k.document=document.implementation.createHTMLDocument(""),k.window=window;else{var P=new(i(3362).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;k.document=P.document,k.jsdomImplForWrapper=i(3600).implForWrapper,k.nodeCanvas=i(7706).Canvas,k.window=P,DOMParser=k.window.DOMParser}function D(t,e){var i=t.canvas,n=e.targetCanvas,r=n.getContext("2d");r.translate(0,n.height),r.scale(1,-1);var o=i.height-n.height;r.drawImage(i,0,o,n.width,n.height,0,0,n.width,n.height)}function F(t,e){var i=e.targetCanvas.getContext("2d"),n=e.destinationWidth,r=e.destinationHeight,o=n*r*4,s=new Uint8Array(this.imageBuffer,0,o),a=new Uint8ClampedArray(this.imageBuffer,0,o);t.readPixels(0,0,n,r,t.RGBA,t.UNSIGNED_BYTE,s);var l=new ImageData(a,n,r);i.putImageData(l,0,0)}k.isTouchSupported="ontouchstart"in k.window||"ontouchstart"in k.document||k.window&&k.window.navigator&&k.window.navigator.maxTouchPoints>0,k.isLikelyNode=void 0!==A&&"undefined"==typeof window,k.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"],k.DPI=96,k.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",k.commaWsp="(?:\\s+,?\\s*|,\\s*)",k.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,k.reNonWord=/[ \n\.,;!\?\-]/,k.fontPaths={},k.iMatrix=[1,0,0,1,0,0],k.svgNS="http://www.w3.org/2000/svg",k.perfLimitSizeTotal=2097152,k.maxCacheSideLimit=4096,k.minCacheSideLimit=256,k.charWidthsCache={},k.textureSize=2048,k.disableStyleCopyPaste=!1,k.enableGLFiltering=!0,k.devicePixelRatio=k.window.devicePixelRatio||k.window.webkitDevicePixelRatio||k.window.mozDevicePixelRatio||1,k.browserShadowBlurConstant=1,k.arcToSegmentsCache={},k.boundsOfCurveCache={},k.cachesBoundsOfCurve=!0,k.forceGLPutImageData=!1,k.initFilterBackend=function(){return k.enableGLFiltering&&k.isWebglSupported&&k.isWebglSupported(k.textureSize)?(console.log("max texture size: "+k.maxTextureSize),new k.WebglFilterBackend({tileSize:k.textureSize})):k.Canvas2dFilterBackend?new k.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=k),function(){function t(t,e){if(this.__eventListeners[t]){var i=this.__eventListeners[t];e?i[i.indexOf(e)]=!1:k.util.array.fill(i,!1)}}function e(t,e){var i=function(){e.apply(this,arguments),this.off(t,i)}.bind(this);this.on(t,i)}k.Observable={fire:function(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},on:function(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},once:function(t,i){if(1===arguments.length)for(var n in t)e.call(this,n,t[n]);else e.call(this,t,i);return this},off:function(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}}}(),k.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}
vendor: 9,585 bytes, line 2
2,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,e){return this._objects.indexOf(t)>-1||!!e&&this._objects.some((function(e){return"function"==typeof e.contains&&e.contains(t,!0)}))},complexity:function(){return this._objects.reduce((function(t,e){return t+=e.complexity?e.complexity():0}),0)}},k.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof k.Gradient||this.set(e,new k.Gradient(t))},_initPattern:function(t,e,i){!t||!t.source||t instanceof k.Pattern?i&&i():this.set(e,new k.Pattern(t,i))},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(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,o=Math.atan2,s=Math.pow,a=Math.PI/180,l=Math.PI/2,k.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){var n=new k.Point(t.x-e.x,t.y-e.y),r=k.util.rotateVector(n,i);return new k.Point(r.x,r.y).addEquals(e)},rotateVector:function(t,e){var i=k.util.sin(e),n=k.util.cos(e);return{x:t.x*n-t.y*i,y:t.x*i+t.y*n}},createVector:function(t,e){return new k.Point(e.x-t.x,e.y-t.y)},calcAngleBetweenVectors:function(t,e){return Math.acos((t.x*e.x+t.y*e.y)/(Math.hypot(t.x,t.y)*Math.hypot(e.x,e.y)))},getHatVector:function(t){return new k.Point(t.x,t.y).multiply(1/Math.hypot(t.x,t.y))},getBisector:function(t,e,i){var n=k.util.createVector(t,e),r=k.util.createVector(t,i),o=k.util.calcAngleBetweenVectors(n,r),s=o*(0===k.util.calcAngleBetweenVectors(k.util.rotateVector(n,o),r)?1:-1)/2;return{vector:k.util.getHatVector(k.util.rotateVector(n,s)),angle:o}},projectStrokeOnPoints:function(t,e,i){var n=[],r=e.strokeWidth/2,o=e.strokeUniform?new k.Point(1/e.scaleX,1/e.scaleY):new k.Point(1,1),s=function(t){var e=r/Math.hypot(t.x,t.y);return new k.Point(t.x*e*o.x,t.y*e*o.y)};return t.length<=1||t.forEach((function(a,l){var c,h,u=new k.Point(a.x,a.y);0===l?(h=t[l+1],c=i?s(k.util.createVector(h,u)).addEquals(u):t[t.length-1]):l===t.length-1?(c=t[l-1],h=i?s(k.util.createVector(c,u)).addEquals(u):t[0]):(c=t[l-1],h=t[l+1]);var f,d,p=k.util.getBisector(u,c,h),g=p.vector,m=p.angle;if("miter"===e.strokeLineJoin&&(f=-r/Math.sin(m/2),d=new k.Point(g.x*f*o.x,g.y*f*o.y),Math.hypot(d.x,d.y)/r<=e.strokeMiterLimit))return n.push(u.add(d)),void n.push(u.subtract(d));f=-r*Math.SQRT2,d=new k.Point(g.x*f*o.x,g.y*f*o.y),n.push(u.add(d)),n.push(u.subtract(d))})),n},transformPoint:function(t,e,i){return i?new k.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new k.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]=k.util.transformPoint(t[i],e);var n=[t[0].x,t[1].x,t[2].x,t[3].x],r=k.util.array.min(n),o=k.util.array.max(n)-r,s=[t[0].y,t[1].y,t[2].y,t[3].y],a=k.util.array.min(s);return{left:r,top:a,width:o,height:k.util.array.max(s)-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=k.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=k.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return n*k.DPI/25.4;case"cm":return n*k.DPI/2.54;case"in":return n*k.DPI;case"pt":return n*k.DPI/72;case"pc":return n*k.DPI/72*12;case"em":return n*e;default:return n}},falseFunction:function(){return!1},getKlass:function(t,e){return t=k.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),k.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 k;var e,i=t.split("."),r=i.length,o=n||k.window;for(e=0;e<r;++e)o=o[i[e]];return o},loadImage:function(t,e,i,n){if(t){var r=k.util.createImage(),o=function(){e&&e.call(i,r,!1),r=r.onload=r.onerror=null};r.onload=o,r.onerror=function(){k.log("Error loading "+r.src),e&&e.call(i,null,!0),r=r.onload=r.onerror=null},0!==t.indexOf("data")&&null!=n&&(r.crossOrigin=n),"data:image/svg"===t.substring(0,14)&&(r.onload=null,k.util.loadImageInDom(r,o)),r.src=t}else e&&e.call(i,t)},loadImageInDom:function(t,e){var i=k.document.createElement("div");i.style.width=i.style.height="1px",i.style.left=i.style.top="-100%",i.style.position="absolute",i.appendChild(t),k.document.querySelector("body").appendChild(i),t.onload=function(){e(),i.parentNode.removeChild(i),i=null}},enlivenObjects:function(t,e,i,n){var r=[],o=0,s=(t=t||[]).length;function a(){++o===s&&e&&e(r.filter((function(t){return t})))}s?t.forEach((function(t,e){t&&t.type?k.util.getKlass(t.type,i).fromObject(t,(function(i,o){o||(r[e]=i),n&&n(t,i,o),a()})):a()})):e&&e(r)},enlivenObjectEnlivables:function(t,e,i){var n=k.Object.ENLIVEN_PROPS.filter((function(e){return!!t[e]}));k.util.enlivenObjects(n.map((function(e){return t[e]})),(function(t){var r={};n.forEach((function(i,n){r[i]=t[n],e&&(e[i]=t[n])})),i&&i(r)}))},enlivenPatterns:function(t,e){function i(){++r===o&&e&&e(n)}var n=[],r=0,o=(t=t||[]).length;o?t.forEach((function(t,e){t&&t.source?new k.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?(void 0!==i&&(t[0].sourcePath=i),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 k.Group(t,e),void 0!==i&&(n.sourcePath=i),n)},populateWithProperties:function(t,e,i){if(i&&Array.isArray(i))for(var n=0,r=i.length;n<r;n++)i[n]in t&&(e[i[n]]=t[i[n]])},createCanvasElement:function(){return k.document.createElement("canvas")},copyCanvasElement:function(t){var e=k.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 k.document.createElement("img")},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=o(t[1],t[0]),i=s(t[0],2)+s(t[1],2),n=r(i),l=(t[0]*t[3]-t[2]*t[1])/n,c=o(t[0]*t[2]+t[1]*t[3],i);return{angle:e/a,scaleX:n,scaleY:l,skewX:c/a,skewY:0,translateX:t[4],translateY:t[5]}},calcRotateMatrix:function(t){if(!t.angle)return k.iMatrix.concat();var e=k.util.degreesToRadians(t.angle),i=k.util.cos(e),n=k.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=k.util.multiplyTransformMatrices,o=k.util.degreesToRadians;return t.skewX&&(n=r(n,[1,0,Math.tan(o(t.skewX)),1],!0)),t.skewY&&(n=r(n,[1,Math.tan(o(t.skewY)),0,1],!0)),n},composeMatrix:function(t){var e=[1,0,0,1,t.translateX||0,t.translateY||0],i=k.util.multiplyTransformMatrices;return t.angle&&(e=i(e,k.util.calcRotateMatrix(t))),(1!==t.scaleX||1!==t.scaleY||t.skewX||t.skewY||t.flipX||t.flipY)&&(e=i(e,k.util.calcDimensionsMatrix(t))),e},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}},isTransparent:function(t,e,i,n){n>0&&(e>n?e-=n:e=0,i>n?i-=n:i=0);var r,o=!0,s=t.getImageData(e,i,2*n||1,2*n||1),a=s.data.length;for(r=3;r<a&&!1!=(o=s.data[r]<=0);r+=4);return s=null,o},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())?k.charWidthsCache[t]&&delete k.charWidthsCache[t]:k.charWidthsCache={}},limitDimsByArea:function(t,e){var i=Math.sqrt(e*t),n=Math.floor(e/i);return{x:Math.floor(i),y:n}}
vendor: 4,244 bytes, line 2
2,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 k.util.toFixed(t,k.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"},removeTransformFromObject:function(t,e){var i=k.util.invertTransform(e),n=k.util.multiplyTransformMatrices(i,t.calcOwnMatrix());k.util.applyTransformToObject(t,n)},addTransformToObject:function(t,e){k.util.applyTransformToObject(t,k.util.multiplyTransformMatrices(e,t.calcOwnMatrix()))},applyTransformToObject:function(t,e){var i=k.util.qrDecompose(e),n=new k.Point(i.translateX,i.translateY);t.flipX=!1,t.flipY=!1,t.set("scaleX",i.scaleX),t.set("scaleY",i.scaleY),t.skewX=i.skewX,t.skewY=i.skewY,t.angle=i.angle,t.setPositionByOrigin(n,"center","center")},sizeAfterTransform:function(t,e,i){var n=t/2,r=e/2,o=[{x:-n,y:-r},{x:n,y:-r},{x:-n,y:r},{x:n,y:r}],s=k.util.calcDimensionsMatrix(i),a=k.util.makeBoundingBoxFromPoints(o,s);return{x:a.width,y:a.height}},mergeClipPaths:function(t,e){var i=t,n=e;i.inverted&&!n.inverted&&(i=e,n=t),k.util.applyTransformToObject(n,k.util.multiplyTransformMatrices(k.util.invertTransform(i.calcTransformMatrix()),n.calcTransformMatrix()));var r=i.inverted&&n.inverted;return r&&(i.inverted=n.inverted=!1),new k.Group([i],{clipPath:n,inverted:r})},hasStyleChanged:function(t,e,i){return i=i||!1,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.textBackgroundColor!==e.textBackgroundColor||t.deltaY!==e.deltaY||i&&(t.overline!==e.overline||t.underline!==e.underline||t.linethrough!==e.linethrough)},stylesToArray:function(t,e){t=k.util.object.clone(t,!0);for(var i=e.split("\n"),n=-1,r={},o=[],s=0;s<i.length;s++)if(t[s])for(var a=0;a<i[s].length;a++){n++;var l=t[s][a];l&&Object.keys(l).length>0&&(k.util.hasStyleChanged(r,l,!0)?o.push({start:n,end:n+1,style:l}):o[o.length-1].end++),r=l||{}}else n+=i[s].length;return o},stylesFromArray:function(t,e){if(!Array.isArray(t))return t;for(var i=e.split("\n"),n=-1,r=0,o={},s=0;s<i.length;s++)for(var a=0;a<i[s].length;a++)n++,t[r]&&t[r].start<=n&&n<t[r].end&&(o[s]=o[s]||{},o[s][a]=Object.assign({},t[r].style),n===t[r].end-1&&r++);return o}},function(){var t=Array.prototype.join,e={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},i={m:"l",M:"L"};function n(t,e,i,n,r,o,s,a,l,c,h){var u=k.util.cos(t),f=k.util.sin(t),d=k.util.cos(e),p=k.util.sin(e),g=i*r*d-n*o*p+s,m=n*r*d+i*o*p+a;return["C",c+l*(-i*r*f-n*o*u),h+l*(-n*r*f+i*o*u),g+l*(i*r*p+n*o*d),m+l*(n*r*p-i*o*d),g,m]}function r(t,e,i,n){var r=Math.atan2(e,t),o=Math.atan2(n,i);return o>=r?o-r:2*Math.PI-(r-o)}function o(t,e,i){for(var o=i[1],s=i[2],a=i[3],l=i[4],c=i[5],h=function(t,e,i,o,s,a,l){var c=Math.PI,h=l*c/180,u=k.util.sin(h),f=k.util.cos(h),d=0,p=0,g=-f*t*.5-u*e*.5,m=-f*e*.5+u*t*.5,v=(i=Math.abs(i))*i,y=(o=Math.abs(o))*o,b=m*m,_=g*g,w=v*y-v*b-y*_,x=0;if(w<0){var C=Math.sqrt(1-w/(v*y));i*=C,o*=C}else x=(s===a?-1:1)*Math.sqrt(w/(v*b+y*_));var S=x*i*m/o,T=-x*o*g/i,O=f*S-u*T+.5*t,E=u*S+f*T+.5*e,A=r(1,0,(g-S)/i,(m-T)/o),P=r((g-S)/i,(m-T)/o,(-g-S)/i,(-m-T)/o);0===a&&P>0?P-=2*c:1===a&&P<0&&(P+=2*c);for(var D=Math.ceil(Math.abs(P/c*2)),F=[],j=P/D,I=8/3*Math.sin(j/4)*Math.sin(j/4)/Math.sin(j/2),M=A+j,L=0;L<D;L++)F[L]=n(A,M,f,u,i,o,O,E,I,d,p),d=F[L][5],p=F[L][6],A=M,M+=j;return F}(i[6]-t,i[7]-e,o,s,l,c,a),u=0,f=h.length;u<f;u++)h[u][1]+=t,h[u][2]+=e,h[u][3]+=t,h[u][4]+=e,h[u][5]+=t,h[u][6]+=e;return h}function s(t,e,i,n){return Math.sqrt((i-t)*(i-t)+(n-e)*(n-e))}function a(t,e,i,n,r,o,s,a){return function(l){var c,h=(c=l)*c*c,u=function(t){return 3*t*t*(1-t)}(l),f=function(t){return 3*t*(1-t)*(1-t)}(l),d=function(t){return(1-t)*(1-t)*(1-t)}(l);return{x:s*h+r*u+i*f+t*d,y:a*h+o*u+n*f+e*d}}}function l(t,e,i,n,r,o,s,a){return function(l){var c=1-l,h=3*c*c*(i-t)+6*c*l*(r-i)+3*l*l*(s-r),u=3*c*c*(n-e)+6*c*l*(o-n)+3*l*l*(a-o);return Math.atan2(u,h)}}function c(t,e,i,n,r,o){return function(s){var a,l=(a=s)*a,c=function(t){return 2*t*(1-t)}(s),h=function(t){return(1-t)*(1-t)}(s);return{x:r*l+i*c+t*h,y:o*l+n*c+e*h}}}
vendor: 15,982 bytes, line 2
2function h(t,e,i,n,r,o){return function(s){var a=1-s,l=2*a*(i-t)+2*s*(r-i),c=2*a*(n-e)+2*s*(o-n);return Math.atan2(c,l)}}function u(t,e,i){var n,r,o={x:e,y:i},a=0;for(r=1;r<=100;r+=1)n=t(r/100),a+=s(o.x,o.y,n.x,n.y),o=n;return a}function f(t,e){for(var i,n,r,o=0,a=0,l=t.iterator,c={x:t.x,y:t.y},h=.01,u=t.angleFinder;a<e&&h>1e-4;)i=l(o),r=o,(n=s(c.x,c.y,i.x,i.y))+a>e?(o-=h,h/=2):(c=i,o+=h,a+=n);return i.angle=u(r),i}function d(t){for(var e,i,n,r,o=0,f=t.length,d=0,p=0,g=0,m=0,v=[],y=0;y<f;y++){switch(n={x:d,y:p,command:(e=t[y])[0]},e[0]){case"M":n.length=0,g=d=e[1],m=p=e[2];break;case"L":n.length=s(d,p,e[1],e[2]),d=e[1],p=e[2];break;case"C":i=a(d,p,e[1],e[2],e[3],e[4],e[5],e[6]),r=l(d,p,e[1],e[2],e[3],e[4],e[5],e[6]),n.iterator=i,n.angleFinder=r,n.length=u(i,d,p),d=e[5],p=e[6];break;case"Q":i=c(d,p,e[1],e[2],e[3],e[4]),r=h(d,p,e[1],e[2],e[3],e[4]),n.iterator=i,n.angleFinder=r,n.length=u(i,d,p),d=e[3],p=e[4];break;case"Z":case"z":n.destX=g,n.destY=m,n.length=s(d,p,g,m),d=g,p=m}o+=n.length,v.push(n)}return v.push({length:o,x:d,y:p}),v}k.util.joinPath=function(t){return t.map((function(t){return t.join(" ")})).join(" ")},k.util.parsePath=function(t){var n,r,o,s,a,l=[],c=[],h=k.rePathCommand,u="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",f="("+u+")"+k.commaWsp,d="([01])"+k.commaWsp+"?",p=new RegExp(f+"?"+f+"?"+f+d+d+f+"?("+u+")","g");if(!t||!t.match)return l;for(var g,m=0,v=(a=t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi)).length;m<v;m++){s=(n=a[m]).slice(1).trim(),c.length=0;var y=n.charAt(0);if(g=[y],"a"===y.toLowerCase())for(var b;b=p.exec(s);)for(var _=1;_<b.length;_++)c.push(b[_]);else for(;o=h.exec(s);)c.push(o[0]);_=0;for(var w=c.length;_<w;_++)r=parseFloat(c[_]),isNaN(r)||g.push(r);var x=e[y.toLowerCase()],C=i[y]||y;if(g.length-1>x)for(var S=1,T=g.length;S<T;S+=x)l.push([y].concat(g.slice(S,S+x))),y=C;else l.push(g)}return l},k.util.makePathSimpler=function(t){var e,i,n,r,s,a,l=0,c=0,h=t.length,u=0,f=0,d=[];for(i=0;i<h;++i){switch(n=!1,(e=t[i].slice(0))[0]){case"l":e[0]="L",e[1]+=l,e[2]+=c;case"L":l=e[1],c=e[2];break;case"h":e[1]+=l;case"H":e[0]="L",e[2]=c,l=e[1];break;case"v":e[1]+=c;case"V":e[0]="L",c=e[1],e[1]=l,e[2]=c;break;case"m":e[0]="M",e[1]+=l,e[2]+=c;case"M":l=e[1],c=e[2],u=e[1],f=e[2];break;case"c":e[0]="C",e[1]+=l,e[2]+=c,e[3]+=l,e[4]+=c,e[5]+=l,e[6]+=c;case"C":s=e[3],a=e[4],l=e[5],c=e[6];break;case"s":e[0]="S",e[1]+=l,e[2]+=c,e[3]+=l,e[4]+=c;case"S":"C"===r?(s=2*l-s,a=2*c-a):(s=l,a=c),l=e[3],c=e[4],e[0]="C",e[5]=e[3],e[6]=e[4],e[3]=e[1],e[4]=e[2],e[1]=s,e[2]=a,s=e[3],a=e[4];break;case"q":e[0]="Q",e[1]+=l,e[2]+=c,e[3]+=l,e[4]+=c;case"Q":s=e[1],a=e[2],l=e[3],c=e[4];break;case"t":e[0]="T",e[1]+=l,e[2]+=c;case"T":"Q"===r?(s=2*l-s,a=2*c-a):(s=l,a=c),e[0]="Q",l=e[1],c=e[2],e[1]=s,e[2]=a,e[3]=l,e[4]=c;break;case"a":e[0]="A",e[6]+=l,e[7]+=c;case"A":n=!0,d=d.concat(o(l,c,e)),l=e[6],c=e[7];break;case"z":case"Z":l=u,c=f}n||d.push(e),r=e[0]}return d},k.util.getSmoothPathFromPoints=function(t,e){var i,n=[],r=new k.Point(t[0].x,t[0].y),o=new k.Point(t[1].x,t[1].y),s=t.length,a=1,l=0,c=s>2;for(e=e||0,c&&(a=t[2].x<o.x?-1:t[2].x===o.x?0:1,l=t[2].y<o.y?-1:t[2].y===o.y?0:1),n.push(["M",r.x-a*e,r.y-l*e]),i=1;i<s;i++){if(!r.eq(o)){var h=r.midPointFrom(o);n.push(["Q",r.x,r.y,h.x,h.y])}r=t[i],i+1<t.length&&(o=t[i+1])}return c&&(a=r.x>t[i-2].x?1:r.x===t[i-2].x?0:-1,l=r.y>t[i-2].y?1:r.y===t[i-2].y?0:-1),n.push(["L",r.x+a*e,r.y+l*e]),n},k.util.getPathSegmentsInfo=d,k.util.getBoundsOfCurve=function(e,i,n,r,o,s,a,l){var c;if(k.cachesBoundsOfCurve&&(c=t.call(arguments),k.boundsOfCurveCache[c]))return k.boundsOfCurveCache[c];var h,u,f,d,p,g,m,v,y=Math.sqrt,b=Math.min,_=Math.max,w=Math.abs,x=[],C=[[],[]];u=6*e-12*n+6*o,h=-3*e+9*n-9*o+3*a,f=3*n-3*e;for(var S=0;S<2;++S)if(S>0&&(u=6*i-12*r+6*s,h=-3*i+9*r-9*s+3*l,f=3*r-3*i),w(h)<1e-12){if(w(u)<1e-12)continue;0<(d=-f/u)&&d<1&&x.push(d)}else(m=u*u-4*f*h)<0||(0<(p=(-u+(v=y(m)))/(2*h))&&p<1&&x.push(p),0<(g=(-u-v)/(2*h))&&g<1&&x.push(g));for(var T,O,E,A=x.length,P=A;A--;)T=(E=1-(d=x[A]))*E*E*e+3*E*E*d*n+3*E*d*d*o+d*d*d*a,C[0][A]=T,O=E*E*E*i+3*E*E*d*r+3*E*d*d*s+d*d*d*l,C[1][A]=O;C[0][P]=e,C[1][P]=i,C[0][P+1]=a,C[1][P+1]=l;var D=[{x:b.apply(null,C[0]),y:b.apply(null,C[1])},{x:_.apply(null,C[0]),y:_.apply(null,C[1])}];return k.cachesBoundsOfCurve&&(k.boundsOfCurveCache[c]=D),D},k.util.getPointOnPath=function(t,e,i){i||(i=d(t));for(var n=0;e-i[n].length>0&&n<i.length-2;)e-=i[n].length,n++;var r,o=i[n],s=e/o.length,a=o.command,l=t[n];switch(a){case"M":return{x:o.x,y:o.y,angle:0};case"Z":case"z":return(r=new k.Point(o.x,o.y).lerp(new k.Point(o.destX,o.destY),s)).angle=Math.atan2(o.destY-o.y,o.destX-o.x),r;case"L":return(r=new k.Point(o.x,o.y).lerp(new k.Point(l[1],l[2]),s)).angle=Math.atan2(l[2]-o.y,l[1]-o.x),r;case"C":case"Q":return f(o,e)}},k.util.transformPath=function(t,e,i){return i&&(e=k.util.multiplyTransformMatrices(e,[1,0,0,1,-i.x,-i.y])),t.map((function(t){for(var i=t.slice(0),n={},r=1;r<t.length-1;r+=2)n.x=t[r],n.y=t[r+1],n=k.util.transformPoint(n,e),i[r]=n.x,i[r+1]=n.y;return i}))}}(),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}}k.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=[],o=0,s=e.length;o<s;o++)r[o]=n.length?e[o][i].apply(e[o],n):e[o][i].call(e[o]);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(!k.isLikelyNode&&i instanceof Element)e=i;else if(i instanceof Array){e=[];for(var r=0,o=i.length;r<o;r++)e[r]=t({},i[r],n)}else if(i&&"object"==typeof i)for(var s in i)"canvas"===s||"group"===s?e[s]=null:i.hasOwnProperty(s)&&(e[s]=t({},i[s],n));else e=i;else for(var s in i)e[s]=i[s];return e}k.util.object={extend:t,clone:function(e,i){return t({},e,i)}},k.util.object.extend(k.util,k.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}k.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 o(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)}k.util.createClass=function(){var i=null,s=t.call(arguments,0);function a(){this.initialize.apply(this,arguments)}"function"==typeof s[0]&&(i=s.shift()),a.superclass=i,a.subclasses=[],i&&(r.prototype=i.prototype,a.prototype=new r,i.subclasses.push(a));for(var l=0,c=s.length;l<c;l++)n(a,s[l],i);return a.prototype.initialize||(a.prototype.initialize=e),a.prototype.constructor=a,a.prototype.callSuper=o,a}}(),c=!!k.document.createElement("div").attachEvent,h=["touchstart","touchmove","touchend"],k.util.addListener=function(t,e,i,n){t&&t.addEventListener(e,i,!c&&n)},k.util.removeListener=function(t,e,i,n){t&&t.removeEventListener(e,i,!c&&n)},k.util.getPointer=function(t){var e=t.target,i=k.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}},k.util.isTouchEvent=function(t){return h.indexOf(t.type)>-1||"touch"===t.pointerType},u=k.document.createElement("div"),f="string"==typeof u.style.opacity,d="string"==typeof u.style.filter,p=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,g=function(t){return t},f?g=function(t,e){return t.style.opacity=e,t}:d&&(g=function(t,e){var i=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(i.zoom=1),p.test(i.filter)?(e=e>=.9999?"":"alpha(opacity="+100*e+")",i.filter=i.filter.replace(p,e)):i.filter+=" alpha(opacity="+100*e+")",t}),k.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?g(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var n in e)if("opacity"===n)g(t,e[n]);else{var r="float"===n||"cssFloat"===n?void 0===i.styleFloat?"cssFloat":"styleFloat":n;i.setProperty(r,e[n])}return t},function(){var t=Array.prototype.slice;var e,i,n,r,o=function(e){return t.call(e,0)};try{e=o(k.document.childNodes)instanceof Array}catch(t){}function s(t,e){var i=k.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=k.document.documentElement,r=k.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&((t=t.parentNode||t.host)===k.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||(o=function(t){for(var e=new Array(t.length),i=t.length;i--;)e[i]=t[i];return e}),i=k.document.defaultView&&k.document.defaultView.getComputedStyle?function(t,e){var i=k.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=k.document.documentElement.style,r="userSelect"in n?"userSelect":"MozUserSelect"in n?"MozUserSelect":"WebkitUserSelect"in n?"WebkitUserSelect":"KhtmlUserSelect"in n?"KhtmlUserSelect":"",k.util.makeElementUnselectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=k.util.falseFunction),r?t.style[r]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t},k.util.makeElementSelectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=null),r?t.style[r]="":"string"==typeof t.unselectable&&(t.unselectable=""),t},k.util.setImageSmoothing=function(t,e){t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=e},k.util.getById=function(t){return"string"==typeof t?k.document.getElementById(t):t},k.util.toArray=o,k.util.addClass=function(t,e){t&&-1===(" "+t.className+" ").indexOf(" "+e+" ")&&(t.className+=(t.className?" ":"")+e)},k.util.makeElement=s,k.util.wrapElement=function(t,e,i){return"string"==typeof e&&(e=s(e,i)),t.parentNode&&t.parentNode.replaceChild(e,t),e.appendChild(t),e},k.util.getScrollLeftTop=a,k.util.getElementOffset=function(t){var e,n,r=t&&t.ownerDocument,o={left:0,top:0},s={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return s;for(var c in l)s[l[c]]+=parseInt(i(t,c),10)||0;return e=r.documentElement,void 0!==t.getBoundingClientRect&&(o=t.getBoundingClientRect()),n=a(t),{left:o.left+n.left-(e.clientLeft||0)+s.left,top:o.top+n.top-(e.clientTop||0)+s.top}},k.util.getNodeCanvas=function(t){var e=k.jsdomImplForWrapper(t);return e._canvas||e._image},k.util.cleanUpJsdomNode=function(t){if(k.isLikelyNode){var e=k.jsdomImplForWrapper(t);e&&(e._image=null,e._canvas=null,e._currentSrc=null,e._attributes=null,e._classList=null)}}}(),function(){function t(){}k.util.request=function(e,i){i||(i={});var n=i.method?i.method.toUpperCase():"GET",r=i.onComplete||function(){},o=new k.window.XMLHttpRequest,s=i.body||i.parameters;return o.onreadystatechange=function(){4===o.readyState&&(r(o),o.onreadystatechange=t)},"GET"===n&&(s=null,"string"==typeof i.parameters&&(e=function(t,e){return t+(/\?/.test(t)?"&":"?")+e}(e,i.parameters))),o.open(n,e,!0),"POST"!==n&&"PUT"!==n||o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(s),o}}(),k.log=console.log,k.warn=console.warn,function(){var t=k.util.object.extend,e=k.util.object.clone,i=[];function n(){return!1}function r(t,e,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+e}k.util.object.extend(i,{cancelAll:function(){var t=this.splice(0);return t.forEach((function(t){t.cancel()})),t},cancelByCanvas:function(t){if(!t)return[];var e=this.filter((function(e){return"object"==typeof e.target&&e.target.canvas===t}));return e.forEach((function(t){t.cancel()})),e},cancelByTarget:function(t){var e=this.findAnimationsByTarget(t);return e.forEach((function(t){t.cancel()})),e},findAnimationIndex:function(t){return this.indexOf(this.findAnimation(t))},findAnimation:function(t){return this.find((function(e){return e.cancel===t}))},findAnimationsByTarget:function(t){return t?this.filter((function(e){return e.target===t})):[]}});var o=k.window.requestAnimationFrame||k.window.webkitRequestAnimationFrame||k.window.mozRequestAnimationFrame||k.window.oRequestAnimationFrame||k.window.msRequestAnimationFrame||function(t){return k.window.setTimeout(t,1e3/60)},s=k.window.cancelAnimationFrame||k.window.clearTimeout;function a(){return o.apply(k.window,arguments)}k.util.animate=function(i){i||(i={});var o,s=!1,l=function(){var t=k.runningAnimations.indexOf(o);return t>-1&&k.runningAnimations.splice(t,1)[0]};return o=t(e(i),{cancel:function(){return s=!0,l()},currentValue:"startValue"in i?i.startValue:0,completionRate:0,durationRate:0}),k.runningAnimations.push(o),a((function(t){var e,c=t||+new Date,h=i.duration||500,u=c+h,f=i.onChange||n,d=i.abort||n,p=i.onComplete||n,g=i.easing||r,m="startValue"in i&&i.startValue.length>0,v="startValue"in i?i.startValue:0,y="endValue"in i?i.endValue:100,b=i.byValue||(m?v.map((function(t,e){return y[e]-v[e]})):y-v);i.onStart&&i.onStart(),function t(i){var n=(e=i||+new Date)>u?h:e-c,r=n/h,_=m?v.map((function(t,e){return g(n,v[e],b[e],h)})):g(n,v,b,h),w=m?Math.abs((_[0]-v[0])/b[0]):Math.abs((_-v)/b);if(o.currentValue=m?_.slice():_,o.completionRate=w,o.durationRate=r,!s){if(!d(_,w,r))return e>u?(o.currentValue=m?y.slice():y,o.completionRate=1,o.durationRate=1,f(m?y.slice():y,1,1),p(y,1,1),void l()):(f(_,w,r),void a(t));l()}}(c)})),o.cancel},k.util.requestAnimFrame=a,k.util.cancelAnimFrame=function(){return s.apply(k.window,arguments)},k.runningAnimations=i}(),function(){function t(t,e,i){var n="rgba("+parseInt(t[0]+i*(e[0]-t[0]),10)+","+parseInt(t[1]+i*(e[1]-t[1]),10)+","+parseInt(t[2]+i*(e[2]-t[2]),10);return n+=","+(t&&e?parseFloat(t[3]+i*(e[3]-t[3])):1),n+=")"}k.util.animateColor=function(e,i,n,r){var o=new k.Color(e).getSource(),s=new k.Color(i).getSource(),a=r.onComplete,l=r.onChange;return r=r||{},k.util.animate(k.util.object.extend(r,{duration:n||500,startValue:o,endValue:s,byValue:s,easing:function(e,i,n,o){return t(i,n,r.colorEasing?r.colorEasing(e,o):1-Math.cos(e/o*(Math.PI/2)))},onComplete:function(e,i,n){if(a)return a(t(s,s,0),i,n)},onChange:function(e,i,n){if(l){if(Array.isArray(e))return l(t(e,e,0),i,n);l(e,i,n)}}}))}}
vendor: 8,646 bytes, line 2
2(),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}k.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,o){var s=0;return 0===i?n:1===(i/=o)?n+r:(s||(s=.3*o),-e(t(r,r,s,1.70158),i,o)+n)},easeOutElastic:function(e,i,n,r){var o=0;if(0===e)return i;if(1===(e/=r))return i+n;o||(o=.3*r);var s=t(n,n,o,1.70158);return s.a*Math.pow(2,-10*e)*Math.sin((e*r-s.s)*(2*Math.PI)/s.p)+s.c+i},easeInOutElastic:function(i,n,r,o){var s=0;if(0===i)return n;if(2===(i/=o/2))return n+r;s||(s=o*(.3*1.5));var a=t(r,r,s,1.70158);return i<1?-.5*e(a,i,o)+n:a.a*Math.pow(2,-10*(i-=1))*Math.sin((i*o-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,o){return t<o/2?.5*i(2*t,0,r,o)+e:.5*n(2*t-o,0,r,o)+.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,o=e.util.parseUnit,s=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","image-rendering":"imageSmoothing"},l={stroke:"strokeOpacity",fill:"fillOpacity"},c="font-size",h="clip-path";function u(t){return t in a?a[t]:t}function f(t,i,n,r){var a,l=Array.isArray(i);if("fill"!==t&&"stroke"!==t||"none"!==i){if("strokeUniform"===t)return"non-scaling-stroke"===i;if("strokeDashArray"===t)i="none"===i?null:i.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===t)i=n&&n.transformMatrix?s(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=o(i,r)/r*1e3;else if("paintFirst"===t){var c=i.indexOf("fill"),h=i.indexOf("stroke");i="fill";(c>-1&&h>-1&&h<c||-1===c&&h>-1)&&(i="stroke")}else{if("href"===t||"xlink:href"===t||"font"===t)return i;if("imageSmoothing"===t)return"optimizeQuality"===i;a=l?i.map(o):o(i,r)}}else i="";return!l&&isNaN(a)?i:a}function d(t){return new RegExp("^("+t.join("|")+")\\b","i")}function p(t,e){var i,n,r,o,s=[];for(r=0,o=e.length;r<o;r++)i=e[r],n=t.getElementsByTagName(i),s=s.concat(Array.prototype.slice.call(n));return s}function g(t,e){var i,n=!0;return(i=m(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()),n=m(t=t.parentNode,i);return 0===e.length}(t,e)),i&&n&&0===e.length}function m(t,e){var i,n,r=t.nodeName,o=t.getAttribute("class"),s=t.getAttribute("id");if(i=new RegExp("^"+r,"i"),e=e.replace(i,""),s&&e.length&&(i=new RegExp("#"+s+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"")),o&&e.length)for(n=(o=o.split(" ")).length;n--;)i=new RegExp("\\."+o[n]+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"");return 0===e.length}function v(t,e){var i;if(t.getElementById&&(i=t.getElementById(e)),i)return i;var n,r,o,s=t.getElementsByTagName("*");for(r=0,o=s.length;r<o;r++)if(e===(n=s[r]).getAttribute("id"))return n}e.svgValidTagNamesRegEx=d(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),e.svgViewBoxElementsRegEx=d(["symbol","image","marker","pattern","view","svg"]),e.svgInvalidAncestorsRegEx=d(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),e.svgValidParentsRegEx=d(["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=e.commaWsp,o="(?:"+("(?:(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*\\))")+")",s=new RegExp("^\\s*(?:"+("(?:"+o+"(?:"+r+"*"+o+")*)")+"?)\\s*$"),a=new RegExp(o,"g");return function(n){var r=i.concat(),l=[];if(!n||n&&!s.test(n))return r;n.replace(a,(function(n){var s=new RegExp(o).exec(n).filter((function(t){return!!t})),a=s[1],c=s.slice(2).map(parseFloat);switch(a){case"translate":!function(t,e){t[4]=e[0],2===e.length&&(t[5]=e[1])}(r,c);break;case"rotate":c[0]=e.util.degreesToRadians(c[0]),function(t,i){var n=e.util.cos(i[0]),r=e.util.sin(i[0]),o=0,s=0;3===i.length&&(o=i[1],s=i[2]),t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t[4]=o-(n*o-r*s),t[5]=s-(r*o+n*s)}(r,c);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,c);break;case"skewX":t(r,c,2);break;case"skewY":t(r,c,1);break;case"matrix":r=c}l.push(r.concat()),r=i.concat()}));for(var c=l[0];l.length>1;)l.shift(),c=e.util.multiplyTransformMatrices(c,l[0]);return c}}();var y=new RegExp("^\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*$");function b(t){if(!e.svgViewBoxElementsRegEx.test(t.nodeName))return{};var i,n,r,s,a,l,c=t.getAttribute("viewBox"),h=1,u=1,f=t.getAttribute("width"),d=t.getAttribute("height"),p=t.getAttribute("x")||0,g=t.getAttribute("y")||0,m=t.getAttribute("preserveAspectRatio")||"",v=!c||!(c=c.match(y)),b=!f||!d||"100%"===f||"100%"===d,_=v&&b,w={},x="",C=0,S=0;if(w.width=0,w.height=0,w.toBeParsed=_,v&&(p||g)&&t.parentNode&&"#document"!==t.parentNode.nodeName&&(x=" translate("+o(p)+" "+o(g)+") ",a=(t.getAttribute("transform")||"")+x,t.setAttribute("transform",a),t.removeAttribute("x"),t.removeAttribute("y")),_)return w;if(v)return w.width=o(f),w.height=o(d),w;if(i=-parseFloat(c[1]),n=-parseFloat(c[2]),r=parseFloat(c[3]),s=parseFloat(c[4]),w.minX=i,w.minY=n,w.viewBoxWidth=r,w.viewB
vendor: 11,398 bytes, line 2
2oxHeight=s,b?(w.width=r,w.height=s):(w.width=o(f),w.height=o(d),h=w.width/r,u=w.height/s),"none"!==(m=e.util.parsePreserveAspectRatioAttribute(m)).alignX&&("meet"===m.meetOrSlice&&(u=h=h>u?u:h),"slice"===m.meetOrSlice&&(u=h=h>u?h:u),C=w.width-r*h,S=w.height-s*h,"Mid"===m.alignX&&(C/=2),"Mid"===m.alignY&&(S/=2),"Min"===m.alignX&&(C=0),"Min"===m.alignY&&(S=0)),1===h&&1===u&&0===i&&0===n&&0===p&&0===g)return w;if((p||g)&&"#document"!==t.parentNode.nodeName&&(x=" translate("+o(p)+" "+o(g)+") "),a=x+" matrix("+h+" 0 0 "+u+" "+(i*h+C)+" "+(n*u+S)+") ","svg"===t.nodeName){for(l=t.ownerDocument.createElementNS(e.svgNS,"g");t.firstChild;)l.appendChild(t.firstChild);t.appendChild(l)}else(l=t).removeAttribute("x"),l.removeAttribute("y"),a=l.getAttribute("transform")+a;return l.setAttribute("transform",a),w}function _(t,e){var i="xlink:href",n=v(t,e.getAttribute(i).slice(1));if(n&&n.getAttribute(i)&&_(t,n),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach((function(t){n&&!e.hasAttribute(t)&&n.hasAttribute(t)&&e.setAttribute(t,n.getAttribute(t))})),!e.children.length)for(var r=n.cloneNode(!0);r.firstChild;)e.appendChild(r.firstChild);e.removeAttribute(i)}e.parseSVGDocument=function(t,i,r,o){if(t){!function(t){for(var i=p(t,["use","svg:use"]),n=0;i.length&&n<i.length;){var r=i[n],o=r.getAttribute("xlink:href")||r.getAttribute("href");if(null===o)return;var s,a,l,c,h=o.slice(1),u=r.getAttribute("x")||0,f=r.getAttribute("y")||0,d=v(t,h).cloneNode(!0),g=(d.getAttribute("transform")||"")+" translate("+u+", "+f+")",m=i.length,y=e.svgNS;if(b(d),/^svg$/i.test(d.nodeName)){var _=d.ownerDocument.createElementNS(y,"g");for(a=0,c=(l=d.attributes).length;a<c;a++)s=l.item(a),_.setAttributeNS(y,s.nodeName,s.nodeValue);for(;d.firstChild;)_.appendChild(d.firstChild);d=_}for(a=0,c=(l=r.attributes).length;a<c;a++)"x"!==(s=l.item(a)).nodeName&&"y"!==s.nodeName&&"xlink:href"!==s.nodeName&&"href"!==s.nodeName&&("transform"===s.nodeName?g=s.nodeValue+" "+g:d.setAttribute(s.nodeName,s.nodeValue));d.setAttribute("transform",g),d.setAttribute("instantiated_by_use","1"),d.removeAttribute("id"),r.parentNode.replaceChild(d,r),i.length===m&&n++}}(t);var s,a,l=e.Object.__uid++,c=b(t),h=e.util.toArray(t.getElementsByTagName("*"));if(c.crossOrigin=o&&o.crossOrigin,c.svgUid=l,0===h.length&&e.isLikelyNode){var u=[];for(s=0,a=(h=t.selectNodes('//*[name(.)!="svg"]')).length;s<a;s++)u[s]=h[s];h=u}var f=h.filter((function(t){return b(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 d={};h.filter((function(t){return"clipPath"===t.nodeName.replace("svg:","")})).forEach((function(t){var i=t.getAttribute("id");d[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]=d,e.parseElements(f,(function(t,n){i&&(i(t,c,n,h),delete e.gradientDefs[l],delete e.cssRules[l],delete e.clipPaths[l])}),n(c),r,o)}}};var w=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(w);if(i){var n=i[1],r=i[3],s=i[4],a=i[5],l=i[6];n&&(e.fontStyle=n),r&&(e.fontWeight=isNaN(parseFloat(r))?r:parseFloat(r)),s&&(e.fontSize=o(s)),l&&(e.fontFamily=l),a&&(e.lineHeight="normal"===a?1:a)}},getGradientDefs:function(t){var e,i=p(t,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),n=0,r={};for(n=i.length;n--;)(e=i[n]).getAttribute("xlink:href")&&_(t,e),r[e.getAttribute("id")]=e;return r},parseAttributes:function(t,n,s){if(t){var a,d,p,m={};void 0===s&&(s=t.getAttribute("svgUid")),t.parentNode&&e.svgValidParentsRegEx.test(t.parentNode.nodeName)&&(m=e.parseAttributes(t.parentNode,n,s));var v=n.reduce((function(e,i){return(a=t.getAttribute(i))&&(e[i]=a),e}),{}),y=i(function(t,i){var n={};for(var r in e.cssRules[i])if(g(t,r.split(" ")))for(var o in e.cssRules[i][r])n[o]=e.cssRules[i][r][o];return n}(t,s),e.parseStyleAttribute(t));v=i(v,y),y[h]&&t.setAttribute(h,y[h]),d=p=m.fontSize||e.Text.DEFAULT_SVG_FONT_SIZE,v[c]&&(v[c]=d=o(v[c],p));var b,_,w={};for(var x in v)_=f(b=u(x),v[x],m,d),w[b]=_;w&&w.font&&e.parseFontDeclaration(w.font,w);var C=i(m,w);return e.svgValidParentsRegEx.test(t.nodeName)?C: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}(C)}},parseElements:function(t,i,n,r,o){new e.ElementsParser(t,i,n,r,o).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"),o={};for(i=0,n=r.length;i<n;i++){var s=r[i].textContent;""!==(s=s.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&s.split("}").filter((function(t){return t.trim()})).forEach((function(t){var r=t.split("{"),s={},a=r[1].trim().split(";").filter((function(t){return t.trim()}));for(i=0,n=a.length;i<n;i++){var l=a[i].split(":"),c=l[0].trim(),h=l[1].trim();s[c]=h}(t=r[0].trim()).split(",").forEach((function(t){""!==(t=t.replace(/^svg/i,"").trim())&&(o[t]?e.util.object.extend(o[t],s):o[t]=e.util.object.clone(s))}))}))}return o},loadSVGFromURL:function(t,i,n,r){t=t.replace(/^\n\s*/,"").trim(),new e.util.request(t,{method:"get",onComplete:function(t){var o=t.responseXML;if(!o||!o.documentElement)return i&&i(null),!1;e.parseSVGDocument(o.documentElement,(function(t,e,n,r){i&&i(t,e,n,r)}),n,r)}})},loadSVGFromString:function(t,i,n,r){var o=(new e.window.DOMParser).parseFromString(t.trim(),"text/xml");e.parseSVGDocument(o.documentElement,(function(t,e,n,r){i(t,e,n,r)}),n,r)}})}(e),k.ElementsParser=function(t,e,i,n,r,o){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=o},(m=k.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},m.createObjects=function(){var t=this;this.elements.forEach((function(e,i){e.setAttribute("svgUid",t.svgUid),t.createObject(e,i)}))},m.findTag=function(t){return k[k.util.string.capitalize(t.tagName.replace("svg:",""))]},m.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){k.log(t)}else this.checkIfDone()},m.createCallback=function(t,e){var i=this;return function(n){var r;i.resolveGradient(n,e,"fill"),i.resolveGradient(n,e,"stroke"),n instanceof k.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()}},m.extractPropertyDefinition=function(t,e,i){var n=t[e],r=this.regexUrl;if(r.test(n)){r.lastIndex=0;var o=r.exec(n)[1];return r.lastIndex=0,k[i][this.svgUid][o]}},m.resolveGradient=function(t,e,i){var n=this.extractPropertyDefinition(t,i,"gradientDefs");if(n){var r=e.getAttribute(i+"-opacity"),o=k.Gradient.fromElement(n,t,r,this.options);t.set(i,o)}},m.createClipPathCallback=function(t,e){return function(t){t._removeTransformMatrix(),t.fillRule=t.clipRule,e.push(t)}},m.resolveClipPath=function(t,e){var i,n,r,o,s=this.extractPropertyDefinition(t,"clipPath","clipPaths");if(s){r=[],n=k.util.invertTransform(t.calcTransformMatrix());for(var a=s[0].parentNode,l=e;l.parentNode&&l.getAttribute("clip-path")!==t.clipPath;)l=l.parentNode;l.parentNode.appendChild(a);for(var c=0;c<s.length;c++)i=s[c],this.findTag(i).fromElement(i,this.createClipPathCallback(t,r),this.options);s=1===r.length?r[0]:new k.Group(r),o=k.util.multiplyTransformMatrices(n,s.calcTransformMatrix()),s.clipPath&&this.resolveClipPath(s,l);var h=k.util.qrDecompose(o);s.flipX=!1,s.flipY=!1,s.set("scaleX",h.scaleX),s.set("scaleY",h.scaleY),s.angle=h.angle,s.skewX=h.skewX,s.skewY=0,s.setPositionByOrigin({x:h.translateX,y:h.translateY},"center","center"),t.clipPath=s}else delete t.clipPath},m.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,o){var s,a=(o.x-r.x)*(t.y-r.y
vendor: 5,751 bytes, line 2
2)-(o.y-r.y)*(t.x-r.x),l=(n.x-t.x)*(t.y-r.y)-(n.y-t.y)*(t.x-r.x),c=(o.y-r.y)*(n.x-t.x)-(o.x-r.x)*(n.y-t.y);if(0!==c){var h=a/c,u=l/c;0<=h&&h<=1&&0<=u&&u<=1?(s=new i("Intersection")).appendPoint(new e.Point(t.x+h*(n.x-t.x),t.y+h*(n.y-t.y))):s=new i}else s=new i(0===a||0===l?"Coincident":"Parallel");return s},e.Intersection.intersectLinePolygon=function(t,e,n){var r,o,s,a,l=new i,c=n.length;for(a=0;a<c;a++)r=n[a],o=n[(a+1)%c],s=i.intersectLineLine(t,e,r,o),l.appendPoints(s.points);return l.points.length>0&&(l.status="Intersection"),l},e.Intersection.intersectPolygonPolygon=function(t,e){var n,r=new i,o=t.length;for(n=0;n<o;n++){var s=t[n],a=t[(n+1)%o],l=i.intersectLinePolygon(s,a,e);r.appendPoints(l.points)}return r.points.length>0&&(r.status="Intersection"),r},e.Intersection.intersectPolygonRectangle=function(t,n,r){var o=n.min(r),s=n.max(r),a=new e.Point(s.x,o.y),l=new e.Point(o.x,s.y),c=i.intersectLinePolygon(o,a,t),h=i.intersectLinePolygon(a,s,t),u=i.intersectLinePolygon(s,l,t),f=i.intersectLinePolygon(l,o,t),d=new i;return d.appendPoints(c.points),d.appendPoints(h.points),d.appendPoints(u.points),d.appendPoints(f.points),d.points.length>0&&(d.status="Intersection"),d})}(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,o,s,a=e.util.array.max([t,i,n]),l=e.util.array.min([t,i,n]);if(s=(a+l)/2,a===l)r=o=0;else{var c=a-l;switch(o=s>.5?c/(2-a-l):c/(a+l),a){case t:r=(i-n)/c+(i<n?6:0);break;case i:r=(n-t)/c+2;break;case n:r=(t-i)/c+4}r/=6}return[Math.round(360*r),Math.round(100*o),Math.round(100*s)]},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(),o=this.getSource(),s=t.getSource();for(e=0;e<3;e++)n.push(Math.round(.5*o[e]+.5*s[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
25D3",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),o=parseInt(e[3],10)/(/%$/.test(e[3])?100:1)*(/%$/.test(e[3])?255:1);return[parseInt(n,10),parseInt(r,10),parseInt(o,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,o,s,a=(parseFloat(e[1])%360+360)%360/360,l=parseFloat(e[2])/(/%$/.test(e[2])?100:1),c=parseFloat(e[3])/(/%$/.test(e[3])?100:1);if(0===l)r=o=s=c;else{var h=c<=.5?c*(l+1):c+l-c*l,u=2*c-h;r=n(u,h,a+1/3),o=n(u,h,a),s=n(u,h,a-1/3)}return[Math.round(255*r),Math.round(255*o),Math.round(255*s),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,o=n?e.charAt(0)+e.charAt(0):e.substring(0,2),s=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(o,16),parseInt(s,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(t){"use strict";var e=t.fabric||(t.fabric={}),i=["e","se","s","sw","w","nw","n","ne","e"],n=["ns","nesw","ew","nwse"],r={},o="left",s="top",a="right",l="bottom",c="center",h={top:l,bottom:s,left:a,right:o,center:c},u=e.util.radiansToDegrees,f=Math.sign||function(t){return(t>0)-(t<0)||+t};function d(t,e){var i=t.angle+u(Math.atan2(e.y,e.x))+360;return Math.round(i%360/45)}function p(t,i){var n=i.transform.target,r=n.canvas,o=e.util.object.clone(i);o.target=n,r&&r.fire("object:"+t,o),n.fire(t,i)}function g(t,e){var i=e.canvas,n=t[i.uniScaleKey];return i.uniformScaling&&!n||!i.uniformScaling&&n}function m(t){return t.originX===c&&t.originY===c}function v(t,e,i){var n=t.lockScalingX,r=t.lockScalingY;return!(!n||!r)||(!(e||!n&&!r||!i)||(!(!n||"x"!==e)||!(!r||"y"!==e)))}function y(t,e,i,n){return{e:t,transform:e,pointer:{x:i,y:n}}}function b(t){return function(e,i,n,r){var o=i.target,s=o.getCenterPoint(),a=o.translateToOriginPoint(s,i.originX,i.originY),l=t(e,i,n,r);return o.setPositionByOrigin(a,i.originX,i.originY),l}}function _(t,e){return function(i,n,r,o){var s=e(i,n,r,o);return s&&p(t,y(i,n,r,o)),s}}function w(t,i,n,r,o){var s=t.target,a=s.controls[t.corner],l=s.canvas.getZoom(),c=s.padding/l,h=s.toLocalPoint(new e.Point(r,o),i,n);return h.x>=c&&(h.x-=c),h.x<=-c&&(h.x+=c),h.y>=c&&(h.y-=c),h.y<=c&&(h.y+=c),h.x-=a.offsetX,h.y-=a.offsetY,h}function x(t){return t.flipX!==t.flipY}function C(t,e,i,n,r){if(0!==t[e]){var o=r/t._getTransformedDimensions()[n]*t[i];t.set(i,o)}}function S(t,e,i,n){var r,c=e.target,h=c._getTransformedDimensions(0,c.skewY),f=w(e,e.originX,e.originY,i,n),d=Math.abs(2*f.x)-h.x,p=c.skewX;d<2?r=0:(r=u(Math.atan2(d/c.scaleX,h.y/c.scaleY)),e.originX===o&&e.originY===l&&(r=-r),e.originX===a&&e.originY===s&&(r=-r),x(c)&&(r=-r));var g=p!==r;if(g){var m=c._getTransformedDimensions().y;c.set("skewX",r),C(c,"skewY","scaleY","y",m)}return g}function T(t,e,i,n){var r,c=e.target,h=c._getTransformedDimensions(c.skewX,0),f=w(e,e.originX,e.originY,i,n),d=Math.abs(2*f.y)-h.y,p=c.skewY;d<2?r=0:(r=u(Math.atan2(d/c.scaleY,h.x/c.scaleX)),e.originX===o&&e.originY===l&&(r=-r),e.originX===a&&e.originY===s&&(r=-r),x(c)&&(r=-r));var g=p!==r;if(g){var m=c._getTransformedDimensions().x;c.set("skewY",r),C(c,"skewX","scaleX","x",m)}return g}function O(t,e,i,n,r){r=r||{};var o,s,a,l,c,u,d=e.target,p=d.lockScalingX,y=d.lockScalingY,b=r.by,_=g(t,d),x=v(d,b,_),C=e.gestureScale;if(x)return!1;if(C)s=e.scaleX*C,a=e.scaleY*C;else{if(o=w(e,e.originX,e.originY,i,n),c="y"!==b?f(o.x):1,u="x"!==b?f(o.y):1,e.signX||(e.signX=c),e.signY||(e.signY=u),d.lockScalingFlip&&(e.signX!==c||e.signY!==u))return!1;if(l=d._getTransformedDimensions(),_&&!b){var S=Math.abs(o.x)+Math.abs(o.y),T=e.original,O=S/(Math.abs(l.x*T.scaleX/d.scaleX)+Math.abs(l.
vendor: 13,693 bytes, line 2
2y*T.scaleY/d.scaleY));s=T.scaleX*O,a=T.scaleY*O}else s=Math.abs(o.x*d.scaleX/l.x),a=Math.abs(o.y*d.scaleY/l.y);m(e)&&(s*=2,a*=2),e.signX!==c&&"y"!==b&&(e.originX=h[e.originX],s*=-1,e.signX=c),e.signY!==u&&"x"!==b&&(e.originY=h[e.originY],a*=-1,e.signY=u)}var E=d.scaleX,A=d.scaleY;return b?("x"===b&&d.set("scaleX",s),"y"===b&&d.set("scaleY",a)):(!p&&d.set("scaleX",s),!y&&d.set("scaleY",a)),E!==d.scaleX||A!==d.scaleY}r.scaleCursorStyleHandler=function(t,e,n){var r=g(t,n),o="";if(0!==e.x&&0===e.y?o="x":0===e.x&&0!==e.y&&(o="y"),v(n,o,r))return"not-allowed";var s=d(n,e);return i[s]+"-resize"},r.skewCursorStyleHandler=function(t,e,i){var r="not-allowed";if(0!==e.x&&i.lockSkewingY)return r;if(0!==e.y&&i.lockSkewingX)return r;var o=d(i,e)%4;return n[o]+"-resize"},r.scaleSkewCursorStyleHandler=function(t,e,i){return t[i.canvas.altActionKey]?r.skewCursorStyleHandler(t,e,i):r.scaleCursorStyleHandler(t,e,i)},r.rotationWithSnapping=_("rotating",b((function(t,e,i,n){var r=e,o=r.target,s=o.translateToOriginPoint(o.getCenterPoint(),r.originX,r.originY);if(o.lockRotation)return!1;var a,l=Math.atan2(r.ey-s.y,r.ex-s.x),c=Math.atan2(n-s.y,i-s.x),h=u(c-l+r.theta);if(o.snapAngle>0){var f=o.snapAngle,d=o.snapThreshold||f,p=Math.ceil(h/f)*f,g=Math.floor(h/f)*f;Math.abs(h-g)<d?h=g:Math.abs(h-p)<d&&(h=p)}return h<0&&(h=360+h),h%=360,a=o.angle!==h,o.angle=h,a}))),r.scalingEqually=_("scaling",b((function(t,e,i,n){return O(t,e,i,n)}))),r.scalingX=_("scaling",b((function(t,e,i,n){return O(t,e,i,n,{by:"x"})}))),r.scalingY=_("scaling",b((function(t,e,i,n){return O(t,e,i,n,{by:"y"})}))),r.scalingYOrSkewingX=function(t,e,i,n){return t[e.target.canvas.altActionKey]?r.skewHandlerX(t,e,i,n):r.scalingY(t,e,i,n)},r.scalingXOrSkewingY=function(t,e,i,n){return t[e.target.canvas.altActionKey]?r.skewHandlerY(t,e,i,n):r.scalingX(t,e,i,n)},r.changeWidth=_("resizing",b((function(t,e,i,n){var r=e.target,o=w(e,e.originX,e.originY,i,n),s=r.strokeWidth/(r.strokeUniform?r.scaleX:1),a=m(e)?2:1,l=r.width,c=Math.abs(o.x*a/r.scaleX)-s;return r.set("width",Math.max(c,0)),l!==c}))),r.skewHandlerX=function(t,e,i,n){var r,l=e.target,h=l.skewX,u=e.originY;return!l.lockSkewingX&&(0===h?r=w(e,c,c,i,n).x>0?o:a:(h>0&&(r=u===s?o:a),h<0&&(r=u===s?a:o),x(l)&&(r=r===o?a:o)),e.originX=r,_("skewing",b(S))(t,e,i,n))},r.skewHandlerY=function(t,e,i,n){var r,a=e.target,h=a.skewY,u=e.originX;return!a.lockSkewingY&&(0===h?r=w(e,c,c,i,n).y>0?s:l:(h>0&&(r=u===o?s:l),h<0&&(r=u===o?l:s),x(a)&&(r=r===s?l:s)),e.originY=r,_("skewing",b(T))(t,e,i,n))},r.dragHandler=function(t,e,i,n){var r=e.target,o=i-e.offsetX,s=n-e.offsetY,a=!r.get("lockMovementX")&&r.left!==o,l=!r.get("lockMovementY")&&r.top!==s;return a&&r.set("left",o),l&&r.set("top",s),(a||l)&&p("moving",y(t,e,i,n)),a||l},r.scaleOrSkewActionName=function(t,e,i){var n=t[i.canvas.altActionKey];return 0===e.x?n?"skewX":"scaleY":0===e.y?n?"skewY":"scaleX":void 0},r.rotationStyleHandler=function(t,e,i){return i.lockRotation?"not-allowed":e.cursorStyle},r.fireEvent=p,r.wrapWithFixedAnchor=b,r.wrapWithFireEvent=_,r.getLocalPoint=w,e.controlsUtils=r}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.degreesToRadians,n=e.controlsUtils;n.renderCircleControl=function(t,e,i,n,r){n=n||{};var o,s=this.sizeX||n.cornerSize||r.cornerSize,a=this.sizeY||n.cornerSize||r.cornerSize,l=void 0!==n.transparentCorners?n.transparentCorners:r.transparentCorners,c=l?"stroke":"fill",h=!l&&(n.cornerStrokeColor||r.cornerStrokeColor),u=e,f=i;t.save(),t.fillStyle=n.cornerColor||r.cornerColor,t.strokeStyle=n.cornerStrokeColor||r.cornerStrokeColor,s>a?(o=s,t.scale(1,a/s),f=i*s/a):a>s?(o=a,t.scale(s/a,1),u=e*a/s):o=s,t.lineWidth=1,t.beginPath(),t.arc(u,f,o/2,0,2*Math.PI,!1),t[c](),h&&t.stroke(),t.restore()},n.renderSquareControl=function(t,e,n,r,o){r=r||{};var s=this.sizeX||r.cornerSize||o.cornerSize,a=this.sizeY||r.cornerSize||o.cornerSize,l=void 0!==r.transparentCorners?r.transparentCorners:o.transparentCorners,c=l?"stroke":"fill",h=!l&&(r.cornerStrokeColor||o.cornerStrokeColor),u=s/2,f=a/2;t.save(),t.fillStyle=r.cornerColor||o.cornerColor,t.strokeStyle=r.cornerStrokeColor||o.cornerStrokeColor,t.lineWidth=1,t.translate(e,n),t.rotate(i(o.angle)),t[c+"Rect"](-u,-f,s,a),h&&t.strokeRect(-u,-f,s,a),t.restore()}}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Control=function(t){for(var e in t)this[e]=t[e]},e.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(t,e){return e.cursorStyle},getActionName:function(t,e){return e.actionName},getVisibility:function(t,e){var i=t._controlsVisibility;return i&&void 0!==i[e]?i[e]:this.visible},setVisibility:function(t){this.visible=t},positionHandler:function(t,i){return e.util.transformPoint({x:this.x*t.x+this.offsetX,y:this.y*t.y+this.offsetY},i)},calcCornerCoords:function(t,i,n,r,o){var s,a,l,c,h=o?this.touchSizeX:this.sizeX,u=o?this.touchSizeY:this.sizeY;if(h&&u&&h!==u){var f=Math.atan2(u,h),d=Math.sqrt(h*h+u*u)/2,p=f-e.util.degreesToRadians(t),g=Math.PI/2-f-e.util.degreesToRadians(t);s=d*e.util.cos(p),a=d*e.util.sin(p),l=d*e.util.cos(g),c=d*e.util.sin(g)}else{d=.7071067812*(h&&u?h:i);p=e.util.degreesToRadians(45-t);s=l=d*e.util.cos(p),a=c=d*e.util.sin(p)}return{tl:{x:n-c,y:r-l},tr:{x:n+s,y:r-a},bl:{x:n-s,y:r+a},br:{x:n+c,y:r+l}}},render:function(t,i,n,r,o){if("circle"===((r=r||{}).cornerStyle||o.cornerStyle))e.controlsUtils.renderCircleControl.call(this,t,i,n,r,o);else e.controlsUtils.renderSquareControl.call(this,t,i,n,r,o)}}}(e),function(){function t(t,e){var i,n,r,o,s=t.getAttribute("style"),a=t.getAttribute("offset")||0;if(a=(a=parseFloat(a)/(/%$/.test(a)?100:1))<0?0:a>1?1:a,s){var l=s.split(/\s*;\s*/);for(""===l[l.length-1]&&l.pop(),o=l.length;o--;){var c=l[o].split(/\s*:\s*/),h=c[0].trim(),u=c[1].trim();"stop-color"===h?i=u:"stop-opacity"===h&&(r=u)}}return i||(i=t.getAttribute("stop-color")||"rgb(0,0,0)"),r||(r=t.getAttribute("stop-opacity")),n=(i=new k.Color(i)).getAlpha(),r=isNaN(parseFloat(r))?1:parseFloat(r),r*=n*e,{offset:a,color:i.toRgb(),opacity:r}}var e=k.util.object.clone;k.Gradient=k.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+="_"+k.Object.__uid++:this.id=k.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 k.Color(t[e]);this.colorStops.push({offset:parseFloat(e),color:i.toRgb(),opacity:i.getAlpha()})}return this},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 k.util.populateWithProperties(this,e,t),e},toSVG:function(t,i){var n,r,o,s,a=e(this.coords,!0),l=(i=i||{},e(this.colorStops,!0)),c=a.r1>a.r2,h=this.gradientTransform?this.gradientTransform.concat():k.iMatrix.concat(),u=-this.offsetX,f=-this.offsetY,d=!!i.additionalTransform,p="pixels"===this.gradientUnits?"userSpaceOnUse":"objectBoundingBox";if(l.sort((function(t,e){return t.offset-e.offset})),"objectBoundingBox"===p?(u/=t.width,f/=t.height):(u+=t.width/2,f+=t.height/2),"path"===t.type&&"percentage"!==this.gradientUnits&&(u-=t.pathOffset.x,f-=t.pathOffset.y),h[4]-=u,h[5]-=f,s='id="SVGID_'+this.id+'" gradientUnits="'+p+'"',s+=' gradientTransform="'+(d?i.additionalTransform+" ":"")+k.util.matrixToSVG(h)+'" ',"linear"===this.type?o=["<linearGradient ",s,' x1="',a.x1,'" y1="',a.y1,'" x2="',a.x2,'" y2="',a.y2,'">\n']:"radial"===this.type&&(o=["<radialGradient ",s,' cx="',c?a.x1:a.x2,'" cy="',c?a.y1:a.y2,'" r="',c?a.r1:a.r2,'" fx="',c?a.x2:a.x1,'" fy="',c?a.y2:a.y1,'">\n']),"radial"===this.type){if(c)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];o.push("<stop ",'offset="',100*v.offset+"%",'" style="stop-color:',v.color,void 0!==v.opacity?";stop-opacity: "+v.opacity:";",'"/>\n')}return o.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),o.join("")},toLive:function(t){var e,i,n,r=k.util.object.clone(this.coords);if(this.type){for("linear"===this.type?e=t.createLinearGradient(r.x1,r.y1,r.x2,r.y2):"radial"===this.type&&(e=t.createRadialGradient(r.x1,r.y1,r.r1,r.x2,r.y2,r.r2)),i=0,n=this.colorStops.length;i<n;i++){var o=this.colorStops[i].color,s=this.colorStops[i].opacity,a=this.colorStops[i].offset;void 0!==s&&(o=new k.Color(o).setAlpha(s).toRgba()),e.addColorStop(a,o)}return e}}}),k.util.object.extend(k.Gradient,{fromElement:function(e,i,n,r){var o=parseFloat(n)/(/%$/.test(n)?100:1);o=o<0?0:o>1?1:o,isNaN(o)&&(o=1);var s,a,l,c,h=e.getElementsByTagName("stop"),u="userSpaceOnUse"===e.getAttribute("gradientUnits")?"pixels":"percentage",f=e.getAttribute("gradientTransform")||"",d=[],p=0,g=0;for("linearGradient"===e.nodeName||"LINEARGRADIENT"===e.nodeName?(s="linear",a=function(t){return{x1:t.getAttribute("x1")||0,y1:t.getAttribute("y1")||0,x2:t.getAttribute("x2")||"100%",y2:t.getAttribute("y2")||0}}(e)):(s="radial",a=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)),l=h.length;l--;)d.push(t(h[l],o));return c=k.parseTransformAttribute(f),function(t,e,i,n){var r,o;Object.keys(e).forEach((function(t){"Infinity"===(r=e[t])?o=1:"-Infinity"===r?o=0:(o=parseFloat(e[t],10),"string"==typeof r&&/^(\d+\.\d+)%|(\d+)%$/.test(r)&&(o*=.01,"pixels"===n&&("x1"!==t&&"x2"!==t&&"r2"!==t||(o*=i.viewBoxWidth||i.width),"y1"!==t&&"y2"!==t||(o*=i.viewBoxHeight||i.height)))),e[t]=o}))}(0,a,r,u),"pixels"===u&&(p=-i.left,g=-i.top),new k.Gradient({id:e.getAttribute("id"),type:s,coords:a,colorStops:d,gradientUnits:u,gradientTransform:c,offsetX:p,offsetY:g})}})}(),function(){"use strict";var t=k.util.toFixed;k.Pattern=k.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(t,e){if(t||(t={}),this.id=k.Object.__uid++,this.setOptions(t),!t.source||t.source&&"string"!=typeof t.source)e&&e(this);else{var i=this;this.source=k.util.createImage(),k.util.loadImage(t.source,(function(t,n){i.source=t,e&&e(i,n)}),null,this.crossOrigin)}},toObject:function(e){var i,n,r=k.Object.NUM_FRACTION_DIGITS;return"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},k.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,o=this.offsetY/t.height,s="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,o&&(n+=Math.abs(o))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(i=1,r&&(i+=Math.abs(r))),e.src?s=e.src:e.toDataURL&&(s=e.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+r+'" y="'+o+'" width="'+i+'" height="'+n+'">\n<image x="0" y="0" width="'+e.width+'" height="'+e.height+'" xlink:href="'+s+'"></image>\n</pattern>\n'},setOptions:function(t){for(var e in t)this[e]=t[e]},toLive:function(t){var e=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:parseFloat(n[1],10)||0,offsetY:parseFloat(n[2],10)||0,blur:parseFloat(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,o=e.Object.NUM_FRACTION_DIGITS,s=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(s.x)+this.blur)/t.width,o)+20,r=100*i((Math.abs(s.y)+this.blur)/t.height,o)+20),t.flipX&&(s.x*=-1),t.flipY&&(s.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,o)+'"></feGaussianBlur>\n\t<feOffset dx="'+i(s.x,o)+'" dy="'+i(s.y,o)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+a.toRgb()+'" flood-opacity="'+a.getAlpha()+'"/>
2\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+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/)}(e),function(){"use strict";if(k.StaticCanvas)k.warn("fabric.StaticCanvas is already defined.");else{var t=k.util.object.extend,e=k.util.getElementOffset,i=k.util.removeFromArray,n=k.util.toFixed,r=k.util.transformPoint,o=k.util.invertTransform,s=k.util.getNodeCanvas,a=k.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");k.StaticCanvas=k.util.createClass(k.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,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:k.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,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.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 k.devicePixelRatio>1&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?Math.max(1,k.devicePixelRatio):1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var t=k.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)},__setBgOverlayImage:function(t,e,i,n){return"string"==typeof e?k.util.loadImage(e,(function(e,r){if(e){var o=new k.Image(e,n);this[t]=o,o.canvas=this}i&&i(e,r)}),this,n&&n.crossOrigin):(n&&e.setOptions(n),this[t]=e,e&&(e.canvas=this),i&&i(e,!1)),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=k.util.getById(t)||this._createCanvasElement(),k.util.addClass(this.lowerCanvasEl,"lower-canvas"),this._originalCanvasStyle=this.lowerCanvasEl.style,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.contextTop),this._initRetinaScaling(),this.calcOffset(),e.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(t,e){return this.lowerCanvasEl[t]=e,this.up
vendor: 7,624 bytes, line 2
2perCanvasEl&&(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,o=this.backgroundImage,s=this.overlayImage;for(this.viewportTransform=t,i=0,n=this._objects.length;i<n;i++)(e=this._objects[i]).group||e.setCoords(!0);return r&&r.setCoords(),o&&o.setCoords(!0),s&&s.setCoords(!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(t,e){var i=t,n=this.viewportTransform.slice(0);t=r(t,o(this.viewportTransform)),n[0]=e,n[3]=e;var s=r(t,n);return n[4]+=i.x-s.x,n[5]+=i.y-s.y,this.setViewportTransform(n)},setZoom:function(t){return this.zoomToPoint(new k.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 k.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.remove.apply(this,this.getObjects()),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=k.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var t={},e=this.width,i=this.height,n=o(this.viewportTransform);return t.tl=r({x:0,y:0},n),t.br=r({x:e,y:i},n),t.tr=new k.Point(t.br.x,t.tl.y),t.bl=new k.Point(t.tl.x,t.br.y),this.vptCoords=t,t},cancelRequestedRender:function(){this.isRendering&&(k.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),k.util.setImageSmoothing(t,this.imageSmoothingEnabled),this.fire("before:render",{ctx: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),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,o=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,o&&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 s=i.gradientTransform||i.patternTransform;s&&t.transform(s[0],s[1],s[2],s[3],s[4],s[5]),t.fill(),t.restore()}if(n){t.save();var a=this.skipOffscreen;this.skipOffscreen=o,o&&t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),n.render(t),this.skipOffscreen=a,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}},getCenterPoint:function(){return new k.Point(this.width/2,this.height/2)},centerObjectH:function(t){return this._centerObject(t,new k.Point(this.getCenterPoint().x,t.getCenterPoint().y))},centerObjectV:function(t){return this._centerObject(t,new k.Point(t.getCenterPoint().x,this.getCenterPoint().y))},centerObject:function(t){var e=this.getCenterPoint();return this._centerObject(t,e)},viewportCenterObject:function(t){var e=this.getVpCenter();return this._centerObject(t,e)},viewportCenterObjectH:function(t){var e=this.getVpCenter();return this._centerObject(t,new k.Point(e.x,t.getCenterPoint().y)),this},viewportCenterObjectV:function(t){var e=this.getVpCenter();return this._centerObject(t,new k.Point(t.getCenterPoint().x,e.y))},getVpCenter:function(){var t=this.getCenterPoint(),e=o(this.viewportTransform);return r(t,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:k.version,objects:this._toObjects(e,i)};return n&&!n.excludeFromExport&&(r.clipPath=this._toObject(this.clipPath,e,i)),t(r,this.__serializeBgOverlay(e,i)),k.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,o=this.backgroundColor,s=this.overlayColor;return o&&o.toObject?o.excludeFromExport||(i.background=o.toObject(e)):o&&(i.background=o),s&&s.toObject?s.excludeFromExport||(i.overlay=s.toObject(e)):s&&(i.overlay=s),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,o=e.height||this.height,s='viewB
2ox="0 0 '+this.width+" "+this.height+'" ',a=k.Object.NUM_FRACTION_DIGITS;e.viewBox?s='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(i=this.viewportTransform,s='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="',o,'" ',s,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",k.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_"+k.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,o={width:t.width/(n?r[0]:1),height:t.height/(n?r[3]:1)};return i.toSVG(o,{additionalTransform:n?k.util.matrixToSVG(r):""})}})).join("")},createSVGFontFacesMarkup:function(){var t,e,i,n,r,o,s,a,l="",c={},h=k.fontPaths,u=[];for(this._objects.forEach((function t(e){u.push(e),e._objects&&e._objects.forEach(t)})),s=0,a=u.length;s<a;s++)if(e=(t=u[s]).fontFamily,-1!==t.type.indexOf("text")&&!c[e]&&h[e]&&(c[e]=!0,t.styles))for(r in i=t.styles)for(o in n=i[r])!c[e=n[o].fontFamily]&&h[e]&&(c[e]=!0);for(var f in c)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",f,"';\n","\t\t\tsrc: url('",h[f],"');\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,o=this._objects;for(n=0,r=o.length;n<r;n++)(i=o[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,o=this.height;if(i)if(i.toLive){var s=i.repeat,a=k.util.invertTransform(n),l=this[e+"Vpt"]?k.util.matrixToSVG(a):"";t.push('<rect transform="'+l+" translate(",r/2,",",o/2,')"',' x="',i.offsetX-r/2,'" y="',i.offsetY-o/2,'" ','width="',"repeat-y"===s||"no-repeat"===s?i.source.width:r,'" height="',"repeat-x"===s||"no-repeat"===s?i.source.height:o,'" 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,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(e=(r=o._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,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(r=o._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,o,s,a,l=this._activeObject,c=0;if(t===l&&"activeSelection"===t.type)for(a=l._objects,n=0;n<a.length;n++)r=a[n],(o=this._objects.indexOf(r))>0+c&&(s=o-1,i(this._objects,r),this._objects.splice(s,0,r)),c++;else 0!==(o=this._objects.indexOf(t))&&(s=this._findNewLowerIndex(t,o,e),i(this._objects,t),this._objects.splice(s,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,o,s,a,l=this._activeObject,c=0;if(t===l&&"activeSelection"===t.type)for(n=(a=l._objects).length;n--;)r=a[n],(o=this._objects.indexOf(r))<this._objects.length-1-c&&(s=o+1,i(this._objects,r),this._objects.splice(s,0,r)),c++;else(o=this._objects.indexOf(t))!==this._objects.length-1&&(s=this._findNewUpperIndex(t,o,e),i(this._objects,t),this._objects.splice(s,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this}
vendor: 4,965 bytes, line 2
2,_findNewUpperIndex:function(t,e,i){var n,r,o;if(i)for(n=e,r=e+1,o=this._objects.length;r<o;++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&&(k.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,this.lowerCanvasEl.classList.remove("lower-canvas"),k.util.setStyle(this.lowerCanvasEl,this._originalCanvasStyle),delete this._originalCanvasStyle,this.lowerCanvasEl.setAttribute("width",this.width),this.lowerCanvasEl.setAttribute("height",this.height),k.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),t(k.StaticCanvas.prototype,k.Observable),t(k.StaticCanvas.prototype,k.Collection),t(k.StaticCanvas.prototype,k.DataURLExporter),t(k.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=a();if(!e||!e.getContext)return null;var i=e.getContext("2d");return i&&"setLineDash"===t?void 0!==i.setLineDash:null}}),k.StaticCanvas.prototype.toJSON=k.StaticCanvas.prototype.toObject,k.isLikelyNode&&(k.StaticCanvas.prototype.createPNGStream=function(){var t=s(this.lowerCanvasEl);return t&&t.createPNGStream()},k.StaticCanvas.prototype.createJPEGStream=function(t){var e=s(this.lowerCanvasEl);return e&&e.createJPEGStream(t)})}}(),k.BaseBrush=k.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,limitedToCanvasSize:!1,_setBrushStyles:function(t){t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.miterLimit=this.strokeMiterLimit,t.lineJoin=this.strokeLineJoin,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*=k.devicePixelRatio),i.shadowColor=e.color,i.shadowBlur=e.blur*n,i.shadowOffsetX=e.offsetX*n,i.shadowOffsetY=e.offsetY*n}},needsFullRender:function(){return new k.Color(this.color).getAlpha()<1||!!this.shadow},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0},_isOutSideCanvas:function(t){return t.x<0||t.x>this.canvas.getWidth()||t.y<0||t.y>this.canvas.getHeight()}}),k.PencilBrush=k.util.createClass(k.BaseBrush,{decimate:.4,drawStraightLine:!1,straightLineKey:"shiftKey",initialize:function(t){this.canvas=t,this._points=[]},needsFullRender:function(){return this.callSuper("needsFullRender")||this._hasStraightLine},_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.drawStraightLine=e.e[this.straightLineKey],this._prepareForDrawing(t),this._captureDrawingPath(t),this._render())},onMouseMove:function(t,e){if(this.canvas._isMainEvent(e.e)&&(this.drawStraightLine=e.e[this.straightLineKey],(!0!==this.limitedToCanvasSize||!this._isOutSideCanvas(t))&&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.drawStraightLine=!1,this.oldEnd=void 0,this._finalizeAndAddPath(),!1)},_prepareForDrawing:function(t){var e=new k.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.drawStraightLine&&this._points.length>1&&(this._hasStraightLine=!0,this._points.pop()),this._points.push(t),0))},_reset:function(){this._points=[],this._setBrushStyles(this.canvas.contextTop),this._setShadow(),this._hasStraightLine=!1},_captureDrawingPath:function(t){var e=new k.Point(t.x,t.y);return this._addPoint(e)},_render:function(t){var e,i,n=this._points[0],r=this._points[1];if(t=t||this.canvas.contextTop,this._saveAndTransform(t),t.beginPath(),2===this._points.length&&n.x===r.x&&n.y===r.y){var o=this.width/1e3;
vendor: 14,934 bytes, line 2
2n=new k.Point(n.x,n.y),r=new k.Point(r.x,r.y),n.x-=o,r.x+=o}for(t.moveTo(n.x,n.y),e=1,i=this._points.length;e<i;e++)this._drawSegment(t,n,r),n=this._points[e],r=this._points[e+1];t.lineTo(n.x,n.y),t.stroke(),t.restore()},convertPointsToSVGPath:function(t){var e=this.width/1e3;return k.util.getSmoothPathFromPoints(t,e)},_isEmptySVGPath:function(t){return"M 0 0 Q 0 0 0 0 L 0 0"===k.util.joinPath(t)},createPath:function(t){var e=new k.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.shadow=new k.Shadow(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),o=t.length-1,s=t[0],a=[s];for(i=1;i<o-1;i++)Math.pow(s.x-t[i].x,2)+Math.pow(s.y-t[i].y,2)>=r&&(s=t[i],a.push(s));return a.push(t[o]),a},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var t=this.convertPointsToSVGPath(this._points);if(this._isEmptySVGPath(t))this.canvas.requestRenderAll();else{var e=this.createPath(t);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:e}),this.canvas.add(e),this.canvas.requestRenderAll(),e.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:e})}}}),k.CircleBrush=k.util.createClass(k.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){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(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],o=new k.Circle({radius:r.radius,left:r.x,top:r.y,originX:"center",originY:"center",fill:r.fill});this.shadow&&(o.shadow=new k.Shadow(this.shadow)),n.push(o)}var s=new k.Group(n);s.canvas=this.canvas,this.canvas.fire("before:path:created",{path:s}),this.canvas.add(s),this.canvas.fire("path:created",{path:s}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=i,this.canvas.requestRenderAll()},addPoint:function(t){var e=new k.Point(t.x,t.y),i=k.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,n=new k.Color(this.color).setAlpha(k.util.getRandomInt(0,100)/100).toRgba();return e.radius=i,e.fill=n,this.points.push(e),e}}),k.SprayBrush=k.util.createClass(k.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){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(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],o=0,s=r.length;o<s;o++){var a=new k.Rect({width:r[o].width,height:r[o].width,left:r[o].x+1,top:r[o].y+1,originX:"center",originY:"center",fill:this.color});e.push(a)}this.optimizeOverlapping&&(e=this._getOptimizedRects(e));var l=new k.Group(e);this.shadow&&l.set("shadow",new k.Shadow(this.shadow)),this.canvas.fire("before:path:created",{path:l}),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 o=[];for(e in r)o.push(r[e]);return o},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,o=this.width/2;for(r=0;r<this.density;r++){e=k.util.getRandomInt(t.x-o,t.x+o),i=k.util.getRandomInt(t.y-o,t.y+o),n=this.dotWidthVariance?k.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var s=new k.Point(e,i);s.width=n,this.randomOpacity&&(s.opacity=k.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(s)}this.sprayChunks.push(this.sprayChunkPoints)}}),k.PatternBrush=k.util.createClass(k.PencilBrush,{getPatternSrc:function(){var t=k.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(t){return t.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(t){this.callSuper("_setBrushStyles",t),t.strokeStyle=this.getPattern(t)},createPath:function(t){var e=this.callSuper("createPath",t),i=e._getLeftTopCoords().scalarAdd(e.strokeWidth/2);return e.stroke=new k.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-i.x,offsetY:-i.y}),e}}),function(){var t=k.util.getPointer,e=k.util.degreesToRadians,i=k.util.isTouchEvent;for(var n in k.Canvas=k.util.createClass(k.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()},uniformScaling:!0,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",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:[],enablePointerEvents:!1,_hoveredTarget:null,_hoveredTargets:[],_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=k.PencilBrush&&new k.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,o=this._objects.length;r<o;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),this.hasLostContext=!1);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},_normalizePointer:function(t,e){var i=t.calcTransformMatrix(),n=k.util.invertTransform(i),r=this.restorePointerVpt(e);return k.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),o=Math.max(t.cacheTranslationY+n.y*t.zoomY,0);return k.util.isTransparent(t._cacheContext,Math.round(r),Math.round(o),this.targetFindTolerance)}var s=this.contextCache,a=t.selectionBackgroundColor,l=this.viewportTransform;return t.selectionBackgroundColor="",this.clearContext(s),s.save(),s.transform(l[0],l[1],l[2],l[3],l[4],l[5]),t.render(s),s.restore(),t.selectionBackgroundColor=a,k.util.isTransparent(s,e,i,this.targetFindTolerance)},_isSelectionKeyPressed:function(t){return Array.isArray(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,e,i){var n;if(t)return"scale"===e||"scaleX"===e||"scaleY"===e||"resizing"===e?n=this.centeredScaling||t.centeredScaling:"rotate"===e&&(n=this.centeredRotation||t.centeredRotation),n?!i:i},_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,n){if(!e||!t)return"drag";var r=n.controls[e];return r.getActionName(i,r,n)},_setupCurrentTransform:function(t,i,n){if(i){var r=this.getPointer(t),o=i.__corner,s=i.controls[o],a=n&&o?s.getActionHandler(t,i,s):k.controlsUtils.dragHandler,l=this._getActionFromCorner(n,o,t,i),c=this._getOriginFromCorner(i,o),h=t[this.centeredKey],u={target:i,action:l,actionHandler:a,corner:o,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,offsetX:r.x-i.left,offsetY:r.y-i.top,originX:c.x,originY:c.y,ex:r.x,ey:r.y,lastX:r.x,lastY:r.y,theta:e(i.angle),width:i.width*i.scaleX,shiftKey:t.shiftKey,altKey:h,original:k.util.saveObjectTransform(i)};this._shouldCenterTransform(i,l,h)&&(u.originX="center",u.originY="center"),u.original.originX=c.x,u.original.originY=c.y,this._currentTransform=u,this._beforeTransform(t)}},setCursor:function(t){this.upperCanvasEl.style.cursor=t},_drawSelection:function(t){var e=this._groupSelector,i=new k.Point(e.ex,e.ey),n=k.util.transformPoint(i,this.viewportTransform),r=new k.Point(e.ex+e.left,e.ey+e.top),o=k.util.transformPoint(r,this.viewportTransform),s=Math.min(n.x,o.x),a=Math.min(n.y,o.y),l=Math.max(n.x,o.x),c=Math.max(n.y,o.y),h=this.selectionLineWidth/2;this.selectionColor&&(t.fillStyle=this.selectionColor,t.fillRect(s,a,l-s,c-a)),this.selectionLineWidth&&this.selectionBorderColor&&(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,s+=h,a+=h,l-=h,c-=h,k.Object.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(s,a,l-s,c-a))},findTarget:function(t,e){if(!this.skipTargetFind){var n,r,o=this.getPointer(t,!0),s=this._activeObject,a=this.getActiveObjects(),l=i(t),c=a.length>1&&!e||1===a.length;if(this.targets=[],c&&s._findTargetCorner(o,l))return s;if(a.length>1&&!e&&s===this._searchPossibleTargets([s],o))return s;if(1===a.length&&s===this._searchPossibleTargets([s],o)){if(!this.preserveObjectStacking)return s;n=s,r=this.targets,this.targets=[]}var h=this._searchPossibleTargets(this._objects,o);return t[this.altSelectionKey]&&h&&n&&h!==n&&(h=n,this.targets=r),h}},_checkTarget:function(t,e,i){if(e&&e.visible&&e.evented&&e.containsPoint(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 o=t[r],s=o.group?this._normalizePointer(o.group,e):e;if(this._checkTarget(s,o,e)){(i=t[r]).subTargetCheck&&i instanceof k.Group&&(n=this._searchPossibleTargets(i._objects,e))&&this.targets.push(n);break}}return i},restorePointerVpt:function(t){return k.util.transformPoint(t,k.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),o=this.upperCanvasEl,s=o.getBoundingClientRect(),a=s.width||0,l=s.height||0;a&&l||("top"in s&&"bottom"in s&&(l=Math.abs(s.top-s.bottom)),"right"in s&&"left"in s&&(a=Math.abs(s.right-s.left))),this.calcOffset(),r.x=r.x-this._offset.left,r.y=r.y-this._offset.top,i||(r=this.restorePointerVpt(r));var c=this.getRetinaScaling();return 1!==c&&(r.x/=c,r.y/=c),n=0===a||0===l?{width:1,height:1}:{width:o.width/a,height:o.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),k.util.addClass(i,"upper-canvas "+t),this.wrapperEl.appendChild(i),this._copyCanvasStyle(e,i),this._applyCanvasStyle(i),this.contextTop=i.getContext("2d")},getTopContext:function(){return this.contextTop},_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=k.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),k.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),k.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.width||t.width,i=this.height||t.height;k.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,k.util.makeElementUnselectable(t)},_copyCanvasStyle:function(t,e){e.style.cssText=t.style.cssText},getSelectionContext:function(){return this.contextTop}
vendor: 4,156 bytes, line 2
2,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=[],o=[];t.forEach((function(t){-1===n.indexOf(t)&&(i=!0,t.fire("deselected",{e,target:t}),o.push(t))})),n.forEach((function(n){-1===t.indexOf(n)&&(i=!0,n.fire("selected",{e,target:n}),r.push(n))})),t.length>0&&n.length>0?i&&this.fire("selection:updated",{e,selected:r,deselected:o}):n.length>0?this.fire("selection:created",{e,selected:r}):t.length>0&&this.fire("selection:cleared",{e,deselected: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})&&(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){k.util.cleanUpJsdomNode(this[t]),this[t]=void 0}.bind(this)),t.parentNode&&t.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,k.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]})),k.util.addTransformToObject(t,this._activeObject.calcOwnMatrix()),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(),k.StaticCanvas.prototype.setViewportTransform.call(this,t)}}),k.StaticCanvas)"prototype"!==n&&(k.Canvas[n]=k.StaticCanvas[n])}(),function(){var t=k.util.addListener,e=k.util.removeListener,i={passive:!1};function n(t,e){return t.button&&t.button===e-1}k.util.object.extend(k.Canvas.prototype,{mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(t,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(t,e){var n=this.upperCanvasEl,r=this._getEventPrefix();t(k.window,"resize",this._onResize),t(n,r+"down",this._onMouseDown),t(n,r+"move",this._onMouseMove,i),t(n,r+"out",this._onMouseOut),t(n,r+"enter",this._onMouseEnter),t(n,"wheel",this._onMouseWheel),t(n,"contextmenu",this._onContextMenu),t(n,"dblclick",this._onDoubleClick),t(n,"dragover",this._onDragOver),t(n,"dragenter",this._onDragEnter),t(n,"dragleave",this._onDragLeave),t(n,"drop",this._onDrop),this.enablePointerEvents||t(n,"touchstart",this._onTouchStart,i
vendor: 6,164 bytes, line 2
2),"undefined"!=typeof eventjs&&e in eventjs&&(eventjs[e](n,"gesture",this._onGesture),eventjs[e](n,"drag",this._onDrag),eventjs[e](n,"orientation",this._onOrientationChange),eventjs[e](n,"shake",this._onShake),eventjs[e](n,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(e,"remove");var t=this._getEventPrefix();e(k.document,t+"up",this._onMouseUp),e(k.document,"touchend",this._onTouchEnd,i),e(k.document,t+"move",this._onMouseMove,i),e(k.document,"touchmove",this._onMouseMove,i)},_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._onDrop.bind(this),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(e){i.fire("mouse:out",{target:e,e:t}),e&&e.fire("mouseout",{e:t})})),this._hoveredTargets=[]},_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)},_onDrop:function(t){return this._simpleEventHandler("drop:before",t),this._simpleEventHandler("drop",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(n){n.preventDefault(),null===this.mainTouchId&&(this.mainTouchId=this.getPointerId(n)),this.__onMouseDown(n),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();t(k.document,"touchend",this._onTouchEnd,i),t(k.document,"touchmove",this._onMouseMove,i),e(r,o+"down",this._onMouseDown)},_onMouseDown:function(n){this.__onMouseDown(n),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();e(r,o+"move",this._onMouseMove,i),t(k.document,o+"up",this._onMouseUp),t(k.document,o+"move",this._onMouseMove,i)},_onTouchEnd:function(n){if(!(n.touches.length>0)){this.__onMouseUp(n),this._resetTransformEventData(),this.mainTouchId=null;var r=this._getEventPrefix();e(k.document,"touchend",this._onTouchEnd,i),e(k.document,"touchmove",this._onMouseMove,i);var o=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout((function(){t(o.upperCanvasEl,r+"down",o._onMouseDown),o._willAddMouseDown=0}),400)}},_onMouseUp:function(n){this.__onMouseUp(n),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();this._isMainEvent(n)&&(e(k.document,o+"up",this._onMouseUp),e(k.document,o+"move",this._onMouseMove,i),t(r,o+"move",this._onMouseMove,i))},_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,r=this._groupSelector,o=!1,s=!r||0===r.left&&0===r.top;if(this._cacheTransformEventData(t),e=this._target,this._handleEvent(t,"up:before"),n(t,3))this.fireRightClick&&this._handleEvent(t,"up",3,s);else{if(n(t,2))return this.fireMiddleClick&&this._handleEvent(t,"up",2,s),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)this._onMouseUpInDrawingMode(t);else if(this._isMainEvent(t)){if(i&&(this._finalizeCurrentTransform(t),o=i.actionPerformed),!s){var a=e===this._activeObject;this._maybeGroupObjects(t),o||(o=this._shouldRender(e)||!a&&e===this._activeObject)}var l,c;if(e){if(l=e._findTargetCorner(this.getPointer(t,!0),k.util.isTouchEvent(t)),e.selectable&&e!==this._activeObject&&"up"===e.activeOn)this.setActiveObject(e,t),o=!0;else{var h=e.controls[l],u=h&&h.getMouseUpHandler(t,e,h);u&&u(t,i,(c=this.getPointer(t)).x,c.y)}e.isMoving=!1}if(i&&(i.target!==e||i.corner!==l)){var f=i.target&&i.target.controls[i.corner],d=f&&f.getMouseUpHandler(t,e,h);c=c||this.getPointer(t),d&&d(t,i,c.x,c.y)}this._setCursorFromEvent(t,e),this._handleEvent(t,"up",1,s),this._groupSelector=null,this._currentTransform=null,e&&(e.__corner=0),o?this.requestRenderAll():s||this.renderTop()}}},_simpleEventHandler:function(t,e){var i=this.findTarget(e),n=this.targets,r={e,target:i,subTargets:n};if(this.fire(t,r),i&&i.fire(t,r),!n)return i;for(var o=0;o<n.length;o++)n[o].fire(t,r);return i}
vendor: 4,211 bytes, line 2
2,_handleEvent:function(t,e,i,n){var r=this._target,o=this.targets||[],s={e:t,target:r,subTargets:o,button:i||1,isClick:n||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};"up"===e&&(s.currentTarget=this.findTarget(t),s.currentSubTargets=this.targets),this.fire("mouse:"+e,s),r&&r.fire("mouse"+e,s);for(var a=0;a<o.length;a++)o[a].fire("mouse"+e,s)},_finalizeCurrentTransform:function(t){var e=this._currentTransform,i=e.target,n={e:t,target:i,transform:e,action:e.action};i._scaling&&(i._scaling=!1),i.setCoords(),(e.actionPerformed||this.stateful&&i.hasStateChanged())&&this._fire("modified",n)},_onMouseDownInDrawingMode:function(t){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(t).requestRenderAll();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){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(n(t,3))this.fireRightClick&&this._handleEvent(t,"down",3);else if(n(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 r=this._shouldRender(e),o=this._shouldGroup(t,e);if(this._shouldClearSelection(t,e)?this.discardActiveObject(t):o&&(this._handleGrouping(t,e),e=this._activeObject),!this.selection||e&&(e.selectable||e.isEditing||e===this._activeObject)||(this._groupSelector={ex:this._absolutePointer.x,ey:this._absolutePointer.y,top:0,left:0}),e){var s=e===this._activeObject;e.selectable&&"down"===e.activeOn&&this.setActiveObject(e,t);var a=e._findTargetCorner(this.getPointer(t,!0),k.util.isTouchEvent(t));if(e.__corner=a,e===this._activeObject&&(a||!o)){this._setupCurrentTransform(t,e,s);var l=e.controls[a],c=(i=this.getPointer(t),l&&l.getMouseDownHandler(t,e,l));c&&c(t,this._currentTransform,i.x,i.y)}}this._handleEvent(t,"down"),(r||o)&&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})},__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._absolutePointer,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,o=Math.max(n.length,r.length);this.fireSyntheticInOutEvents(t,e,{oldTarget:i,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var s=0;s<o;s++)this.fireSyntheticInOutEvents(r[s],e,{oldTarget:n[s],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,o=Math.max(n.length,r.length);this.fireSyntheticInOutEvents(t,e,{oldTarget:i,evtOut:"dragleave",evtIn:"dragenter"});for(var s=0;s<o;s++)this.fireSyntheticInOutEvents(r[s],e,{oldTarget:n[s],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=t}
vendor: 4,594 bytes, line 2
2,fireSyntheticInOutEvents:function(t,e,i){var n,r,o,s=i.oldTarget,a=s!==t,l=i.canvasEvtIn,c=i.canvasEvtOut;a&&(n={e,target:t,previousTarget:s},r={e,target:s,nextTarget:t}),o=t&&a,s&&a&&(c&&this.fire(c,r),s.fire(i.evtOut,r)),o&&(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.shiftKey=t.shiftKey,i.altKey=t[this.centeredKey],this._performTransformAction(t,i,e),i.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(t,e,i){var n=i.x,r=i.y,o=e.action,s=!1,a=e.actionHandler;a&&(s=a(t,e,n,r)),"drag"===o&&s&&(e.target.isMoving=!0,this.setCursor(e.target.moveCursor||this.moveCursor)),e.actionPerformed=e.actionPerformed||s},_fire:k.controlsUtils.fireEvent,_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(t,e,i){var n=e.controls[t];return n.cursorStyleHandler(i,n,e)}})}(),v=Math.min,y=Math.max,k.util.object.extend(k.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 k.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 k.ActiveSelection(i.reverse(),{canvas:this}),this.setActiveObject(e,t))},_collectObjects:function(t){for(var e,i=[],n=this._groupSelector.ex,r=this._groupSelector.ey,o=n+this._groupSelector.left,s=r+this._groupSelector.top,a=new k.Point(v(n,o),v(r,s)),l=new k.Point(y(n,o),y(r,s)),c=!this.selectionFullyContained,h=n===o&&r===s,u=this._objects.length;u--&&!((e=this._objects[u])&&e.selectable&&e.visible&&(c&&e.intersectsWithRect(a,l,!0)||e.isContainedWithinRect(a,l,!0)||c&&e.containsPoint(a,null,!0)||c&&e.containsPoint(l,null,!0))&&(i.push(e),h)););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}}),k.util.object.extend(k.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 k.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(),o=this.width,s=this.height,a=r*t,l=this.viewportTransform,c=(l[4]-(e.left||0))*t,h=(l[5]-(e.top||0))*t,u=this.interactive,f=[a,0,0,a,c,h],d=this.enableRetinaScaling,p=k.util.createCanvasElement(),g=this.contextTop;return p.width=i,p.height=n,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=f,this.width=i,this.height=n,this.calcViewportBoundaries(),this.renderCanvas(p.getContext("2d"),this._objects),this.viewportTransform=l,this.width=o,this.height=s,this.calcViewportBoundaries(),this.interactive=u,this.enableRetinaScaling=d,this.contextTop=g,p}}),k.util.object.extend(k.StaticCanvas.prototype,{loadFromJSON:function(t,e,
vendor: 4,926 bytes, line 2
2i){if(t){var n="string"==typeof t?JSON.parse(t):k.util.object.clone(t),r=this,o=n.clipPath,s=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete n.clipPath,this._enlivenObjects(n.objects,(function(t){r.clear(),r._setBgOverlay(n,(function(){o?r._enlivenObjects([o],(function(i){r.clipPath=i[0],r.__setupCanvas.call(r,n,t,s,e)})):r.__setupCanvas.call(r,n,t,s,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?k.util.enlivenObjects([e],(function(e){r[t]=e[0],i[t]=!0,n&&n()})):this["set"+k.util.string.capitalize(t,!0)](e,(function(){i[t]=!0,n&&n()}))},_enlivenObjects:function(t,e,i){t&&0!==t.length?k.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=k.util.createCanvasElement();e.width=this.width,e.height=this.height;var i=new k.Canvas(e);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,o=e.util.string.capitalize,s=e.util.degreesToRadians,a=!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,touchCornerSize:24,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgb(178,204,255)",borderDashArray:null,cornerColor:"rgb(178,204,255)",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,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,perPixelTargetFind:!1,includeDefaultValues:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:a,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",activeOn:"down",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow 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(" "),colorProperties:"fill stroke backgroundColor".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,o=e.maxCacheSideLimit,s=e.minCacheSideLimit;if(n<=o&&r<=o&&n*r<=i)return n<s&&(t.width=s),r<s&&(t.height=s),t;var a=n/r,l=e.util.limitDimsByArea(a,i),c=e.util.capValue,h=c(s,l.x,o),u=c(s,l.y,o);return n>h&&(t.zoomX/=n/h,t.width=h,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.
vendor: 8,897 bytes, line 2
2scaleX/this.scaleX,n=e.y*t.scaleY/this.scaleY;return{width:Math.ceil(i+2),height:Math.ceil(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 e=t._currentTransform.target,i=t._currentTransform.action;if(this===e&&i.slice&&"scale"===i.slice(0,5))return!1}var n,r,o=this._cacheCanvas,s=this._limitCacheSize(this._getCacheCanvasDimensions()),a=s.width,l=s.height,c=s.zoomX,h=s.zoomY,u=a!==this.cacheWidth||l!==this.cacheHeight,f=this.zoomX!==c||this.zoomY!==h;return!(!u&&!f)&&(u?(o.width=a,o.height=l):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),n=s.x/2,r=s.y/2,this.cacheTranslationX=Math.round(o.width/2-n)+n,this.cacheTranslationY=Math.round(o.height/2-r)+r,this.cacheWidth=a,this.cacheHeight=l,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(c,h),this.zoomX=c,this.zoomY=h,!0)},setOptions:function(t){this._setOptions(t),this._initGradient(t.fill,"fill"),this._initGradient(t.stroke,"stroke"),this._initPattern(t.fill,"fill"),this._initPattern(t.stroke,"stroke")},transform:function(t){var e=this.group&&!this.group._transformDone||this.group&&this.canvas&&t===this.canvas.contextTop,i=this.calcTransformMatrix(!e);t.transform(i[0],i[1],i[2],i[3],i[4],i[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,strokeUniform:this.strokeUniform,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,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:r(this.skewX,i),skewY:r(this.skewY,i)};return this.clipPath&&!this.clipPath.excludeFromExport&&(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],Array.isArray(t[e])&&Array.isArray(i[e])&&0===t[e].length&&0===i[e].length&&delete t[e])})),t},toString:function(){return"#<fabric."+o(this.type)+">"},getObjectScaling:function(){if(!this.group)return{scaleX:this.scaleX,scaleY:this.scaleY};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,o=!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&&(o=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(t)>-1?(this.dirty=!0,o&&this.group.set("dirty",!0)):o&&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||!this.width&&!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.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(t)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(t),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),t.restore())},renderCache:function(t){t=t||{},this._cacheCanvas&&this._cacheContext||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._cacheContext=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,i){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._render(t),this._drawClipPath(t,this.clipPath),this.fill=i,this.stroke=n},_drawClipPath:function(t,e){e&&(e.canvas=this.canvas,e.shouldCache(),e._transformDone=!0,e.renderCache({forClipping:!0}),this.drawClipPathOnCache(t,e))},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&&this._cacheContext&&!t&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&this._cacheContext&&!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){var i=e.stroke;i&&(t.lineWidth=e.strokeWidth,t.lineCap=e.strokeLineCap,t.lineDashOffset=e.strokeDashOffset,t.lineJoin=e.strokeLineJoin,t.miterLimit=e.strokeMiterLimit,i.toLive?"percentage"===i.gradientUnits||i.gradientTransform||i.patternTransform?this._applyPatternForTransformedGradient(t,i):(t.strokeStyle=i.toLive(t,this),this._applyPatternGradientTransform(t,i)):t.strokeStyle=e.stroke)},_setFillStyles:function(t,e){var i=e.fill;i&&(i.toLive?(t.fillStyle=i.toLive(t,this),this._applyPatternGradientTransform(t,e.fill)):t.fillStyle=i)},_setClippingProperties:function(t){t.globalAlpha=1,t.strokeStyle="transparent",t.fillStyle="#000000"},_setLineDash:function(t,e){e&&0!==e.length&&(1&e.length&&e.push.apply(e,e),t.setLineDash(e))},_renderControls:function(t,i){var n,r,o,a=this.getViewportTransform(),l=this.calcTransformMatrix();r=void 0!==(i=i||{}).hasBorders?i.hasBorders:this.hasBorders,o=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),this.flipX&&(n.angle-=180),t.rotate(s(this.group?n.angle:this.angle)),i.forActiveSelection||this.group?r&&this.drawBordersInGroup(t,n,i):r&&this.drawBorders(t,i),o&&this.drawControls(t,i),t.restore(
vendor: 5,352 bytes, line 2
2)},_setShadow:function(t){if(this.shadow){var i,n=this.shadow,r=this.canvas,o=r&&r.viewportTransform[0]||1,s=r&&r.viewportTransform[3]||1;i=n.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),r&&r._isRetinaScaling()&&(o*=e.devicePixelRatio,s*=e.devicePixelRatio),t.shadowColor=n.color,t.shadowBlur=n.blur*e.browserShadowBlurConstant*(o+s)*(i.scaleX+i.scaleY)/4,t.shadowOffsetX=n.offsetX*o*i.scaleX,t.shadowOffsetY=n.offsetY*s*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._setFillStyles(t,this),"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._setStrokeStyles(t,this),t.stroke(),t.restore()}},_applyPatternForTransformedGradient:function(t,i){var n,r=this._limitCacheSize(this._getCacheCanvasDimensions()),o=e.util.createCanvasElement(),s=this.canvas.getRetinaScaling(),a=r.x/this.scaleX/s,l=r.y/this.scaleY/s;o.width=Math.ceil(a),o.height=Math.ceil(l),(n=o.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/s,r.zoomY/this.scaleY/s),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(s*this.scaleX/r.zoomX,s*this.scaleY/r.zoomY),t.strokeStyle=n.createPattern(o,"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,o=this.shadow,s=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,c,h,u,f=e.util.createCanvasElement(),d=this.getBoundingRect(!0,!0),p=this.shadow,g={x:0,y:0};p&&(c=p.blur,l=p.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),g.x=2*Math.round(s(p.offsetX)+c)*s(l.scaleX),g.y=2*Math.round(s(p.offsetY)+c)*s(l.scaleY)),h=d.width+g.x,u=d.height+g.y,f.width=Math.ceil(h),f.height=Math.ceil(u);var m=new e.StaticCanvas(f,{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=o,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 arguments.length>1?Array.from(arguments).includes(this.type):this.type===t},complexity:function(){return 1},toJSON:function(t){return this.toObject(t)},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);
vendor: 4,173 bytes, line 2
2var n=new e.Point(i.x,i.y),r=this._getLeftTopCoords();return this.angle&&(n=e.util.rotatePoint(n,r,s(-this.angle))),{x:n.x-r.x,y:n.y-r.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)},dispose:function(){e.runningAnimations&&e.runningAnimations.cancelByTarget(this)}}),e.util.createAccessors&&e.util.createAccessors(e.Object),i(e.Object.prototype,e.Observable),e.Object.NUM_FRACTION_DIGITS=2,e.Object.ENLIVEN_PROPS=["clipPath"],e.Object._fromObject=function(t,i,r,o){var s=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.enlivenObjectEnlivables(i,i,(function(){var t=o?new s(i[o],i):new s(i);r&&r(t)}))}))},e.Object.__uid=0)}(e),b=k.util.degreesToRadians,_={left:-.5,center:0,right:.5},w={top:-.5,center:0,bottom:.5},k.util.object.extend(k.Object.prototype,{translateToGivenOrigin:function(t,e,i,n,r){var o,s,a,l=t.x,c=t.y;return"string"==typeof e?e=_[e]:e-=.5,"string"==typeof n?n=_[n]:n-=.5,"string"==typeof i?i=w[i]:i-=.5,"string"==typeof r?r=w[r]:r-=.5,s=r-i,((o=n-e)||s)&&(a=this._getTransformedDimensions(),l=t.x+o*a.x,c=t.y+s*a.y),new k.Point(l,c)},translateToCenterPoint:function(t,e,i){var n=this.translateToGivenOrigin(t,e,i,"center","center");return this.angle?k.util.rotatePoint(n,t,b(this.angle)):n},translateToOriginPoint:function(t,e,i){var n=this.translateToGivenOrigin(t,"center","center",e,i);return this.angle?k.util.rotatePoint(n,t,b(this.angle)):n},getCenterPoint:function(){var t=new k.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,o=this.getCenterPoint();return n=void 0!==e&&void 0!==i?this.translateToGivenOrigin(o,"center","center",e,i):new k.Point(this.left,this.top),r=new k.Point(t.x,t.y),this.angle&&(r=k.util.rotatePoint(r,o,-b(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=b(this.angle),r=this.getScaledWidth(),o=k.util.cos(n)*r,s=k.util.sin(n)*r;e="string"==typeof this.originX?_[this.originX]:this.originX-.5,i="string"==typeof t?_[t]:t-.5,this.left+=o*(i-e),this.top+=s*(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=k.util,e=t.degreesToRadians,i=t.multiplyTransformMatrices,n=t.transformPoint;t.object.extend(k.Object.prototype,{oCoords:null,aCoords:null,lineCoords:null,ownMatrixCache:null,matrixCache:null,controls:{},_getCoords:function(t,e){return e?t?this.calcACoords():this.calcLineCoords():(this.aCoords&&this.lineCoords||this.setCoords(!0),t?this.aCoords:this.lineCoords)},getCoords:function(t,e){return i=this._getCoords(t,e),[new k.Point(i.tl.x,i.tl.y),new k.Point(i.tr.x,i.tr.y),new k.Point(i.br.x,i.br.y),new k.Point(i.bl.x,i.bl.y)];var i},intersectsWithRect:function(t,e,i,n){var r=this.getCoords(i,n);return"Intersection"===k.Intersection.intersectPolygonRectangle(r,t,e).status},intersectsWithObject:function(t,e,i){return"Intersection"===k.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=e?t.aCoords:t.lineCoords,o=0,s=t._getImageLines(r);o<4;o++)if(!t.containsPoint(n[o],s))return!1;return!0}
vendor: 6,788 bytes, line 2
2,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},containsPoint:function(t,e,i,n){var r=this._getCoords(i,n),o=(e=e||this._getImageLines(r),this._findCrossPoints(t,e));return 0!==o&&o%2==1},isOnScreen:function(t){if(!this.canvas)return!1;var e=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br;return!!this.getCoords(!0,t).some((function(t){return t.x<=i.x&&t.x>=e.x&&t.y<=i.y&&t.y>=e.y}))||(!!this.intersectsWithRect(e,i,!0,t)||this._containsCenterOfCanvas(e,i,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.getCoords(!0,t).every((function(t){return(t.x>=i.x||t.x<=e.x)&&(t.y>=i.y||t.y<=e.y)}))&&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,o=0;for(var s in e)if(!((r=e[s]).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:(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&&(o+=1),2!==o)))break;return o},getBoundingRect:function(e,i){var n=this.getCoords(e,i);return t.makeBoundingBoxFromPoints(n)},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)},calcLineCoords:function(){var i=this.getViewportTransform(),r=this.padding,o=e(this.angle),s=t.cos(o)*r,a=t.sin(o)*r,l=s+a,c=s-a,h=this.calcACoords(),u={tl:n(h.tl,i),tr:n(h.tr,i),bl:n(h.bl,i),br:n(h.br,i)};return r&&(u.tl.x-=c,u.tl.y-=l,u.tr.x+=l,u.tr.y-=c,u.bl.x-=l,u.bl.y+=c,u.br.x+=c,u.br.y+=l),u},calcOCoords:function(){var t=this._calcRotateMatrix(),e=this._calcTranslateMatrix(),n=this.getViewportTransform(),r=i(n,e),o=i(r,t),s=(o=i(o,[1/n[0],0,0,1/n[3],0,0]),this._calculateCurrentDimensions()),a={};return this.forEachControl((function(t,e,i){a[e]=t.positionHandler(s,o,i)})),a},calcACoords:function(){var t=this._calcRotateMatrix(),e=this._calcTranslateMatrix(),r=i(e,t),o=this._getTransformedDimensions(),s=o.x/2,a=o.y/2;return{tl:n({x:-s,y:-a},r),tr:n({x:s,y:-a},r),bl:n({x:-s,y:a},r),br:n({x:s,y:a},r)}},setCoords:function(t){return this.aCoords=this.calcACoords(),this.lineCoords=this.group?this.aCoords:this.calcLineCoords(),t||(this.oCoords=this.calcOCoords(),this._setCornerCoords&&this._setCornerCoords()),this},_calcRotateMatrix:function(){return t.calcRotateMatrix(this)},_calcTranslateMatrix:function(){var t=this.getCenterPoint();return[1,0,0,1,t.x,t.y]},transformMatrixKey:function(t){var e="_",i="";return!t&&this.group&&(i=this.group.transformMatrixKey(t)+e),i+this.top+e+this.left+e+this.scaleX+e+this.scaleY+e+this.skewX+e+this.skewY+e+this.angle+e+this.originX+e+this.originY+e+this.width+e+this.height+e+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(t){var e=this.calcOwnMatrix();if(t||!this.group)return e;var n=this.transformMatrixKey(t),r=this.matrixCache||(this.matrixCache={});return r.key===n?r.value:(this.group&&(e=i(this.group.calcTransformMatrix(!1),e)),r.key=n,r.value=e,e)},calcOwnMatrix:function(){var e=this.transformMatrixKey(!0),i=this.ownMatrixCache||(this.ownMatrixCache={});if(i.key===e)return i.value;var n=this._calcTranslateMatrix(),r={angle:this.angle,translateX:n[4],translateY:n[5],scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY};return i.key=e,i.value=t.composeMatrix(r),i.value},_getNonTransformedDimensions:function(){var t=this.strokeWidth;return{x:this.width+t,y:this.height+t}},_getTransformedDimensions:function(e,i){void 0===e&&(e=this.skewX),void 0===i&&(i=this.skewY);var n,r,o,s=0===e&&0===i;if(this.strokeUniform?(r=this.width,o=this.height):(r=(n=this._getNonTransformedDimensions()).x,o=n.y),s)return this._finalizeDimensions(r*this.scaleX,o*this.scaleY);var a=t.sizeAfterTransform(r,o,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:e,skewY:i});return this._finalizeDimensions(a.x,a.y)},_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 n(e,t,!0).scalarAdd(2*this.padding)}})}(),k.util.object.extend(k.Object.prototype,{sendToBack:function(){return this.group?k.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?k.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(t){return this.group?k.StaticCanvas.prototype.sendBackwards.call(this.group,this,t):this.canvas&&this.canvas.sendBackwards(this,t),this},bringForward:function(t){return this.group?k.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?k.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 k.Color(e),n=t+": "+i.toRgb()+"; ",r=i.getAlpha();return 1!==r&&(n+=t+"-opacity: "+r.toString()+"; "),n}return t+": none; "}var e=k.util.toFixed;k.util.object.extend(k.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",o=this.strokeDashOffset?this.strokeDashOffset:"0",s=this.strokeLineCap?this.strokeLineCap:"butt",a=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",c=void 0!==this.opacity?this.opacity:"1",h=this.visible?"":" visibility: hidden;",u=e?"":this.getSvgFilter(),f=t("fill",this.fill);return[t("stroke",this.stroke),"stroke-width: ",n,"; ","stroke-dasharray: ",r,"; ","stroke-linecap: ",s,"; ","stroke-dashoffset: ",o,"; ","stroke-linejoin: ",a,"; ","stroke-miterlimit: ",l,"; ",f,"fill-rule: ",i,";
2 ","opacity: ",c,";",u,h].join("")},getSvgSpanStyles:function(e,i){var n="; ",r=e.fontFamily?"font-family: "+(-1===e.fontFamily.indexOf("'")&&-1===e.fontFamily.indexOf('"')?"'"+e.fontFamily+"'":e.fontFamily)+n:"",o=e.strokeWidth?"stroke-width: "+e.strokeWidth+n:"",s=(r=r,e.fontSize?"font-size: "+e.fontSize+"px"+n:""),a=e.fontStyle?"font-style: "+e.fontStyle+n:"",l=e.fontWeight?"font-weight: "+e.fontWeight+n:"",c=e.fill?t("fill",e.fill):"",h=e.stroke?t("stroke",e.stroke):"",u=this.getSvgTextDecoration(e);return u&&(u="text-decoration: "+u+n),[h,o,r,s,a,l,u,c,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="'+k.util.matrixToSVG(i)+(e||"")+'" '},_setSVGBg:function(t){if(this.backgroundColor){var i=k.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(""),o=t.indexOf("COMMON_PARTS");return t[o]=r,i?i(t.join("")):t.join("")},_createBaseSVGMarkup:function(t,e){var i,n,r=(e=e||{}).noStyle,o=e.reviver,s=r?"":'style="'+this.getSvgStyles()+'" ',a=e.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",h=l&&l.absolutePositioned,u=this.stroke,f=this.fill,d=this.shadow,p=[],g=t.indexOf("COMMON_PARTS"),m=e.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+k.Object.__uid++,n='<clipPath id="'+l.clipPathId+'" >\n'+l.toClipPathSVG(o)+"</clipPath>\n"),h&&p.push("<g ",a,this.getSvgCommons()," >\n"),p.push("<g ",this.getSvgTransform(!1),h?"":a+this.getSvgCommons()," >\n"),i=[s,c,r?"":this.addPaintOrder()," ",m?'transform="'+m+'" ':""].join(""),t[g]=i,f&&f.toLive&&p.push(f.toSVG(this)),u&&u.toLive&&p.push(u.toSVG(this)),d&&p.push(d.toSVG(this)),l&&p.push(n),p.push(t.join("")),p.push("</g>\n"),h&&p.push("</g>\n"),o?o(p.join("")):p.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var t=k.util.object.extend,e="stateProperties";function i(e,i,n){var r={};n.forEach((function(t){r[t]=e[t]})),t(e[i],r,!0)}function n(t,e,i){if(t===e)return!0;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0,o=t.length;r<o;r++)if(!n(t[r],e[r]))return!1;return!0}if(t&&"object"==typeof t){var s,a=Object.keys(t);if(!e||"object"!=typeof e||!i&&a.length!==Object.keys(e).length)return!1;for(r=0,o=a.length;r<o;r++)if("canvas"!==(s=a[r])&&"group"!==s&&!n(t[s],e[s]))return!1;return!0}}k.util.object.extend(k.Object.prototype,{hasStateChanged:function(t){var i="_"+(t=t||e);return Object.keys(this[i]).length<this[t].length||!n(this[i],this,!0)},saveState:function(t){var n=t&&t.propertySet||e,r="_"+n;return this[r]?(i(this,r,this[n]),t&&t.stateProperties&&i(this,r,t.stateProperties),this):this.setupState(t)},setupState:function(t){var i=(t=t||{}).propertySet||e;return t.propertySet=i,this["_"+i]={},this.saveState(t),this}})}(),function(){var t=k.util.degreesToRadians;k.util.object.extend(k.Object.prototype,{_findTargetCorner:function(t,e){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var i,n,r,o=t.x,s=t.y,a=Object.keys(this.oCoords),l=a.length-1;for(this.__corner=0;l>=0;l--)if(r=a[l],this.isControlVisible(r)&&(n=this._getImageLines(e?this.oCoords[r].touchCorner:this.oCoords[r].corner),0!==(i=this._findCrossPoints({x:o,y:s},n))&&i%2==1))return this.__corner=r,r;return!1}
vendor: 7,745 bytes, line 2
2,forEachControl:function(t){for(var e in this.controls)t(this.controls[e],e,this)},_setCornerCoords:function(){var t=this.oCoords;for(var e in t){var i=this.controls[e];t[e].corner=i.calcCornerCoords(this.angle,this.cornerSize,t[e].x,t[e].y,!1),t[e].touchCorner=i.calcCornerCoords(this.angle,this.touchCornerSize,t[e].x,t[e].y,!0)}},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,o=i.y+n,s=void 0!==e.hasControls?e.hasControls:this.hasControls,a=!1;return t.save(),t.strokeStyle=e.borderColor||this.borderColor,this._setLineDash(t,e.borderDashArray||this.borderDashArray),t.strokeRect(-r/2,-o/2,r,o),s&&(t.beginPath(),this.forEachControl((function(e,i,n){e.withConnection&&e.getVisibility(n,i)&&(a=!0,t.moveTo(e.x*r,e.y*o),t.lineTo(e.x*r+e.offsetX,e.y*o+e.offsetY))})),a&&t.stroke()),t.restore(),this},drawBordersInGroup:function(t,e,i){i=i||{};var n=k.util.sizeAfterTransform(this.width,this.height,e),r=this.strokeWidth,o=this.strokeUniform,s=this.borderScaleFactor,a=n.x+r*(o?this.canvas.getZoom():e.scaleX)+s,l=n.y+r*(o?this.canvas.getZoom():e.scaleY)+s;return t.save(),this._setLineDash(t,i.borderDashArray||this.borderDashArray),t.strokeStyle=i.borderColor||this.borderColor,t.strokeRect(-a/2,-l/2,a,l),t.restore(),this},drawControls:function(t,e){e=e||{},t.save();var i,n,r=1;return this.canvas&&(r=this.canvas.getRetinaScaling()),t.setTransform(r,0,0,r,0,0),t.strokeStyle=t.fillStyle=e.cornerColor||this.cornerColor,this.transparentCorners||(t.strokeStyle=e.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(t,e.cornerDashArray||this.cornerDashArray),this.setCoords(),this.group&&(i=this.group.calcTransformMatrix()),this.forEachControl((function(r,o,s){n=s.oCoords[o],r.getVisibility(s,o)&&(i&&(n=k.util.transformPoint(n,i)),r.render(t,n.x,n.y,e,s))})),t.restore(),this},isControlVisible:function(t){return this.controls[t]&&this.controls[t].getVisibility(this,t)},setControlVisible:function(t,e){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[t]=e,this},setControlsVisibility:function(t){for(var e in t||(t={}),t)this.setControlVisible(e,t[e]);return this},onDeselect:function(){},onSelect:function(){}})}(),k.util.object.extend(k.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,o=this;return k.util.animate({target:this,startValue:t.left,endValue:this.getCenterPoint().x,duration:this.FX_DURATION,onChange:function(e){t.set("left",e),o.requestRenderAll(),r()},onComplete:function(){t.setCoords(),n()}})},fxCenterObjectV:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,o=this;return k.util.animate({target:this,startValue:t.top,endValue:this.getCenterPoint().y,duration:this.FX_DURATION,onChange:function(e){t.set("top",e),o.requestRenderAll(),r()},onComplete:function(){t.setCoords(),n()}})},fxRemove:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,o=this;return k.util.animate({target:this,startValue:t.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(e){t.set("opacity",e),o.requestRenderAll(),r()},onComplete:function(){o.remove(t),n()}})}}),k.util.object.extend(k.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var t,e,i=[],n=[];for(t in arguments[0])i.push(t);for(var r=0,o=i.length;r<o;r++)t=i[r],e=r!==o-1,n.push(this._animate(t,arguments[0][t],arguments[1],e));return n}return this._animate.apply(this,arguments)},_animate:function(t,e,i,n){var r,o=this;e=e.toString(),i=i?k.util.object.clone(i):{},~t.indexOf(".")&&(r=t.split("."));var s=o.colorProperties.indexOf(t)>-1||r&&o.colorProperties.indexOf(r[1])>-1,a=r?this.get(r[0])[r[1]]:this.get(t);"from"in i||(i.from=a),s||(e=~e.indexOf("=")?a+parseFloat(e.replace("=","")):parseFloat(e));var l={target:this,startValue:i.from,endValue:e,byValue:i.by,easing:i.easing,duration:i.duration,abort:i.abort&&function(t,e,n){return i.abort.call(o,t,e,n)},onChange:function(e,s,a){r?o[r[0]][r[1]]=e:o.set(t,e),n||i.onChange&&i.onChange(e,s,a)},onComplete:function(t,e,r){n||(o.setCoords(),i.onComplete&&i.onComplete(t,e,r))}};return s?k.util.animateColor(l.startValue,l.endValue,l.duration,l):k.util.animate(l)}}),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};function o(t,e){var i=t.origin,n=t.axis1,r=t.axis2,o=t.dimension,s=e.nearest,a=e.center,l=e.farthest;return function(){switch(this.get(i)){case s:return Math.min(this.get(n),this.get(r));case a:return Math.min(this.get(n),this.get(r))+.5*this.get(o);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._setWidthHeight(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){t.beginPath();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},_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 o=e.parseAttributes(t,e.Line.ATTRIBUTE_NAMES),s=[o.x1||0,o.y1||0,o.x2||0,o.y2||0];n(new e.Line(s,i(o,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=e.util.degreesToRadians;e.Circle?e.warn("fabric.Circle is already defined."):(e.Circle=e.util.createClass(e.Object,{type:"circle",radius:0,startAngle:0,endAngle:360,cacheProperties:e.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set
vendor: 5,854 bytes, line 2
2: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)%360;if(0===n)t=["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',this.radius,'" />\n'];else{var r=i(this.startAngle),o=i(this.endAngle),s=this.radius;t=['<path d="M '+e.util.cos(r)*s+" "+e.util.sin(r)*s," A "+s+" "+s," 0 ",+(n>180?"1":"0")+" 1"," "+e.util.cos(o)*s+" "+e.util.sin(o)*s,'" ',"COMMON_PARTS"," />\n"]}return t},_render:function(t){t.beginPath(),t.arc(0,0,this.radius,i(this.startAngle),i(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){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)},_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){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,o=-this.width/2,s=-this.height/2,a=0!==e||0!==i,l=.4477152502;t.beginPath(),t.moveTo(o+e,s),t.lineTo(o+n-e,s),a&&t.bezierCurveTo(o+n-l*e,s,o+n,s+l*i,o+n,s+i),t.lineTo(o+n,s+r-i),a&&t.bezierCurveTo(o+n,s+r-l*i,o+n-l*e,s+r,o+n-e,s+r),t.lineTo(o+e,s+r),a&&t.bezierCurveTo(o+l*e,s+r,o,s+r-l*i,o,s+r-i),t.lineTo(o,s+i),a&&t.bezierCurveTo(o,s+l*i,o+l*e,s,o+e,s),t.closePath(),this._renderPaintInOrder(t)},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 o=e.parseAttributes(t,e.Rect.ATTRIBUTE_NAMES);o.left=o.left||0,o.top=o.top||0,o.height=o.height||0,o.width=o.width||0;var s=new e.Rect(i(r?e.util.object.clone(r):{},o));s.visible=s.visible&&s.width>0&&s.height>0,n(s)},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,o=e.util.toFixed,s=e.util.projectStrokeOnPoints;e.Polyline?e.warn("fabric.Polyline is already defined"):(e.Polyline=e.util.createClass(e.Object,{type:"polyline",points:null,exactBoundingBox:!1,cacheProperties:e.Object.prototype.cacheProperties.concat("points"),initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e),this._setPositionDimensions(e)},_projectStrokeOnPoints:function(){return s(this.points,this,!0)},_setPositionDimensions:function(t){var e,i=this._calcDimensions(t),n=this.exactBoundingBox?this.strokeWidth:0;this.width=i.width-n,this.height=i.height-n,t.fromSVG||(e=this.translateToGivenOrigin({x:i.left-this.strokeWidth/2+n/2,y:i.top-this.strokeWidth/2+n/2},"left","top",this.originX,this.originY)),void 0===t.left&&(this.left=t.fromSVG?i.left
vendor: 5,549 bytes, line 2
2:e.x),void 0===t.top&&(this.top=t.fromSVG?i.top:e.y),this.pathOffset={x:i.left+this.width/2+n/2,y:i.top+this.height/2+n/2}},_calcDimensions:function(){var t=this.exactBoundingBox?this._projectStrokeOnPoints():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.y,r=e.Object.NUM_FRACTION_DIGITS,s=0,a=this.points.length;s<a;s++)t.push(o(this.points[s].x-i,r),",",o(this.points[s].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 o=0;o<i;o++)e=this.points[o],t.lineTo(e.x-n,e.y-r);return!0},_render:function(t){this.commonRender(t)&&this._renderPaintInOrder(t)},complexity:function(){return this.get("points").length}}),e.Polyline.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polyline.fromElementGenerator=function(t){return function(n,r,o){if(!n)return r(null);o||(o={});var s=e.parsePointsAttribute(n.getAttribute("points")),a=e.parseAttributes(n,e[t].ATTRIBUTE_NAMES);a.fromSVG=!0,r(new e[t](s,i(a,o)))}},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={}),i=e.util.projectStrokeOnPoints;e.Polygon?e.warn("fabric.Polygon is already defined"):(e.Polygon=e.util.createClass(e.Polyline,{type:"polygon",_projectStrokeOnPoints:function(){return i(this.points,this)},_render:function(t){this.commonRender(t)&&(t.closePath(),this._renderPaintInOrder(t))}}),e.Polygon.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polygon.fromElement=e.Polyline.fromElementGenerator("Polygon"),e.Polygon.fromObject=function(t,i){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,o=e.util.object.clone,s=e.util.toFixed;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,e){delete(e=o(e||{})).path,this.callSuper("initialize",e),this._setPath(t||[],e)},_setPath:function(t,i){this.path=e.util.makePathSimpler(Array.isArray(t)?t:e.util.parsePath(t)),e.Polyline.prototype._setPositionDimensions.call(this,i||{})},_renderPathCommands:function(t){var e,i=0,n=0,r=0,o=0,s=0,a=0,l=-this.pathOffset.x,c=-this.pathOffset.y;t.beginPath();for(var h=0,u=this.path.length;h<u;++h)switch((e=this.path[h])[0]){case"L":r=e[1],o=e[2],t.lineTo(r+l,o+c);break;case"M":i=r=e[1],n=o=e[2],t.moveTo(r+l,o+c);break;case"C":r=e[5],o=e[6],s=e[3],a=e[4],t.bezierCurveTo(e[1]+l,e[2]+c,s+l,a+c,r+l,o+c);break;case"Q":t.quadraticCurveTo(e[1]+l,e[2]+c,e[3]+l,e[4]+c),r=e[3],o=e[4],s=e[1],a=e[2];break;case"z":case"Z":r=i,o=n,t.closePath()}},_render:function(t){this._renderPathCommands(t),this._renderPaintInOrder(t)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+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="',e.util.joinPath(this.path),'" stroke-linecap="round" ',"/>\n"]},_getOffsetTransform:function(){var t=e.Object.NUM_FRACTION_DIGITS;return" translate("+s(-this.pathOffset.x,t)+", "+s(-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},_calcDimensions:function(){for(var t,r,o=[],s=[],a=0,l=0,c=0,h=0,u=0,f=this.path.length;u<f;++u){switch((t=this.path[u])[0]){case"L":c=t[1],h=t[2],r=[];break;case"M":a=c=t[1],l=h=t[2],r=[];break;case"C":r=e.util.getBoundsOfCurve(c,h,t[1],t[2],t[3],t[4],t[5],t[6]),c=t[5],h=t[6];break;case"Q":r=e.util.getBoundsOfCurve(c,h,t[1],t[2],t[1],t[2],t[3],t[4]),c=t[3],h=t[4];break;case"z":case"Z":c=a,h=l}r.forEach((function(t){o.push(t.x),s.push(t.y)})),o.push(c),s.push(h)}var d=i(o)||0,p=i(s)||0;return{left:d,top:p,width:(n(o)||0)-d,height:(n(s)||0)-p}}}),e.Path.fromObject=function(t,i){if("string"==typeof t.sourcePath){var n=t.sourcePath;e.loadSVGFromURL(n,(function(n){var r=n[0];r.setOptions(t),t.clipPath?e.util.enlivenObjects([t.clipPath],(function(t){r.clipPath=t[0],i&&i(r)})):i&&i(r)}))}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 o=e.parseAttributes(t,e.Path.ATTRIBUTE_NAMES);o.fromSVG=!0,i(new e.Path(o.d,r(o,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,
vendor: 15,031 bytes, line 2
2i){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(true)},_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)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(t){var i=!!this.group;return this._restoreObjectsState(),e.util.resetObjectTransform(this),t&&(i&&e.util.removeTransformFromObject(t,this.group.calcTransformMatrix()),this._objects.push(t),t.group=this,t._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.dirty=!0,i?this.group.addWithUpdate():this.setCoords(),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.filter((function(t){return!t.excludeFromExport})).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 o=e.Object.prototype.toDatalessObject.call(this,t);return o.objects=i,o},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,this.clipPath)},isCacheDirty:function(t){if(this.callSuper("isCacheDirty",t))return!0;if(!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(){var t=this.calcOwnMatrix();return this._objects.forEach((function(i){e.util.addTransformToObject(i,t),delete i.group,i.setCoords()})),this},destroy:function(){return this._objects.forEach((function(t){t.set("dirty",!0)})),this._restoreObjectsState()},dispose:function(){this.callSuper("dispose"),this.forEachObject((function(t){t.dispose&&t.dispose()})),this._objects=[]},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(true)})),this},_calcBounds:function(t){for(var e,i,n,r,o=[],s=[],a=["tr","br","bl","tl"],l=0,c=this._objects.length,h=a.length;l<c;++l){for(n=(e=this._objects[l]).calcACoords(),r=0;r<h;r++)i=a[r],o.push(n[i].x),s.push(n[i].y);e.aCoords=n}this._getBounds(o,s,t)},_getBounds:function(t,r,o){var s=new e.Point(i(t),i(r)),a=new e.Point(n(t),n(r)),l=s.y||0,c=s.x||0,h=a.x-s.x||0,u=a.y-s.y||0;this.width=h,this.height=u,o||this.setPositionByOrigin({x:c,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.enlivenObjectEnlivables(t,r,(function(){i&&i(new e.Group(n,r,!0))}))})):e.loadSVGFromURL(n,(function(o){var s=e.util.groupSVGElements(o,t,n),a=r.clipPath;delete r.clipPath,s.set(r),a?e.util.enlivenObjects([a],(function(t){s.clipPath=t[0],i&&i(s)})):i&&i(s)}))})}(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,void 0===(i=i||{}).hasControls&&(i.hasControls=!1),i.forActiveSelection=!0;for(var n=0,r=this._objects.length;n<r;n++)this._objects[n]._renderControls(t,i);this.callSuper("_renderControls",t,e),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=k.util.object.extend;t.fabric||(t.fabric={}),t.fabric.Image?k.warn("fabric.Image is already defined."):(k.Image=k.util.createClass(k.Object,{type:"image",strokeWidth:0,srcFromAttribute:!1,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:k.Object.prototype.stateProperties.concat("cropX","cropY"),cacheProperties:k.Object.prototype.cacheProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,imageSmoothing:!0,initialize:function(t,e){e||(e={}),this.filters=[],this.cacheKey="texture"+k.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=k.filterBackend;e&&e.evictCachesForKey&&e.evictCachesForKey(t)},dispose:function(){this.callSuper("dispose"),this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(function(t){k.util.cleanUpJsdomNode(this[t]),this[t]=void 0}.bind(this))},getCrossOrigin:function(){return this._originalElement&&(this._originalElement.crossOrigin||null)},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()}},toObject:function(t){var i=[];this.filters.forEach((function(t){t&&i.push(t.toObject())}));var n=e(this.callSuper("toObject",["cropX","cropY"].concat(t)),{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),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._element,r=-this.width/2,o=-this.height/2,s="",a="";if(!n)return[];if(this.hasCrop()){var l=k.Object.__uid++;e.push('<clipPath id="imageCrop_'+l+'">\n','\t<rect x="'+r+'" y="'+o+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),s=' clip-path="url(#imageCrop_'+l+')" '}if(this.imageSmoothing||(a='" image-rendering="optimizeSpeed'),i.push("\t<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',r-this.cropX,'" y="',o-this.cropY,'" width="',n.width||n.naturalWidth,'" height="',n.height||n.height,a,'"',s,"></image>\n"),this.stroke||this.strokeDashArray){var c=this.fill;this.fill=null,t=["\t<rect ",'x="',r,'" y="',o,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'],this.fill=c}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 k.util.loadImage(t,(function(t,n){this.setElement(t,i),this._setWidthHeight(),e&&e(this,n)}),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,o=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!t||n>e&&r>e)return this._element=o,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=n,void(this._lastScaleY=r);k.filterBackend||(k.filterBackend=k.initFilterBackend());var s=k.util.createCanvasElement(),a=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=o.width,c=o.height;s.width=l,s.height=c,this._element=s,this._lastScaleX=t.scaleX=n,this._lastScaleY=t.scaleY=r,k.filterBackend.applyFilters([t],o,l,c,this._element,a),this._filterScalingX=s.width/this._originalElement.width,this._filterScalingY=s.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=k.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 k.filterBackend||(k.filterBackend=k.initFilterBackend()),k.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){k.util.setImageSmoothing(t,this.imageSmoothing),!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(t),this._renderPaintInOrder(t)},drawCacheOnCanvas:function(t){k.util.setImageSmoothing(t,this.imageSmoothing),k.Object.prototype.drawCacheOnCanvas.call(this,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,o=this.height,s=Math.min,a=Math.max,l=a(this.cropX,0),c=a(this.cropY,0),h=e.naturalWidth||e.width,u=e.naturalHeight||e.height,f=l*i,d=c*n,p=s(r*i,h-f),g=s(o*n,u-d),m=-r/2,v=-o/2,y=s(r,h/i-l),b=s(o,u/n-c);e&&t.drawImage(e,f,d,p,g,m,v,y,b)}},_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(k.util.getById(t),e),k.util.addClass(this.getElement(),k.Image.CSS_CANVAS)},_initConfig:function(t){t||(t={}),this.setOptions(t),this._setWidthHeight(t)},_initFilters:function(t,e){t&&t.length?k.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=k.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),i=this._element.width,n=this._element.height,r=1,o=1,s=0,a=0,l=0,c=0,h=this.width,u=this.height,f={width:h,height:u};return!e||"none"===e.alignX&&"none"===e.alignY?(r=h/i,o=u/n):("meet"===e.meetOrSlice&&(t=(h-i*(r=o=k.util.findScaleToFit(this._element,f)))/2,"Min"===e.alignX&&(s=-t),"Max"===e.alignX&&(s=t),t=(u-n*o)/2,"Min"===e.alignY&&(a=-t),"Max"===e.alignY&&(a=t)),"slice"===e.meetOrSlice&&(t=i-h/(r=o=k.util.findScaleToCover(this._element,f)),"Mid"===e.alignX&&(l=t/2),"Max"===e.alignX&&(l=t),t=n-u/o,"Mid"===e.alignY&&(c=t/2),"Max"===e.alignY&&(c=t),i=h/r,n=u/o)),{width:i,height:n,scaleX:r,scaleY:o,offsetLeft:s,offsetTop:a,cropX:l,cropY:c}}}),k.Image.CSS_CANVAS="canvas-img",k.Image.prototype.getSvgSrc=k.Image.prototype.getSrc,k.Image.fromObject=function(t,e){var i=k.util.object.clone(t);k.util.loadImage(i.src,(function(t,n){n?e&&e(null,!0):k.Image.prototype._initFilters.call(i,i.filters,(function(n){i.filters=n||[],k.Image.prototype._initFilters.call(i,[i.resizeFilter],(function(n){i.resizeFilter=n[0],k.util.enlivenObjectEnlivables(i,i,(function(){var n=new k.Image(t,i);e(n,!1)}))}))}))}),null,i.crossOrigin)}
vendor: 4,213 bytes, line 2
2,k.Image.fromURL=function(t,e,i){k.util.loadImage(t,(function(t,n){e&&e(new k.Image(t,i),n)}),null,i&&i.crossOrigin)},k.Image.ATTRIBUTE_NAMES=k.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),k.Image.fromElement=function(t,i,n){var r=k.parseAttributes(t,k.Image.ATTRIBUTE_NAMES);k.Image.fromURL(r["xlink:href"],i,e(n?k.util.object.clone(n):{},r))})}(e),k.util.object.extend(k.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())},fxStraighten:function(t){var e=function(){},i=(t=t||{}).onComplete||e,n=t.onChange||e,r=this;return k.util.animate({target:this,startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){r.rotate(t),n()},onComplete:function(){r.setCoords(),i()}})}}),k.util.object.extend(k.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.requestRenderAllBound})}}),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()}k.isWebglSupported=function(e){if(k.isLikelyNode)return!1;e=e||k.WebglFilterBackend.prototype.tileSize;var i=document.createElement("canvas"),n=i.getContext("webgl")||i.getContext("experimental-webgl"),r=!1;if(n){k.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),r=k.maxTextureSize>=e;for(var o=["highp","mediump","lowp"],s=0;s<3;s++)if(t(n,o[s])){k.webGlPrecision=o[s];break}}return this.isSupported=r,r},k.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,o="undefined"!=typeof Uint8ClampedArray;if(n&&i&&r&&o){var s=k.util.createCanvasElement(),a=new ArrayBuffer(t*e*4);if(k.forceGLPutImageData)return this.imageBuffer=a,void(this.copyGLTo2D=F);var l,c,h={imageBuffer:a,destinationWidth:t,destinationHeight:e,targetCanvas:s};s.width=t,s.height=e,l=window.performance.now(),D.call(h,this.gl,h),c=window.performance.now()-l,l=window.performance.now(),F.call(h,this.gl,h),c>window.performance.now()-l?(this.imageBuffer=a,this.copyGLTo2D=F):this.copyGLTo2D=D}},createWebGLCanvas:function(t,e){var i=k.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,o){var s,a=this.gl;o&&(s=this.getCachedTexture(o,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,!s&&e),targetTexture:this.createTexture(a,i,n),originalTexture:s||this.createTexture(a,i,n,!s&&e),passes:t.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:r},c=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,c),t.forEach((function(t){t&&t.applyTo(l)})),function(t){var e=t.targetCanvas,i=e.width,n=e.height,r=t.destinationWidth,o=t.destinationHeight;i===r&&n===o||(e.width=r,e.height=o)}(l),this.copyGLTo2D(a,l),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(l.sourceTexture),a.deleteTexture(l.targetTexture),a.deleteFramebuffer(c),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={}}
vendor: 18,373 bytes, line 2
2,createTexture:function(t,e,i,n,r){var o=t.createTexture();return t.bindTexture(t.TEXTURE_2D,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,r||t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r||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),o},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:D,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(){}k.Canvas2dFilterBackend=e,e.prototype={evictCachesForKey:t,dispose:t,clearWebGLCaches:t,resources:{},applyFilters:function(t,e,i,n,r){var o=r.getContext("2d");o.drawImage(e,0,0,i,n);var s={sourceWidth:i,sourceHeight:n,imageData:o.getImageData(0,0,i,n),originalEl:e,originalImageData:o.getImageData(0,0,i,n),canvasEl:r,ctx:o,filterBackend:this};return t.forEach((function(t){t.applyTo(s)})),s.imageData.width===i&&s.imageData.height===n||(r.width=s.imageData.width,r.height=s.imageData.height),o.putImageData(s.imageData,0,0),s}}}(),k.Image=k.Image||{},k.Image.filters=k.Image.filters||{},k.Image.filters.BaseFilter=k.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"!==k.webGlPrecision&&(e=e.replace(/precision highp float/g,"precision "+k.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 o=t.createProgram();if(t.attachShader(o,n),t.attachShader(o,r),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+t.getProgramInfoLog(o));var s=this.getAttributeLocations(t,o),a=this.getUniformLocations(t,o)||{};return a.uStepW=t.getUniformLocation(o,"uStepW"),a.uStepH=t.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:s,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=k.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()}}),k.Image.filters.BaseFilter.fromObject=function(t,e){var i=new k.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,o,s=t.imageData.data,a=s.length,l=this.matrix,c=this.colorsOnly;for(o=0;o<a;o+=4)e=s[o],i=s[o+1],n=s[o+2],c?(s[o]=e*l[0]+i*l[1]+n*l[2]+255*l[4],s[o+1]=e*l[5]+i*l[6]+n*l[7]+255*l[9],s[o+2]=e*l[10]+i*l[11]+n*l[12]+255*l[14]):(r=s[o+3],s[o]=e*l[0]+i*l[1]+n*l[2]+r*l[3]+255*l[4],s[o+1]=e*l[5]+i*l[6]+n*l[7]+r*l[8]+255*l[9],s[o+2]=e*l[10]+i*l[11]+n*l[12]+r*l[13]+255*l[14],s[o+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,o,s,a,l,c,h,u,f,d,p=t.imageData,g=p.data,m=this.matrix,v=Math.round(Math.sqrt(m.length)),y=Math.floor(v/2),b=p.width,_=p.height,w=t.ctx.createImageData(b,_),x=w.data,C=this.opaque?1:0;for(u=0;u<_;u++)for(h=0;h<b;h++){for(o=4*(u*b+h),e=0,i=0,n=0,r=0,d=0;d<v;d++)for(f=0;f<v;f++)s=h+f-y,(a=u+d-y)<0||a>=_||s<0||s>=b||(l=4*(a*b+s),c=m[d*v+f],e+=g[l]*c,i+=g[l+1]*c,n+=g[l+2]*c,C||(r+=g[l+3]*c));x[o]=e,x[o+1]=i,x[o+2]=n,x[o+3]=C?g[o+3]:r}t.imageData=w},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,o=this.mode;for(e=0;e<r;e+=4)"average"===o?i=(n[e]+n[e+1]+n[e+2])/3:"lightness"===o?i=(Math.min(n[e],n[e+1],n[e+2])+Math.max(n[e],n[e+1],n[e+2]))/2:"luminosity"===o&&(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,o=this.noise;for(e=0,r=n.length;e<r;e+=4)i=(.5-Math.random())*o,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}
2",applyTo2d:function(t){var e,i,n,r,o,s,a,l,c,h,u,f=t.imageData,d=f.data,p=f.height,g=f.width;for(i=0;i<p;i+=this.blocksize)for(n=0;n<g;n+=this.blocksize)for(r=d[e=4*i*g+4*n],o=d[e+1],s=d[e+2],a=d[e+3],h=Math.min(i+this.blocksize,p),u=Math.min(n+this.blocksize,g),l=i;l<h;l++)for(c=n;c<u;c++)d[e=4*l*g+4*c]=r,d[e+1]=o,d[e+2]=s,d[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,o,s=t.imageData.data,a=255*this.distance,l=new e.Color(this.color).getSource(),c=[l[0]-a,l[1]-a,l[2]-a],h=[l[0]+a,l[1]+a,l[2]+a];for(i=0;i<s.length;i+=4)n=s[i],r=s[i+1],o=s[i+2],n>c[0]&&r>c[1]&&o>c[2]&&n<h[0]&&r<h[1]&&o<h[2]&&(s[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),o=[0+n[0]/255-r,0+n[1]/255-r,0+n[2]/255-r,1],s=[n[0]/255+r,n[1]/255+r,n[2]/255+r,1];t.uniform4fv(i.uLow,o),t.uniform4fv(i.uHigh,s)},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 o in r)i[o]=n(i.ColorMatrix,{type:o,matrix:r[o],mainParameter:!1,colorsOnly:!0}),e.Image.filters[o].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,o,s,a,l,c=t.imageData.data,h=c.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 f=0;f<h;f+=4)switch(o=c[f],s=c[f+1],a=c[f+2],this.mode){case"multiply":c[f]=o*i/255,c[f+1]=s*n/255,c[f+2]=a*r/255;break;case"screen":c[f]=255-(255-o)*(255-i)/255,c[f+1]=255-(255-s)*(255-n)/255,c[f+2]=255-(255-a)*(255-r)/255;break;case"add":c[f]=o+i,c[f+1]=s+n,c[f+2]=a+r;break;case"diff":case"difference":c[f]=Math.abs(o-i),c[f+1]=Math.abs(s-n),c[f+2]=Math.abs(a-r);break;case"subtract":c[f]=o-i,c[f+1]=s-n,c[f+2]=a-r;break;case"darken":c[f]=Math.min(o,i),c[f+1]=Math.min(s,n),c[f+2]=Math.min(a,r);break;case"lighten":c[f]=Math.max(o,i),c[f+1]=Math.max(s,n),c[f+2]=Math.max(a,r);break;case"overlay":c[f]=i<128?2*o*i/255:255-2*(255-o)*(255-i)/255,c[f+1]=n<128?2*s*n/255:255-2*(255-s)*(255-n)/255,c[f+2]=r<128?2*a*r/255:255-2*(255-a)*(255-r)/255;break;case"exclusion":c[f]=i+o-2*i*o/255,c[f+1]=n+s-2*n*s/255,c[f+2]=r+a-2*r*a/255;break;case"tint":c[f]=i+o*u,c[f+1]=n+s*u,c[f+2]=r+a*u
vendor: 2,212 bytes, line 2
2}},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,o,
vendor: 14,790 bytes, line 2
2s,a,l,c,h,u,f,d=t.imageData,p=t.filterBackend.resources,g=d.data,m=g.length,v=d.width,y=d.height,b=this.image;p.blendImage||(p.blendImage=e.util.createCanvasElement()),u=(h=p.blendImage).getContext("2d"),h.width!==v||h.height!==y?(h.width=v,h.height=y):u.clearRect(0,0,v,y),u.setTransform(b.scaleX,0,0,b.scaleY,b.left,b.top),u.drawImage(b._element,0,0,v,y),f=u.getImageData(0,0,v,y).data;for(var _=0;_<m;_+=4)switch(s=g[_],a=g[_+1],l=g[_+2],c=g[_+3],i=f[_],n=f[_+1],r=f[_+2],o=f[_+3],this.mode){case"multiply":g[_]=s*i/255,g[_+1]=a*n/255,g[_+2]=l*r/255,g[_+3]=c*o/255;break;case"mask":g[_+3]=o}},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,o=Math.abs,s=Math.round,a=Math.sin,l=Math.ceil,c=e.Image.filters,h=e.util.createClass;c.Resize=h(c.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,o=e.width,a=e.height,l=s(o*i),c=s(a*n);"sliceHack"===this.resizeType?r=this.sliceByTwo(t,o,a,l,c):"hermite"===this.resizeType?r=this.hermiteFastResize(t,o,a,l,c):"bilinear"===this.resizeType?r=this.bilinearFiltering(t,o,a,l,c):"lanczos"===this.resizeType&&(r=this.lanczosResize(t,o,a,l,c)),t.imageData=r},sliceByTwo:function(t,i,r,o,s){var a,l,c=t.imageData,h=.5,u=!1,f=!1,d=i*h,p=r*h,g=e.filterBackend.resources,m=0,v=0,y=i,b=0;for(g.sliceByTwo||(g.sliceByTwo=document.createElement("canvas")),((a=g.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(c,0,0),o=n(o),s=n(s);!u||!f;)i=d,r=p,o<n(d*h)?d=n(d*h):(d=o,u=!0),s<n(p*h)?p=n(p*h):(p=s,f=!0),l.drawImage(a,m,v,i,r,y,b,d,p),m=y,v=b,b+=p;return l.getImageData(m,v,o,s)},lanczosResize:function(t,e,s,a,c){var h=t.imageData.data,u=t.ctx.createImageData(a,c),f=u.data,d=this.lanczosCreate(this.lanczosLobes),p=this.rcpScaleX,g=this.rcpScaleY,m=2/this.rcpScaleX,v=2/this.rcpScaleY,y=l(p*this.lanczosLobes/2),b=l(g*this.lanczosLobes/2),_={},w={},x={};return function t(l){var C,S,T,O,E,A,k,P,D,F,j;for(w.x=(l+.5)*p,x.x=n(w.x),C=0;C<c;C++){for(w.y=(C+.5)*g,x.y=n(w.y),E=0,A=0,k=0,P=0,D=0,S=x.x-y;S<=x.x+y;S++)if(!(S<0||S>=e)){F=n(1e3*o(S-w.x)),_[F]||(_[F]={});for(var I=x.y-b;I<=x.y+b;I++)I<0||I>=s||(j=n(1e3*o(I-w.y)),_[F][j]||(_[F][j]=d(r(i(F*m,2)+i(j*v,2))/1e3)),(T=_[F][j])>0&&(E+=T,A+=T*h[O=4*(I*e+S)],k+=T*h[O+1],P+=T*h[O+2],D+=T*h[O+3]))}f[O=4*(C*a+l)]=A/E,f[O+1]=k/E,f[O+2]=P/E,f[O+3]=D/E}return++l<a?t(l):u}(0)},bilinearFiltering:function(t,e,i,r,o){var s,a,l,c,h,u,f,d,p,g=0,m=this.rcpScaleX,v=this.rcpScaleY,y=4*(e-1),b=t.imageData.data,_=t.ctx.createImageData(r,o),w=_.data;for(l=0;l<o;l++)for(c=0;c<r;c++)for(h=m*c-(s=n(m*c)),u=v*l-(a=n(v*l)),p=4*(a*e+s),f=0;f<4;f++)d=b[p+f]*(1-h)*(1-u)+b[p+4+f]*h*(1-u)+b[p+y+f]*u*(1-h)+b[p+y+4+f]*h*u,w[g++]=d;return _},hermiteFastResize:function(t,e,i,s,a){for(var c=this.rcpScaleX,h=this.rcpScaleY,u=l(c/2),f=l(h/2),d=t.imageData.data,p=t.ctx.createImageData(s,a),g=p.data,m=0;m<a;m++)for(var v=0;v<s;v++){for(var y=4*(v+m*s),b=0,_=0,w=0,x=0,C=0,S=0,T=0,O=(m+.5)*h,E=n(m*h);E<(m+1)*h;E++)for(var A=o(O-(E+.5))/f,k=(v+.5)*c,P=A*A,D=n(v*c);D<(v+1)*c;D++){var F=o(k-(D+.5))/u,j=r(P+F*F);j>1&&j<-1||(b=2*j*j*j-3*j*j+1)>0&&(T+=b*d[(F=4*(D+E*e))+3],w+=b,d[F+3]<255&&(b=b*d[F+3]/250),x+=b*d[F],C+=b*d[F+1],S+=b*d[F+2],_+=b)}g[y]=x/_,g[y+1]=C/_,g[y+2]=S/_,g[y+3]=T/w}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),o=259*(r+255)/(255*(259-r));for(e=0;e<n;e+=4)i[e]=o*(i[e]-128)+128,i[e+1]=o*(i[e+1]-128)+128,i[e+2]=o*(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,o=-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])*o:0,n[e+1]+=i!==n[e+1]?(i-n[e+1])*o:0,n[e+2]+=i!==n[e+2]?(i-n[e+2])*o: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.Vibrance=n(i.BaseFilter,{type:"Vibrance",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uVibrance;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat max = max(color.r, max(color.g, color.b));\nfloat avg = (color.r + color.g + color.b) / 3.0;\nfloat amt = (abs(max - avg) * 2.0) * uVibrance;\ncolor.r += max != color.r ? (max - color.r) * amt : 0.00;\ncolor.g += max != color.g ? (max - color.g) * amt : 0.00;\ncolor.b += max != color.b ? (max - color.b) * amt : 0.00;\ngl_FragColor = color;\n}",vibrance:0,mainParameter:"vibrance",applyTo2d:function(t){if(0!==this.vibrance){var e,i,n,r,o=t.imageData.data,s=o.length,a=-this.vibrance;for(e=0;e<s;e+=4)i=Math.max(o[e],o[e+1],o[e+2]),n=(o[e]+o[e+1]+o[e+2])/3,r=2*Math.abs(i-n)/255*a,o[e]+=i!==o[e]?(i-o[e])*r:0,o[e+1]+=i!==o[e+1]?(i-o[e+1])*r:0,o[e+2]+=i!==o[e+2]?(i-o[e+2])*r:0}},getUniformLocations:function(t,e){return{uVibrance:t.getUniformLocation(e,"uVibrance")}},sendUniformData:function(t,e){t.uniform1f(e.uVibrance,-this.vibrance)}}),e.Image.filters.Vibrance.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,o=t.imageData.width,s=t.imageData.height;r.blurLayer1||(r.blurLayer1=e.util.createCanvasElement(),r.blurLayer2=e.util.createCanvasElement()),i=r.blurLayer1,n=r.blurLayer2,i.width===o&&i.height===s||(n.width=i.width=o,n.height=i.height=s);var a,l,c,h,u=i.getContext("2d"),f=n.getContext("2d"),d=15,p=.06*this.blur*.5;for(u.putImageData(t.imageData,0,0),f.clearRect(0,0,o,s),h=-15;h<=d;h++)c=p*(l=h/d)*o+(a=(Math.random()-.5)/4),f.globalAlpha=1-Math.abs(l),f.drawImage(i,c,a),u.drawImage(n,0,0),f.globalAlpha=1,f.clearRect(0,0,n.width,n.height);for(h=-15;h<=d;h++)c=p*(l=h/d)*s+(a=(Math.random()-.5)/4),f.globalAlpha=1-Math.abs(l),f.drawImage(i,a,c),u.drawImage(n,0,0),f.globalAlpha=1,f.clearRect(0,0,n.width,n.height);t.ctx.drawImage(i,0,0);var g=t.ctx.getImageData(0,0,i.width,i.height);return u.globalAlpha=1,u.clearRect(0,0,i.width,i.height),g},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,o=1/n[0],s=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,o),this.gVals[e]=255*Math.pow(e/255,s),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=1/3,o=Math.sqrt(r)*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[
vendor: 4,388 bytes, line 2
21]=r*s-o,this.matrix[2]=r*s+o,this.matrix[5]=r*s+o,this.matrix[6]=i+r*s,this.matrix[7]=r*s-o,this.matrix[10]=r*s-o,this.matrix[11]=r*s+o,this.matrix[12]=i+r*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;if(e.Text)e.warn("fabric.Text is already defined");else{var n="fontFamily fontWeight fontSize text underline overline linethrough textAlign fontStyle lineHeight textBackgroundColor charSpacing styles direction path pathStartOffset pathSide pathAlign".split(" ");e.Text=e.util.createClass(e.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles","path","pathStartOffset","pathSide","pathAlign"],_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(n),cacheProperties:e.Object.prototype.cacheProperties.concat(n),stroke:null,shadow:null,path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,direction:"ltr",_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.path&&this.setPathInfo(),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},setPathInfo:function(){var t=this.path;t&&(t.segmentsInfo=e.util.getPathSegmentsInfo(t.path))},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(){if(!this.__skipDimension){if(this._splitText(),this._clearCache(),this.path){var t=1.1*this.getHeightOfLine(0);this.width=this.path.width+t,this.height=this.path.height+t}else this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight();-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.saveState({propertySet:"_dimensionAffectingProps"})}},enlargeSpaces:function(){for(var t,e,i,n,r,o,s,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&&(s=this.textLines[a].match(this._reSpacesAndTabs)))){i=s.length,t=(this.width-e)/i;for(var c=0,h=r.length;c<=h;c++)o=this.__charBounds[a][c],this._reSpaceAndTab.test(r[c])?(o.width+=t,o.kernedWidth+=t,o.left+=n,n+=t):o.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){var e=this.path;e&&!e.isNotVisible()&&e._render(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))}
vendor: 4,745 bytes, line 2
2,_setTextStyles:function(t,e,i){if(t.textBaseline="alphabetic",this.path)switch(this.pathAlign){case"center":t.textBaseline="middle";break;case"ascender":t.textBaseline="top";break;case"descender":t.textBaseline="bottom"}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,o){this._renderChars(t,e,i,n,r,o)},_renderTextLinesBackground:function(t){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var e,i,n,r,o,s,a,l=t.fillStyle,c=this._getLeftOffset(),h=this._getTopOffset(),u=0,f=0,d=this.path,p=0,g=this._textLines.length;p<g;p++)if(e=this.getHeightOfLine(p),this.textBackgroundColor||this.styleHas("textBackgroundColor",p)){n=this._textLines[p],i=this._getLineLeftOffset(p),f=0,u=0,r=this.getValueOfPropertyAt(p,0,"textBackgroundColor");for(var m=0,v=n.length;m<v;m++)o=this.__charBounds[p][m],s=this.getValueOfPropertyAt(p,m,"textBackgroundColor"),d?(t.save(),t.translate(o.renderLeft,o.renderTop),t.rotate(o.angle),t.fillStyle=s,s&&t.fillRect(-o.width/2,-e/this.lineHeight*(1-this._fontSizeFraction),o.width,e/this.lineHeight),t.restore()):s!==r?(a=c+i+u,"rtl"===this.direction&&(a=this.width-a-f),t.fillStyle=r,r&&t.fillRect(a,h,f,e/this.lineHeight),u=o.left,f=o.width,r=s):f+=o.kernedWidth;s&&!d&&(a=c+i+u,"rtl"===this.direction&&(a=this.width-a-f),t.fillStyle=s,t.fillRect(a,h,f,e/this.lineHeight)),h+=e}else h+=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]},_measureChar:function(t,e,i,n){var r,o,s,a,l=this.getFontCache(e),c=i+t,h=this._getFontDeclaration(e)===this._getFontDeclaration(n),u=e.fontSize/this.CACHE_FONT_SIZE;if(i&&void 0!==l[i]&&(s=l[i]),void 0!==l[t]&&(a=r=l[t]),h&&void 0!==l[c]&&(a=(o=l[c])-s),void 0===r||void 0===s||void 0===o){var f=this.getMeasuringContext();this._setTextStyles(f,e,!0)}return void 0===r&&(a=r=f.measureText(t).width,l[t]=r),void 0===s&&h&&i&&(s=f.measureText(i).width,l[i]=s),h&&void 0===o&&(o=f.measureText(c).width,l[c]=o,a=o-s),{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 i,n,r,o,s,a,l=0,c=this._textLines[t],h=new Array(c.length),u=0,f=this.path,d="right"===this.pathSide;for(this.__charBounds[t]=h,i=0;i<c.length;i++)n=c[i],o=this._getGraphemeBox(n,t,i,r),h[i]=o,l+=o.kernedWidth,r=n;if(h[i]={left:o?o.left+o.width:0,width:0,kernedWidth:0,height:this.fontSize},f){switch(a=f.segmentsInfo[f.segmentsInfo.length-1].length,(s=e.util.getPointOnPath(f.path,0,f.segmentsInfo)).x+=f.pathOffset.x,s.y+=f.pathOffset.y,this.textAlign){case"left":u=d?a-l:0;break;case"center":u=(a-l)/2;break;case"right":u=d?0:a-l}for(u+=this.pathStartOffset*(d?-1:1),i=d?c.length-1:0;d?i>=0:i<c.length;d?i--:i++)o=h[i],u>a?u%=a:u<0&&(u+=a),this._setGraphemeOnPath(u,o,s),u+=o.kernedWidth}return{width:l,numOfSpaces:0}},_setGraphemeOnPath:function(t,i,n){var r=t+i.kernedWidth/2,o=this.path,s=e.util.getPointOnPath(o.path,r,o.segmentsInfo);i.renderLeft=s.x-n.x,i.renderTop=s.y-n.y,i.angle=s.angle+("right"===this.pathSide?Math.PI:0)},_getGraphemeBox:function(t,e,i,n,r){var o,s=this.getCompleteStyleDeclaration(e,i),a=n?this.getCompleteStyleDeclaration(e,i-1):{},l=this._measureChar(t,s,n,a),c=l.kernedWidth,h=l.width;0!==this.charSpacing&&(h+=o=this._getWidthOfCharSpacing(),c+=o);var u={width:h,left:0,height:s.fontSize,kernedWidth:c,deltaY:s.deltaY};if(i>0&&!r){var f=this.__charBounds[e][i-1];u.left=f.left+f.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"ltr"===this.direction?-this.width/2:this.width/2},_getTopOffset:function(){return-this.height/2},_renderTextCommon:function(t,e){t.save();for(var i=0,n=this._getLeftOffset(),r=this._getTopOffset(),o=0,s=this._textLines.length;o<s;o++){var a=this.getHeightOfLine(o),l=a/this.lineHeight,c=this._getLineLeftOffset(o);this._renderTextLine(e,t,this._textLines[o],n+c,r+i+l,o),i+=a}
vendor: 4,289 bytes, line 2
2t.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,i,n,r,o,s){var a,l,c,h,u,f=this.getHeightOfLine(s),d=-1!==this.textAlign.indexOf("justify"),p="",g=0,m=this.path,v=!d&&0===this.charSpacing&&this.isEmptyStyles(s)&&!m,y="ltr"===this.direction,b="ltr"===this.direction?1:-1,_=i.canvas.getAttribute("dir");if(i.save(),_!==this.direction&&(i.canvas.setAttribute("dir",y?"ltr":"rtl"),i.direction=y?"ltr":"rtl",i.textAlign=y?"left":"right"),o-=f*this._fontSizeFraction/this.lineHeight,v)return this._renderChar(t,i,s,0,n.join(""),r,o,f),void i.restore();for(var w=0,x=n.length-1;w<=x;w++)h=w===x||this.charSpacing||m,p+=n[w],c=this.__charBounds[s][w],0===g?(r+=b*(c.kernedWidth-c.width),g+=c.width):g+=c.kernedWidth,d&&!h&&this._reSpaceAndTab.test(n[w])&&(h=!0),h||(a=a||this.getCompleteStyleDeclaration(s,w),l=this.getCompleteStyleDeclaration(s,w+1),h=e.util.hasStyleChanged(a,l,!1)),h&&(m?(i.save(),i.translate(c.renderLeft,c.renderTop),i.rotate(c.angle),this._renderChar(t,i,s,w,p,-g/2,0,f),i.restore()):(u=r,this._renderChar(t,i,s,w,p,u,o,f)),p="",a=l,r+=b*g,g=0);i.restore()},_applyPatternGradientTransformText:function(t){var i,n=e.util.createCanvasElement(),r=this.width+this.strokeWidth,o=this.height+this.strokeWidth;return n.width=r,n.height=o,(i=n.getContext("2d")).beginPath(),i.moveTo(0,0),i.lineTo(r,0),i.lineTo(r,o),i.lineTo(0,o),i.closePath(),i.translate(r/2,o/2),i.fillStyle=t.toLive(i),this._applyPatternGradientTransform(i,t),i.fill(),i.createPattern(n,"no-repeat")},handleFiller:function(t,e,i){var n,r;return i.toLive?"percentage"===i.gradientUnits||i.gradientTransform||i.patternTransform?(n=-this.width/2,r=-this.height/2,t.translate(n,r),t[e]=this._applyPatternGradientTransformText(i),{offsetX:n,offsetY:r}):(t[e]=i.toLive(t,this),this._applyPatternGradientTransform(t,i)):(t[e]=i,{offsetX:0,offsetY:0})},_setStrokeStyles:function(t,e){return t.lineWidth=e.strokeWidth,t.lineCap=this.strokeLineCap,t.lineDashOffset=this.strokeDashOffset,t.lineJoin=this.strokeLineJoin,t.miterLimit=this.strokeMiterLimit,this.handleFiller(t,"strokeStyle",e.stroke)},_setFillStyles:function(t,e){return this.handleFiller(t,"fillStyle",e.fill)},_renderChar:function(t,e,i,n,r,o,s){var a,l,c=this._getStyleDeclaration(i,n),h=this.getCompleteStyleDeclaration(i,n),u="fillText"===t&&h.fill,f="strokeText"===t&&h.stroke&&h.strokeWidth;(f||u)&&(e.save(),u&&(a=this._setFillStyles(e,h)),f&&(l=this._setStrokeStyles(e,h)),e.font=this._getFontDeclaration(h),c&&c.textBackgroundColor&&this._removeShadow(e),c&&c.deltaY&&(s+=c.deltaY),u&&e.fillText(r,o-a.offsetX,s-a.offsetY),f&&e.strokeText(r,o-l.offsetX,s-l.offsetY),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"),o=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"deltaY"),s={fontSize:r*i.size,deltaY:o+r*i.baseline};return this.setSelectionStyles(s,t,e),this},_getLineLeftOffset:function(t){var e=this.getLineWidth(t),i=this.width-e,n=this.textAlign,r=this.direction,o=0,s=this.isEndOfWrapping(t);return"justify"===n||"justify-center"===n&&!s||"justify-right"===n&&!s||"justify-left"===n&&!s?0:("center"===n&&(o=i/2),"right"===n&&(o=i),"justify-center"===n&&(o=i/2),"justify-right"===n&&(o=i),"rtl"===r&&(o-=i),o)},_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){if(void 0!==this.__lineWidths[t])return this.__lineWidths[t];var e=this.measureLine(t).width;return this.__lineWidths[t]=e,e},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0}
vendor: 4,597 bytes, line 2
2,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)){t.save(),"overline"!==e&&"linethrough"!==e||this._removeShadow(t);for(var i,n,r,o,s,a,l,c,h,u,f,d,p,g,m,v,y=this._getLeftOffset(),b=this._getTopOffset(),_=this.path,w=this._getWidthOfCharSpacing(),x=this.offsets[e],C=0,S=this._textLines.length;C<S;C++)if(i=this.getHeightOfLine(C),this[e]||this.styleHas(e,C)){l=this._textLines[C],g=i/this.lineHeight,o=this._getLineLeftOffset(C),u=0,f=0,c=this.getValueOfPropertyAt(C,0,e),v=this.getValueOfPropertyAt(C,0,"fill"),h=b+g*(1-this._fontSizeFraction),n=this.getHeightOfChar(C,0),s=this.getValueOfPropertyAt(C,0,"deltaY");for(var T=0,O=l.length;T<O;T++)if(d=this.__charBounds[C][T],p=this.getValueOfPropertyAt(C,T,e),m=this.getValueOfPropertyAt(C,T,"fill"),r=this.getHeightOfChar(C,T),a=this.getValueOfPropertyAt(C,T,"deltaY"),_&&p&&m)t.save(),t.fillStyle=v,t.translate(d.renderLeft,d.renderTop),t.rotate(d.angle),t.fillRect(-d.kernedWidth/2,x*r+a,d.kernedWidth,this.fontSize/15),t.restore();else if((p!==c||m!==v||r!==n||a!==s)&&f>0){var E=y+o+u;"rtl"===this.direction&&(E=this.width-E-f),c&&v&&(t.fillStyle=v,t.fillRect(E,h+x*n+s,f,this.fontSize/15)),u=d.left,f=d.width,c=p,v=m,n=r,s=a}else f+=d.kernedWidth;E=y+o+u;"rtl"===this.direction&&(E=this.width-E-f),t.fillStyle=m,p&&m&&t.fillRect(E,h+x*n+s,f-w,this.fontSize/15),b+=i}else b+=i;t.restore()}},_getFontDeclaration:function(t,i){var n=t||this,r=this.fontFamily,o=e.Text.genericFonts.indexOf(r.toLowerCase())>-1,s=void 0===r||r.indexOf("'")>-1||r.indexOf(",")>-1||r.indexOf('"')>-1||o?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",s].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"],o=[],s=0;s<i.length;s++)n[s]=e.util.string.graphemeSplit(i[s]),o=o.concat(n[s],r);return o.pop(),{_unwrappedLines:n,lines:i,graphemeText:o,graphemeLines:n}},toObject:function(t){var i=n.concat(t),r=this.callSuper("toObject",i);return r.styles=e.util.stylesToArray(this.styles,this.text),r.path&&(r.path=this.path.toObject()),r},set:function(t,e){this.callSuper("set",t,e);var i=!1,n=!1;if("object"==typeof t)for(var r in t)"path"===r&&this.setPathInfo(),i=i||-1!==this._dimensionAffectingProps.indexOf(r),n=n||"path"===r;else i=-1!==this._dimensionAffectingProps.indexOf(t),n="path"===t;return n&&this.setPathInfo(),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 o=e.parseAttributes(t,e.Text.ATTRIBUTE_NAMES),s=o.textAnchor||"left";if((r=e.util.object.extend(r?i(r):{},o)).top=r.top||0,r.left=r.left||0,o.textDecoration){var a=o.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 o&&(r.left+=o.dx),"dy"in o&&(r.top+=o.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 c=r.strokeWidth;r.strokeWidth=0;var h=new e.Text(l,r),u=h.getScaledHeight()/h.height,f=((h.height+h.strokeWidth)*h.lineHeight-h.height)*u,d=h.getScaledHeight()+f,p=0;"center"===s&&(p=h.getScaledWidth()/2),"right"===s&&(p=h.getScaledWidth()),h.set({left:h.left-p,top:h.top-(d-h.fontSize*(.07+h._fontSizeFraction))/h.lineHeight,strokeWidth:void 0!==c?c:1}),n(h)},e.Text.fromObject=function(t,n){var r=i(t),o=t.path;return delete r.path,e.Object._fromObject("Text",r,(function(i){i.styles=e.util.stylesFromArray(t.styles,t.text),o?e.Object._fromObject("Path",o,(function(t){i.set("path",t),n(i)}),"path"):n(i)}),"text")},e.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],e.util.createAccessors&&e.util.createAccessors(e.Text)}}(e),k.util.object.extend(k.Text.prototype,{isEmptyStyles:function(t){if(!this.styles)return!0;
vendor: 12,461 bytes, line 2
2if(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,o=!0,s=0;for(var a in n){for(var l in e=0,n[a]){var c;r++,(c=n[a][l]).hasOwnProperty(t)?(i?c[t]!==i&&(o=!1):i=c[t],c[t]===this[t]&&delete c[t]):o=!1,0!==Object.keys(c).length?e++:delete n[a][l]}0===e&&delete n[a]}for(var h=0;h<this._textLines.length;h++)s+=this._textLines[h].length;o&&r===s&&(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,{}),k.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,e)}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={},o=0;o<this._styleProperties.length;o++)r[i=this._styleProperties[o]]=void 0===n[i]?this[i]:n[i];return r},_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)}k.IText=k.util.createClass(k.Text,k.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:"",cursorDelay:1e3,cursorDuration:600,caching:!0,hiddenTextareaContainer:null,_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._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,o=0,s=0,a=this.get2DCursorLocation(t);n=a.charIndex,i=a.lineIndex;for(var l=0;l<i;l++)o+=this.getHeightOfLine(l);e=this._getLineLeftOffset(i);var c=this.__charBounds[i][n];return c&&(s=c.left),0!==this.charSpacing&&n===this._textLines[i].length&&(s-=this._getWidthOfCharSpacing()),r={top:o,left:e+(s>0?s:0)},"rtl"===this.direction&&(r.left*=-1),this.cursorOffsetCache=r,this.cursorOffsetCache},renderCursor:function(t,e){var i=this.get2DCursorLocation(),n=i.lineIndex,r=i.charIndex>0?i.charIndex-1:0,o=this.getValueOfPropertyAt(n,r,"fontSize"),s=this.scaleX*this.canvas.getZoom(),a=this.cursorWidth/s,l=t.topOffset,c=this.getValueOfPropertyAt(n,r,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(n)/this.lineHeight-o*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(t,e),e.fillStyle=this.cursorColor||this.getValueOfPropertyAt(n,r,"fill"),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-a/2,l+t.top+c,a,o)},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"),o=this.get2DCursorLocation(i),s=this.get2DCursorLocation(n),a=o.lineIndex,l=s.lineIndex,c=o.charIndex<0?0:o.charIndex,h=s.charIndex<0?0:s.charIndex,u=a;u<=l;u++){var f,d=this._getLineLeftOffset(u)||0,p=this.getHeightOfLine(u),g=0,m=0;if(u===a&&(g=this.__charBounds[a][c].left),u>=a&&u<l)m=r&&!this.isEndOfWrapping(u)?this.width:this.getLineWidth(u)||5;else if(u===l)if(0===h)m=this.__charBounds[l][h].left;else{var v=this._getWidthOfCharSpacing();m=this.__charBounds[l][h-1].left+this.__charBounds[l][h-1].width-v}f=p,(this.lineHeight<1||u===l&&this.lineHeight>1)&&(p/=this.lineHeight);var y=t.left+d+g,b=m-g,_=p,w=0;this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",_=1,w=p):e.fillStyle=this.selectionColor,"rtl"===this.direction&&(y=this.width-y-b),e.fillRect(y,t.top+t.topOffset+w,b,_),t.topOffset+=f}},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}}}),k.IText.fromObject=function(e,i){var n=k.util.stylesFromArray(e.styles,e.text),r=Object.assign({},e,{styles:n});if(delete r.path,t(r),r.styles)for(var o in r.styles)for(var s in r.styles[o])t(r.styles[o][s]);k.Object._fromObject("IText",r,(function(t){e.path?k.Object._fromObject("Path",e.path,(function(e){t.set("path",e),i(t)}),"path"):i(t)}),"text")}}(),x=k.util.object.clone,k.util.object.extend(k.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||[],k.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],o=k.reNonWord;!o.test(r)&&n>0&&n<i.length;)r=i[n+=e];return o.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.forEac
vendor: 5,783 bytes, line 2
2h((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){document.activeElement!==this.hiddenTextarea&&this.hiddenTextarea.focus();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=k.util.string.graphemeSplit(n).length;if(t===e)return{selectionStart:r,selectionEnd:r};var o=i.slice(t,e);return{selectionStart:r,selectionEnd:r+k.util.string.graphemeSplit(o).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,o=this.getValueOfPropertyAt(n,r,"fontSize")*this.lineHeight,s=e.leftOffset,a=this.calcTransformMatrix(),l={x:e.left+s,y:e.top+e.topOffset+o},c=this.canvas.getRetinaScaling(),h=this.canvas.upperCanvasEl,u=h.width/c,f=h.height/c,d=u-o,p=f-o,g=h.clientWidth/u,m=h.clientHeight/f;return l=k.util.transformPoint(l,a),(l=k.util.transformPoint(l,this.canvas.viewportTransform)).x*=g,l.y*=m,l.x<0&&(l.x=0),l.x>d&&(l.x=d),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:o+"px",charHeight:o}},_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),o=this.get2DCursorLocation(e,!0),s=r.lineIndex,a=r.charIndex,l=o.lineIndex,c=o.charIndex;if(s!==l){if(this.styles[s])for(i=a;i<this._unwrappedTextLines[s].length;i++)delete this.styles[s][i];if(this.styles[l])for(i=c;i<this._unwrappedTextLines[l].length;i++)(n=this.styles[l][i])&&(this.styles[s]||(this.styles[s]={}),this.styles[s][a+i-c]=n);for(i=s+1;i<=l;i++)delete this.styles[i];this.shiftLineStyles(l,s-l)}else if(this.styles[s]){n=this.styles[s];var h,u,f=c-a;for(i=a;i<c;i++)delete n[i];for(u in this.styles[s])(h=parseInt(u,10))>=c&&(n[h-f]=n[u],delete n[u])}},shiftLineStyles:function(t,e){var i=x(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()}
vendor: 12,127 bytes, line 2
2,insertNewlineStyleObject:function(t,e,i,n){var r,o={},s=!1,a=this._unwrappedTextLines[t].length,l=a===e;for(var c 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(c,10);h>=e&&(s=!0,o[h-e]=this.styles[t][c],l&&0===e||delete this.styles[t][c])}var u=!1;for(s&&!l&&(this.styles[t+i]=o,u=!0),(u||a>e)&&i--;i>0;)n&&n[i-1]?this.styles[t+i]={0:x(n[i-1])}:r?this.styles[t+i]={0:x(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],o=r?x(r):{};for(var s in i||(i=1),o){var a=parseInt(s,10);a>=e&&(r[a+i]=o[a],o[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]=x(n[i]));else if(r)for(var l=r[e?e-1:1];l&&i--;)this.styles[t][e+i]=x(l)},insertNewStyleBlock:function(t,e,i){for(var n=this.get2DCursorLocation(e,!0),r=[0],o=0,s=0;s<t.length;s++)"\n"===t[s]?r[++o]=0:r[o]++;for(r[0]>0&&(this.insertCharStyleObject(n.lineIndex,n.charIndex,r[0],i),i=i&&i.slice(r[0]+1)),o&&this.insertNewlineStyleObject(n.lineIndex,n.charIndex+r[0],o),s=1;s<o;s++)r[s]>0?this.insertCharStyleObject(n.lineIndex+s,0,r[s],i):i&&this.styles[n.lineIndex+s]&&i[0]&&(this.styles[n.lineIndex+s][0]=i[0]),i=i&&i.slice(r[s]+1);r[s]>0&&this.insertCharStyleObject(n.lineIndex+s,0,r[s],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)}}),k.util.object.extend(k.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.inCompositionMode=!1,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,i=this.getLocalPointer(t),n=0,r=0,o=0,s=0,a=0,l=0,c=this._textLines.length;l<c&&o<=i.y;l++)o+=this.getHeightOfLine(l)*this.scaleY,a=l,l>0&&(s+=this._textLines[l-1].length+this.missingNewlineOffset(l-1));r=this._getLineLeftOffset(a)*this.scaleX,e=this._textLines[a],"rtl"===this.direction&&(i.x=this.width*this.scaleX-i.x+r);for(var h=0,u=e.length;h<u&&(n=r,(r+=this.__charBounds[a][h].kernedWidth*this.scaleX)<=i.x);h++)s++;return this._getNewSelectionStartFromOffset(i,n,r,s,u)},_getNewSelectionStartFromOffset:function(t,e,i,n,r){var o=t.x-e,s=i-t.x,a=n+(s>o||s<0?0:1);return this.flipX&&(a=r-a),a>this._text.length&&(a=this._text.length),a}}),k.util.object.extend(k.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=k.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+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):k.document.body.appendChild(this.hiddenTextarea),k.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),k.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),k.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),k.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),k.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),k.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),k.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),k.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),k.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(k.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"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing){var e="rtl"===this.direction?this.keysMapRtl:this.keysMap;if(t.keyCode in e)this[e[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.inCompositionMode=!1,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,o,s,a=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,l=this._text.length,c=a.length,h=c-l,u=this.selectionStart,f=this.selectionEnd,d=u!==f;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 p=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),g=u>p.selectionStart;d?(i=this._text.slice(u,f),h+=f-u):c<l&&(i=g?this._text.slice(f+h,f):this._text.slice(u,u-h)),n=a.slice(p.selectionEnd-h,p.selectionEnd),i&&i.length&&(n.length&&(r=this.getSelectionStyles(u,u+1,!1),r=n.map((function(){return r[0]}))),d?(o=u,s=f):g?(o=f-i.length,s=f):(o=f,s=f+i.length),this.removeStyleFromTo(o,s)),n.length&&(e&&n.join("")===k.copiedText&&!k.disableStyleCopyPaste&&(r=k.copiedTextStyle),this.insertNewStyleBlock(n,u,r)),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&&(k.copiedText=this.getSelectedText(),k.disableStyleCopyPaste?k.copiedTextStyle=null:k.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(t){return t&&t.clipboardData||k.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 o=n.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r+1,s);return this._textLines[r].slice(o).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 o=n.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r-1,s),l=this._textLines[r].slice(0,o),c=this.missingNewlineOffset(r-1);return-this._textLines[r-1].length+a-l.length+(1-c)},_getIndexOnLine:function(t,e){for(var i,n,r=this._textLines[t],o=this._getLineLeftOffset(t),s=0,a=0,l=r.length;a<l;a++)if((o+=i=this.__charBounds[t][a].width)>e){n=!0;var c=o-i,h=o,u=Math.abs(c-e);s=Math.abs(h-e)<u?a:a-1;break}return n||(s=r.length-1),s},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())}
vendor: 8,293 bytes, line 2
2,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!==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=k.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=k.util.toFixed,S=k.util.radiansToDegrees,T=k.util.calcRotateMatrix,O=k.util.transformPoint,E=/ +/g,k.util.object.extend(k.Text.prototype,{_toSVG:function(){var t=this._getSVGLeftTopOffsets(),e=this._getSVGTextAndBg(t.textTop,t.textLeft);return this._wrapSVGTextAndBg(e)},toSVG:function(t){var e=this._createBaseSVGMarkup(this._toSVG(),{reviver:t,noStyle:!0,withShadow:!0}),i=this.path;return i?e+i._createBaseSVGMarkup(i._toSVG(),{reviver:t,withShadow:!0}):e},_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=[],o=t;this._setSVGBg(r);for(var s=0,a=this._textLines.length;s<a;s++)i=this._getLineLeftOffset(s),(this.textBackgroundColor||this.styleHas("textBackgroundColor",s))&&this._setSVGTextLineBg(r,s,e+i,o),this._setSVGTextLineText(n,s,e+i,o),o+=this.getHeightOfLine(s);return{textSpans:n,textBgRects:r}},_createTextCharSpan:function(t,e,i,n,r){var o=t!==t.trim()||t.match(E),s=this.getSvgSpanStyles(e,o),a=s?'style="'+s+'"':"",l=e.deltaY,c="",h=k.Object.NUM_FRACTION_DIGITS,u="";if(l&&(c=' dy="'+C(l,h)+'" '),void 0!==r.renderLeft){var f=r.angle;u=' rotate="'+C(S(f),k.Object.NUM_FRACTION_DIGITS)+'" ';var d=r.width/2,p=T({angle:S(f)});p[4]=r.renderLeft,p[5]=r.renderTop;var g=O({x:-d,y:0},p);i=g.x,n=g.y}return['<tspan x="',C(i,h),'" y="',C(n,h),'" ',c,a,u,">",k.util.string.escapeXml(t),"</tspan>"].join("")},_setSVGTextLineText:function(t,e,i,n){var r,o,s,a,l,c=this.getHeightOfLine(e),h=-1!==this.textAlign.indexOf("justify"),u="",f=0,d=this._textLines[e];n+=c*(1-this._fontSizeFraction)/this.lineHeight;for(var p=0,g=d.length-1;p<=g;p++)l=p===g||this.charSpacing||this.path,u+=d[p],s=this.__charBounds[e][p],0===f?(i+=s.kernedWidth-s.width,f+=s.width):f+=s.kernedWidth,h&&!l&&this._reSpaceAndTab.test(d[p])&&(l=!0),l||(r=r||this.getCompleteStyleDeclaration(e,p),o=this.getCompleteStyleDeclaration(e,p+1),l=k.util.hasStyleChanged(r,o,!0)),l&&(a=this._getStyleDeclaration(e,p)||{},t.push(this._createTextCharSpan(u,a,i,n,s)),u="",r=o,i+=f,f=0)},_pushTextBgRect:function(t,e,i,n,r,o){var s=k.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(e),' x="',C(i,s),'" y="',C(n,s),'" width="',C(r,s),'" height="',C(o,s),'"></rect>\n')},_setSVGTextLineBg:function(t,e,i,n){for(var r,o,s=this._textLines[e],a=this.getHeightOfLine(e)/this.lineHeight,l=0,c=0,h=this.getValueOfPropertyAt(e,0,"textBackgroundColor"),u=0,f=s.length;u<f;u++)r=this.__charBounds[e][u],(o=this.getValueOfPropertyAt(e,u,"textBackgroundColor"))!==h?(h&&this._pushTextBgRect(t,h,i+c,n,l,a),c=r.left,l=r.width,h=o):l+=r.kernedWidth;o&&this._pushTextBgRect(t,o,i+c,n,l,a)},_getFillAttributes:function(t){var e=t&&"string"==typeof t?new k.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 k.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={},o=0;o<t.graphemeLines.length;o++)"\n"===t.graphemeText[n]&&o>0?(i=0,n++,e++):!this.splitByGrapheme&&this._reSpaceAndTab.test(t.graphemeText[n])&&o>0&&(i++,n++),r[o]={line:e,offset:i},n+=t.graphemeLines[o].length,i+=t.graphemeLines[o].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,o=this._styleMap[t],s=this._styleMap[t+1];for(var a in o&&(t=o.line,n=o.offset),s&&(r=s.line===t,e=s.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 c 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)}
2,_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},_measureWord:function(t,e,i){var n,r=0;i=i||0;for(var o=0,s=t.length;o<s;o++){r+=this._getGraphemeBox(t[o],e,o+i,n,true).kernedWidth,n=t[o]}return r},_wrapLine:function(t,i,n,r){var o=0,s=this.splitByGrapheme,a=[],l=[],c=s?e.util.string.graphemeSplit(t):t.split(this._wordJoiners),h="",u=0,f=s?"":" ",d=0,p=0,g=0,m=!0,v=this._getWidthOfCharSpacing();r=r||0;0===c.length&&c.push([]),n-=r;for(var y=0;y<c.length;y++)h=s?c[y]:e.util.string.graphemeSplit(c[y]),d=this._measureWord(h,i,u),u+=h.length,(o+=p+d-v)>n&&!m?(a.push(l),l=[],o=d,m=!0):o+=v,m||s||l.push(f),l=l.concat(h),p=s?0:this._measureWord([f],i,u),u++,m=!1,d>g&&(g=d);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,e){return this.splitByGrapheme&&!e?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),o=0;o<n.length;o++)r[o]=n[o].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){var n=e.util.stylesFromArray(t.styles,t.text),r=Object.assign({},t,{styles:n});return delete r.path,e.Object._fromObject("Textbox",r,(function(n){t.path?e.Object._fromObject("Path",t.path,(function(t){n.set("path",t),i(n)}),"path"):i(n)}),"text")}}(e),function(){var t=k.controlsUtils,e=t.scaleSkewCursorStyleHandler,i=t.scaleCursorStyleHandler,n=t.scalingEqually,r=t.scalingYOrSkewingX,o=t.scalingXOrSkewingY,s=t.scaleOrSkewActionName,a=k.Object.prototype.controls;if(a.ml=new k.Control({x:-.5,y:0,cursorStyleHandler:e,actionHandler:o,getActionName:s}),a.mr=new k.Control({x:.5,y:0,cursorStyleHandler:e,actionHandler:o,getActionName:s}),a.mb=new k.Control({x:0,y:.5,cursorStyleHandler:e,actionHandler:r,getActionName:s}),a.mt=new k.Control({x:0,y:-.5,cursorStyleHandler:e,actionHandler:r,getActionName:s}),a.tl=new k.Control({x:-.5,y:-.5,cursorStyleHandler:i,actionHandler:n}),a.tr=new k.Control({x:.5,y:-.5,cursorStyleHandler:i,actionHandler:n}),a.bl=new k.Control({x:-.5,y:.5,cursorStyleHandler:i,actionHandler:n}),a.br=new k.Control({x:.5,y:.5,cursorStyleHandler:i,actionHandler:n}),a.mtr=new k.Control({x:0,y:-.5,actionHandler:t.rotationWithSnapping,cursorStyleHandler:t.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),k.Textbox){var l=k.Textbox.prototype.controls={};l.mtr=a.mtr,l.tr=a.tr,l.br=a.br,l.tl=a.tl,l.bl=a.bl,l.mt=a.mt,l.mb=a.mb,l.mr=new k.Control({x:.5,y:0,actionHandler:t.changeWidth,cursorStyleHandler:e,actionName:"resizing"}),l.ml=new k.Control({x:-.5,y:0,actionHandler:t.changeWidth,cursorStyleHandler:e,actionName:"resizing"})}}()},7947(t,e){e.read=function(t,e,i,n,r){var o,s,a=8*r-n-1,l=(1<<a)-1,c=l>>1,h=-7,u=i?r-1:0,f=i?-1:1,d=t[e+u];for(u+=f,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+t[e+u],u+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+u],u+=f,h-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,i,n,r,o){var s,a,l,c=8*o-r-1,h=(1<<c)-1,u=h>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-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,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+u>=1?f/l:f*Math.pow(2,1-u))*l>=2&&(s++,l/=2),s+u>=h?(a=0,s=h):s+u>=1?(a=(e*l-1)*Math.pow(2,r),s+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,r),s=0));r>=8;t[i+d]=255&a,d+=p,a/=256,r-=8);for(s=s<<r|a,c+=r;c>0;t[i+d]=255&s,d+=p,s/=256,c-=8);t[i+d-p]|=128*g}},5184(t,e,i){var n,r;
2!function(o){if(void 0===(r="function"==typeof(n=o)?n.call(e,i,e,t):n)||(t.exports=r),t.exports=o(),!!0){var s=window.Cookies,a=window.Cookies=o();a.noConflict=function(){return window.Cookies=s,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})+/g,decodeURIComponent)}return function i(n){function r(){}function o(e,i,o){if("undefined"!=typeof document){"number"==typeof(o=t({path:"/"},r.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(i);/^[\{\[]/.test(s)&&(i=s)}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 o)o[l]&&(a+="; "+l,!0!==o[l]&&(a+="="+o[l].split(";")[0]));return document.cookie=e+"="+i+a}}function s(t,i){if("undefined"!=typeof document){for(var r={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),l=a.slice(1).join("=");i||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var c=e(a[0]);if(l=(n.read||n)(l,c)||e(l),i)try{l=JSON.parse(l)}catch(t){}if(r[c]=l,t===c)break}catch(t){}}return t?r[t]:r}}return r.set=o,r.get=function(t){return s(t,!1)},r.getJSON=function(t){return s(t,!0)},r.remove=function(e,i){o(e,"",t(i,{expires:-1}))},r.defaults={},r.withConverter=i,r}((function(){}))}))},5203(t){t.exports=function(){"use strict";function t(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)"__proto__"!==n&&(t[n]=i[n])}return t}function e(i,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=t({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in o)o[a]&&(s+="; "+a,!0!==o[a]&&(s+="="+o[a].split(";")[0]));return document.cookie=e+"="+i.write(r,e)+s}}function o(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],n={},r=0;r<e.length;r++){var o=e[r].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(a in n||(n[a]=i.read(s,a)),t===a)break}catch{}}return t?n[t]:n}}return Object.create({set:r,get:o,remove:function(e,i){r(e,"",t({},i,{expires:-1}))},withAttributes:function(i){return e(this.converter,t({},this.attributes,i))},withConverter:function(i){return e(t({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(i)}})}return e({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},3996(){},5205(){},9492(){Parsley.addMessages("nl",{defaultMessage:"Deze waarde lijkt onjuist.",type:{email:"Dit lijkt geen geldig e-mail adres te zijn.",url:"Dit lijkt geen geldige URL te zijn.",number:"Deze waarde moet een nummer zijn.",integer:"Deze waarde moet een nummer zijn.",digits:"Deze waarde moet numeriek zijn.",alphanum:"Deze waarde moet alfanumeriek zijn."},notblank:"Deze waarde mag niet leeg zijn.",required:"Dit veld is verplicht.",pattern:"Deze waarde lijkt onjuist te zijn.",min:"Deze waarde mag niet lager zijn dan %s.",max:"Deze waarde mag niet groter zijn dan %s.",range:"Deze waarde moet tussen %s en %s liggen.",minlength:"Deze tekst is te kort. Deze moet uit minimaal %s karakters bestaan.",maxlength:"Deze waarde is te lang. Deze mag maximaal %s karakters lang zijn.",length:"Deze waarde moet tussen %s en %s karakters lang zijn.",equalto:"Deze waardes moeten identiek zijn."}),Parsley.setLocale("nl")},1013(t,e,i){t.exports=function(t){"use strict";function e(t){return e="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},e(t)}function n(){return n=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},n.apply(this,arguments)}function r(t,e){return a(t)||c(t,e)||u()}function o(t){return s(t)||l(t)||h()}function s(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}function a(t){if(Array.isArray(t))return t}function l(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function c(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return i}}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance")}
2function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var f=1,d={},p={attr:function(t,e,i){var n,r,o,s=new RegExp("^"+e,"i");if(void 0===i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if(!t)return i;for(n=(o=t.attributes).length;n--;)(r=o[n])&&r.specified&&s.test(r.name)&&(i[this.camelize(r.name.slice(e.length))]=this.deserializeValue(r.value));return i},checkAttr:function(t,e,i){return t.hasAttribute(e+i)},setAttr:function(t,e,i,n){t.setAttribute(this.dasherize(e+i),String(n))},getType:function(t){return t.getAttribute("type")||"text"},generateID:function(){return""+f++},deserializeValue:function(t){var e;try{return t?"true"==t||"false"!=t&&("null"==t?null:isNaN(e=Number(t))?/^[\[\{]/.test(t)?JSON.parse(t):t:e):t}catch(e){return t}},camelize:function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},dasherize:function(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var t;window.console&&"function"==typeof window.console.warn&&(t=window.console).warn.apply(t,arguments)},warnOnce:function(t){d[t]||(d[t]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){d={}},trimString:function(t){return t.replace(/^\s+|\s+$/g,"")},parse:{date:function(t){var e=t.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!e)return null;var i=r(e.map((function(t){return parseInt(t,10)})),4),n=(i[0],i[1]),o=i[2],s=i[3],a=new Date(n,o-1,s);return a.getFullYear()!==n||a.getMonth()+1!==o||a.getDate()!==s?null:a},string:function(t){return t},integer:function(t){return isNaN(t)?null:parseInt(t,10)},number:function(t){if(isNaN(t))throw null;return parseFloat(t)},boolean:function(t){return!/^\s*false\s*$/i.test(t)},object:function(t){return p.deserializeValue(t)},regexp:function(t){var e="";return/^\/.*\/(?:[gimy]*)$/.test(t)?(e=t.replace(/.*\/([gimy]*)$/,"$1"),t=t.replace(new RegExp("^/(.*?)/"+e+"$"),"$1")):t="^"+t+"$",new RegExp(t,e)}},parseRequirement:function(t,e){var i=this.parse[t||"string"];if(!i)throw'Unknown requirement specification: "'+t+'"';var n=i(e);if(null===n)throw"Requirement is not a ".concat(t,': "').concat(e,'"');return n},namespaceEvents:function(e,i){return(e=this.trimString(e||"").split(/\s+/))[0]?t.map(e,(function(t){return"".concat(t,".").concat(i)})).join(" "):""},difference:function(e,i){var n=[];return t.each(e,(function(t,e){-1==i.indexOf(e)&&n.push(e)})),n},all:function(e){return t.when.apply(t,o(e).concat([42,42]))},objectCreate:Object.create||function(){var t=function(){};return function(i){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=e(i))throw TypeError("Argument must be an object");t.prototype=i;var n=new t;return t.prototype=null,n}}(),_SubmitSelector:'input[type="submit"], button:submit'},g={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(t){},errorsContainer:function(t){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},m=function(){this.__id__=p.generateID()};m.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var e=this,i=function(){var i=t.Deferred();return!0!==e.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return p.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(t){for(var e in this.domOptions=p.objectCreate(this.parent.options),this.options=p.objectCreate(this.domOptions),t)t.hasOwnProperty(e)&&(this.options[e]=t[e]);this.actualizeOptions()},_listeners:null,on:function(t,e){return this._listeners=this._listeners||{},(this._listeners[t]=this._listeners[t]||[]).push(e),this},subscribe:function(e,i){t.listenTo(this,e.toLowerCase(),i)},off:function(t,e){var i=this._listeners&&this._listeners[t];if(i)if(e)for(var n=i.length;n--;)i[n]===e&&i.splice(n,1);else delete this._listeners[t];return this},unsubscribe:function(e,i){t.unsubscribeTo(this,e.toLowerCase())}
2,trigger:function(t,e,i){e=e||this;var n,r=this._listeners&&this._listeners[t];if(r)for(var o=r.length;o--;)if(!1===(n=r[o].call(e,e,i)))return n;return!this.parent||this.parent.trigger(t,e,i)},asyncIsValid:function(t,e){return p.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:t,force:e})},_findRelated:function(){return this.options.multiple?t(this.parent.element.querySelectorAll("[".concat(this.options.namespace,'multiple="').concat(this.options.multiple,'"]'))):this.$element}};var v=function(t,e){var i=t.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+t+'"';var n=i[1].split(",").map(p.trimString);if(n.length!==e)throw"Requirement has "+n.length+" values when "+e+" are needed";return n},y=function(t,e,i){var n=null,r={};for(var o in t)if(o){var s=i(o);"string"==typeof s&&(s=p.parseRequirement(t[o],s)),r[o]=s}else n=p.parseRequirement(t[o],e);return[n,r]},b=function(e){t.extend(!0,this,e)};b.prototype={validate:function(t,e){if(this.fn)return arguments.length>3&&(e=[].slice.call(arguments,1,-1)),this.fn(t,e);if(Array.isArray(t)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var i=arguments[arguments.length-1];if(this.validateDate&&i._isDateInput())return arguments[0]=p.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!t||!isNaN(t)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(e,i){if("string"!=typeof e)return Array.isArray(e)?e:[e];var n=this.requirementType;if(Array.isArray(n)){for(var r=v(e,n.length),o=0;o<r.length;o++)r[o]=p.parseRequirement(n[o],r[o]);return r}return t.isPlainObject(n)?y(n,e,i):[p.parseRequirement(n,e)]},requirementType:"string",priority:2};var _=function(t,e){this.__class__="ValidatorRegistry",this.locale="en",this.init(t||{},e||{})},w={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(t){return null!==p.parse.date(t)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};w.range=w.number;var x=function(t){var e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0},C=function(t,e){return e.map(p.parse[t])},S=function(t,e){return function(i){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.pop(),e.apply(void 0,[i].concat(o(C(t,r))))}},T=function(t){return{validateDate:S("date",t),validateNumber:S("number",t),requirementType:t.length<=2?"string":["string","string"],priority:30}};_.prototype={init:function(t,e){for(var i in this.catalog=e,this.validators=n({},this.validators),t)this.addValidator(i,t[i].fn,t[i].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(t){if(void 0===this.catalog[t])throw new Error(t+" is not available in the catalog");return this.locale=t,this},addCatalog:function(t,i,n){return"object"===e(i)&&(this.catalog[t]=i),!0===n?this.setLocale(t):this}
2,addMessage:function(t,e,i){return void 0===this.catalog[t]&&(this.catalog[t]={}),this.catalog[t][e]=i,this},addMessages:function(t,e){for(var i in e)this.addMessage(t,i,e[i]);return this},addValidator:function(t,e,i){if(this.validators[t])p.warn('Validator "'+t+'" is already defined.');else if(g.hasOwnProperty(t))return void p.warn('"'+t+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(t){return!!this.validators[t]},updateValidator:function(t,e,i){return this.validators[t]?this._setValidator.apply(this,arguments):(p.warn('Validator "'+t+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(t){return this.validators[t]||p.warn('Validator "'+t+'" is not defined.'),delete this.validators[t],this},_setValidator:function(t,i,n){for(var r in"object"!==e(i)&&(i={fn:i,priority:n}),i.validate||(i=new b(i)),this.validators[t]=i,i.messages||{})this.addMessage(r,t,i.messages[r]);return this},getErrorMessage:function(t){return("type"===t.name?(this.catalog[this.locale][t.name]||{})[t.requirements]:this.formatMessage(this.catalog[this.locale][t.name],t.requirements))||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(t,i){if("object"===e(i)){for(var n in i)t=this.formatMessage(t,i[n]);return t}return"string"==typeof t?t.replace(/%s/i,i):""},validators:{notblank:{validateString:function(t){return/\S/.test(t)},priority:2},required:{validateMultiple:function(t){return t.length>0},validateString:function(t){return/\S/.test(t)},priority:512},type:{validateString:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.step,r=void 0===n?"any":n,o=i.base,s=void 0===o?0:o,a=w[e];if(!a)throw new Error("validator type `"+e+"` is not supported");if(!t)return!0;if(!a.test(t))return!1;if("number"===e&&!/^any$/i.test(r||"")){var l=Number(t),c=Math.max(x(r),x(s));if(x(l)>c)return!1;var h=function(t){return Math.round(t*Math.pow(10,c))};if((h(l)-h(s))%h(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(t,e){return!t||e.test(t)},requirementType:"regexp",priority:64},minlength:{validateString:function(t,e){return!t||t.length>=e},requirementType:"integer",priority:30},maxlength:{validateString:function(t,e){return t.length<=e},requirementType:"integer",priority:30},length:{validateString:function(t,e,i){return!t||t.length>=e&&t.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(t,e){return t.length>=e},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(t,e){return t.length<=e},requirementType:"integer",priority:30},check:{validateMultiple:function(t,e,i){return t.length>=e&&t.length<=i},requirementType:["integer","integer"],priority:30},min:T((function(t,e){return t>=e})),max:T((function(t,e){return t<=e})),range:T((function(t,e,i){return t>=e&&t<=i})),equalto:{validateString:function(e,i){if(!e)return!0;var n=t(i);return n.length?e===n.val():e===i},priority:256},euvatin:{validateString:function(t,e){return!t||/^[A-Z][A-Z][A-Za-z0-9 -]{2,}$/.test(t)},priority:30}}};var O={},E=function t(e,i,n){for(var r=[],o=[],s=0;s<e.length;s++){for(var a=!1,l=0;l<i.length;l++)if(e[s].assert.name===i[l].assert.name){a=!0;break}a?o.push(e[s]):r.push(e[s])}return{kept:o,added:r,removed:n?[]:t(i,e,!0).added}};O.Form={_actualizeTriggers:function(){var t=this;this.$element.on("submit.Parsley",(function(e){t.onSubmitValidate(e)})),this.$element.on("click.Parsley",p._SubmitSelector,(function(e){t.onSubmitButton(e)})),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var t=0;t<this.fields.length;t++){var e=this.fields[t];if(!0!==e.validationResult&&e.validationResult.length>0&&void 0===e.options.noFocus&&(this._focusedField=e.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},O.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var t=E(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(t),this._actualizeTriggers(),!t.kept.length&&!t.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var t=[],e=0;e<this.validationResult.length;e++)t.push(this.validationResult[e].errorMessage||this._getErrorMessage(this.validationResult[e].assert));return t},addError:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.message,n=e.assert,r=e.updateClass,o=void 0===r||r;this._buildUI(),this._addError(t,{message:i,assert:n}),o&&this._errorClass()},updateError:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.message,n=e.assert,r=e.updateClass,o=void 0===r||r;this._buildUI(),this._updateError(t,{message:i,assert:n}),o&&this._errorClass()},removeError:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).updateClass,i=void 0===e||e;this._buildUI(),this._removeError(t),i&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&
vendor: 7,167 bytes, line 2
2!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(e){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return e.added.length||e.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(t(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").attr("aria-hidden","false").find(".parsley-custom-error-message").html(this.options.errorMessage)):(this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").attr("aria-hidden","true").find(".parsley-custom-error-message").remove());for(var i=0;i<e.removed.length;i++)this._removeError(e.removed[i].assert.name);for(i=0;i<e.added.length;i++)this._addError(e.added[i].assert.name,{message:e.added[i].errorMessage,assert:e.added[i].assert});for(i=0;i<e.kept.length;i++)this._updateError(e.kept[i].assert.name,{message:e.kept[i].errorMessage,assert:e.kept[i].assert})}},_addError:function(e,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").attr("aria-hidden","false").append(t(this.options.errorTemplate).addClass("parsley-"+e).html(n||this._getErrorMessage(r)))},_updateError:function(t,e){var i=e.message,n=e.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+t).html(i||this._getErrorMessage(n))},_removeError:function(t){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").attr("aria-hidden","true").find(".parsley-"+t).remove()},_getErrorMessage:function(t){var e=t.name+"Message";return void 0!==this.options[e]?window.Parsley.formatMessage(this.options[e],t.requirements):window.Parsley.getErrorMessage(t)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var e={};this.element.setAttribute(this.options.namespace+"id",this.__id__),e.$errorClassHandler=this._manageClassHandler(),e.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),e.$errorsWrapper=t(this.options.errorsWrapper).attr("id",e.errorsWrapperId),e.lastValidationResult=[],e.validationInformationVisible=!1,this._ui=e}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&t(this.options.classHandler).length)return t(this.options.classHandler);var i=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(i=window[this.options.classHandler]),"function"==typeof i){var n=i.call(this,this);if(void 0!==n&&n.length)return n}else{if("object"===e(i)&&i instanceof jQuery&&i.length)return i;i&&p.warn("The class handler `"+i+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var i=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof i){if(t(i).length)return t(i).append(this._ui.$errorsWrapper);"function"==typeof window[i]?i=window[i]:p.warn("The errors container `"+i+"` does not exist in DOM nor as a global JS function")}return"function"==typeof i&&(i=i.call(this,this)),"object"===e(i)&&i.length?i.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var t,e=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(p.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),(function(){e._validateIfNeeded()})):(t=p.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(t,(function(t){e._validateIfNeeded(t)}))},_validateIfNeeded:function(t){var e=this;t&&/key|input/.test(t.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout((function(){return e.validate()}),this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var A=function(e,i,n){this.__class__="Form",this.element=e,this.$element=t(e),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},k={pending:null,resolved:!0,rejected:!1};A.prototype={onSubmitValidate:function(t){var e=this;if(!0!==t.parsley){var i=this._submitSource||this.$element.find(p._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i||null===i.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var n=this.whenValidate({event:t});"resolved"===n.state()&&!1!==this._trigger("submit")||(t.stopImmediatePropagation(),t.preventDefault(),"pending"===n.state()&&n.done((function(){e._submit(i)})))}}},onSubmitButton:function(t){this._submitSource=t.currentTarget},_submit:function(e){if(!1!==this._trigger("submit")){if(e){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=t('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:e.getAttribute("name"),value:e.getAttribute("value")})}this.$element.trigger(n(t.Event("submit"),{parsley:!0}))}},validate:function(e){if(arguments.length>=1&&!t.isPlainObject(e)){p.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=Array.prototype.slice.call(arguments);e={group:i[0],force:i[1],event:i[2]}}return k[this.whenValidate(e).state()]},whenValidate:function(){var e,i=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=r.group,a=r.force,l=r.event;this.submitEvent=l,l&&(this.submitEvent=n({},l,{preventDefault:function(){p.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var c=this._withoutReactualizingFormOptions((function(){return t.map(i.fields,
2(function(t){return t.whenValidate({force:a,group:s})}))}));return(e=p.all(c).done((function(){i._trigger("success")})).fail((function(){i.validationResult=!1,i.focus(),i._trigger("error")})).always((function(){i._trigger("validated")}))).pipe.apply(e,o(this._pipeAccordingToValidationResult()))},isValid:function(e){if(arguments.length>=1&&!t.isPlainObject(e)){p.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=Array.prototype.slice.call(arguments);e={group:i[0],force:i[1]}}return k[this.whenValid(e).state()]},whenValid:function(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.group,r=i.force;this._refreshFields();var o=this._withoutReactualizingFormOptions((function(){return t.map(e.fields,(function(t){return t.whenValid({group:n,force:r})}))}));return p.all(o)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var t=0;t<this.fields.length;t++)this.fields[t].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var t=0;t<this.fields.length;t++)this.fields[t].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var e=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions((function(){e.$element.find(e.options.inputs).not(e.options.excluded).not("[".concat(e.options.namespace,"excluded=true]")).each((function(t,i){var n=new window.Parsley.Factory(i,{},e);if("Field"===n.__class__||"FieldMultiple"===n.__class__){var r=n.__class__+"-"+n.__id__;void 0===e.fieldsMappedById[r]&&(e.fieldsMappedById[r]=n,e.fields.push(n))}})),t.each(p.difference(i,e.fields),(function(t,e){e.reset()}))})),this},_withoutReactualizingFormOptions:function(t){var e=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=t();return this.actualizeOptions=e,i},_trigger:function(t){return this.trigger("form:"+t)}};var P=function(t,e,i,r,o){var s=window.Parsley._validatorRegistry.validators[e],a=new b(s);n(this,{validator:a,name:e,requirements:i,priority:r=r||t.options[e+"Priority"]||a.priority,isDomConstraint:o=!0===o}),this._parseRequirements(t.options)},D=function(t){return t[0].toUpperCase()+t.slice(1)};P.prototype={validate:function(t,e){var i;return(i=this.validator).validate.apply(i,[t].concat(o(this.requirementList),[e]))},_parseRequirements:function(t){var e=this;this.requirementList=this.validator.parseRequirements(this.requirements,(function(i){return t[e.name+D(i)]}))}};var F=function(e,i,n,r){this.__class__="Field",this.element=e,this.$element=t(e),void 0!==r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},j={pending:null,resolved:!0,rejected:!1};F.prototype={validate:function(e){arguments.length>=1&&!t.isPlainObject(e)&&(p.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),e={options:e});var i=this.whenValidate(e);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var t,e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.force,r=i.group;if(this.refresh(),!r||this._isInGroup(r))return this.value=this.getValue(),this._trigger("validate"),(t=this.whenValid({force:n,value:this.value,_refreshed:!0}).always((function(){e._reflowUI()})).done((function(){e._trigger("success")})).fail((function(){e._trigger("error")})).always((function(){e._trigger("validated")}))).pipe.apply(t,o(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(t){return void 0===t&&(t=this.getValue()),!(!t.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(e){return Array.isArray(this.options.group)?-1!==t.inArray(e,this.options.group):this.options.group===e},isValid:function(e){if(arguments.length>=1&&!t.isPlainObject(e)){p.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=Array.prototype.slice.call(arguments);e={force:i[0],value:i[1]}}var n=this.whenValid(e);return!n||j[n.state()]},whenValid:function(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.force,r=void 0!==n&&n,o=i.value,s=i.group;if(i._refreshed||this.refresh(),!s||this._isInGroup(s)){if(this.validationResult=!0,!this.hasConstraints())return t.when();if(null==o&&(o=this.getValue()),!this.needsValidation(o)&&!0!==r)return t.when();var a=this._getGroupedConstraints(),l=[];return t.each(a,(function(i,n){var r=p.all(t.map(n,(function(t){return e._validateConstraint(o,t)})));if(l.push(r),"rejected"===r.state())return!1})),p.all(l)}},_validateConstraint:function(e,i){var n=this,r=i.validate(e,this);return!1===r&&(r=t.Deferred().reject()),p.all([r]).fail((function(t){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof t&&t})}))},getValue:function(){var t;return null==(t="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val())?"":this._handleWhitespace(t)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return p.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()}
vendor: 7,041 bytes, line 2
2,addConstraint:function(t,e,i,n){if(window.Parsley._validatorRegistry.validators[t]){var r=new P(this,t,e,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(t){for(var e=0;e<this.constraints.length;e++)if(t===this.constraints[e].name){this.constraints.splice(e,1);break}return delete this.constraintsByName[t],this},updateConstraint:function(t,e,i){return this.removeConstraint(t).addConstraint(t,e,i)},_bindConstraints:function(){for(var t=[],e={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(t.push(this.constraints[i]),e[this.constraints[i].name]=this.constraints[i]);for(var n in this.constraints=t,this.constraintsByName=e,this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var t=this.element.getAttribute("min"),e=this.element.getAttribute("max");null!==t&&null!==e?this.addConstraint("range",[t,e],void 0,!0):null!==t?this.addConstraint("min",t,void 0,!0):null!==e&&this.addConstraint("max",e,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var i=p.getType(this.element);return"number"===i?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:t||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(i)?this.addConstraint("type",i,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(t){return this.trigger("field:"+t)},_handleWhitespace:function(t){return!0===this.options.trimValue&&p.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(t=t.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(t=p.trimString(t)),t},_isDateInput:function(){var t=this.constraintsByName.type;return t&&"date"===t.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var t=[],e={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;e[n]||t.push(e[n]=[]),e[n].push(this.constraints[i])}return t.sort((function(t,e){return e[0].priority-t[0].priority})),t}};var I=function(){this.__class__="FieldMultiple"};I.prototype={addElement:function(t){return this.$elements.push(t),this},_refreshConstraints:function(){var e;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(t("html").has(this.$elements[i]).length){e=this.$elements[i].data("FieldMultiple")._refreshConstraints().constraints;for(var n=0;n<e.length;n++)this.addConstraint(e[n].name,e[n].requirements,e[n].priority,e[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var e=p.getType(this.element);if("radio"===e)return this._findRelated().filter(":checked").val()||"";if("checkbox"===e){var i=[];return this._findRelated().filter(":checked").each((function(){i.push(t(this).val())})),i}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var M=function(i,r,o){this.element=i,this.$element=t(i);var s=this.$element.data("Parsley");if(s)return void 0!==o&&s.parent===window.Parsley&&(s.parent=o,s._resetOptions(s.options)),"object"===e(r)&&n(s.options,r),s;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==o&&"Form"!==o.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=o||window.Parsley,this.init(r)};M.prototype={init:function(t){return this.__class__="Parsley",this.__version__="2.9.2",this.__id__=p.generateID(),this._resetOptions(t),"FORM"===this.element.nodeName||p.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var t=p.getType(this.element);return"radio"===t||"checkbox"===t||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var e,i,n=this;if(this.options.multiple=this.options.multiple||(e=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return p.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),e&&t('input[name="'+e+'"]').each((function(t,e){var i=p.getType(e);"radio"!==i&&"checkbox"!==i||e.setAttribute(n.options.namespace+"multiple",n.options.multiple)}));for(var r=this._findRelated(),o=0;o<r.length;o++)if(void 0!==(i=t(r.get(o)).data("Parsley"))){this.$element.data("FieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(e,i){var n;switch(e){case"parsleyForm":n=t.extend(new A(this.element,this.domOptions,this.options),new m,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=t.extend(new F(this.element,this.domOptions,this.options,this.parent),new m,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=t.extend(new F(this.element,this.domOptions,this.options,this.parent),new I,new m,window.ParsleyExtend)._init();break;default:throw new Error(e+"is not a supported Parsley type")}return this.options.multiple&&p.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==i?(this.$element.data("FieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var L=t.fn.jquery.split(".");if(parseInt(L[0])<=1&&parseInt(L[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
2L.forEach||p.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var R=n(new m,{element:document,$element:t(document),actualizeOptions:null,_resetOptions:null,Factory:M,version:"2.9.2"});n(F.prototype,O.Field,m.prototype),n(A.prototype,O.Form,m.prototype),n(M.prototype,m.prototype),t.fn.parsley=t.fn.psly=function(e){if(this.length>1){var i=[];return this.each((function(){i.push(t(this).parsley(e))})),i}if(0!=this.length)return new M(this[0],e)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),R.options=n(p.objectCreate(g),window.ParsleyConfig),window.ParsleyConfig=R.options,window.Parsley=window.psly=R,R.Utils=p,window.ParsleyUtils={},t.each(p,(function(t,e){"function"==typeof e&&(window.ParsleyUtils[t]=function(){return p.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),p[t].apply(p,arguments)})}));var B=window.Parsley._validatorRegistry=new _(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},t.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),(function(t,e){window.Parsley[e]=function(){return B[e].apply(B,arguments)},window.ParsleyValidator[e]=function(){var t;return p.warnOnce("Accessing the method '".concat(e,"' through Validator is deprecated. Simply call 'window.Parsley.").concat(e,"(...)'")),(t=window.Parsley)[e].apply(t,arguments)}})),window.Parsley.UI=O,window.ParsleyUI={removeError:function(t,e,i){var n=!0!==i;return p.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),t.removeError(e,{updateClass:n})},getErrorsMessages:function(t){return p.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),t.getErrorsMessages()}},t.each("addError updateError".split(" "),(function(t,e){window.ParsleyUI[e]=function(t,i,n,r,o){var s=!0!==o;return p.warnOnce("Accessing UI is deprecated. Call '".concat(e,"' on the instance directly. Please comment in issue 1073 as to your need to call this method.")),t[e](i,{message:n,assert:r,updateClass:s})}})),!1!==window.ParsleyConfig.autoBind&&t((function(){t("[data-parsley-validate]").length&&t("[data-parsley-validate]").parsley()}));var $=t({}),N=function(){p.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")};function z(t,e){return t.parsleyAdaptedCallback||(t.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),t.apply(e||$,i)}),t.parsleyAdaptedCallback}var V="parsley:";function W(t){return 0===t.lastIndexOf(V,0)?t.substr(V.length):t}function H(){var e=this,r=window||i.g;n(this,{isNativeEvent:function(t){return t.originalEvent&&!1!==t.originalEvent.isTrusted},fakeInputEvent:function(i){e.isNativeEvent(i)&&t(i.target).trigger("input")},misbehaves:function(i){e.isNativeEvent(i)&&(e.behavesOk(i),t(document).on("change.inputevent",i.data.selector,e.fakeInputEvent),e.fakeInputEvent(i))},behavesOk:function(i){e.isNativeEvent(i)&&t(document).off("input.inputevent",i.data.selector,e.behavesOk).off("change.inputevent",i.data.selector,e.misbehaves)},install:function(){if(!r.inputEventPatched){r.inputEventPatched="0.0.3";for(var i=0,n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'];i<n.length;i++){var o=n[i];t(document).on("input.inputevent",o,{selector:o},e.behavesOk).on("change.inputevent",o,{selector:o},e.misbehaves)}}},uninstall:function(){delete r.inputEventPatched,t(document).off(".inputevent")}})}return t.listen=function(t,i){var n;if(N(),"object"===e(arguments[1])&&"function"==typeof arguments[2]&&(n=arguments[1],i=arguments[2]),"function"!=typeof i)throw new Error("Wrong parameters");window.Parsley.on(W(t),z(i,n))},t.listenTo=function(t,e,i){if(N(),!(t instanceof F||t instanceof A))throw new Error("Mu
2st give Parsley instance");if("string"!=typeof e||"function"!=typeof i)throw new Error("Wrong parameters");t.on(W(e),z(i))},t.unsubscribe=function(t,e){if(N(),"string"!=typeof t||"function"!=typeof e)throw new Error("Wrong arguments");window.Parsley.off(W(t),e.parsleyAdaptedCallback)},t.unsubscribeTo=function(t,e){if(N(),!(t instanceof F||t instanceof A))throw new Error("Must give Parsley instance");t.off(W(e))},t.unsubscribeAll=function(e){N(),window.Parsley.off(W(e)),t("form,input,textarea,select").each((function(){var i=t(this).data("Parsley");i&&i.off(W(e))}))},t.emit=function(t,e){var i;N();var n=e instanceof F||e instanceof A,r=Array.prototype.slice.call(arguments,n?2:1);r.unshift(W(t)),n||(e=window.Parsley),(i=e).trigger.apply(i,o(r))},t.extend(!0,R,{asyncValidators:{default:{fn:function(t){return t.status>=200&&t.status<300},url:!1},reverse:{fn:function(t){return t.status<200||t.status>=300},url:!1}},addAsyncValidator:function(t,e,i,n){return R.asyncValidators[t]={fn:e,url:i||!1,options:n||{}},this}}),R.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(e,i,n,r){var o,s,a={},l=n.validator||(!0===n.reverse?"reverse":"default");if(void 0===R.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");(i=R.asyncValidators[l].url||i).indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(e)):a[r.element.getAttribute("name")||r.element.getAttribute("id")]=e;var c=t.extend(!0,n.options||{},R.asyncValidators[l].options);o=t.extend(!0,{},{url:i,data:a,type:"GET"},c),r.trigger("field:ajaxoptions",r,o),s=t.param(o),void 0===R._remoteCache&&(R._remoteCache={});var h=R._remoteCache[s]=R._remoteCache[s]||t.ajax(o),u=function(){var e=R.asyncValidators[l].fn.call(r,h,i,n);return e||(e=t.Deferred().reject()),t.when(e)};return h.then(u,u)},priority:-1}),R.on("form:submit",(function(){R._remoteCache={}})),m.prototype.addAsyncValidator=function(){return p.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),R.addAsyncValidator.apply(R,arguments)},R.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same.",euvatin:"It's not a valid VAT Identification Number."}),R.setLocale("en"),(new H).install(),R}(i(1669))},5970(){!function(){"use strict";var t=0,e={};function i(n){if(!n)throw new Error("No options passed to Waypoint constructor");if(!n.element)throw new Error("No element option passed to Waypoint constructor");if(!n.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+t,this.options=i.Adapter.extend({},i.defaults,n),this.element=this.options.element,this.adapter=new i.Adapter(this.element),this.callback=n.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=i.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=i.Context.findOrCreateByElement(this.options.context),i.offsetAliases[this.options.offset]&&(this.options.offset=i.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),e[this.key]=this,t+=1}i.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},i.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},i.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete e[this.key]},i.prototype.disable=function(){return this.enabled=!1,this},i.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},i.prototype.next=function(){return this.group.next(this)},i.prototype.previous=function(){return this.group.previous(this)},i.invokeAll=function(t){var i=[];for(var n in e)i.push(e[n]);for(var r=0,o=i.length;r<o;r++)i[r][t]()},i.destroyAll=function(){i.invokeAll("destroy")},i.disableAll=function(){i.invokeAll("disable")}
2,i.enableAll=function(){for(var t in i.Context.refreshAll(),e)e[t].enabled=!0;return this},i.refreshAll=function(){i.Context.refreshAll()},i.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},i.viewportWidth=function(){return document.documentElement.clientWidth},i.adapters=[],i.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},i.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=i}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}var e=0,i={},n=window.Waypoint,r=window.onload;function o(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+e,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,i[t.waypointContextKey]=this,e+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new o(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}o.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},o.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),n=this.element==this.element.window;t&&e&&!n&&(this.adapter.off(".waypoints"),delete i[this.key])},o.prototype.createThrottledResizeHandler=function(){var t=this;function e(){t.handleResize(),t.didResize=!1}this.adapter.on("resize.waypoints",(function(){t.didResize||(t.didResize=!0,n.requestAnimationFrame(e))}))},o.prototype.createThrottledScrollHandler=function(){var t=this;function e(){t.handleScroll(),t.didScroll=!1}this.adapter.on("scroll.waypoints",(function(){t.didScroll&&!n.isTouch||(t.didScroll=!0,n.requestAnimationFrame(e))}))},o.prototype.handleResize=function(){n.Context.refreshAll()},o.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var n=e[i],r=n.newScroll>n.oldScroll?n.forward:n.backward;for(var o in this.waypoints[i]){var s=this.waypoints[i][o];if(null!==s.triggerPoint){var a=n.oldScroll<s.triggerPoint,l=n.newScroll>=s.triggerPoint;(a&&l||!a&&!l)&&(s.queueTrigger(r),t[s.group.id]=s.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},o.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},o.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},o.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},o.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var n=0,r=t.length;n<r;n++)t[n].destroy()},o.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),r={};for(var o in this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var s=t[o];for(var a in this.waypoints[o]){var l,c,h,u,f=this.waypoints[o][a],d=f.options.offset,p=f.triggerPoint,g=0,m=null==p;f.element!==f.element.window&&(g=f.adapter.offset()[s.offsetProp]),"function"==typeof d?d=d.apply(f):"string"==typeof d&&(d=parseFloat(d),f.options.offset.indexOf("%")>-1&&(d=Math.ceil(s.contextDimension*d/100))),l=s.contextScroll-s.contextOffset,f.triggerPoint=Math.floor(g+l-d),c=p<s.oldScroll,h=f.triggerPoint>=s.oldScroll,u=!c&&!h,!m&&(c&&h)?(f.queueTrigger(s.backward),r[f.group.id]=f.group):(!m&&u||m&&s.oldScroll>=f.triggerPoint)&&(f.queueTrigger(s.forward),r[f.group.id]=f.group)}}return n.requestAnimationFrame((function(){for(var t in r)r[t].flushTriggers()})),this},o.findOrCreateByElement=function(t){return o.findByElement(t)||new o(t)}
2,o.refreshAll=function(){for(var t in i)i[t].refresh()},o.findByElement=function(t){return i[t.waypointContextKey]},window.onload=function(){r&&r(),o.refreshAll()},n.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},n.Context=o}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}var i={vertical:{},horizontal:{}},n=window.Waypoint;function r(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),i[this.axis][this.name]=this}r.prototype.add=function(t){this.waypoints.push(t)},r.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},r.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var n=this.triggerQueues[i],r="up"===i||"left"===i;n.sort(r?e:t);for(var o=0,s=n.length;o<s;o+=1){var a=n[o];(a.options.continuous||o===n.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},r.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i===this.waypoints.length-1?null:this.waypoints[i+1]},r.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},r.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},r.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},r.prototype.first=function(){return this.waypoints[0]},r.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},r.findOrCreate=function(t){return i[t.axis][t.name]||new r(t)},n.Group=r}(),function(){"use strict";var t=window.jQuery,e=window.Waypoint;function i(e){this.$element=t(e)}t.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],(function(t,e){i.prototype[e]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[e].apply(this.$element,t)}})),t.each(["extend","inArray","isEmptyObject"],(function(e,n){i[n]=t[n]})),e.adapters.push({name:"jquery",Adapter:i}),e.Adapter=i}(),function(){"use strict";var t=window.Waypoint;function e(e){return function(){var i=[],n=arguments[0];return e.isFunction(arguments[0])&&((n=e.extend({},arguments[1])).handler=arguments[0]),this.each((function(){var r=e.extend({},n,{element:this});"string"==typeof r.context&&(r.context=e(this).closest(r.context)[0]),i.push(new t(r))})),i}}window.jQuery&&(window.jQuery.fn.waypoint=e(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=e(window.Zepto))}()},1669(t){"use strict";t.exports=jQuery},3362(){},3600(){},7706(){},9575(t,e,i){"use strict";function n(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)"__proto__"!==n&&(t[n]=i[n])}return t}i.r(e),i.d(e,{default:()=>r});var r=function t(e,i){function r(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=n({},i,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in o)o[a]&&(s+="; "+a,!0!==o[a]&&(s+="="+o[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+s}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var i=document.cookie?document.cookie.split("; "):[],n={},r=0;r<i.length;r++){var o=i[r].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(a in n||(n[a]=e.read(s,a)),t===a)break}catch{}}return t?n[t]:n}},remove:function(t,e){r(t,"",n({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,n({},this.attributes,e))},withConverter:function(e){return t(n({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
2URIComponent)}},{path:"/"})}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return e[t].call(o.exports,o,o.exports,n),o.exports}n.m=e,t=[],n.O=(e,i,r,o)=>{if(!i){var s=1/0;for(h=0;h<t.length;h++){for(var[i,r,o]=t[h],a=!0,l=0;l<i.length;l++)(!1&o||s>=o)&&Object.keys(n.O).every((t=>n.O[t](i[l])))?i.splice(l--,1):(a=!1,o<s&&(s=o));if(a){t.splice(h--,1);var c=r();void 0!==c&&(e=c)}}return e}o=o||0;for(var h=t.length;h>0&&t[h-1][2]>o;h--)t[h]=t[h-1];t[h]=[i,r,o]},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={227:0,854:0,677:0};n.O.j=e=>0===t[e];var e=(e,i)=>{var r,o,[s,a,l]=i,c=0;if(s.some((e=>0!==t[e]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var h=l(n)}for(e&&e(i);c<s.length;c++)o=s[c],n.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return n.O(h)},i=self.webpackChunkemixion_cms=self.webpackChunkemixion_cms||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),n.O(void 0,[854,677],(()=>n(2006))),n.O(void 0,[854,677],(()=>n(3996)));var r=n.O(void 0,[854,677],(()=>n(5205)));r=n.O(r)})();
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.