PageSourceSearch

https://festivalcinemania.com/_nuxt/3b38c5f.js

js festivalcinemania.com collected 2026-10-02 05:24:29 UTC 362,241 bytes, 1 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{831:function(t,e,n){(function(e){var n="Expected a function",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,f="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,_=f||d||Function("return this")(),v=Object.prototype.toString,m=Math.max,y=Math.min,x=function(){return _.Date.now()};function w(t,e,r){var o,h,c,l,f,d,_=0,v=!1,w=!1,k=!0;if("function"!=typeof t)throw new TypeError(n);function I(time){var e=o,n=h;return o=h=void 0,_=time,l=t.apply(n,e)}function A(time){var t=time-d;return void 0===d||t>=e||t<0||w&&time-_>=c}function P(){var time=x();if(A(time))return E(time);f=setTimeout(P,function(time){var t=e-(time-d);return w?y(t,c-(time-_)):t}(time))}function E(time){return f=void 0,k&&o?I(time):(o=h=void 0,l)}function T(){var time=x(),t=A(time);if(o=arguments,h=this,d=time,t){if(void 0===f)return function(time){return _=time,f=setTimeout(P,e),v?I(time):l}(d);if(w)return f=setTimeout(P,e),I(d)}return void 0===f&&(f=setTimeout(P,e)),l}return e=S(e)||0,C(r)&&(v=!!r.leading,c=(w="maxWait"in r)?m(S(r.maxWait)||0,e):c,k="trailing"in r?!!r.trailing:k),T.cancel=function(){void 0!==f&&clearTimeout(f),_=0,o=d=h=f=void 0},T.flush=function(){return void 0===f?l:E(x())},T}function C(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function S(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==v.call(t)}(t))return NaN;if(C(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=C(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var n=h.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,r){var o=!0,h=!0;if("function"!=typeof t)throw new TypeError(n);return C(r)&&(o="leading"in r?!!r.leading:o,h="trailing"in r?!!r.trailing:h),w(t,e,{leading:o,maxWait:e,trailing:h})}}).call(this,n(56))},832:function(t,e,n){var r,o,h;(function(c,l){var f=(c=c||n(833)).window,d=c.document,_=new function(){var t=/^(statics|enumerable|beans|preserve)$/,e=[],n=e.slice,r=Object.create,o=Object.getOwnPropertyDescriptor,h=Object.defineProperty,c=e.forEach||function(t,e){for(var i=0,n=this.length;i<n;i++)t.call(e,this[i],i,this)},f=function(t,e){for(var i in this)this.hasOwnProperty(i)&&t.call(e,this[i],i,this)},d=Object.assign||function(t){for(var i=1,e=arguments.length;i<e;i++){var n=arguments[i];for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t},_=function(t,e,n){if(t){var desc=o(t,"length");(desc&&"number"==typeof desc.value?c:f).call(t,e,n=n||t)}return n};function v(e,n,r,c,l){var f={};function d(t,d){"string"==typeof(d=d||(d=o(n,t))&&(d.get?d:d.value))&&"#"===d[0]&&(d=e[d.substring(1)]||d);var _,v="function"==typeof d,y=d,x=l||v&&!d.base?d&&d.get?t in e:e[t]:null;l&&x||(v&&x&&(d.base=x),v&&!1!==c&&(_=t.match(/^([gs]et|is)(([A-Z])(.*))$/))&&(f[_[3].toLowerCase()+_[4]]=_[2]),y&&!v&&y.get&&"function"==typeof y.get&&m.isPlainObject(y)||(y={value:y,writable:!0}),(o(e,t)||{configurable:!0}).configurable&&(y.configurable=!0,y.enumerable=null!=r?r:!_),h(e,t,y))}if(n){for(var _ in n)n.hasOwnProperty(_)&&!t.test(_)&&d(_);for(var _ in f){var v=f[_],y=e["set"+v],x=e["get"+v]||y&&e["is"+v];!x||!0!==c&&0!==x.length||d(_,{get:x,set:y})}}return e}function m(){for(var i=0,t=arguments.length;i<t;i++){var e=arguments[i];e&&d(this,e)}return this}return v(m,{inject:function(t){if(t){var e=!0===t.statics?t:t.statics,n=t.beans,r=t.preserve;e!==t&&v(this.prototype,t,t.enumerable,n,r),v(this,e,null,n,r)}for(var i=1,o=arguments.length;i<o;i++)this.inject(arguments[i]);return this},extend:function(){for(var t,e,n,base=this,i=0,o=arguments.length;i<o&&(!t||!e);i++)n=arguments[i],t=t||n.initialize,e=e||n.prototype;return t=t||function(){base.apply(this,arguments)},e=t.prototype=e||r(this.prototype),h(e,"constructor",{value:t,writable:!0,configurable:!0}),v(t,this),arguments.length&&this.inject.apply(t,arguments),t.base=base,t}}).inject({enumerable:!1,initialize:m,set:m,inject:function(){for(var i=0,t=arguments.length;i<t;i++){var e=arguments[i];e&&v(this,e,e.enumerable,e.beans,e.preserve)}return this},extend:function(){var t=r(this);return t.inject.apply(t,arguments)},each:function(t,e){return _(this,t,e)},clone:function(){return new this.constructor(this)},statics:{set:d,each:_,create:r,define:h,describe:o,clone:function(t){return d(new t.constructor,t)},isPlainObject:function(t){var e=null!=t&&t.constructor;return e&&(e===Object||e===m||"Object"===e.name)},pick:function(a,b){return a!==l?a:b},slice:function(t,e,r){return n.call(t,e,r)}}})};t.exports=_,_.inject({enumerable:!1,toString:function(){return null!=this._id?(this._class||"Object")+(this._name?" '"+this._name+"'":" @"+this._id):"{ "+_.each(this,function(t,e){if(!/^_/.test(e)){var n=typeof t;this.push(e+": "+("number"===n?w.instance.number(t):"string"===n?"'"+t+"'":t))}},[]).join(", ")+" }"},getClassName:function(){return this._class||""},importJSON:function(t){return _.importJSON(t,this)},exportJSON:function(t){return _.exportJSON(this,t)},toJSON:function(){return _.serialize(this)},set:function(t,e){return t&&_.filter(this,t,e,this._prioritize),this}},{beans:!1,statics:{exports:{},extend:function t(){var e=t.base.apply(this,arguments),n=e.prototype._class;return n&&!_.exports[n]&&(_.exports[n]=e),e},equals:function(t,e){if(t===e)return!0;
1if(t&&t.equals)return t.equals(e);if(e&&e.equals)return e.equals(t);if(t&&e&&"object"==typeof t&&"object"==typeof e){if(Array.isArray(t)&&Array.isArray(e)){if((n=t.length)!==e.length)return!1;for(;n--;)if(!_.equals(t[n],e[n]))return!1}else{var n,r=Object.keys(t);if((n=r.length)!==Object.keys(e).length)return!1;for(;n--;){var o=r[n];if(!e.hasOwnProperty(o)||!_.equals(t[o],e[o]))return!1}}return!0}return!1},read:function(t,e,n,r){if(this===_){var o=this.peek(t,e);return t.__index++,o}var h=this.prototype,c=h._readIndex,f=e||c&&t.__index||0,d=t.length,v=t[f];if(r=r||d-f,v instanceof this||n&&n.readNull&&null==v&&r<=1)return c&&(t.__index=f+1),v&&n&&n.clone?v.clone():v;if(v=_.create(h),c&&(v.__read=!0),v=v.initialize.apply(v,f>0||f+r<d?_.slice(t,f,f+r):t)||v,c){t.__index=f+v.__read;var m=v.__filtered;m&&(t.__filtered=m,v.__filtered=l),v.__read=l}return v},peek:function(t,e){return t[t.__index=e||t.__index||0]},remain:function(t){return t.length-(t.__index||0)},readList:function(t,e,n,r){for(var o,h=[],c=e||0,l=r?c+r:t.length,i=c;i<l;i++)h.push(Array.isArray(o=t[i])?this.read(o,0,n):this.read(t,i,n,1));return h},readNamed:function(t,e,n,r,o){var h=this.getNamed(t,e),c=h!==l;if(c){var f=t.__filtered;if(!f){var source=this.getSource(t);(f=t.__filtered=_.create(source)).__unfiltered=source}f[e]=l}return this.read(c?[h]:t,n,r,o)},readSupported:function(t,e){var source=this.getSource(t),n=this,r=!1;return source&&Object.keys(source).forEach(function(o){if(o in e){var h=n.readNamed(t,o);h!==l&&(e[o]=h),r=!0}}),r},getSource:function(t){var source=t.__source;if(source===l){var e=1===t.length&&t[0];source=t.__source=e&&_.isPlainObject(e)?e:null}return source},getNamed:function(t,e){var source=this.getSource(t);if(source)return e?source[e]:t.__filtered||source},hasNamed:function(t,e){return!!this.getNamed(t,e)},filter:function(t,source,e,n){var r;function o(n){if(!(e&&n in e||r&&n in r)){var o=source[n];o!==l&&(t[n]=o)}}if(n){for(var h,c={},i=0,f=n.length;i<f;i++)(h=n[i])in source&&(o(h),c[h]=!0);r=c}return Object.keys(source.__unfiltered||source).forEach(o),t},isPlainValue:function(t,e){return _.isPlainObject(t)||Array.isArray(t)||e&&"string"==typeof t},serialize:function(t,e,n,r){e=e||{};var o,h=!r;if(h&&(e.formatter=new w(e.precision),r={length:0,definitions:{},references:{},add:function(t,e){var n="#"+t._id,r=this.references[n];if(!r){this.length++;var o=e.call(t),h=t._class;h&&o[0]!==h&&o.unshift(h),this.definitions[n]=o,r=this.references[n]=[n]}return r}}),t&&t._serialize){o=t._serialize(e,r);var c=t._class;!c||t._compactSerialize||!h&&n||o[0]===c||o.unshift(c)}else if(Array.isArray(t)){o=[];for(var i=0,l=t.length;i<l;i++)o[i]=_.serialize(t[i],e,n,r)}else if(_.isPlainObject(t)){o={};var f=Object.keys(t);for(i=0,l=f.length;i<l;i++){var d=f[i];o[d]=_.serialize(t[d],e,n,r)}}else o="number"==typeof t?e.formatter.number(t,e.precision):t;return h&&r.length>0?[["dictionary",r.definitions],o]:o},deserialize:function(t,e,n,r,o){var h=t,c=!n,l=c&&t&&t.length&&"dictionary"===t[0][0];if(n=n||{},Array.isArray(t)){var f=t[0],d="dictionary"===f;if(1==t.length&&/^#/.test(f))return n.dictionary[f];h=[];for(var i=(f=_.exports[f])?1:0,v=t.length;i<v;i++)h.push(_.deserialize(t[i],e,n,d,l));if(f){var m=h;h=e?e(f,m,c||o):new f(m)}}else if(_.isPlainObject(t))for(var y in h={},r&&(n.dictionary=h),t)h[y]=_.deserialize(t[y],e,n);return l?h[1]:h},exportJSON:function(t,e){var n=_.serialize(t,e);return e&&0==e.asString?n:JSON.stringify(n)},importJSON:function(t,e){return _.deserialize("string"==typeof t?JSON.parse(t):t,function(t,n,r){var o=r&&e&&e.constructor===t,h=o?e:_.create(t.prototype);if(1===n.length&&h instanceof O&&(o||!(h instanceof R))){var c=n[0];_.isPlainObject(c)&&(c.insert=!1,o&&(n=n.concat([O.INSERT])))}return(o?h.set:t).apply(h,n),o&&(e=null),h})},push:function(t,e){var n=e.length;if(n<4096)t.push.apply(t,e);else{var r=t.length;t.length+=n;for(var i=0;i<n;i++)t[r+i]=e[i]}return t},splice:function(t,e,n,r){var o=e&&e.length,h=n===l;(n=h?t.length:n)>t.length&&(n=t.length);for(var i=0;i<o;i++)e[i]._index=n+i;if(h)return _.push(t,e),[];var c=[n,r];e&&_.push(c,e);for(var f=t.splice.apply(t,c),d=(i=0,f.length);i<d;i++)f[i]._index=l;for(i=n+o,d=t.length;i<d;i++)t[i]._index=i;return f},capitalize:function(t){return t.replace(/\b[a-z]/g,function(t){return t.toUpperCase()})},camelize:function(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})},hyphenate:function(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}});var v={on:function(t,e){if("string"!=typeof t)_.each(t,function(t,e){this.on(e,t)},this);else{var n=this._eventTypes,r=n&&n[t],o=this._callbacks=this._callbacks||{};-1===(o=o[t]=o[t]||[]).indexOf(e)&&(o.push(e),r&&r.install&&1===o.length&&r.install.call(this,t))}return this},off:function(t,e){if("string"==typeof t){var n,r=this._eventTypes,o=r&&r[t],h=this._callbacks&&this._callbacks[t];return h&&(!e||-1!==(n=h.indexOf(e))&&1===h.length?(o&&o.uninstall&&o.uninstall.call(this,t),delete this._callbacks[t]):-1!==n&&h.splice(n,1)),this}_.each(t,function(t,e){this.off(e,t)},this)},once:function(t,e){return this.on(t,function n(){e.apply(this,arguments),this.off(t,n)})},emit:function(t,e){var n=this._callbacks&&this._callbacks[t];if(!n)return!1;
1var r=_.slice(arguments,1),o=e&&e.target&&!e.currentTarget;n=n.slice(),o&&(e.currentTarget=this);for(var i=0,h=n.length;i<h;i++)if(0==n[i].apply(this,r)){e&&e.stop&&e.stop();break}return o&&delete e.currentTarget,!0},responds:function(t){return!(!this._callbacks||!this._callbacks[t])},attach:"#on",detach:"#off",fire:"#emit",_installEvents:function(t){var e=this._eventTypes,n=this._callbacks,r=t?"install":"uninstall";if(e)for(var o in n)if(n[o].length>0){var h=e[o],c=h&&h[r];c&&c.call(this,o)}},statics:{inject:function t(e){var n=e._events;if(n){var r={};_.each(n,function(t,n){var o="string"==typeof t,h=o?t:n,c=_.capitalize(h),l=h.substring(2).toLowerCase();r[l]=o?{}:t,h="_"+h,e["get"+c]=function(){return this[h]},e["set"+c]=function(t){var e=this[h];e&&this.off(l,e),t&&this.on(l,t),this[h]=t}}),e._eventTypes=r}return t.base.apply(this,arguments)}}},m=_.extend({_class:"PaperScope",initialize:function t(){bt=this,this.settings=new _({applyMatrix:!0,insertItems:!0,handleSize:4,hitTolerance:0}),this.project=null,this.projects=[],this.tools=[],this._id=t._id++,t._scopes[this._id]=this;var e=t.prototype;if(!this.support){var n=mt.getContext(1,1)||{};e.support={nativeDash:"setLineDash"in n||"mozDash"in n,nativeBlendModes:yt.nativeModes},mt.release(n)}if(!this.agent){var r=c.navigator.userAgent.toLowerCase(),o=(/(darwin|win|mac|linux|freebsd|sunos)/.exec(r)||[])[0],h="darwin"===o?"mac":o,l=e.agent=e.browser={platform:h};h&&(l[h]=!0),r.replace(/(opera|chrome|safari|webkit|firefox|msie|trident|atom|node|jsdom)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv\:v?([.\d]+))?/g,function(t,e,n,r,o){if(!l.chrome){var h="opera"===e?r:/^(node|trident)$/.test(e)?o:n;l.version=h,l.versionNumber=parseFloat(h),e={trident:"msie",jsdom:"node"}[e]||e,l.name=e,l[e]=!0}}),l.chrome&&delete l.webkit,l.atom&&delete l.chrome}},version:"0.12.18",getView:function(){var t=this.project;return t&&t._view},getPaper:function(){return this},execute:function(code,t){var e=bt.PaperScript.execute(code,this,t);return ot.updateFocus(),e},install:function(t){var e=this;for(var n in _.each(["project","view","tool"],function(n){_.define(t,n,{configurable:!0,get:function(){return e[n]}})}),this)!/^_/.test(n)&&this[n]&&(t[n]=this[n])},setup:function(element){return bt=this,this.project=new L(element),this},createCanvas:function(t,e){return mt.getCanvas(t,e)},activate:function(){bt=this},clear:function(){for(var t=this.projects,e=this.tools,i=t.length-1;i>=0;i--)t[i].remove();for(i=e.length-1;i>=0;i--)e[i].remove()},remove:function(){this.clear(),delete m._scopes[this._id]},statics:new function(){function t(t){return t+="Attribute",function(e,n){return e[t](n)||e[t]("data-paper-"+n)}}return{_scopes:{},_id:0,get:function(t){return this._scopes[t]||null},getAttribute:t("get"),hasAttribute:t("has")}}}),y=_.extend(v,{initialize:function(t){this._scope=bt,this._index=this._scope[this._list].push(this)-1,!t&&this._scope[this._reference]||this.activate()},activate:function(){if(!this._scope)return!1;var t=this._scope[this._reference];return t&&t!==this&&t.emit("deactivate"),this._scope[this._reference]=this,this.emit("activate",t),!0},isActive:function(){return this._scope[this._reference]===this},remove:function(){return null!=this._index&&(_.splice(this._scope[this._list],null,this._index,1),this._scope[this._reference]==this&&(this._scope[this._reference]=null),this._scope=null,!0)},getView:function(){return this._scope.getView()}}),x={findItemBoundsCollisions:function(t,e,n){function r(t){for(var e=new Array(t.length),i=0;i<t.length;i++){var rect=t[i].getBounds();e[i]=[rect.left,rect.top,rect.right,rect.bottom]}return e}var o=r(t),h=e&&e!==t?r(e):o;return this.findBoundsCollisions(o,h,n||0)},findCurveBoundsCollisions:function(t,e,n,r){function o(t){for(var e=Math.min,n=Math.max,r=new Array(t.length),i=0;i<t.length;i++){var o=t[i];r[i]=[e(o[0],o[2],o[4],o[6]),e(o[1],o[3],o[5],o[7]),n(o[0],o[2],o[4],o[6]),n(o[1],o[3],o[5],o[7])]}return r}var h=o(t),c=e&&e!==t?o(e):h;if(r){for(var l=this.findBoundsCollisions(h,c,n||0,!1,!0),f=this.findBoundsCollisions(h,c,n||0,!0,!0),d=[],i=0,_=l.length;i<_;i++)d[i]={hor:l[i],ver:f[i]};return d}return this.findBoundsCollisions(h,c,n||0)},findBoundsCollisions:function(t,e,n,r,o){var h=!e||t===e,c=h?t:t.concat(e),l=t.length,f=c.length;function d(t,e,n){for(var r=0,o=t.length;r<o;){var h=o+r>>>1;c[t[h]][e]<n?r=h+1:o=h}return r-1}for(var _=r?1:0,v=_+2,m=r?0:1,y=m+2,x=new Array(f),i=0;i<f;i++)x[i]=i;x.sort(function(t,e){return c[t][_]-c[e][_]});var w=[],C=new Array(l);for(i=0;i<f;i++){var S=x[i],k=c[S],I=h?S:S-l,A=S<l,P=h||!A,E=A?[]:null;if(w.length){var T=d(w,v,k[_]-n)+1;if(w.splice(0,T),h&&o){E=E.concat(w);for(var N=0;N<w.length;N++){C[O=w[N]].push(I)}}else{var M=k[y],L=k[m];for(N=0;N<w.length;N++){var O=w[N],V=c[O],R=O<l,z=h||O>=l;(o||(A&&z||P&&R)&&M>=V[m]-n&&L<=V[y]+n)&&(A&&z&&E.push(h?O:O-l),P&&R&&C[O].push(I))}}}if(A&&(t===e&&E.push(S),C[S]=E),w.length){var D=d(w,v,k[v]);w.splice(D+1,0,S)}else w.push(S)}for(i=0;i<C.length;i++){var B=C[i];B&&B.sort(function(t,e){return t-e})}return C}},w=_.extend({initialize:function(t){this.precision=_.pick(t,5),this.multiplier=Math.pow(10,this.precision)},number:function(t){return this.precision<16?Math.round(t*this.multiplier)/this.multiplier:t},pair:function(t,e,n){return this.number(t)+(n||",")+this.number(e)},point:function(t,e){return this.number(t.x)+(e||",")+this.number(t.y)},size:function(t,e){return this.number(t.width)+(e||",")+this.number(t.height)},rectangle:function(t,e){return this.point(t,e)+(e||",")+this.size(t,e)}});w.instance=new w;var C=new function(){var t=[[.5773502691896257],[0,.7745966692414834],[.33998104358485626,.8611363115940526],[0,.5384693101056831,.906179845938664],[.2386191860831969,.6612093864662645,.932469514203152],[0,.4058451513773972,.7415311855993945,.9491079123427585],[.1834346424956498,.525532409916329,.7966664774136267,.9602898564975363],[0,.3242534234038089,.6133714327005904,.8360311073266358,.9681602395076261],[.14887433898163122,.4333953941292472,.6794095682990244,.8650633666889845,.9739065285171717],[0,.26954315595234496,.5190961292068118,.7301520055740494,.8870625997680953,.978228658146057],[.1252334085114689,.3678314989981802,.5873179542866175,.7699026741943047,.9041172563704749,.9815606342467192],[0,.2304583159551348,.44849275103644687,.6423493394403402,.8015780907333099,.9175983992229779,.9841830547185881],[.10805494870734367,.31911236892788974,.5152486363581541,.6872929048116855,.827201315069765,.9284348836635735,.9862838086968123],[0,.20119409399743451,.3941513470775634,.5709721726085388,.7244177313601701,.8482065834104272,.937273392400706,.9879925180204854],[.09501250983763744,.2816035507792589,.45801677765722737,.6178762444026438,.755404408355003,.8656312023878318,.9445750230732326,.9894009349916499]],e=[[1],[.8888888888888888,.5555555555555556],[.6521451548625461,.34785484513745385],[.5688888888888889,.47862867049936647,.23692688505618908],[.46791393457269104,.3607615730481386,.17132449237917036],[.4179591836734694,.3818300505051189,.27970539148927664,.1294849661688697],[.362683783378362,.31370664587788727,.22238103445337448,.10122853629037626],[.3302393550012598,.31234707704000286,.26061069640293544,.1806481606948574,.08127438836157441],[.29552422471475287,.26926671930999635,.21908636251598204,.1494513491505806,.06667134430868814],[.2729250867779006,.26280454451024665,.23319376459199048,.18629021092773426,.1255803694649046,.05566856711617366],[.24914704581340277,.2334925365383548,.20316742672306592,.16007832854334622,.10693932599531843,.04717533638651183],[.2325515532308739,.22628318026289723,.2078160475368885,.17814598076194574,.13887351021978725,.092121499837
172845,.04048400476531588],[.2152638534631578,.2051984637212956,.18553839747793782,.15720316715819355,.12151857068790319,.08015808715976021,.03511946033175186],[.2025782419255613,.19843148532711158,.1861610000155622,.16626920581699392,.13957067792615432,.10715922046717194,.07036604748810812,.03075324199611727],[.1894506104550685,.18260341504492358,.16915651939500254,.14959598881657674,.12462897125553388,.09515851168249279,.062253523938647894,.027152459411754096]],n=Math.abs,r=Math.sqrt,o=Math.pow,h=Math.log2||function(t){return Math.log(t)*Math.LOG2E},c=1e-12,l=112e-18;function f(t,e,n){return t<e?e:t>n?n:t}function d(a,b,t){function e(t){var e=134217729*t,n=t-e+e;return[n,t-n]}var r=b*b-a*t,o=b*b+a*t;if(3*n(r)<o){var h=e(a),c=e(b),l=e(t),p=b*b,q=a*t;r=p-q+(c[0]*c[0]-p+2*c[0]*c[1]+c[1]*c[1]-(h[0]*l[0]-q+h[0]*l[1]+h[1]*l[0]+h[1]*l[1]))}return r}function _(){var t=Math.max.apply(Math,arguments);return t&&(t<1e-8||t>1e8)?o(2,-Math.round(h(t))):0}return{EPSILON:c,MACHINE_EPSILON:l,CURVETIME_EPSILON:1e-8,GEOMETRIC_EPSILON:1e-7,TRIGONOMETRIC_EPSILON:1e-8,ANGULAR_EPSILON:1e-5,KAPPA:4*(r(2)-1)/3,isZero:function(t){return t>=-1e-12&&t<=c},isMachineZero:function(t){return t>=-112e-18&&t<=l},clamp:f,integrate:function(n,a,b,r){for(var o=t[r-2],h=e[r-2],c=.5*(b-a),l=c+a,i=0,f=r+1>>1,d=1&r?h[i++]*n(l):0;i<f;){var _=c*o[i];d+=h[i++]*(n(l+_)+n(l-_))}return c*d},findRoot:function(t,e,r,a,b,o,h){for(var i=0;i<o;i++){var c=t(r),l=c/e(r),d=r-l;if(n(l)<h){r=d;break}c>0?(b=r,r=d<=a?.5*(a+b):d):(a=r,r=d>=b?.5*(a+b):d)}return f(r,a,b)},solveQuadratic:function(a,b,t,e,o,h){var v,m=1/0;if(n(a)<c){if(n(b)<c)return n(t)<c?-1:0;v=-t/b}else{var y=d(a,b*=-.5,t);if(y&&n(y)<l){var x=_(n(a),n(b),n(t));x&&(y=d(a*=x,b*=x,t*=x))}if(y>=-112e-18){var w=y<0?0:r(y),C=b+(b<0?-w:w);0===C?m=-(v=t/a):(v=C/a,m=t/C)}}var S=0,k=null==o,I=o-c,A=h+c;return isFinite(v)&&(k||v>I&&v<A)&&(e[S++]=k?v:f(v,o,h)),m!==v&&isFinite(m)&&(k||m>I&&m<A)&&(e[S++]=k?m:f(m,o,h)),S},solveCubic:function(a,b,t,e,h,d,v){var m,y,x,w,q,S=_(n(a),n(b),n(t),n(e));function k(n){var r=a*(m=n);w=(r+(y=r+b))*m+(x=y*m+t),q=x*m+e}if(S&&(a*=S,b*=S,t*=S,e*=S),n(a)<c)a=b,y=t,x=e,m=1/0;else if(n(e)<c)y=b,x=t,m=0;else{k(-b/a/3);var I=q/a,A=o(n(I),1/3),s=I<0?-1:1,td=-w/a,P=td>0?1.324717957244746*Math.max(A,r(td)):A,E=m-s*P;if(E!==m){do{k(E),E=0===w?m:m-q/w/(1+l)}while(s*E>s*m);n(a)*m*m>n(e/m)&&(y=((x=-e/m)-t)/m)}}var T=C.solveQuadratic(a,y,x,h,d,v),N=null==d;return isFinite(m)&&(0===T||T>0&&m!==h[0]&&m!==h[1])&&(N||m>d-c&&m<v+c)&&(h[T++]=N?m:f(m,d,v)),T}}},S={_id:1,_pools:{},get:function(t){if(t){var e=this._pools[t];return e||(e=this._pools[t]={_id:1}),e._id++}return this._id++}},k=_.extend({_class:"Point",_readIndex:!0,initialize:function(t,e){var n=typeof t,r=this.__read,o=0;if("number"===n){var h="number"==typeof e;this._set(t,h?e:t),r&&(o=h?2:1)}else if("undefined"===n||null===t)this._set(0,0),r&&(o=null===t?1:0);else{var c="string"===n?t.split(/[\s,]+/)||[]:t;o=1,Array.isArray(c)?this._set(+c[0],+(c.length>1?c[1]:c[0])):"x"in c?this._set(c.x||0,c.y||0):"width"in c?this._set(c.width||0,c.height||0):"angle"in c?(this._set(c.length||0,0),this.setAngle(c.angle||0)):(this._set(0,0),o=0)}return r&&(this.__read=o),this},set:"#initialize",_set:function(t,e){return this.x=t,this.y=e,this},equals:function(t){return this===t||t&&(this.x===t.x&&this.y===t.y||Array.isArray(t)&&this.x===t[0]&&this.y===t[1])||!1},clone:function(){return new k(this.x,this.y)},toString:function(){var t=w.instance;return"{ x: "+t.number(this.x)+", y: "+t.number(this.y)+" }"},_serialize:function(t){var e=t.formatter;return[e.number(this.x),e.number(this.y)]},getLength:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},setLength:function(t){if(this.isZero()){var e=this._angle||0;this._set(Math.cos(e)*t,Math.sin(e)*t)}else{var n=t/this.getLength();C.isZero(n)&&this.getAngle(),this._set(this.x*n,this.y*n)}},getAngle:function(){return 180*this.getAngleInRadians.apply(this,arguments)/Math.PI},setAngle:function(t){this.setAngleInRadians.call(this,t*Math.PI/180)},getAngleInDegrees:"#getAngle",setAngleInDegrees:"#setAngle",getAngleInRadians:function(){if(arguments.length){var t=k.read(arguments),div=this.getLength()*t.getLength();if(C.isZero(div))return NaN;var a=this.dot(t)/div;return Math.acos(a<-1?-1:a>1?1:a)}return this.isZero()?this._angle||0:this._angle=Math.atan2(this.y,this.x)},setAngleInRadians:function(t){if(this._angle=t,!this.isZero()){var e=this.getLength();this._set(Math.cos(t)*e,Math.sin(t)*e)}},getQuadrant:function(){return this.x>=0?this.y>=0?1:4:this.y>=0?2:3}},{beans:!1,getDirectedAngle:function(){var t=k.read(arguments);return 180*Math.atan2(this.cross(t),this.dot(t))/Math.PI},getDistance:function(){var t=arguments,e=k.read(t),n=e.x-this.x,r=e.y-this.y,o=n*n+r*r;return _.read(t)?o:Math.sqrt(o)},normalize:function(t){t===l&&(t=1);var e=this.getLength(),n=0!==e?t/e:0,r=new k(this.x*n,this.y*n);return n>=0&&(r._angle=this._angle),r},rotate:function(t,e){if(0===t)return this.clone();t=t*Math.PI/180;var n=e?this.subtract(e):this,r=Math.sin(t),o=Math.cos(t);return n=new k(n.x*o-n.y*r,n.x*r+n.y*o),e?n.add(e):n},transform:function(t){return t?t._transformPoint(this):this},add:function(){var t=k.read(arguments);return new k(this.x+t.x,this.y+t.y)},subtract:function(){var t=k.read(arguments);return new k(this.x-t.x,this.y-t.y)},multiply:function(){var t=k.read(arguments);return new k(this.x*t.x,this.y*t.y)},divide:function(){var t=k.read(arguments);return new k(this.x/t.x,this.y/t.y)},modulo:function(){var t=k.read(arguments);return new k(this.x%t.x,this.y%t.y)},negate:function(){return new k(-this.x,-this.y)},isInside:function(){return E.read(arguments).contains(this)},isClose:function(){var t=arguments,e=k.read(t),n=_.read(t);return this.getDistance(e)<=n},isCollinear:function(){var t=k.read(arguments);return k.isCollinear(this.x,this.y,t.x,t.y)},isColinear:"#isCollinear",isOrthogonal:function(){var t=k.read(arguments);return k.isOrthogonal(this.x,this.y,t.x,t.y)},isZero:function(){var t=C.isZero;return t(this.x)&&t(this.y)},isNaN:function(){return isNaN(this.x)||isNaN(this.y)},isInQuadrant:function(q){return this.x*(q>1&&q<4?-1:1)>=0&&this.y*(q>2?-1:1)>=0},dot:function(){var t=k.read(arguments);return this.x*t.x+this.y*t.y},cross:function(){var t=k.read(arguments);return this.x*t.y-this.y*t.x},project:function(){var t=k.read(arguments),e=t.isZero()?0:this.dot(t)/t.dot(t);return new k(t.x*e,t.y*e)},statics:{min:function(){var t=arguments,e=k.read(t),n=k.read(t);return new k(Math.min(e.x,n.x),Math.min(e.y,n.y))},max:function(){var t=arguments,e=k.read(t),n=k.read(t);return new k(Math.max(e.x,n.x),Math.max(e.y,n.y))},random:function(){return new k(Math.random(),Math.random())},isCollinear:function(t,e,n,r){return Math.abs(t*r-e*n)<=1e-8*Math.sqrt((t*t+e*e)*(n*n+r*r))},isOrthogonal:function(t,e,n,r){return Math.abs(t*n+e*r)<=1e-8*Math.sqrt((t*t+e*e)*(n*n+r*r))}}},_.each(["round","ceil","floor","abs"],function(t){var e=Math[t];this[t]=function(){return new k(e(this.x),e(this.y))}},{})),I=k.extend({initialize:function(t,e,n,r){this._x=t,this._y=e,this._owner=n,this._setter=r}
1,_set:function(t,e,n){return this._x=t,this._y=e,n||this._owner[this._setter](this),this},getX:function(){return this._x},setX:function(t){this._x=t,this._owner[this._setter](this)},getY:function(){return this._y},setY:function(t){this._y=t,this._owner[this._setter](this)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(t){this._owner._changeSelection(this._getSelection(),t)},_getSelection:function(){return"setPosition"===this._setter?4:0}}),A=_.extend({_class:"Size",_readIndex:!0,initialize:function(t,e){var n=typeof t,r=this.__read,o=0;if("number"===n){var h="number"==typeof e;this._set(t,h?e:t),r&&(o=h?2:1)}else if("undefined"===n||null===t)this._set(0,0),r&&(o=null===t?1:0);else{var c="string"===n?t.split(/[\s,]+/)||[]:t;o=1,Array.isArray(c)?this._set(+c[0],+(c.length>1?c[1]:c[0])):"width"in c?this._set(c.width||0,c.height||0):"x"in c?this._set(c.x||0,c.y||0):(this._set(0,0),o=0)}return r&&(this.__read=o),this},set:"#initialize",_set:function(t,e){return this.width=t,this.height=e,this},equals:function(t){return t===this||t&&(this.width===t.width&&this.height===t.height||Array.isArray(t)&&this.width===t[0]&&this.height===t[1])||!1},clone:function(){return new A(this.width,this.height)},toString:function(){var t=w.instance;return"{ width: "+t.number(this.width)+", height: "+t.number(this.height)+" }"},_serialize:function(t){var e=t.formatter;return[e.number(this.width),e.number(this.height)]},add:function(){var t=A.read(arguments);return new A(this.width+t.width,this.height+t.height)},subtract:function(){var t=A.read(arguments);return new A(this.width-t.width,this.height-t.height)},multiply:function(){var t=A.read(arguments);return new A(this.width*t.width,this.height*t.height)},divide:function(){var t=A.read(arguments);return new A(this.width/t.width,this.height/t.height)},modulo:function(){var t=A.read(arguments);return new A(this.width%t.width,this.height%t.height)},negate:function(){return new A(-this.width,-this.height)},isZero:function(){var t=C.isZero;return t(this.width)&&t(this.height)},isNaN:function(){return isNaN(this.width)||isNaN(this.height)},statics:{min:function(t,e){return new A(Math.min(t.width,e.width),Math.min(t.height,e.height))},max:function(t,e){return new A(Math.max(t.width,e.width),Math.max(t.height,e.height))},random:function(){return new A(Math.random(),Math.random())}}},_.each(["round","ceil","floor","abs"],function(t){var e=Math[t];this[t]=function(){return new A(e(this.width),e(this.height))}},{})),P=A.extend({initialize:function(t,e,n,r){this._width=t,this._height=e,this._owner=n,this._setter=r},_set:function(t,e,n){return this._width=t,this._height=e,n||this._owner[this._setter](this),this},getWidth:function(){return this._width},setWidth:function(t){this._width=t,this._owner[this._setter](this)},getHeight:function(){return this._height},setHeight:function(t){this._height=t,this._owner[this._setter](this)}}),E=_.extend({_class:"Rectangle",_readIndex:!0,beans:!0,initialize:function(t,e,n,r){var o,h=arguments,c=typeof t;if("number"===c?(this._set(t,e,n,r),o=4):"undefined"===c||null===t?(this._set(0,0,0,0),o=null===t?1:0):1===h.length&&(Array.isArray(t)?(this._set.apply(this,t),o=1):t.x!==l||t.width!==l?(this._set(t.x||0,t.y||0,t.width||0,t.height||0),o=1):t.from===l&&t.to===l&&(this._set(0,0,0,0),_.readSupported(h,this)&&(o=1))),o===l){var f,d,v=k.readNamed(h,"from"),m=_.peek(h),y=v.x,x=v.y;if(m&&m.x!==l||_.hasNamed(h,"to")){var w=k.readNamed(h,"to");f=w.x-y,d=w.y-x,f<0&&(y=w.x,f=-f),d<0&&(x=w.y,d=-d)}else{var C=A.read(h);f=C.width,d=C.height}this._set(y,x,f,d),o=h.__index}var S=h.__filtered;return S&&(this.__filtered=S),this.__read&&(this.__read=o),this},set:"#initialize",_set:function(t,e,n,r){return this.x=t,this.y=e,this.width=n,this.height=r,this},clone:function(){return new E(this.x,this.y,this.width,this.height)},equals:function(rect){var rt=_.isPlainValue(rect)?E.read(arguments):rect;return rt===this||rt&&this.x===rt.x&&this.y===rt.y&&this.width===rt.width&&this.height===rt.height||!1},toString:function(){var t=w.instance;return"{ x: "+t.number(this.x)+", y: "+t.number(this.y)+", width: "+t.number(this.width)+", height: "+t.number(this.height)+" }"},_serialize:function(t){var e=t.formatter;return[e.number(this.x),e.number(this.y),e.number(this.width),e.number(this.height)]},getPoint:function(t){return new(t?k:I)(this.x,this.y,this,"setPoint")},setPoint:function(){var t=k.read(arguments);this.x=t.x,this.y=t.y},getSize:function(t){return new(t?A:P)(this.width,this.height,this,"setSize")},_fw:1,_fh:1,setSize:function(){var t=A.read(arguments),e=this._sx,n=this._sy,r=t.width,o=t.height;e&&(this.x+=(this.width-r)*e),n&&(this.y+=(this.height-o)*n),this.width=r,this.height=o,this._fw=this._fh=1},getLeft:function(){return this.x},setLeft:function(t){if(!this._fw){var e=t-this.x;this.width-=.5===this._sx?2*e:e}this.x=t,this._sx=this._fw=0},getTop:function(){return this.y},setTop:function(t){if(!this._fh){var e=t-this.y;this.height-=.5===this._sy?2*e:e}this.y=t,this._sy=this._fh=0},getRight:function(){return this.x+this.width},setRight:function(t){if(!this._fw){var e=t-this.x;this.width=.5===this._sx?2*e:e}this.x=t-this.width,this._sx=1,this._fw=0},getBottom:function(){return this.y+this.height},setBottom:function(t){if(!this._fh){var e=t-this.y;this.height=.5===this._sy?2*e:e}this.y=t-this.height,this._sy=1,this._fh=0},getCenterX:function(){return this.x+this.width/2},setCenterX:function(t){this._fw||.5===this._sx?this.x=t-this.width/2:(this._sx&&(this.x+=2*(t-this.x)*this._sx),this.width=2*(t-this.x)),this._sx=.5,this._fw=0},getCenterY:function(){return this.y+this.height/2},setCenterY:function(t){this._fh||.5===this._sy?this.y=t-this.height/2:(this._sy&&(this.y+=2*(t-this.y)*this._sy),this.height=2*(t-this.y)),this._sy=.5,this._fh=0},getCenter:function(t){return new(t?k:I)(this.getCenterX(),this.getCenterY(),this,"setCenter")},setCenter:function(){var t=k.read(arguments);return this.setCenterX(t.x),this.setCenterY(t.y),this},getArea:function(){return this.width*this.height},isEmpty:function(){return 0===this.width||0===this.height},contains:function(t){return t&&t.width!==l||4===(Array.isArray(t)?t:arguments).length?this._containsRectangle(E.read(arguments)):this._containsPoint(k.read(arguments))},_containsPoint:function(t){var e=t.x,n=t.y;return e>=this.x&&n>=this.y&&e<=this.x+this.width&&n<=this.y+this.height}
vendor: 4,266 bytes, line 1
1,_containsRectangle:function(rect){var t=rect.x,e=rect.y;return t>=this.x&&e>=this.y&&t+rect.width<=this.x+this.width&&e+rect.height<=this.y+this.height},intersects:function(){var rect=E.read(arguments),t=_.read(arguments)||0;return rect.x+rect.width>this.x-t&&rect.y+rect.height>this.y-t&&rect.x<this.x+this.width+t&&rect.y<this.y+this.height+t},intersect:function(){var rect=E.read(arguments),t=Math.max(this.x,rect.x),e=Math.max(this.y,rect.y),n=Math.min(this.x+this.width,rect.x+rect.width),r=Math.min(this.y+this.height,rect.y+rect.height);return new E(t,e,n-t,r-e)},unite:function(){var rect=E.read(arguments),t=Math.min(this.x,rect.x),e=Math.min(this.y,rect.y),n=Math.max(this.x+this.width,rect.x+rect.width),r=Math.max(this.y+this.height,rect.y+rect.height);return new E(t,e,n-t,r-e)},include:function(){var t=k.read(arguments),e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x),o=Math.max(this.y+this.height,t.y);return new E(e,n,r-e,o-n)},expand:function(){var t=A.read(arguments),e=t.width,n=t.height;return new E(this.x-e/2,this.y-n/2,this.width+e,this.height+n)},scale:function(t,e){return this.expand(this.width*t-this.width,this.height*(e===l?t:e)-this.height)}},_.each([["Top","Left"],["Top","Right"],["Bottom","Left"],["Bottom","Right"],["Left","Center"],["Top","Center"],["Right","Center"],["Bottom","Center"]],function(t,e){var n=t.join(""),r=/^[RL]/.test(n);e>=4&&(t[1]+=r?"Y":"X");var o=t[r?0:1],h=t[r?1:0],c="get"+o,l="get"+h,f="set"+o,d="set"+h,_="set"+n;this["get"+n]=function(t){return new(t?k:I)(this[c](),this[l](),this,_)},this[_]=function(){var t=k.read(arguments);this[f](t.x),this[d](t.y)}},{beans:!0})),T=E.extend({initialize:function(t,e,n,r,o,h){this._set(t,e,n,r,!0),this._owner=o,this._setter=h},_set:function(t,e,n,r,o){return this._x=t,this._y=e,this._width=n,this._height=r,o||this._owner[this._setter](this),this}},new function(){var t=E.prototype;return _.each(["x","y","width","height"],function(t){var e=_.capitalize(t),n="_"+t;this["get"+e]=function(){return this[n]},this["set"+e]=function(t){this[n]=t,this._dontNotify||this._owner[this._setter](this)}},_.each(["Point","Size","Center","Left","Top","Right","Bottom","CenterX","CenterY","TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],function(e){var n="set"+e;this[n]=function(){this._dontNotify=!0,t[n].apply(this,arguments),this._dontNotify=!1,this._owner[this._setter](this)}},{isSelected:function(){return!!(2&this._owner._selection)},setSelected:function(t){var e=this._owner;e._changeSelection&&e._changeSelection(2,t)}}))}),N=_.extend({_class:"Matrix",initialize:function t(e,n){var r=arguments,o=r.length,h=!0;if(o>=6?this._set.apply(this,r):1===o||2===o?e instanceof t?this._set(e._a,e._b,e._c,e._d,e._tx,e._ty,n):Array.isArray(e)?this._set.apply(this,n?e.concat([n]):e):h=!1:o?h=!1:this.reset(),!h)throw new Error("Unsupported matrix parameters");return this},set:"#initialize",_set:function(a,b,t,e,n,r,o){return this._a=a,this._b=b,this._c=t,this._d=e,this._tx=n,this._ty=r,o||this._changed(),this},_serialize:function(t,e){return _.serialize(this.getValues(),t,!0,e)},_changed:function(){var t=this._owner;t&&(t._applyMatrix?t.transform(null,!0):t._changed(25))},clone:function(){return new N(this._a,this._b,this._c,this._d,this._tx,this._ty)},equals:function(t){return t===this||t&&this._a===t._a&&this._b===t._b&&this._c===t._c&&this._d===t._d&&this._tx===t._tx&&this._ty===t._ty},toString:function(){var t=w.instance;return"[["+[t.number(this._a),t.number(this._c),t.number(this._tx)].join(", ")+"], ["+[t.number(this._b),t.number(this._d),t.number(this._ty)].join(", ")+"]]"},reset:function(t){return this._a=this._d=1,this._b=this._c=this._tx=this._ty=0,t||this._changed(),this},apply:function(t,e){var n=this._owner;return!!n&&(n.transform(null,_.pick(t,!0),e),this.isIdentity())},translate:function(){var t=k.read(arguments),e=t.x,n=t.y;return this._tx+=e*this._a+n*this._c,this._ty+=e*this._b+n*this._d,this._changed(),this},scale:function(){var t=arguments,e=k.read(t),n=k.read(t,0,{readNull:!0});return n&&this.translate(n),this._a*=e.x,this._b*=e.x,this._c*=e.y,this._d*=e.y,n&&this.translate(n.negate()),this._changed(),this},rotate:function(t){t*=Math.PI/180;
1var e=k.read(arguments,1),n=e.x,r=e.y,o=Math.cos(t),h=Math.sin(t),c=n-n*o+r*h,l=r-n*h-r*o,a=this._a,b=this._b,f=this._c,d=this._d;return this._a=o*a+h*f,this._b=o*b+h*d,this._c=-h*a+o*f,this._d=-h*b+o*d,this._tx+=c*a+l*f,this._ty+=c*b+l*d,this._changed(),this},shear:function(){var t=arguments,e=k.read(t),n=k.read(t,0,{readNull:!0});n&&this.translate(n);var a=this._a,b=this._b;return this._a+=e.y*this._c,this._b+=e.y*this._d,this._c+=e.x*a,this._d+=e.x*b,n&&this.translate(n.negate()),this._changed(),this},skew:function(){var t=arguments,e=k.read(t),n=k.read(t,0,{readNull:!0}),r=Math.PI/180,o=new k(Math.tan(e.x*r),Math.tan(e.y*r));return this.shear(o,n)},append:function(t,e){if(t){var n=this._a,r=this._b,o=this._c,h=this._d,c=t._a,l=t._c,f=t._b,d=t._d,_=t._tx,v=t._ty;this._a=c*n+f*o,this._c=l*n+d*o,this._b=c*r+f*h,this._d=l*r+d*h,this._tx+=_*n+v*o,this._ty+=_*r+v*h,e||this._changed()}return this},prepend:function(t,e){if(t){var n=this._a,r=this._b,o=this._c,h=this._d,c=this._tx,l=this._ty,f=t._a,d=t._c,_=t._b,v=t._d,m=t._tx,y=t._ty;this._a=f*n+d*r,this._c=f*o+d*h,this._b=_*n+v*r,this._d=_*o+v*h,this._tx=f*c+d*l+m,this._ty=_*c+v*l+y,e||this._changed()}return this},appended:function(t){return this.clone().append(t)},prepended:function(t){return this.clone().prepend(t)},invert:function(){var a=this._a,b=this._b,t=this._c,e=this._d,n=this._tx,r=this._ty,o=a*e-b*t,h=null;return o&&!isNaN(o)&&isFinite(n)&&isFinite(r)&&(this._a=e/o,this._b=-b/o,this._c=-t/o,this._d=a/o,this._tx=(t*r-e*n)/o,this._ty=(b*n-a*r)/o,h=this),h},inverted:function(){return this.clone().invert()},concatenate:"#append",preConcatenate:"#prepend",chain:"#appended",_shiftless:function(){return new N(this._a,this._b,this._c,this._d,0,0)},_orNullIfIdentity:function(){return this.isIdentity()?null:this},isIdentity:function(){return 1===this._a&&0===this._b&&0===this._c&&1===this._d&&0===this._tx&&0===this._ty},isInvertible:function(){var t=this._a*this._d-this._c*this._b;return t&&!isNaN(t)&&isFinite(this._tx)&&isFinite(this._ty)},isSingular:function(){return!this.isInvertible()},transform:function(t,e,n){return arguments.length<3?this._transformPoint(k.read(arguments)):this._transformCoordinates(t,e,n)},_transformPoint:function(t,e,n){var r=t.x,o=t.y;return e||(e=new k),e._set(r*this._a+o*this._c+this._tx,r*this._b+o*this._d+this._ty,n)},_transformCoordinates:function(t,e,n){for(var i=0,r=2*n;i<r;i+=2){var o=t[i],h=t[i+1];e[i]=o*this._a+h*this._c+this._tx,e[i+1]=o*this._b+h*this._d+this._ty}return e},_transformCorners:function(rect){var t=rect.x,e=rect.y,n=t+rect.width,r=e+rect.height,o=[t,e,n,e,n,r,t,r];return this._transformCoordinates(o,o,4)},_transformBounds:function(t,e,n){for(var r=this._transformCorners(t),o=r.slice(0,2),h=o.slice(),i=2;i<8;i++){var c=r[i],l=1&i;c<o[l]?o[l]=c:c>h[l]&&(h[l]=c)}return e||(e=new E),e._set(o[0],o[1],h[0]-o[0],h[1]-o[1],n)},inverseTransform:function(){return this._inverseTransform(k.read(arguments))},_inverseTransform:function(t,e,n){var a=this._a,b=this._b,r=this._c,o=this._d,h=this._tx,c=this._ty,l=a*o-b*r,f=null;if(l&&!isNaN(l)&&isFinite(h)&&isFinite(c)){var d=t.x-this._tx,_=t.y-this._ty;e||(e=new k),f=e._set((d*o-_*r)/l,(_*a-d*b)/l,n)}return f},decompose:function(){var t,e,n,a=this._a,b=this._b,r=this._c,o=this._d,h=a*o-b*r,c=Math.sqrt,l=Math.atan2,f=180/Math.PI;if(0!==a||0!==b){var d=c(a*a+b*b);t=Math.acos(a/d)*(b>0?1:-1),e=[d,h/d],n=[l(a*r+b*o,d*d),0]}else if(0!==r||0!==o){var s=c(r*r+o*o);t=Math.asin(r/s)*(o>0?1:-1),e=[h/s,s],n=[0,l(a*r+b*o,s*s)]}else t=0,n=e=[0,0];return{translation:this.getTranslation(),rotation:t*f,scaling:new k(e),skewing:new k(n[0]*f,n[1]*f)}},getValues:function(){return[this._a,this._b,this._c,this._d,this._tx,this._ty]},getTranslation:function(){return new k(this._tx,this._ty)},getScaling:function(){return this.decompose().scaling},getRotation:function(){return this.decompose().rotation},applyToContext:function(t){this.isIdentity()||t.transform(this._a,this._b,this._c,this._d,this._tx,this._ty)}},_.each(["a","b","c","d","tx","ty"],function(t){var e=_.capitalize(t),n="_"+t;this["get"+e]=function(){return this[n]},this["set"+e]=function(t){this[n]=t,this._changed()}},{})),M=_.extend({_class:"Line",initialize:function(t,e,n,r,o){var h=!1;arguments.length>=4?(this._px=t,this._py=e,this._vx=n,this._vy=r,h=o):(this._px=t.x,this._py=t.y,this._vx=e.x,this._vy=e.y,h=n),h||(this._vx-=this._px,this._vy-=this._py)},getPoint:function(){return new k(this._px,this._py)},getVector:function(){return new k(this._vx,this._vy)},getLength:function(){return this.getVector().getLength()},intersect:function(line,t){return M.intersect(this._px,this._py,this._vx,this._vy,line._px,line._py,line._vx,line._vy,!0,t)}
1,getSide:function(t,e){return M.getSide(this._px,this._py,this._vx,this._vy,t.x,t.y,!0,e)},getDistance:function(t){return Math.abs(this.getSignedDistance(t))},getSignedDistance:function(t){return M.getSignedDistance(this._px,this._py,this._vx,this._vy,t.x,t.y,!0)},isCollinear:function(line){return k.isCollinear(this._vx,this._vy,line._vx,line._vy)},isOrthogonal:function(line){return k.isOrthogonal(this._vx,this._vy,line._vx,line._vy)},statics:{intersect:function(t,e,n,r,o,h,c,l,f,d){f||(n-=t,r-=e,c-=o,l-=h);var _=n*l-r*c;if(!C.isMachineZero(_)){var v=t-o,m=e-h,y=(c*m-l*v)/_,x=(n*m-r*v)/_,w=-1e-12,S=1+1e-12;if(d||w<y&&y<S&&w<x&&x<S)return d||(y=y<=0?0:y>=1?1:y),new k(t+y*n,e+y*r)}},getSide:function(t,e,n,r,o,h,c,l){c||(n-=t,r-=e);var f=o-t,d=f*r-(h-e)*n;return!l&&C.isMachineZero(d)&&(d=(f*n+f*n)/(n*n+r*r))>=0&&d<=1&&(d=0),d<0?-1:d>0?1:0},getSignedDistance:function(t,e,n,r,o,h,c){return c||(n-=t,r-=e),0===n?r>0?o-t:t-o:0===r?n<0?h-e:e-h:((o-t)*r-(h-e)*n)/(r>n?r*Math.sqrt(1+n*n/(r*r)):n*Math.sqrt(1+r*r/(n*n)))},getDistance:function(t,e,n,r,o,h,c){return Math.abs(M.getSignedDistance(t,e,n,r,o,h,c))}}}),L=y.extend({_class:"Project",_list:"projects",_reference:"project",_compactSerialize:!0,initialize:function(element){y.call(this,!0),this._children=[],this._namedChildren={},this._activeLayer=null,this._currentStyle=new nt(null,null,this),this._view=ot.create(this,element||mt.getCanvas(1,1)),this._selectionItems={},this._selectionCount=0,this._updateVersion=0},_serialize:function(t,e){return _.serialize(this._children,t,!0,e)},_changed:function(t,e){if(1&t){var view=this._view;view&&(view._needsUpdate=!0,!view._requested&&view._autoUpdate&&view.requestUpdate())}var n=this._changes;if(n&&e){var r=this._changesById,o=e._id,h=r[o];h?h.flags|=t:n.push(r[o]={item:e,flags:t})}},clear:function(){for(var t=this._children,i=t.length-1;i>=0;i--)t[i].remove()},isEmpty:function(){return!this._children.length},remove:function t(){return!!t.base.call(this)&&(this._view&&this._view.remove(),!0)},getView:function(){return this._view},getCurrentStyle:function(){return this._currentStyle},setCurrentStyle:function(style){this._currentStyle.set(style)},getIndex:function(){return this._index},getOptions:function(){return this._scope.settings},getLayers:function(){return this._children},getActiveLayer:function(){return this._activeLayer||new R({project:this,insert:!0})},getSymbolDefinitions:function(){var t=[],e={};return this.getItems({class:B,match:function(n){var r=n._definition,o=r._id;return e[o]||(e[o]=!0,t.push(r)),!1}}),t},getSymbols:"getSymbolDefinitions",getSelectedItems:function(){var t=this._selectionItems,e=[];for(var n in t){var r=t[n],o=r._selection;1&o&&r.isInserted()?e.push(r):o||this._updateSelection(r)}return e},_updateSelection:function(t){var e=t._id,n=this._selectionItems;t._selection?n[e]!==t&&(this._selectionCount++,n[e]=t):n[e]===t&&(this._selectionCount--,delete n[e])},selectAll:function(){for(var t=this._children,i=0,e=t.length;i<e;i++)t[i].setFullySelected(!0)},deselectAll:function(){var t=this._selectionItems;for(var i in t)t[i].setFullySelected(!1)},addLayer:function(t){return this.insertLayer(l,t)},insertLayer:function(t,e){if(e instanceof R){e._remove(!1,!0),_.splice(this._children,[e],t,0),e._setProject(this,!0);var n=e._name;n&&e.setName(n),this._changes&&e._changed(5),this._activeLayer||(this._activeLayer=e)}else e=null;return e},_insertItem:function(t,e,n){return e=this.insertLayer(t,e)||(this._activeLayer||this._insertItem(l,new R(O.NO_INSERT),!0)).insertChild(t,e),n&&e.activate&&e.activate(),e},getItems:function(t){return O._getItems(this,t)},getItem:function(t){return O._getItems(this,t,null,null,!0)[0]||null},importJSON:function(t){this.activate();var e=this._activeLayer;return _.importJSON(t,e&&e.isEmpty()&&e)},removeOn:function(t){var e=this._removeSets;if(e){"mouseup"===t&&(e.mousedrag=null);var n=e[t];if(n){for(var r in n){var o=n[r];for(var h in e){var c=e[h];c&&c!=n&&delete c[o._id]}o.remove()}e[t]=null}}},draw:function(t,e,n){this._updateVersion++,t.save(),e.applyToContext(t);for(var r=this._children,param=new _({offset:new k(0,0),pixelRatio:n,viewMatrix:e.isIdentity()?null:e,matrices:[new N],updateMatrix:!0}),i=0,o=r.length;i<o;i++)r[i].draw(t,param);
1if(t.restore(),this._selectionCount>0){t.save(),t.strokeWidth=1;var h=this._selectionItems,c=this._scope.settings.handleSize,l=this._updateVersion;for(var f in h)h[f]._drawSelection(t,e,c,h,l);t.restore()}}}),O=_.extend(v,{statics:{extend:function t(e){return e._serializeFields&&(e._serializeFields=_.set({},this.prototype._serializeFields,e._serializeFields)),t.base.apply(this,arguments)},INSERT:{insert:!0},NO_INSERT:{insert:!1}},_class:"Item",_name:null,_applyMatrix:!0,_canApplyMatrix:!0,_canScaleStroke:!1,_pivot:null,_visible:!0,_blendMode:"normal",_opacity:1,_locked:!1,_guide:!1,_clipMask:!1,_selection:0,_selectBounds:!0,_selectChildren:!1,_serializeFields:{name:null,applyMatrix:null,matrix:new N,pivot:null,visible:!0,blendMode:"normal",opacity:1,locked:!1,guide:!1,clipMask:!1,selected:!1,data:{}},_prioritize:["applyMatrix"]},new function(){var t=["onMouseDown","onMouseUp","onMouseDrag","onClick","onDoubleClick","onMouseMove","onMouseEnter","onMouseLeave"];return _.each(t,function(t){this._events[t]={install:function(t){this.getView()._countItemEvent(t,1)},uninstall:function(t){this.getView()._countItemEvent(t,-1)}}},{_events:{onFrame:{install:function(){this.getView()._animateItem(this,!0)},uninstall:function(){this.getView()._animateItem(this,!1)}},onLoad:{},onError:{}},statics:{_itemHandlers:t}})},{initialize:function(){},_initialize:function(t,e){var n=t&&_.isPlainObject(t),r=n&&!0===t.internal,o=this._matrix=new N,h=n&&t.project||bt.project,c=bt.settings;return this._id=r?null:S.get(),this._parent=this._index=null,this._applyMatrix=this._canApplyMatrix&&c.applyMatrix,e&&o.translate(e),o._owner=this,this._style=new nt(h._currentStyle,this,h),r||n&&0==t.insert||!c.insertItems&&(!n||1!=t.insert)?this._setProject(h):(n&&t.parent||h)._insertItem(l,this,!0),n&&t!==O.NO_INSERT&&t!==O.INSERT&&this.set(t,{internal:!0,insert:!0,project:!0,parent:!0}),n},_serialize:function(t,e){var n={},r=this;function o(o){for(var h in o){var c=r[h];_.equals(c,"leading"===h?1.2*o.fontSize:o[h])||(n[h]=_.serialize(c,t,"data"!==h,e))}}return o(this._serializeFields),this instanceof V||o(this._style._defaults),[this._class,n]},_changed:function(t){var symbol=this._symbol,e=this._parent||symbol,n=this._project;8&t&&(this._bounds=this._position=this._decomposed=l),16&t&&(this._globalMatrix=l),e&&72&t&&O._clearBoundsCache(e),2&t&&O._clearBoundsCache(this),n&&n._changed(t,this),symbol&&symbol._changed(t)},getId:function(){return this._id},getName:function(){return this._name},setName:function(t){if(this._name&&this._removeNamed(),t===+t+"")throw new Error("Names consisting only of numbers are not supported.");var e=this._getOwner();if(t&&e){var n=e._children,r=e._namedChildren;(r[t]=r[t]||[]).push(this),t in n||(n[t]=this)}this._name=t||l,this._changed(256)},getStyle:function(){return this._style},setStyle:function(style){this.getStyle().set(style)}},_.each(["locked","visible","blendMode","opacity","guide"],function(t){var e=_.capitalize(t),n="_"+t,r={locked:256,visible:265};this["get"+e]=function(){return this[n]},this["set"+e]=function(e){e!=this[n]&&(this[n]=e,this._changed(r[t]||257))}},{}),{beans:!0,getSelection:function(){return this._selection},setSelection:function(t){if(t!==this._selection){this._selection=t;var e=this._project;e&&(e._updateSelection(this),this._changed(257))}},_changeSelection:function(t,e){var n=this._selection;this.setSelection(e?n|t:n&~t)},isSelected:function(){if(this._selectChildren)for(var t=this._children,i=0,e=t.length;i<e;i++)if(t[i].isSelected())return!0;return!!(1&this._selection)},setSelected:function(t){if(this._selectChildren)for(var e=this._children,i=0,n=e.length;i<n;i++)e[i].setSelected(t);this._changeSelection(1,t)},isFullySelected:function(){var t=this._children,e=!!(1&this._selection);if(t&&e){for(var i=0,n=t.length;i<n;i++)if(!t[i].isFullySelected())return!1;return!0}return e},setFullySelected:function(t){var e=this._children;if(e)for(var i=0,n=e.length;i<n;i++)e[i].setFullySelected(t);this._changeSelection(1,t)},isClipMask:function(){return this._clipMask},setClipMask:function(t){this._clipMask!=(t=!!t)&&(this._clipMask=t,t&&(this.setFillColor(null),this.setStrokeColor(null)),this._changed(257),this._parent&&this._parent._changed(2048))},getData:function(){return this._data||(this._data={}),this._data},setData:function(data){this._data=data},getPosition:function(t){var e=t?k:I,n=this._position||(this._position=this._getPositionFromBounds());return new e(n.x,n.y,this,"setPosition")},setPosition:function(){this.translate(k.read(arguments).subtract(this.getPosition(!0)))},_getPositionFromBounds:function(t){return this._pivot?this._matrix._transformPoint(this._pivot):(t||this.getBounds()).getCenter(!0)},getPivot:function(){var t=this._pivot;return t?new I(t.x,t.y,this,"setPivot"):null},setPivot:function(){this._pivot=k.read(arguments,0,{clone:!0,readNull:!0}),this._position=l}},_.each({getStrokeBounds:{stroke:!0},getHandleBounds:{handle:!0},getInternalBounds:{internal:!0}},function(t,e){this[e]=function(e){return this.getBounds(e,t)}},{beans:!0,getBounds:function(t,e){var n=e||t instanceof N,r=_.set({},n?e:t,this._boundsOptions);r.stroke&&!this.getStrokeScaling()||(r.cacheItem=this);var rect=this._getCachedBounds(n&&t,r).rect;return arguments.length?rect:new T(rect.x,rect.y,rect.width,rect.height,this,"setBounds")},setBounds:function(){var rect=E.read(arguments),t=this.getBounds(),e=this._matrix,n=new N,r=rect.getCenter();n.translate(r),rect.width==t.width&&rect.height==t.height||(e.isInvertible()||(e.set(e._backup||(new N).translate(e.getTranslation())),t=this.getBounds()),n.scale(0!==t.width?rect.width/t.width:0,0!==t.height?rect.height/t.height:0)),r=t.getCenter(),n.translate(-r.x,-r.y),this.transform(n)},_getBounds:function(t,e){var n=this._children;return n&&n.length?(O._updateBoundsCache(this,e.cacheItem),O._getBounds(n,t,e)):new E},_getBoundsCacheKey:function(t,e){return[t.stroke?1:0,t.handle?1:0,e?1:0].join("")},_getCachedBounds:function(t,e,n){t=t&&t._orNullIfIdentity();var r=e.internal&&!n,o=e.cacheItem,h=r?null:this._matrix._orNullIfIdentity(),c=o&&(!t||t.equals(h))&&this._getBoundsCacheKey(e,r),l=this._bounds;if(O._updateBoundsCache(this._parent||this._symbol,o),c&&l&&c in l)return{rect:(_=l[c]).rect.clone(),nonscaling:_.nonscaling};var f=this._getBounds(t||h,e),rect=f.rect||f,style=this._style,d=f.nonscaling||style.hasStroke()&&!style.getStrokeScaling();if(c){l||(this._bounds=l={});var _=l[c]={rect:rect.clone(),nonscaling:d,internal:r}}return{rect:rect,nonscaling:d}},_getStrokeMatrix:function(t,e){var n=this.getStrokeScaling()?null:e&&e.internal?this:this._parent||this._symbol&&this._symbol._item,r=n?n.getViewMatrix().invert():t;return r&&r._shiftless()},statics:{_updateBoundsCache:function(t,e){if(t&&e){var n=e._id,r=t._boundsCache=t._boundsCache||{ids:{},list:[]};r.ids[n]||(r.list.push(e),r.ids[n]=e)}},_clearBoundsCache:function(t){var e=t._boundsCache;if(e){t._bounds=t._position=t._boundsCache=l;for(var i=0,n=e.list,r=n.length;i<r;i++){var o=n[i];o!==t&&(o._bounds=o._position=l,o._boundsCache&&O._clearBoundsCache(o))}}},_getBounds:function(t,e,n){var r=1/0,o=-r,h=r,c=o,l=!1;n=n||{};for(var i=0,f=t.length;i<f;i++){var d=t[i];if(d._visible&&!d.isEmpty(!0)){var _=d._getCachedBounds(e&&e.appended(d._matrix),n,!0),rect=_.rect;r=Math.min(rect.x,r),h=Math.min(rect.y,h),o=Math.max(rect.x+rect.width,o),c=Math.max(rect.y+rect.height,c),_.nonscaling&&(l=!0)}}return{rect:isFinite(r)?new E(r,h,o-r,c-h):new E,nonscaling:l}}}}),{beans:!0,_decompose:function(){return this._applyMatrix?null:this._decomposed||(this._decomposed=this._matrix.decompose())},getRotation:function(){var t=this._decompose();return t?t.rotation:0},setRotation:function(t){var e=this.getRotation();if(null!=e&&null!=t){var n=this._decomposed;this.rotate(t-e),n&&(n.rotation=t,this._decomposed=n)}},getScaling:function(){var t=this._decompose(),s=t&&t.scaling;return new I(s?s.x:1,s?s.y:1,this,"setScaling")},setScaling:function(){var t=this.getScaling(),e=k.read(arguments,0,{clone:!0,readNull:!0});if(t&&e&&!t.equals(e)){var n=this.getRotation(),r=this._decomposed,o=new N,h=C.isZero;if(h(t.x)||h(t.y))o.translate(r.translation),n&&o.rotate(n),o.scale(e.x,e.y),this._matrix.set(o);else{var c=this.getPosition(!0);o.translate(c),n&&o.rotate(n),o.scale(e.x/t.x,e.y/t.y),n&&o.rotate(-n),o.translate(c.negate()),this.transform(o)}r&&(r.scaling=e,this._decomposed=r)}},getMatrix:function(){return this._matrix},setMatrix:function(){var t=this._matrix;t.set.apply(t,arguments)},getGlobalMatrix:function(t){var e=this._globalMatrix;if(e)for(var n=this._parent,r=[];n;){if(!n._globalMatrix){e=null;for(var i=0,o=r.length;i<o;i++)r[i]._globalMatrix=null;break}r.push(n),n=n._parent}e||(e=this._globalMatrix=this._matrix.clone(),(n=this._parent)&&e.prepend(n.getGlobalMatrix(!0)));return t?e:e.clone()},getViewMatrix:function(){return this.getGlobalMatrix().prepend(this.getView()._matrix)},getApplyMatrix:function(){return this._applyMatrix},setApplyMatrix:function(t){(this._applyMatrix=this._canApplyMatrix&&!!t)&&this.transform(null,!0)},getTransformContent:"#getApplyMatrix",setTransformContent:"#setApplyMatrix"},{getProject:function(){return this._project},_setProject:function(t,e){if(this._project!==t){this._project&&this._installEvents(!1),this._project=t;for(var n=this._children,i=0,r=n&&n.length;i<r;i++)n[i]._setProject(t);e=!0}e&&this._installEvents(!0)},getView:function(){return this._project._view},_installEvents:function t(e){t.base.call(this,e);for(var n=this._children,i=0,r=n&&n.length;i<r;i++)n[i]._installEvents(e)},getLayer:function(){for(var t=this;t=t._parent;)if(t instanceof R)return t;return null},getParent:function(){return this._parent},setParent:function(t){return t.addChild(this)},_getOwner:"#getParent",getChildren:function(){return this._children},setChildren:function(t){this.removeChildren(),this.addChildren(t)},getFirstChild:function(){return this._children&&this._children[0]||null},getLastChild:function(){return this._children&&this._children[this._children.length-1]||null},getNextSibling:function(){var t=this._getOwner();return t&&t._children[this._index+1]||null},getPreviousSibling:function(){var t=this._getOwner();return t&&t._children[this._index-1]||null},getIndex:function(){return this._index},setIndex:function(t){var e=this._parent,n=e&&e._children;n&&e.insertChildren(t in n?t:l,[this])},equals:function(t){return t===this||t&&this._class===t._class&&this._style.equals(t._style)&&this._matrix.equals(t._matrix
1)&&this._locked===t._locked&&this._visible===t._visible&&this._blendMode===t._blendMode&&this._opacity===t._opacity&&this._clipMask===t._clipMask&&this._guide===t._guide&&this._equals(t)||!1},_equals:function(t){return _.equals(this._children,t._children)},clone:function(t){var e=new this.constructor(O.NO_INSERT),n=this._children,r=_.pick(t?t.insert:l,t===l||!0===t),o=_.pick(t?t.deep:l,!0);n&&e.copyAttributes(this),n&&!o||e.copyContent(this),n||e.copyAttributes(this),r&&e.insertAbove(this);var h=this._name,c=this._parent;if(h&&c){n=c._children;for(var f=h,i=1;n[h];)h=f+" "+i++;h!==f&&e.setName(h)}return e},copyContent:function(source){for(var t=source._children,i=0,e=t&&t.length;i<e;i++)this.addChild(t[i].clone(!1),!0)},copyAttributes:function(source,t){this.setStyle(source._style);for(var e=["_locked","_visible","_blendMode","_opacity","_clipMask","_guide"],i=0,n=e.length;i<n;i++){var r=e[i];source.hasOwnProperty(r)&&(this[r]=source[r])}t||this._matrix.set(source._matrix,!0),this.setApplyMatrix(source._applyMatrix),this.setPivot(source._pivot),this.setSelection(source._selection);var data=source._data,o=source._name;this._data=data?_.clone(data):null,o&&this.setName(o)},rasterize:function(t,e){var n,r,o;_.isPlainObject(t)?(n=t.resolution,r=t.insert,o=t.raster):(n=t,r=e),o||(o=new D(O.NO_INSERT));var h=this.getStrokeBounds(),c=(n||this.getView().getResolution())/72,f=h.getTopLeft().floor(),d=h.getBottomRight().ceil(),v=new A(d.subtract(f)),m=v.multiply(c);if(o.setSize(m,!0),!m.isZero()){var y=o.getContext(!0),x=(new N).scale(c).translate(f.negate());y.save(),x.applyToContext(y),this.draw(y,new _({matrices:[x]})),y.restore()}return o._matrix.set((new N).translate(f.add(v.divide(2))).scale(1/c)),(r===l||r)&&o.insertAbove(this),o},contains:function(){var t=this._matrix;return t.isInvertible()&&!!this._contains(t._inverseTransform(k.read(arguments)))},_contains:function(t){var e=this._children;if(e){for(var i=e.length-1;i>=0;i--)if(e[i].contains(t))return!0;return!1}return t.isInside(this.getInternalBounds())},isInside:function(){return E.read(arguments).contains(this.getBounds())},_asPathItem:function(){return new K.Rectangle({rectangle:this.getInternalBounds(),matrix:this._matrix,insert:!1})},intersects:function(t,e){return t instanceof O&&this._asPathItem().getIntersections(t._asPathItem(),null,e,!0).length>0}},new function(){function t(){var t=arguments;return this._hitTest(k.read(t),j.getOptions(t))}function e(){var t=arguments,e=k.read(t),n=j.getOptions(t),r=[];return this._hitTest(e,new _({all:r},n)),r}function n(t,e,n,r){var o=this._children;if(o)for(var i=o.length-1;i>=0;i--){var h=o[i],c=h!==r&&h._hitTest(t,e,n);if(c&&!e.all)return c}return null}return L.inject({hitTest:t,hitTestAll:e,_hitTest:n}),{hitTest:t,hitTestAll:e,_hitTestChildren:n}},{_hitTest:function(t,e,n){if(this._locked||!this._visible||this._guide&&!e.guides||this.isEmpty())return null;var r=this._matrix,o=n?n.appended(r):this.getGlobalMatrix().prepend(this.getView()._matrix),h=Math.max(e.tolerance,1e-12),c=e._tolerancePadding=new A(K._getStrokePadding(h,r._shiftless().invert()));if(!(t=r._inverseTransform(t))||!this._children&&!this.getBounds({internal:!0,stroke:!0,handle:!0}).expand(c.multiply(2))._containsPoint(t))return null;var l,f,d=!(e.guides&&!this._guide||e.selected&&!this.isSelected()||e.type&&e.type!==_.hyphenate(this._class)||e.class&&!(this instanceof e.class)),v=e.match,m=this;function filter(t){return t&&v&&!v(t)&&(t=null),t&&e.all&&e.all.push(t),t}function y(e,n){var r=n?l["get"+n]():m.getPosition();if(t.subtract(r).divide(c).length<=1)return new j(e,m,{name:n?_.hyphenate(n):e,point:r})}var x=e.position,w=e.center,C=e.bounds;if(d&&this._parent&&(x||w||C)){if((w||C)&&(l=this.getInternalBounds()),!(f=x&&y("position")||w&&y("center","Center"))&&C)for(var S=["TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],i=0;i<8&&!f;i++)f=y("bounds",S[i]);f=filter(f)}return f||(f=this._hitTestChildren(t,e,o)||d&&filter(this._hitTestSelf(t,e,o,this.getStrokeScaling()?null:o._shiftless().invert()))||null),f&&f.point&&(f.point=r.transform(f.point)),f},_hitTestSelf:function(t,e){if(e.fill&&this.hasFill()&&this._contains(t))return new j("fill",this)},matches:function(t,e){var n=typeof t;if("object"===n){for(var r in t)if(t.hasOwnProperty(r)&&!this.matches(r,t[r]))return!1;return!0}if("function"===n)return t(this);if("match"===t)return e(this);var o=/^(empty|editable)$/.test(t)?this["is"+_.capitalize(t)]():"type"===t?_.hyphenate(this._class):this[t];if("class"===t){if("function"==typeof e)return this instanceof e;o=this._class}if("function"==typeof e)return!!e(o);if(e){if(e.test)return e.test(o);if(_.isPlainObject(e))return function t(e,n){for(var i in e)if(e.hasOwnProperty(i)){var r=e[i],o=n[i];if(_.isPlainObject(r)&&_.isPlainObject(o)){if(!t(r,o))return!1}else if(!_.equals(r,o))return!1}return!0}(e,o)}return _.equals(o,e)},getItems:function(t){return O._getItems(this,t,this._matrix)},getItem:function(t){return O._getItems(this,t,this._matrix,null,!0)[0]||null},statics:{_getItems:function t(e,n,r,param,o){if(!param){var h="object"==typeof n&&n,c=h&&h.overlapping,l=h&&h.inside,rect=(w=c||l)&&E.read([w]);param={items:[],recursive:h&&!1!==h.recursive,inside:!!l,overlapping:!!c,rect:rect,path:c&&new K.Rectangle({re
1ctangle:rect,insert:!1})},h&&(n=_.filter({},n,{recursive:!0,inside:!0,overlapping:!0}))}var f=e._children,d=param.items;r=(rect=param.rect)&&(r||new N);for(var i=0,v=f&&f.length;i<v;i++){var m=f[i],y=r&&r.appended(m._matrix),x=!0;if(rect){var w=m.getBounds(y);if(!rect.intersects(w))continue;rect.contains(w)||param.overlapping&&(w.contains(rect)||param.path.intersects(m,y))||(x=!1)}if(x&&m.matches(n)&&(d.push(m),o))break;if(!1!==param.recursive&&t(m,n,y,param,o),o&&d.length>0)break}return d}}},{importJSON:function(t){var e=_.importJSON(t,this);return e!==this?this.addChild(e):e},addChild:function(t){return this.insertChild(l,t)},insertChild:function(t,e){var n=e?this.insertChildren(t,[e]):null;return n&&n[0]},addChildren:function(t){return this.insertChildren(this._children.length,t)},insertChildren:function(t,e){var n=this._children;if(n&&e&&e.length>0){for(var r={},i=(e=_.slice(e)).length-1;i>=0;i--){var o=(f=e[i])&&f._id;!f||r[o]?e.splice(i,1):(f._remove(!1,!0),r[o]=!0)}_.splice(n,e,t,0);for(var h=this._project,c=h._changes,l=(i=0,e.length);i<l;i++){var f,d=(f=e[i])._name;f._parent=this,f._setProject(h,!0),d&&f.setName(d),c&&f._changed(5)}this._changed(11)}else e=null;return e},_insertItem:"#insertChild",_insertAt:function(t,e){var n=t&&t._getOwner(),r=t!==this&&n?this:null;return r&&(r._remove(!1,!0),n._insertItem(t._index+e,r)),r},insertAbove:function(t){return this._insertAt(t,1)},insertBelow:function(t){return this._insertAt(t,0)},sendToBack:function(){var t=this._getOwner();return t?t._insertItem(0,this):null},bringToFront:function(){var t=this._getOwner();return t?t._insertItem(l,this):null},appendTop:"#addChild",appendBottom:function(t){return this.insertChild(0,t)},moveAbove:"#insertAbove",moveBelow:"#insertBelow",addTo:function(t){return t._insertItem(l,this)},copyTo:function(t){return this.clone(!1).addTo(t)},reduce:function(t){var e=this._children;if(e&&1===e.length){var n=e[0].reduce(t);return this._parent?(n.insertAbove(this),this.remove()):n.remove(),n}return this},_removeNamed:function(){var t=this._getOwner();if(t){var e=t._children,n=t._namedChildren,r=this._name,o=n[r],h=o?o.indexOf(this):-1;-1!==h&&(e[r]==this&&delete e[r],o.splice(h,1),o.length?e[r]=o[0]:delete n[r])}},_remove:function(t,e){var n=this._getOwner(),r=this._project,o=this._index;return this._style&&this._style._dispose(),!!n&&(this._name&&this._removeNamed(),null!=o&&(r._activeLayer===this&&(r._activeLayer=this.getNextSibling()||this.getPreviousSibling()),_.splice(n._children,null,o,1)),this._installEvents(!1),t&&r._changes&&this._changed(5),e&&n._changed(11,this),this._parent=null,!0)},remove:function(){return this._remove(!0,!0)},replaceWith:function(t){var e=t&&t.insertBelow(this);return e&&this.remove(),e},removeChildren:function(t,e){if(!this._children)return null;t=t||0,e=_.pick(e,this._children.length);for(var n=_.splice(this._children,null,t,e-t),i=n.length-1;i>=0;i--)n[i]._remove(!0,!1);return n.length>0&&this._changed(11),n},clear:"#removeChildren",reverseChildren:function(){if(this._children){this._children.reverse();for(var i=0,t=this._children.length;i<t;i++)this._children[i]._index=i;this._changed(11)}},isEmpty:function(t){var e=this._children,n=e?e.length:0;if(t){for(var i=0;i<n;i++)if(!e[i].isEmpty(t))return!1;return!0}return!n},isEditable:function(){for(var t=this;t;){if(!t._visible||t._locked)return!1;t=t._parent}return!0},hasFill:function(){return this.getStyle().hasFill()},hasStroke:function(){return this.getStyle().hasStroke()},hasShadow:function(){return this.getStyle().hasShadow()},_getOrder:function(t){function e(t){var e=[];do{e.unshift(t)}while(t=t._parent);return e}for(var n=e(this),r=e(t),i=0,o=Math.min(n.length,r.length);i<o;i++)if(n[i]!=r[i])return n[i]._index<r[i]._index?1:-1;return 0},hasChildren:function(){return this._children&&this._children.length>0},isInserted:function(){return!!this._parent&&this._parent.isInserted()},isAbove:function(t){return-1===this._getOrder(t)},isBelow:function(t){return 1===this._getOrder(t)},isParent:function(t){return this._parent===t},isChild:function(t){return t&&t._parent===this},isDescendant:function(t){for(var e=this;e=e._parent;)if(e===t)return!0;return!1},isAncestor:function(t){return!!t&&t.isDescendant(this)},isSibling:function(t){return this._parent===t._parent},isGroupedWith:function(t){for(var e=this._parent;e;){if(e._parent&&/^(Group|Layer|CompoundPath)$/.test(e._class)&&t.isDescendant(e))return!0;e=e._parent}return!1}},_.each(["rotate","scale","shear","skew"],function(t){var e="rotate"===t;this[t]=function(){var n=arguments,r=(e?_:k).read(n),o=k.read(n,0,{readNull:!0});return this.transform((new N)[t](r,o||this.getPosition(!0)))}},{translate:function(){var t=new N;return this.transform(t.translate.apply(t,arguments))},transform:function(t,e,n){var r=this._matrix,o=t&&!t.isIdentity(),h=n&&this._canApplyMatrix||this._applyMatrix&&(o||!r.isIdentity()||e&&this._children);if(!o&&!h)return this;if(o){!t.isInvertible()&&r.isInvertible()&&(r._backup=r.getValues()),r.prepend(t,!0);var style=this._style,c=style.getFillColor(!0),l=style.getStrokeColor(!0);c&&c.transform(t),l&&l.transform(t)}if(h&&(h=this._transformContent(r,e,n))){var f=this._pivot;f&&r._transformPoint(f,f,!0),r.reset(!0),n&&this._canApplyMatrix&&(this._applyMatrix=!0)}var d=this._bounds,_=this._position;(o||h)&&this._changed(25);var v=o&&d&&t.decompose();if(v&&v.skewing.isZero()&&v.rotation%90==0){for(var m in d){var y=d[m];if(y.nonscaling)delete d[m];else if(h||!y.internal){var rect=y.rect;t._transformBounds(rect,rect)}}this._bounds=d;var x=d[this._getBoundsCacheKey(this._boundsOptions||{})];x&&(this._position=this._getPositionFromBounds(x.rect))}else o&&_&&this._pivot&&(this._position=t._transformPoint(_,_));return this},_transformContent:function(t,e,n){var r=this._children;if(r){for(var i=0,o=r.length;i<o;i++)r[i].transform(t,e,n);return!0}},globalToLocal:function(){return this.getGlobalMatrix(!0)._inverseTransform(k.read(arguments))},localToGlobal:function(){return this.getGlobalMatrix(!0)._transformPoint(k.read(arguments))},parentToLocal:function(){return this._matrix._inverseTransform(k.read(arguments))},localToParent:function(){return this._matrix._transformPoint(k.read(arguments))},fitBounds:function(t,e){t=E.read(arguments);var n=this.getBounds(),r=n.height/n.width,o=t.height/t.width,h=(e?r>o:r<o)?t.width/n.width:t.height/n.height,c=new E(new k,new A(n.width*h,n.height*h));c.setCenter(t.getCenter()),this.setBounds(c)}}),{_setStyles:function(t,param,e){var style=this._style,n=this._matrix;if(style.hasFill()&&(t.fillStyle=style.getFillColor().toCanvasStyle(t,n)),style.hasStroke()){t.strokeStyle=style.getStrokeColor().toCanvasStyle(t,n),t.lineWidth=style.getStrokeWidth();var r=style.getStrokeJoin(),o=style.getStrokeCap(),h=style.getMiterLimit();if(r&&(t.lineJoin=r),o&&(t.lineCap=o),h&&(t.miterLimit=h),bt.support.nativeDash){var c=style.getDashArray(),l=style.getDashOffset();c&&c.length&&("setLineDash"in t?(t.setLineDash(c),t.lineDashOffset=l):(t.mozDash=c,t.mozDashOffset=l))}}if(style.hasShadow()){var f=param.pixelRatio||1,d=e._shiftless().prepend((new N).scale(f,f)),_=d.transform(new k(style.getShadowBlur(),0)),v=d.transform(this.getShadowOffset());t.shadowColor=style.getShadowColor().toCanvasStyle(t),t.shadowBlur=_.getLength(),t.shadowOffsetX=v.x,t.shadowOffsetY=v.y}},draw:function(t,param,e){this._updateVersion=this._project._updateVersion;if(this._visible&&0!==this._opacity){var n=param.matrices,r=param.viewMatrix,o=this._matrix,h=n[n.length-1].appended(o);if(h.isInvertible()){r=r?r.appended(h):h,n.push(h),param.updateMatrix&&(this._globalMatrix=h);var c,l,f,d=this._blendMode,_=C.clamp(this._opacity,0,1),v="normal"===d,m=yt.nativeModes[d],y=v&&1===_||param.dontStart||param.clip||(m||v&&_<1)&&this._canComposite(),x=param.pixelRatio||1;if(!y){var w=this.getStrokeBounds(r);if(!w.width||!w.height)return void n.pop();f=param.offset,l=param.offset=w.getTopLeft().floor(),c=t,t=mt.getContext(w.getSize().ceil().add(1).multiply(x)),1!==x&&t.scale(x,x)}t.save();var S=e?e.appended(o):this._canScaleStroke&&!this.getStrokeScaling(!0)&&r,k=!y&&param.clipItem,I=!S||k;if(y?(t.globalAlpha=_,m&&(t.globalCompositeOperation=d)):I&&t.translate(-l.x,-l.y),I&&(y?o:r).applyToContext(t),k&&param.clipItem.draw(t,param.extend({clip:!0})),S){t.setTransform(x,0,0,x,0,0);var A=param.offset;A&&t.translate(-A.x,-A.y)}
1this._draw(t,param,r,S),t.restore(),n.pop(),param.clip&&!param.dontFinish&&t.clip(this.getFillRule()),y||(yt.process(d,t,c,_,l.subtract(f).multiply(x)),mt.release(t),param.offset=f)}}},_isUpdated:function(t){var e=this._parent;if(e instanceof $)return e._isUpdated(t);var n=this._updateVersion===t;return!n&&e&&e._visible&&e._isUpdated(t)&&(this._updateVersion=t,n=!0),n},_drawSelection:function(t,e,n,r,o){var h=this._selection,c=1&h,l=2&h||c&&this._selectBounds,f=4&h;if(this._drawSelected||(c=!1),(c||l||f)&&this._isUpdated(o)){var d,_=this.getSelectedColor(!0)||(d=this.getLayer())&&d.getSelectedColor(!0),v=e.appended(this.getGlobalMatrix(!0)),m=n/2;if(t.strokeStyle=t.fillStyle=_?_.toCanvasStyle(t):"#009dec",c&&this._drawSelected(t,v,r),f){var y=this.getPosition(!0),x=this._parent,w=x?x.localToGlobal(y):y,C=w.x,S=w.y;t.beginPath(),t.arc(C,S,m,0,2*Math.PI,!0),t.stroke();for(var k=[[0,-1],[1,0],[0,1],[-1,0]],I=m,A=n+1,i=0;i<4;i++){var P=k[i],E=P[0],T=P[1];t.moveTo(C+E*I,S+T*I),t.lineTo(C+E*A,S+T*A),t.stroke()}}if(l){var N=v._transformCorners(this.getInternalBounds());t.beginPath();for(i=0;i<8;i++)t[i?"lineTo":"moveTo"](N[i],N[++i]);t.closePath(),t.stroke();for(i=0;i<8;i++)t.fillRect(N[i]-m,N[++i]-m,n,n)}}},_canComposite:function(){return!1}},_.each(["down","drag","up","move"],function(t){this["removeOn"+_.capitalize(t)]=function(){var e={};return e[t]=!0,this.removeOn(e)}},{removeOn:function(t){for(var e in t)if(t[e]){var n="mouse"+e,r=this._project,o=r._removeSets=r._removeSets||{};o[n]=o[n]||{},o[n][this._id]=this}return this}}),{tween:function(t,e,n){n||(n=e,e=t,t=null,n||(n=e,e=null));var r=n&&n.easing,o=n&&n.start,h=null!=n&&("number"==typeof n?n:n.duration),c=new _t(this,t,e,h,r,o);return h&&this.on("frame",function t(e){c._handleFrame(1e3*e.time),c.running||this.off("frame",t)}),c},tweenTo:function(t,e){return this.tween(null,t,e)},tweenFrom:function(t,e){return this.tween(t,null,e)}}),V=O.extend({_class:"Group",_selectBounds:!1,_selectChildren:!0,_serializeFields:{children:[]},initialize:function(t){this._children=[],this._namedChildren={},this._initialize(t)||this.addChildren(Array.isArray(t)?t:arguments)},_changed:function t(e){t.base.call(this,e),2050&e&&(this._clipItem=l)},_getClipItem:function(){var t=this._clipItem;if(t===l){t=null;for(var e=this._children,i=0,n=e.length;i<n;i++)if(e[i]._clipMask){t=e[i];break}this._clipItem=t}return t},isClipped:function(){return!!this._getClipItem()},setClipped:function(t){var e=this.getFirstChild();e&&e.setClipMask(t)},_getBounds:function t(e,n){var r=this._getClipItem();return r?r._getCachedBounds(r._matrix.prepended(e),_.set({},n,{stroke:!1})):t.base.call(this,e,n)},_hitTestChildren:function t(e,n,r){var o=this._getClipItem();return(!o||o.contains(e))&&t.base.call(this,e,n,r,o)},_draw:function(t,param){var e=param.clip,n=!e&&this._getClipItem();param=param.extend({clipItem:n,clip:!1}),e?(t.beginPath(),param.dontStart=param.dontFinish=!0):n&&n.draw(t,param.extend({clip:!0}));for(var r=this._children,i=0,o=r.length;i<o;i++){var h=r[i];h!==n&&h.draw(t,param)}}}),R=V.extend({_class:"Layer",initialize:function(){V.apply(this,arguments)},_getOwner:function(){return this._parent||null!=this._index&&this._project},isInserted:function t(){return this._parent?t.base.call(this):null!=this._index},activate:function(){this._project._activeLayer=this},_hitTestSelf:function(){}}),z=O.extend({_class:"Shape",_applyMatrix:!1,_canApplyMatrix:!1,_canScaleStroke:!0,_serializeFields:{type:null,size:null,radius:null},initialize:function(t,e){this._initialize(t,e)},_equals:function(t){return this._type===t._type&&this._size.equals(t._size)&&_.equals(this._radius,t._radius)},copyContent:function(source){this.setType(source._type),this.setSize(source._size),this.setRadius(source._radius)},getType:function(){return this._type},setType:function(t){this._type=t},getShape:"#getType",setShape:"#setType",getSize:function(){var t=this._size;return new P(t.width,t.height,this,"setSize")},setSize:function(){var t=A.read(arguments);if(this._size){if(!this._size.equals(t)){var e=this._type,n=t.width,r=t.height;"rectangle"===e?this._radius.set(A.min(this._radius,t.divide(2).abs())):"circle"===e?(n=r=(n+r)/2,this._radius=n/2):"ellipse"===e&&this._radius._set(n/2,r/2),this._size._set(n,r),this._changed(9)}}else this._size=t.clone()},getRadius:function(){var t=this._radius;return"circle"===this._type?t:new P(t.width,t.height,this,"setRadius")},setRadius:function(t){var e=this._type;if("circle"===e){if(t===this._radius)return;var n=2*t;this._radius=t,this._size._set(n,n)}else if(t=A.read(arguments),this._radius){if(this._radius.equals(t))return;if(this._radius.set(t),"rectangle"===e){n=A.max(this._size,t.multiply(2));this._size.set(n)}else"ellipse"===e&&this._size._set(2*t.width,2*t.height)}else this._radius=t.clone();this._changed(9)},isEmpty:function(){return!1},toPath:function(t){var path=new(K[_.capitalize(this._type)])({center:new k,size:this._size,radius:this._radius,insert:!1});return path.copyAttributes(this),bt.settings.applyMatrix&&path.setApplyMatrix(!0),(t===l||t)&&path.insertAbove(this),path},toShape:"#clone",_asPathItem:function(){return this.toPath(!1)},_draw:function(t,param,e,n){var style=this._style,r=style.hasFill(),o=style.hasStroke(),h=param.dontFinish||param.clip,c=!n;if(r||o||h){var l=this._type,f=this._radius,d="circle"===l;if(param.dontStart||t.beginPath(),c&&d)t.arc(0,0,f,0,2*Math.PI,!0);else{var _=d?f:f.width,v=d?f:f.height,m=this._size,y=m.width,x=m.height;if(c&&"rectangle"===l&&0===_&&0===v)t.rect(-y/2,-x/2,y,x);else{var w=y/2,C=x/2,S=.44771525016920644,k=_*S,I=v*S,A=[-w,-C+v,-w,-C+I,-w+k,-C,-w+_,-C,w-_,-C,w-k,-C,w,-C+I,w,-C+v,w,C-v,w,C-I,w-k,C,w-_,C,-w+_,C,-w+k,C,-w,C-I,-w,C-v];n&&n.transform(A,A,32),t.moveTo(A[0],A[1]),t.bezierCurveTo(A[2],A[3],A[4],A[5],A[6],A[7]),w!==_&&t.lineTo(A[8],A[9]),t.bezierCurveTo(A[10],A[11],A[12],A[13],A[14],A[15]),C!==v&&t.lineTo(A[16],A[17]),t.bezierCurveTo(A[18],A[19],A[20],A[21],A[22],A[23]),w!==_&&t.lineTo(A[24],A[25]),t.bezierCurveTo(A[26],A[27],A[28],A[29],A[30],A[31])}}t.closePath()}h||!r&&!o||(this._setStyles(t,param,e),r&&(t.fill(style.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),o&&t.stroke())},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_getBounds:function(t,e){var rect=new E(this._size).setCenter(0,0),style=this._style,n=e.stroke&&style.hasStroke()&&style.getStrokeWidth();return t&&(rect=t._transformBounds(rect)),n?rect.expand(K._getStrokePadding(n,this._getStrokeMatrix(t,e))):rect}},new function(){function t(t,e,n){var r=t._radius;if(!r.isZero())for(var o=t._size.divide(2),q=1;q<=4;q++){var h=new k(q>1&&q<4?-1:1,q>2?-1:1),c=h.multiply(o),l=c.subtract(h.multiply(r));if(new E(n?c.add(h.multiply(n)):c,l).contains(e))return{point:l,quadrant:q}}}function e(t,e,n,r){var o=t.divide(e);return(!r||o.isInQuadrant(r))&&o.subtract(o.normalize()).multiply(e).divide(n).length<=1}return{_contains:function e(n){if("rectangle"===this._type){var r=t(this,n);return r?n.subtract(r.point).divide(this._radius).getLength()<=1:e.base.call(this,n)}return n.divide(this.size).getLength()<=.5},_hitTestSelf:function n(r,o,h,c){var l=!1,style=this._style,f=o.stroke&&style.hasStroke(),d=o.fill&&style.hasFill();if(f||d){var _=this._type,v=this._radius,m=f?style.getStrokeWidth()/2:0,y=o._tolerancePadding.add(K._getStrokePadding(m,!style.getStrokeScaling()&&c));if("rectangle"===_){var x=y.multiply(2),w=t(this,r,x);if(w)l=e(r.subtract(w.point),v,y,w.quadrant);else{var rect=new E(this._size).setCenter(0,0),C=rect.expand(x),S=rect.expand(x.negate());l=C._containsPoint(r)&&!S._containsPoint(r)}}else l=e(r,v,y)}return l?new j(f?"stroke":"fill",this):n.base.apply(this,arguments)}}},{statics:new function(){function t(t,e,n,r,o){var h=_.create(z.prototype);return h._type=t,h._size=n,h._radius=r,h._initialize(_.getNamed(o),e),h}return{Circle:function(){var e=arguments,n=k.readNamed(e,"center"),r=_.readNamed(e,"radius");return t("circle",n,new A(2*r),r,e)},Rectangle:function(){var e=arguments,rect=E.readNamed(e,"rectangle"),n=A.min(A.readNamed(e,"radius"),rect.getSize(!0).divide(2));return t("rectangle",rect.getCenter(!0),rect.getSize(!0),n,e)},Ellipse:function(){var e=arguments,ellipse=z._readEllipse(e),n=ellipse.radius;return t("ellipse",ellipse.center,n.multiply(2),n,e)},_readEllipse:function(t){var e,n;if(_.hasNamed(t,"radius"))e=k.readNamed(t,"center"),n=A.readNamed(t,"radius");else{var rect=E.readNamed(t,"rectangle");e=rect.getCenter(!0),n=rect.getSize(!0).divide(2)}return{center:e,radius:n}}}}}),D=O.extend({_class:"Raster",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!1,handle:!1},_serializeFields:{crossOrigin:null,source:null},_prioritize:["crossOrigin"],_smoothing:"low",beans:!0,initialize:function(source,t){if(!this._initialize(source,t!==l&&k.read(arguments))){var image,e=typeof source,object="string"===e?d.getElementById(source):"object"===e?source:null;
1if(object&&object!==O.NO_INSERT)if(object.getContext||null!=object.naturalHeight)image=object;else if(object){var n=A.read(arguments);n.isZero()||(image=mt.getCanvas(n))}image?this.setImage(image):this.setSource(source)}this._size||(this._size=new A,this._loaded=!1)},_equals:function(t){return this.getSource()===t.getSource()},copyContent:function(source){var image=source._image,canvas=source._canvas;if(image)this._setImage(image);else if(canvas){var t=mt.getCanvas(source._size);t.getContext("2d").drawImage(canvas,0,0),this._setImage(t)}this._crossOrigin=source._crossOrigin},getSize:function(){var t=this._size;return new P(t?t.width:0,t?t.height:0,this,"setSize")},setSize:function(t,e){var n=A.read(arguments);if(n.equals(this._size))e&&this.clear();else if(n.width>0&&n.height>0){var element=!e&&this.getElement();this._setImage(mt.getCanvas(n)),element&&this.getContext(!0).drawImage(element,0,0,n.width,n.height)}else this._canvas&&mt.release(this._canvas),this._size=n.clone()},getWidth:function(){return this._size?this._size.width:0},setWidth:function(t){this.setSize(t,this.getHeight())},getHeight:function(){return this._size?this._size.height:0},setHeight:function(t){this.setSize(this.getWidth(),t)},getLoaded:function(){return this._loaded},isEmpty:function(){var t=this._size;return!t||0===t.width&&0===t.height},getResolution:function(){var t=this._matrix,e=new k(0,0).transform(t),u=new k(1,0).transform(t).subtract(e),n=new k(0,1).transform(t).subtract(e);return new A(72/u.getLength(),72/n.getLength())},getPpi:"#getResolution",getImage:function(){return this._image},setImage:function(image){var t=this;function e(e){var view=t.getView(),n=e&&e.type||"load";view&&t.responds(n)&&(bt=view._scope,t.emit(n,new ut(e)))}this._setImage(image),this._loaded?setTimeout(e,0):image&&at.add(image,{load:function(n){t._setImage(image),e(n)},error:e})},_setImage:function(image){this._canvas&&mt.release(this._canvas),image&&image.getContext?(this._image=null,this._canvas=image,this._loaded=!0):(this._image=image,this._canvas=null,this._loaded=!!(image&&image.src&&image.complete)),this._size=new A(image?image.naturalWidth||image.width:0,image?image.naturalHeight||image.height:0),this._context=null,this._changed(1033)},getCanvas:function(){if(!this._canvas){var t=mt.getContext(this._size);try{this._image&&t.drawImage(this._image,0,0),this._canvas=t.canvas}catch(e){mt.release(t)}}return this._canvas},setCanvas:"#setImage",getContext:function(t){return this._context||(this._context=this.getCanvas().getContext("2d")),t&&(this._image=null,this._changed(1025)),this._context},setContext:function(t){this._context=t},getSource:function(){var image=this._image;return image&&image.src||this.toDataURL()},setSource:function(t){var image=new c.Image,e=this._crossOrigin;e&&(image.crossOrigin=e),t&&(image.src=t),this.setImage(image)},getCrossOrigin:function(){var image=this._image;return image&&image.crossOrigin||this._crossOrigin||""},setCrossOrigin:function(t){this._crossOrigin=t;var image=this._image;image&&(image.crossOrigin=t)},getSmoothing:function(){return this._smoothing},setSmoothing:function(t){this._smoothing="string"==typeof t?t:t?"low":"off",this._changed(257)},getElement:function(){return this._canvas||this._loaded&&this._image}},{beans:!1,getSubCanvas:function(){var rect=E.read(arguments),t=mt.getContext(rect.getSize());return t.drawImage(this.getCanvas(),rect.x,rect.y,rect.width,rect.height,0,0,rect.width,rect.height),t.canvas},getSubRaster:function(){var rect=E.read(arguments),t=new D(O.NO_INSERT);return t._setImage(this.getSubCanvas(rect)),t.translate(rect.getCenter().subtract(this.getSize().divide(2))),t._matrix.prepend(this._matrix),t.insertAbove(this),t},toDataURL:function(){var image=this._image,t=image&&image.src;if(/^data:/.test(t))return t;var canvas=this.getCanvas();return canvas?canvas.toDataURL.apply(canvas,arguments):null},drawImage:function(image){var t=k.read(arguments,1);this.getContext(!0).drawImage(image,t.x,t.y)},getAverageColor:function(object){var t,path;if(object?object instanceof Z?(path=object,t=object.getBounds()):"object"==typeof object&&("width"in object?t=new E(object):"x"in object&&(t=new E(object.x-.5,object.y-.5,1,1))):t=this.getBounds(),!t)return null;var e=Math.min(t.width,32),n=Math.min(t.height,32),r=D._sampleContext;r?r.clearRect(0,0,33,33):r=D._sampleContext=mt.getContext(new A(32)),r.save();var o=(new N).scale(e/t.width,n/t.height).translate(-t.x,-t.y);o.applyToContext(r),path&&path.draw(r,new _({clip:!0,matrices:[o]})),this._matrix.applyToContext(r);var element=this.getElement(),h=this._size;
vendor: 4,576 bytes, line 1
1element&&r.drawImage(element,-h.width/2,-h.height/2),r.restore();for(var c=r.getImageData(.5,.5,Math.ceil(e),Math.ceil(n)).data,l=[0,0,0],f=0,i=0,d=c.length;i<d;i+=4){var v=c[i+3];f+=v,v/=255,l[0]+=c[i]*v,l[1]+=c[i+1]*v,l[2]+=c[i+2]*v}for(i=0;i<3;i++)l[i]/=f;return f?tt.read(l):null},getPixel:function(){var t=k.read(arguments),data=this.getContext().getImageData(t.x,t.y,1,1).data;return new tt("rgb",[data[0]/255,data[1]/255,data[2]/255],data[3]/255)},setPixel:function(){var t=arguments,e=k.read(t),n=tt.read(t),r=n._convert("rgb"),o=n._alpha,h=this.getContext(!0),c=h.createImageData(1,1),data=c.data;data[0]=255*r[0],data[1]=255*r[1],data[2]=255*r[2],data[3]=null!=o?255*o:255,h.putImageData(c,e.x,e.y)},clear:function(){var t=this._size;this.getContext(!0).clearRect(0,0,t.width+1,t.height+1)},createImageData:function(){var t=A.read(arguments);return this.getContext().createImageData(t.width,t.height)},getImageData:function(){var rect=E.read(arguments);return rect.isEmpty()&&(rect=new E(this._size)),this.getContext().getImageData(rect.x,rect.y,rect.width,rect.height)},putImageData:function(data){var t=k.read(arguments,1);this.getContext(!0).putImageData(data,t.x,t.y)},setImageData:function(data){this.setSize(data),this.getContext(!0).putImageData(data,0,0)},_getBounds:function(t,e){var rect=new E(this._size).setCenter(0,0);return t?t._transformBounds(rect):rect},_hitTestSelf:function(t){if(this._contains(t)){var e=this;return new j("pixel",e,{offset:t.add(e._size.divide(2)).round(),color:{get:function(){return e.getPixel(this.offset)}}})}},_draw:function(t,param,e){var element=this.getElement();if(element&&element.width>0&&element.height>0){t.globalAlpha=C.clamp(this._opacity,0,1),this._setStyles(t,param,e);var n=this._smoothing,r="off"===n;st.setPrefixed(t,r?"imageSmoothingEnabled":"imageSmoothingQuality",!r&&n),t.drawImage(element,-this._size.width/2,-this._size.height/2)}},_canComposite:function(){return!0}}),B=O.extend({_class:"SymbolItem",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!0},_serializeFields:{symbol:null},initialize:function(t,e){this._initialize(t,e!==l&&k.read(arguments,1))||this.setDefinition(t instanceof F?t:new F(t))},_equals:function(t){return this._definition===t._definition},copyContent:function(source){this.setDefinition(source._definition)},getDefinition:function(){return this._definition},setDefinition:function(t){this._definition=t,this._changed(9)},getSymbol:"#getDefinition",setSymbol:"#setDefinition",isEmpty:function(){return this._definition._item.isEmpty()},_getBounds:function(t,e){var n=this._definition._item;return n._getCachedBounds(n._matrix.prepended(t),e)},_hitTestSelf:function(t,e,n){var r=e.extend({all:!1}),o=this._definition._item._hitTest(t,r,n);return o&&(o.item=this),o},_draw:function(t,param){this._definition._item.draw(t,param)}}),F=_.extend({_class:"SymbolDefinition",initialize:function(t,e){this._id=S.get(),this.project=bt.project,t&&this.setItem(t,e)},_serialize:function(t,e){return e.add(this,function(){return _.serialize([this._class,this._item],t,!1,e)})},_changed:function(t){8&t&&O._clearBoundsCache(this),1&t&&this.project._changed(t)},getItem:function(){return this._item},setItem:function(t,e){t._symbol&&(t=t.clone()),this._item&&(this._item._symbol=null),this._item=t,t.remove(),t.setSelected(!1),e||t.setPosition(new k),t._symbol=this,this._changed(9)},getDefinition:"#getItem",setDefinition:"#setItem",place:function(t){return new B(this,t)},clone:function(){return new F(this._item.clone(!1))},equals:function(symbol){return symbol===this||symbol&&this._item.equals(symbol._item)||!1}}),j=_.extend({_class:"HitResult",initialize:function(t,e,n){this.type=t,this.item=e,n&&this.inject(n)},statics:{getOptions:function(t){var e=t&&_.read(t);return new _({type:null,tolerance:bt.settings.hitTolerance,fill:!e,stroke:!e,segments:!e,handles:!1,ends:!1,position:!1,center:!1,bounds:!1,guides:!1,selected:!1},e)}}}),U=_.extend({_class:"Segment",beans:!0,_selection:0,initialize:function(t,e,n,r,o,h){var c,f,d,_,v=arguments.length;v>0&&(null==t||"object"==typeof t?1===v&&t&&"point"in t?(c=t.point,f=t.handleIn,d=t.handleOut,_=t.selection):(c=t,f=e,d=n,_=r):(c=[t,e],f=n!==l?[n,r]:null,d=o!==l?[o,h]:null)),new H(c,this,"_point"),new H(f,this,"_handleIn"),new H(d,this,"_handleOut"),_&&this.setSelection(_)},_serialize:function(t,e){var n=this._point,r=this._selection,o=r||this.hasHandles()?[n,this._handleIn,this._handleOut]:n;return r&&o.push(r),_.serialize(o,t,!0,e)},_changed:function(t){var path=this._path;if(path){var e,n=path._curves,r=this._index;
1n&&(t&&t!==this._point&&t!==this._handleIn||!(e=r>0?n[r-1]:path._closed?n[n.length-1]:null)||e._changed(),t&&t!==this._point&&t!==this._handleOut||!(e=n[r])||e._changed()),path._changed(41)}},getPoint:function(){return this._point},setPoint:function(){this._point.set(k.read(arguments))},getHandleIn:function(){return this._handleIn},setHandleIn:function(){this._handleIn.set(k.read(arguments))},getHandleOut:function(){return this._handleOut},setHandleOut:function(){this._handleOut.set(k.read(arguments))},hasHandles:function(){return!this._handleIn.isZero()||!this._handleOut.isZero()},isSmooth:function(){var t=this._handleIn,e=this._handleOut;return!t.isZero()&&!e.isZero()&&t.isCollinear(e)},clearHandles:function(){this._handleIn._set(0,0),this._handleOut._set(0,0)},getSelection:function(){return this._selection},setSelection:function(t){var e=this._selection,path=this._path;this._selection=t=t||0,path&&t!==e&&(path._updateSelection(this,e,t),path._changed(257))},_changeSelection:function(t,e){var n=this._selection;this.setSelection(e?n|t:n&~t)},isSelected:function(){return!!(7&this._selection)},setSelected:function(t){this._changeSelection(7,t)},getIndex:function(){return this._index!==l?this._index:null},getPath:function(){return this._path||null},getCurve:function(){var path=this._path,t=this._index;return path?(t>0&&!path._closed&&t===path._segments.length-1&&t--,path.getCurves()[t]||null):null},getLocation:function(){var t=this.getCurve();return t?new G(t,this===t._segment1?0:1):null},getNext:function(){var t=this._path&&this._path._segments;return t&&(t[this._index+1]||this._path._closed&&t[0])||null},smooth:function(t,e,n){var r=t||{},o=r.type,h=r.factor,c=this.getPrevious(),f=this.getNext(),d=(c||this)._point,_=this._point,v=(f||this)._point,m=d.getDistance(_),y=_.getDistance(v);if(o&&"catmull-rom"!==o){if("geometric"!==o)throw new Error("Smoothing method '"+o+"' not supported.");if(c&&f){var x=d.subtract(v),w=h===l?.4:h,C=w*m/(m+y);e||this.setHandleIn(x.multiply(C)),n||this.setHandleOut(x.multiply(C-w))}}else{var a=h===l?.5:h,S=Math.pow(m,a),I=S*S,A=Math.pow(y,a),P=A*A;if(!e&&c){var E=2*P+3*A*S+I,T=3*A*(A+S);this.setHandleIn(0!==T?new k((P*d._x+E*_._x-I*v._x)/T-_._x,(P*d._y+E*_._y-I*v._y)/T-_._y):new k)}if(!n&&f){E=2*I+3*S*A+P,T=3*S*(S+A);this.setHandleOut(0!==T?new k((I*v._x+E*_._x-P*d._x)/T-_._x,(I*v._y+E*_._y-P*d._y)/T-_._y):new k)}}},getPrevious:function(){var t=this._path&&this._path._segments;return t&&(t[this._index-1]||this._path._closed&&t[t.length-1])||null},isFirst:function(){return!this._index},isLast:function(){var path=this._path;return path&&this._index===path._segments.length-1||!1},reverse:function(){var t=this._handleIn,e=this._handleOut,n=t.clone();t.set(e),e.set(n)},reversed:function(){return new U(this._point,this._handleOut,this._handleIn)},remove:function(){return!!this._path&&!!this._path.removeSegment(this._index)},clone:function(){return new U(this._point,this._handleIn,this._handleOut)},equals:function(t){return t===this||t&&this._class===t._class&&this._point.equals(t._point)&&this._handleIn.equals(t._handleIn)&&this._handleOut.equals(t._handleOut)||!1},toString:function(){var t=["point: "+this._point];return this._handleIn.isZero()||t.push("handleIn: "+this._handleIn),this._handleOut.isZero()||t.push("handleOut: "+this._handleOut),"{ "+t.join(", ")+" }"},transform:function(t){this._transformCoordinates(t,new Array(6),!0),this._changed()},interpolate:function(t,e,n){var u=1-n,r=n,o=t._point,h=e._point,c=t._handleIn,l=e._handleIn,f=e._handleOut,d=t._handleOut;this._point._set(u*o._x+r*h._x,u*o._y+r*h._y,!0),this._handleIn._set(u*c._x+r*l._x,u*c._y+r*l._y,!0),this._handleOut._set(u*d._x+r*f._x,u*d._y+r*f._y,!0),this._changed()},_transformCoordinates:function(t,e,n){var r=this._point,o=n&&this._handleIn.isZero()?null:this._handleIn,h=n&&this._handleOut.isZero()?null:this._handleOut,c=r._x,l=r._y,i=2;return e[0]=c,e[1]=l,o&&(e[i++]=o._x+c,e[i++]=o._y+l),h&&(e[i++]=h._x+c,e[i++]=h._y+l),t&&(t._transformCoordinates(e,e,i/2),c=e[0],l=e[1],n?(r._x=c,r._y=l,i=2,o&&(o._x=e[i++]-c,o._y=e[i++]-l),h&&(h._x=e[i++]-c,h._y=e[i++]-l)):(o||(e[i++]=c,e[i++]=l),h||(e[i++]=c,e[i++]=l))),e}}),H=k.extend({initialize:function(t,e,n){var r,o,h;if(t)if((r=t[0])!==l)o=t[1];else{var c=t;(r=c.x)===l&&(r=(c=k.read(arguments)).x),o=c.y,h=c.selected}else r=o=0;this._x=r,this._y=o,this._owner=e,e[n]=this,h&&this.setSelected(!0)},_set:function(t,e){return this._x=t,this._y=e,this._owner._changed(this),this},getX:function(){return this._x},setX:function(t){this._x=t,this._owner._changed(this)},getY:function(){return this._y},setY:function(t){this._y=t,this._owner._changed(this)},isZero:function(){var t=C.isZero;return t(this._x)&&t(this._y)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(t){this._owner._changeSelection(this._getSelection(),t)},_getSelection:function(){var t=this._owner;return this===t._point?1:this===t._handleIn?2:this===t._handleOut?4:0}}),W=_.extend({_class:"Curve",beans:!0,initialize:function(t,e,n,r,o,h,c,l){var f,d,_,v,m,y,x=arguments.length;3===x?(this._path=t,f=e,d=n):x?1===x?"segment1"in t?(f=new U(t.segment1),d=new U(t.segment2)):"point1"in t?(_=t.point1,m=t.handle1,y=t.handle2,v=t.point2):Array.isArray(t)&&(_=[t[0],t[1]],v=[t[6],t[7]],m=[t[2]-t[0],t[3]-t[1]],y=[t[4]-t[6],t[5]-t[7]]):2===x?(f=new U(t),d=new U(e)):4===x?(_=t,m=e,y=n,v=r):8===x&&(_=[t,e],v=[c,l],m=[n-t,r-e],y=[o-c,h-l]):(f=new U,d=new U),this._segment1=f||new U(_,null,m),this._segment2=d||new U(v,y,null)},_serialize:function(t,e){return _.serialize(this.hasHandles()?[this.getPoint1(),this.getHandle1(),this.getHandle2(),this.getPoint2()]:[this.getPoint1(),this.getPoint2()],t,!0,e)},_changed:function(){this._length=this._bounds=l},clone:function(){return new W(this._segment1,this._segment2)},toString:function(){var t=["point1: "+this._segment1._point];return this._segment1._handleOut.isZero()||t.push("handle1: "+this._segment1._handleOut),this._segment2._handleIn.isZero()||t.push("handle2: "+this._segment2._handleIn),t.push("point2: "+this._segment2._point),"{ "+t.join(", ")+" }"},classify:function(){return W.classify(this.getValues())},remove:function(){var t=!1;if(this._path){var e=this._segment2,n=e._handleOut;(t=e.remove())&&this._segment1._handleOut.set(n)}return t},getPoint1:function(){return this._segment1._point},setPoint1:function(){this._segment1._point.set(k.read(arguments))},getPoint2:function(){return this._segment2._point},setPoint2:function(){this._segment2._point.set(k.read(arguments))},getHandle1:function(){return this._segment1._handleOut},setHandle1:function(){this._segment1._handleOut.set(k.read(arguments))},getHandle2:function(){return this._segment2._handleIn},setHandle2:function(){this._segment2._handleIn.set(k.read(arguments))},getSegment1:function(){return this._segment1},getSegment2:function(){return this._segment2},getPath:function(){return this._path},getIndex:function(){return this._segment1._index},getNext:function(){var t=this._path&&this._path._curves;return t&&(t[this._segment1._index+1]||this._path._closed&&t[0])||null},getPrevious:function(){var t=this._path&&this._path._curves;return t&&(t[this._segment1._index-1]||this._path._closed&&t[t.length-1])||null},isFirst:function(){return!this._segment1._index},isLast:function(){var path=this._path;return path&&this._segment1._index===path._curves.length-1||!1},isSelected:function(){return this.getPoint1().isSelected()&&this.getHandle1().isSelected()&&this.getHandle2().isSelected()&&this.getPoint2().isSelected()},setSelected:function(t){this.getPoint1().setSelected(t),this.getHandle1().setSelected(t),this.getHandle2().setSelected(t),this.getPoint2().setSelected(t)},getValues:function(t){return W.getValues(this._segment1,this._segment2,t)},getPoints:function(){for(var t=this.getValues(),e=[],i=0;i<8;i+=2)e.push(new k(t[i],t[i+1]));return e}},{getLength:function(){return null==this._length&&(this._length=W.getLength(this.getValues(),0,1)),this._length},getArea:function(){return W.getArea(this.getValues())},getLine:function(){return new M(this._segment1._point,this._segment2._point)},getPart:function(t,e){return new W(W.getPart(this.getValues(),t,e))},getPartLength:function(t,e){return W.getLength(this.getValues(),t,e)},divideAt:function(t){return this.divideAtTime(t&&t.curve===this?t.time:this.getTimeAt(t))},divideAtTime:function(time,t){var e=null;if(time>=1e-8&&time<=.99999999){var n=W.subdivide(this.getValues(),time),r=n[0],o=n[1],h=t||this.hasHandles(),c=this._segment1,l=this._segment2,path=this._path;h&&(c._handleOut._set(r[2]-r[0],r[3]-r[1]),l._handleIn._set(o[4]-o[
16],o[5]-o[7]));var f=r[6],d=r[7],_=new U(new k(f,d),h&&new k(r[4]-f,r[5]-d),h&&new k(o[2]-f,o[3]-d));path?(path.insert(c._index+1,_),e=this.getNext()):(this._segment2=_,this._changed(),e=new W(_,l))}return e},splitAt:function(t){var path=this._path;return path?path.splitAt(t):null},splitAtTime:function(time){return this.splitAt(this.getLocationAtTime(time))},divide:function(t,e){return this.divideAtTime(t===l?.5:e?t:this.getTimeAt(t))},split:function(t,e){return this.splitAtTime(t===l?.5:e?t:this.getTimeAt(t))},reversed:function(){return new W(this._segment2.reversed(),this._segment1.reversed())},clearHandles:function(){this._segment1._handleOut._set(0,0),this._segment2._handleIn._set(0,0)},statics:{getValues:function(t,e,n,r){var o=t._point,h1=t._handleOut,h2=e._handleIn,h=e._point,c=o.x,l=o.y,f=h.x,d=h.y,_=r?[c,l,c,l,f,d,f,d]:[c,l,c+h1._x,l+h1._y,f+h2._x,d+h2._y,f,d];return n&&n._transformCoordinates(_,_,4),_},subdivide:function(t,e){var n=t[0],r=t[1],o=t[2],h=t[3],c=t[4],f=t[5],d=t[6],_=t[7];e===l&&(e=.5);var u=1-e,v=u*n+e*o,m=u*r+e*h,y=u*o+e*c,x=u*h+e*f,w=u*c+e*d,C=u*f+e*_,S=u*v+e*y,k=u*m+e*x,I=u*y+e*w,A=u*x+e*C,P=u*S+e*I,E=u*k+e*A;return[[n,r,v,m,S,k,P,E],[P,E,I,A,w,C,d,_]]},getMonoCurves:function(t,e){var n=[],r=e?0:1,o=t[r+0],h=t[r+2],c=t[r+4],l=t[r+6];if(o>=h==h>=c&&h>=c==c>=l||W.isStraight(t))n.push(t);else{var a=3*(h-c)-o+l,b=2*(o+c)-4*h,f=h-o,d=[],_=C.solveQuadratic(a,b,f,d,1e-8,.99999999);if(_){d.sort();var v=d[0],m=W.subdivide(t,v);n.push(m[0]),_>1&&(v=(d[1]-v)/(1-v),m=W.subdivide(m[1],v),n.push(m[0])),n.push(m[1])}else n.push(t)}return n},solveCubic:function(t,e,n,r,o,h){var c=t[e],l=t[e+2],f=t[e+4],d=t[e+6],_=0;if(!(c<n&&d<n&&l<n&&f<n||c>n&&d>n&&l>n&&f>n)){var v=3*(l-c),b=3*(f-l)-v,a=d-c-v-b;_=C.solveCubic(a,b,v,c-n,r,o,h)}return _},getTimeOf:function(t,e){var n=new k(t[0],t[1]),r=new k(t[6],t[7]),o=1e-7;if(null===(e.isClose(n,1e-12)?0:e.isClose(r,1e-12)?1:null))for(var h=[e.x,e.y],c=[],l=0;l<2;l++)for(var f=W.solveCubic(t,l,h[l],c,0,1),i=0;i<f;i++){var u=c[i];if(e.isClose(W.getPoint(t,u),o))return u}return e.isClose(n,o)?0:e.isClose(r,o)?1:null},getNearestTime:function(t,e){if(W.isStraight(t)){var n=t[0],r=t[1],o=t[6]-n,h=t[7]-r,c=o*o+h*h;if(0===c)return 0;var u=((e.x-n)*o+(e.y-r)*h)/c;return u<1e-12?0:u>.999999999999?1:W.getTimeOf(t,new k(n+u*o,r+u*h))}var l=1/0,f=0;function d(n){if(n>=0&&n<=1){var r=e.getDistance(W.getPoint(t,n),!0);if(r<l)return l=r,f=n,!0}}for(var i=0;i<=100;i++)d(i/100);for(var _=.005;_>1e-8;)d(f-_)||d(f+_)||(_/=2);return f},getPart:function(t,e,n){var r=e>n;if(r){var o=e;e=n,n=o}return e>0&&(t=W.subdivide(t,e)[1]),n<1&&(t=W.subdivide(t,(n-e)/(1-e))[0]),r?[t[6],t[7],t[4],t[5],t[2],t[3],t[0],t[1]]:t},isFlatEnough:function(t,e){var n=t[0],r=t[1],o=t[2],h=t[3],c=t[4],l=t[5],f=t[6],d=t[7],_=3*o-2*n-f,v=3*h-2*r-d,m=3*c-2*f-n,y=3*l-2*d-r;return Math.max(_*_,m*m)+Math.max(v*v,y*y)<=16*e*e},getArea:function(t){var e=t[0],n=t[1],r=t[2],o=t[3],h=t[4],c=t[5],l=t[6],f=t[7];return 3*((f-n)*(r+h)-(l-e)*(o+c)+o*(e-h)-r*(n-c)+f*(h+e/3)-l*(c+n/3))/20},getBounds:function(t){for(var e=t.slice(0,2),n=e.slice(),r=[0,0],i=0;i<2;i++)W._addBounds(t[i],t[i+2],t[i+4],t[i+6],i,0,e,n,r);return new E(e[0],e[1],n[0]-e[0],n[1]-e[1])},_addBounds:function(t,e,n,r,o,h,c,l,f){function d(t,e){var n=t-e,r=t+e;n<c[o]&&(c[o]=n),r>l[o]&&(l[o]=r)}h/=2;var _=c[o]+h,v=l[o]-h;if(t<_||e<_||n<_||r<_||t>v||e>v||n>v||r>v)if(e<t!=e<r&&n<t!=n<r)d(t,0),d(r,0);else{var a=3*(e-n)-t+r,b=2*(t+n)-4*e,m=e-t,y=C.solveQuadratic(a,b,m,f);d(r,0);for(var i=0;i<y;i++){var x=f[i],u=1-x;1e-8<=x&&x<=.99999999&&d(u*u*u*t+3*u*u*x*e+3*u*x*x*n+x*x*x*r,h)}}}}},_.each(["getBounds","getStrokeBounds","getHandleBounds"],function(t){this[t]=function(){this._bounds||(this._bounds={});var e=this._bounds[t];return e||(e=this._bounds[t]=K[t]([this._segment1,this._segment2],!1,this._path)),e.clone()}},{}),_.each({isStraight:function(t,h1,h2,e){if(h1.isZero()&&h2.isZero())return!0;var n=e.subtract(t);if(n.isZero())return!1;if(n.isCollinear(h1)&&n.isCollinear(h2)){var r=new M(t,e);if(r.getDistance(t.add(h1))<1e-7&&r.getDistance(e.add(h2))<1e-7){var div=n.dot(n),o=n.dot(h1)/div,h=n.dot(h2)/div;return o>=0&&o<=1&&h<=0&&h>=-1}}return!1},isLinear:function(t,h1,h2,e){var n=e.subtract(t).divide(3);return h1.equals(n)&&h2.negate().equals(n)}},function(t,e){this[e]=function(e){var n=this._segment1,r=this._segment2;return t(n._point,n._handleOut,r._handleIn,r._point,e)},this.statics[e]=function(e,n){var r=e[0],o=e[1],h=e[6],c=e[7];return t(new k(r,o),new k(e[2]-r,e[3]-o),new k(e[4]-h,e[5]-c),new k(h,c),n)}},{statics:{},hasHandles:function(){return!this._segment1._handleOut.isZero()||!this._segment2._handleIn.isZero()},hasLength:function(t){return(!this.getPoint1().equals(this.getPoint2())||this.hasHandles())&&this.getLength()>(t||0)},isCollinear:function(t){return t&&this.isStraight()&&t.isStraight()&&this.getLine().isCollinear(t.getLine())},isHorizontal:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).y)<1e-8},isVertical:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).x)<1e-8}}),{beans:!1,getLocationAt:function(t,e){return this.getLocationAtTime(e?t:this.getTimeAt(t))},getLocationAtTime:function(t){return null!=t&&t>=0&&t<=1?new G(this,t):null},getTimeAt:function(t,e){return W.getTimeAt(this.getValues(),t,e)},getParameterAt:"#getTimeAt",getTimesWithTangent:function(){var t=k.read(arguments);return t.isZero()?[]:W.getTimesWithTangent(this.getValues(),t)},getOffsetAtTime:function(t){return this.getPartLength(0,t)},getLocationOf:function(){return this.getLocationAtTime(this.getTimeOf(k.read(arguments)))},getOffsetOf:function(){var t=this.getLocationOf.apply(this,arguments);return t?t.getOffset():null},getTimeOf:function(){return W.getTimeOf(this.getValues(),k.read(arguments))},getParameterOf:"#getTimeOf",getNearestLocation:function(){var t=k.read(arguments),e=this.getValues(),n=W.getNearestTime(e,t),r=W.getPoint(e,n);return new G(this,n,r,null,t.getDistance(r))},getNearestPoint:function(){var t=this.getNearestLocation.apply(this,arguments);return t?t.getPoint():t}},new function(){var t=["getPoint","getTangent","getNormal","getWeightedTangent","getWeightedNormal","getCurvature"];return _.each(t,function(t){this[t+"At"]=function(e,n){var r=this.getValues();return W[t](r,n?e:W.getTimeAt(r,e))},this[t+"AtTime"]=function(time){return W[t](this.getValues(),time)}},{statics:{_evaluateMethods:t}})},new function(){function t(t){var e=t[0],n=t[1],r=t[2],o=t[3],h=t[4],c=t[5],l=t[6],f=t[7],d=9*(r-h)+3*(l-e),_=6*(e+h)-12*r,v=3*(r-e),m=9*(o-c)+3*(f-n),y=6*(n+c)-12*o,x=3*(o-n);return function(t){var e=(d*t+_)*t+v,n=(m*t+y)*t+x;return Math.sqrt(e*e+n*n)}}function e(a,b){return Math.max(2,Math.min(16,Math.ceil(32*Math.abs(b-a))))}function n(t,e,n,r){if(null==e||e<0||e>1)return null;var o=t[0],h=t[1],c=t[2],l=t[3],f=t[4],d=t[5],_=t[6],v=t[7],m=C.isZero;m(c-o)&&m(l-h)&&(c=o,l=h),m(f-_)&&m(d-v)&&(f=_,d=v);var y,x,w=3*(c-o),S=3*(f-c)-w,I=_-o-w-S,A=3*(l-h),P=3*(d-l)-A,E=v-h-A-P;if(0===n)y=0===e?o:1===e?_:((I*e+S)*e+w)*e+o,x=0===e?h:1===e?v:((E*e+P)*e+A)*e+h;else{var T=1e-8,N=1-T;if(e<T?(y=w,x=A):e>N?(y=3*(_-f),x=3*(v-d)):(y=(3*I*e+2*S)*e+w,x=(3*E*e+2*P)*e+A),r){0===y&&0===x&&(e<T||e>N)&&(y=f-c,x=d-l);var M=Math.sqrt(y*y+x*x);M&&(y/=M,x/=M)}if(3===n){f=6*I*e+2*S,d=6*E*e+2*P;var L=Math.pow(y*y+x*x,1.5);y=0!==L?(y*d-x*f)/L:0,x=0}}
1return 2===n?new k(x,-y):new k(y,x)}return{statics:{classify:function(t){var e=t[0],n=t[1],r=t[2],o=t[3],h=t[4],c=t[5],f=t[6],d=t[7],_=r*(n-d)+o*(f-e)+e*d-n*f,v=3*(h*(o-n)+c*(e-r)+r*n-o*e),m=v-_,y=m-_+(e*(d-c)+n*(h-f)+f*c-d*h),x=Math.sqrt(y*y+m*m+v*v),s=0!==x?1/x:0,w=C.isZero,S="serpentine";function k(t,e,n){var r=e!==l,o=r&&e>0&&e<1,h=r&&n>0&&n<1;return!r||(o||h)&&("loop"!==t||o&&h)||(t="arch",o=h=!1),{type:t,roots:o||h?o&&h?e<n?[e,n]:[n,e]:[o?e:n]:null}}if(m*=s,v*=s,w(y*=s))return w(m)?k(w(v)?"line":"quadratic"):k(S,v/(3*m));var I=3*m*m-4*y*v;if(w(I))return k("cusp",m/(2*y));var A=I>0?Math.sqrt(I/3):Math.sqrt(-I),P=2*y;return k(I>0?S:"loop",(m+A)/P,(m-A)/P)},getLength:function(n,a,b,r){if(a===l&&(a=0),b===l&&(b=1),W.isStraight(n)){var o=n;b<1&&(o=W.subdivide(o,b)[0],a/=b),a>0&&(o=W.subdivide(o,a)[1]);var h=o[6]-o[0],c=o[7]-o[1];return Math.sqrt(h*h+c*c)}return C.integrate(r||t(n),a,b,e(a,b))},getTimeAt:function(n,r,o){if(o===l&&(o=r<0?1:0),0===r)return o;var h=Math.abs,c=r>0,a=c?o:0,b=c?1:o,f=t(n),d=W.getLength(n,a,b,f),_=h(r)-d;if(h(_)<1e-12)return c?b:a;if(_>1e-12)return null;var v=r/d,m=0;return C.findRoot(function(t){return m+=C.integrate(f,o,t,e(o,t)),o=t,m-r},f,o+v,a,b,32,1e-12)},getPoint:function(t,e){return n(t,e,0,!1)},getTangent:function(t,e){return n(t,e,1,!0)},getWeightedTangent:function(t,e){return n(t,e,1,!1)},getNormal:function(t,e){return n(t,e,2,!0)},getWeightedNormal:function(t,e){return n(t,e,2,!1)},getCurvature:function(t,e){return n(t,e,3,!1).x},getPeaks:function(t){var e=t[0],n=t[1],r=t[2],o=t[3],h=t[4],c=t[5],l=3*r-e-3*h+t[6],f=3*e-6*r+3*h,d=-3*e+3*r,_=3*o-n-3*c+t[7],v=3*n-6*o+3*c,m=-3*n+3*o,y=[];return C.solveCubic(9*(l*l+_*_),9*(l*f+v*_),2*(f*f+v*v)+3*(d*l+m*_),d*f+v*m,y,1e-8,.99999999),y.sort()}}}},new function(){function t(t,e,n,r,o,h,c){var l=!c&&n.getPrevious()===o,f=!c&&n!==o&&n.getNext()===o,d=1e-8,_=1-d;if(null!==r&&r>=(l?d:0)&&r<=(f?_:1)&&null!==h&&h>=(f?d:0)&&h<=(l?_:1)){var v=new G(n,r,null,c),m=new G(o,h,null,c);v._intersection=m,m._intersection=v,e&&!e(v)||G.insert(t,v,!0)}}function e(r,o,h,c,l,f,d,_,v,m,y,x,w){if(++v>=4096||++_>=40)return v;var C,S,k=o[0],I=o[1],A=o[6],P=o[7],E=M.getSignedDistance,T=E(k,I,A,P,o[2],o[3]),N=E(k,I,A,P,o[4],o[5]),L=T*N>0?3/4:4/9,O=L*Math.min(0,T,N),V=L*Math.max(0,T,N),R=E(k,I,A,P,r[0],r[1]),z=E(k,I,A,P,r[2],r[3]),D=E(k,I,A,P,r[4],r[5]),B=E(k,I,A,P,r[6],r[7]),F=function(t,e,n,r){var o,h=[0,t],c=[1/3,e],l=[2/3,n],f=[1,r],d=e-(2*t+r)/3,_=n-(t+2*r)/3;if(d*_<0)o=[[h,c,f],[h,l,f]];else{var v=d/_;o=[v>=2?[h,c,f]:v<=.5?[h,l,f]:[h,c,l,f],[h,f]]}return(d||_)<0?o.reverse():o}(R,z,D,B),j=F[0],U=F[1];if(0===T&&0===N&&0===R&&0===z&&0===D&&0===B||null==(C=n(j,U,O,V))||null==(S=n(j.reverse(),U.reverse(),O,V)))return v;var H=m+(y-m)*C,G=m+(y-m)*S;if(Math.max(w-x,G-H)<1e-9){var Z=(H+G)/2,u=(x+w)/2;t(l,f,d?c:h,d?u:Z,d?h:c,d?Z:u)}else{r=W.getPart(r,C,S);var K=w-x;if(S-C>.8)if(G-H>K){Z=(H+G)/2;v=e(o,($=W.subdivide(r,.5))[0],c,h,l,f,!d,_,v,x,w,H,Z),v=e(o,$[1],c,h,l,f,!d,_,v,x,w,Z,G)}else{var $;u=(x+w)/2;v=e(($=W.subdivide(o,.5))[0],r,c,h,l,f,!d,_,v,x,u,H,G),v=e($[1],r,c,h,l,f,!d,_,v,u,w,H,G)}else v=0===K||K>=1e-9?e(o,r,c,h,l,f,!d,_,v,x,w,H,G):e(r,o,h,c,l,f,d,_,v,H,G,x,w)}return v}function n(t,e,n,o){return t[0][1]<n?r(t,!0,n):e[0][1]>o?r(e,!1,o):t[0][0]}function r(t,e,n){for(var r=t[0][0],o=t[0][1],i=1,h=t.length;i<h;i++){var c=t[i][0],l=t[i][1];if(e?l>=n:l<=n)return l===n?c:r+(n-o)*(c-r)/(l-o);r=c,o=l}return null}function o(t,e,n,r,o){var h=C.isZero;if(h(r)&&h(o)){var c=W.getTimeOf(t,new k(e,n));return null===c?[]:[c]}for(var l=Math.atan2(-o,r),f=Math.sin(l),d=Math.cos(l),_=[],v=[],i=0;i<8;i+=2){var m=t[i]-e,y=t[i+1]-n;_.push(m*d-y*f,m*f+y*d)}return W.solveCubic(_,1,0,v,0,1),v}function h(e,n,r,h,c,l,f){for(var d=n[0],_=n[1],v=o(e,d,_,n[6]-d,n[7]-_),i=0,m=v.length;i<m;i++){var y=v[i],x=W.getPoint(e,y),w=W.getTimeOf(n,x);null!==w&&t(c,l,f?h:r,f?w:y,f?r:h,f?y:w)}}function c(e,n,r,o,h,c){var l=M.intersect(e[0],e[1],e[6],e[7],n[0],n[1],n[6],n[7]);l&&t(h,c,r,W.getTimeOf(e,l),o,W.getTimeOf(n,l))}function l(n,r,o,l,f,_){var v=1e-12,m=Math.min,y=Math.max;if(y(n[0],n[2],n[4],n[6])+v>m(r[0],r[2],r[4],r[6])&&m(n[0],n[2],n[4],n[6])-v<y(r[0],r[2],r[4],r[6])&&y(n[1],n[3],n[5],n[7])+v>m(r[1],r[3],r[5],r[7])&&m(n[1],n[3],n[5],n[7])-v<y(r[1],r[3],r[5],r[7])){var x=d(n,r);if(x)for(var i=0;i<2;i++){var w=x[i];t(f,_,o,w[0],l,w[1],!0)}else{var C=W.isStraight(n),S=W.isStraight(r),I=C&&S,A=C&&!S,P=f.length;if((I?c:C||S?h:e)(A?r:n,A?n:r,A?l:o,A?o:l,f,_,A,0,0,0,1,0,1),!I||f.length===P)for(i=0;i<4;i++){var E=i>>1,T=1&i,N=6*E,M=6*T,L=new k(n[N],n[N+1]),O=new k(r[M],r[M+1]);L.isClose(O,v)&&t(f,_,o,E,l,T)}}}return f}function f(e,n,r,o){var h=W.classify(e);if("loop"===h.type){var c=h.roots;t(r,o,n,c[0],n,c[1])}return r}function d(t,e){function n(t){var e=t[6]-t[0],n=t[7]-t[1];return e*e+n*n}var r=Math.abs,o=M.getDistance,h=1e-7,c=W.isStraight(t),l=W.isStraight(e),f=c&&l,d=n(t)<n(e),_=d?e:t,v=d?t:e,m=_[0],y=_[1],x=_[6]-m,w=_[7]-y;if(o(m,y,x,w,v[0],v[1],!0)<h&&o(m,y,x,w,v[6],v[7],!0)<h)!f&&o(m,y,x,w,_[2],_[3],!0)<h&&o(m,y,x,w,_[4],_[5],!0)<h&&o(m,y,x,w,v[2],v[3],!0)<h&&o(m,y,x,w,v[4],v[5],!0)<h&&(c=l=f=!0);else if(f)return null;if(c^l)return null;for(var C=[t,e],S=[],i=0;i<4&&S.length<2;i++){var I=1&i,A=1^I,P=i>>1,E=W.getTimeOf(C[I],new k(C[A][P?6:0],C[A][P?7:1]));if(null!=E){var T=I?[P,E]:[E,P];(!S.length||r(T[0]-S[0][0])>1e-8&&r(T[1]-S[0][1])>1e-8)&&S.push(T)}if(i>2&&!S.length)break}if(2!==S.length)S=null;else if(!f){var N=W.getPart(t,S[0][0],S[1][0]),L=W.getPart(e,S[0][1],S[1][1]);(r(L[2]-N[2])>h||r(L[3]-N[3])>h||r(L[4]-N[4])>
1h||r(L[5]-N[5])>h)&&(S=null)}return S}return{getIntersections:function(t){var e=this.getValues(),n=t&&t!==this&&t.getValues();return n?l(e,n,this,t,[]):f(e,this,[])},statics:{getOverlaps:d,getIntersections:function(t,e,n,r,o,h){var c=!e;c&&(e=t);for(var d=t.length,_=e.length,v=new Array(d),m=c?v:new Array(_),y=[],i=0;i<d;i++)v[i]=t[i].getValues(r);if(!c)for(i=0;i<_;i++)m[i]=e[i].getValues(o);for(var w=x.findCurveBoundsCollisions(v,m,1e-7),C=0;C<d;C++){var S=t[C],k=v[C];c&&f(k,S,y,n);var I=w[C];if(I)for(var A=0;A<I.length;A++){if(h&&y.length)return y;var P=I[A];if(!c||P>C){var E=e[P];l(k,m[P],S,E,y,n)}}}return y},getCurveLineIntersections:o,getTimesWithTangent:function(t,e){var n=t[0],r=t[1],o=t[2],h=t[3],c=t[4],l=t[5],f=t[6],d=t[7],_=e.normalize(),v=_.x,m=_.y,y=3*f-9*c+9*o-3*n,x=3*d-9*l+9*h-3*r,w=6*c-12*o+6*n,S=6*l-12*h+6*r,k=3*o-3*n,I=3*h-3*r,A=2*y*m-2*x*v,P=[];if(Math.abs(A)<C.CURVETIME_EPSILON){if(0!=(A=y*S-x*w)){var E=-(y*I-x*k)/A;E>=0&&E<=1&&P.push(E)}}else{var T=(w*w-4*y*k)*m*m+(-2*w*S+4*x*k+4*y*I)*v*m+(S*S-4*x*I)*v*v,N=w*m-S*v;if(T>=0&&0!=A){var M=Math.sqrt(T),L=-(N+M)/A,O=(-N+M)/A;L>=0&&L<=1&&P.push(L),O>=0&&O<=1&&P.push(O)}}return P}}}}),G=_.extend({_class:"CurveLocation",initialize:function(t,time,e,n,r){if(time>=.99999999){var o=t.getNext();o&&(time=0,t=o)}this._setCurve(t),this._time=time,this._point=e||t.getPointAtTime(time),this._overlap=n,this._distance=r,this._intersection=this._next=this._previous=null},_setPath:function(path){this._path=path,this._version=path?path._version:0},_setCurve:function(t){this._setPath(t._path),this._curve=t,this._segment=null,this._segment1=t._segment1,this._segment2=t._segment2},_setSegment:function(t){var e=t.getCurve();e?this._setCurve(e):(this._setPath(t._path),this._segment1=t,this._segment2=null),this._segment=t,this._time=t===this._segment1?0:1,this._point=t._point.clone()},getSegment:function(){var t=this._segment;if(!t){var e=this.getCurve(),time=this.getTime();0===time?t=e._segment1:1===time?t=e._segment2:null!=time&&(t=e.getPartLength(0,time)<e.getPartLength(time,1)?e._segment1:e._segment2),this._segment=t}return t},getCurve:function(){var path=this._path,t=this;function e(e){var n=e&&e.getCurve();if(n&&null!=(t._time=n.getTimeOf(t._point)))return t._setCurve(n),n}return path&&path._version!==this._version&&(this._time=this._offset=this._curveOffset=this._curve=null),this._curve||e(this._segment)||e(this._segment1)||e(this._segment2.getPrevious())},getPath:function(){var t=this.getCurve();return t&&t._path},getIndex:function(){var t=this.getCurve();return t&&t.getIndex()},getTime:function(){var t=this.getCurve(),time=this._time;return t&&null==time?this._time=t.getTimeOf(this._point):time},getParameter:"#getTime",getPoint:function(){return this._point},getOffset:function(){var t=this._offset;if(null==t){t=0;var path=this.getPath(),e=this.getIndex();if(path&&null!=e)for(var n=path.getCurves(),i=0;i<e;i++)t+=n[i].getLength();this._offset=t+=this.getCurveOffset()}return t},getCurveOffset:function(){var t=this._curveOffset;if(null==t){var e=this.getCurve(),time=this.getTime();this._curveOffset=t=null!=time&&e&&e.getPartLength(0,time)}return t},getIntersection:function(){return this._intersection},getDistance:function(){return this._distance},divide:function(){var t=this.getCurve(),e=t&&t.divideAtTime(this.getTime());return e&&this._setSegment(e._segment1),e},split:function(){var t=this.getCurve(),path=t._path,e=t&&t.splitAtTime(this.getTime());return e&&this._setSegment(path.getLastSegment()),e},equals:function(t,e){var n=this===t;if(!n&&t instanceof G){var r=this.getCurve(),o=t.getCurve(),h=r._path;if(h===o._path){var c=Math.abs,l=c(this.getOffset()-t.getOffset()),f=!e&&this._intersection,d=!e&&t._intersection;n=(l<1e-7||h&&c(h.getLength()-l)<1e-7)&&(!f&&!d||f&&d&&f.equals(d,!0))}}return n},toString:function(){var t=[],e=this.getPoint(),n=w.instance;e&&t.push("point: "+e);var r=this.getIndex();null!=r&&t.push("index: "+r);var time=this.getTime();return null!=time&&t.push("time: "+n.number(time)),null!=this._distance&&t.push("distance: "+n.number(this._distance)),"{ "+t.join(", ")+" }"},isTouching:function(){var t=this._intersection;if(t&&this.getTangent().isCollinear(t.getTangent())){var e=this.getCurve(
1),n=t.getCurve();return!(e.isStraight()&&n.isStraight()&&e.getLine().intersect(n.getLine()))}return!1},isCrossing:function(){var t=this._intersection;if(!t)return!1;var e=this.getTime(),n=t.getTime(),r=1e-8,o=1-r,h=e>=r&&e<=o,c=n>=r&&n<=o;if(h&&c)return!this.isTouching();var l=this.getCurve(),f=l&&e<r?l.getPrevious():l,d=t.getCurve(),_=d&&n<r?d.getPrevious():d;if(e>o&&(l=l.getNext()),n>o&&(d=d.getNext()),!(f&&l&&_&&d))return!1;var v=[];function m(t,e){var n=t.getValues(),r=W.classify(n).roots||W.getPeaks(n),o=r.length,h=W.getLength(n,e&&o?r[o-1]:0,!e&&o?r[0]:1);v.push(o?h:h/32)}function y(t,e,n){return e<n?t>e&&t<n:t>e||t<n}h||(m(f,!0),m(l,!1)),c||(m(_,!0),m(d,!1));var x=this.getPoint(),w=Math.min.apply(Math,v),C=h?l.getTangentAtTime(e):l.getPointAt(w).subtract(x),S=h?C.negate():f.getPointAt(-w).subtract(x),k=c?d.getTangentAtTime(n):d.getPointAt(w).subtract(x),I=c?k.negate():_.getPointAt(-w).subtract(x),A=S.getAngle(),P=C.getAngle(),E=I.getAngle(),T=k.getAngle();return!!(h?y(A,E,T)^y(P,E,T)&&y(A,T,E)^y(P,T,E):y(E,A,P)^y(T,A,P)&&y(E,P,A)^y(T,P,A))},hasOverlap:function(){return!!this._overlap}},_.each(W._evaluateMethods,function(t){var e=t+"At";this[t]=function(){var t=this.getCurve(),time=this.getTime();return null!=time&&t&&t[e](time,!0)}},{preserve:!0}),new function(){function t(t,e,n){var r=t.length,o=0,h=r-1;function c(n,o){for(var i=n+o;i>=-1&&i<=r;i+=o){var h=t[(i%r+r)%r];if(!e.getPoint().isClose(h.getPoint(),1e-7))break;if(e.equals(h))return h}return null}for(;o<=h;){var l,f=o+h>>>1,d=t[f];if(n&&(l=e.equals(d)?d:c(f,-1)||c(f,1)))return e._overlap&&(l._overlap=l._intersection._overlap=!0),l;var _=e.getPath(),v=d.getPath();(_!==v?_._id-v._id:e.getIndex()+e.getTime()-(d.getIndex()+d.getTime()))<0?h=f-1:o=f+1}return t.splice(o,0,e),e}return{statics:{insert:t,expand:function(e){for(var n=e.slice(),i=e.length-1;i>=0;i--)t(n,e[i]._intersection,!1);return n}}}}),Z=O.extend({_class:"PathItem",_selectBounds:!1,_canScaleStroke:!0,beans:!0,initialize:function(){},statics:{create:function(t){var data,e,n;if(_.isPlainObject(t)?(e=t.segments,data=t.pathData):Array.isArray(t)?e=t:"string"==typeof t&&(data=t),e){var r=e[0];n=r&&Array.isArray(r[0])}else data&&(n=(data.match(/m/gi)||[]).length>1||/z\s*\S+/i.test(data));return new(n?$:K)(t)}},_asPathItem:function(){return this},isClockwise:function(){return this.getArea()>=0},setClockwise:function(t){this.isClockwise()!=(t=!!t)&&this.reverse()},setPathData:function(data){var t,e,n,r=data&&data.match(/[mlhvcsqtaz][^mlhvcsqtaz]*/gi),o=!1,h=new k,c=new k;function l(e,n){var r=+t[e];return o&&(r+=h[n]),r}function f(t){return new k(l(t,"x"),l(t+1,"y"))}this.clear();for(var i=0,d=r&&r.length;i<d;i++){var _=r[i],v=_[0],m=v.toLowerCase(),y=(t=_.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g))&&t.length;switch(o=v===m,"z"!==e||/[mz]/.test(m)||this.moveTo(h),m){case"m":case"l":for(var x="m"===m,w=0;w<y;w+=2)this[x?"moveTo":"lineTo"](h=f(w)),x&&(c=h,x=!1);n=h;break;case"h":case"v":var C="h"===m?"x":"y";h=h.clone();for(w=0;w<y;w++)h[C]=l(w,C),this.lineTo(h);n=h;break;case"c":for(w=0;w<y;w+=6)this.cubicCurveTo(f(w),n=f(w+2),h=f(w+4));break;case"s":for(w=0;w<y;w+=4)this.cubicCurveTo(/[cs]/.test(e)?h.multiply(2).subtract(n):h,n=f(w),h=f(w+2)),e=m;break;case"q":for(w=0;w<y;w+=4)this.quadraticCurveTo(n=f(w),h=f(w+2));break;case"t":for(w=0;w<y;w+=2)this.quadraticCurveTo(n=/[qt]/.test(e)?h.multiply(2).subtract(n):h,h=f(w)),e=m;break;case"a":for(w=0;w<y;w+=7)this.arcTo(h=f(w+5),new A(+t[w],+t[w+1]),+t[w+2],+t[w+4],+t[w+3]);break;case"z":this.closePath(1e-12),h=c}e=m}},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_contains:function(t){var e=t.isInside(this.getBounds({internal:!0,handle:!0}))?this._getWinding(t):{};return e.onPath||!!("evenodd"===this.getFillRule()?1&e.windingL||1&e.windingR:e.winding)},getIntersections:function(path,t,e,n){var r=this===path||!path,o=this._matrix._orNullIfIdentity(),h=r?o:(e||path._matrix)._orNullIfIdentity();return r||this.getBounds(o).intersects(path.getBounds(h),1e-12)?W.getIntersections(this.getCurves(),!r&&path.getCurves(),t,o,h,n):[]},getCrossings:function(path){return this.getIntersections(path,function(t){return t.isCrossing()})},getNearestLocation:function(){for(var t=k.read(arguments),e=this.getCurves(),n=1/0,r=null,i=0,o=e.length;i<o;i++){var h=e[i].getNearestLocation(t);h._distance<n&&(n=h._distance,r=h)}return r},getNearestPoint:function(){var t=this.getNearestLocation.apply(this,arguments);return t?t.getPoint():t},interpolate:function(t,e,n){var r=!this._children,o=r?"_segments":"_children",h=t[o],c=e[o],l=this[o];if(!h||!c||h.length!==c.length)throw new Error("Invalid operands in interpolate() call: "+t+", "+e);var f=l.length,d=c.length;if(f<d)for(var _=r?U:K,i=f;i<d;i++)this.add(new _);else f>d&&this[r?"removeSegments":"removeChildren"](d,f);for(i=0;i<d;i++)l[i].interpolate(h[i],c[i],n);r&&(this.setClosed(t._closed),this._changed(9))},compare:function(path){var t=!1;if(path){var e=this._children||[this],n=path._children?path._children.slice():[path],r=e.length,o=n.length,h=[],c=0;t=!0;for(var l=x.findItemBoundsCollisions(e,n,C.GEOMETRIC_EPSILON),f=r-1;f>=0&&t;f--){var d=e[f];t=!1;var _=l[f];if(_)for(var v=_.length-1;v>=0&&!t;v--)d.compare(n[_[v]])&&(h[_[v]]||(h[_[v]]=!0,c++),t=!0)}t=t&&c===o}return t}}
1),K=Z.extend({_class:"Path",_serializeFields:{segments:[],closed:!1},initialize:function(t){this._closed=!1,this._segments=[],this._version=0;var e=arguments,n=Array.isArray(t)?"object"==typeof t[0]?t:e:!t||t.size!==l||t.x===l&&t.point===l?null:e;n&&n.length>0?this.setSegments(n):(this._curves=l,this._segmentSelection=0,n||"string"!=typeof t||(this.setPathData(t),t=null)),this._initialize(!n&&t)},_equals:function(t){return this._closed===t._closed&&_.equals(this._segments,t._segments)},copyContent:function(source){this.setSegments(source._segments),this._closed=source._closed},_changed:function t(e){if(t.base.call(this,e),8&e){if(this._length=this._area=l,32&e)this._version++;else if(this._curves)for(var i=0,n=this._curves.length;i<n;i++)this._curves[i]._changed()}else 64&e&&(this._bounds=l)},getStyle:function(){var t=this._parent;return(t instanceof $?t:this)._style},getSegments:function(){return this._segments},setSegments:function(t){var e=this.isFullySelected(),n=t&&t.length;if(this._segments.length=0,this._segmentSelection=0,this._curves=l,n){var r=t[n-1];"boolean"==typeof r&&(this.setClosed(r),n--),this._add(U.readList(t,0,{},n))}e&&this.setFullySelected(!0)},getFirstSegment:function(){return this._segments[0]},getLastSegment:function(){return this._segments[this._segments.length-1]},getCurves:function(){var t=this._curves,e=this._segments;if(!t){var n=this._countCurves();t=this._curves=new Array(n);for(var i=0;i<n;i++)t[i]=new W(this,e[i],e[i+1]||e[0])}return t},getFirstCurve:function(){return this.getCurves()[0]},getLastCurve:function(){var t=this.getCurves();return t[t.length-1]},isClosed:function(){return this._closed},setClosed:function(t){if(this._closed!=(t=!!t)){if(this._closed=t,this._curves){var e=this._curves.length=this._countCurves();t&&(this._curves[e-1]=new W(this,this._segments[e-1],this._segments[0]))}this._changed(41)}}},{beans:!0,getPathData:function(t,e){var n,r,o,h,c,l,f,d,_=this._segments,v=_.length,m=new w(e),y=new Array(6),x=!0,C=[];function S(e,_){if(e._transformCoordinates(t,y),n=y[0],r=y[1],x)C.push("M"+m.pair(n,r)),x=!1;else if(c=y[2],l=y[3],c===n&&l===r&&f===o&&d===h){if(!_){var v=n-o,w=r-h;C.push(0===v?"v"+m.number(w):0===w?"h"+m.number(v):"l"+m.pair(v,w))}}else C.push("c"+m.pair(f-o,d-h)+" "+m.pair(c-o,l-h)+" "+m.pair(n-o,r-h));o=n,h=r,f=y[4],d=y[5]}if(!v)return"";for(var i=0;i<v;i++)S(_[i]);return this._closed&&v>0&&(S(_[0],!0),C.push("z")),C.join("")},isEmpty:function(){return!this._segments.length},_transformContent:function(t){for(var e=this._segments,n=new Array(6),i=0,r=e.length;i<r;i++)e[i]._transformCoordinates(t,n,!0);return!0},_add:function(t,e){for(var n=this._segments,r=this._curves,o=t.length,h=null==e,i=(e=h?n.length:e,0);i<o;i++){var c=t[i];c._path&&(c=t[i]=c.clone()),c._path=this,c._index=e+i,c._selection&&this._updateSelection(c,0,c._selection)}if(h)_.push(n,t);else{n.splice.apply(n,[e,0].concat(t));i=e+o;for(var l=n.length;i<l;i++)n[i]._index=i}if(r){var f=this._countCurves(),d=e>0&&e+o-1===f?e-1:e,v=d,m=Math.min(d+o,f);t._curves&&(r.splice.apply(r,[d,0].concat(t._curves)),v+=t._curves.length);for(i=v;i<m;i++)r.splice(i,0,new W(this,null,null));this._adjustCurves(d,m)}return this._changed(41),t},_adjustCurves:function(t,e){for(var n,r=this._segments,o=this._curves,i=t;i<e;i++)(n=o[i])._path=this,n._segment1=r[i],n._segment2=r[i+1]||r[0],n._changed();(n=o[this._closed&&!t?r.length-1:t-1])&&(n._segment2=r[t]||r[0],n._changed()),(n=o[e])&&(n._segment1=r[e],n._changed())},_countCurves:function(){var t=this._segments.length;return!this._closed&&t>0?t-1:t},add:function(t){var e=arguments;return e.length>1&&"number"!=typeof t?this._add(U.readList(e)):this._add([U.read(e)])[0]},insert:function(t,e){var n=arguments;return n.length>2&&"number"!=typeof e?this._add(U.readList(n,1),t):this._add([U.read(n,1)],t)[0]},addSegment:function(){return this._add([U.read(arguments)])[0]},insertSegment:function(t){return this._add([U.read(arguments,1)],t)[0]},addSegments:function(t){return this._add(U.readList(t))},insertSegments:function(t,e){return this._add(U.readList(e),t)},removeSegment:function(t){return this.removeSegments(t,t+1)[0]||null},removeSegments:function(t,e,n){t=t||0,e=_.pick(e,this._segments.length);var r=this._segments,o=this._curves,h=r.length,c=r.splice(t,e-t),l=c.length;if(!l)return c;for(var i=0;i<l;i++){var f=c[i];f._selection&&this._updateSelection(f,f._selection,0),f._index=f._path=null}i=t;for(var d=r.length;i<d;i++)r[i]._index=i;if(o){var v=t>0&&e===h+(this._closed?1:0)?t-1:t;for(i=(o=o.splice(v,l)).length-1;i>=0;i--)o[i]._path=null;n&&(c._curves=o.slice(1)),this._adjustCurves(v,v)}return this._changed(41),c},clear:"#removeSegments",hasHandles:function(){for(var t=this._segments,i=0,e=t.length;i<e;i++)if(t[i].hasHandles())return!0;return!1},clearHandles:function(){for(var t=this._segments,i=0,e=t.length;i<e;i++)t[i].clearHandles()},getLength:function(){if(null==this._length){for(var t=this.getCurves(),e=0,i=0,n=t.length;i<n;i++)e+=t[i].getLength();this._length=e}return this._length},getArea:function(){var area=this._area;if(null==area){var t=this._segments,e=this._closed;area=0;for(var i=0,n=t.length;i<n;i++){var r=i+1===n;area+=W.getArea(W.getValues(t[i],t[r?0:i+1],null,r&&!e))}this._area=area}return area},isFullySelected:function(){var t=this._segments.length;return this.isSelected()&&t>0&&this._segmentSelection===7*t},setFullySelected:function(t){t&&this._selectSegments(!0),this.setSelected(t)},setSelection:function t(e){1&e||this._selectSegments(!1),t.base.call(this,e)},_selectSegments:function(t){var e=this._segments,n=e.length,r=t?7:0;this._segmentSelection=r*n;for(var i=0;i<n;i++)e[i]._selection=r},_updateSelection:function(t,e,n){t._selection=n,(this._segmentSelection+=n-e)>0&&this.setSelected(!0)},divideAt:function(t){var e,n=this.getLocationAt(t);
1return n&&(e=n.getCurve().divideAt(n.getCurveOffset()))?e._segment1:null},splitAt:function(t){var e=this.getLocationAt(t),n=e&&e.index,time=e&&e.time;time>.99999999&&(n++,time=0);var r=this.getCurves();if(n>=0&&n<r.length){time>=1e-8&&r[n++].divideAtTime(time);var path,o=this.removeSegments(n,this._segments.length,!0);return this._closed?(this.setClosed(!1),path=this):((path=new K(O.NO_INSERT)).insertAbove(this),path.copyAttributes(this)),path._add(o,0),this.addSegment(o[0]),path}return null},split:function(t,time){var e,n=time===l?t:(e=this.getCurves()[t])&&e.getLocationAtTime(time);return null!=n?this.splitAt(n):null},join:function(path,t){var e=t||0;if(path&&path!==this){var n=path._segments,r=this.getLastSegment(),o=path.getLastSegment();if(!o)return this;r&&r._point.isClose(o._point,e)&&path.reverse();var h=path.getFirstSegment();if(r&&r._point.isClose(h._point,e))r.setHandleOut(h._handleOut),this._add(n.slice(1));else{var c=this.getFirstSegment();c&&c._point.isClose(h._point,e)&&path.reverse(),o=path.getLastSegment(),c&&c._point.isClose(o._point,e)?(c.setHandleIn(o._handleIn),this._add(n.slice(0,n.length-1),0)):this._add(n.slice())}path._closed&&this._add([n[0]]),path.remove()}var l=this.getFirstSegment(),f=this.getLastSegment();return l!==f&&l._point.isClose(f._point,e)&&(l.setHandleIn(f._handleIn),f.remove(),this.setClosed(!0)),this},reduce:function(t){for(var e=this.getCurves(),n=t&&t.simplify,r=n?1e-7:0,i=e.length-1;i>=0;i--){var o=e[i];!o.hasHandles()&&(!o.hasLength(r)||n&&o.isCollinear(o.getNext()))&&o.remove()}return this},reverse:function(){this._segments.reverse();for(var i=0,t=this._segments.length;i<t;i++){var e=this._segments[i],n=e._handleIn;e._handleIn=e._handleOut,e._handleOut=n,e._index=i}this._curves=null,this._changed(9)},flatten:function(t){for(var e=new Q(this,t||.25,256,!0).parts,n=e.length,r=[],i=0;i<n;i++)r.push(new U(e[i].curve.slice(0,2)));!this._closed&&n>0&&r.push(new U(e[n-1].curve.slice(6))),this.setSegments(r)},simplify:function(t){var e=new J(this).fit(t||2.5);return e&&this.setSegments(e),!!e},smooth:function(t){var e=this,n=t||{},r=n.type||"asymmetric",o=this._segments,h=o.length,c=this._closed;function f(t,n){var r=t&&t.index;if(null!=r){var path=t.path;if(path&&path!==e)throw new Error(t._class+" "+r+" of "+path+" is not part of "+e);n&&t instanceof W&&r++}else r="number"==typeof t?t:n;return Math.min(r<0&&c?r%h:r<0?r+h:r,h-1)}var d=c&&n.from===l&&n.to===l,_=f(n.from,0),v=f(n.to,h-1);if(_>v)if(c)_-=h;else{var m=_;_=v,v=m}if(/^(?:asymmetric|continuous)$/.test(r)){var y="asymmetric"===r,x=Math.min,w=v-_+1,C=w-1,S=d?x(w,4):1,k=S,I=S,A=[];if(c||(k=x(1,_),I=x(1,h-v-1)),(C+=k+I)<=1)return;for(var i=0,P=_-k;i<=C;i++,P++)A[i]=o[(P<0?P+h:P)%h]._point;var E=A[0]._x+2*A[1]._x,T=A[0]._y+2*A[1]._y,N=2,M=C-1,L=[E],O=[T],V=[N],R=[],z=[];for(i=1;i<C;i++){var D=i<M,b=D?4:y?2:7,u=D?4:y?3:8,B=D?2:y?0:1,F=(D||y?1:2)/N;N=V[i]=b-F,E=L[i]=u*A[i]._x+B*A[i+1]._x-F*E,T=O[i]=u*A[i]._y+B*A[i+1]._y-F*T}R[M]=L[M]/V[M],z[M]=O[M]/V[M];for(i=C-2;i>=0;i--)R[i]=(L[i]-R[i+1])/V[i],z[i]=(O[i]-z[i+1])/V[i];R[C]=(3*A[C]._x-R[M])/2,z[C]=(3*A[C]._y-z[M])/2;i=k;var j=C-I;for(P=_;i<=j;i++,P++){var U=o[P<0?P+h:P],H=U._point,G=R[i]-H._x,Z=z[i]-H._y;(d||i<j)&&U.setHandleOut(G,Z),(d||i>k)&&U.setHandleIn(-G,-Z)}}else for(i=_;i<=v;i++)o[i<0?i+h:i].smooth(n,!d&&i===_,!d&&i===v)},toShape:function(t){if(!this._closed)return null;var e,n,r,o,h,c,f,d=this._segments;function _(i,t){var e=d[i],n=e.getNext(),r=d[t],o=r.getNext();return e._handleOut.isZero()&&n._handleIn.isZero()&&r._handleOut.isZero()&&o._handleIn.isZero()&&n._point.subtract(e._point).isCollinear(o._point.subtract(r._point))}function v(i){var t=d[i],e=t.getNext(),n=t._handleOut,r=e._handleIn,o=.5522847498307936;if(n.isOrthogonal(r)){var h=t._point,c=e._point,l=new M(h,n,!0).intersect(new M(c,r,!0),!0);return l&&C.isZero(n.getLength()/l.subtract(h).getLength()-o)&&C.isZero(r.getLength()/l.subtract(c).getLength()-o)}return!1}function m(i,t){return d[i]._point.getDistance(d[t]._point)}if(!this.hasHandles()&&4===d.length&&_(0,2)&&_(1,3)&&(h=d[1],c=h.getPrevious(),f=h.getNext(),c._handleOut.isZero()&&h._handleIn.isZero()&&h._handleOut.isZero()&&f._handleIn.isZero()&&h._point.subtract(c._point).isOrthogonal(f._point.subtract(h._point)))?(e=z.Rectangle,n=new A(m(0,3),m(0,1)),o=d[1]._point.add(d[2]._point).divide(2)):8===d.length&&v(0)&&v(2)&&v(4)&&v(6)&&_(1,5)&&_(3,7)?(e=z.Rectangle,r=(n=new A(m(1,6),m(0,3))).subtract(new A(m(0,7),m(1,2))).divide(2),o=d[3]._point.add(d[4]._point).divide(2)):4===d.length&&v(0)&&v(1)&&v(2)&&v(3)&&(C.isZero(m(0,2)-m(1,3))?(e=z.Circle,r=m(0,2)/2):(e=z.Ellipse,r=new A(m(2,0)/2,m(3,1)/2)),o=d[1]._point),e){var y=this.getPosition(!0),x=new e({center:y,size:n,radius:r,insert:!1});return x.copyAttributes(this,!0),x._matrix.prepend(this._matrix),x.rotate(o.subtract(y).getAngle()+90),(t===l||t)&&x.insertAbove(this),x}
1return null},toPath:"#clone",compare:function t(path){if(!path||path instanceof $)return t.base.call(this,path);var e=this.getCurves(),n=path.getCurves(),r=e.length,o=n.length;if(!r||!o)return r==o;for(var h,c,l=e[0].getValues(),f=[],d=0,_=0,i=0;i<o;i++){var v=n[i].getValues();if(f.push(v),x=W.getOverlaps(l,v)){h=!i&&x[0][0]>0?o-1:i,c=x[0][1];break}}var m,y=Math.abs;for(v=f[h];l&&v;){var x;if(x=W.getOverlaps(l,v))if(y(x[0][0]-_)<1e-8){1===(_=x[1][0])&&(l=++d<r?e[d].getValues():null,_=0);var w=x[0][1];if(y(w-c)<1e-8){if(m||(m=[h,w]),1===(c=x[1][1])&&(++h>=o&&(h=0),v=f[h]||n[h].getValues(),c=0),!l)return m[0]===h&&m[1]===c;continue}}break}return!1},_hitTestSelf:function(t,e,n,r){var o,h,c,area,l,f,d=this,style=this.getStyle(),_=this._segments,v=_.length,m=this._closed,y=e._tolerancePadding,x=y,w=e.stroke&&style.hasStroke(),C=e.fill&&style.hasFill(),S=e.curves,k=w?style.getStrokeWidth()/2:C&&e.tolerance>0||S?0:null;function I(e,n){return t.subtract(e).divide(n).length<=1}function A(t,n,r){if(!e.selected||n.isSelected()){var o=t._point;if(n!==o&&(n=n.add(o)),I(n,x))return new j(r,d,{segment:t,point:n})}}function P(t,n){return(n||e.segments)&&A(t,t._point,"segment")||!n&&e.handles&&(A(t,t._handleIn,"handle-in")||A(t,t._handleOut,"handle-out"))}function E(t){area.add(t)}function T(e){var n,l=m||e._index>0&&e._index<v-1;return"round"===(l?o:h)?I(e._point,x):(area=new K({internal:!0,closed:!0}),l?e.isSmooth()||K._addBevelJoin(e,o,k,c,null,r,E,!0):"square"===h&&K._addSquareCap(e,h,k,null,r,E,!0),area.isEmpty()?void 0:area.contains(t)||(n=area.getNearestLocation(t))&&I(n.getPoint(),y))}if(null!==k&&(k>0?(o=style.getStrokeJoin(),h=style.getStrokeCap(),c=style.getMiterLimit(),x=x.add(K._getStrokePadding(k,r))):o=h="round"),!e.ends||e.segments||m){if(e.segments||e.handles)for(var i=0;i<v;i++)if(f=P(_[i]))return f}else if(f=P(_[0],!0)||P(_[v-1],!0))return f;if(null!==k){if(l=this.getNearestLocation(t)){var time=l.getTime();0===time||1===time&&v>1?T(l.getSegment())||(l=null):I(l.getPoint(),x)||(l=null)}if(!l&&"miter"===o&&v>1)for(i=0;i<v;i++){var N=_[i];if(t.getDistance(N._point)<=c*k&&T(N)){l=N.getLocation();break}}}return!l&&C&&this._contains(t)||l&&!w&&!S?new j("fill",this):l?new j(w?"stroke":"curve",this,{location:l,point:l.getPoint()}):null}},_.each(W._evaluateMethods,function(t){this[t+"At"]=function(e){var n=this.getLocationAt(e);return n&&n[t]()}},{beans:!1,getLocationOf:function(){for(var t=k.read(arguments),e=this.getCurves(),i=0,n=e.length;i<n;i++){var r=e[i].getLocationOf(t);if(r)return r}return null},getOffsetOf:function(){var t=this.getLocationOf.apply(this,arguments);return t?t.getOffset():null},getLocationAt:function(t){if("number"==typeof t){for(var e=this.getCurves(),n=0,i=0,r=e.length;i<r;i++){var o=n,h=e[i];if((n+=h.getLength())>t)return h.getLocationAt(t-o)}if(e.length>0&&t<=this.getLength())return new G(e[e.length-1],1)}else if(t&&t.getPath&&t.getPath()===this)return t;return null},getOffsetsWithTangent:function(){var t=k.read(arguments);if(t.isZero())return[];for(var e=[],n=0,r=this.getCurves(),i=0,o=r.length;i<o;i++){for(var h=r[i],c=h.getTimesWithTangent(t),l=0,f=c.length;l<f;l++){var d=n+h.getOffsetAtTime(c[l]);e.indexOf(d)<0&&e.push(d)}n+=h.length}return e}}),new function(){function t(t,path,e){var n,r,o,h,c,l,f,d,_=path._segments,v=_.length,m=new Array(6),y=!0;function x(_){if(e)_._transformCoordinates(e,m),n=m[0],r=m[1];else{var v=_._point;n=v._x,r=v._y}if(y)t.moveTo(n,r),y=!1;else{if(e)c=m[2],l=m[3];else{var x=_._handleIn;c=n+x._x,l=r+x._y}c===n&&l===r&&f===o&&d===h?t.lineTo(n,r):t.bezierCurveTo(f,d,c,l,n,r)}if(o=n,h=r,e)f=m[4],d=m[5];else{x=_._handleOut;f=o+x._x,d=h+x._y}}for(var i=0;i<v;i++)x(_[i]);path._closed&&v>0&&x(_[0])}return{_draw:function(e,param,n,r){var o=param.dontStart,h=param.dontFinish||param.clip,style=this.getStyle(),c=style.hasFill(),l=style.hasStroke(),f=style.getDashArray(),d=!bt.support.nativeDash&&l&&f&&f.length;function _(i){return f[(i%d+d)%d]}if(o||e.beginPath(),(c||l&&!d||h)&&(t(e,this,r),this._closed&&e.closePath()),!h&&(c||l)&&(this._setStyles(e,param,n),c&&(e.fill(style.getFillRule()),e.shadowColor="rgba(0,0,0,0)"),l)){if(d){o||e.beginPath();for(var v,m=new Q(this,.25,32,!1,r),y=m.length,x=-style.getDashOffset(),i=0;x>0;)x-=_(i--)+_(i--);for(;x<y;)v=x+_(i++),(x>0||v>0)&&m.drawPart(e,Math.max(x,0),Math.max(v,0)),x=v+_(i++)}e.stroke()}},_drawSelected:function(e,n){e.beginPath(),t(e,this,n),e.stroke(),function(t,e,n,r){if(!(r<=0))for(var o,h,c=r/2,l=r-2,f=c-1,d=new Array(6),i=0,_=e.length;i<_;i++){var v=e[i],m=v._selection;if(v._transformCoordinates(n,d),o=d[0],h=d[1],2&m&&x(2),4&m&&x(4),t.fillRect(o-c,h-c,r,r),l>0&&!(1&m)){var y=t.fillStyle;t.fillStyle="#ffffff",t.fillRect(o-f,h-f,l,l),t.fillStyle=y}}function x(e){var n=d[e],r=d[e+1];o==n&&h==r||(t.beginPath(),t.moveTo(o,h),t.lineTo(n,r),t.stroke(),t.beginPath(),t.arc(n,r,c,0,2*Math.PI,!0),t.fill())}}(e,this._segments,n,bt.settings.handleSize)}}},new function(){function t(t){var e=t._segments;if(!e.length)throw new Error("Use a moveTo() command first");return e[e.length-1]}return{moveTo:function(){var t=this._segments;1===t.length&&this.removeSegment(0),t.length||this._add([new U(k.read(arguments))])},moveBy:function(){throw new Error("moveBy() is unsupported on Path items.")},lineTo:function(){this._add([new U(k.read(arguments))])},cubicCurveTo:function(){var e=arguments,n=k.read(e),r=k.read(e),o=k.read(e),h=t(this);h.setHandleOut(n.subtract(h._point)),this._add([new U(o,r.subtract(o))])},quadraticCurveTo:function(){var e=arguments,n=k.read(e),r=k.read(e),o=t(this)._point;this.cubicCurveTo(n.add(o.subtract(n).multiply(1/3)),n.add(r.subtract(n).multiply(1/3)),r)},curveTo:function(){var e=arguments,n=k.read(e),r=k.read(e),o=_.pick(_.read(e),.5),h=1-o,c=t(this)._point,l=n.subtract(c.multiply(h*h)).subtract(r.multiply(o*o)).divide(2*o*h);if(l.isNaN())throw new Error("Cannot put a curve through points with parameter = "+o);this.quadraticCurveTo(l,r)},arcTo:function(){var e,n,r,o,h=arguments,c=Math.abs,l=Math.sqrt,f=t(this),d=f._point,v=k.read(h),m=_.peek(h);
1if("boolean"==typeof(I=_.pick(m,!0)))var y=(E=d.add(v).divide(2)).add(E.subtract(d).rotate(I?-90:90));else if(_.remain(h)<=2)y=v,v=k.read(h);else if(!d.equals(v)){var x=A.read(h),w=C.isZero;if(w(x.width)||w(x.height))return this.lineTo(v);var S=_.read(h),I=!!_.read(h),P=!!_.read(h),E=d.add(v).divide(2),T=(Y=d.subtract(E).rotate(-S)).x,L=Y.y,O=c(x.width),V=c(x.height),R=O*O,z=V*V,D=T*T,B=L*L,F=l(D/R+B/z);if(F>1&&(R=(O*=F)*O,z=(V*=F)*V),c(F=(R*z-R*B-z*D)/(R*B+z*D))<1e-12&&(F=0),F<0)throw new Error("Cannot create an arc with the given arguments");e=new k(O*L/V,-V*T/O).multiply((P===I?-1:1)*l(F)).rotate(S).add(E),n=(r=(o=(new N).translate(e).rotate(S).scale(O,V))._inverseTransform(d)).getDirectedAngle(o._inverseTransform(v)),!I&&n>0?n-=360:I&&n<0&&(n+=360)}if(y){var j=new M(d.add(y).divide(2),y.subtract(d).rotate(90),!0),H=new M(y.add(v).divide(2),v.subtract(y).rotate(90),!0),line=new M(d,v),W=line.getSide(y);if(!(e=j.intersect(H,!0))){if(!W)return this.lineTo(v);throw new Error("Cannot create an arc with the given arguments")}n=(r=d.subtract(e)).getDirectedAngle(v.subtract(e));var G=line.getSide(e,!0);0===G?n=W*c(n):W===G&&(n+=n<0?360:-360)}if(n){for(var Z=c(n),K=Z>=360?4:Math.ceil((Z-1e-5)/90),$=n/K,Q=$*Math.PI/360,J=4/3*Math.sin(Q)/(1+Math.cos(Q)),X=[],i=0;i<=K;i++){var Y=v,tt=null;if(i<K&&(tt=r.rotate(90).multiply(J),o?(Y=o._transformPoint(r),tt=o._transformPoint(r.add(tt)).subtract(Y)):Y=e.add(r)),i){var et=r.rotate(-90).multiply(J);o&&(et=o._transformPoint(r.add(et)).subtract(Y)),X.push(new U(Y,et,tt))}else f.setHandleOut(tt);r=r.rotate($)}this._add(X)}},lineBy:function(){var e=k.read(arguments),n=t(this)._point;this.lineTo(n.add(e))},curveBy:function(){var e=arguments,n=k.read(e),r=k.read(e),o=_.read(e),h=t(this)._point;this.curveTo(h.add(n),h.add(r),o)},cubicCurveBy:function(){var e=arguments,n=k.read(e),r=k.read(e),o=k.read(e),h=t(this)._point;this.cubicCurveTo(h.add(n),h.add(r),h.add(o))},quadraticCurveBy:function(){var e=arguments,n=k.read(e),r=k.read(e),o=t(this)._point;this.quadraticCurveTo(o.add(n),o.add(r))},arcBy:function(){var e=arguments,n=t(this)._point,r=n.add(k.read(e)),o=_.pick(_.peek(e),!0);"boolean"==typeof o?this.arcTo(r,o):this.arcTo(r,n.add(k.read(e)))},closePath:function(t){this.setClosed(!0),this.join(this,t)}}},{_getBounds:function(t,e){var n=e.handle?"getHandleBounds":e.stroke?"getStrokeBounds":"getBounds";return K[n](this._segments,this._closed,this,t,e)},statics:{getBounds:function(t,e,path,n,r,o){var h=t[0];if(!h)return new E;var c=new Array(6),l=h._transformCoordinates(n,new Array(6)),f=l.slice(0,2),d=f.slice(),_=new Array(2);function v(t){t._transformCoordinates(n,c);for(var i=0;i<2;i++)W._addBounds(l[i],l[i+4],c[i+2],c[i],i,o?o[i]:0,f,d,_);var e=l;l=c,c=e}for(var i=1,m=t.length;i<m;i++)v(t[i]);return e&&v(h),new E(f[0],f[1],d[0]-f[0],d[1]-f[1])},getStrokeBounds:function(t,e,path,n,r){var style=path.getStyle(),o=style.hasStroke(),h=style.getStrokeWidth(),c=o&&path._getStrokeMatrix(n,r),l=o&&K._getStrokePadding(h,c),f=K.getBounds(t,e,path,n,r,l);if(!o)return f;var d=h/2,_=style.getStrokeJoin(),v=style.getStrokeCap(),m=style.getMiterLimit(),y=new E(new A(l));function x(t){f=f.include(t)}function w(t){f=f.unite(y.setCenter(t._point.transform(n)))}function C(t,e){"round"===e||t.isSmooth()?w(t):K._addBevelJoin(t,e,d,m,n,c,x)}function S(t,e){"round"===e?w(t):K._addSquareCap(t,e,d,n,c,x)}var k=t.length-(e?0:1);if(k>0){for(var i=1;i<k;i++)C(t[i],_);e?C(t[0],_):(S(t[0],v),S(t[t.length-1],v))}return f},_getStrokePadding:function(t,e){if(!e)return[t,t];var n=new k(t,0).transform(e),r=new k(0,t).transform(e),o=n.getAngleInRadians(),a=n.getLength(),b=r.getLength(),h=Math.sin(o),c=Math.cos(o),l=Math.tan(o),f=Math.atan2(b*l,a),d=Math.atan2(b,l*a);return[Math.abs(a*Math.cos(f)*c+b*Math.sin(f)*h),Math.abs(b*Math.sin(d)*c+a*Math.cos(d)*h)]},_addBevelJoin:function(t,e,n,r,o,h,c,l){var f=t.getCurve(),d=f.getPrevious(),_=f.getPoint1().transform(o),v=d.getNormalAtTime(1).multiply(n).transform(h),m=f.getNormalAtTime(0).multiply(n).transform(h),y=v.getDirectedAngle(m);if((y<0||y>
1=180)&&(v=v.negate(),m=m.negate()),l&&c(_),c(_.add(v)),"miter"===e){var x=new M(_.add(v),new k(-v.y,v.x),!0).intersect(new M(_.add(m),new k(-m.y,m.x),!0),!0);x&&_.getDistance(x)<=r*n&&c(x)}c(_.add(m))},_addSquareCap:function(t,e,n,r,o,h,c){var l=t._point.transform(r),f=t.getLocation(),d=f.getNormal().multiply(0===f.getTime()?n:-n).transform(o);"square"===e&&(c&&(h(l.subtract(d)),h(l.add(d))),l=l.add(d.rotate(-90))),h(l.add(d)),h(l.subtract(d))},getHandleBounds:function(t,e,path,n,r){var o,h,style=path.getStyle();if(r.stroke&&style.hasStroke()){var c=path._getStrokeMatrix(n,r),l=style.getStrokeWidth()/2,f=l;"miter"===style.getStrokeJoin()&&(f=l*style.getMiterLimit()),"square"===style.getStrokeCap()&&(f=Math.max(f,l*Math.SQRT2)),o=K._getStrokePadding(l,c),h=K._getStrokePadding(f,c)}for(var d=new Array(6),_=1/0,v=-_,m=_,y=v,i=0,x=t.length;i<x;i++){t[i]._transformCoordinates(n,d);for(var w=0;w<6;w+=2){var C=w?o:h,S=C?C[0]:0,k=C?C[1]:0,I=d[w],A=d[w+1],P=I-S,T=I+S,N=A-k,M=A+k;P<_&&(_=P),T>v&&(v=T),N<m&&(m=N),M>y&&(y=M)}}return new E(_,m,v-_,y-m)}}});K.inject({statics:new function(){var t=.5522847498307936,e=[new U([-1,0],[0,t],[0,-t]),new U([0,-1],[-t,0],[t,0]),new U([1,0],[0,-t],[0,t]),new U([0,1],[t,0],[-t,0])];function n(t,e,n){var r=_.getNamed(n),path=new K(r&&(1==r.insert?O.INSERT:0==r.insert?O.NO_INSERT:null));return path._add(t),path._closed=e,path.set(r,O.INSERT)}function r(t,r,o){for(var h=new Array(4),i=0;i<4;i++){var c=e[i];h[i]=new U(c._point.multiply(r).add(t),c._handleIn.multiply(r),c._handleOut.multiply(r))}return n(h,!0,o)}return{Line:function(){var t=arguments;return n([new U(k.readNamed(t,"from")),new U(k.readNamed(t,"to"))],!1,t)},Circle:function(){var t=arguments,e=k.readNamed(t,"center"),n=_.readNamed(t,"radius");return r(e,new A(n),t)},Rectangle:function(){var e,r=arguments,rect=E.readNamed(r,"rectangle"),o=A.readNamed(r,"radius",0,{readNull:!0}),h=rect.getBottomLeft(!0),c=rect.getTopLeft(!0),tr=rect.getTopRight(!0),br=rect.getBottomRight(!0);if(!o||o.isZero())e=[new U(h),new U(c),new U(tr),new U(br)];else{var l=(o=A.min(o,rect.getSize(!0).divide(2))).width,f=o.height,d=l*t,_=f*t;e=[new U(h.add(l,0),null,[-d,0]),new U(h.subtract(0,f),[0,_]),new U(c.add(0,f),null,[0,-_]),new U(c.add(l,0),[-d,0],null),new U(tr.subtract(l,0),null,[d,0]),new U(tr.add(0,f),[0,-_],null),new U(br.subtract(0,f),null,[0,_]),new U(br.subtract(l,0),[d,0])]}return n(e,!0,r)},RoundRectangle:"#Rectangle",Ellipse:function(){var t=arguments,ellipse=z._readEllipse(t);return r(ellipse.center,ellipse.radius,t)},Oval:"#Ellipse",Arc:function(){var t=arguments,e=k.readNamed(t,"from"),n=k.readNamed(t,"through"),r=k.readNamed(t,"to"),o=_.getNamed(t),path=new K(o&&0==o.insert&&O.NO_INSERT);return path.moveTo(e),path.arcTo(n,r),path.set(o)},RegularPolygon:function(){for(var t=arguments,e=k.readNamed(t,"center"),r=_.readNamed(t,"sides"),o=_.readNamed(t,"radius"),h=360/r,c=r%3==0,l=new k(0,c?-o:o),f=c?-1:.5,d=new Array(r),i=0;i<r;i++)d[i]=new U(e.add(l.rotate((i+f)*h)));return n(d,!0,t)},Star:function(){for(var t=arguments,e=k.readNamed(t,"center"),r=2*_.readNamed(t,"points"),o=_.readNamed(t,"radius1"),h=_.readNamed(t,"radius2"),c=360/r,l=new k(0,-1),f=new Array(r),i=0;i<r;i++)f[i]=new U(e.add(l.rotate(c*i).multiply(i%2?h:o)));return n(f,!0,t)}}}});
1var $=Z.extend({_class:"CompoundPath",_serializeFields:{children:[]},beans:!0,initialize:function(t){this._children=[],this._namedChildren={},this._initialize(t)||("string"==typeof t?this.setPathData(t):this.addChildren(Array.isArray(t)?t:arguments))},insertChildren:function t(e,n){var r=n,o=r[0];o&&"number"==typeof o[0]&&(r=[r]);for(var i=n.length-1;i>=0;i--){var h=r[i];r!==n||h instanceof K||(r=_.slice(r)),Array.isArray(h)?r[i]=new K({segments:h,insert:!1}):h instanceof $&&(r.splice.apply(r,[i,1].concat(h.removeChildren())),h.remove())}return t.base.call(this,e,r)},reduce:function t(e){for(var n=this._children,i=n.length-1;i>=0;i--){var path;(path=n[i].reduce(e)).isEmpty()&&path.remove()}return n.length?t.base.call(this):((path=new K(O.NO_INSERT)).copyAttributes(this),path.insertAbove(this),this.remove(),path)},isClosed:function(){for(var t=this._children,i=0,e=t.length;i<e;i++)if(!t[i]._closed)return!1;return!0},setClosed:function(t){for(var e=this._children,i=0,n=e.length;i<n;i++)e[i].setClosed(t)},getFirstSegment:function(){var t=this.getFirstChild();return t&&t.getFirstSegment()},getLastSegment:function(){var t=this.getLastChild();return t&&t.getLastSegment()},getCurves:function(){for(var t=this._children,e=[],i=0,n=t.length;i<n;i++)_.push(e,t[i].getCurves());return e},getFirstCurve:function(){var t=this.getFirstChild();return t&&t.getFirstCurve()},getLastCurve:function(){var t=this.getLastChild();return t&&t.getLastCurve()},getArea:function(){for(var t=this._children,area=0,i=0,e=t.length;i<e;i++)area+=t[i].getArea();return area},getLength:function(){for(var t=this._children,e=0,i=0,n=t.length;i<n;i++)e+=t[i].getLength();return e},getPathData:function(t,e){for(var n=this._children,r=[],i=0,o=n.length;i<o;i++){var h=n[i],c=h._matrix;r.push(h.getPathData(t&&!c.isIdentity()?t.appended(c):t,e))}return r.join("")},_hitTestChildren:function t(e,n,r){return t.base.call(this,e,n.class===K||"path"===n.type?n:_.set({},n,{fill:!1}),r)},_draw:function(t,param,e,n){var r=this._children;if(r.length){param=param.extend({dontStart:!0,dontFinish:!0}),t.beginPath();for(var i=0,o=r.length;i<o;i++)r[i].draw(t,param,n);if(!param.clip){this._setStyles(t,param,e);var style=this._style;style.hasFill()&&(t.fill(style.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),style.hasStroke()&&t.stroke()}}},_drawSelected:function(t,e,n){for(var r=this._children,i=0,o=r.length;i<o;i++){var h=r[i],c=h._matrix;n[h._id]||h._drawSelected(t,c.isIdentity()?e:e.appended(c))}}},new function(){function t(t,e){var n=t._children;if(e&&!n.length)throw new Error("Use a moveTo() command first");return n[n.length-1]}return _.each(["lineTo","cubicCurveTo","quadraticCurveTo","curveTo","arcTo","lineBy","cubicCurveBy","quadraticCurveBy","curveBy","arcBy"],function(e){this[e]=function(){var path=t(this,!0);path[e].apply(path,arguments)}},{moveTo:function(){var e=t(this),path=e&&e.isEmpty()?e:new K(O.NO_INSERT);path!==e&&this.addChild(path),path.moveTo.apply(path,arguments)},moveBy:function(){var e=t(this,!0),n=e&&e.getLastSegment(),r=k.read(arguments);this.moveTo(n?r.add(n._point):r)},closePath:function(e){t(this,!0).closePath(e)}})},_.each(["reverse","flatten","simplify","smooth"],function(t){this[t]=function(param){for(var e,n=this._children,i=0,r=n.length;i<r;i++)e=n[i][t](param)||e;return e}},{}));Z.inject(new function(){var t=Math.min,e=Math.max,n=Math.abs,r={unite:{1:!0,2:!0},intersect:{2:!0},subtract:{1:!0},exclude:{1:!0,"-1":!0}};function o(path){return path._children||[path]}function h(path,t){var e=path.clone(!1).reduce({simplify:!0}).transform(null,!0,!0);if(t){for(var n=o(e),i=0,r=n.length;i<r;i++){(path=n[i])._closed||path.isEmpty()||(path.closePath(1e-12),path.getFirstSegment().setHandleIn(0,0),path.getLastSegment().setHandleOut(0,0))}e=e.resolveCrossings().reorient("nonzero"===e.getFillRule(),!0)}return e}function c(t,e,n,r,o){var h=new $(O.NO_INSERT);return h.addChildren(t,!0),h=h.reduce({simplify:e}),o&&0==o.insert||h.insertAbove(r&&n.isSibling(r)&&n.getIndex()<r.getIndex()?r:n),h.copyAttributes(n,!0),h}function f(t){return t.hasOverlap()||t.isCrossing()}function d(t,e,n,l){if(l&&(0==l.trace||l.stroke)&&/^(subtract|intersect)$/.test(n))return v(t,e,n);var d=h(t,!0),m=e&&t!==e&&h(e,!0),y=r[n];y[n]=!0,m&&(y.subtract||y.exclude)^m.isClockwise()^d.isClockwise()&&m.reverse();var C,k=S(G.expand(d.getIntersections(m,f))),P=o(d),E=m&&o(m),T=[],N=[];function M(t){for(var i=0,e=t.length;i<e;i++){var path=t[i];_.push(T,path._segments),_.push(N,path.getCurves()),path._overlapsOnly=!0}}function L(t){for(var e=[],i=0,n=t&&t.length;i<n;i++)e.push(N[t[i]]);return e}if(k.length){M(P),E&&M(E);for(var O=new Array(N.length),i=0,V=N.length;i<V;i++)O[i]=N[i].getValues();var R=x.findCurveBoundsCollisions(O,O,0,!0),z={};for(i=0;i<N.length;i++){var D=N[i],B=D._path._id;(z[B]=z[B]||{})[D.getIndex()]={hor:L(R[i].hor),ver:L(R[i].ver)}}for(i=0,V=k.length;i<V;i++)I(k[i]._segment,d,m,z,y);for(i=0,V=T.length;i<V;i++){var F=T[i],j=F._intersection;F._winding||I(F,d,m,z,y),j&&j._overlap||(F._path._overlapsOnly=!1)}C=A(T,y)}else C=w(E?P.concat(E):P.slice(),function(t){return!!y[t]});return c(C,!0,t,e,l)}function v(t,e,n){var r=h(t),o=h(e),l=r.getIntersections(o,f),d="subtract"===n,_="divide"===n,v={},m=[];function y(path){if(!v[path._id]&&(_||o.contains(path.getPointAt(path.getLength()/2))^d))return m.unshift(path),v[path._id]=!0}for(var i=l.length-1;i>=0;i--){var path=l[i].split();path&&(y(path)&&path.getFirstSegment().setHandleIn(0,0),r.getLastSegment().setHandleOut(0,0))}return y(r),c(m,!1,t,e)}function m(t,e){for(var n=t;n;){if(n===e)return;n=n._previous}for(;t._next&&t._next!==e;)t=t._next;if(!t._next){for(;e._previous;)e=e._previous;t._next=e,e._previous=t}}function y(t){for(var i=t.length-1;i>=0;i--)t[i].clearHandles()}function w(t,e,r){var o=t&&t.length;if(o){var h=_.each(t,function(path,i){this[path._id]={container:null,winding:path.isClockwise()?1:-1,index:i}},{}),c=t.slice().sort(function(a,b){return n(b.getArea())-n(a.getArea())}),l=c[0],f=x.findItemBoundsCollisions(c,null,C.GEOMETRIC_EPSILON);null==r&&(r=l.isClockwise());for(var i=0;i<o;i++){var d=c[i],v=h[d._id],m=0,y=f[i];if(y)for(var w=null,S=y.length-1;S>=0;S--)if(y[S]<i){w=w||d.getInteriorPoint();var k=c[y[S]];if(k.contains(w)){var I=h[k._id];m=I.winding,v.winding+=m,v.container=I.exclude?I.container:k;break}}if(e(v.winding)===e(m))v.exclude=!0,t[v.index]=null;else{var A=v.container;d.setClockwise(A?!A.isClockwise():r)}}}return t}function S(t,e,n){var r,o,h,c=e&&[],l=1e-8,f=1-l,d=!1,_=n||[],v=n&&{};function x(t){return t._path._id+"."+t._segment1._index}for(var i=(n&&n.length)-1;i>=0;i--){(w=n[i])._path&&(v[x(w)]=!0)}for(i=t.length-1;i>=0;i--){var w,C,S=t[i],time=S._time,k=time,I=e&&!e(S);if((w=S._curve)&&(w!==o?(d=!w.hasHandles()||v&&v[x(w)],r=[],h=null,o=w):h>=l&&(time/=h)),I)r&&r.push(S);else{if(e&&c.unshift(S),h=k,time<l)C=w._segment1;else if(time>f)C=w._segment2;else{var A=w.divideAtTime(time,!0);d&&_.push(w,A),C=A._segment1;for(var P=r.length-1;P>=0;P--){var E=r[P];
1E._time=(E._time-time)/(1-time)}}S._setSegment(C);var T=C._intersection,N=S._intersection;if(T){m(T,N);for(var M=T;M;)m(M._intersection,T),M=M._next}else C._intersection=N}}return n||y(_),c||t}function k(r,o,h,c,l){var f,d,_=Array.isArray(o)?o:o[h?"hor":"ver"],v=h?1:0,m=1^v,y=[r.x,r.y],x=y[v],w=y[m],C=1e-6,S=x-1e-9,I=x+1e-9,A=0,P=0,E=0,T=0,N=!1,M=!1,L=1,O=[];function V(n){var d=n[m+0],_=n[m+6];if(!(w<t(d,_)||w>e(d,_))){var y=n[v+0],A=n[v+2],P=n[v+4],M=n[v+6];if(d!==_){var V=w===d?0:w===_||S>e(y,A,P,M)||I<t(y,A,P,M)?1:W.solveCubic(n,m,w,O,0,1)>0?O[0]:1,a=0===V?y:1===V?M:W.getPoint(n,V)[h?"y":"x"],R=d>_?1:-1,z=f[m]>f[m+6]?1:-1,D=f[v+6];return w!==d?(a<S?E+=R:a>I?T+=R:N=!0,a>x-C&&a<x+C&&(L/=2)):(R!==z?y<S?E+=R:y>I&&(T+=R):y!=D&&(D<I&&a>I?(T+=R,N=!0):D>S&&a<S&&(E+=R,N=!0)),L/=4),f=n,!l&&a>S&&a<I&&0===W.getTangent(n,V)[h?"x":"y"]&&k(r,o,!h,c,!0)}(y<I&&M>S||M<I&&y>S)&&(N=!0)}}function R(n){var r=n[m+0],o=n[m+2],c=n[m+4],l=n[m+6];if(w<=e(r,o,c,l)&&w>=t(r,o,c,l))for(var f,d=n[v+0],_=n[v+2],y=n[v+4],x=n[v+6],C=S>e(d,_,y,x)||I<t(d,_,y,x)?[n]:W.getMonoCurves(n,h),i=0,k=C.length;i<k;i++)if(f=V(C[i]))return f}for(var i=0,z=_.length;i<z;i++){var D,B=_[i],path=B._path,F=B.getValues();if(!(i&&_[i-1]._path===path||(f=null,path._closed||(d=W.getValues(path.getLastCurve().getSegment2(),B.getSegment1(),null,!c))[m]!==d[m+6]&&(f=d),f))){f=F;for(var j=path.getLastCurve();j&&j!==B;){var U=j.getValues();if(U[m]!==U[m+6]){f=U;break}j=j.getPrevious()}}if(D=R(F))return D;if(i+1===z||_[i+1]._path!==path){if(d&&(D=R(d)))return D;!N||E||T||(E=T=path.isClockwise(c)^h?1:-1),A+=E,P+=T,E=T=0,N&&(M=!0,N=!1),d=null}}return A=n(A),P=n(P),{winding:e(A,P),windingL:A,windingR:P,quality:L,onPath:M}}function I(t,e,r,o,h){var c=[],l=t,f=0;do{if(S=t.getCurve()){var d=S.getLength();c.push({segment:t,curve:S,length:d}),f+=d}t=t.getNext()}while(t&&!t._intersection&&t!==l);for(var _=[.5,.25,.75],v={winding:0,quality:-1},i=0;i<_.length&&v.quality<.5;i++){d=f*_[i];for(var m=0,y=c.length;m<y;m++){var x=c[m],w=x.length;if(d<=w){var S,path=(S=x.curve)._path,I=path._parent,A=I instanceof $?I:path,P=C.clamp(S.getTimeAt(d),.001,.999),E=S.getPointAtTime(P),T=n(S.getTangentAtTime(P).y)<Math.SQRT1_2,N=null;if(h.subtract&&r){var M=(A===e?r:e)._getWinding(E,T,!0);if(A===e&&M.winding||A===r&&!M.winding){if(M.quality<1)continue;N={winding:0,quality:1}}}(N=N||k(E,o[path._id][S.getIndex()],T,!0)).quality>v.quality&&(v=N);break}d-=w}}for(m=c.length-1;m>=0;m--)c[m].segment._winding=v}function A(t,e){var n,r=[];function o(t){var n;return!(!t||t._visited||e&&(!e[(n=t._winding||{}).winding]||e.unite&&2===n.winding&&n.windingL&&n.windingR))}function h(t){if(t)for(var i=0,e=n.length;i<e;i++)if(t===n[i])return!0;return!1}function c(path){for(var t=path._segments,i=0,e=t.length;i<e;i++)t[i]._visited=!0}function l(t,e){var r=t._intersection,c=r,l=[];function f(r,c){for(;r&&r!==c;){var f=r._segment,path=f&&f._path;if(path){var d=f.getNext()||path.getFirstSegment(),_=d._intersection;f!==t&&(h(f)||h(d)||d&&o(f)&&(o(d)||_&&o(_._segment)))&&l.push(f),e&&n.push(f)}r=r._next}}if(e&&(n=[t]),r){for(f(r);r&&r._previous;)r=r._previous;f(r,c)}return l}t.sort(function(t,e){var n=t._intersection,r=e._intersection,o=!(!n||!n._overlap),h=!(!r||!r._overlap),c=t._path,l=e._path;return o^h?o?1:-1:!n^!r?n?1:-1:c!==l?c._id-l._id:t._index-e._index});for(var i=0,f=t.length;i<f;i++){var d,_,v,m=t[i],y=o(m),path=null,x=!1,w=!0,C=[];if(y&&m._path._overlapsOnly){var S=m._path,k=m._intersection._segment._path;S.compare(k)&&(S.getArea()&&r.push(S.clone(!1)),c(S),c(k),y=!1)}for(;y;){var I=!path,A=l(m,I),P=A.shift(),E=!(x=!I&&(h(m)||h(P)))&&P;if(I&&(path=new K(O.NO_INSERT),d=null),x){(m.isFirst()||m.isLast())&&(w=m._path._closed),m._visited=!0;break}if(E&&d&&(C.push(d),d=null),d||(E&&A.push(m),d={start:path._segments.length,crossings:A,visited:_=[],handleIn:v}),E&&(m=P),!o(m)){path.removeSegments(d.start);for(var T=0,N=_.length;T<N;T++)_[T]._visited=!1;_.length=0;do{(m=d&&d.crossings.shift())&&m._path||(m=null,(d=C.pop())&&(_=d.visited,v=d.handleIn))}while(d&&!o(m));if(!m)break}var M=m.getNext();path.add(new U(m._point,v,M&&m._handleOut)),m._visited=!0,_.push(m),m=M||m._path.getFirstSegment(),v=M&&M._handleIn}x&&(w&&(path.getFirstSegment().setHandleIn(v),path.setClosed(w)),0!==path.getArea()&&r.push(path))}return r}return{_getWinding:function(t,e,n){return k(t,this.getCurves(),e,n)},unite:function(path,t){return d(this,path,"unite",t)},intersect:function(path,t){return d(this,path,"intersect",t)},subtract:function(path,t){return d(this,path,"subtract",t)},exclude:function(path,t){return d(this,path,"exclude",t)},divide:function(path,t){return t&&(0==t.trace||t.stroke)?v(this,path,"divide"):c([this.subtract(path,t),this.intersect(path,t)],!0,this,path,t)},resolveCrossings:function(){var t=this._children,e=t||[this];function n(t,path){var e=t&&t._intersection;return e&&e._overlap&&e._path===path}var r=!1,o=!1,h=this.getIntersections(null,function(t){return t.hasOverlap()&&(r=!0)||t.isCrossing()&&(o=!0)}),c=r&&o&&[];if(h=G.expand(h),r)for(var l=S(h,function(t){return t.hasOverlap()},c),i=l.length-1;i>=0;i--){var f=l[i],path=f._path,d=f._segment,v=d.getPrevious(),m=d.getNext();n(v,path)&&n(m,path)&&(d.remove(),v._handleOut._set(0,0),m._handleIn._set(0,0),v===d||v.getCurve(
1).hasLength()||(m._handleIn.set(v._handleIn),v.remove()))}o&&(S(h,r&&function(t){var e=t.getCurve(),n=t.getSegment(),r=t._intersection,o=r._curve,h=r._segment;if(e&&o&&e._path&&o._path)return!0;n&&(n._intersection=null),h&&(h._intersection=null)},c),c&&y(c),e=A(_.each(e,function(path){_.push(this,path._segments)},[])));var x,w=e.length;return w>1&&t?(e!==t&&this.setChildren(e),x=this):1!==w||t||(e[0]!==this&&this.setSegments(e[0].removeSegments()),x=this),x||((x=new $(O.NO_INSERT)).addChildren(e),(x=x.reduce()).copyAttributes(this),this.replaceWith(x)),x},reorient:function(t,e){var n=this._children;return n&&n.length?this.setChildren(w(this.removeChildren(),function(e){return!!(t?e:1&e)},e)):e!==l&&this.setClockwise(e),this},getInteriorPoint:function(){var n=this.getBounds().getCenter(!0);if(!this.contains(n)){for(var r=this.getCurves(),o=n.y,h=[],c=[],i=0,l=r.length;i<l;i++){var f=r[i].getValues(),d=f[1],_=f[3],v=f[5],m=f[7];if(o>=t(d,_,v,m)&&o<=e(d,_,v,m))for(var y=W.getMonoCurves(f),x=0,w=y.length;x<w;x++){var C=y[x],S=C[1],k=C[7];if(S!==k&&(o>=S&&o<=k||o>=k&&o<=S)){var I=o===S?C[0]:o===k?C[6]:1===W.solveCubic(C,1,o,c,0,1)?W.getPoint(C,c[0]).x:(C[0]+C[6])/2;h.push(I)}}}h.length>1&&(h.sort(function(a,b){return a-b}),n.x=(h[0]+h[1])/2)}return n}}});var Q=_.extend({_class:"PathFlattener",initialize:function(path,t,e,n,r){var o,h=[],c=[],l=0,f=1/(e||32),d=path._segments,_=d[0];function v(t,e){var n=W.getValues(t,e,r);h.push(n),m(n,t._index,0,1)}function m(e,r,o,h){if(!(h-o>f)||n&&W.isStraight(e)||W.isFlatEnough(e,t||.25)){var d=e[6]-e[0],_=e[7]-e[1],v=Math.sqrt(d*d+_*_);v>0&&(l+=v,c.push({offset:l,curve:e,index:r,time:h}))}else{var y=W.subdivide(e,.5),x=(o+h)/2;m(y[0],r,o,x),m(y[1],r,x,h)}}for(var i=1,y=d.length;i<y;i++)v(_,o=d[i]),_=o;path._closed&&v(o||_,d[0]),this.curves=h,this.parts=c,this.length=l,this.index=0},_get:function(t){for(var i,e=this.parts,n=e.length,r=this.index;i=r,r&&!(e[--r].offset<t););for(;i<n;i++){var o=e[i];if(o.offset>=t){this.index=i;var h=e[i-1],c=h&&h.index===o.index?h.time:0,l=h?h.offset:0;return{index:o.index,time:c+(o.time-c)*(t-l)/(o.offset-l)}}}return{index:e[n-1].index,time:1}},drawPart:function(t,e,n){for(var r=this._get(e),o=this._get(n),i=r.index,h=o.index;i<=h;i++){var c=W.getPart(this.curves[i],i===r.index?r.time:0,i===o.index?o.time:1);i===r.index&&t.moveTo(c[0],c[1]),t.bezierCurveTo.apply(t,c.slice(2))}}},_.each(W._evaluateMethods,function(t){this[t+"At"]=function(e){var param=this._get(e);return W[t](this.curves[param.index],param.time)}},{})),J=_.extend({initialize:function(path){for(var t,e=this.points=[],n=path._segments,r=path._closed,i=0,o=n.length;i<o;i++){var h=n[i].point;t&&t.equals(h)||e.push(t=h.clone())}r&&(e.unshift(e[e.length-1]),e.push(e[1])),this.closed=r},fit:function(t){var e=this.points,n=e.length,r=null;return n>0&&(r=[new U(e[0])],n>1&&(this.fitCubic(r,t,0,n-1,e[1].subtract(e[0]),e[n-2].subtract(e[n-1])),this.closed&&(r.shift(),r.pop()))),r},fitCubic:function(t,e,n,r,o,h){var c=this.points;if(r-n!==1){for(var l,f=this.chordLengthParameterize(n,r),d=Math.max(e,e*e),_=!0,i=0;i<=4;i++){var v=this.generateBezier(n,r,f,o,h),m=this.findMaxError(n,r,v,f);if(m.error<e&&_)return void this.addCurve(t,v);if(l=m.index,m.error>=d)break;_=this.reparameterize(n,r,f,v),d=m.error}var y=c[l-1].subtract(c[l+1]);this.fitCubic(t,e,n,l,o,y),this.fitCubic(t,e,l,r,y.negate(),h)}else{var x=c[n],w=c[r],C=x.getDistance(w)/3;this.addCurve(t,[x,x.add(o.normalize(C)),w.add(h.normalize(C)),w])}},addCurve:function(t,e){t[t.length-1].setHandleOut(e[1].subtract(e[0])),t.push(new U(e[3],e[2].subtract(e[3])))},generateBezier:function(t,e,n,r,o){for(var h=1e-12,c=Math.abs,l=this.points,f=l[t],d=l[e],_=[[0,0],[0,0]],v=[0,0],i=0,m=e-t+1;i<m;i++){var u=n[i],y=1-u,b=3*u*y,x=y*y*y,w=b*y,C=b*u,S=u*u*u,k=r.normalize(w),I=o.normalize(C),A=l[t+i].subtract(f.multiply(x+w)).subtract(d.multiply(C+S));_[0][0]+=k.dot(k),_[0][1]+=k.dot(I),_[1][0]=_[0][1],_[1][1]+=I.dot(I),v[0]+=k.dot(A),v[1]+=I.dot(A)}var P,E,T=_[0][0]*_[1][1]-_[1][0]*_[0][1];if(c(T)>h){var N=_[0][0]*v[1]-_[1][0]*v[0];P=(v[0]*_[1][1]-v[1]*_[0][1])/T,E=N/T}else{var M=_[0][0]+_[0][1],L=_[1][0]+_[1][1];P=E=c(M)>h?v[0]/M:c(L)>h?v[1]/L:0}var O,V,R=d.getDistance(f),z=h*R;if(P<z||E<z)P=E=R/3;else{var line=d.subtract(f);O=r.normalize(P),V=o.normalize(E),O.dot(line)-V.dot(line)>R*R&&(P=E=R/3,O=V=null)}return[f,f.add(O||r.normalize(P)),d.add(V||o.normalize(E)),d]},reparameterize:function(t,e,u,n){for(var i=t;i<=e;i++)u[i-t]=this.findRoot(n,this.points[i],u[i-t]);i=1;for(var r=u.length;i<r;i++)if(u[i]<=u[i-1])return!1;return!0},findRoot:function(t,e,u){for(var n=[],r=[],i=0;i<=2;i++)n[i]=t[i+1].subtract(t[i]).multiply(3);for(i=0;i<=1;i++)r[i]=n[i+1].subtract(n[i]).multiply(2);var o=this.evaluate(3,t,u),h=this.evaluate(2,n,u),c=this.evaluate(1,r,u),l=o.subtract(e),f=h.dot(h)+l.dot(c);return C.isMachineZero(f)?u:u-l.dot(h)/f},evaluate:function(t,e,n){for(var r=e.slice(),i=1;i<=t;i++)for(var o=0;o<=t-i;o++)r[o]=r[o].multiply(1-n).add(r[o+1].multiply(n));return r[0]},chordLengthParameterize:function(t,e){for(var u=[0],i=t+1;i<=e;i++)u[i-t]=u[i-t-1]+this.points[i].getDistance(this.points[i-1]);i=1;for(var n=e-t;i<=n;i++)u[i]/=u[n];return u},findMaxError:function(t,e,n,u){for(var r=Math.floor((e-t+1)/2),o=0,i=t+1;i<e;i++){var h=this.evaluate(3,n,u[i-t]).subtract(this.points[i]),c=h.x*h.x+h.y*h.y;c>=o&&(o=c,r=i)}return{error:o,index:r}}}),X=O.extend({_class:"TextItem",_applyMatrix:!1,_canApplyMatrix:!1,_serializeFields:{content:null},_boundsOptions:{stroke:!1,handle:!1},initialize:function(t){this._content="",this._lines=[];var e=t&&_.isPlainObject(t)&&t.x===l&&t.y===l;this._initialize(e&&t,!e&&k.read(arguments))},_equals:function(t){return this._content===t._content},copyContent:function(source){this.setContent(source._content)},getContent:function(){return this._content},setContent:function(content){this._content=""+content,this._lines=this._content.split(/\r\n|\n|\r/gm),this._changed(521)},isEmpty:function(){return!this._content},getCharacterStyle:"#getStyle",setCharacterStyle:"#setStyle",getParagraphStyle:"#getStyle",setParagraphStyle:"#setStyle"}),Y=X.extend({_class:"PointText",initialize:function(){X.apply(this,arguments)},getPoint:function(){var t=this._matrix.getTranslation();return new I(t.x,t.y,this,"setPoint")},setPoint:function(){var t=k.read(arguments);this.translate(t.subtract(this._matrix.getTranslation()))},_draw:function(t,param,e){if(this._content){this._setStyles(t,param,e);var n=this._lines,style=this._style,r=style.hasFill(),o=style.hasStroke(),h=style.getLeading(),c=t.shadowColor;t.font=style.getFontStyle(),t.textAlign=style.getJustification();for(var i=0,l=n.length;i<l;i++){t.shadowColor=c;var line=n[i];r&&(t.fillText(line,0,0),t.shadowColor="rgba(0,0,0,0)"),o&&t.strokeText(line,0,0),t.translate(0,h)}}},_getBounds:function(t,e){var style=this._style,n=this._lines,r=n.length,o=style.getJustification(),h=style.getLeading(),c=this.getView().getTextWidth(style.getFontStyle(),n),l=0;"left"!==o&&(l-=c/("center"===o?2:1));var rect=new E(l,r?-.75*h:0,c,r*h);return t?t._transformBounds(rect,rect):rect}}),tt=_.extend(new function(){var t,e={gray:["gray"],rgb:["red","green","blue"],hsb:["hue","saturation","brightness"],hsl:["hue","saturation","lightness"],gradient:["gradient","origin","destination","highlight"]},n={},r={transparent:[0,0,0,0]};var o=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]],h={"rgb-hsb":function(t,g,b){var e=Math.max(t,g,b),n=e-Math.min(t,g,b);return[0===n?0:60*(e==t?(g-b)/n+(g<b?6:0):e==g?(b-t)/n+2:(t-g)/n+4),0===e?0:n/e,e]},"hsb-rgb":function(t,s,b){var i,e=(t=(t/60%6+6)%6)-(i=Math.floor(t)),n=[b,b*(1-s),b*(1-s*e),b*(1-s*(1-e))];return[n[(i=o[i])[0]],n[i[1]],n[i[2]]]},"rgb-hsl":function(t,g,b){var e=Math.max(t,g,b),n=Math.min(t,g,b),r=e-n,o=0===r,h=(e+n)/2;return[o?0:60*(e==t?(g-b)/r+(g<b?6:0):e==g?(b-t)/r+2:(t-g)/r+4),o?0:h<.5?r/(e+n):r/(2-e-n),h]},"hsl-rgb":function(t,s,e){if(0===s)return[e,e,e];for(var n=[(t=(t/360%1+1)%1)+1/3,t,t-1/3],r=e<.5?e*(1+s):e+s-e*s,o=2*e-r,h=[],i=0;i<3;i++){var c=n[i];c<0&&(c+=1),c>1&&(c-=1),h[i]=6*c<1?o+6*(r-o)*c:2*c<1?r:3*c<2?o+(r-o)*(2/3-c)*6:o}return h},"rgb-gray":function(t,g,b){return[.2989*t+.587*g+.114*b]},"gray-rgb":function(g){return[g,g,g]},"gray-hsb":function(g){return[0,0,g]},"gray-hsl":function(g){return[0,0,g]},"gradient-rgb":function(){return[]},"rgb-gradient":function(){return[]}};return _.each(e,function(t,r){n[r]=[],_.each(t,function(t,o){var h=_.capitalize(t),c=/^(hue|saturation)$/.test(t),l=n[r][o]="gradient"===r?"gradient"===t?function(t){var e=this._components[0];return e!==(t=et.read(Array.isArray(t)?t:arguments,0,{readNull:!0}))&&(e&&e._removeOwner(this),t&&t._addOwner(this)),t}:function(){return k.read(arguments,0,{readNull:"highlight"===t,clone:!0})}:function(t){return null==t||isNaN(t)?0:+t};this["get"+h]=function(){return this._type===r||c&&/^hs[bl]$/.test(this._type)?this._components[o]:this._convert(r)[o]},this["set"+h]=function(t){this._type===r||c&&/^hs[bl]$/.test(this._type)||(this._components=this._convert(r),this._properties=e[r],this._type=r),this._components[o]=l.call(this,t),this._changed()}},this)},{_class:"Color",_readIndex:!0,initialize:function o(h){var c,l,d,v,m=arguments,y=this.__read,x=0;Array.isArray(h)&&(h=(m=h)[0]);var w=null!=h&&typeof h;if("string"===w&&h in e&&(c=h,h=m[1],Array.isArray(h)?(l=h,d=m[2]):(y&&(x=1),m=_.slice(m,1),w=typeof h)),!l){if(v="number"===w?m:"object"===w&&null!=h.length?h:null){c||(c=v.length>=3?"rgb":"gray");var C=e[c].length;d=v[C],y&&(x+=v===arguments?C+(null!=d?1:0):1),v.length>C&&(v=_.slice(v,0,C))}else if("string"===w){var S=function(e){var n,o=e.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i)||e.match(/^#([\da-f])([\da-f])([\da-f])([\da-f])?$/i),h="rgb";if(o){var c=o[4]?4:3;n=new Array(c);for(var i=0;i<c;i++){var l=o[i+1];n[i]=parseInt(1==l.length?l+l:l,16)/255}}else if(o=e.match(/^(rgb|hsl)a?\((.*)\)$/)){h=o[1],n=o[2].trim().split(/[,\s]+/g);for(var d="hsl"===h,_=(i=0,Math.min(n.length,4));i<_;i++){var component=n[i];if(l=parseFloat(component),d)if(0===i){var v=component.match(/([a-z]*)$/)[1];l*={turn:360,rad:180/Math.PI,grad:.9}[v]||1}else i<3&&(l/=100);else i<3&&(l/=/%$/.test(component)?100:255);n[i]=l}}else{var m=r[e];if(!m)if(f){t||((t=mt.getContext(1,1,{willReadFrequently:!0})).globalCompositeOperation="copy"),t.fillStyle="rgba(0,0,0,0)",t.fillStyle=e,t.fillRect(0,0,1,1);var data=t.getImageData(0,0,1,1).data;m=r[e]=[data[0]/255,data[1]/255,data[2]/255]}else m=[0,0,0];n=m.slice()}return[h,n]}(h);c=S[0],4===(l=S[1]).length&&(d=l[3],l.length--)}else if("object"===w)if(h.constructor===o){if(c=h._type,l=h._components.slice(),d=h._alpha,"gradient"===c)for(var i=1,k=l.length;i<k;i++){var I=l[i];I&&(l[i]=I.clone())}}else if(h.constructor===et)c="gradient",v=m;else{var A=e[c="hue"in h?"lightness"in h?"hsl":"hsb":"gradient"in h||"stops"in h||"radial"in h?"gradient":"gray"in h?"gray":"rgb"],P=n[c];this._components=l=[];for(i=0,k=A.length;i<k;i++){null==(E=h[A[i]])&&!i&&"gradient"===c&&"stops"in h&&(E={stops:h.stops,radial:h.radial}),null!=(E=P[i].call(this,E))&&(l[i]=E)}
1d=h.alpha}y&&c&&(x=1)}if(this._type=c||"rgb",!l){this._components=l=[];for(i=0,k=(P=n[this._type]).length;i<k;i++){var E;null!=(E=P[i].call(this,v&&v[i]))&&(l[i]=E)}}return this._components=l,this._properties=e[this._type],this._alpha=d,y&&(this.__read=x),this},set:"#initialize",_serialize:function(t,e){var n=this.getComponents();return _.serialize(/^(gray|rgb)$/.test(this._type)?n:[this._type].concat(n),t,!0,e)},_changed:function(){this._canvasStyle=null,this._owner&&(this._setter?this._owner[this._setter](this):this._owner._changed(129))},_convert:function(t){var e;return this._type===t?this._components.slice():(e=h[this._type+"-"+t])?e.apply(this,this._components):h["rgb-"+t].apply(this,h[this._type+"-rgb"].apply(this,this._components))},convert:function(t){return new tt(t,this._convert(t),this._alpha)},getType:function(){return this._type},setType:function(t){this._components=this._convert(t),this._properties=e[t],this._type=t},getComponents:function(){var t=this._components.slice();return null!=this._alpha&&t.push(this._alpha),t},getAlpha:function(){return null!=this._alpha?this._alpha:1},setAlpha:function(t){this._alpha=null==t?null:Math.min(Math.max(t,0),1),this._changed()},hasAlpha:function(){return null!=this._alpha},equals:function(t){var col=_.isPlainValue(t,!0)?tt.read(arguments):t;return col===this||col&&this._class===col._class&&this._type===col._type&&this.getAlpha()===col.getAlpha()&&_.equals(this._components,col._components)||!1},toString:function(){for(var t=this._properties,e=[],n="gradient"===this._type,r=w.instance,i=0,o=t.length;i<o;i++){var h=this._components[i];null!=h&&e.push(t[i]+": "+(n?h:r.number(h)))}return null!=this._alpha&&e.push("alpha: "+r.number(this._alpha)),"{ "+e.join(", ")+" }"},toCSS:function(t){var e=this._convert("rgb"),n=t||null==this._alpha?1:this._alpha;function r(t){return Math.round(255*(t<0?0:t>1?1:t))}return e=[r(e[0]),r(e[1]),r(e[2])],n<1&&e.push(n<0?0:n),t?"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+e[2]).toString(16).slice(1):(4==e.length?"rgba(":"rgb(")+e.join(",")+")"},toCanvasStyle:function(t,e){if(this._canvasStyle)return this._canvasStyle;if("gradient"!==this._type)return this._canvasStyle=this.toCSS();var n,r=this._components,o=r[0],h=o._stops,c=r[1],l=r[2],f=r[3],d=e&&e.inverted();if(d&&(c=d._transformPoint(c),l=d._transformPoint(l),f&&(f=d._transformPoint(f))),o._radial){var _=l.getDistance(c);if(f){var v=f.subtract(c);v.getLength()>_&&(f=c.add(v.normalize(_-.1)))}var m=f||c;n=t.createRadialGradient(m.x,m.y,0,c.x,c.y,_)}else n=t.createLinearGradient(c.x,c.y,l.x,l.y);for(var i=0,y=h.length;i<y;i++){var x=h[i],w=x._offset;n.addColorStop(null==w?i/(y-1):w,x._color.toCanvasStyle())}return this._canvasStyle=n},transform:function(t){if("gradient"===this._type){for(var e=this._components,i=1,n=e.length;i<n;i++){var r=e[i];t._transformPoint(r,r,!0)}this._changed()}},statics:{_types:e,random:function(){var t=Math.random;return new tt(t(),t(),t())},_setOwner:function(t,e,n){return t&&(t._owner&&e&&t._owner!==e&&(t=t.clone()),!t._owner^!e&&(t._owner=e||null,t._setter=n||null)),t}}})},new function(){return _.each({add:function(a,b){return a+b},subtract:function(a,b){return a-b},multiply:function(a,b){return a*b},divide:function(a,b){return a/b}},function(t,e){this[e]=function(e){e=tt.read(arguments);for(var n=this._type,r=this._components,o=e._convert(n),i=0,h=r.length;i<h;i++)o[i]=t(r[i],o[i]);return new tt(n,o,null!=this._alpha?t(this._alpha,e.getAlpha()):null)}},{})}),et=_.extend({_class:"Gradient",initialize:function(t,e){this._id=S.get(),t&&_.isPlainObject(t)&&(this.set(t),t=e=null),null==this._stops&&this.setStops(t||["white","black"]),null==this._radial&&this.setRadial("string"==typeof e&&"radial"===e||e||!1)},_serialize:function(t,e){return e.add(this,function(){return _.serialize([this._stops,this._radial],t,!0,e)})},_changed:function(){for(var i=0,t=this._owners&&this._owners.length;i<t;i++)this._owners[i]._changed()},_addOwner:function(t){this._owners||(this._owners=[]),this._owners.push(t)},_removeOwner:function(t){var e=this._owners?this._owners.indexOf(t):-1;-1!=e&&(this._owners.splice(e,1),this._owners.length||(this._owners=l))},clone:function(){for(var t=[],i=0,e=this._stops.length;i<e;i++)t[i]=this._stops[i].clone();return new et(t,this._radial)},getStops:function(){return this._stops},setStops:function(t){if(t.length<2)throw new Error("Gradient stop list needs to contain at least two stops.");var e=this._stops;if(e)for(var i=0,n=e.length;i<n;i++)e[i]._owner=l;for(i=0,n=(e=this._stops=it.readList(t,0,{clone:!0})).length;i<n;i++)e[i]._owner=this;this._changed()},getRadial:function(){return this._radial},setRadial:function(t){this._radial=t,this._changed()},equals:function(t){if(t===this)return!0;
1if(t&&this._class===t._class){var e=this._stops,n=t._stops,r=e.length;if(r===n.length){for(var i=0;i<r;i++)if(!e[i].equals(n[i]))return!1;return!0}}return!1}}),it=_.extend({_class:"GradientStop",initialize:function(t,e){var n=t,r=e;"object"==typeof t&&e===l&&(Array.isArray(t)&&"number"!=typeof t[0]?(n=t[0],r=t[1]):("color"in t||"offset"in t||"rampPoint"in t)&&(n=t.color,r=t.offset||t.rampPoint||0)),this.setColor(n),this.setOffset(r)},clone:function(){return new it(this._color.clone(),this._offset)},_serialize:function(t,e){var n=this._color,r=this._offset;return _.serialize(null==r?[n]:[n,r],t,!0,e)},_changed:function(){this._owner&&this._owner._changed(129)},getOffset:function(){return this._offset},setOffset:function(t){this._offset=t,this._changed()},getRampPoint:"#getOffset",setRampPoint:"#setOffset",getColor:function(){return this._color},setColor:function(){tt._setOwner(this._color,null),this._color=tt._setOwner(tt.read(arguments,0),this,"setColor"),this._changed()},equals:function(t){return t===this||t&&this._class===t._class&&this._color.equals(t._color)&&this._offset==t._offset||!1}}),nt=_.extend(new function(){var t={fillColor:null,fillRule:"nonzero",strokeColor:null,strokeWidth:1,strokeCap:"butt",strokeJoin:"miter",strokeScaling:!0,miterLimit:10,dashOffset:0,dashArray:[],shadowColor:null,shadowBlur:0,shadowOffset:new k,selectedColor:null},e=_.set({},t,{fontFamily:"sans-serif",fontWeight:"normal",fontSize:12,leading:null,justification:"left"}),n=_.set({},e,{fillColor:new tt}),r={strokeWidth:193,strokeCap:193,strokeJoin:193,strokeScaling:201,miterLimit:193,fontFamily:9,fontWeight:9,fontSize:9,font:9,leading:9,justification:9},o={beans:!0},h={_class:"Style",beans:!0,initialize:function(style,r,o){this._values={},this._owner=r,this._project=r&&r._project||o||bt.project,this._defaults=!r||r instanceof V?e:r instanceof X?n:t,style&&this.set(style)}};return _.each(e,function(t,e){var n=/Color$/.test(e),c="shadowOffset"===e,f=_.capitalize(e),d=r[e],v="set"+f,m="get"+f;h[v]=function(t){var r=this._owner,o=r&&r._children,h=o&&o.length>0&&!(r instanceof $);if(h)for(var i=0,c=o.length;i<c;i++)o[i]._style[v](t);if(("selectedColor"===e||!h)&&e in this._defaults){var l=this._values[e];l!==t&&(n&&(l&&(tt._setOwner(l,null),l._canvasStyle=null),t&&t.constructor===tt&&(t=tt._setOwner(t,r,h&&v))),this._values[e]=t,r&&r._changed(d||129))}},h[m]=function(t){var r=this._owner,o=r&&r._children,h=o&&o.length>0&&!(r instanceof $);if(h&&!t)for(var i=0,f=o.length;i<f;i++){var d=o[i]._style[m]();if(i){if(!_.equals(y,d))return l}else y=d}else if(e in this._defaults){var y;if((y=this._values[e])===l)(y=this._defaults[e])&&y.clone&&(y=y.clone());else{var x=n?tt:c?k:null;!x||y&&y.constructor===x||(this._values[e]=y=x.read([y],0,{readNull:!0,clone:!0}))}}return y&&n&&(y=tt._setOwner(y,r,h&&v)),y},o[m]=function(t){return this._style[m](t)},o[v]=function(t){this._style[v](t)}}),_.each({Font:"FontFamily",WindingRule:"FillRule"},function(t,e){var n="get"+e,r="set"+e;h[n]=o[n]="#get"+t,h[r]=o[r]="#set"+t}),O.inject(o),h},{set:function(style){var t=style instanceof nt,e=t?style._values:style;if(e)for(var n in e)if(n in this._defaults){var r=e[n];this[n]=r&&t&&r.clone?r.clone():r}},equals:function(style){function t(t,e,n){var r=t._values,o=e._values,h=e._defaults;for(var c in r){var f=r[c],d=o[c];if(!(n&&c in o||_.equals(f,d===l?h[c]:d)))return!1}return!0}return style===this||style&&this._class===style._class&&t(this,style)&&t(style,this,!0)||!1},_dispose:function(){var t;(t=this.getFillColor())&&(t._canvasStyle=null),(t=this.getStrokeColor())&&(t._canvasStyle=null),(t=this.getShadowColor())&&(t._canvasStyle=null)},hasFill:function(){var t=this.getFillColor();return!!t&&t.alpha>0},hasStroke:function(){var t=this.getStrokeColor();return!!t&&t.alpha>0&&this.getStrokeWidth()>0},hasShadow:function(){var t=this.getShadowColor();return!!t&&t.alpha>0&&(this.getShadowBlur()>0||!this.getShadowOffset().isZero())},getView:function(){return this._project._view},getFontStyle:function(){var t=this.getFontSize();return this.getFontWeight()+" "+t+(/[a-z]/i.test(t+"")?" ":"px ")+this.getFontFamily()},getFont:"#getFontFamily",setFont:"#setFontFamily",getLeading:function t(){var e=t.base.call(this),n=this.getFontSize();return/pt|em|%|px/.test(n)&&(n=this.getView().getPixelSize(n)),null!=e?e:1.2*n}}),st=new function(){function t(t,e,n,r){for(var o=["","webkit","moz","Moz","ms","o"],h=e[0].toUpperCase()+e.substring(1),i=0;i<6;
1i++){var c=o[i],l=c?c+h:e;if(l in t){if(!n)return t[l];t[l]=r;break}}}return{getStyles:function(t){var e=t&&9!==t.nodeType?t.ownerDocument:t,view=e&&e.defaultView;return view&&view.getComputedStyle(t,"")},getBounds:function(t,e){var rect,n=t.ownerDocument,body=n.body,html=n.documentElement;try{rect=t.getBoundingClientRect()}catch(t){rect={left:0,top:0,width:0,height:0}}var r=rect.left-(html.clientLeft||body.clientLeft||0),o=rect.top-(html.clientTop||body.clientTop||0);if(!e){var view=n.defaultView;r+=view.pageXOffset||html.scrollLeft||body.scrollLeft,o+=view.pageYOffset||html.scrollTop||body.scrollTop}return new E(r,o,rect.width,rect.height)},getViewportBounds:function(t){var e=t.ownerDocument,view=e.defaultView,html=e.documentElement;return new E(0,0,view.innerWidth||html.clientWidth,view.innerHeight||html.clientHeight)},getOffset:function(t,e){return st.getBounds(t,e).getPoint()},getSize:function(t){return st.getBounds(t,!0).getSize()},isInvisible:function(t){return st.getSize(t).equals(new A(0,0))},isInView:function(t){return!st.isInvisible(t)&&st.getViewportBounds(t).intersects(st.getBounds(t,!0))},isInserted:function(t){return d.body.contains(t)},getPrefixed:function(e,n){return e&&t(e,n)},setPrefixed:function(e,n,r){if("object"==typeof n)for(var o in n)t(e,o,!0,n[o]);else t(e,n,!0,r)}}},at={add:function(t,e){if(t)for(var n in e)for(var r=e[n],o=n.split(/[\s,]+/g),i=0,h=o.length;i<h;i++){var c=o[i],l=t===d&&("touchstart"===c||"touchmove"===c)&&{passive:!1};t.addEventListener(c,r,l)}},remove:function(t,e){if(t)for(var n in e)for(var r=e[n],o=n.split(/[\s,]+/g),i=0,h=o.length;i<h;i++)t.removeEventListener(o[i],r,!1)},getPoint:function(t){var e=t.targetTouches?t.targetTouches.length?t.targetTouches[0]:t.changedTouches[0]:t;return new k(e.pageX||e.clientX+d.documentElement.scrollLeft,e.pageY||e.clientY+d.documentElement.scrollTop)},getTarget:function(t){return t.target||t.srcElement},getRelatedTarget:function(t){return t.relatedTarget||t.toElement},getOffset:function(t,e){return at.getPoint(t).subtract(st.getOffset(e||at.getTarget(t)))}};at.requestAnimationFrame=new function(){var t,e=st.getPrefixed(f,"requestAnimationFrame"),n=!1,r=[];function o(){var t=r;r=[];for(var i=0,h=t.length;i<h;i++)t[i]();(n=e&&r.length)&&e(o)}return function(h){r.push(h),e?n||(e(o),n=!0):t||(t=setInterval(o,1e3/60))}};var ot=_.extend(v,{_class:"View",initialize:function t(e,element){function n(t){return element[t]||parseInt(element.getAttribute(t),10)}function r(){var t=st.getSize(element);return t.isNaN()||t.isZero()?new A(n("width"),n("height")):t}var o;if(f&&element){this._id=element.getAttribute("id"),null==this._id&&element.setAttribute("id",this._id="paper-view-"+t._id++),at.add(element,this._viewEvents);var h="none";if(st.setPrefixed(element.style,{userDrag:h,userSelect:h,touchCallout:h,contentZooming:h,tapHighlightColor:"rgba(0,0,0,0)"}),m.hasAttribute(element,"resize")){var c=this;at.add(f,this._windowEvents={resize:function(){c.setViewSize(r())}})}if(o=r(),m.hasAttribute(element,"stats")&&"undefined"!=typeof Stats){this._stats=new Stats;var l=this._stats.domElement,style=l.style,_=st.getOffset(element);style.position="absolute",style.left=_.x+"px",style.top=_.y+"px",d.body.appendChild(l)}}else o=new A(element),element=null;this._project=e,this._scope=e._scope,this._element=element,this._pixelRatio||(this._pixelRatio=f&&f.devicePixelRatio||1),this._setElementSize(o.width,o.height),this._viewSize=o,t._views.push(this),t._viewsById[this._id]=this,(this._matrix=new N)._owner=this,t._focused||(t._focused=this),this._frameItems={},this._frameItemCount=0,this._itemEvents={native:{},virtual:{}},this._autoUpdate=!bt.agent.node,this._needsUpdate=!1},remove:function(){if(!this._project)return!1;ot._focused===this&&(ot._focused=null),ot._views.splice(ot._views.indexOf(this),1),delete ot._viewsById[this._id];var t=this._project;return t._view===this&&(t._view=null),at.remove(this._element,this._viewEvents),at.remove(f,this._windowEvents),this._element=this._project=null,this.off("frame"),this._animate=!1,this._frameItems={},!0},_events:_.each(O._itemHandlers.concat(["onResize","onKeyDown","onKeyUp"]),function(t){this[t]={}},{onFrame:{install:function(){this.play()},uninstall:function(){this.pause()}}}),_animate:!1,_time:0,_count:0,getAutoUpdate:function(){return this._autoUpdate},setAutoUpdate:function(t){this._autoUpdate=t,t&&this.requestUpdate()},update:function(){},draw:function(){this.update()},requestUpdate:function(){if(!this._requested){var t=this;at.requestAnimationFrame(function(){if(t._requested=!1,t._animate){t.requestUpdate();var element=t._element;st.getPrefixed(d,"hidden")&&"true"!==m.getAttribute(element,"keepalive")||!st.isInView(element)||t._handleFrame()}
vendor: 4,236 bytes, line 1
1t._autoUpdate&&t.update()}),this._requested=!0}},play:function(){this._animate=!0,this.requestUpdate()},pause:function(){this._animate=!1},_handleFrame:function(){bt=this._scope;var t=Date.now()/1e3,e=this._last?t-this._last:0;this._last=t,this.emit("frame",new _({delta:e,time:this._time+=e,count:this._count++})),this._stats&&this._stats.update()},_animateItem:function(t,animate){var e=this._frameItems;animate?(e[t._id]={item:t,time:0,count:0},1===++this._frameItemCount&&this.on("frame",this._handleFrameItems)):(delete e[t._id],0===--this._frameItemCount&&this.off("frame",this._handleFrameItems))},_handleFrameItems:function(t){for(var i in this._frameItems){var e=this._frameItems[i];e.item.emit("frame",new _(t,{time:e.time+=t.delta,count:e.count++}))}},_changed:function(){this._project._changed(4097),this._bounds=this._decomposed=l},getElement:function(){return this._element},getPixelRatio:function(){return this._pixelRatio},getResolution:function(){return 72*this._pixelRatio},getViewSize:function(){var t=this._viewSize;return new P(t.width,t.height,this,"setViewSize")},setViewSize:function(){var t=A.read(arguments),e=t.subtract(this._viewSize);e.isZero()||(this._setElementSize(t.width,t.height),this._viewSize.set(t),this._changed(),this.emit("resize",{size:t,delta:e}),this._autoUpdate&&this.update())},_setElementSize:function(t,e){var element=this._element;element&&(element.width!==t&&(element.width=t),element.height!==e&&(element.height=e))},getBounds:function(){return this._bounds||(this._bounds=this._matrix.inverted()._transformBounds(new E(new k,this._viewSize))),this._bounds},getSize:function(){return this.getBounds().getSize()},isVisible:function(){return st.isInView(this._element)},isInserted:function(){return st.isInserted(this._element)},getPixelSize:function(t){var e,element=this._element;if(element){var n=element.parentNode,r=d.createElement("div");r.style.fontSize=t,n.appendChild(r),e=parseFloat(st.getStyles(r).fontSize),n.removeChild(r)}else e=parseFloat(e);return e},getTextWidth:function(t,e){return 0}},_.each(["rotate","scale","shear","skew"],function(t){var e="rotate"===t;this[t]=function(){var n=arguments,r=(e?_:k).read(n),o=k.read(n,0,{readNull:!0});return this.transform((new N)[t](r,o||this.getCenter(!0)))}},{_decompose:function(){return this._decomposed||(this._decomposed=this._matrix.decompose())},translate:function(){var t=new N;return this.transform(t.translate.apply(t,arguments))},getCenter:function(){return this.getBounds().getCenter()},setCenter:function(){var t=k.read(arguments);this.translate(this.getCenter().subtract(t))},getZoom:function(){var t=this._decompose().scaling;return(t.x+t.y)/2},setZoom:function(t){this.transform((new N).scale(t/this.getZoom(),this.getCenter()))},getRotation:function(){return this._decompose().rotation},setRotation:function(t){var e=this.getRotation();null!=e&&null!=t&&this.rotate(t-e)},getScaling:function(){var t=this._decompose().scaling;return new I(t.x,t.y,this,"setScaling")},setScaling:function(){var t=this.getScaling(),e=k.read(arguments,0,{clone:!0,readNull:!0});t&&e&&this.scale(e.x/t.x,e.y/t.y)},getMatrix:function(){return this._matrix},setMatrix:function(){var t=this._matrix;t.set.apply(t,arguments)},transform:function(t){this._matrix.append(t)},scrollBy:function(){this.translate(k.read(arguments).negate())}}),{projectToView:function(){return this._matrix._transformPoint(k.read(arguments))},viewToProject:function(){return this._matrix._inverseTransform(k.read(arguments))},getEventPoint:function(t){return this.viewToProject(at.getOffset(t,this._element))}},{statics:{_views:[],_viewsById:{},_id:0,create:function(t,element){return d&&"string"==typeof element&&(element=d.getElementById(element)),new(f?ht:ot)(t,element)}}},new function(){if(f){var t,e,n,r,o,h=!1,c=!1,l=f.navigator;l.pointerEnabled||l.msPointerEnabled?(n="pointerdown MSPointerDown",r="pointermove MSPointerMove",o="pointerup pointercancel MSPointerUp MSPointerCancel"):(n="touchstart",r="touchmove",o="touchend touchcancel","ontouchstart"in f&&l.userAgent.match(/mobile|tablet|ip(ad|hone|od)|android|silk/i)||(n+=" mousedown",r+=" mousemove",o+=" mouseup"));var _={},v={mouseout:function(t){var view=ot._focused,e=at.getRelatedTarget(t);
1if(view&&(!e||"HTML"===e.nodeName)){var n=at.getOffset(t,view._element),r=n.x,o=Math.abs,h=o(r),c=h-(1<<25);n.x=o(c)<h?c*(r<0?-1:1):r,O(view,t,view.viewToProject(n))}},scroll:L};_[n]=function(t){var view=ot._focused=M(t);h||(h=!0,view._handleMouseEvent("mousedown",t))},v[r]=function(n){var view=ot._focused;if(!c){var r=M(n);r?view!==r&&(view&&O(view,n),t||(t=view),view=ot._focused=e=r):e&&e===view&&(t&&!t.isInserted()&&(t=null),view=ot._focused=t,t=null,L())}view&&O(view,n)},v[n]=function(){c=!0},v[o]=function(t){var view=ot._focused;view&&h&&view._handleMouseEvent("mouseup",t),c=h=!1},at.add(d,v),at.add(f,{load:L});var m,y,x,w,C,S,k,I,A=!1,P=!1,E={doubleclick:"click",mousedrag:"mousemove"},T=!1,N={mousedown:{mousedown:1,mousedrag:1,click:1,doubleclick:1},mouseup:{mouseup:1,mousedrag:1,click:1,doubleclick:1},mousemove:{mousedrag:1,mousemove:1,mouseenter:1,mouseleave:1}};return{_viewEvents:_,_handleMouseEvent:function(t,e,n){var r=this._itemEvents,o=r.native[t],c="mousemove"===t,l=this._scope.tool,view=this;function f(t){return r.virtual[t]||view.responds(t)||l&&l.responds(t)}c&&h&&f("mousedrag")&&(t="mousedrag"),n||(n=this.getEventPoint(e));var d=this.getBounds().contains(n),_=o&&d&&view._project.hitTest(n,{tolerance:0,fill:!0,stroke:!0}),v=_&&_.item||null,E=!1,N={};if(N[t.substr(5)]=!0,o&&v!==w&&(w&&V(w,null,"mouseleave",e,n),v&&V(v,null,"mouseenter",e,n),w=v),T^d&&(V(this,null,d?"mouseenter":"mouseleave",e,n),E=!0),!d&&!N.drag||n.equals(y)||(R(this,v,c?t:"mousemove",e,n,y),E=!0),T=d,N.down&&d||N.up&&m){if(R(this,v,t,e,n,m),N.down){if(I=v===S&&Date.now()-k<300,x=S=v,!P&&v){for(var M=v;M&&!M.responds("mousedrag");)M=M._parent;M&&(C=v)}m=n}else N.up&&(P||v!==x||(k=Date.now(),R(this,v,I?"doubleclick":"click",e,n,m),I=!1),x=C=null);T=!1,E=!0}y=n,E&&l&&(A=l._handleMouseEvent(t,e,n,N)||A),!1!==e.cancelable&&(A&&!N.move||N.down&&f("mouseup"))&&e.preventDefault()},_handleKeyEvent:function(t,e,n,r){var o,h=this._scope,c=h.tool;function l(c){c.responds(t)&&(bt=h,c.emit(t,o=o||new ct(t,e,n,r)))}this.isVisible()&&(l(this),c&&c.responds(t)&&l(c))},_countItemEvent:function(t,e){var n=this._itemEvents,r=n.native,o=n.virtual;for(var h in N)r[h]=(r[h]||0)+(N[h][t]||0)*e;o[t]=(o[t]||0)+e},statics:{updateFocus:L,_resetState:function(){h=c=A=T=!1,t=e=m=y=x=w=C=S=k=I=null}}}}function M(t){var e=at.getTarget(t);return e.getAttribute&&ot._viewsById[e.getAttribute("id")]}function L(){var view=ot._focused;if(!view||!view.isVisible())for(var i=0,t=ot._views.length;i<t;i++)if((view=ot._views[i]).isVisible()){ot._focused=e=view;break}}function O(view,t,e){view._handleMouseEvent("mousemove",t,e)}function V(t,e,n,r,o,h,c){var l,f=!1;function d(t,n){if(t.responds(n)){if(l||(l=new pt(n,r,o,e||t,h?o.subtract(h):null)),t.emit(n,l)&&(A=!0,l.prevented&&(P=!0),l.stopped))return f=!0}else{var c=E[n];if(c)return d(t,c)}}for(;t&&t!==c&&!d(t,n);)t=t._parent;return f}function R(view,t,e,n,r,o){return view._project.removeOn(e),P=A=!1,C&&V(C,null,e,n,r,o)||t&&t!==C&&!t.isDescendant(C)&&V(t,null,"mousedrag"===e?"mousemove":e,n,r,o,C)||V(view,C||t||view,e,n,r,o)}}),ht=ot.extend({_class:"CanvasView",initialize:function(t,canvas){if(!(canvas instanceof f.HTMLCanvasElement)){var e=A.read(arguments,1);if(e.isZero())throw new Error("Cannot create CanvasView with the provided argument: "+_.slice(arguments,1));canvas=mt.getCanvas(e)}var n=this._context=canvas.getContext("2d");if(n.save(),this._pixelRatio=1,!/^off|false$/.test(m.getAttribute(canvas,"hidpi"))){var r=f.devicePixelRatio||1,o=st.getPrefixed(n,"backingStorePixelRatio")||1;this._pixelRatio=r/o}ot.call(this,t,canvas),this._needsUpdate=!0},remove:function t(){return this._context.restore(),t.base.call(this)},_setElementSize:function t(e,n){var r=this._pixelRatio;if(t.base.call(this,e*r,n*r),1!==r){var element=this._element,o=this._context;if(!m.hasAttribute(element,"resize")){var style=element.style;style.width=e+"px",style.height=n+"px"}o.restore(),o.save(),o.scale(r,r)}},getContext:function(){return this._context},getPixelSize:function t(e){var n,r=bt.agent;if(r&&r.firefox)n=t.base.call(this,e);else{var o=this._context,h=o.font;o.font=e+" serif",n=parseFloat(o.font),o.font=h}return n},getTextWidth:function(t,e){var n=this._context,r=n.font,o=0;n.font=t;for(var i=0,h=e.length;i<h;i++)o=Math.max(o,n.measureText(e[i]).width);return n.font=r,o},update:function(){if(!this._needsUpdate)return!1;var t=this._project,e=this._context,n=this._viewSize;return e.clearRect(0,0,n.width+1,n.height+1),t&&t.draw(e,this._matrix,this._pixelRatio),this._needsUpdate=!1,!0}}),ut=_.extend({_class:"Event",initialize:function(t){this.event=t,this.type=t&&t.type},prevented:!1,stopped:!1,preventDefault:function(){this.prevented=!0,this.event.preventDefault()},stopPropagation:function(){this.stopped=!0,this.event.stopPropagation()},stop:function(){this.stopPropagation(),this.preventDefault()},getTimeStamp:function(){return this.event.timeStamp},getModifiers:function(){return lt.modifiers}}),ct=ut.extend({_class:"KeyEvent",initialize:function(t,e,n,r){this.type=t,this.event=e,this.key=n,this.character=r},toString:function(){return"{ type: '"+this.type+"', key: '"+this.key+"', character: '"+this.character+"', modifiers: "+this.getModifiers()+" }"}}
1),lt=new function(){var t,e,n={"\t":"tab"," ":"space","\b":"backspace","�":"delete",Spacebar:"space",Del:"delete",Win:"meta",Esc:"escape"},r={tab:"\t",space:" ",enter:"\r"},o={},h={},c=new _({shift:!1,control:!1,alt:!1,meta:!1,capsLock:!1,space:!1}).inject({option:{get:function(){return this.alt}},command:{get:function(){var t=bt&&bt.agent;return t&&t.mac?this.meta:this.control}}});function v(t){var e=t.key||t.keyIdentifier;return e=/^U\+/.test(e)?String.fromCharCode(parseInt(e.substr(2),16)):/^Arrow[A-Z]/.test(e)?e.substr(5):"Unidentified"===e||e===l?String.fromCharCode(t.keyCode):e,n[e]||(e.length>1?_.hyphenate(e):e.toLowerCase())}function m(e,n,r,l){var f,view=ot._focused;if(o[n]=e,e?h[n]=r:delete h[n],n.length>1&&(f=_.camelize(n))in c){c[f]=e;var d=bt&&bt.agent;if("meta"===f&&d&&d.mac)if(e)t={};else{for(var v in t)v in h&&m(!1,v,t[v],l);t=null}}else e&&t&&(t[n]=r);view&&view._handleKeyEvent(e?"keydown":"keyup",l,n,r)}return at.add(d,{keydown:function(t){var n=v(t),o=bt&&bt.agent;n.length>1||o&&o.chrome&&(t.altKey||o.mac&&t.metaKey||!o.mac&&t.ctrlKey)?m(!0,n,r[n]||(n.length>1?"":n),t):e=n},keypress:function(t){if(e){var n=v(t),code=t.charCode,r=code>=32?String.fromCharCode(code):n.length>1?"":n;n!==e&&(n=r.toLowerCase()),m(!0,n,r,t),e=null}},keyup:function(t){var e=v(t);e in h&&m(!1,e,h[e],t)}}),at.add(f,{blur:function(t){for(var e in h)m(!1,e,h[e],t)}}),{modifiers:c,isDown:function(t){return!!o[t]}}},pt=ut.extend({_class:"MouseEvent",initialize:function(t,e,n,r,o){this.type=t,this.event=e,this.point=n,this.target=r,this.delta=o},toString:function(){return"{ type: '"+this.type+"', point: "+this.point+", target: "+this.target+(this.delta?", delta: "+this.delta:"")+", modifiers: "+this.getModifiers()+" }"}}),ft=ut.extend({_class:"ToolEvent",_item:null,initialize:function(t,e,n){this.tool=t,this.type=e,this.event=n},_choosePoint:function(t,e){return t||(e?e.clone():null)},getPoint:function(){return this._choosePoint(this._point,this.tool._point)},setPoint:function(t){this._point=t},getLastPoint:function(){return this._choosePoint(this._lastPoint,this.tool._lastPoint)},setLastPoint:function(t){this._lastPoint=t},getDownPoint:function(){return this._choosePoint(this._downPoint,this.tool._downPoint)},setDownPoint:function(t){this._downPoint=t},getMiddlePoint:function(){return!this._middlePoint&&this.tool._lastPoint?this.tool._point.add(this.tool._lastPoint).divide(2):this._middlePoint},setMiddlePoint:function(t){this._middlePoint=t},getDelta:function(){return!this._delta&&this.tool._lastPoint?this.tool._point.subtract(this.tool._lastPoint):this._delta},setDelta:function(t){this._delta=t},getCount:function(){return this.tool[/^mouse(down|up)$/.test(this.type)?"_downCount":"_moveCount"]},setCount:function(t){this.tool[/^mouse(down|up)$/.test(this.type)?"downCount":"count"]=t},getItem:function(){if(!this._item){var t=this.tool._scope.project.hitTest(this.getPoint());if(t){for(var e=t.item,n=e._parent;/^(Group|CompoundPath)$/.test(n._class);)e=n,n=n._parent;this._item=e}}return this._item},setItem:function(t){this._item=t},toString:function(){return"{ type: "+this.type+", point: "+this.getPoint()+", count: "+this.getCount()+", modifiers: "+this.getModifiers()+" }"}}),gt=y.extend({_class:"Tool",_list:"tools",_reference:"tool",_events:["onMouseDown","onMouseUp","onMouseDrag","onMouseMove","onActivate","onDeactivate","onEditOptions","onKeyDown","onKeyUp"],initialize:function(t){y.call(this),this._moveCount=-1,this._downCount=-1,this.set(t)},getMinDistance:function(){return this._minDistance},setMinDistance:function(t){this._minDistance=t,null!=t&&null!=this._maxDistance&&t>this._maxDistance&&(this._maxDistance=t)},getMaxDistance:function(){return this._maxDistance},setMaxDistance:function(t){this._maxDistance=t,null!=this._minDistance&&null!=t&&t<this._minDistance&&(this._minDistance=t)},getFixedDistance:function(){return this._minDistance==this._maxDistance?this._minDistance:null},setFixedDistance:function(t){this._minDistance=this._maxDistance=t},_handleMouseEvent:function(t,e,n,r){bt=this._scope,r.drag&&!this.responds(t)&&(t="mousemove");var o=r.move||r.drag,h=this.responds(t),c=!1,l=this;function f(t,e){var h=n,c=o?l._point:l._downPoint||h;if(o){if(l._moveCount>=0&&h.equals(c))return!1;if(c&&(null!=t||null!=e)){var f=h.subtract(c),d=f.getLength();if(d<(t||0))return!1;e&&(h=c.add(f.normalize(Math.min(d,e))))}l._moveCount++}return l._point=h,l._lastPoint=c||h,r.down&&(l._moveCount=-1,l._downPoint=h,l._downCount++),!0}function d(){h&&(c=l.emit(t,new ft(l,t,e))||c)}if(r.down)f(),d();else if(r.up)f(null,this._maxDistance),d();else if(h)for(;f(this._minDistance,this._maxDistance);)d();return c}}),_t=_.extend(v,{_class:"Tween",statics:{easings:new _({linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:2*(2-t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}}
1)},initialize:function t(object,e,n,r,o,h){this.object=object;var c=typeof o,l="function"===c;this.type=l?c:"string"===c?o:"linear",this.easing=l?o:t.easings[this.type],this.duration=r,this.running=!1,this._then=null,this._startTime=null;var f=e||n;this._keys=f?Object.keys(f):[],this._parsedKeys=this._parseKeys(this._keys),this._from=f&&this._getState(e),this._to=f&&this._getState(n),!1!==h&&this.start()},then:function(t){return this._then=t,this},start:function(){return this._startTime=null,this.running=!0,this},stop:function(){return this.running=!1,this},update:function(progress){if(this.running){progress>=1&&(progress=1,this.running=!1);for(var t=this.easing(progress),e=this._keys,n=function(e){return"function"==typeof e?e(t,progress):e},i=0,r=e&&e.length;i<r;i++){var o=e[i],h=n(this._from[o]),c=n(this._to[o]),l=h&&c&&h.__add&&c.__add?c.__subtract(h).__multiply(t).__add(h):(c-h)*t+h;this._setProperty(this._parsedKeys[o],l)}this.responds("update")&&this.emit("update",new _({progress:progress,factor:t})),!this.running&&this._then&&this._then(this.object)}return this},_events:{onUpdate:{}},_handleFrame:function(time){var t=this._startTime,progress=t?(time-t)/this.duration:0;t||(this._startTime=time),this.update(progress)},_getState:function(t){for(var e=this._keys,n={},i=0,r=e.length;i<r;i++){var o,h=e[i],path=this._parsedKeys[h],c=this._getProperty(path);if(t){var l=this._resolveValue(c,t[h]);this._setProperty(path,l),o=(o=this._getProperty(path))&&o.clone?o.clone():o,this._setProperty(path,c)}else o=c&&c.clone?c.clone():c;n[h]=o}return n},_resolveValue:function(t,e){if(e){if(Array.isArray(e)&&2===e.length){var n=e[0];return n&&n.match&&n.match(/^[+\-\*\/]=/)?this._calculate(t,n[0],e[1]):e}if("string"==typeof e){var r=e.match(/^[+\-*/]=(.*)/);if(r){var o=JSON.parse(r[1].replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": '));return this._calculate(t,e[0],o)}}}return e},_calculate:function(t,e,n){return bt.PaperScript.calculateBinary(t,e,n)},_parseKeys:function(t){for(var e={},i=0,n=t.length;i<n;i++){var r=t[i],path=r.replace(/\.([^.]*)/g,"/$1").replace(/\[['"]?([^'"\]]*)['"]?\]/g,"/$1");e[r]=path.split("/")}return e},_getProperty:function(path,t){for(var e=this.object,i=0,n=path.length-(t||0);i<n&&e;i++)e=e[path[i]];return e},_setProperty:function(path,t){var e=this._getProperty(path,1);e&&(e[path[path.length-1]]=t)}}),vt=function(t){var e=new c.XMLHttpRequest;return e.open((t.method||"get").toUpperCase(),t.url,_.pick(t.async,!0)),t.mimeType&&e.overrideMimeType(t.mimeType),e.onload=function(){var n=e.status;0===n||200===n?t.onLoad&&t.onLoad.call(e,e.responseText):e.onerror()},e.onerror=function(){var n=e.status,r='Could not load "'+t.url+'" (Status: '+n+")";if(!t.onError)throw new Error(r);t.onError(r,n)},e.send(null)},mt=_.exports.CanvasProvider={canvases:[],getCanvas:function(t,e,n){if(!f)return null;var canvas,r=!0;"object"==typeof t&&(e=t.height,t=t.width),this.canvases.length?canvas=this.canvases.pop():(canvas=d.createElement("canvas"),r=!1);var o=canvas.getContext("2d",n||{});if(!o)throw new Error("Canvas "+canvas+" is unable to provide a 2D context.");return canvas.width===t&&canvas.height===e?r&&o.clearRect(0,0,t+1,e+1):(canvas.width=t,canvas.height=e),o.save(),canvas},getContext:function(t,e,n){var canvas=this.getCanvas(t,e,n);return canvas?canvas.getContext("2d",n||{}):null},release:function(t){var canvas=t&&t.canvas?t.canvas:t;canvas&&canvas.getContext&&(canvas.getContext("2d").restore(),this.canvases.push(canvas))}},yt=new function(){var t,e,n,r,br,o,h,c,l,f,d,v=Math.min,m=Math.max,y=Math.abs;function x(t,g,b){return.2989*t+.587*g+.114*b}function w(t,g,b,e){var n=e-x(t,g,b),r=(e=x(l=t+n,f=g+n,d=b+n),v(l,f,d)),o=m(l,f,d);if(r<0){var h=e-r;l=e+(l-e)*e/h,f=e+(f-e)*e/h,d=e+(d-e)*e/h}if(o>255){var c=255-e,_=o-e;l=e+(l-e)*c/_,f=e+(f-e)*c/_,d=e+(d-e)*c/_}}function C(t,g,b){return m(t,g,b)-v(t,g,b)}function S(t,g,b,s){var e,col=[t,g,b],n=m(t,g,b),r=v(t,g,b);e=0===v(r=r===t?0:r===g?1:2,n=n===t?0:n===g?1:2)?1===m(r,n)?2:1:0,col[n]>col[r]?(col[e]=(col[e]-col[r])*s/(col[n]-col[r]),col[n]=s):col[e]=col[n]=0,col[r]=0,l=col[0],f=col[1],d=col[2]}var k={multiply:function(){l=br*t/255,f=o*e/255,d=h*n/255},screen:function(){l=br+t-br*t/255,f=o+e-o*e/255,d=h+n-h*n/255},overlay:function(){l=br<128?2*br*t/255:255-2*(255-br)*(255-t)/255,f=o<128?2*o*e/255:255-2*(255-o)*(255-e)/255,d=h<128?2*h*n/255:255-2*(255-h)*(255-n)/255},"soft-light":function(){var r=t*br/255;
1l=r+br*(255-(255-br)*(255-t)/255-r)/255,f=(r=e*o/255)+o*(255-(255-o)*(255-e)/255-r)/255,d=(r=n*h/255)+h*(255-(255-h)*(255-n)/255-r)/255},"hard-light":function(){l=t<128?2*t*br/255:255-2*(255-t)*(255-br)/255,f=e<128?2*e*o/255:255-2*(255-e)*(255-o)/255,d=n<128?2*n*h/255:255-2*(255-n)*(255-h)/255},"color-dodge":function(){l=0===br?0:255===t?255:v(255,255*br/(255-t)),f=0===o?0:255===e?255:v(255,255*o/(255-e)),d=0===h?0:255===n?255:v(255,255*h/(255-n))},"color-burn":function(){l=255===br?255:0===t?0:m(0,255-255*(255-br)/t),f=255===o?255:0===e?0:m(0,255-255*(255-o)/e),d=255===h?255:0===n?0:m(0,255-255*(255-h)/n)},darken:function(){l=br<t?br:t,f=o<e?o:e,d=h<n?h:n},lighten:function(){l=br>t?br:t,f=o>e?o:e,d=h>n?h:n},difference:function(){(l=br-t)<0&&(l=-l),(f=o-e)<0&&(f=-f),(d=h-n)<0&&(d=-d)},exclusion:function(){l=br+t*(255-br-br)/255,f=o+e*(255-o-o)/255,d=h+n*(255-h-h)/255},hue:function(){S(t,e,n,C(br,o,h)),w(l,f,d,x(br,o,h))},saturation:function(){S(br,o,h,C(t,e,n)),w(l,f,d,x(br,o,h))},luminosity:function(){w(br,o,h,x(t,e,n))},color:function(){w(t,e,n,x(br,o,h))},add:function(){l=v(br+t,255),f=v(o+e,255),d=v(h+n,255)},subtract:function(){l=m(br-t,0),f=m(o-e,0),d=m(h-n,0)},average:function(){l=(br+t)/2,f=(o+e)/2,d=(h+n)/2},negation:function(){l=255-y(255-t-br),f=255-y(255-e-o),d=255-y(255-n-h)}},I=this.nativeModes=_.each(["source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","lighter","darker","copy","xor"],function(t){this[t]=!0},{}),A=mt.getContext(1,1,{willReadFrequently:!0});A&&(_.each(k,function(t,e){var n="darken"===e,r=!1;A.save();try{A.fillStyle=n?"#300":"#a00",A.fillRect(0,0,1,1),A.globalCompositeOperation=e,A.globalCompositeOperation===e&&(A.fillStyle=n?"#a00":"#300",A.fillRect(0,0,1,1),r=A.getImageData(0,0,1,1).data[0]!==n?170:51)}catch(t){}A.restore(),I[e]=r}),mt.release(A)),this.process=function(_,v,m,y,x){var w=v.canvas,C="normal"===_;if(C||I[_])m.save(),m.setTransform(1,0,0,1,0,0),m.globalAlpha=y,C||(m.globalCompositeOperation=_),m.drawImage(w,x.x,x.y),m.restore();else{var S=k[_];if(!S)return;for(var A=m.getImageData(x.x,x.y,w.width,w.height),P=A.data,E=v.getImageData(0,0,w.width,w.height).data,i=0,T=P.length;i<T;i+=4){t=E[i],br=P[i],e=E[i+1],o=P[i+1],n=E[i+2],h=P[i+2],r=E[i+3],c=P[i+3],S();var N=r*y/255,M=1-N;P[i]=N*l+M*br,P[i+1]=N*f+M*o,P[i+2]=N*d+M*h,P[i+3]=r*y+M*c}m.putImageData(A,x.x,x.y)}}},xt=new function(){var svg="http://www.w3.org/2000/svg",t="http://www.w3.org/2000/xmlns",e="http://www.w3.org/1999/xlink",n={href:e,xlink:t,xmlns:t+"/","xmlns:xlink":t+"/"};function r(t,e,r){for(var o in e){var h=e[o],c=n[o];"number"==typeof h&&r&&(h=r.number(h)),c?t.setAttributeNS(c,o,h):t.setAttribute(o,h)}return t}return{svg:svg,xmlns:t,xlink:e,create:function(t,e,n){return r(d.createElementNS(svg,t),e,n)},get:function(t,e){var r=n[e],o=r?t.getAttributeNS(r,e):t.getAttribute(e);return"null"===o?null:o},set:r}},wt=_.each({fillColor:["fill","color"],fillRule:["fill-rule","string"],strokeColor:["stroke","color"],strokeWidth:["stroke-width","number"],strokeCap:["stroke-linecap","string"],strokeJoin:["stroke-linejoin","string"],strokeScaling:["vector-effect","lookup",{true:"none",false:"non-scaling-stroke"},function(t,e){return!e&&(t instanceof Z||t instanceof z||t instanceof X)}],miterLimit:["stroke-miterlimit","number"],dashArray:["stroke-dasharray","array"],dashOffset:["stroke-dashoffset","number"],fontFamily:["font-family","string"],fontWeight:["font-weight","string"],fontSize:["font-size","number"],justification:["text-anchor","lookup",{left:"start",center:"middle",right:"end"}],opacity:["opacity","number"],blendMode:["mix-blend-mode","style"]},function(t,e){var n=_.capitalize(e),r=t[2];this[e]={type:t[1],property:e,attribute:t[0],toSVG:r,fromSVG:r&&_.each(r,function(t,e){this[t]=e},{}),exportFilter:t[3],get:"get"+n,set:"set"+n}},{});new function(){var t;function e(e,n,r){var o,h=new _,c=e.getTranslation();n&&(e.isInvertible()?(o=(e=e._shiftless())._inverseTransform(c),c=null):o=new k,h[r?"cx":"x"]=o.x,h[r?"cy":"y"]=o.y);if(!e.isIdentity()){var l=e.decompose();if(l){var f=[],d=l.rotation,v=l.scaling,m=l.skewing;c&&!c.isZero()&&f.push("translate("+t.point(c)+")"),d&&f.push("rotate("+t.number(d)+")"),C.isZero(v.x-1)&&C.isZero(v.y-1)||f.push("scale("+t.point(v)+")"),m.x&&f.push("skewX("+t.number(m.x)+")"),m.y&&f.push("skewY("+t.number(m.y)+")"),h.transform=f.join(" ")}else h.transform="matrix("+e.getValues().join(",")+")"}return h}function n(n,r){for(var o=e(n._matrix),h=n._children,c=xt.create("g",o,t),i=0,l=h.length;i<l;i++){var f=h[i],_=m(f,r);
1if(_)if(f.isClipMask()){var v=xt.create("clipPath");v.appendChild(_),d(f,v,"clip"),xt.set(c,{"clip-path":"url(#"+v.id+")"})}else c.appendChild(_)}return c}function r(n){var r=n._type,o=n._radius,h=e(n._matrix,!0,"rectangle"!==r);if("rectangle"===r){r="rect";var c=n._size,l=c.width,f=c.height;h.x-=l/2,h.y-=f/2,h.width=l,h.height=f,o.isZero()&&(o=null)}return o&&("circle"===r?h.r=o:(h.rx=o.width,h.ry=o.height)),xt.create(r,h,t)}var o,h={Group:n,Layer:n,Raster:function(n,r){var o=e(n._matrix,!0),h=n.getSize(),image=n.getImage();return o.x-=h.width/2,o.y-=h.height/2,o.width=h.width,o.height=h.height,o.href=0==r.embedImages&&image&&image.src||n.toDataURL(),xt.create("image",o,t)},Path:function(n,o){var h=o.matchShapes;if(h){var c=n.toShape(!1);if(c)return r(c)}var l,f=n._segments,d=f.length,_=e(n._matrix);if(h&&d>=2&&!n.hasHandles())if(d>2){l=n._closed?"polygon":"polyline";for(var v=[],i=0;i<d;i++)v.push(t.point(f[i]._point));_.points=v.join(" ")}else{l="line";var m=f[0]._point,y=f[1]._point;_.set({x1:m.x,y1:m.y,x2:y.x,y2:y.y})}else l="path",_.d=n.getPathData(null,o.precision);return xt.create(l,_,t)},Shape:r,CompoundPath:function(n,r){var o=e(n._matrix),data=n.getPathData(null,r.precision);return data&&(o.d=data),xt.create("path",o,t)},SymbolItem:function(n,r){var o=e(n._matrix,!0),h=n._definition,c=f(h,"symbol"),l=h._item,_=l.getStrokeBounds();return c||((c=xt.create("symbol",{viewBox:t.rectangle(_)}
1)).appendChild(m(l,r)),d(h,c,"symbol")),o.href="#"+c.id,o.x+=_.x,o.y+=_.y,o.width=_.width,o.height=_.height,o.overflow="visible",xt.create("use",o,t)},PointText:function(n){var r=xt.create("text",e(n._matrix,!0),t);return r.textContent=n._content,r}};function l(e,n,r,o){var h={},c=!o&&e.getParent(),style=[];return null!=e._name&&(h.id=e._name),_.each(wt,function(n){var o=n.get,l=n.type,v=e[o]();if(n.exportFilter?n.exportFilter(e,v):0==r.reduceAttributes||!c||!_.equals(c[o](),v)){if("color"===l&&null!=v){var m=v.getAlpha();m<1&&(h[n.attribute+"-opacity"]=m)}"style"===l?style.push(n.attribute+": "+v):h[n.attribute]=null==v?"none":"color"===l?v.gradient?function(e){var n=f(e,"color");if(!n){var r,o=e.getGradient(),h=o._radial,c=e.getOrigin(),l=e.getDestination();if(h){r={cx:c.x,cy:c.y,r:c.getDistance(l)};var _=e.getHighlight();_&&(r.fx=_.x,r.fy=_.y)}else r={x1:c.x,y1:c.y,x2:l.x,y2:l.y};r.gradientUnits="userSpaceOnUse",n=xt.create((h?"radial":"linear")+"Gradient",r,t);for(var v=o._stops,i=0,m=v.length;i<m;i++){var y=v[i],x=y._color,w=x.getAlpha(),C=y._offset;r={offset:null==C?i/(m-1):C},x&&(r["stop-color"]=x.toCSS(!0)),w<1&&(r["stop-opacity"]=w),n.appendChild(xt.create("stop",r,t))}d(e,n,"color")}return"url(#"+n.id+")"}(v):v.toCSS(!0):"array"===l?v.join(","):"lookup"===l?n.toSVG[v]:v}}),style.length&&(h.style=style.join(";")),1===h.opacity&&delete h.opacity,e._visible||(h.visibility="hidden"),xt.set(n,h,t)}function f(t,e){return o||(o={ids:{},svgs:{}}),t&&o.svgs[e+"-"+(t._id||t.__id||(t.__id=S.get("svg")))]}function d(t,e,n){o||f();var r=o.ids[n]=(o.ids[n]||0)+1;e.id=n+"-"+r,o.svgs[n+"-"+(t._id||t.__id)]=e}function v(t,e){var svg=t,defs=null;if(o){for(var i in svg="svg"===t.nodeName.toLowerCase()&&t,o.svgs)defs||(svg||(svg=xt.create("svg")).appendChild(t),defs=svg.insertBefore(xt.create("defs"),svg.firstChild)),defs.appendChild(o.svgs[i]);o=null}return e.asString?(new c.XMLSerializer).serializeToString(svg):svg}function m(t,e,n){var r=h[t._class],o=r&&r(t,e);if(o){var c=e.onExport;c&&(o=c(t,o,e)||o);var data=JSON.stringify(t._data);data&&"{}"!==data&&"null"!==data&&o.setAttribute("data-paper-data",data)}return o&&l(t,o,e,n)}function y(e){return e||(e={}),t=new w(e.precision),e}O.inject({exportSVG:function(t){return v(m(this,t=y(t),!0),t)}}),L.inject({exportSVG:function(n){n=y(n);var r=this._children,view=this.getView(),o=_.pick(n.bounds,"view"),h=n.matrix||"view"===o&&view._matrix,c=h&&N.read([h]),rect="view"===o?new E([0,0],view.getViewSize()):"content"===o?O._getBounds(r,c,{stroke:!0}).rect:E.read([o],0,{readNull:!0}),l={version:"1.1",xmlns:xt.svg,"xmlns:xlink":xt.xlink};rect&&(l.width=rect.width,l.height=rect.height,(rect.x||0===rect.x||rect.y||0===rect.y)&&(l.viewBox=t.rectangle(rect)));var f=xt.create("svg",l,t),d=f;c&&!c.isIdentity()&&(d=f.appendChild(xt.create("g",e(c),t)));for(var i=0,x=r.length;i<x;i++)d.appendChild(m(r[i],n,!0));return v(f,n)}})},new function(){var t,e={};function n(e,n,r,o,h,c){var l=xt.get(e,n)||c,f=null==l?o?null:r?"":0:r?l:parseFloat(l);return/%\s*$/.test(l)?f/100*(h?1:t[/x|^width/.test(n)?"width":"height"]):f}function r(t,e,r,o,h,c,l){return e=n(t,e||"x",!1,o,h,c),r=n(t,r||"y",!1,o,h,l),!o||null!=e&&null!=r?new k(e,r):null}function o(t,e,r,o,h){return e=n(t,e||"width",!1,o,h),r=n(t,r||"height",!1,o,h),!o||null!=e&&null!=r?new A(e,r):null}function h(t,e,n){return"none"===t?null:"number"===e?parseFloat(t):"array"===e?t?t.split(/[\s,]+/g).map(parseFloat):[]:"color"===e?T(t)||t:"lookup"===e?n[t]:t}function v(t,e,n,r){var o=t.childNodes,h="clippath"===e,c="defs"===e,l=new V,f=l._project,d=f._currentStyle,_=[];if(h||c||(l=P(l,t,r),f._currentStyle=l._style.clone()),r)for(var defs=t.querySelectorAll("defs"),i=0,v=defs.length;i<v;i++)M(defs[i],n,!1);for(i=0,v=o.length;i<v;i++){var m,y=o[i];1!==y.nodeType||/^defs$/i.test(y.nodeName)||!(m=M(y,n,!1))||m instanceof F||_.push(m)}return l.addChildren(_),h&&(l=P(l.reduce(),t,r)),f._currentStyle=d,(h||c)&&(l.remove(),l=null),l}function m(t,e){for(var n=t.getAttribute("points").match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g),r=[],i=0,o=n.length;i<o;
1i+=2)r.push(new k(parseFloat(n[i]),parseFloat(n[i+1])));var path=new K(r);return"polygon"===e&&path.closePath(),path}function y(t,o){var h,c=(n(t,"href",!0)||"").substring(1),l="radialgradient"===o;if(c)(h=e[c].getGradient())._radial^l&&((h=h.clone())._radial=l);else{for(var f=t.childNodes,d=[],i=0,_=f.length;i<_;i++){var v=f[i];1===v.nodeType&&d.push(P(new it,v))}h=new et(d,l)}var m,y,x,w="userSpaceOnUse"!==n(t,"gradientUnits",!0);return l?(y=(m=r(t,"cx","cy",!1,w,"50%","50%")).add(n(t,"r",!1,!1,w,"50%"),0),x=r(t,"fx","fy",!0,w)):(m=r(t,"x1","y1",!1,w,"0%","0%"),y=r(t,"x2","y2",!1,w,"100%","0%")),P(new tt(h,m,y,x),t)._scaleToBounds=w,null}var x={"#document":function(t,e,n,r){for(var o=t.childNodes,i=0,h=o.length;i<h;i++){var c=o[i];if(1===c.nodeType)return M(c,n,r)}},g:v,svg:v,clippath:v,polygon:m,polyline:m,path:function(t){return Z.create(t.getAttribute("d"))},lineargradient:y,radialgradient:y,image:function(t){var e=new D(n(t,"href",!0));return e.on("load",function(){var e=o(t);this.setSize(e);var n=r(t).add(e.divide(2));this._matrix.append((new N).translate(n))}),e},symbol:function(t,e,n,r){return new F(v(t,e,n,r),!0)},defs:v,use:function(t){var o=(n(t,"href",!0)||"").substring(1),h=e[o],c=r(t);return h?h instanceof F?h.place(c):h.clone().translate(c):null},circle:function(t){return new z.Circle(r(t,"cx","cy"),n(t,"r"))},ellipse:function(t){return new z.Ellipse({center:r(t,"cx","cy"),radius:o(t,"rx","ry")})},rect:function(t){return new z.Rectangle(new E(r(t),o(t)),o(t,"rx","ry"))},line:function(t){return new K.Line(r(t,"x1","y1"),r(t,"x2","y2"))},text:function(t){var text=new Y(r(t).add(r(t,"dx","dy")));return text.setContent(t.textContent.trim()||""),text},switch:v};function w(t,e,n,r){if(t.transform){for(var o=(r.getAttribute(n)||"").split(/\)\s*/g),h=new N,i=0,c=o.length;i<c;i++){var l=o[i];if(!l)break;for(var f=l.split(/\(\s*/),d=f[0].trim(),_=f[1].split(/[\s,]+/g),v=0,m=_.length;v<m;v++)_[v]=parseFloat(_[v]);switch(d){case"matrix":h.append(new N(_[0],_[1],_[2],_[3],_[4],_[5]));break;case"rotate":h.rotate(_[0],_[1]||0,_[2]||0);break;case"translate":h.translate(_[0],_[1]||0);break;case"scale":h.scale(_);break;case"skewX":h.skew(_[0],0);break;case"skewY":h.skew(0,_[0])}}t.transform(h)}}function C(t,e,n){var r="fill-opacity"===n?"getFillColor":"getStrokeColor",o=t[r]&&t[r]();o&&o.setAlpha(parseFloat(e))}var S=_.set(_.each(wt,function(t){this[t.attribute]=function(e,n){if(e[t.set]&&(e[t.set](h(n,t.type,t.fromSVG)),"color"===t.type)){var r=e[t.get]();if(r&&r._scaleToBounds){var o=e.getBounds();r.transform((new N).translate(o.getPoint()).scale(o.getSize()))}}}},{}),{id:function(t,n){e[n]=t,t.setName&&t.setName(n)},"clip-path":function(t,e){var n=T(e);if(n){if((n=n.clone()).setClipMask(!0),!(t instanceof V))return new V(n,t);t.insertChild(0,n)}},gradientTransform:w,transform:w,"fill-opacity":C,"stroke-opacity":C,visibility:function(t,e){t.setVisible&&t.setVisible("visible"===e)},display:function(t,e){t.setVisible&&t.setVisible(null!==e)},"stop-color":function(t,e){t.setColor&&t.setColor(e)},"stop-opacity":function(t,e){t._color&&t._color.setAlpha(parseFloat(e))},offset:function(t,e){if(t.setOffset){var n=e.match(/(.*)%$/);t.setOffset(n?n[1]/100:parseFloat(e))}},viewBox:function(t,e,n,r,c){var l,rect=new E(h(e,"array")),f=o(r,null,null,!0);if(t instanceof V){var d=f?f.divide(rect.getSize()):1,_=(new N).scale(d).translate(rect.getPoint().negate());l=t}else t instanceof F&&(f&&rect.setSize(f),l=t._item);if(l){if("visible"!==I(r,"overflow",c)){var v=new z.Rectangle(rect);v.setClipMask(!0),l.addChild(v)}_&&l.transform(_)}}});function I(t,e,n){var r=t.attributes[e],o=r&&r.value;if(!o&&t.style){var style=_.camelize(e);(o=t.style[style])||n.node[style]===n.parent[style]||(o=n.node[style])}return o?"none"===o?null:o:l}function P(t,e,n){var r=e.parentNode,o={node:st.getStyles(e)||{},parent:!n&&!/^defs$/i.test(r.tagName)&&st.getStyles(r)||{}};return _.each(S,function(n,r){var h=I(e,r,o);t=h!==l&&n(t,h,r,e,o)||t}),t}function T(t){var n=t&&t.match(/\((?:["'#]*)([^"')]+)/),r=n&&n[1],o=r&&e[f?r.replace(f.location.href.split("#")[0]+"#",""):r];return o&&o._scaleToBounds&&((o=o.clone())._scaleToBounds=!0),o}function M(n,r,h){var c,l,f,v=n.nodeName.toLowerCase(),m="#document"!==v,body=d.body;h&&m&&(t=bt.getView().getSize(),t=o(n,null,null,!0)||t,c=xt.create("svg",{style:"stroke-width: 1px; stroke-miterlimit: 10"}),l=n.parentNode,f=n.nextSibling,c.appendChild(n),body.appendChild(c));var y=bt.settings,w=y.applyMatrix,C=y.insertItems;y.applyMatrix=!1,y.insertItems=!1;var S=x[v],k=S&&S(n,v,r,h)||null;if(y.insertItems=C,y.applyMatrix=w,k){!m||k instanceof V||(k=P(k,n,h));var I=r.onImport,data=m&&n.getAttribute("data-paper-data");I&&(k=I(n,k,r)||k),r.expandShapes&&k instanceof z&&(k.remove(),k=k.toPath()),data&&(k._data=JSON.parse(data))}return c&&(body.removeChild(c),l&&(f?l.insertBefore(n,f):l.appendChild(n))),h&&(e={},k&&_.pick(r.applyMatrix,w)&&k.matrix.apply(!0,!0)),k}function R(source,t,e){if(!source)return null;t="function"==typeof t?{onLoad:t}:t||{};var n=bt,r=null;function o(svg){try{var o="object"==typeof svg?svg:(new c.DOMParser).parseFromString(svg.trim(),"image/svg+xml");if(!o.nodeName)throw o=null,new Error("Unsupported SVG source: "+source);bt=n,r=M(o,t,!0),t&&!1===t.insert||e._insertItem(l,r);var f=t.onLoad;f&&f(r,svg)}catch(t){h(t)}}function h(e,n){var r=t.onError;if(!r)throw new Error(e);r(e,n)}if("string"!=typeof source||/^[\s\S]*</.test(source)){if("undefined"!=typeof File&&source instanceof File){var f=new FileReader;return f.onload=function(){o(f.result)},f.onerror=function(){h(f.error)},f.readAsText(source)}o(source)}else{var _=d.getElementById(source);_?o(_):vt({url:source,async:!0,onLoad:o,onError:h})}return r}O.inject({importSVG:function(t,e){return R(t,e,this)}}),L.inject({importSVG:function(t,e){return this.activate(),R(t,e,this)}})},_.exports.PaperScript=function(){var t,e,v,y=this,x=y.acorn;if(!x)try{x=n(888)}catch(t){}x||(x=t=e={},v=function(t){"use strict";var e,input,n,r;t.version="0.5.0",t.parse=function(t,r){return input=String(t),n=input.length,h(r),ee(),function(t){C=S=c,e.locations&&(k=new te),I=P=null,A=[],oe();
vendor: 5,631 bytes, line 1
1var n=t||ye(),r=!0;for(t||(n.body=[]);v!==R;){var o=Ne();n.body.push(o),r&&be(o)&&_e(!0),r=!1}return we(n,"Program")}(e.program)};var o=t.defaultOptions={ecmaVersion:5,strictSemicolons:!1,allowTrailingCommas:!0,forbidReserved:!1,allowReturnOutsideFunction:!1,locations:!1,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null};function h(t){for(var n in e=t||{},o)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=o[n]);r=e.sourceFile||null}var c,l,f,d,_,v,m,y,x,w,C,S,k,I,A,P,E=t.getLineInfo=function(input,t){for(var line=1,e=0;;){Jt.lastIndex=e;var n=Jt.exec(input);if(!(n&&n.index<t))break;++line,e=n.index+n[0].length}return{line:line,column:t-e}};function T(t,e){var n=E(input,t);e+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(e);throw r.pos=t,r.loc=n,r.raisedAt=c,r}t.tokenize=function(t,r){input=String(t),n=input.length,h(r),ee();var o={};function C(t){return S=f,oe(t),o.start=l,o.end=f,o.startLoc=d,o.endLoc=_,o.type=v,o.value=m,o}return C.jumpTo=function(t,n){var r;if(c=t,e.locations)for(x=1,w=Jt.lastIndex=0;(r=Jt.exec(input))&&r.index<t;)++x,w=r.index+r[0].length;y=n,se()},C};var N=[],M={type:"num"},L={type:"regexp"},O={type:"string"},V={type:"name"},R={type:"eof"},z={keyword:"break"},D={keyword:"case",beforeExpr:!0},B={keyword:"catch"},F={keyword:"continue"},j={keyword:"debugger"},U={keyword:"default"},H={keyword:"do",isLoop:!0},W={keyword:"else",beforeExpr:!0},G={keyword:"finally"},Z={keyword:"for",isLoop:!0},K={keyword:"function"},$={keyword:"if"},Q={keyword:"return",beforeExpr:!0},J={keyword:"switch"},X={keyword:"throw",beforeExpr:!0},Y={keyword:"try"},tt={keyword:"var"},et={keyword:"while",isLoop:!0},it={keyword:"with"},nt={keyword:"new",beforeExpr:!0},st={keyword:"this"},at={keyword:"null",atomValue:null},ot={keyword:"true",atomValue:!0},ht={keyword:"false",atomValue:!1},ut={keyword:"in",binop:7,beforeExpr:!0},ct={break:z,case:D,catch:B,continue:F,debugger:j,default:U,do:H,else:W,finally:G,for:Z,function:K,if:$,return:Q,switch:J,throw:X,try:Y,var:tt,while:et,with:it,null:at,true:ot,false:ht,new:nt,in:ut,instanceof:{keyword:"instanceof",binop:7,beforeExpr:!0},this:st,typeof:{keyword:"typeof",prefix:!0,beforeExpr:!0},void:{keyword:"void",prefix:!0,beforeExpr:!0},delete:{keyword:"delete",prefix:!0,beforeExpr:!0}},lt={type:"[",beforeExpr:!0},pt={type:"]"},ft={type:"{",beforeExpr:!0},gt={type:"}"},_t={type:"(",beforeExpr:!0},vt={type:")"},mt={type:",",beforeExpr:!0},yt={type:";",beforeExpr:!0},xt={type:":",beforeExpr:!0},wt={type:"."},bt={type:"?",beforeExpr:!0},Ct={binop:10,beforeExpr:!0},St={isAssign:!0,beforeExpr:!0},kt={isAssign:!0,beforeExpr:!0},It={postfix:!0,prefix:!0,isUpdate:!0},At={prefix:!0,beforeExpr:!0},Pt={binop:1,beforeExpr:!0},Et={binop:2,beforeExpr:!0},Tt={binop:3,beforeExpr:!0},Nt={binop:4,beforeExpr:!0},Mt={binop:5,beforeExpr:!0},Lt={binop:6,beforeExpr:!0},Ot={binop:7,beforeExpr:!0},Vt={binop:8,beforeExpr:!0},Rt={binop:9,prefix:!0,beforeExpr:!0},zt={binop:10,beforeExpr:!0};for(var Dt in t.tokTypes={bracketL:lt,bracketR:pt,braceL:ft,braceR:gt,parenL:_t,parenR:vt,comma:mt,semi:yt,colon:xt,dot:wt,question:bt,slash:Ct,eq:St,name:V,eof:R,num:M,regexp:L,string:O},ct)t.tokTypes["_"+Dt]=ct[Dt];function Bt(t){t=t.split(" ");var e="",n=[];t:for(var i=0;i<t.length;++i){for(var r=0;r<n.length;++r)if(n[r][0].length==t[i].length){n[r].push(t[i]);continue t}n.push([t[i]])}function o(t){if(1==t.length)return e+="return str === "+JSON.stringify(t[0])+";";e+="switch(str){";for(var i=0;i<t.length;++i)e+="case "+JSON.stringify(t[i])+":";e+="return true}return false;"}if(n.length>3){for(n.sort(function(a,b){return b.length-a.length}),e+="switch(str.length){",i=0;i<n.length;++i){var h=n[i];e+="case "+h[0].length+":",o(h)}e+="}"}else o(t);return new Function("str",e)}var Ft,jt=Bt("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),qt=Bt("class enum extends super const export import"),Ut=Bt("implements interface let package private protected public static yield"),Ht=Bt("eval arguments"),Wt=Bt("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),Gt=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Zt="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-Ô§Ô±-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬá
1³®-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-á¾´á¾¶-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-á¿´á¿¶-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-ï©­ï©°-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ï¹´ï¹¶-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Kt=new RegExp("["+Zt+"]"),$t=new RegExp("["+Zt+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-Û¨Û»-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-à §à ©-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-à­ à­¦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),Qt=/[\n\r\u2028\u2029]/,Jt=/\r\n|[\n\r\u2028\u2029]/g,Xt=t.isIdentifierStart=function(code){return code<65?36===code:code<91||(code<97?95===code:code<123||code>=170&&Kt.test(String.fromCharCode(code)))},Yt=t.isIdentifierChar=function(code){return code<48?36===code:code<58||!(code<65)&&(code<91||(code<97?95===code:code<123||code>=170&&$t.test(String.fromCharCode(code))))};function te(){this.line=x,this.column=c-w}function ee(){x=1,c=w=0,y=!0,se()}function ie(t,n){f=c,e.locations&&(_=new te),v=t,se(),m=n,y=t.beforeExpr}function ne(){var t,n=e.onComment&&e.locations&&new te,r=c,o=input.indexOf("*/",c+=2);if(-1===o&&T(c-2,"Unterminated comment"),c=o+2,e.locations)for(Jt.lastIndex=r;(t=Jt.exec(input))&&t.index<c;)++x,w=t.index+t[0].length;e.onComment&&e.onComment(!0,input.slice(r+2,o),r,c,n,e.locations&&new te)}function re(){for(var t=c,r=e.onComment&&e.locations&&new te,o=input.charCodeAt(c+=2);c<n&&10!==o&&13!==o&&8232!==o&&8233!==o;)++c,o=input.charCodeAt(c);e.onComment&&e.onComment(!1,input.slice(t+2,c),t,c,r,e.locations&&new te)}function se(){for(;c<n;){var t=input.charCodeAt(c);if(32===t)++c;else if(13===t)++c,10===(r=input.charCodeAt(c))&&++c,e.locations&&(++x,w=c);else if(10===t||8232===t||8233===t)++c,e.locations&&(++x,w=c);else if(t>8&&t<14)++c;else if(47===t){var r;if(42===(r=input.charCodeAt(c+1)))ne();else{if(47!==r)break;re()}}else if(160===t)++c;else{if(!(t>=5760&&Gt.test(String.fromCharCode(t))))break;++c}}}function ae(code){switch(code){case 46:return function(){var t=input.charCodeAt(c+1);return t>=48&&t<=57?le(!0):(++c,ie(wt))}();case 40:return++c,ie(_t);case 41:return++c,ie(vt);case 59:return++c,ie(yt);case 44:return++c,ie(mt);case 91:return++c,ie(lt);case 93:return++c,ie(pt);case 123:return++c,ie(ft);case 125:return++c,ie(gt);case 58:return++c,ie(xt);case 63:return++c,ie(bt);case 48:var t=input.charCodeAt(c+1);if(120===t||88===t)return function(){c+=2;var t=ce(16);return null==t&&T(l+2,"Expected hexadecimal number"),Xt(input.charCodeAt(c))&&T(c,"Identifier directly after number"),ie(M,t)}();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return le(!1);case 34:case 39:return function(t){c++;for(var r="";;){c>=n&&T(l,"Unterminated string constant");var o=input.charCodeAt(c);if(o===t)return++c,ie(O,r);if(92===o){o=input.charCodeAt(++c);var h=/^[0-7]+/.exec(input.slice(c,c+3));for(h&&(h=h[0]);h&&parseInt(h,8)>255;)h=h.slice(0,-1);if("0"===h&&(h=null),++c,h)P&&T(c-2,"Octal literal in strict mode"),r+=String.fromCharCode(parseInt(h,8)),c+=h.length-1;else switch(o){case 110:r+="\n";break;case 114:r+="\r";break;case 120:r+=String.fromCharCode(pe(2));break;case 117:r+=String.fromCharCode(pe(4));break;case 85:r+=String.fromCharCode(pe(8));break;case 116:r+="\t";break;case 98:r+="\b";break;case 118:r+="\v";break;case 102:r+="\f";break;case 48:r+="\0";break;case 13:10===input.charCodeAt(c)&&++c;case 10:e.locations&&(w=c,++x);break;default:r+=String.fromCharCode(o)}}else 13!==o&&10!==o&&8232!==o&&8233!==o||T(l,"Unterminated string constant"),r+=String.fromCharCode(o),++c}}(code);case 47:return function(){var t=input.charCodeAt(c+1);return y?(++c,ue()):61===t?he(kt,2):he(Ct,1)}();case 37:case 42:return 61===input.charCodeAt(c+1)?he(kt,2):he(zt,1);case 124:case 38:return function(code){var t=input.charCodeAt(c+1);return t===code?he(124===code?Pt:Et,2):61===t?he(kt,2):he(124===code?Tt:Mt,1)}(code);case 94:return 61===input.charCodeAt(c+1)?he(kt,2):he(Nt,1);case 43:case 45:return function(code){var t=input.charCodeAt(c+1);return t===code?45==t&&62==input.charCodeAt(c+2)&&Qt.test(input.slice(S,c))?(c+=3,re(),se(),oe()):he(It,2):61===t?he(kt,2):he(Rt,1)}(code);
1case 60:case 62:return function(code){var t=input.charCodeAt(c+1),e=1;return t===code?(e=62===code&&62===input.charCodeAt(c+2)?3:2,61===input.charCodeAt(c+e)?he(kt,e+1):he(Vt,e)):33==t&&60==code&&45==input.charCodeAt(c+2)&&45==input.charCodeAt(c+3)?(c+=4,re(),se(),oe()):(61===t&&(e=61===input.charCodeAt(c+2)?3:2),he(Ot,e))}(code);case 61:case 33:return function(code){return 61===input.charCodeAt(c+1)?he(Lt,61===input.charCodeAt(c+2)?3:2):he(61===code?St:At,1)}(code);case 126:return he(At,1)}return!1}function oe(t){if(t?c=l+1:l=c,e.locations&&(d=new te),t)return ue();if(c>=n)return ie(R);var code=input.charCodeAt(c);if(Xt(code)||92===code)return de();var r=ae(code);if(!1===r){var o=String.fromCharCode(code);if("\\"===o||Kt.test(o))return de();T(c,"Unexpected character '"+o+"'")}return r}function he(t,e){var n=input.slice(c,c+e);c+=e,ie(t,n)}function ue(){for(var t,e,r=c;;){c>=n&&T(r,"Unterminated regular expression");var o=input.charAt(c);if(Qt.test(o)&&T(r,"Unterminated regular expression"),t)t=!1;else{if("["===o)e=!0;else if("]"===o&&e)e=!1;else if("/"===o&&!e)break;t="\\"===o}++c}var content=input.slice(r,c);++c;var h=fe();h&&!/^[gmsiy]*$/.test(h)&&T(r,"Invalid regexp flag");try{var l=new RegExp(content,h)}catch(t){t instanceof SyntaxError&&T(r,t.message),T(t)}return ie(L,l)}function ce(t,e){for(var n=c,r=0,i=0,o=null==e?1/0:e;i<o;++i){var h,code=input.charCodeAt(c);if((h=code>=97?code-97+10:code>=65?code-65+10:code>=48&&code<=57?code-48:1/0)>=t)break;++c,r=r*t+h}return c===n||null!=e&&c-n!==e?null:r}function le(t){var e=c,n=!1,r=48===input.charCodeAt(c);t||null!==ce(10)||T(e,"Invalid number"),46===input.charCodeAt(c)&&(++c,ce(10),n=!0);var o=input.charCodeAt(c);69!==o&&101!==o||(43!==(o=input.charCodeAt(++c))&&45!==o||++c,null===ce(10)&&T(e,"Invalid number"),n=!0),Xt(input.charCodeAt(c))&&T(c,"Identifier directly after number");var h,l=input.slice(e,c);return n?h=parseFloat(l):r&&1!==l.length?/[89]/.test(l)||P?T(e,"Invalid number"):h=parseInt(l,8):h=parseInt(l,10),ie(M,h)}function pe(t){var e=ce(16,t);return null===e&&T(l,"Bad character escape sequence"),e}function fe(){Ft=!1;for(var t,e=!0,n=c;;){var r=input.charCodeAt(c);if(Yt(r))Ft&&(t+=input.charAt(c)),++c;else{if(92!==r)break;Ft||(t=input.slice(n,c)),Ft=!0,117!=input.charCodeAt(++c)&&T(c,"Expecting Unicode escape sequence \\uXXXX"),++c;var o=pe(4),h=String.fromCharCode(o);h||T(c-1,"Invalid Unicode escape"),(e?Xt(o):Yt(o))||T(c-4,"Invalid Unicode escape"),t+=h}e=!1}return Ft?t:input.slice(n,c)}function de(){var t=fe(),e=V;return!Ft&&Wt(t)&&(e=ct[t]),ie(e,t)}function ge(){C=l,S=f,k=_,oe()}function _e(t){if(P=t,c=l,e.locations)for(;c<w;)w=input.lastIndexOf("\n",w-2)+1,--x;se(),oe()}function ve(){this.type=null,this.start=l,this.end=null}function me(){this.start=d,this.end=null,null!==r&&(this.source=r)}function ye(){var t=new ve;return e.locations&&(t.loc=new me),e.directSourceFile&&(t.sourceFile=e.directSourceFile),e.ranges&&(t.range=[l,0]),t}function xe(t){var n=new ve;return n.start=t.start,e.locations&&(n.loc=new me,n.loc.start=t.loc.start),e.ranges&&(n.range=[t.range[0],0]),n}function we(t,n){return t.type=n,t.end=S,e.locations&&(t.loc.end=k),e.ranges&&(t.range[1]=S),t}function be(t){return e.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"use strict"===t.expression.value}function Ce(t){if(v===t)return ge(),!0}function Se(){return!e.strictSemicolons&&(v===R||v===gt||Qt.test(input.slice(S,l)))}function ke(){Ce(yt)||Se()||Ae()}function Ie(t){v===t?ge():Ae()}function Ae(){T(l,"Unexpected token")}function Pe(t){"Identifier"!==t.type&&"MemberExpression"!==t.type&&T(t.start,"Assigning to rvalue"),P&&"Identifier"===t.type&&Ht(t.name)&&T(t.start,"Assigning to "+t.name+" in strict mode")}var Ee={kind:"loop"},Te={kind:"switch"};function Ne(){(v===Ct||v===kt&&"/="==m)&&oe(!0);var t=v,n=ye();switch(t){case z:case F:ge();var r=t===z;Ce(yt)||Se()?n.label=null:v!==V?Ae():(n.label=Ge(),ke());for(var i=0;i<A.length;++i){var o=A[i];if(null==n.label||o.name===n.label.name){if(null!=o.kind&&(r||"loop"===o.kind))break;if(n.label&&r)break}}return i===A.length&&T(n.start,"Unsyntactic "+t.keyword),we(n,r?"BreakStatement":"ContinueStatement");case j:return ge(),ke(),we(n,"DebuggerStatement");case H:return ge(),A.push(Ee),n.body=Ne(),A.pop(),Ie(et),n.test=Me(),ke(),we(n,"DoWhileStatement");case Z:if(ge(),A.push(Ee),Ie(_t),v===yt)return Oe(n,null);if(v===tt){var h=ye();return ge(),Re(h,!0),we(h,"VariableDeclaration"),1===h.declarations.length&&Ce(ut)?Ve(n,h):Oe(n,h)}return h=ze(!1,!0),Ce(ut)?(Pe(h),Ve(n,h)):Oe(n,h);case K:return ge(),He(n,!0);case $:return ge(),n.test=Me(),n.consequent=Ne(),n.alternate=Ce(W)?Ne():null,we(n,"IfStatement");case Q:return I||e.allowReturnOutsideFunction||T(l,"'return' outside of function"),ge(),Ce(yt)||Se()?n.argument=null:(n.argument=ze(),ke()),we(n,"ReturnStatement");case J:ge(),n.discriminant=Me(),n.cases=[],Ie(ft),A.push(Te);for(var c,f;v!=gt;)if(v===D||v===U){var d=v===D;c&&we(c,"SwitchCase"),n.cases.push(c=ye()),c.consequent=[],ge(),d?c.test=ze():(f&&T(C,"Multiple default clauses"),f=!0,c.test=null),Ie(xt)}else c||Ae(),c.consequent.push(Ne());return c&&we(c,"SwitchCase"),ge(),A.pop(),we(n,"SwitchStatement");case X:return ge(),Qt.test(input.slice(S,l))&&T(S,"Illegal newline after throw"),n.argument=ze(),ke(),we(n,"ThrowStatement");case Y:if(ge(),n.block=Le(),n.handler=null,v===B){var _=ye();ge(),Ie(_t),_.param=Ge(),P&&Ht(_.param.name)&&T(_.param.start,"Binding "+_.param.name+" in strict mode"),Ie(vt),_.guard=null,_.body=Le(),n.handler=we(_,"CatchClause")}return n.guardedHandlers=N,n.finalizer=Ce(G)?Le():null,n.handler||n.finalizer||T(n.start,"Missing catch or finally clause"),we(n,"TryStatement");case tt:return ge(),Re(n),ke(),we(n,"VariableDeclaration");case et:return ge(),n.test=Me(),A.push(Ee),n.body=Ne(),A.pop(),we(n,"WhileStatement");case it:return P&&T(l,"'with' in strict mode"),ge(),n.object=Me(),n.body=Ne(),we(n,"WithStatement");case ft:return Le();case yt:return ge(),we(n,"EmptyStatement");default:var y=m,x=ze();if(t===V&&"Identifier"===x.type&&Ce(xt)){for(i=0;i<A.length;++i)A[i].name===y&&T(x.start,"Label '"+y+"' is already declared");var w=v.isLoop?"loop":v===J?"switch":null;return A.push({name:y,kind:w}
1),n.body=Ne(),A.pop(),n.label=x,we(n,"LabeledStatement")}return n.expression=x,ke(),we(n,"ExpressionStatement")}}function Me(){Ie(_t);var t=ze();return Ie(vt),t}function Le(t){var e,n=ye(),r=!0,o=!1;for(n.body=[],Ie(ft);!Ce(gt);){var h=Ne();n.body.push(h),r&&t&&be(h)&&(e=o,_e(o=!0)),r=!1}return o&&!e&&_e(!1),we(n,"BlockStatement")}function Oe(t,e){return t.init=e,Ie(yt),t.test=v===yt?null:ze(),Ie(yt),t.update=v===vt?null:ze(),Ie(vt),t.body=Ne(),A.pop(),we(t,"ForStatement")}function Ve(t,e){return t.left=e,t.right=ze(),Ie(vt),t.body=Ne(),A.pop(),we(t,"ForInStatement")}function Re(t,e){for(t.declarations=[],t.kind="var";;){var n=ye();if(n.id=Ge(),P&&Ht(n.id.name)&&T(n.id.start,"Binding "+n.id.name+" in strict mode"),n.init=Ce(St)?ze(!0,e):null,t.declarations.push(we(n,"VariableDeclarator")),!Ce(mt))break}return t}function ze(t,e){var n=De(e);if(!t&&v===mt){var r=xe(n);for(r.expressions=[n];Ce(mt);)r.expressions.push(De(e));return we(r,"SequenceExpression")}return n}function De(t){var e=function(t){var e=function(t){return Be(Fe(),-1,t)}(t);if(Ce(bt)){var n=xe(e);return n.test=e,n.consequent=ze(!0),Ie(xt),n.alternate=ze(!0,t),we(n,"ConditionalExpression")}return e}(t);if(v.isAssign){var n=xe(e);return n.operator=m,n.left=e,ge(),n.right=De(t),Pe(e),we(n,"AssignmentExpression")}return e}function Be(t,e,n){var r=v.binop;if(null!=r&&(!n||v!==ut)&&r>e){var o=xe(t);o.left=t,o.operator=m;var h=v;return ge(),o.right=Be(Fe(),r,n),Be(we(o,h===Pt||h===Et?"LogicalExpression":"BinaryExpression"),e,n)}return t}function Fe(){if(v.prefix){var t=ye(),e=v.isUpdate;return t.operator=m,t.prefix=!0,y=!0,ge(),t.argument=Fe(),e?Pe(t.argument):P&&"delete"===t.operator&&"Identifier"===t.argument.type&&T(t.start,"Deleting local variable in strict mode"),we(t,e?"UpdateExpression":"UnaryExpression")}for(var n=je(qe());v.postfix&&!Se();)(t=xe(n)).operator=m,t.prefix=!1,t.argument=n,Pe(n),ge(),n=we(t,"UpdateExpression");return n}function je(base,t){var e;return Ce(wt)?((e=xe(base)).object=base,e.property=Ge(!0),e.computed=!1,je(we(e,"MemberExpression"),t)):Ce(lt)?((e=xe(base)).object=base,e.property=ze(),e.computed=!0,Ie(pt),je(we(e,"MemberExpression"),t)):!t&&Ce(_t)?((e=xe(base)).callee=base,e.arguments=We(vt,!1),je(we(e,"CallExpression"),t)):base}function qe(){switch(v){case st:var t=ye();return ge(),we(t,"ThisExpression");case V:return Ge();case M:case O:case L:return(t=ye()).value=m,t.raw=input.slice(l,f),ge(),we(t,"Literal");case at:case ot:case ht:return(t=ye()).value=v.atomValue,t.raw=v.keyword,ge(),we(t,"Literal");case _t:var n=d,r=l;ge();var o=ze();return o.start=r,o.end=f,e.locations&&(o.loc.start=n,o.loc.end=_),e.ranges&&(o.range=[r,f]),Ie(vt),o;case lt:return t=ye(),ge(),t.elements=We(pt,!0,!0),we(t,"ArrayExpression");case ft:return function(){var t=ye(),n=!0,r=!1;for(t.properties=[],ge();!Ce(gt);){if(n)n=!1;else if(Ie(mt),e.allowTrailingCommas&&Ce(gt))break;var o,h={key:Ue()},c=!1;if(Ce(xt)?(h.value=ze(!0),o=h.kind="init"):e.ecmaVersion>=5&&"Identifier"===h.key.type&&("get"===h.key.name||"set"===h.key.name)?(c=r=!0,o=h.kind=h.key.name,h.key=Ue(),v!==_t&&Ae(),h.value=He(ye(),!1)):Ae(),"Identifier"===h.key.type&&(P||r))for(var i=0;i<t.properties.length;++i){var l=t.properties[i];if(l.key.name===h.key.name){var f=o==l.kind||c&&"init"===l.kind||"init"===o&&("get"===l.kind||"set"===l.kind);f&&!P&&"init"===o&&"init"===l.kind&&(f=!1),f&&T(h.key.start,"Redefinition of property")}}t.properties.push(h)}return we(t,"ObjectExpression")}();case K:return t=ye(),ge(),He(t,!1);case nt:return function(){var t=ye();return ge(),t.callee=je(qe(),!0),Ce(_t)?t.arguments=We(vt,!1):t.arguments=N,we(t,"NewExpression")}();default:Ae()}}function Ue(){return v===M||v===O?qe():Ge(!0)}function He(t,e){v===V?t.id=Ge():e?Ae():t.id=null,t.params=[];var n=!0;for(Ie(_t);!Ce(vt);)n?n=!1:Ie(mt),t.params.push(Ge());var r=I,o=A;if(I=!0,A=[],t.body=Le(!0),I=r,A=o,P||t.body.body.length&&be(t.body.body[0]))for(var i=t.id?-1:0;i<t.params.length;++i){var h=i<0?t.id:t.params[i];if((Ut(h.name)||Ht(h.name))&&T(h.start,"Defining '"+h.name+"' in strict mode"),i>=0)for(var c=0;c<i;++c)h.name===t.params[c].name&&T(h.start,"Argument name clash in strict mode")}return we(t,e?"FunctionDeclaration":"FunctionExpression")}function We(t,n,r){for(var o=[],h=!0;!Ce(t);){if(h)h=!1;else if(Ie(mt),n&&e.allowTrailingCommas&&Ce(t))break;r&&v===mt?o.push(null):o.push(ze(!0))}return o}function Ge(t){var n=ye();return t&&"everywhere"==e.forbidReserved&&(t=!1),v===V?(!t&&(e.forbidReserved&&(3===e.ecmaVersion?jt:qt)(m)||P&&Ut(m))&&-1==input.slice(l,f).indexOf("\\")&&T(l,"The keyword '"+m+"' is reserved"),n.name=m):t&&v.keyword?n.name=v.keyword:Ae(),y=!1,ge(),we(n,"Identifier")}},"object"==typeof t&&"object"==typeof e?v(t):(r=[t],(h="function"==typeof(o=v)?o.apply(t,r):o)===l||(e.exports=h
1)),x.version||(x=null));function w(code,t){return(y.acorn||x).parse(code,t)}var C={"+":"__add","-":"__subtract","*":"__multiply","/":"__divide","%":"__modulo","==":"__equals","!=":"__equals"},S={"-":"__negate","+":"__self"},I=_.each(["add","subtract","multiply","divide","modulo","equals","negate"],function(t){this["__"+t]="#"+t},{__self:function(){return this}});function P(t,e,n){var r=C[e];if(t&&t[r]){var o=t[r](n);return"!="===e?!o:o}switch(e){case"+":return t+n;case"-":return t-n;case"*":return t*n;case"/":return t/n;case"%":return t%n;case"==":return t==n;case"!=":return t!=n}}function E(t,e){var n=S[t];if(e&&e[n])return e[n]();switch(t){case"+":return+e;case"-":return-e}}function T(code,t){if(!code)return"";var e=[];function n(t){for(var i=0,n=e.length;i<n;i++){var r=e[i];if(r[0]>=t)break;t+=r[1]}return t}function r(t){return code.substring(n(t.range[0]),n(t.range[1]))}function o(t,r){for(var o=n(t.range[0]),h=n(t.range[1]),c=0,i=e.length-1;i>=0;i--)if(o>e[i][0]){c=i+1;break}e.splice(c,0,[o,r.length-h+o]),code=code.substring(0,o)+r+code.substring(h)}function h(t,e){switch(t.type){case"UnaryExpression":if(t.operator in S&&"Literal"!==t.argument.type){var h=r(t.argument);o(t,'$__("'+t.operator+'", '+h+")")}break;case"BinaryExpression":if(t.operator in C&&"Literal"!==t.left.type){var c=r(t.left),l=r(t.right),f=function(t,e){return code.substring(n(t.range[1]),n(e.range[0]))}(t.left,t.right),d=t.operator;o(t,"__$__("+c+","+f.replace(new RegExp("\\"+d),'"'+d+'"')+", "+l+")")}break;case"UpdateExpression":case"AssignmentExpression":var _=e&&e.type;if(!("ForStatement"===_||"BinaryExpression"===_&&/^[=!<>]/.test(e.operator)||"MemberExpression"===_&&e.computed))if("UpdateExpression"===t.type){var v=(h=r(t.argument))+" = "+(m="__$__("+h+', "'+t.operator[0]+'", 1)');t.prefix?v="("+v+")":"AssignmentExpression"!==_&&"VariableDeclarator"!==_&&"BinaryExpression"!==_||(r(e.left||e.id)===h&&(v=m),v=h+"; "+v),o(t,v)}else if(/^.=$/.test(t.operator)&&"Literal"!==t.left.type){c=r(t.left),l=r(t.right);var m=c+" = __$__("+c+', "'+t.operator[0]+'", '+l+")";o(t,/^\(.*\)$/.test(r(t))?"("+m+")":m)}}}var map,l=(t=t||{}).url||"",_=t.sourceMaps,v=t.paperFeatures||{},source=t.source||code,m=t.offset||0,y=bt.agent,x=y.versionNumber,k=!1,I=/\r\n|\n|\r/gm;if(_&&(y.chrome&&x>=30||y.webkit&&x>=537.76||y.firefox&&x>=23||y.node)){if(y.node)m-=2;else if(f&&l&&!f.location.href.indexOf(l)){var html=d.getElementsByTagName("html")[0].innerHTML;m=html.substr(0,html.indexOf(code)+1).match(I).length+1}var A=["AA"+function(t){var e="";for(t=(Math.abs(t)<<1)+(t<0?1:0);t||!e;){var n=31&t;(t>>=5)&&(n|=32),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[n]}return e}((k=m>0&&!(y.chrome&&x>=36||y.safari&&x>=600||y.firefox&&x>=40||y.node))?0:m)+"A"];A.length=(code.match(I)||[]).length+1+(k?m:0),map={version:3,file:l,names:[],mappings:A.join(";AACA"),sourceRoot:"",sources:[l],sourcesContent:[source]}}return!1===v.operatorOverloading&&!1===v.moduleExports||function t(e,n,c){if(e){for(var l in e)if("range"!==l&&"loc"!==l){var f=e[l];if(Array.isArray(f))for(var i=0,d=f.length;i<d;i++)t(f[i],e,c);else f&&"object"==typeof f&&t(f,e,c)}!1!==c.operatorOverloading&&h(e,n),!1!==c.moduleExports&&function(t){switch(t.type){case"ExportDefaultDeclaration":o({range:[t.start,t.declaration.start]},"module.exports = ");break;case"ExportNamedDeclaration":var e=t.declaration,n=t.specifiers;if(e){var h=e.declarations;h&&(h.forEach(function(t){o(t,"module.exports."+r(t))}),o({range:[t.start,e.start+e.kind.length]},""))}else if(n){var c=n.map(function(t){var e=r(t);return"module.exports."+e+" = "+e+"; "}).join("");c&&o(t,c)}}}(e)}}(w(code,{ranges:!0,preserveParens:!0,sourceType:"module"}),null,v),map&&(k&&(code=new Array(m+1).join("\n")+code),/^(inline|both)$/.test(_)&&(code+="\n//# sourceMappingURL=data:application/json;base64,"+c.btoa(unescape(encodeURIComponent(JSON.stringify(map))))),code+="\n//# sourceURL="+(l||"paperscript")),{url:l,source:source,code:code,map:map}}function N(code,t,e){bt=t;var n,view=t.getView(),r=/\btool\.\w+|\s+on(?:Key|Mouse)(?:Up|Down|Move|Drag)\b/.test(code)&&!/\bnew\s+Tool\b/.test(code)?new gt:null,o=r?r._events:[],h=["onFrame","onResize"].concat(o),c=[],l=[],f="object"==typeof code?code:T(code,e);function v(t,e){for(var n in t)!e&&/^_/.test(n)||!new RegExp("([\\b\\s\\W]|^)"+n.replace(/\$/g,"\\$")+"\\b").test(code)||(c.push(n),l.push(t[n]))}code=f.code,v({__$__:P,$__:E,paper:t,tool:r},!0),v(t),code="var module = { exports: {} }; "+code,(y=_.each(h,function(t){new RegExp("\\s+"+t+"\\b").test(code)&&(c.push(t),this.push("module.exports."+t+" = "+t+";"))},[]).join("\n"))&&(code+="\n"+y),code+="\nreturn module.exports;";var m=bt.agent;
1if(d&&(m.chrome||m.firefox&&m.versionNumber<40)){var script=d.createElement("script"),head=d.head||d.getElementsByTagName("head")[0];m.firefox&&(code="\n"+code),script.appendChild(d.createTextNode("document.__paperscript__ = function("+c+") {"+code+"\n}")),head.appendChild(script),n=d.__paperscript__,delete d.__paperscript__,head.removeChild(script)}else n=Function(c,code);var y,x=(y=n&&n.apply(t,l))||{};return _.each(o,function(t){var e=x[t];e&&(r[t]=e)}),view&&(x.onResize&&view.setOnResize(x.onResize),view.emit("resize",{size:view.size,delta:new k}),x.onFrame&&view.setOnFrame(x.onFrame),view.requestUpdate()),y}function M(script){if(/^text\/(?:x-|)paperscript$/.test(script.type)&&"true"!==m.getAttribute(script,"ignore")){var t=m.getAttribute(script,"canvas"),canvas=d.getElementById(t),e=script.src||script.getAttribute("data-src"),n=m.hasAttribute(script,"async"),r="data-paper-scope";if(!canvas)throw new Error('Unable to find canvas with id "'+t+'"');var o=m.get(canvas.getAttribute(r))||(new m).setup(canvas);return canvas.setAttribute(r,o._id),e?vt({url:e,async:n,mimeType:"text/plain",onLoad:function(code){N(code,o,e)}}):N(script.innerHTML,o,script.baseURI),script.setAttribute("data-paper-ignore","true"),o}}function L(){_.each(d&&d.getElementsByTagName("script"),M)}return k.inject(I),A.inject(I),tt.inject(I),f&&("complete"===d.readyState?setTimeout(L):at.add(f,{load:L})),{compile:T,execute:N,load:function(script){return script?M(script):L()},parse:w,calculateBinary:P,calculateUnary:E}}.call(this);var bt=new(m.inject(_.exports,{Base:_,Numerical:C,Key:lt,DomEvent:at,DomElement:st,document:d,window:f,Symbol:F,PlacedSymbol:B}));return bt.agent.node&&n(834)(bt),(h="function"==typeof(o=bt)?o.call(e,n,e,t):o)===l||(t.exports=h),bt}).call(this,"object"==typeof self?self:null)},888:function(t,e,n){"use strict";n.r(e),n.d(e,"Node",function(){return It}),n.d(e,"Parser",function(){return tt}),n.d(e,"Position",function(){return W}),n.d(e,"SourceLocation",function(){return G}),n.d(e,"TokContext",function(){return _t}),n.d(e,"Token",function(){return ee}),n.d(e,"TokenType",function(){return w}),n.d(e,"defaultOptions",function(){return K}),n.d(e,"getLineInfo",function(){return Z}),n.d(e,"isIdentifierChar",function(){return x}),n.d(e,"isIdentifierStart",function(){return y}),n.d(e,"isNewLine",function(){return N}),n.d(e,"keywordTypes",function(){return I}),n.d(e,"lineBreak",function(){return E}),n.d(e,"lineBreakG",function(){return T}),n.d(e,"nonASCIIwhitespace",function(){return L}),n.d(e,"parse",function(){return ae}),n.d(e,"parseExpressionAt",function(){return oe}),n.d(e,"tokContexts",function(){return vt}),n.d(e,"tokTypes",function(){return P}),n.d(e,"tokenizer",function(){return he}),n.d(e,"version",function(){return se});var r=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],h="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-Ô¯Ô±-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬá
1³®-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-á¾´á¾¶-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-á¿´á¿¶-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ê­©ê­°-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-ï©­ï©°-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ï¹´ï¹¶-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",c={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},l="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",f={5:l,"5module":l+" export import",6:l+" const class extends export import super"},d=/^in(stanceof)?$/,_=new RegExp("["+h+"]"),v=new RegExp("["+h+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-Û¤Û§Û¨Ûª-Û­Û°-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-à §à ©-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-á®­á®°-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function m(code,t){for(var e=65536,i=0;i<t.length;i+=2){if((e+=t[i])>code)return!1;if((e+=t[i+1])>=code)return!0}return!1}function y(code,t){return code<65?36===code:code<91||(code<97?95===code:code<123||(code<=65535?code>=170&&_.test(String.fromCharCode(code)):!1!==t&&m(code,o)))}function x(code,t){return code<48?36===code:code<58||!(code<65)&&(code<91||(code<97?95===code:code<123||(code<=65535?code>=170&&v.test(String.fromCharCode(code)):!1!==t&&(m(code,o)||m(code,r)))))}var w=function(label,t){void 0===t&&(t={}),this.label=label,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.
vendor: 4,889 bytes, line 1
1isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function C(t,e){return new w(t,{beforeExpr:!0,binop:e})}var S={beforeExpr:!0},k={startsExpr:!0},I={};function A(t,e){return void 0===e&&(e={}),e.keyword=t,I[t]=new w(t,e)}var P={num:new w("num",k),regexp:new w("regexp",k),string:new w("string",k),name:new w("name",k),privateId:new w("privateId",k),eof:new w("eof"),bracketL:new w("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new w("]"),braceL:new w("{",{beforeExpr:!0,startsExpr:!0}),braceR:new w("}"),parenL:new w("(",{beforeExpr:!0,startsExpr:!0}),parenR:new w(")"),comma:new w(",",S),semi:new w(";",S),colon:new w(":",S),dot:new w("."),question:new w("?",S),questionDot:new w("?."),arrow:new w("=>",S),template:new w("template"),invalidTemplate:new w("invalidTemplate"),ellipsis:new w("...",S),backQuote:new w("`",k),dollarBraceL:new w("${",{beforeExpr:!0,startsExpr:!0}),eq:new w("=",{beforeExpr:!0,isAssign:!0}),assign:new w("_=",{beforeExpr:!0,isAssign:!0}),incDec:new w("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new w("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:C("||",1),logicalAND:C("&&",2),bitwiseOR:C("|",3),bitwiseXOR:C("^",4),bitwiseAND:C("&",5),equality:C("==/!=/===/!==",6),relational:C("</>/<=/>=",7),bitShift:C("<</>>/>>>",8),plusMin:new w("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:C("%",10),star:C("*",10),slash:C("/",10),starstar:new w("**",{beforeExpr:!0}),coalesce:C("??",1),_break:A("break"),_case:A("case",S),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",S),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",S),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",k),_if:A("if"),_return:A("return",S),_switch:A("switch"),_throw:A("throw",S),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",k),_super:A("super",k),_class:A("class",k),_extends:A("extends",S),_export:A("export"),_import:A("import",k),_null:A("null",k),_true:A("true",k),_false:A("false",k),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,T=new RegExp(E.source,"g");function N(code){return 10===code||13===code||8232===code||8233===code}function M(code,t,e){void 0===e&&(e=code.length);for(var i=t;i<e;i++){var n=code.charCodeAt(i);if(N(n))return i<e-1&&13===n&&10===code.charCodeAt(i+1)?i+2:i+1}return-1}var L=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,V=Object.prototype,R=V.hasOwnProperty,z=V.toString,D=Object.hasOwn||function(t,e){return R.call(t,e)},B=Array.isArray||function(t){return"[object Array]"===z.call(t)},F=Object.create(null);function j(t){return F[t]||(F[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function U(code){return code<=65535?String.fromCharCode(code):(code-=65536,String.fromCharCode(55296+(code>>10),56320+(1023&code)))}var H=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,W=function(line,col){this.line=line,this.column=col};W.prototype.offset=function(t){return new W(this.line,this.column+t)};var G=function(p,t,e){this.start=t,this.end=e,null!==p.sourceFile&&(this.source=p.sourceFile)};function Z(input,t){for(var line=1,e=0;;){var n=M(input,e,t);if(n<0)return new W(line,t-e);++line,e=n}}var K={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},$=!1;function Q(t){var e={};for(var n in K)e[n]=t&&D(t,n)?t[n]:K[n];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!$&&"object"==typeof console&&console.warn&&($=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),B(e.onToken)){var r=e.onToken;e.onToken=function(t){return r.push(t)}}if(B(e.onComment)&&(e.onComment=function(t,e){return function(n,text,r,o,h,c){var l={type:n?"Block":"Line",value:text,start:r,end:o};t.locations&&(l.loc=new G(this,h,c)),t.ranges&&(l.range=[r,o]),e.push(l)}}(e,e.onComment)),"commonjs"===e.sourceType&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowA
1waitOutsideFunction with sourceType: commonjs");return e}var J=256,X=259;function Y(t,e){return 2|(t?4:0)|(e?8:0)}var tt=function(t,input,e){this.options=t=Q(t),this.sourceFile=t.sourceFile,this.keywords=j(f[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var n="";!0!==t.allowReserved&&(n=c[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(n+=" await")),this.reservedWords=j(n);var r=(n?n+" ":"")+c.strict;this.reservedWordsStrict=j(r),this.reservedWordsStrictBind=j(r+" "+c.strictBind),this.input=String(input),this.containsEsc=!1,e?(this.pos=e,this.lineStart=this.input.lastIndexOf("\n",e-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=P.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.str
vendor: 5,177 bytes, line 1
1ict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},et={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};tt.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},et.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},et.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},et.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},et.canAwait.get=function(){for(var i=this.scopeStack.length-1;i>=0;i--){var t=this.scopeStack[i].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},et.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},et.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},et.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},et.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},et.allowNewDotTarget.get=function(){for(var i=this.scopeStack.length-1;i>=0;i--){var t=this.scopeStack[i].flags;if(768&t||2&t&&!(16&t))return!0}return!1},et.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t)&&!(!this.inModule&&1&t)},et.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&J)>0},tt.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var n=this,i=0;i<t.length;i++)n=t[i](n);return n},tt.parse=function(input,t){return new this(t,input).parse()},tt.parseExpressionAt=function(input,t,e){var n=new this(e,input,t);return n.nextToken(),n.parseExpression()},tt.tokenizer=function(input,t){return new this(t,input)},Object.defineProperties(tt.prototype,et);var it=tt.prototype,nt=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;it.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=t,t+=O.exec(this.input)[0].length;var e=nt.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){O.lastIndex=t+e[0].length;var n=O.exec(this.input),r=n.index+n[0].length,o=this.input.charAt(r);return";"===o||"}"===o||E.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(o)||"!"===o&&"="===this.input.charAt(r+1))}t+=e[0].length,O.lastIndex=t,t+=O.exec(this.input)[0].length,";"===this.input[t]&&t++}},it.eat=function(t){return this.type===t&&(this.next(),!0)},it.isContextual=function(t){return this.type===P.name&&this.value===t&&!this.containsEsc},it.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},it.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},it.canInsertSemicolon=function(){return this.type===P.eof||this.type===P.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},it.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},it.semicolon=function(){this.eat(P.semi)||this.insertSemicolon()||this.unexpected()},it.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},it.expect=function(t){this.eat(t)||this.unexpected()},it.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var st=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};it.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var n=e?t.parenthesizedAssign:t.parenthesizedBind;n>-1&&this.raiseRecoverable(n,e?"Assigning to rvalue":"Parenthesized pattern")}},it.checkExpressionErrors=function(t,e){if(!t)return!1;var n=t.shorthandAssign,r=t.doubleProto;if(!e)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},it.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},it.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"Member
1Expression"===t.type};var at=tt.prototype;at.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==P.eof;){var n=this.parseStatement(null,!0,e);t.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var o=r[i];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(t,"Program")};var ot={kind:"loop"},ht={kind:"switch"};at.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;O.lastIndex=this.pos;var e=O.exec(this.input),n=this.pos+e[0].length,r=this.fullCharCodeAt(n);if(91===r||92===r)return!0;if(t)return!1;if(123===r)return!0;if(y(r)){var o=n;do{n+=r<=65535?1:2}while(x(r=this.fullCharCodeAt(n)));if(92===r)return!0;var h=this.input.slice(o,n);if(!d.test(h))return!0}return!1},at.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;O.lastIndex=this.pos;var t,e=O.exec(this.input),n=this.pos+e[0].length;return!(E.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(x(t=this.fullCharCodeAt(n+8))||92===t))},at.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;O.lastIndex=this.pos;var n=O.exec(this.input),r=this.pos+n[0].length;if(E.test(this.input.slice(this.pos,r)))return!1;if(t){var o,h=r+5;if("using"!==this.input.slice(r,h)||h===this.input.length||x(o=this.fullCharCodeAt(h))||92===o)return!1;O.lastIndex=h;var c=O.exec(this.input);if(r=h+c[0].length,c&&E.test(this.input.slice(h,r)))return!1}var l=this.fullCharCodeAt(r);if(!y(l)&&92!==l)return!1;var f=r;do{r+=l<=65535?1:2}while(x(l=this.fullCharCodeAt(r)));if(92===l)return!0;var _=this.input.slice(f,r);return!(d.test(_)||e&&"of"===_)},at.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},at.isUsing=function(t){return this.isUsingKeyword(!1,t)},at.parseStatement=function(t,e,n){var r,o=this.type,h=this.startNode();switch(this.isLet(t)&&(o=P._var,r="let"),o){case P._break:case P._continue:return this.parseBreakContinueStatement(h,o.keyword);case P._debugger:return this.parseDebuggerStatement(h);case P._do:return this.parseDoStatement(h);case P._for:return this.parseForStatement(h);case P._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(h,!1,!t);case P._class:return t&&this.unexpected(),this.parseClass(h,!0);case P._if:return this.parseIfStatement(h);
vendor: 4,367 bytes, line 1
1case P._return:return this.parseReturnStatement(h);case P._switch:return this.parseSwitchStatement(h);case P._throw:return this.parseThrowStatement(h);case P._try:return this.parseTryStatement(h);case P._const:case P._var:return r=r||this.value,t&&"var"!==r&&this.unexpected(),this.parseVarStatement(h,r);case P._while:return this.parseWhileStatement(h);case P._with:return this.parseWithStatement(h);case P.braceL:return this.parseBlock(!0,h);case P.semi:return this.parseEmptyStatement(h);case P._export:case P._import:if(this.options.ecmaVersion>10&&o===P._import){O.lastIndex=this.pos;var c=O.exec(this.input),l=this.pos+c[0].length,f=this.input.charCodeAt(l);if(40===f||46===f)return this.parseExpressionStatement(h,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),o===P._import?this.parseImport(h):this.parseExport(h,n);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(h,!0,!t);var d=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(d)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),"await using"===d&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(h,!1,d),this.semicolon(),this.finishNode(h,"VariableDeclaration");var _=this.value,v=this.parseExpression();return o===P.name&&"Identifier"===v.type&&this.eat(P.colon)?this.parseLabeledStatement(h,_,v,t):this.parseExpressionStatement(h,v)}},at.parseBreakContinueStatement=function(t,e){var n="break"===e;this.next(),this.eat(P.semi)||this.insertSemicolon()?t.label=null:this.type!==P.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var r=this.labels[i];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(n||"loop"===r.kind))break;if(t.label&&n)break}}return i===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,n?"BreakStatement":"ContinueStatement")},at.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},at.parseDoStatement=function(t){return this.next(),this.labels.push(ot),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(P._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(P.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},at.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ot),this.enterScope(0),this.expect(P.parenL),this.type===P.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var n=this.isLet();if(this.type===P._var||this.type===P._const||n){var r=this.startNode(),o=n?"let":this.value;return this.next(),this.parseVar(r,!0,o),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(t,r,e)}var h=this.isContextual("let"),c=!1,l=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(l){var f=this.startNode();return this.next(),"await using"===l&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(f,!0,l),this.finishNode(f,"VariableDeclaration"),this.parseForAfterInit(t,f,e)}var d=this.containsEsc,_=new st,v=this.start,m=e>-1?this.parseExprSubscripts(_,"await"):this.parseExpression(!0,_);return this.type===P._in||(c=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===P._in&&this.unexpected(e),t.await=!0):c&&this.options.ecmaVersion>=8&&(m.start!==v||d||"Identifier"!==m.type||"async"!==m.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),h&&c&&this.raise(m.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(m,!1,_),this.checkLValPattern(m),this.parseForIn(t,m)):(this.checkExpressionErrors(_,!0),e>-1&&this.unexpected(e),this.parseFor(t,m))},at.parseForAfterInit=function(t,e,n){return(this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.options.ecmaVersion>
vendor: 4,334 bytes, line 1
1=9&&(this.type===P._in?n>-1&&this.unexpected(n):t.await=n>-1),this.parseForIn(t,e)):(n>-1&&this.unexpected(n),this.parseFor(t,e))},at.parseFunctionStatement=function(t,e,n){return this.next(),this.parseFunction(t,ct|(n?0:lt),!1,e)},at.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(P._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},at.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(P.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},at.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(P.braceL),this.labels.push(ht),this.enterScope(1024);for(var n=!1;this.type!==P.braceR;)if(this.type===P._case||this.type===P._default){var r=this.type===P._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),r?e.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,e.test=null),this.expect(P.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},at.parseThrowStatement=function(t){return this.next(),E.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var ut=[];at.parseCatchClauseParam=function(){var param=this.parseBindingAtom(),t="Identifier"===param.type;return this.enterScope(t?32:0),this.checkLValPattern(param,t?4:2),this.expect(P.parenR),param},at.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===P._catch){var e=this.startNode();this.next(),this.eat(P.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(P._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},at.parseVarStatement=function(t,e,n){return this.next(),this.parseVar(t,!1,e,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")},at.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(ot),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},at.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},at.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},at.parseLabeledStatement=function(t,e,n,r){for(var o=0,h=this.labels;o<h.length;o+=1){h[o].name===e&&this.raise(n.start,"Label '"+e+"' is already declared")}for(var c=this.type.isLoop?"loop":this.type===P._switch?"switch":null,i=this.labels.length-1;i>=0;i--){var l=this.labels[i];if(l.statementStart!==t.start)break;l.statementStart=this.start,l.kind=c}return this.labels.push({name:e,kind:c,statementStart:this.start}),t.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")},at.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},at.parseBlock=function(t,e,n){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(P.braceL),t&&this.enterScope(0);this.type!==P.braceR;){var r=this.parseStatement(null);e.body.push(r)}return n&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},at.parseFor=function(t,e){return t.init=e,this.expect(P.semi),t.test=this.type===P.semi?null:this.parseExpression(),this.expect(P.semi),t.update=this.type===P.parenR?null:this.parseExpression(),this.expect(P.parenR),t.body=this.parseStatement
vendor: 16,324 bytes, line 1
1("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},at.parseForIn=function(t,e){var n=this.type===P._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(P.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,n?"ForInStatement":"ForOfStatement")},at.parseVar=function(t,e,n,r){for(t.declarations=[],t.kind=n;;){var o=this.startNode();if(this.parseVarId(o,n),this.eat(P.eq)?o.init=this.parseMaybeAssign(e):r||"const"!==n||this.type===P._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===P._in||this.isContextual("of")?r||"Identifier"===o.id.type||e&&(this.type===P._in||this.isContextual("of"))?o.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(o,"VariableDeclarator")),!this.eat(P.comma))break}return t},at.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var ct=1,lt=2;function pt(t,element){var e=element.key.name,n=t[e],r="true";return"MethodDefinition"!==element.type||"get"!==element.kind&&"set"!==element.kind||(r=(element.static?"s":"i")+element.kind),"iget"===n&&"iset"===r||"iset"===n&&"iget"===r||"sget"===n&&"sset"===r||"sset"===n&&"sget"===r?(t[e]="true",!1):!!n||(t[e]=r,!1)}function ft(t,e){var n=t.computed,r=t.key;return!n&&("Identifier"===r.type&&r.name===e||"Literal"===r.type&&r.value===e)}at.parseFunction=function(t,e,n,r,o){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===P.star&&e&lt&&this.unexpected(),t.generator=this.eat(P.star)),this.options.ecmaVersion>=8&&(t.async=!!r),e&ct&&(t.id=4&e&&this.type!==P.name?null:this.parseIdent(),!t.id||e&lt||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var h=this.yieldPos,c=this.awaitPos,l=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Y(t.async,t.generator)),e&ct||(t.id=this.type===P.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,n,!1,o),this.yieldPos=h,this.awaitPos=c,this.awaitIdentPos=l,this.finishNode(t,e&ct?"FunctionDeclaration":"FunctionExpression")},at.parseFunctionParams=function(t){this.expect(P.parenL),t.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},at.parseClass=function(t,e){this.next();var n=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var r=this.enterClassBody(),o=this.startNode(),h=!1;for(o.body=[],this.expect(P.braceL);this.type!==P.braceR;){var element=this.parseClassElement(null!==t.superClass);element&&(o.body.push(element),"MethodDefinition"===element.type&&"constructor"===element.kind?(h&&this.raiseRecoverable(element.start,"Duplicate constructor in the same class"),h=!0):element.key&&"PrivateIdentifier"===element.key.type&&pt(r,element)&&this.raiseRecoverable(element.key.start,"Identifier '#"+element.key.name+"' has already been declared"))}return this.strict=n,this.next(),t.body=this.finishNode(o,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},at.parseClassElement=function(t){if(this.eat(P.semi))return null;var e=this.options.ecmaVersion,n=this.startNode(),r="",o=!1,h=!1,c="method",l=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(P.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===P.star?l=!0:r="static"}if(n.static=l,!r&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==P.star||this.canInsertSemicolon()?r="async":h=!0),!r&&(e>=9||!h)&&this.eat(P.star)&&(o=!0),!r&&!h&&!o){var f=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?c=f:r=f)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),e<13||this.type===P.parenL||"method"!==c||o||h){var d=!n.static&&ft(n,"constructor"),_=d&&t;d&&"method"!==c&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=d?"constructor":c,this.parseClassMethod(n,o,h,_)}else this.parseClassField(n);return n},at.isClassElementNameStart=function(){return this.type===P.name||this.type===P.privateId||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword},at.parseClassElementName=function(element){this.type===P.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),element.computed=!1,element.key=this.parsePrivateIdent()):this.parsePropertyName(element)},at.parseClassMethod=function(t,e,n,r){var o=t.key;"constructor"===t.kind?(e&&this.raise(o.start,"Constructor can't be a generator"),n&&this.raise(o.start,"Constructor can't be an async method")):t.static&&ft(t,"prototype")&&this.raise(o.start,"Classes may not have a static property named prototype");var h=t.value=this.parseMethod(e,n,r);return"get"===t.kind&&0!==h.params.length&&this.raiseRecoverable(h.start,"getter should have no params"),"set"===t.kind&&1!==h.params.length&&this.raiseRecoverable(h.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===h.params[0].type&&this.raiseRecoverable(h.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},at.parseClassField=function(t){return ft(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&ft(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(P.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},at.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==P.braceR;){var n=this.parseStatement(null);t.body.push(n)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},at.parseClassId=function(t,e){this.type===P.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},at.parseClassSuper=function(t){t.superClass=this.eat(P._extends)?this.parseExprSubscripts(null,!1):null},at.enterClassBody=function(){var element={declared:Object.create(null),used:[]};return this.privateNameStack.push(element),element.declared},at.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,n=t.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,o=0===r?null:this.privateNameStack[r-1],i=0;i<n.length;++i){var h=n[i];D(e,h.name)||(o?o.used.push(h):this.raiseRecoverable(h.start,"Private field '#"+h.name+"' must be declared in an enclosing class"))}},at.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==P.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},at.parseExport=function(t,e){if(this.next(),this.eat(P.star))return this.parseExportAllDeclaration(t,e);if(this.eat(P._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==P.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,n=t.specifiers;i<n.length;i+=1){var r=n[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),"Literal"===r.local.type&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},at.parseExportDeclaration=function(t){return this.parseStatement(null)},at.parseExportDefaultDeclaration=function(){var t;if(this.type===P._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|ct,!1,t)}if(this.type===P._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},at.checkExport=function(t,e,n){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),D(t,e)&&this.raiseRecoverable(n,"Duplicate export '"+e+"'"),t[e]=!0)},at.checkPatternExport=function(t,e){var n=e.type;if("Identifier"===n)this.checkExport(t,e,e.start);else if("ObjectPattern"===n)for(var i=0,r=e.properties;i<r.length;i+=1){var o=r[i];this.checkPatternExport(t,o)}else if("ArrayPattern"===n)for(var h=0,c=e.elements;h<c.length;h+=1){var l=c[h];l&&this.checkPatternExport(t,l)}else"Property"===n?this.checkPatternExport(t,e.value):"AssignmentPattern"===n?this.checkPatternExport(t,e.left):"RestElement"===n&&this.checkPatternExport(t,e.argument)},at.checkVariableExport=function(t,e){if(t)for(var i=0,n=e;i<n.length;i+=1){var r=n[i];this.checkPatternExport(t,r.id)}},at.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},at.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},at.parseExportSpecifiers=function(t){var e=[],n=!0;for(this.expect(P.braceL);!this.eat(P.braceR);){if(n)n=!1;else if(this.expect(P.comma),this.afterTrailingComma(P.braceR))break;e.push(this.parseExportSpecifier(t))}return e},at.parseImport=function(t){return this.next(),this.type===P.string?(t.specifiers=ut,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===P.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},at.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},at.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},at.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},at.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===P.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(P.comma)))return t;if(this.type===P.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(P.braceL);!this.eat(P.braceR);){if(e)e=!1;else if(this.expect(P.comma),this.afterTrailingComma(P.braceR))break;t.push(this.parseImportSpecifier())}return t},at.parseWithClause=function(){var t=[];if(!this.eat(P._with))return t;this.expect(P.braceL);for(var e={},n=!0;!this.eat(P.braceR);){if(n)n=!1;else if(this.expect(P.comma),this.afterTrailingComma(P.braceR))break;var r=this.parseImportAttribute(),o="Identifier"===r.key.type?r.key.name:r.key.value;D(e,o)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+o+"'"),e[o]=!0,t.push(r)}return t},at.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===P.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(P.colon),this.type!==P.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},at.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===P.string){var t=this.parseLiteral(this.value);return H.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},at.adaptDirectivePrologue=function(t){for(var i=0;i<t.length&&this.isDirectiveCandidate(t[i]);++i)t[i].directive=t[i].expression.raw.slice(1,-1)},at.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var gt=tt.prototype;gt.toAssignable=function(t,e,n){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var i=0,r=t.properties;i<r.length;i+=1){var o=r[i];this.toAssignable(o,e),"RestElement"!==o.type||"ArrayPattern"!==o.argument.type&&"ObjectPattern"!==o.argument.type||this.raise(o.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,n);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return t},gt.toAssignableList=function(t,e){for(var n=t.length,i=0;i<n;i++){var r=t[i];r&&this.toAssignable(r,e)}if(n){var o=t[n-1];6===this.options.ecmaVersion&&e&&o&&"RestElement"===o.type&&"Identifier"!==o.argument.type&&this.unexpected(o.argument.start)}return t},gt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},gt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==P.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},gt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case P.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(P.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case P.braceL:return this.parseObj(!0)}return this.parseIdent()},gt.parseBindingList=function(t,e,n,r){for(var o=[],h=!0;!this.eat(t);)if(h?h=!1:this.expect(P.comma),e&&this.type===P.comma)o.push(null);else{if(n&&this.afterTrailingComma(t))break;
vendor: 6,266 bytes, line 1
1if(this.type===P.ellipsis){var c=this.parseRestBinding();this.parseBindingListItem(c),o.push(c),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}o.push(this.parseAssignableListItem(r))}return o},gt.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e},gt.parseBindingListItem=function(param){return param},gt.parseMaybeDefault=function(t,e,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(P.eq))return n;var r=this.startNodeAt(t,e);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},gt.checkLValSimple=function(t,e,n){void 0===e&&(e=0);var r=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(r?"Binding ":"Assigning to ")+t.name+" in strict mode"),r&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),n&&(D(n,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),n[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,n);default:this.raise(t.start,(r?"Binding":"Assigning to")+" rvalue")}},gt.checkLValPattern=function(t,e,n){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var i=0,r=t.properties;i<r.length;i+=1){var o=r[i];this.checkLValInnerPattern(o,e,n)}break;case"ArrayPattern":for(var h=0,c=t.elements;h<c.length;h+=1){var l=c[h];l&&this.checkLValInnerPattern(l,e,n)}break;default:this.checkLValSimple(t,e,n)}},gt.checkLValInnerPattern=function(t,e,n){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,n);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,n);break;case"RestElement":this.checkLValPattern(t.argument,e,n);break;default:this.checkLValPattern(t,e,n)}};var _t=function(t,e,n,r,o){this.token=t,this.isExpr=!!e,this.preserveSpace=!!n,this.override=r,this.generator=!!o},vt={b_stat:new _t("{",!1),b_expr:new _t("{",!0),b_tmpl:new _t("${",!1),p_stat:new _t("(",!1),p_expr:new _t("(",!0),q_tmpl:new _t("`",!0,!0,function(p){return p.tryReadTemplateToken()}),f_stat:new _t("function",!1),f_expr:new _t("function",!0),f_expr_gen:new _t("function",!0,!1,null,!0),f_gen:new _t("function",!1,!1,null,!0)},mt=tt.prototype;mt.initialContext=function(){return[vt.b_stat]},mt.curContext=function(){return this.context[this.context.length-1]},mt.braceIsBlock=function(t){var e=this.curContext();return e===vt.f_expr||e===vt.f_stat||(t!==P.colon||e!==vt.b_stat&&e!==vt.b_expr?t===P._return||t===P.name&&this.exprAllowed?E.test(this.input.slice(this.lastTokEnd,this.start)):t===P._else||t===P.semi||t===P.eof||t===P.parenR||t===P.arrow||(t===P.braceL?e===vt.b_stat:t!==P._var&&t!==P._const&&t!==P.name&&!this.exprAllowed):!e.isExpr)},mt.inGeneratorContext=function(){for(var i=this.context.length-1;i>=1;i--){var t=this.context[i];if("function"===t.token)return t.generator}return!1},mt.updateContext=function(t){var e,n=this.type;n.keyword&&t===P.dot?this.exprAllowed=!1:(e=n.updateContext)?e.call(this,t):this.exprAllowed=n.beforeExpr},mt.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},P.parenR.updateContext=P.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===vt.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},P.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?vt.b_stat:vt.b_expr),this.exprAllowed=!0},P.dollarBraceL.updateContext=function(){this.context.push(vt.b_tmpl),this.exprAllowed=!0},P.parenL.updateContext=function(t){var e=t===P._if||t===P._for||t===P._with||t===P._while;this.context.push(e?vt.p_stat:vt.p_expr),this.exprAllowed=!0},P.incDec.updateContext=function(){},P._function.updateContext=P._class.updateContext=function(t){!t.beforeExpr||t===P._else||t===P.semi&&this.curContext()!==vt.p_stat||t===P._return&&E.test(this.input.slice(this.lastTokEnd,this.start))||(t===P.colon||t===P.braceL)&&this.curContext()===vt.b_stat?this.context.push(vt.f_stat):this.context.push(vt.f_expr),this.exprAllowed=!1},P.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},P.backQuote.updateContext=function(){this.curContext()===vt.q_tmpl?this.context.pop():this.context.push(vt.q_tmpl),this.exprAllowed=!1},P.star.updateContext=function(t){if(t===P._function){var e=this.context.length-1;this.context[e]===vt.f_expr?this.context[e]=vt.f_expr_gen:this.context[e]=vt.f_gen}this.exprAllowed=!0},P.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==P.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var yt=tt.prototype;function xt(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&xt(t.expression)}function wt(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&wt(t.expression)||"ParenthesizedExpression"===t.type&&wt(t.expression)}yt.checkPropClash=function(t,e,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var r,o=t.key;switch(o.type){case"Identifier":r=o.name;break;case"Literal":r=String(o.value);break;default:return}var h=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===h&&(e.proto&&(n?n.doubleProto<0&&(n.doubleProto=o.start):this.raiseRecoverable(o.start,"Redefinition of __proto__ property")),e.proto=!0);else{var c=e[r="$"+r];if(c)("init"===h?this.strict&&c.init||c.get||c.set:c.init||c[h])&&this.raiseRecoverable(o.start,"Redefinition of property");else c=e[r]={init:!1,get:!1,set:!1};c[h]=!0}}},yt.parseExpression=function(t,e){var n=this.start,r=this.startLoc,o=this.parseMaybeAssign(t,e);
vendor: 4,213 bytes, line 1
1if(this.type===P.comma){var h=this.startNodeAt(n,r);for(h.expressions=[o];this.eat(P.comma);)h.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(h,"SequenceExpression")}return o},yt.parseMaybeAssign=function(t,e,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var r=!1,o=-1,h=-1,c=-1;e?(o=e.parenthesizedAssign,h=e.trailingComma,c=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new st,r=!0);var l=this.start,f=this.startLoc;this.type!==P.parenL&&this.type!==P.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var d=this.parseMaybeConditional(t,e);if(n&&(d=n.call(this,d,l,f)),this.type.isAssign){var _=this.startNodeAt(l,f);return _.operator=this.value,this.type===P.eq&&(d=this.toAssignable(d,!1,e)),r||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=d.start&&(e.shorthandAssign=-1),this.type===P.eq?this.checkLValPattern(d):this.checkLValSimple(d),_.left=d,this.next(),_.right=this.parseMaybeAssign(t),c>-1&&(e.doubleProto=c),this.finishNode(_,"AssignmentExpression")}return r&&this.checkExpressionErrors(e,!0),o>-1&&(e.parenthesizedAssign=o),h>-1&&(e.trailingComma=h),d},yt.parseMaybeConditional=function(t,e){var n=this.start,r=this.startLoc,o=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return o;if(this.eat(P.question)){var h=this.startNodeAt(n,r);return h.test=o,h.consequent=this.parseMaybeAssign(),this.expect(P.colon),h.alternate=this.parseMaybeAssign(t),this.finishNode(h,"ConditionalExpression")}return o},yt.parseExprOps=function(t,e){var n=this.start,r=this.startLoc,o=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||o.start===n&&"ArrowFunctionExpression"===o.type?o:this.parseExprOp(o,n,r,-1,t)},yt.parseExprOp=function(t,e,n,r,o){var h=this.type.binop;if(null!=h&&(!o||this.type!==P._in)&&h>r){var c=this.type===P.logicalOR||this.type===P.logicalAND,l=this.type===P.coalesce;l&&(h=P.logicalAND.binop);var f=this.value;this.next();var d=this.start,_=this.startLoc,v=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,o),d,_,h,o),m=this.buildBinary(e,n,t,v,f,c||l);return(c&&this.type===P.coalesce||l&&(this.type===P.logicalOR||this.type===P.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(m,e,n,r,o)}return t},yt.buildBinary=function(t,e,n,r,o,h){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var c=this.startNodeAt(t,e);return c.left=n,c.operator=o,c.right=r,this.finishNode(c,h?"LogicalExpression":"BinaryExpression")},yt.parseMaybeUnary=function(t,e,n,r){var o,h=this.start,c=this.startLoc;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(r),e=!0;else if(this.type.prefix){var l=this.startNode(),f=this.type===P.incDec;l.operator=this.value,l.prefix=!0,this.next(),l.argument=this.parseMaybeUnary(null,!0,f,r),this.checkExpressionErrors(t,!0),f?this.checkLValSimple(l.argument):this.strict&&"delete"===l.operator&&xt(l.argument)?this.raiseRecoverable(l.start,"Deleting local variable in strict mode"):"delete"===l.operator&&wt(l.argument)?this.raiseRecoverable(l.start,"Private fields can not be deleted"):e=!0,o=this.finishNode(l,f?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==P.privateId){if(o=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var d=this.startNodeAt(h,c);d.operator=this.value,d.prefix=!1,d.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(d,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==P._in&&this.unexpected();return n||!this.eat(P.starstar)?o:e?void this.unexpected(this.lastTokStart):this.buildBinary(h,c,o,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},yt.parseExprSubscripts=function(t,e){var n=this.start,r=this.startLoc,o=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===o.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return o;var h=this.parseSubscripts(o,n,r,!1,e);
vendor: 5,326 bytes, line 1
1return t&&"MemberExpression"===h.type&&(t.parenthesizedAssign>=h.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=h.start&&(t.parenthesizedBind=-1),t.trailingComma>=h.start&&(t.trailingComma=-1)),h},yt.parseSubscripts=function(base,t,e,n,r){for(var o=this.options.ecmaVersion>=8&&"Identifier"===base.type&&"async"===base.name&&this.lastTokEnd===base.end&&!this.canInsertSemicolon()&&base.end-base.start===5&&this.potentialArrowAt===base.start,h=!1;;){var element=this.parseSubscript(base,t,e,n,o,h,r);if(element.optional&&(h=!0),element===base||"ArrowFunctionExpression"===element.type){if(h){var c=this.startNodeAt(t,e);c.expression=element,element=this.finishNode(c,"ChainExpression")}return element}base=element}},yt.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(P.arrow)},yt.parseSubscriptAsyncArrow=function(t,e,n,r){return this.parseArrowExpression(this.startNodeAt(t,e),n,!0,r)},yt.parseSubscript=function(base,t,e,n,r,o,h){var c=this.options.ecmaVersion>=11,l=c&&this.eat(P.questionDot);n&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var f=this.eat(P.bracketL);if(f||l&&this.type!==P.parenL&&this.type!==P.backQuote||this.eat(P.dot)){var d=this.startNodeAt(t,e);d.object=base,f?(d.property=this.parseExpression(),this.expect(P.bracketR)):this.type===P.privateId&&"Super"!==base.type?d.property=this.parsePrivateIdent():d.property=this.parseIdent("never"!==this.options.allowReserved),d.computed=!!f,c&&(d.optional=l),base=this.finishNode(d,"MemberExpression")}else if(!n&&this.eat(P.parenL)){var _=new st,v=this.yieldPos,m=this.awaitPos,y=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var x=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1,_);if(r&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(_,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=v,this.awaitPos=m,this.awaitIdentPos=y,this.parseSubscriptAsyncArrow(t,e,x,h);this.checkExpressionErrors(_,!0),this.yieldPos=v||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=y||this.awaitIdentPos;var w=this.startNodeAt(t,e);w.callee=base,w.arguments=x,c&&(w.optional=l),base=this.finishNode(w,"CallExpression")}else if(this.type===P.backQuote){(l||o)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var C=this.startNodeAt(t,e);C.tag=base,C.quasi=this.parseTemplate({isTagged:!0}),base=this.finishNode(C,"TaggedTemplateExpression")}return base},yt.parseExprAtom=function(t,e,n){this.type===P.slash&&this.readRegexp();var r,o=this.potentialArrowAt===this.start;switch(this.type){case P._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==P.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==P.dot&&this.type!==P.bracketL&&this.type!==P.parenL&&this.unexpected(),this.finishNode(r,"Super");case P._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case P.name:var h=this.start,c=this.startLoc,l=this.containsEsc,f=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!l&&"async"===f.name&&!this.canInsertSemicolon()&&this.eat(P._function))return this.overrideContext(vt.f_expr),this.parseFunction(this.startNodeAt(h,c),0,!1,!0,e);if(o&&!this.canInsertSemicolon()){if(this.eat(P.arrow))return this.parseArrowExpression(this.startNodeAt(h,c),[f],!1,e);if(this.options.ecmaVersion>=8&&"async"===f.name&&this.type===P.name&&!l&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return f=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(P.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(h,c),[f],!0,e)}return f;case P.regexp:var d=this.value;return(r=this.parseLiteral(d.value)).regex={pattern:d.pattern,flags:d.flags},r;case P.num:case P.string:return this.parseLiteral(this.value);case P._null:case P._true:case P._false:return(r=this.startNode()).value=this.type===P._null?null:this.type===P._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case P.parenL:var _=this.start,v=this.parseParenAndDistinguishExpression(o,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(v)&&(t.parenthesizedAssign=_),t.parenthesizedBind<0&&(t.parenthesizedBind=_)),v;case P.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(P.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case P.braceL:return this.overrideContext(vt.b_expr),this.parseObj(!1,t);case P._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case P._class:return this.parseClass(this.startNode(),!1);case P._new:return this.parseNew();case P.backQuote:return this.parseTemplate();case P._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},yt.parseExprAtomDefault=function(){this.unexpected()},yt.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===P.parenL&&!t)return this.parseDynamicImport(e);
vendor: 4,291 bytes, line 1
1if(this.type===P.dot){var meta=this.startNodeAt(e.start,e.loc&&e.loc.start);return meta.name="import",e.meta=this.finishNode(meta,"Identifier"),this.parseImportMeta(e)}this.unexpected()},yt.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(P.parenR)?t.options=null:(this.expect(P.comma),this.afterTrailingComma(P.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(P.parenR)||(this.expect(P.comma),this.afterTrailingComma(P.parenR)||this.unexpected())));else if(!this.eat(P.parenR)){var e=this.start;this.eat(P.comma)&&this.eat(P.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},yt.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},yt.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},yt.parseParenExpression=function(){this.expect(P.parenL);var t=this.parseExpression();return this.expect(P.parenR),t},yt.shouldParseArrow=function(t){return!this.canInsertSemicolon()},yt.parseParenAndDistinguishExpression=function(t,e){var n,r=this.start,o=this.startLoc,h=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var c,l=this.start,f=this.startLoc,d=[],_=!0,v=!1,m=new st,y=this.yieldPos,x=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==P.parenR;){if(_?_=!1:this.expect(P.comma),h&&this.afterTrailingComma(P.parenR,!0)){v=!0;break}if(this.type===P.ellipsis){c=this.start,d.push(this.parseParenItem(this.parseRestBinding())),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}d.push(this.parseMaybeAssign(!1,m,this.parseParenItem))}var w=this.lastTokEnd,C=this.lastTokEndLoc;if(this.expect(P.parenR),t&&this.shouldParseArrow(d)&&this.eat(P.arrow))return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=y,this.awaitPos=x,this.parseParenArrowList(r,o,d,e);d.length&&!v||this.unexpected(this.lastTokStart),c&&this.unexpected(c),this.checkExpressionErrors(m,!0),this.yieldPos=y||this.yieldPos,this.awaitPos=x||this.awaitPos,d.length>1?((n=this.startNodeAt(l,f)).expressions=d,this.finishNodeAt(n,"SequenceExpression",w,C)):n=d[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var S=this.startNodeAt(r,o);return S.expression=n,this.finishNode(S,"ParenthesizedExpression")}return n},yt.parseParenItem=function(t){return t},yt.parseParenArrowList=function(t,e,n,r){return this.parseArrowExpression(this.startNodeAt(t,e),n,!1,r)};var bt=[];yt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===P.dot){var meta=this.startNodeAt(t.start,t.loc&&t.loc.start);meta.name="new",t.meta=this.finishNode(meta,"Identifier"),this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),e&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var n=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,r,!0,!1),this.eat(P.parenL)?t.arguments=this.parseExprList(P.parenR,this.options.ecmaVersion>=8,!1):t.arguments=bt,this.finishNode(t,"NewExpression")},yt.parseTemplateElement=function(t){var e=t.isTagged,n=this.startNode();
vendor: 15,192 bytes, line 1
1return this.type===P.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===P.backQuote,this.finishNode(n,"TemplateElement")},yt.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:e});for(n.quasis=[r];!r.tail;)this.type===P.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(P.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(P.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(n,"TemplateLiteral")},yt.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===P.name||this.type===P.num||this.type===P.string||this.type===P.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===P.star)&&!E.test(this.input.slice(this.lastTokEnd,this.start))},yt.parseObj=function(t,e){var n=this.startNode(),r=!0,o={};for(n.properties=[],this.next();!this.eat(P.braceR);){if(r)r=!1;else if(this.expect(P.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(P.braceR))break;var h=this.parseProperty(t,e);t||this.checkPropClash(h,o,e),n.properties.push(h)}return this.finishNode(n,t?"ObjectPattern":"ObjectExpression")},yt.parseProperty=function(t,e){var n,r,o,h,c=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(P.ellipsis))return t?(c.argument=this.parseIdent(!1),this.type===P.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(c,"RestElement")):(c.argument=this.parseMaybeAssign(!1,e),this.type===P.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(c,"SpreadElement"));this.options.ecmaVersion>=6&&(c.method=!1,c.shorthand=!1,(t||e)&&(o=this.start,h=this.startLoc),t||(n=this.eat(P.star)));var l=this.containsEsc;return this.parsePropertyName(c),!t&&!l&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(c)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(P.star),this.parsePropertyName(c)):r=!1,this.parsePropertyValue(c,t,n,r,o,h,e,l),this.finishNode(c,"Property")},yt.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var n="get"===t.kind?0:1;if(t.value.params.length!==n){var r=t.value.start;"get"===t.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},yt.parsePropertyValue=function(t,e,n,r,o,h,c,l){(n||r)&&this.type===P.colon&&this.unexpected(),this.eat(P.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,c),t.kind="init"):this.options.ecmaVersion>=6&&this.type===P.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(n,r),t.kind="init"):e||l||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===P.comma||this.type===P.braceR||this.type===P.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=o),e?t.value=this.parseMaybeDefault(o,h,this.copyNode(t.key)):this.type===P.eq&&c?(c.shorthandAssign<0&&(c.shorthandAssign=this.start),t.value=this.parseMaybeDefault(o,h,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(t))},yt.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(P.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(P.bracketR),t.key;t.computed=!1}return t.key=this.type===P.num||this.type===P.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},yt.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},yt.parseMethod=function(t,e,n){var r=this.startNode(),o=this.yieldPos,h=this.awaitPos,c=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=t),this.options.ecmaVersion>=8&&(r.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Y(e,r.generator)|(n?128:0)),this.expect(P.parenL),r.params=this.parseBindingList(P.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=o,this.awaitPos=h,this.awaitIdentPos=c,this.finishNode(r,"FunctionExpression")},yt.parseArrowExpression=function(t,e,n,r){var o=this.yieldPos,h=this.awaitPos,c=this.awaitIdentPos;return this.enterScope(16|Y(n,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,r),this.yieldPos=o,this.awaitPos=h,this.awaitIdentPos=c,this.finishNode(t,"ArrowFunctionExpression")},yt.parseFunctionBody=function(t,e,n,r){var o=e&&this.type!==P.braceL,h=this.strict,c=!1;if(o)t.body=this.parseMaybeAssign(r),t.expression=!0,this.checkParams(t,!1);else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);h&&!l||(c=this.strictDirective(this.end))&&l&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var f=this.labels;this.labels=[],c&&(this.strict=!0),this.checkParams(t,!h&&!c&&!e&&!n&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,c&&!h),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=f}this.exitScope()},yt.isSimpleParamList=function(t){for(var i=0,e=t;i<e.length;i+=1){if("Identifier"!==e[i].type)return!1}return!0},yt.checkParams=function(t,e){for(var n=Object.create(null),i=0,r=t.params;i<r.length;i+=1){var param=r[i];this.checkLValInnerPattern(param,1,e?null:n)}},yt.parseExprList=function(t,e,n,r){for(var o=[],h=!0;!this.eat(t);){if(h)h=!1;else if(this.expect(P.comma),e&&this.afterTrailingComma(t))break;var c=void 0;n&&this.type===P.comma?c=null:this.type===P.ellipsis?(c=this.parseSpread(r),r&&this.type===P.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):c=this.parseMaybeAssign(!1,r),o.push(c)}return o},yt.checkUnreserved=function(t){var e=t.start,n=t.end,r=t.name;(this.inGenerator&&"yield"===r&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&X||"arguments"!==r||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(e,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(e,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,n).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+r+"' is reserved"))},yt.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},yt.parseIdentNode=function(){var t=this.startNode();return this.type===P.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=P.name):this.unexpected(),t},yt.parsePrivateIdent=function(){var t=this.startNode();return this.type===P.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},yt.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===P.semi||this.canInsertSemicolon()||this.type!==P.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(P.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},yt.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var Ct=tt.prototype;Ct.raise=function(t,e){var n=Z(this.input,t);e+=" ("+n.line+":"+n.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var r=new SyntaxError(e);throw r.pos=t,r.loc=n,r.raisedAt=this.pos,r},Ct.raiseRecoverable=Ct.raise,Ct.curPosition=function(){if(this.options.locations)return new W(this.curLine,this.pos-this.lineStart)};var St=tt.prototype,kt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};St.enterScope=function(t){this.scopeStack.push(new kt(t))},St.exitScope=function(){this.scopeStack.pop()},St.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},St.declareName=function(t,e,n){var r=!1;if(2===e){var o=this.currentScope();r=o.lexical.indexOf(t)>-1||o.functions.indexOf(t)>-1||o.var.indexOf(t)>-1,o.lexical.push(t),this.inModule&&1&o.flags&&delete this.undefinedExports[t]}else if(4===e){this.currentScope().lexical.push(t)}else if(3===e){var h=this.currentScope();r=this.treatFunctionsAsVar?h.lexical.indexOf(t)>-1:h.lexical.indexOf(t)>-1||h.var.indexOf(t)>-1,h.functions.push(t)}else for(var i=this.scopeStack.length-1;i>=0;--i){var c=this.scopeStack[i];if(c.lexical.indexOf(t)>-1&&!(32&c.flags&&c.lexical[0]===t)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(t)>-1){r=!0;break}if(c.var.push(t),this.inModule&&1&c.flags&&delete this.undefinedExports[t],c.flags&X)break}r&&this.raiseRecoverable(n,"Identifier '"+t+"' has already been declared")},St.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},St.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},St.currentVarScope=function(){for(var i=this.scopeStack.length-1;;i--){var t=this.scopeStack[i];if(771&t.flags)return t}},St.currentThisScope=function(){for(var i=this.scopeStack.length-1;;i--){var t=this.scopeStack[i];if(771&t.flags&&!(16&t.flags))return t}};var It=function(t,e,n){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new G(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},At=tt.prototype;function Pt(t,e,n,r){return t.type=e,t.end=n,this.options.locations&&(t.loc.end=r),this.options.ranges&&(t.range[1]=n),t}At.startNode=function(){return new It(this,this.start,this.startLoc)},At.startNodeAt=function(t,e){return new It(this,t,e)},At.finishNode=function(t,e){return Pt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},At.finishNodeAt=function(t,e,n,r){return Pt.call(this,t,e,n,r)},At.copyNode=function(t){var e=new It(this,t.start,this.startLoc);for(var n in t)e[n]=t[n];return e};var Et="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Tt=Et+" Extended_Pictographic",Nt=Tt+" EBase EComp EMod EPres ExtPict",Mt={9:Et,10:Tt,11:Tt,12:Nt,13:Nt,14:Nt},Lt={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Ot="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Vt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Re
1jang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Rt=Vt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",zt=Rt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Dt=zt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Bt=Dt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ft={9:Vt,10:Rt,11:zt,12:Dt,13:Bt,14:Bt+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},data={};function jt(t){var e=data[t]={binary:j(Mt[t]+" "+Ot),binaryOfStrings:j(Lt[t]),nonBinary:{General_Category:j(Ot),Script:j(Ft[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var i=0,qt=[9,10,11,12,13,14];i<qt.length;i+=1){jt(qt[i])}var Ut=tt.prototype,Ht=function(t,base){this.parent=t,this.base=base||this};Ht.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var n=t;n;n=n.parent)if(e.base===n.base&&e!==n)return!0;return!1},Ht.prototype.sibling=function(){return new Ht(this.parent,this.base)};var Wt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=data[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function Gt(t){return 105===t||109===t||115===t}function Zt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function Kt(t){return t>=65&&t<=90||t>=97&&t<=122}Wt.prototype.reset=function(t,pattern,e){var n=-1!==e.indexOf("v"),r=-1!==e.indexOf("u");this.start=0|t,this.source=pattern+"",this.flags=e,n&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=r&&this.parser.options.ecmaVersion>=9)},Wt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Wt.prototype.at=function(i,t){void 0===t&&(t=!1);var s=this.source,e=s.length;if(i>=e)return-1;var n=s.charCodeAt(i);if(!t&&!this.switchU||n<=55295||n>=57344||i+1>=e)return n;var r=s.charCodeAt(i+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n},Wt.prototype.nextIndex=function(i,t){void 0===t&&(t=!1);var s=this.source,e=s.length;if(i>=e)return e;var n,r=s.charCodeAt(i);return!t&&!this.switchU||r<=55295||r>=57344||i+1>=e||(n=s.charCodeAt(i+1))<56320||n>57343?i+1:i+2},Wt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Wt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Wt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Wt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Wt.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var n=this.pos,i=0,r=t;i<r.length;i+=1){var o=r[i],h=this.at(n,e);if(-1===h||h!==o)return!1;n=this.nextIndex(n,e)}return this.pos=n,!0},Ut.validateRegExpFlags=function(t){for(var e=t.validFlags,n=t.flags,u=!1,r=!1,i=0;i<n.length;i++){var o=n.charAt(i);-1===e.indexOf(o)&&this.raise(t.start,"Invalid regular expression flag"),n.indexOf(o,i+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===o&&(u=!0),"v"===o&&(r=!0)}this.options.ecmaVersion>=15&&u&&r&&this.raise(t.start,"Invalid regular expression flag")},Ut.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&function(t){for(var e in t)return!0;return!1}(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},Ut.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var i=0,e=t.backReferenceNames;i<e.length;i+=1){var n=e[i];t.groupNames[n]||t.raise("Invalid named capture referenced")}},Ut.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Ht(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},Ut.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Ut.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},Ut.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;
vendor: 25,002 bytes, line 1
1if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!n,!0}return t.pos=e,!1},Ut.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Ut.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Ut.regexp_eatBracedQuantifier=function(t,e){var n=t.pos;if(t.eat(123)){var r=0,o=-1;if(this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(o=t.lastIntValue),t.eat(125)))return-1!==o&&o<r&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=n}return!1},Ut.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},Ut.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Ut.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(t),r=t.eat(45);if(n||r){for(var i=0;i<n.length;i++){var o=n.charAt(i);n.indexOf(o,i+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(r){var h=this.regexp_eatModifiers(t);n||h||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var c=0;c<h.length;c++){var l=h.charAt(c);(h.indexOf(l,c+1)>-1||n.indexOf(l)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},Ut.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},Ut.regexp_eatModifiers=function(t){for(var e="",n=0;-1!==(n=t.current())&&Gt(n);)e+=U(n),t.advance();return e},Ut.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},Ut.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Ut.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Zt(e)&&(t.lastIntValue=e,t.advance(),!0)},Ut.regexp_eatPatternCharacters=function(t){for(var e=t.pos,n=0;-1!==(n=t.current())&&!Zt(n);)t.advance();return t.pos!==e},Ut.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e)&&(t.advance(),!0)},Ut.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,n=t.groupNames[t.lastStringValue];if(n)if(e)for(var i=0,r=n;i<r.length;i+=1){r[i].separatedFrom(t.branchID)||t.raise("Duplicate capture group name")}else t.raise("Duplicate capture group name");e?(n||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},Ut.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},Ut.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=U(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=U(t.lastIntValue);return!0}return!1},Ut.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,n=this.options.ecmaVersion>=11,r=t.current(n);return t.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,n)&&(r=t.lastIntValue),function(t){return y(t,!0)||36===t||95===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Ut.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,n=this.options.ecmaVersion>=11,r=t.current(n);return t.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(t,n)&&(r=t.lastIntValue),function(t){return x(t,!0)||36===t||95===t||8204===t||8205===t}(r)?(t.lastIntValue=r,!0):(t.pos=e,!1)},Ut.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},Ut.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var n=t.lastIntValue;if(t.switchU)return n>t.maxBackReference&&(t.maxBackReference=n),!0;if(n<=t.numCapturingParens)return!0;t.pos=e}return!1},Ut.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},Ut.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},Ut.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Ut.regexp_eatZero=function(t){return 48===t.current()&&!Jt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Ut.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},Ut.regexp_eatControlLetter=function(t){var e=t.current();return!!Kt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Ut.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var n,r=t.pos,o=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var h=t.lastIntValue;if(o&&h>=55296&&h<=56319){var c=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var l=t.lastIntValue;if(l>=56320&&l<=57343)return t.lastIntValue=1024*(h-55296)+(l-56320)+65536,!0}t.pos=c,t.lastIntValue=h}return!0}if(o&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&((n=t.lastIntValue)>=0&&n<=1114111))return!0;o&&t.raise("Invalid unicode escape"),t.pos=r}return!1},Ut.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e)&&(t.lastIntValue=e,t.advance(),!0)},Ut.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1};function $t(t){return Kt(t)||95===t}function Qt(t){return $t(t)||Jt(t)}function Jt(t){return t>=48&&t<=57}function Xt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Yt(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function te(t){return t>=48&&t<=55}Ut.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),1;var n=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((n=80===e)||112===e)){var r;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return n&&2===r&&t.raise("Invalid property name"),r;t.raise("Invalid property name")}return 0},Ut.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var n=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,n,r),1}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var o=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,o)}return 0},Ut.regexp_validateUnicodePropertyNameAndValue=function(t,e,n){D(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(n)||t.raise("Invalid property value")},Ut.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},Ut.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";$t(e=t.current());)t.lastStringValue+=U(e),t.advance();return""!==t.lastStringValue},Ut.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Qt(e=t.current());)t.lastStringValue+=U(e),t.advance();return""!==t.lastStringValue},Ut.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Ut.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),n=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&2===n&&t.raise("Negated character class may contain strings"),!0}return!1},Ut.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Ut.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var n=t.lastIntValue;!t.switchU||-1!==e&&-1!==n||t.raise("Invalid character class"),-1!==e&&-1!==n&&e>n&&t.raise("Range out of order in character class")}}},Ut.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var n=t.current();(99===n||te(n))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var r=t.current();return 93!==r&&(t.lastIntValue=r,t.advance(),!0)},Ut.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},Ut.regexp_classSetExpression=function(t){var e,n=1;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){2===e&&(n=2);for(var r=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?2!==e&&(n=1):t.raise("Invalid character in character class");if(r!==t.pos)return n;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(r!==t.pos)return n}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return n;2===e&&(n=2)}},Ut.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var n=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var r=t.lastIntValue;return-1!==n&&-1!==r&&n>r&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},Ut.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Ut.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var n=t.eat(94),r=this.regexp_classContents(t);if(t.eat(93))return n&&2===r&&t.raise("Negated character class may contain strings"),r;t.pos=e}if(t.eat(92)){var o=this.regexp_eatCharacterClassEscape(t);if(o)return o;t.pos=e}return null},Ut.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var n=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return n}else t.raise("Invalid escape");t.pos=e}return null},Ut.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Ut.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Ut.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t))||(t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1));var n=t.current();return!(n<0||n===t.lookahead()&&function(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}(n))&&(!function(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}(n)&&(t.advance(),t.lastIntValue=n,!0))},Ut.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!function(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}(e)&&(t.lastIntValue=e,t.advance(),!0)},Ut.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Jt(e)&&95!==e)&&(t.lastIntValue=e%32,t.advance(),!0)},Ut.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},Ut.regexp_eatDecimalDigits=function(t){var e=t.pos,n=0;for(t.lastIntValue=0;Jt(n=t.current());)t.lastIntValue=10*t.lastIntValue+(n-48),t.advance();return t.pos!==e},Ut.regexp_eatHexDigits=function(t){var e=t.pos,n=0;for(t.lastIntValue=0;Xt(n=t.current());)t.lastIntValue=16*t.lastIntValue+Yt(n),t.advance();return t.pos!==e},Ut.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var n=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*n+t.lastIntValue:t.lastIntValue=8*e+n}else t.lastIntValue=e;return!0}return!1},Ut.regexp_eatOctalDigit=function(t){var e=t.current();return te(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Ut.regexp_eatFixedHexDigits=function(t,e){var n=t.pos;t.lastIntValue=0;for(var i=0;i<e;++i){var r=t.current();if(!Xt(r))return t.pos=n,!1;t.lastIntValue=16*t.lastIntValue+Yt(r),t.advance()}return!0};var ee=function(p){this.type=p.type,this.value=p.value,this.start=p.start,this.end=p.end,p.options.locations&&(this.loc=new G(p,p.startLoc,p.endLoc)),p.options.ranges&&(this.range=[p.start,p.end])},ie=tt.prototype;function ne(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}ie.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ee(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ie.getToken=function(){return this.next(),new ee(this)},"undefined"!=typeof Symbol&&(ie[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===P.eof,value:e}}}}),ie.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(P.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},ie.readToken=function(code){return y(code,this.options.ecmaVersion>=6)||92===code?this.readWord():this.getTokenFromCode(code)},ie.fullCharCodeAt=function(t){var code=this.input.charCodeAt(t);if(code<=55295||code>=56320)return code;var e=this.input.charCodeAt(t+1);return e<=56319||e>=57344?code:(code<<10)+e-56613888},ie.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},ie.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,o=e;(r=M(this.input,o,this.pos))>-1;)++this.curLine,o=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,n),e,this.pos,t,this.curPosition())},ie.skipLineComment=function(t){for(var e=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!N(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,n,this.curPosition())},ie.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&L.test(String.fromCharCode(t))))break t;++this.pos}}},ie.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=t,this.value=e,this.updateContext(n)},ie.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(P.ellipsis)):(++this.pos,this.finishToken(P.dot))},ie.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(P.assign,2):this.finishOp(P.slash,1)},ie.readToken_mult_modulo_exp=function(code){var t=this.input.charCodeAt(this.pos+1),e=1,n=42===code?P.star:P.modulo;return this.options.ecmaVersion>=7&&42===code&&42===t&&(++e,n=P.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(P.assign,e+1):this.finishOp(n,e)},ie.readToken_pipe_amp=function(code){var t=this.input.charCodeAt(this.pos+1);if(t===code){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(P.assign,3);return this.finishOp(124===code?P.logicalOR:P.logicalAND,2)}return 61===t?this.finishOp(P.assign,2):this.finishOp(124===code?P.bitwiseOR:P.bitwiseAND,1)},ie.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(P.assign,2):this.finishOp(P.bitwiseXOR,1)},ie.readToken_plus_min=function(code){var t=this.input.charCodeAt(this.pos+1);return t===code?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!E.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(P.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(P.assign,2):this.finishOp(P.plusMin,1)},ie.readToken_lt_gt=function(code){var t=this.input.charCodeAt(this.pos+1),e=1;return t===code?(e=62===code&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+e)?this.finishOp(P.assign,e+1):this.finishOp(P.bitShift,e)):33!==t||60!==code||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(e=2),this.finishOp(P.relational,e)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},ie.readToken_eq_excl=function(code){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(P.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===code&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(P.arrow)):this.finishOp(61===code?P.eq:P.prefix,1)},ie.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(P.questionDot,2)}if(63===e){if(t>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(P.assign,3);return this.finishOp(P.coalesce,2)}}return this.finishOp(P.question,1)},ie.readToken_numberSign=function(){var code=35;if(this.options.ecmaVersion>=13&&(++this.pos,y(code=this.fullCharCodeAtPos(),!0)||92===code))return this.finishToken(P.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+U(code)+"'")},ie.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(P.parenL);case 41:return++this.pos,this.finishToken(P.parenR);case 59:return++this.pos,this.finishToken(P.semi);case 44:return++this.pos,this.finishToken(P.comma);case 91:return++this.pos,this.finishToken(P.bracketL);case 93:return++this.pos,this.finishToken(P.bracketR);case 123:return++this.pos,this.finishToken(P.braceL);case 125:return++this.pos,this.finishToken(P.braceR);case 58:return++this.pos,this.finishToken(P.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(P.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(code);case 124:case 38:return this.readToken_pipe_amp(code);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(code);case 60:case 62:return this.readToken_lt_gt(code);case 61:case 33:return this.readToken_eq_excl(code);case 63:return this.readToken_question();case 126:return this.finishOp(P.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+U(code)+"'")},ie.finishOp=function(t,e){var n=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,n)},ie.readRegexp=function(){for(var t,e,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(E.test(r)&&this.raise(n,"Unterminated regular expression"),t)t=!1;else{if("["===r)e=!0;else if("]"===r&&e)e=!1;else if("/"===r&&!e)break;t="\\"===r}++this.pos}var pattern=this.input.slice(n,this.pos);++this.pos;var o=this.pos,h=this.readWord1();this.containsEsc&&this.unexpected(o);var c=this.regexpState||(this.regexpState=new Wt(this));c.reset(n,pattern,h),this.validateRegExpFlags(c),this.validateRegExpPattern(c);var l=null;try{l=new RegExp(pattern,h)}catch(t){}return this.finishToken(P.regexp,{pattern:pattern,flags:h,value:l})},ie.readInt=function(t,e,n){for(var r=this.options.ecmaVersion>=12&&void 0===e,o=n&&48===this.input.charCodeAt(this.pos),h=this.pos,c=0,l=0,i=0,f=null==e?1/0:e;i<f;++i,++this.pos){var code=this.input.charCodeAt(this.pos),d=void 0;if(r&&95===code)o&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===l&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),l=code;else{if((d=code>=97?code-97+10:code>=65?code-65+10:code>=48&&code<=57?code-48:1/0)>=t)break;l=code,c=c*t+d}}return r&&95===l&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===h||null!=e&&this.pos-h!==e?null:c},ie.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var n=this.readInt(t);return null==n&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=ne(this.input.slice(e,this.pos)),++this.pos):y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,n)},ie.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var n=this.pos-e>=2&&48===this.input.charCodeAt(e);n&&this.strict&&this.raise(e,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!t&&this.options.ecmaVersion>=11&&110===r){var o=ne(this.input.slice(e,this.pos));return++this.pos,y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(P.num,o)}n&&/[89]/.test(this.input.slice(e,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var h,c=(h=this.input.slice(e,this.pos),n?parseInt(h,8):parseFloat(h.replace(/_/g,"")));return this.finishToken(P.num,c)},ie.readCodePoint=function(){var code;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,code>1114111&&this.invalidStringToken(t,"Code point out of bounds")}
vendor: 1,948 bytes, line 1
1else code=this.readHexChar(4);return code},ie.readString=function(t){for(var e="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===t)break;92===r?(e+=this.input.slice(n,this.pos),e+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(N(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(n,this.pos++),this.finishToken(P.string,e)};var re={};ie.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==re)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},ie.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw re;this.raise(t,e)},ie.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==P.template&&this.type!==P.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(P.template,t)):36===n?(this.pos+=2,this.finishToken(P.dollarBraceL)):(++this.pos,this.finishToken(P.backQuote));if(92===n)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(N(n)){switch(t+=this.input.slice(e,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},ie.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;
vendor: 2,665 bytes, line 1
1case"`":return this.finishToken(P.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},ie.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return U(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(r,8);return o>255&&(r=r.slice(0,-1),o=parseInt(r,8)),this.pos+=r.length-1,e=this.input.charCodeAt(this.pos),"0"===r&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-r.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(o)}return N(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},ie.readHexChar=function(t){var e=this.pos,n=this.readInt(16,t);return null===n&&this.invalidStringToken(e,"Bad character escape sequence"),n},ie.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var o=this.fullCharCodeAtPos();if(x(o,r))this.pos+=o<=65535?1:2;else{if(92!==o)break;this.containsEsc=!0,t+=this.input.slice(n,this.pos);var h=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var c=this.readCodePoint();(e?y:x)(c,r)||this.invalidStringToken(h,"Invalid Unicode escape"),t+=U(c),n=this.pos}e=!1}return t+this.input.slice(n,this.pos)},ie.readWord=function(){var t=this.readWord1(),e=P.name;return this.keywords.test(t)&&(e=I[t]),this.finishToken(e,t)};var se="8.16.0";function ae(input,t){return tt.parse(input,t)}function oe(input,t,e){return tt.parseExpressionAt(input,t,e)}function he(input,t){return tt.tokenizer(input,t)}tt.acorn={Parser:tt,version:se,defaultOptions:K,Position:W,SourceLocation:G,getLineInfo:Z,Node:It,TokenType:w,tokTypes:P,keywordTypes:I,TokContext:_t,tokContexts:vt,isIdentifierChar:x,isIdentifierStart:y,Token:ee,isNewLine:N,lineBreak:E,lineBreakG:T,nonASCIIwhitespace:L}}}]);

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.